[22755] | 1 | Index: ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 22199)
|
---|
| 4 | +++ ../trunk-jpl/src/c/shared/Enum/EnumDefinitions.h (revision 22200)
|
---|
| 5 | @@ -377,6 +377,7 @@
|
---|
| 6 | TransientIsslrEnum,
|
---|
| 7 | TransientNumRequestedOutputsEnum,
|
---|
| 8 | TransientRequestedOutputsEnum,
|
---|
| 9 | + BalancethicknessSpcthicknessEnum,
|
---|
| 10 | BalancethicknessApparentMassbalanceEnum,
|
---|
| 11 | BalancethicknessDiffusionCoefficientEnum,
|
---|
| 12 | BalancethicknessOmegaEnum,
|
---|
| 13 | Index: ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
|
---|
| 14 | ===================================================================
|
---|
| 15 | --- ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp (revision 22199)
|
---|
| 16 | +++ ../trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp (revision 22200)
|
---|
| 17 | @@ -383,6 +383,7 @@
|
---|
| 18 | case TransientIsslrEnum : return "TransientIsslr";
|
---|
| 19 | case TransientNumRequestedOutputsEnum : return "TransientNumRequestedOutputs";
|
---|
| 20 | case TransientRequestedOutputsEnum : return "TransientRequestedOutputs";
|
---|
| 21 | + case BalancethicknessSpcthicknessEnum : return "BalancethicknessSpcthickness";
|
---|
| 22 | case BalancethicknessApparentMassbalanceEnum : return "BalancethicknessApparentMassbalance";
|
---|
| 23 | case BalancethicknessDiffusionCoefficientEnum : return "BalancethicknessDiffusionCoefficient";
|
---|
| 24 | case BalancethicknessOmegaEnum : return "BalancethicknessOmega";
|
---|
| 25 | Index: ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
|
---|
| 26 | ===================================================================
|
---|
| 27 | --- ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp (revision 22199)
|
---|
| 28 | +++ ../trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp (revision 22200)
|
---|
| 29 | @@ -392,6 +392,7 @@
|
---|
| 30 | else if (strcmp(name,"TransientIsslr")==0) return TransientIsslrEnum;
|
---|
| 31 | else if (strcmp(name,"TransientNumRequestedOutputs")==0) return TransientNumRequestedOutputsEnum;
|
---|
| 32 | else if (strcmp(name,"TransientRequestedOutputs")==0) return TransientRequestedOutputsEnum;
|
---|
| 33 | + else if (strcmp(name,"BalancethicknessSpcthickness")==0) return BalancethicknessSpcthicknessEnum;
|
---|
| 34 | else if (strcmp(name,"BalancethicknessApparentMassbalance")==0) return BalancethicknessApparentMassbalanceEnum;
|
---|
| 35 | else if (strcmp(name,"BalancethicknessDiffusionCoefficient")==0) return BalancethicknessDiffusionCoefficientEnum;
|
---|
| 36 | else if (strcmp(name,"BalancethicknessOmega")==0) return BalancethicknessOmegaEnum;
|
---|
| 37 | @@ -504,11 +505,11 @@
|
---|
| 38 | else if (strcmp(name,"SmbEla")==0) return SmbElaEnum;
|
---|
| 39 | else if (strcmp(name,"SmbBMax")==0) return SmbBMaxEnum;
|
---|
| 40 | else if (strcmp(name,"SmbBMin")==0) return SmbBMinEnum;
|
---|
| 41 | - else if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
|
---|
| 42 | else stage=5;
|
---|
| 43 | }
|
---|
| 44 | if(stage==5){
|
---|
| 45 | - if (strcmp(name,"Adjointx")==0) return AdjointxEnum;
|
---|
| 46 | + if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
|
---|
| 47 | + else if (strcmp(name,"Adjointx")==0) return AdjointxEnum;
|
---|
| 48 | else if (strcmp(name,"Adjointy")==0) return AdjointyEnum;
|
---|
| 49 | else if (strcmp(name,"Adjointz")==0) return AdjointzEnum;
|
---|
| 50 | else if (strcmp(name,"BalancethicknessMisfit")==0) return BalancethicknessMisfitEnum;
|
---|
| 51 | @@ -627,11 +628,11 @@
|
---|
| 52 | else if (strcmp(name,"Outputdefinition8")==0) return Outputdefinition8Enum;
|
---|
| 53 | else if (strcmp(name,"Outputdefinition9")==0) return Outputdefinition9Enum;
|
---|
| 54 | else if (strcmp(name,"Outputdefinition10")==0) return Outputdefinition10Enum;
|
---|
| 55 | - else if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum;
|
---|
| 56 | else stage=6;
|
---|
| 57 | }
|
---|
| 58 | if(stage==6){
|
---|
| 59 | - if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
|
---|
| 60 | + if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum;
|
---|
| 61 | + else if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
|
---|
| 62 | else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum;
|
---|
| 63 | else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum;
|
---|
| 64 | else if (strcmp(name,"Outputdefinition15")==0) return Outputdefinition15Enum;
|
---|
| 65 | @@ -750,11 +751,11 @@
|
---|
| 66 | else if (strcmp(name,"Gradient2")==0) return Gradient2Enum;
|
---|
| 67 | else if (strcmp(name,"Gradient3")==0) return Gradient3Enum;
|
---|
| 68 | else if (strcmp(name,"Gradient")==0) return GradientEnum;
|
---|
| 69 | - else if (strcmp(name,"GroundinglineMigration")==0) return GroundinglineMigrationEnum;
|
---|
| 70 | else stage=7;
|
---|
| 71 | }
|
---|
| 72 | if(stage==7){
|
---|
| 73 | - if (strcmp(name,"Gset")==0) return GsetEnum;
|
---|
| 74 | + if (strcmp(name,"GroundinglineMigration")==0) return GroundinglineMigrationEnum;
|
---|
| 75 | + else if (strcmp(name,"Gset")==0) return GsetEnum;
|
---|
| 76 | else if (strcmp(name,"Index")==0) return IndexEnum;
|
---|
| 77 | else if (strcmp(name,"Indexed")==0) return IndexedEnum;
|
---|
| 78 | else if (strcmp(name,"Intersect")==0) return IntersectEnum;
|
---|
| 79 | @@ -873,11 +874,11 @@
|
---|
| 80 | else if (strcmp(name,"AmrGroundingLineResolution")==0) return AmrGroundingLineResolutionEnum;
|
---|
| 81 | else if (strcmp(name,"AmrGroundingLineDistance")==0) return AmrGroundingLineDistanceEnum;
|
---|
| 82 | else if (strcmp(name,"AmrIceFrontResolution")==0) return AmrIceFrontResolutionEnum;
|
---|
| 83 | - else if (strcmp(name,"AmrIceFrontDistance")==0) return AmrIceFrontDistanceEnum;
|
---|
| 84 | else stage=8;
|
---|
| 85 | }
|
---|
| 86 | if(stage==8){
|
---|
| 87 | - if (strcmp(name,"AmrThicknessErrorResolution")==0) return AmrThicknessErrorResolutionEnum;
|
---|
| 88 | + if (strcmp(name,"AmrIceFrontDistance")==0) return AmrIceFrontDistanceEnum;
|
---|
| 89 | + else if (strcmp(name,"AmrThicknessErrorResolution")==0) return AmrThicknessErrorResolutionEnum;
|
---|
| 90 | else if (strcmp(name,"AmrThicknessErrorThreshold")==0) return AmrThicknessErrorThresholdEnum;
|
---|
| 91 | else if (strcmp(name,"AmrDeviatoricErrorResolution")==0) return AmrDeviatoricErrorResolutionEnum;
|
---|
| 92 | else if (strcmp(name,"AmrDeviatoricErrorThreshold")==0) return AmrDeviatoricErrorThresholdEnum;
|
---|
| 93 | @@ -996,11 +997,11 @@
|
---|
| 94 | else if (strcmp(name,"UzawaPressureAnalysis")==0) return UzawaPressureAnalysisEnum;
|
---|
| 95 | else if (strcmp(name,"GiaSolution")==0) return GiaSolutionEnum;
|
---|
| 96 | else if (strcmp(name,"GiaIvinsAnalysis")==0) return GiaIvinsAnalysisEnum;
|
---|
| 97 | - else if (strcmp(name,"EsaSolution")==0) return EsaSolutionEnum;
|
---|
| 98 | else stage=9;
|
---|
| 99 | }
|
---|
| 100 | if(stage==9){
|
---|
| 101 | - if (strcmp(name,"EsaAnalysis")==0) return EsaAnalysisEnum;
|
---|
| 102 | + if (strcmp(name,"EsaSolution")==0) return EsaSolutionEnum;
|
---|
| 103 | + else if (strcmp(name,"EsaAnalysis")==0) return EsaAnalysisEnum;
|
---|
| 104 | else if (strcmp(name,"LoveSolution")==0) return LoveSolutionEnum;
|
---|
| 105 | else if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum;
|
---|
| 106 | else if (strcmp(name,"LevelsetAnalysis")==0) return LevelsetAnalysisEnum;
|
---|
| 107 | Index: ../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp
|
---|
| 108 | ===================================================================
|
---|
| 109 | --- ../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp (revision 22199)
|
---|
| 110 | +++ ../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp (revision 22200)
|
---|
| 111 | @@ -17,19 +17,21 @@
|
---|
| 112 |
|
---|
| 113 | void InputUpdateFromVectorDakotax(FemModel* femmodel,IssmDouble* vector, int name, int type){
|
---|
| 114 |
|
---|
| 115 | - int i;
|
---|
| 116 | -
|
---|
| 117 | /*Update elements, nodes, loads and materials from inputs: */
|
---|
| 118 | - for(i=0;i<femmodel->elements->Size();i++){
|
---|
| 119 | + for(int i=0;i<femmodel->elements->Size();i++){
|
---|
| 120 | Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
|
---|
| 121 | element->InputUpdateFromVectorDakota(vector,name,type);
|
---|
| 122 | }
|
---|
| 123 | - for(i=0;i<femmodel->loads->Size();i++){
|
---|
| 124 | + for(int i=0;i<femmodel->loads->Size();i++){
|
---|
| 125 | Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
|
---|
| 126 | load->InputUpdateFromVectorDakota(vector,name,type);
|
---|
| 127 | }
|
---|
| 128 | - for(i=0;i<femmodel->materials->Size();i++){
|
---|
| 129 | + for(int i=0;i<femmodel->materials->Size();i++){
|
---|
| 130 | Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
|
---|
| 131 | material->InputUpdateFromVectorDakota(vector,name,type);
|
---|
| 132 | }
|
---|
| 133 | + for(int i=0;i<femmodel->constraints->Size();i++){
|
---|
| 134 | + Constraint* constraint=(Constraint*)femmodel->constraints->GetObjectByOffset(i);
|
---|
| 135 | + constraint->InputUpdateFromVectorDakota(vector,femmodel->nodes,name,type);
|
---|
| 136 | + }
|
---|
| 137 | }
|
---|
| 138 | Index: ../trunk-jpl/src/c/classes/Constraints/SpcStatic.h
|
---|
| 139 | ===================================================================
|
---|
| 140 | --- ../trunk-jpl/src/c/classes/Constraints/SpcStatic.h (revision 22199)
|
---|
| 141 | +++ ../trunk-jpl/src/c/classes/Constraints/SpcStatic.h (revision 22200)
|
---|
| 142 | @@ -37,9 +37,10 @@
|
---|
| 143 | /*}}}*/
|
---|
| 144 | /*Constraint virtual functions definitions: {{{*/
|
---|
| 145 | void ActivatePenaltyMethod(void);
|
---|
| 146 | - void ConstrainNode(Nodes* nodes,Parameters* parameters);
|
---|
| 147 | - bool InAnalysis(int analysis_type);
|
---|
| 148 | - void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
|
---|
| 149 | + void ConstrainNode(Nodes* nodes,Parameters* parameters);
|
---|
| 150 | + bool InAnalysis(int analysis_type);
|
---|
| 151 | + void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
|
---|
| 152 | + void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type);
|
---|
| 153 | /*}}}*/
|
---|
| 154 | /*SpcStatic management:{{{ */
|
---|
| 155 | int GetDof();
|
---|
| 156 | Index: ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h
|
---|
| 157 | ===================================================================
|
---|
| 158 | --- ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h (revision 22199)
|
---|
| 159 | +++ ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h (revision 22200)
|
---|
| 160 | @@ -42,6 +42,7 @@
|
---|
| 161 | void ConstrainNode(Nodes* nodes,Parameters* parameters);
|
---|
| 162 | bool InAnalysis(int analysis_type);
|
---|
| 163 | void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters);
|
---|
| 164 | + void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){_error_("not implemented yet");};
|
---|
| 165 | /*}}}*/
|
---|
| 166 | /*SpcTransient management:{{{ */
|
---|
| 167 | int GetDof();
|
---|
| 168 | Index: ../trunk-jpl/src/c/classes/Constraints/Constraint.h
|
---|
| 169 | ===================================================================
|
---|
| 170 | --- ../trunk-jpl/src/c/classes/Constraints/Constraint.h (revision 22199)
|
---|
| 171 | +++ ../trunk-jpl/src/c/classes/Constraints/Constraint.h (revision 22200)
|
---|
| 172 | @@ -23,6 +23,7 @@
|
---|
| 173 | virtual void ConstrainNode(Nodes* nodes,Parameters* parameters)=0;
|
---|
| 174 | virtual bool InAnalysis(int analysis_type)=0;
|
---|
| 175 | virtual void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters)=0;
|
---|
| 176 | + virtual void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type) = 0;
|
---|
| 177 |
|
---|
| 178 | };
|
---|
| 179 | #endif
|
---|
| 180 | Index: ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h
|
---|
| 181 | ===================================================================
|
---|
| 182 | --- ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h (revision 22199)
|
---|
| 183 | +++ ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h (revision 22200)
|
---|
| 184 | @@ -41,6 +41,7 @@
|
---|
| 185 | void ConstrainNode(Nodes* nodes,Parameters* parameters);
|
---|
| 186 | bool InAnalysis(int analysis_type);
|
---|
| 187 | void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
|
---|
| 188 | + void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){_error_("not implemented yet");};
|
---|
| 189 |
|
---|
| 190 | /*SpcDynamic management*/
|
---|
| 191 | int GetDof();
|
---|
| 192 | Index: ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
|
---|
| 193 | ===================================================================
|
---|
| 194 | --- ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp (revision 22199)
|
---|
| 195 | +++ ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp (revision 22200)
|
---|
| 196 | @@ -99,10 +99,8 @@
|
---|
| 197 | /*}}}*/
|
---|
| 198 | void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/
|
---|
| 199 |
|
---|
| 200 | - Node* node=NULL;
|
---|
| 201 | -
|
---|
| 202 | /*Chase through nodes and find the node to which this SpcStatic applys: */
|
---|
| 203 | - node=(Node*)nodes->GetObjectById(NULL,nodeid);
|
---|
| 204 | + Node* node=(Node*)nodes->GetObjectById(NULL,nodeid);
|
---|
| 205 |
|
---|
| 206 | /*Apply constraint: */
|
---|
| 207 | if(node){ //in case the spc is dealing with a node on another cpu
|
---|
| 208 | @@ -115,7 +113,20 @@
|
---|
| 209 | else return false;
|
---|
| 210 | }
|
---|
| 211 | /*}}}*/
|
---|
| 212 | +void SpcStatic::InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){/*{{{*/
|
---|
| 213 |
|
---|
| 214 | + /*Chase through nodes and find the node to which this SpcStatic applys: */
|
---|
| 215 | + Node* node=(Node*)nodes->GetObjectById(NULL,nodeid);
|
---|
| 216 | +
|
---|
| 217 | + /*Apply constraint: */
|
---|
| 218 | + if(node){ //in case the spc is dealing with a node on another cpu
|
---|
| 219 | + int sid = node->Sid();
|
---|
| 220 | + this->value = vector[sid];
|
---|
| 221 | + _assert_(!xIsNan<IssmDouble>(this->value));
|
---|
| 222 | + }
|
---|
| 223 | +}
|
---|
| 224 | +/*}}}*/
|
---|
| 225 | +
|
---|
| 226 | /*SpcStatic functions*/
|
---|
| 227 | int SpcStatic::GetDof(){/*{{{*/
|
---|
| 228 | return dof;
|
---|
| 229 | Index: ../trunk-jpl/src/c/classes/Elements/Element.cpp
|
---|
| 230 | ===================================================================
|
---|
| 231 | --- ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 22199)
|
---|
| 232 | +++ ../trunk-jpl/src/c/classes/Elements/Element.cpp (revision 22200)
|
---|
| 233 | @@ -1791,7 +1791,8 @@
|
---|
| 234 | name==DeviatoricStresszzEnum ||
|
---|
| 235 | name==DeviatoricStresseffectiveEnum ||
|
---|
| 236 | name==VxAverageEnum ||
|
---|
| 237 | - name==VyAverageEnum
|
---|
| 238 | + name==VyAverageEnum ||
|
---|
| 239 | + name==BalancethicknessSpcthicknessEnum
|
---|
| 240 |
|
---|
| 241 | ) {
|
---|
| 242 | return true;
|
---|