Changeset 3180 for issm/trunk/src/c/objects/Penta.cpp
- Timestamp:
- 03/04/10 09:31:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Penta.cpp
r3169 r3180 4209 4209 } 4210 4210 /*}}}*/ 4211 /*FUNCTION SurfaceArea {{{1*/ 4212 #undef __FUNCT__ 4213 #define __FUNCT__ "Penta::SurfaceArea" 4214 double Penta::SurfaceArea(void* inputs,int analysis_type,int sub_analysis_type){ 4215 4216 double S; 4217 Tria* tria=NULL; 4218 4219 /*If on water, return 0: */ 4220 if(onwater)return 0; 4221 4222 /*Bail out if this element if: 4223 * -> Non collapsed and not on the surface 4224 * -> collapsed (2d model) and not on bed) */ 4225 if ((!collapse && !onsurface) || (collapse && !onbed)){ 4226 return 0; 4227 } 4228 else if (collapse){ 4229 4230 /*This element should be collapsed into a tria element at its base. Create this tria element, 4231 * and compute SurfaceArea*/ 4232 tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria (lower face). 4233 S=tria->SurfaceArea(inputs,analysis_type,sub_analysis_type); 4234 delete tria; 4235 return S; 4236 } 4237 else{ 4238 4239 tria=(Tria*)SpawnTria(3,4,5); //grids 3, 4 and 5 make the new tria (upper face). 4240 S=tria->SurfaceArea(inputs,analysis_type,sub_analysis_type); 4241 delete tria; 4242 return S; 4243 } 4244 } 4245 /*}}}*/ 4211 4246 /*FUNCTION SurfaceNormal {{{1*/ 4212 4247 #undef __FUNCT__
Note:
See TracChangeset
for help on using the changeset viewer.