Changeset 5156


Ignore:
Timestamp:
08/11/10 14:38:52 (15 years ago)
Author:
seroussi
Message:

remove collapse enum

Location:
issm/trunk/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r5125 r5156  
    174174        CmMinDmpValueEnum,
    175175        CmNoiseDmpEnum,
    176         CollapseEnum,
    177176        ConstantEnum,
    178177        ControlTypeEnum,
  • issm/trunk/src/c/EnumDefinitions/EnumToString.cpp

    r5125 r5156  
    148148                case CmMinDmpValueEnum : return "CmMinDmpValue";
    149149                case CmNoiseDmpEnum : return "CmNoiseDmp";
    150                 case CollapseEnum : return "Collapse";
    151150                case ConstantEnum : return "Constant";
    152151                case ControlTypeEnum : return "ControlType";
  • issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp

    r5125 r5156  
    146146        else if (strcmp(name,"CmMinDmpValue")==0) return CmMinDmpValueEnum;
    147147        else if (strcmp(name,"CmNoiseDmp")==0) return CmNoiseDmpEnum;
    148         else if (strcmp(name,"Collapse")==0) return CollapseEnum;
    149148        else if (strcmp(name,"Constant")==0) return ConstantEnum;
    150149        else if (strcmp(name,"ControlType")==0) return ControlTypeEnum;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r5152 r5156  
    675675        bool onbed;
    676676        bool onwater;
    677         bool collapse;
    678677        bool onsurface;
     678        int  approximation;
    679679
    680680        /*recover some inputs: */
    681681        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
    682682        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    683         inputs->GetParameterValue(&collapse,CollapseEnum);
    684683        inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
     684        inputs->GetParameterValue(&approximation,ApproximationEnum);
    685685
    686686        /*If on water, return 0: */
     
    688688
    689689        /*Bail out if this element if:
    690          * -> Non collapsed and not on the surface
    691          * -> collapsed (2d model) and not on bed) */
    692         if ((!collapse && !onsurface) || (collapse && !onbed)){
     690         * -> Not MacAyeal and not on the surface
     691         * -> MacAyeal (2d model) and not on bed) */
     692        if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
    693693                return 0;
    694694        }
    695         else if (collapse){
     695        else if (approximation==MacAyealApproximationEnum){
    696696
    697697                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    15571557        /*inputs: */
    15581558        bool onwater;
    1559         bool collapse;
    15601559        bool onsurface;
    15611560        bool onbed;
     1561        int  approximation;
    15621562
    15631563        /*retrieve inputs :*/
    15641564        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    1565         inputs->GetParameterValue(&collapse,CollapseEnum);
    15661565        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
    15671566        inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
     1567        inputs->GetParameterValue(&approximation,ApproximationEnum);
    15681568
    15691569        /*If on water, return 0: */
     
    15711571
    15721572        /*Bail out if this element if:
    1573          * -> Non collapsed and not on the surface
    1574          * -> collapsed (2d model) and not on bed) */
    1575         if ((!collapse && !onsurface) || (collapse && !onbed)){
     1573         * -> Non MacAyeal and not on the surface
     1574         * -> MacAyeal (2d model) and not on bed) */
     1575        if ((approximation!=MacAyealApproximationEnum && !onsurface) || (MacAyealApproximationEnum && !onbed)){
    15761576                return 0;
    15771577        }
    1578         else if (collapse){
     1578        else if (MacAyealApproximationEnum){
    15791579
    15801580                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    16861686        /*inputs: */
    16871687        bool onwater;
    1688         bool collapse;
    16891688        bool onsurface;
    16901689        bool onbed;
     1690        int  approximation;
    16911691
    16921692        /*retrieve inputs :*/
    16931693        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    1694         inputs->GetParameterValue(&collapse,CollapseEnum);
    16951694        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
    16961695        inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
     1696        inputs->GetParameterValue(&approximation,ApproximationEnum);
    16971697
    16981698        /*If on water, return 0: */
     
    17001700
    17011701        /*Bail out if this element if:
    1702          * -> Non collapsed and not on the surface
    1703          * -> collapsed (2d model) and not on bed) */
    1704         if ((!collapse && !onsurface) || (collapse && !onbed)){
     1702         * -> Non MacAyeal not on the surface
     1703         * -> MacAyeal (2d model) and not on bed) */
     1704        if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
    17051705                return 0;
    17061706        }
    1707         else if (collapse){
     1707        else if (approximation==MacAyealApproximationEnum){
    17081708
    17091709                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    19001900        }
    19011901
    1902         //elements of type 3 are macayeal type penta. we collapse the formulation on their base.
     1902        //Need to know the type of approximation for this element
    19031903        if(iomodel->elements_type){
    19041904                if (*(iomodel->elements_type+2*index+0)==MacAyealApproximationEnum){
    1905                         this->inputs->AddInput(new BoolInput(CollapseEnum,true));
    19061905                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum));
    19071906                }
    19081907                else{
    1909                         this->inputs->AddInput(new BoolInput(CollapseEnum,false));
    19101908                        if (*(iomodel->elements_type+2*index+0)==PattynApproximationEnum){
    19111909                                this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum));
     
    21252123        /*inputs: */
    21262124        bool onwater;
    2127         bool collapse;
    21282125        bool onbed;
    21292126        bool shelf;
     2127        int  approximation;
    21302128        Input* vx_input=NULL;
    21312129        Input* vy_input=NULL;
     
    21352133        /*retrieve inputs :*/
    21362134        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    2137         inputs->GetParameterValue(&collapse,CollapseEnum);
    21382135        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
    21392136        inputs->GetParameterValue(&shelf,ElementOnIceShelfEnum);
     2137        inputs->GetParameterValue(&approximation,ApproximationEnum);
    21402138
    21412139        /*retrieve some parameters: */
     
    21492147          the stiffness matrix. */
    21502148
    2151         if ((collapse==1) && (onbed==0)){
     2149        if ((approximation==MacAyealApproximationEnum) && (onbed==0)){
    21522150                /*This element should be collapsed, but this element is not on the bedrock, therefore all its
    21532151                 * dofs have already been frozen! Do nothing: */
    21542152                return;
    21552153        }
    2156         else if ((collapse==1) && (onbed==1)){
     2154        else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){
    21572155
    21582156                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    29382936        Tria*  tria=NULL;
    29392937
    2940 
    29412938        /*inputs: */
    29422939        bool onwater;
     
    32343231        /*inputs: */
    32353232        bool onwater;
    3236         bool collapse;
    32373233        bool onbed;
     3234        int  approximation;
    32383235        Input* surface_input=NULL;
    32393236        Input* thickness_input=NULL;
     
    32413238        /*retrieve inputs :*/
    32423239        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    3243         inputs->GetParameterValue(&collapse,CollapseEnum);
    32443240        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
     3241        inputs->GetParameterValue(&approximation,ApproximationEnum);
    32453242
    32463243        /*If on water, skip load: */
    32473244        if(onwater)return;
    32483245
    3249         /*Figure out if this pentaelem is collapsed. If so, then bailout, except if it is at the
     3246        /*Figure out if this pentaelem is Macayeal. If so, then bailout, except if it is at the
    32503247          bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
    32513248          the load vector. */
    32523249
    3253         if ((collapse==1) && (onbed==0)){
     3250        if ((approximation==MacAyealApproximationEnum) && (onbed==0)){
    32543251                /*This element should be collapsed, but this element is not on the bedrock, therefore all its
    32553252                 * dofs have already been frozen! Do nothing: */
    32563253                return;
    32573254        }
    3258         else if ((collapse==1) && (onbed==1)){
     3255        else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){
    32593256
    32603257                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    33253322                } //for (ig1=0; ig1<num_area_gauss; ig1++)
    33263323
    3327         } //else if ((collapse==1) && (onbed==1))
     3324        } //else if ((approximation==MacAyealApproximationEnum) && (onbed==1))
    33283325
    33293326        /*Add pe_g to global vector pg: */
     
    33473344        /*inputs: */
    33483345        bool onwater;
    3349         bool collapse;
    33503346        bool onsurface;
    33513347        bool onbed;
     3348        int  approximation;
    33523349
    33533350        /*retrieve inputs :*/
    33543351        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    3355         inputs->GetParameterValue(&collapse,CollapseEnum);
    33563352        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
    33573353        inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum);
     3354        inputs->GetParameterValue(&approximation,ApproximationEnum);
    33583355
    33593356        /*If on water, skip: */
     
    33613358
    33623359        /*Bail out if this element if:
    3363          * -> Non collapsed and not on the surface
    3364          * -> collapsed (2d model) and not on bed) */
    3365         if ((!collapse && !onsurface) || (collapse && !onbed)){
     3360         * -> Non MacAyeal and not on the surface
     3361         * -> MacAyeal(2d model) and not on bed) */
     3362        if ((approximation!=MacAyealApproximationEnum && !onsurface) || (approximation==MacAyealApproximationEnum && !onbed)){
    33663363                return;
    33673364        }
    3368         else if (collapse){
     3365        else if (approximation==MacAyealApproximationEnum){
    33693366
    33703367                /*This element should be collapsed into a tria element at its base. Create this tria element,
     
    47364733        /*inputs: */
    47374734        bool onwater;
    4738         bool collapse;
    47394735        bool onbed;
     4736        int  approximation;
    47404737
    47414738        /*retrieve inputs :*/
    47424739        inputs->GetParameterValue(&onwater,ElementOnWaterEnum);
    4743         inputs->GetParameterValue(&collapse,CollapseEnum);
    47444740        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
     4741        inputs->GetParameterValue(&approximation,ApproximationEnum);
    47454742
    47464743        /*If on water, skip: */
    47474744        if(onwater)return;
    47484745
    4749         if (collapse){
    4750                 /*Bail out element if collapsed (2d) and not on bed*/
     4746        if (approximation==MacAyealApproximationEnum){
     4747                /*Bail out element if MacAyeal (2d) and not on bed*/
    47514748                if (!onbed) return;
    47524749
     
    48944891
    48954892        /*Inputs*/
    4896         bool    collapsed,onbed;
     4893        bool onbed;
     4894        int  approximation;
    48974895
    48984896        /*Recover inputs*/
    4899         inputs->GetParameterValue(&collapsed,CollapseEnum);
    49004897        inputs->GetParameterValue(&onbed,ElementOnBedEnum);
     4898        inputs->GetParameterValue(&approximation,ApproximationEnum);
    49014899
    49024900        /*MacAyeal, everything is done by the element on bed*/
    4903         if (collapsed){
     4901        if (approximation==MacAyealApproximationEnum){
    49044902                if (!onbed){
    49054903                        /*Do nothing. Element on bed will take care of it*/
Note: See TracChangeset for help on using the changeset viewer.