Ignore:
Timestamp:
03/04/10 09:31:08 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added Misfit 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Penta.cpp

    r3169 r3180  
    42094209}
    42104210/*}}}*/
     4211/*FUNCTION SurfaceArea {{{1*/
     4212#undef __FUNCT__
     4213#define __FUNCT__ "Penta::SurfaceArea"
     4214double 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/*}}}*/
    42114246/*FUNCTION SurfaceNormal {{{1*/
    42124247#undef __FUNCT__
Note: See TracChangeset for help on using the changeset viewer.