Changeset 4931 for issm/trunk/src/c/objects/Elements/Tria.cpp
- Timestamp:
- 08/02/10 14:55:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r4927 r4931 14 14 #include <string.h> 15 15 #include "../objects.h" 16 #include "../../EnumDefinitions/EnumDefinitions.h"17 16 #include "../../shared/shared.h" 18 17 #include "../../Container/Container.h" … … 629 628 } 630 629 else if (control_type==RheologyBEnum){ 631 inputs->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], &gauss_l1l2l3[0],RheologyB Enum);630 inputs->GetParameterDerivativeValue(&dB[0], &xyz_list[0][0], &gauss_l1l2l3[0],RheologyB2dEnum); 632 631 Jelem+=cm_noisedmp*1/2*(pow(dB[0],2)+pow(dB[1],2))*Jdet*gauss_weight; 633 632 } … … 870 869 GradjDrag(gradient); 871 870 } 872 else if (control_type==RheologyB Enum){871 else if (control_type==RheologyB2dEnum){ 873 872 GradjB(gradient); 874 873 } … … 966 965 adjointx_input=inputs->GetInput(AdjointxEnum); 967 966 adjointy_input=inputs->GetInput(AdjointyEnum); 968 rheologyb_input=inputs->GetInput(RheologyB Enum);967 rheologyb_input=inputs->GetInput(RheologyB2dEnum); 969 968 970 969 /* Start looping on the number of gaussian points: */ … … 1231 1230 1232 1231 /*Move input to Material if required (needed if control method) TO BE IMPROVED*/ 1233 if (YEnum==RheologyBEnum ){1232 if (YEnum==RheologyBEnum || YEnum==RheologyB2dEnum){ 1234 1233 this->matice->inputs->AddInput((Input*)yinput->copy()); 1235 1234 } … … 1287 1286 /*}}}*/ 1288 1287 /*FUNCTION Tria::InputDepthAverageAtBase {{{1*/ 1289 void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type ){1288 void Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum){ 1290 1289 1291 1290 /*New input*/ … … 1294 1293 1295 1294 /*copy input of enum_type*/ 1296 oldinput=this->inputs->GetInput(enum_type); 1295 if (object_enum==ElementsEnum) 1296 oldinput=(Input*)this->inputs->GetInput(enum_type); 1297 else if (object_enum==MaterialsEnum) 1298 oldinput=(Input*)this->matice->inputs->GetInput(enum_type); 1299 else 1300 ISSMERROR("object %s not supported yet",EnumAsString(object_enum)); 1297 1301 if(!oldinput)ISSMERROR("%s%s"," could not find old input with enum: ",EnumAsString(enum_type)); 1298 1302 newinput=(Input*)oldinput->copy(); … … 1302 1306 1303 1307 /*Add new input to current element*/ 1304 this->inputs->AddInput(newinput); 1308 if (object_enum==ElementsEnum) 1309 this->inputs->AddInput((Input*)newinput); 1310 else if (object_enum==MaterialsEnum) 1311 this->matice->inputs->AddInput((Input*)newinput); 1312 else 1313 ISSMERROR("object %s not supported yet",EnumAsString(object_enum)); 1305 1314 1306 1315 } … … 2126 2135 if (iomodel->rheology_B) { 2127 2136 for(i=0;i<3;i++)nodeinputs[i]=iomodel->rheology_B[tria_vertex_ids[i]-1]; 2128 this->inputs->AddInput(new TriaVertexInput(RheologyB Enum,nodeinputs));2137 this->inputs->AddInput(new TriaVertexInput(RheologyB2dEnum,nodeinputs)); 2129 2138 } 2130 2139 if (iomodel->control_parameter) { … … 6048 6057 name==VyEnum || 6049 6058 name==RheologyBEnum || 6059 name==RheologyB2dEnum || 6050 6060 name==RheologyNEnum || 6051 6061 name==FitEnum ||
Note:
See TracChangeset
for help on using the changeset viewer.