[16134] | 1 | Index: ../trunk-jpl/src/m/classes/flowequation.py
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/classes/flowequation.py (revision 15923)
|
---|
| 4 | +++ ../trunk-jpl/src/m/classes/flowequation.py (revision 15924)
|
---|
| 5 | @@ -20,9 +20,9 @@
|
---|
| 6 | self.isL1L2 = 0
|
---|
| 7 | self.isHO = 0
|
---|
| 8 | self.isFS = 0
|
---|
| 9 | - self.fe_SSA = 0
|
---|
| 10 | - self.fe_HO = 0
|
---|
| 11 | - self.fe_FS = 0
|
---|
| 12 | + self.fe_SSA = ''
|
---|
| 13 | + self.fe_HO = ''
|
---|
| 14 | + self.fe_FS = ''
|
---|
| 15 | self.vertex_equation = float('NaN')
|
---|
| 16 | self.element_equation = float('NaN')
|
---|
| 17 | self.borderSSA = float('NaN')
|
---|
| 18 | @@ -41,9 +41,9 @@
|
---|
| 19 | string="%s\n%s"%(string,fielddisplay(self,'isL1L2',"are L1L2 equations used ?"))
|
---|
| 20 | string="%s\n%s"%(string,fielddisplay(self,'isHO',"is the Higher-Order (HO) approximation used ?"))
|
---|
| 21 | string="%s\n%s"%(string,fielddisplay(self,'isFS',"are the Full-FS (FS) equations used ?"))
|
---|
| 22 | - string="%s\n%s"%(string,fielddisplay(self,'fe_SSA',"Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic)"))
|
---|
| 23 | - string="%s\n%s"%(string,fielddisplay(self,'fe_HO' ,"Finite Element for HO 0: P1xP1, 1: P1xP2, 2: P2xP1, 3: P2xP2"))
|
---|
| 24 | - string="%s\n%s"%(string,fielddisplay(self,'fe_FS' ,"Finite Element for FS 0: P1P1 (debugging), 1: P1P1GSL (under dev), 2: MINI condensed, 3: MINI, 4: P2P1 (Taylor-Hood)"))
|
---|
| 25 | + string="%s\n%s"%(string,fielddisplay(self,'fe_SSA',"Finite Element for SSA: 'P1', 'P1bubble' 'P1bubblecondensed' 'P2'"))
|
---|
| 26 | + string="%s\n%s"%(string,fielddisplay(self,'fe_HO' ,"Finite Element for HO: 'P1' 'P1bubble' 'P1bubblecondensed' 'P1xP2' 'P2xP1' 'P2'"))
|
---|
| 27 | + string="%s\n%s"%(string,fielddisplay(self,'fe_FS' ,"Finite Element for FS: 'P1P1' (debugging only) 'P1P1GLS' 'MINIcondensed' 'MINI' 'TaylorHood'"))
|
---|
| 28 | string="%s\n%s"%(string,fielddisplay(self,'vertex_equation',"flow equation for each vertex"))
|
---|
| 29 | string="%s\n%s"%(string,fielddisplay(self,'element_equation',"flow equation for each element"))
|
---|
| 30 | string="%s\n%s"%(string,fielddisplay(self,'borderSSA',"vertices on SSA's border (for tiling)"))
|
---|
| 31 | @@ -53,9 +53,15 @@
|
---|
| 32 | #}}}
|
---|
| 33 | def setdefaultparameters(self): # {{{
|
---|
| 34 |
|
---|
| 35 | - #MINI element for FS by default
|
---|
| 36 | - self.fe_FS=2
|
---|
| 37 | + #P1 for SSA
|
---|
| 38 | + self.fe_SSA= 'P1';
|
---|
| 39 |
|
---|
| 40 | + #P1 for HO
|
---|
| 41 | + self.fe_HO= 'P1';
|
---|
| 42 | +
|
---|
| 43 | + #MINI condensed element for FS by default
|
---|
| 44 | + self.fe_FS = 'MINIcondensed';
|
---|
| 45 | +
|
---|
| 46 | return self
|
---|
| 47 | #}}}
|
---|
| 48 | def checkconsistency(self,md,solution,analyses): # {{{
|
---|
| 49 | @@ -66,9 +72,9 @@
|
---|
| 50 | md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0,1])
|
---|
| 51 | md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0,1])
|
---|
| 52 | md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0,1])
|
---|
| 53 | - md = checkfield(md,'flowequation.fe_SSA','numel',[1],'values',[0,1])
|
---|
| 54 | - md = checkfield(md,'flowequation.fe_HO','numel',[1],'values',numpy.arange(0,3+1))
|
---|
| 55 | - md = checkfield(md,'flowequation.fe_FS','numel',[1],'values',numpy.arange(0,4+1))
|
---|
| 56 | + md = checkfield(md,'flowequation.fe_SSA','values',['P1','P1bubble','P1bubblecondensed','P2'])
|
---|
| 57 | + md = checkfield(md,'flowequation.fe_HO' ,'values',['P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2'])
|
---|
| 58 | + md = checkfield(md,'flowequation.fe_FS' ,'values',['P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood'])
|
---|
| 59 | md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices],'values',[0,1])
|
---|
| 60 | md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices],'values',[0,1])
|
---|
| 61 | md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices],'values',[0,1])
|
---|
| 62 | @@ -94,9 +100,9 @@
|
---|
| 63 | WriteData(fid,'object',self,'fieldname','isL1L2','format','Boolean')
|
---|
| 64 | WriteData(fid,'object',self,'fieldname','isHO','format','Boolean')
|
---|
| 65 | WriteData(fid,'object',self,'fieldname','isFS','format','Boolean')
|
---|
| 66 | - WriteData(fid,'object',self,'fieldname','fe_SSA','format','Integer')
|
---|
| 67 | - WriteData(fid,'object',self,'fieldname','fe_HO','format','Integer')
|
---|
| 68 | - WriteData(fid,'object',self,'fieldname','fe_FS','format','Integer')
|
---|
| 69 | + WriteData(fid,'enum',FlowequationFeSSAEnum(),'data',StringToEnum(self.fe_SSA)[0],'format','Integer')
|
---|
| 70 | + WriteData(fid,'enum',FlowequationFeHOEnum() ,'data',StringToEnum(self.fe_HO)[0] ,'format','Integer')
|
---|
| 71 | + WriteData(fid,'enum',FlowequationFeFSEnum() ,'data',StringToEnum(self.fe_FS)[0] ,'format','Integer')
|
---|
| 72 | WriteData(fid,'object',self,'fieldname','borderSSA','format','DoubleMat','mattype',1)
|
---|
| 73 | WriteData(fid,'object',self,'fieldname','borderHO','format','DoubleMat','mattype',1)
|
---|
| 74 | WriteData(fid,'object',self,'fieldname','borderFS','format','DoubleMat','mattype',1)
|
---|
| 75 | Index: ../trunk-jpl/src/m/classes/flowequation.m
|
---|
| 76 | ===================================================================
|
---|
| 77 | --- ../trunk-jpl/src/m/classes/flowequation.m (revision 15923)
|
---|
| 78 | +++ ../trunk-jpl/src/m/classes/flowequation.m (revision 15924)
|
---|
| 79 | @@ -10,9 +10,9 @@
|
---|
| 80 | isL1L2 = 0;
|
---|
| 81 | isHO = 0;
|
---|
| 82 | isFS = 0;
|
---|
| 83 | - fe_SSA = 0;
|
---|
| 84 | - fe_HO = 0;
|
---|
| 85 | - fe_FS = 0;
|
---|
| 86 | + fe_SSA = '';
|
---|
| 87 | + fe_HO = '';
|
---|
| 88 | + fe_FS = '';
|
---|
| 89 | vertex_equation = NaN;
|
---|
| 90 | element_equation = NaN;
|
---|
| 91 | borderSSA = NaN;
|
---|
| 92 | @@ -44,15 +44,13 @@
|
---|
| 93 | obj = structtoobj(flowequation(),objstruct);
|
---|
| 94 |
|
---|
| 95 | %2013 July 23rd
|
---|
| 96 | - if isfield(objstruct,'isSIA'), obj.isSIA = objstruct.isSIA; end;
|
---|
| 97 | - if isfield(objstruct,'isSSA'), obj.isSSA = objstruct.isSSA; end;
|
---|
| 98 | - if isfield(objstruct,'isL1L2'), obj.isL1L2 = objstruct.isL1L2; end;
|
---|
| 99 | - if isfield(objstruct,'isHO'), obj.isHO = objstruct.isHO; end;
|
---|
| 100 | - if isfield(objstruct,'isFS'), obj.isFS = objstruct.isFS; end;
|
---|
| 101 | - if isfield(objstruct,'fe_FS'), obj.fe_FS = objstruct.fe_FS; end;
|
---|
| 102 | - if isfield(objstruct,'borderSSA'), obj.borderSSA = objstruct.borderSSA;end;
|
---|
| 103 | - if isfield(objstruct,'borderHO'), obj.borderHO = objstruct.borderHO; end;
|
---|
| 104 | - if isfield(objstruct,'borderFS'), obj.borderFS = objstruct.borderFS; end;
|
---|
| 105 | + if isfield(objstruct,'ishutter'), obj.isSIA = objstruct.ishutter; end;
|
---|
| 106 | + if isfield(objstruct,'ismacayeal'), obj.isSSA = objstruct.ismacayeal; end;
|
---|
| 107 | + if isfield(objstruct,'ispattyn'), obj.isHO = objstruct.ispattyn; end;
|
---|
| 108 | + if isfield(objstruct,'isstokes'), obj.isFS = objstruct.isstokes; end;
|
---|
| 109 | + if isfield(objstruct,'bordermacayeal'),obj.borderSSA = objstruct.bordermacayeal; end;
|
---|
| 110 | + if isfield(objstruct,'borderpattyn'), obj.borderHO = objstruct.borderpattyn; end;
|
---|
| 111 | + if isfield(objstruct,'borderstokes'), obj.borderFS = objstruct.borderstokes; end;
|
---|
| 112 | end
|
---|
| 113 |
|
---|
| 114 | end% }}}
|
---|
| 115 | @@ -68,8 +66,14 @@
|
---|
| 116 | end % }}}
|
---|
| 117 | function obj = setdefaultparameters(obj) % {{{
|
---|
| 118 |
|
---|
| 119 | + %P1 for SSA
|
---|
| 120 | + obj.fe_SSA= 'P1';
|
---|
| 121 | +
|
---|
| 122 | + %P1 for HO
|
---|
| 123 | + obj.fe_HO= 'P1';
|
---|
| 124 | +
|
---|
| 125 | %MINI condensed element for FS by default
|
---|
| 126 | - obj.fe_FS = 2;
|
---|
| 127 | + obj.fe_FS = 'MINIcondensed';
|
---|
| 128 | end % }}}
|
---|
| 129 | function md = checkconsistency(obj,md,solution,analyses) % {{{
|
---|
| 130 |
|
---|
| 131 | @@ -80,9 +84,9 @@
|
---|
| 132 | md = checkfield(md,'flowequation.isL1L2','numel',[1],'values',[0 1]);
|
---|
| 133 | md = checkfield(md,'flowequation.isHO','numel',[1],'values',[0 1]);
|
---|
| 134 | md = checkfield(md,'flowequation.isFS','numel',[1],'values',[0 1]);
|
---|
| 135 | - md = checkfield(md,'flowequation.fe_SSA','numel',[1],'values',[0:3]);
|
---|
| 136 | - md = checkfield(md,'flowequation.fe_HO','numel',[1],'values',[0:5]);
|
---|
| 137 | - md = checkfield(md,'flowequation.fe_FS','numel',[1],'values',[0:4]);
|
---|
| 138 | + md = checkfield(md,'flowequation.fe_SSA','values',{'P1','P1bubble','P1bubblecondensed','P2'});
|
---|
| 139 | + md = checkfield(md,'flowequation.fe_HO' ,'values',{'P1','P1bubble','P1bubblecondensed','P1xP2','P2xP1','P2'});
|
---|
| 140 | + md = checkfield(md,'flowequation.fe_FS' ,'values',{'P1P1','P1P1GLS','MINIcondensed','MINI','TaylorHood'});
|
---|
| 141 | md = checkfield(md,'flowequation.borderSSA','size',[md.mesh.numberofvertices 1],'values',[0 1]);
|
---|
| 142 | md = checkfield(md,'flowequation.borderHO','size',[md.mesh.numberofvertices 1],'values',[0 1]);
|
---|
| 143 | md = checkfield(md,'flowequation.borderFS','size',[md.mesh.numberofvertices 1],'values',[0 1]);
|
---|
| 144 | @@ -114,9 +118,9 @@
|
---|
| 145 | fielddisplay(obj,'isL1L2','is the L1L2 approximation used ?');
|
---|
| 146 | fielddisplay(obj,'isHO','is the Higher-Order (HO) approximation used ?');
|
---|
| 147 | fielddisplay(obj,'isFS','are the Full-FS (FS) equations used ?');
|
---|
| 148 | - fielddisplay(obj,'fe_SSA','Finite Element for SSA 0: Lagrange P1 (linear), 1: Lagrange P2 (quadratic), 2: P1+ condensed, 3: P1+');
|
---|
| 149 | - fielddisplay(obj,'fe_HO', 'Finite Element for HO 0: P1xP1, 1: P1xP2, 2: P2xP1, 3: P2xP2, 4: P1+ condensed, 5: P1+');
|
---|
| 150 | - fielddisplay(obj,'fe_FS', 'Finite Element for FS 0: P1P1 (debugging), 1: P1P1GSL (under dev), 2: MINI condensed, 3: MINI, 4: P2P1 (Taylor-Hood)');
|
---|
| 151 | + fielddisplay(obj,'fe_SSA','Finite Element for SSA ''P1'', ''P1bubble'' ''P1bubblecondensed'' ''P2''');
|
---|
| 152 | + fielddisplay(obj,'fe_HO', 'Finite Element for HO ''P1'' ''P1bubble'' ''P1bubblecondensed'' ''P1xP2'' ''P2xP1'' ''P2''');
|
---|
| 153 | + fielddisplay(obj,'fe_FS', 'Finite Element for FS ''P1P1'' (debugging only) ''P1P1GLS'' ''MINIcondensed'' ''MINI'' ''TaylorHood''');
|
---|
| 154 | fielddisplay(obj,'vertex_equation','flow equation for each vertex');
|
---|
| 155 | fielddisplay(obj,'element_equation','flow equation for each element');
|
---|
| 156 | fielddisplay(obj,'borderSSA','vertices on SSA''s border (for tiling)');
|
---|
| 157 | @@ -130,9 +134,9 @@
|
---|
| 158 | WriteData(fid,'object',obj,'fieldname','isL1L2','format','Boolean');
|
---|
| 159 | WriteData(fid,'object',obj,'fieldname','isHO','format','Boolean');
|
---|
| 160 | WriteData(fid,'object',obj,'fieldname','isFS','format','Boolean');
|
---|
| 161 | - WriteData(fid,'object',obj,'fieldname','fe_SSA','format','Integer');
|
---|
| 162 | - WriteData(fid,'object',obj,'fieldname','fe_HO','format','Integer');
|
---|
| 163 | - WriteData(fid,'object',obj,'fieldname','fe_FS','format','Integer');
|
---|
| 164 | + WriteData(fid,'enum',FlowequationFeSSAEnum(),'data',StringToEnum(obj.fe_SSA),'format','Integer');
|
---|
| 165 | + WriteData(fid,'enum',FlowequationFeHOEnum() ,'data',StringToEnum(obj.fe_HO) ,'format','Integer');
|
---|
| 166 | + WriteData(fid,'enum',FlowequationFeFSEnum() ,'data',StringToEnum(obj.fe_FS) ,'format','Integer');
|
---|
| 167 | WriteData(fid,'object',obj,'fieldname','borderSSA','format','DoubleMat','mattype',1);
|
---|
| 168 | WriteData(fid,'object',obj,'fieldname','borderHO','format','DoubleMat','mattype',1);
|
---|
| 169 | WriteData(fid,'object',obj,'fieldname','borderFS','format','DoubleMat','mattype',1);
|
---|