Changeset 18652
- Timestamp:
- 10/16/14 09:03:15 (10 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/mask.py
r18649 r18652 38 38 raise TypeError("no ice present in the domain") 39 39 40 icefront=numpy.sum(md.mask.ice_levelset[md.mesh.elements ]==0,2)40 icefront=numpy.sum(md.mask.ice_levelset[md.mesh.elements-1]==0,axis=1) 41 41 if (max(icefront)==3 and m.strcmp(md.mesh.elementtype(),'Tria')) or (max(icefront==6) and m.strcmp(md.mesh.elementtype(),'Penta')): 42 42 raise TypeError("At least one element has all nodes on ice front, change md.mask.ice_levelset to fix it") -
issm/trunk-jpl/src/m/classes/stressbalance.m
r18619 r18652 26 26 end 27 27 methods 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 28 function createxml(obj,fid) % {{{ 29 fprintf(fid, '\n\n'); 30 fprintf(fid, '%s\n', '<!-- StressBalance solution parameters: -->'); 31 32 % Convergence criteria 33 fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Convergence criteria">','<section name="stressbalance" />'); 34 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="restol" type="', class(obj.restol),'" default="', convert2str(obj.restol),'">', ' <section name="stressbalance" />',' <help> mechanical equilibrium residual convergence criterion </help>','</parameter>'); 35 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="reltol" type="', class(obj.reltol),'" default="', convert2str(obj.reltol),'">', ' <section name="stressbalance" />',' <help> velocity relative convergence criterion, NaN: not applied </help>','</parameter>'); 36 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="abstol" type="', class(obj.abstol),'" default="', convert2str(obj.abstol),'">', ' <section name="stressbalance" />',' <help> velocity absolute convergence criterion, NaN: not applied </help>','</parameter>'); 37 38 %is newton drop-down (0,1,or 2) 39 fprintf(fid,'%s\n%s\n%s\n%s\n', '<parameter key ="isnewton" type="alternative" optional="false">', ' <section name="stressbalance" />',' <help> 0: Picards fixed point, 1: Newtons method, 2: hybrid </help>'); 40 fprintf(fid,'%s\n',' <option value="0" type="string" default="true"> </option>'); 41 fprintf(fid,'%s\n',' <option value="1" type="string" default="false"> </option>'); 42 fprintf(fid,'%s\n%s\n',' <option value="2" type="string" default="false"> </option>','</parameter>'); 43 44 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="maxiter" type="', class(obj.maxiter),'" default="', convert2str(obj.maxiter),'">', ' <section name="stressbalance" />',' <help> maximum number of nonlinear iterations </help>','</parameter>'); 45 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="viscosity_overshoot" type="', class(obj.viscosity_overshoot),'" default="', convert2str(obj.viscosity_overshoot),'">', ' <section name="stressbalance" />',' <help> over-shooting constant new=new+C*(new-old) </help>','</parameter>'); 46 fprintf(fid,'%s\n%s\n','</frame>'); 47 48 % boundary conditions 49 fprintf(fid,'%s\n%s\n%s\n','<frame key="2" label="Boundary conditions">','<section name="stressbalance" />'); 50 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="spcvx" type="', class(obj.spcvx),'" default="', convert2str(obj.spcvx),'">', ' <section name="stressbalance" />',' <help> x-axis velocity constraint (NaN means no constraint) [m/yr] </help>','</parameter>'); 51 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="spcvy" type="', class(obj.spcvy),'" default="', convert2str(obj.spcvy),'">', ' <section name="stressbalance" />',' <help> y-axis velocity constraint (NaN means no constraint) [m/yr] </help>','</parameter>'); 52 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="spcvz" type="', class(obj.spcvz),'" default="', convert2str(obj.spcvz),'">', ' <section name="stressbalance" />',' <help> z-axis velocity constraint (NaN means no constraint) [m/yr] </help>','</parameter>'); 53 fprintf(fid,'%s\n%s\n','</frame>'); 54 55 % Rift options 56 fprintf(fid,'%s\n%s\n%s\n','<frame key="3" label="Rift options">','<section name="stressbalance" />'); 57 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="rift_penalty_threshold" type="', class(obj.rift_penalty_threshold),'" default="', convert2str(obj.rift_penalty_threshold),'">', ' <section name="stressbalance" />',' <help> threshold for instability of mechanical constraints </help>','</parameter>'); 58 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="rift_penalty_lock" type="', class(obj.rift_penalty_lock),'" default="', convert2str(obj.rift_penalty_lock),'">', ' <section name="stressbalance" />',' <help> number of iterations before rift penalties are locked </help>','</parameter>'); 59 fprintf(fid,'%s\n%s\n','</frame>'); 60 61 %others 62 fprintf(fid,'%s\n%s\n%s\n','<frame key="4" label="Other">','<section name="stressbalance" />'); 63 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="shelf_dampening" type="', class(obj.shelf_dampening),'" default="', convert2str(obj.shelf_dampening),'">', ' <section name="stressbalance" />',' <help> use dampening for floating ice ? Only for FS model </help>','</parameter>'); 64 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="FSreconditioning" type="', class(obj.FSreconditioning),'" default="', convert2str(obj.FSreconditioning),'">', ' <section name="stressbalance" />',' <help> multiplier for incompressibility equation. Only for FS model </help>','</parameter>'); 65 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="referential" type="', class(obj.referential),'" default="', convert2str(obj.referential),'">', ' <section name="stressbalance" />',' <help> local referential </help>','</parameter>'); 66 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="loadingforce" type="', class(obj.loadingforce),'" default="', convert2str(obj.loadingforce),'">', ' <section name="stressbalance" />',' <help> loading force applied on each point [N/m^3] </help>','</parameter>'); 67 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="requested_outputs" type="', class(obj.requested_outputs),'" default="', convert2str(obj.requested_outputs),'">', ' <section name="stressbalance" />',' <help> additional outputs requested </help>','</parameter>'); 68 69 70 fprintf(fid,'%s\n%s\n','</frame>'); 71 end % }}} 72 72 function obj = stressbalance(varargin) % {{{ 73 73 switch nargin
Note:
See TracChangeset
for help on using the changeset viewer.