Changeset 5156
- Timestamp:
- 08/11/10 14:38:52 (15 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r5125 r5156 174 174 CmMinDmpValueEnum, 175 175 CmNoiseDmpEnum, 176 CollapseEnum,177 176 ConstantEnum, 178 177 ControlTypeEnum, -
issm/trunk/src/c/EnumDefinitions/EnumToString.cpp
r5125 r5156 148 148 case CmMinDmpValueEnum : return "CmMinDmpValue"; 149 149 case CmNoiseDmpEnum : return "CmNoiseDmp"; 150 case CollapseEnum : return "Collapse";151 150 case ConstantEnum : return "Constant"; 152 151 case ControlTypeEnum : return "ControlType"; -
issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp
r5125 r5156 146 146 else if (strcmp(name,"CmMinDmpValue")==0) return CmMinDmpValueEnum; 147 147 else if (strcmp(name,"CmNoiseDmp")==0) return CmNoiseDmpEnum; 148 else if (strcmp(name,"Collapse")==0) return CollapseEnum;149 148 else if (strcmp(name,"Constant")==0) return ConstantEnum; 150 149 else if (strcmp(name,"ControlType")==0) return ControlTypeEnum; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r5152 r5156 675 675 bool onbed; 676 676 bool onwater; 677 bool collapse;678 677 bool onsurface; 678 int approximation; 679 679 680 680 /*recover some inputs: */ 681 681 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 682 682 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 683 inputs->GetParameterValue(&collapse,CollapseEnum);684 683 inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum); 684 inputs->GetParameterValue(&approximation,ApproximationEnum); 685 685 686 686 /*If on water, return 0: */ … … 688 688 689 689 /*Bail out if this element if: 690 * -> No n collapsedand not on the surface691 * -> 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)){ 693 693 return 0; 694 694 } 695 else if ( collapse){695 else if (approximation==MacAyealApproximationEnum){ 696 696 697 697 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 1557 1557 /*inputs: */ 1558 1558 bool onwater; 1559 bool collapse;1560 1559 bool onsurface; 1561 1560 bool onbed; 1561 int approximation; 1562 1562 1563 1563 /*retrieve inputs :*/ 1564 1564 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 1565 inputs->GetParameterValue(&collapse,CollapseEnum);1566 1565 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 1567 1566 inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum); 1567 inputs->GetParameterValue(&approximation,ApproximationEnum); 1568 1568 1569 1569 /*If on water, return 0: */ … … 1571 1571 1572 1572 /*Bail out if this element if: 1573 * -> Non collapsedand not on the surface1574 * -> 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)){ 1576 1576 return 0; 1577 1577 } 1578 else if ( collapse){1578 else if (MacAyealApproximationEnum){ 1579 1579 1580 1580 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 1686 1686 /*inputs: */ 1687 1687 bool onwater; 1688 bool collapse;1689 1688 bool onsurface; 1690 1689 bool onbed; 1690 int approximation; 1691 1691 1692 1692 /*retrieve inputs :*/ 1693 1693 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 1694 inputs->GetParameterValue(&collapse,CollapseEnum);1695 1694 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 1696 1695 inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum); 1696 inputs->GetParameterValue(&approximation,ApproximationEnum); 1697 1697 1698 1698 /*If on water, return 0: */ … … 1700 1700 1701 1701 /*Bail out if this element if: 1702 * -> Non collapsed andnot on the surface1703 * -> 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)){ 1705 1705 return 0; 1706 1706 } 1707 else if ( collapse){1707 else if (approximation==MacAyealApproximationEnum){ 1708 1708 1709 1709 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 1900 1900 } 1901 1901 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 1903 1903 if(iomodel->elements_type){ 1904 1904 if (*(iomodel->elements_type+2*index+0)==MacAyealApproximationEnum){ 1905 this->inputs->AddInput(new BoolInput(CollapseEnum,true));1906 1905 this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum)); 1907 1906 } 1908 1907 else{ 1909 this->inputs->AddInput(new BoolInput(CollapseEnum,false));1910 1908 if (*(iomodel->elements_type+2*index+0)==PattynApproximationEnum){ 1911 1909 this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum)); … … 2125 2123 /*inputs: */ 2126 2124 bool onwater; 2127 bool collapse;2128 2125 bool onbed; 2129 2126 bool shelf; 2127 int approximation; 2130 2128 Input* vx_input=NULL; 2131 2129 Input* vy_input=NULL; … … 2135 2133 /*retrieve inputs :*/ 2136 2134 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 2137 inputs->GetParameterValue(&collapse,CollapseEnum);2138 2135 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 2139 2136 inputs->GetParameterValue(&shelf,ElementOnIceShelfEnum); 2137 inputs->GetParameterValue(&approximation,ApproximationEnum); 2140 2138 2141 2139 /*retrieve some parameters: */ … … 2149 2147 the stiffness matrix. */ 2150 2148 2151 if (( collapse==1) && (onbed==0)){2149 if ((approximation==MacAyealApproximationEnum) && (onbed==0)){ 2152 2150 /*This element should be collapsed, but this element is not on the bedrock, therefore all its 2153 2151 * dofs have already been frozen! Do nothing: */ 2154 2152 return; 2155 2153 } 2156 else if (( collapse==1) && (onbed==1)){2154 else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){ 2157 2155 2158 2156 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 2938 2936 Tria* tria=NULL; 2939 2937 2940 2941 2938 /*inputs: */ 2942 2939 bool onwater; … … 3234 3231 /*inputs: */ 3235 3232 bool onwater; 3236 bool collapse;3237 3233 bool onbed; 3234 int approximation; 3238 3235 Input* surface_input=NULL; 3239 3236 Input* thickness_input=NULL; … … 3241 3238 /*retrieve inputs :*/ 3242 3239 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 3243 inputs->GetParameterValue(&collapse,CollapseEnum);3244 3240 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 3241 inputs->GetParameterValue(&approximation,ApproximationEnum); 3245 3242 3246 3243 /*If on water, skip load: */ 3247 3244 if(onwater)return; 3248 3245 3249 /*Figure out if this pentaelem is collapsed. If so, then bailout, except if it is at the3246 /*Figure out if this pentaelem is Macayeal. If so, then bailout, except if it is at the 3250 3247 bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 3251 3248 the load vector. */ 3252 3249 3253 if (( collapse==1) && (onbed==0)){3250 if ((approximation==MacAyealApproximationEnum) && (onbed==0)){ 3254 3251 /*This element should be collapsed, but this element is not on the bedrock, therefore all its 3255 3252 * dofs have already been frozen! Do nothing: */ 3256 3253 return; 3257 3254 } 3258 else if (( collapse==1) && (onbed==1)){3255 else if ((approximation==MacAyealApproximationEnum) && (onbed==1)){ 3259 3256 3260 3257 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 3325 3322 } //for (ig1=0; ig1<num_area_gauss; ig1++) 3326 3323 3327 } //else if (( collapse==1) && (onbed==1))3324 } //else if ((approximation==MacAyealApproximationEnum) && (onbed==1)) 3328 3325 3329 3326 /*Add pe_g to global vector pg: */ … … 3347 3344 /*inputs: */ 3348 3345 bool onwater; 3349 bool collapse;3350 3346 bool onsurface; 3351 3347 bool onbed; 3348 int approximation; 3352 3349 3353 3350 /*retrieve inputs :*/ 3354 3351 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 3355 inputs->GetParameterValue(&collapse,CollapseEnum);3356 3352 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 3357 3353 inputs->GetParameterValue(&onsurface,ElementOnSurfaceEnum); 3354 inputs->GetParameterValue(&approximation,ApproximationEnum); 3358 3355 3359 3356 /*If on water, skip: */ … … 3361 3358 3362 3359 /*Bail out if this element if: 3363 * -> Non collapsedand not on the surface3364 * -> 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)){ 3366 3363 return; 3367 3364 } 3368 else if ( collapse){3365 else if (approximation==MacAyealApproximationEnum){ 3369 3366 3370 3367 /*This element should be collapsed into a tria element at its base. Create this tria element, … … 4736 4733 /*inputs: */ 4737 4734 bool onwater; 4738 bool collapse;4739 4735 bool onbed; 4736 int approximation; 4740 4737 4741 4738 /*retrieve inputs :*/ 4742 4739 inputs->GetParameterValue(&onwater,ElementOnWaterEnum); 4743 inputs->GetParameterValue(&collapse,CollapseEnum);4744 4740 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 4741 inputs->GetParameterValue(&approximation,ApproximationEnum); 4745 4742 4746 4743 /*If on water, skip: */ 4747 4744 if(onwater)return; 4748 4745 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*/ 4751 4748 if (!onbed) return; 4752 4749 … … 4894 4891 4895 4892 /*Inputs*/ 4896 bool collapsed,onbed; 4893 bool onbed; 4894 int approximation; 4897 4895 4898 4896 /*Recover inputs*/ 4899 inputs->GetParameterValue(&collapsed,CollapseEnum);4900 4897 inputs->GetParameterValue(&onbed,ElementOnBedEnum); 4898 inputs->GetParameterValue(&approximation,ApproximationEnum); 4901 4899 4902 4900 /*MacAyeal, everything is done by the element on bed*/ 4903 if ( collapsed){4901 if (approximation==MacAyealApproximationEnum){ 4904 4902 if (!onbed){ 4905 4903 /*Do nothing. Element on bed will take care of it*/
Note:
See TracChangeset
for help on using the changeset viewer.