Changeset 18309 for issm/trunk-jpl/src/m/classes/flowequation.py
- Timestamp:
- 07/31/14 10:32:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/flowequation.py
r18227 r18309 73 73 def checkconsistency(self,md,solution,analyses): # {{{ 74 74 75 if StressbalanceAnalysisEnum() in analyses: 76 md = checkfield(md,'fieldname','flowequation.isSIA','numel',[1],'values',[0,1]) 77 md = checkfield(md,'fieldname','flowequation.isSSA','numel',[1],'values',[0,1]) 78 md = checkfield(md,'fieldname','flowequation.isL1L2','numel',[1],'values',[0,1]) 79 md = checkfield(md,'fieldname','flowequation.isHO','numel',[1],'values',[0,1]) 80 md = checkfield(md,'fieldname','flowequation.isFS','numel',[1],'values',[0,1]) 81 md = checkfield(md,'fieldname','flowequation.fe_SSA','values',['P1','P1bubble','P1bubblecondensed','P2','P2bubble']) 82 md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',['P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P2bubble','P1xP3','P2xP4']) 83 md = checkfield(md,'fieldname','flowequation.fe_FS' ,'values',['P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood','XTaylorHood','OneLayerP4z','CrouzeixRaviart']) 84 md = checkfield(md,'fieldname','flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1]) 85 md = checkfield(md,'fieldname','flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1]) 86 md = checkfield(md,'fieldname','flowequation.borderFS','size',[md.mesh.numberofvertices],'values',[0,1]) 87 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_r','numel',[1],'>',0.) 88 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rhop','numel',[1],'>',0.) 89 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rlambda','numel',[1],'>',0.) 90 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rholambda','numel',[1],'>',0.) 91 md = checkfield(md,'fieldname','flowequation.XTH_theta','numel',[1],'>=',0.,'<',.5) 92 if m.strcmp(md.mesh.domaintype(),'2Dhorizontal'): 93 md = checkfield(md,'fieldname','flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',[1,2]) 94 md = checkfield(md,'fieldname','flowequation.element_equation','size',[md.mesh.numberofelements],'values',[1,2]) 95 elif m.strcmp(md.mesh.domaintype(),'3D'): 96 md = checkfield(md,'fieldname','flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',numpy.arange(0,8+1)) 97 md = checkfield(md,'fieldname','flowequation.element_equation','size',[md.mesh.numberofelements],'values',numpy.arange(0,8+1)) 98 else: 99 raise RuntimeError('mesh type not supported yet') 100 if not (self.isSIA or self.isSSA or self.isL1L2 or self.isHO or self.isFS): 101 md.checkmessage("no element types set for this model") 75 #Early return 76 if (StressbalanceAnalysisEnum() not in analyses and StressbalanceSIAAnalysisEnum() not in analyses) or (solution==TransientSolutionEnum() and not md.transient.isstressbalance): 77 return md 78 79 md = checkfield(md,'fieldname','flowequation.isSIA','numel',[1],'values',[0,1]) 80 md = checkfield(md,'fieldname','flowequation.isSSA','numel',[1],'values',[0,1]) 81 md = checkfield(md,'fieldname','flowequation.isL1L2','numel',[1],'values',[0,1]) 82 md = checkfield(md,'fieldname','flowequation.isHO','numel',[1],'values',[0,1]) 83 md = checkfield(md,'fieldname','flowequation.isFS','numel',[1],'values',[0,1]) 84 md = checkfield(md,'fieldname','flowequation.fe_SSA','values',['P1','P1bubble','P1bubblecondensed','P2','P2bubble']) 85 md = checkfield(md,'fieldname','flowequation.fe_HO' ,'values',['P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2','P2bubble','P1xP3','P2xP4']) 86 md = checkfield(md,'fieldname','flowequation.fe_FS' ,'values',['P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood','XTaylorHood','OneLayerP4z','CrouzeixRaviart']) 87 md = checkfield(md,'fieldname','flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1]) 88 md = checkfield(md,'fieldname','flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1]) 89 md = checkfield(md,'fieldname','flowequation.borderFS','size',[md.mesh.numberofvertices],'values',[0,1]) 90 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_r','numel',[1],'>',0.) 91 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rhop','numel',[1],'>',0.) 92 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rlambda','numel',[1],'>',0.) 93 md = checkfield(md,'fieldname','flowequation.augmented_lagrangian_rholambda','numel',[1],'>',0.) 94 md = checkfield(md,'fieldname','flowequation.XTH_theta','numel',[1],'>=',0.,'<',.5) 95 if m.strcmp(md.mesh.domaintype(),'2Dhorizontal'): 96 md = checkfield(md,'fieldname','flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',[1,2]) 97 md = checkfield(md,'fieldname','flowequation.element_equation','size',[md.mesh.numberofelements],'values',[1,2]) 98 elif m.strcmp(md.mesh.domaintype(),'3D'): 99 md = checkfield(md,'fieldname','flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',numpy.arange(0,8+1)) 100 md = checkfield(md,'fieldname','flowequation.element_equation','size',[md.mesh.numberofelements],'values',numpy.arange(0,8+1)) 101 else: 102 raise RuntimeError('mesh type not supported yet') 103 if not (self.isSIA or self.isSSA or self.isL1L2 or self.isHO or self.isFS): 104 md.checkmessage("no element types set for this model") 102 105 103 106 if StressbalanceSIAAnalysisEnum() in analyses:
Note:
See TracChangeset
for help on using the changeset viewer.