Changeset 8386
- Timestamp:
- 05/21/11 12:13:08 (14 years ago)
- Location:
- issm/trunk/src/c/objects
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r8376 r8386 3617 3617 /*}}}*/ 3618 3618 /*FUNCTION Penta::GetVectorFromInputs{{{1*/ 3619 void Penta::GetVectorFromInputs(Vec vector,int NameEnum){ 3620 3621 int i; 3619 void Penta::GetVectorFromInputs(Vec vector,int input_enum){ 3620 3622 3621 int doflist1[NUMVERTICES]; 3623 3622 3624 /*Find NameEnum input in the inputs dataset, and get it to fill in the vector: */ 3625 for(i=0;i<this->inputs->Size();i++){ 3626 Input* input=(Input*)this->inputs->GetObjectByOffset(i); 3627 if(input->EnumType()==NameEnum){ 3628 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ 3629 this->GetDofList1(&doflist1[0]); 3630 input->GetVectorFromInputs(vector,&doflist1[0]); 3631 break; 3632 } 3633 } 3623 /*Get out if this is not an element input*/ 3624 if (!IsInput(input_enum)) return; 3625 3626 /*Prepare index list*/ 3627 this->GetDofList1(&doflist1[0]); 3628 3629 /*Get input (either in element or material)*/ 3630 Input* input=inputs->GetInput(input_enum); 3631 if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum)); 3632 3633 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ 3634 input->GetVectorFromInputs(vector,&doflist1[0]); 3634 3635 } 3635 3636 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.cpp
r8376 r8386 3176 3176 /*}}}*/ 3177 3177 /*FUNCTION Tria::GetVectorFromInputs{{{1*/ 3178 void Tria::GetVectorFromInputs(Vec vector,int NameEnum){3178 void Tria::GetVectorFromInputs(Vec vector,int input_enum){ 3179 3179 3180 3180 int doflist1[NUMVERTICES]; 3181 3181 3182 /*Find NameEnum input in the inputs dataset, and get it to fill in the vector: */ 3183 for(int i=0;i<this->inputs->Size();i++){ 3184 Input* input=(Input*)this->inputs->GetObjectByOffset(i); 3185 if(input->EnumType()==NameEnum){ 3186 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ 3187 this->GetDofList1(&doflist1[0]); 3188 input->GetVectorFromInputs(vector,&doflist1[0]); 3189 break; 3190 } 3191 } 3182 /*Get out if this is not an element input*/ 3183 if (!IsInput(input_enum)) return; 3184 3185 /*Prepare index list*/ 3186 this->GetDofList1(&doflist1[0]); 3187 3188 /*Get input (either in element or material)*/ 3189 Input* input=inputs->GetInput(input_enum); 3190 if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum)); 3191 3192 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ 3193 input->GetVectorFromInputs(vector,&doflist1[0]); 3192 3194 } 3193 3195 /*}}}*/ -
issm/trunk/src/c/objects/FemModel.cpp
r8263 r8386 131 131 printf(" %i: %s\n",analysis_counter,EnumToStringx(analysis_type_list[analysis_counter])); 132 132 133 134 133 } 135 134 /*}}}*/ -
issm/trunk/src/c/objects/Inputs/ControlInput.cpp
r8363 r8386 396 396 return gradient->SpawnResult(step,time); 397 397 }/*}}}*/ 398 /*FUNCTION ControlInput::GetParameterValue(bool* pvalue){{{1*/ 399 void ControlInput::GetVectorFromInputs(Vec vector,int* doflist){ 400 values->GetVectorFromInputs(vector,doflist); 401 }/*}}}*/ 398 402 /*FUNCTION ControlInput::GetParameterAverage(double* pvalue){{{1*/ 399 403 void ControlInput::GetParameterAverage(double* pvalue){ -
issm/trunk/src/c/objects/Inputs/ControlInput.h
r8363 r8386 82 82 void Extrude(void); 83 83 void VerticallyIntegrate(Input* thickness_input); 84 void GetVectorFromInputs(Vec vector,int* doflist) {_error_("not implemented yet");};84 void GetVectorFromInputs(Vec vector,int* doflist); 85 85 void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");}; 86 86 ElementResult* SpawnGradient(int step, double time); -
issm/trunk/src/c/objects/Materials/Material.h
r6216 r8386 22 22 virtual void InputDuplicate(int original_enum,int new_enum)=0; 23 23 virtual void Configure(Elements* elements)=0; 24 virtual void GetVectorFromInputs(Vec vector,int input_enum)=0; 24 25 25 26 }; -
issm/trunk/src/c/objects/Materials/Matice.cpp
r8224 r8386 224 224 inputs->GetParameterAverage(&n,RheologyNEnum); 225 225 return n; 226 } 227 /*}}}*/ 228 /*FUNCTION Matice::GetVectorFromInputs{{{1*/ 229 void Matice::GetVectorFromInputs(Vec vector,int input_enum){ 230 231 /*Intermediaries*/ 232 Element *element= NULL; 233 234 /*Recover element*/ 235 element=(Element*)helement->delivers(); 236 237 /*Check that input_enum is a material input*/ 238 if (!IsInput(input_enum)) return; 239 240 switch(element->Enum()){ 241 242 case TriaEnum: 243 244 /*Prepare index list*/ 245 int doflist1[3]; 246 for(int i=0;i<3;i++) doflist1[i]=((Tria*)element)->nodes[i]->GetVertexDof(); 247 248 /*Get input (either in element or material)*/ 249 Input* input=inputs->GetInput(input_enum); 250 if(!input) _error_("Input %s not found in material",EnumToStringx(input_enum)); 251 252 /*We found the enum. Use its values to fill into the vector, using the vertices ids: */ 253 input->GetVectorFromInputs(vector,&doflist1[0]); 254 break; 255 256 default: _error_("element %s not implemented yet",EnumToStringx(element->Enum())); 257 } 226 258 } 227 259 /*}}}*/ -
issm/trunk/src/c/objects/Materials/Matice.h
r6216 r8386 57 57 void InputDuplicate(int original_enum,int new_enum); 58 58 void Configure(Elements* elements); 59 void GetVectorFromInputs(Vec vector,int input_enum); 59 60 /*}}}*/ 60 61 /*Matice Numerics: {{{1*/ -
issm/trunk/src/c/objects/Materials/Matpar.h
r7640 r8386 64 64 void InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");}; 65 65 void Configure(Elements* elements); 66 void GetVectorFromInputs(Vec vector,int input_enum){return;} 66 67 /*}}}*/ 67 68 /*Numerics: {{{1*/
Note:
See TracChangeset
for help on using the changeset viewer.