Changeset 17001 for issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
- Timestamp:
- 12/03/13 14:23:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16996 r17001 377 377 /*get inputs configured too: */ 378 378 this->inputs->Configure(parameters); 379 }380 /*}}}*/381 /*FUNCTION Penta::CreateDVector {{{*/382 void Penta::CreateDVector(Vector<IssmDouble>* df){383 384 /*retrieve parameters: */385 ElementVector* De=NULL;386 int analysis_type;387 parameters->FindParam(&analysis_type,AnalysisTypeEnum);388 389 /*Checks in debugging*/390 _assert_(this->nodes && this->material && this->matpar && this->verticalneighbors && this->parameters && this->inputs);391 392 switch(analysis_type){393 #ifdef _HAVE_STRESSBALANCE_394 case StressbalanceAnalysisEnum:395 De=CreateDVectorStressbalanceHoriz();396 break;397 #endif398 }399 400 /*Add to global Vector*/401 if(De){402 De->InsertIntoGlobal(df);403 delete De;404 }405 379 } 406 380 /*}}}*/ … … 4476 4450 #endif 4477 4451 4478 #ifdef _HAVE_STRESSBALANCE_4479 /*FUNCTION Penta::CreateDVectorStressbalanceHoriz {{{*/4480 ElementVector* Penta::CreateDVectorStressbalanceHoriz(void){4481 4482 int approximation;4483 inputs->GetInputValue(&approximation,ApproximationEnum);4484 4485 switch(approximation){4486 case FSApproximationEnum:4487 return CreateDVectorStressbalanceFS();4488 default:4489 return NULL; //no need for doftypes outside of FS approximation4490 }4491 }4492 /*}}}*/4493 /*FUNCTION Penta::CreateDVectorStressbalanceFS{{{*/4494 ElementVector* Penta::CreateDVectorStressbalanceFS(void){4495 4496 /*output: */4497 ElementVector* De=NULL;4498 4499 /*Initialize Element vector and return if necessary*/4500 int approximation;4501 inputs->GetInputValue(&approximation,ApproximationEnum);4502 if(approximation!=FSApproximationEnum) return NULL;4503 4504 /*Fetch number of nodes and dof for this finite element*/4505 int vnumnodes = this->NumberofNodesVelocity();4506 int pnumnodes = this->NumberofNodesPressure();4507 4508 De=new ElementVector(nodes,vnumnodes+pnumnodes,this->parameters,FSvelocityEnum);4509 4510 for(int i=0;i<vnumnodes;i++){4511 De->values[i*3+0]=VelocityEnum;4512 De->values[i*3+1]=VelocityEnum;4513 De->values[i*3+2]=VelocityEnum;4514 }4515 for(int i=0;i<pnumnodes;i++){4516 De->values[vnumnodes*3+i]=PressureEnum;4517 }4518 4519 return De;4520 }4521 /*}}}*/4522 #endif4523 4524 4452 #ifdef _HAVE_HYDROLOGY_ 4525 4453 /*FUNCTION Penta::CreateEPLDomainMassMatrix {{{*/
Note:
See TracChangeset
for help on using the changeset viewer.