Changeset 4891
- Timestamp:
- 07/29/10 16:27:19 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/ismodelselfconsistent.m
r4870 r4891 54 54 %}}} 55 55 %ELEMENTSTYPE{{{1 56 if size(md.elements_type,1)~=md.numberofelements | size(md.elements_type,2)~=2, 57 error(['model not consistent: types of elements have not been set properly, run setelementstype first']) 58 end 59 if any(ones(md.numberofelements,1)-((md.elements_type(:,1)==HutterFormulationEnum) + (md.elements_type(:,1)==MacAyealFormulationEnum) + (md.elements_type(:,1)==PattynFormulationEnum))) 60 error(['model not consistent: types of elements have not been set properly, run setelementstype first']) 61 end 62 if any(ones(md.numberofelements,1)-((md.elements_type(:,2)==StokesFormulationEnum) + (md.elements_type(:,2)==NoneFormulationEnum))) 63 error(['model not consistent: types of elements have not been set properly, run setelementstype first']) 64 end 56 %Check the size of elements_type 57 fields={'elements_type'}; 58 checksize(md,fields,[md.numberofelements 2]); 59 %Check the values of elements_type(1) 60 checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum() PattynFormulationEnum()]); 61 %Check the values of elements_type(2) 62 checkvalues(md,{'elements_type(:,2)'},[StokesFormulationEnum() NoneFormulationEnum()]); 65 63 if (md.dim==2), 66 if (ismember(PattynFormulationEnum,md.elements_type(:,1)) | ismember(StokesFormulationEnum,md.elements_type(:,2))), 67 error(['model not consistent: for a 2d model, only MacAyeal''s and Hutter''s elements are allowed']); 68 end 64 checkvalues(md,{'elements_type(:,1)'},[MacAyealFormulationEnum() HutterFormulationEnum()]); 69 65 end 70 66 if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0), 71 67 error(['model not consistent: no elements type set for this model. at least one of ismacayealpattyn, ishutter and isstokes need to be =1']); 72 end73 if (md.analysis_type==DiagnosticSolutionEnum & any(ismember(MacAyealFormulationEnum,md.elements_type(:,1)) & ismember(PattynFormulationEnum,md.elements_type(:,1))))74 error(['model not consistent: coupling MacAyeal/Pattyn not implemented yet']);75 end76 if (md.isstokes & md.analysis_type==Transient3DSolutionEnum());77 error(['model not consistent: Stokes transient not implemented yet']);78 68 end 79 69 %}}} -
issm/trunk/src/m/classes/public/setelementstype.m
r3994 r4891 107 107 if ~isnan(bordergrids2d), 108 108 penalties=[]; 109 for i=1:numlayers ,110 penalties=[penalties [bordergrids2d+md.numberofgrids2d*(i-1)]];109 for i=1:numlayers-1, 110 penalties=[penalties; [bordergrids2d bordergrids2d+md.numberofgrids2d*(i)]]; 111 111 end 112 112 md.penalties=penalties;
Note:
See TracChangeset
for help on using the changeset viewer.