Changeset 17268
- Timestamp:
- 02/12/14 15:36:41 (11 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Loads
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
r17236 r17268 21 21 /*FUNCTION Pengrid::Pengrid(){{{*/ 22 22 Pengrid::Pengrid(){ 23 this->inputs=NULL;24 23 this->parameters=NULL; 25 24 this->hnode=NULL; … … 62 61 this->hmatpar=new Hook(&pengrid_matpar_id,1); 63 62 64 //initialize inputs: none needed65 this->inputs=new Inputs();66 67 63 //this->parameters: we still can't point to it, it may not even exist. Configure will handle this. 68 64 this->parameters=NULL; … … 79 75 /*FUNCTION Pengrid::~Pengrid(){{{*/ 80 76 Pengrid::~Pengrid(){ 81 delete inputs;82 77 delete hnode; 83 78 delete helement; … … 106 101 _printf_(" parameters\n"); 107 102 parameters->DeepEcho(); 108 _printf_(" inputs\n");109 inputs->DeepEcho();110 103 } 111 104 /*}}}*/ … … 129 122 pengrid->id=this->id; 130 123 pengrid->analysis_type=this->analysis_type; 131 if(this->inputs){ 132 pengrid->inputs=(Inputs*)this->inputs->Copy(); 133 } 134 else{ 135 pengrid->inputs=new Inputs(); 136 } 124 137 125 /*point parameters: */ 138 126 pengrid->parameters=this->parameters; … … 368 356 /*FUNCTION Pengrid::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/ 369 357 void Pengrid::InputUpdateFromConstant(IssmDouble constant, int name){ 370 switch(name){ 371 372 case MeltingOffsetEnum: 373 inputs->AddInput(new DoubleInput(name,constant)); 374 return; 375 376 } 358 /*Nothing*/ 377 359 } 378 360 /*}}}*/ … … 506 488 ElementMatrix* Ke=new ElementMatrix(&node,1,this->parameters); 507 489 508 /*Retrieve all inputs andparameters*/490 /*Retrieve all parameters*/ 509 491 penta->GetInputValue(&pressure,node,PressureEnum); 510 492 penta->GetInputValue(&temperature,node,TemperatureEnum); … … 557 539 ElementVector* pe=new ElementVector(&node,NUMVERTICES,this->parameters); 558 540 559 /*Retrieve all inputs andparameters*/541 /*Retrieve all parameters*/ 560 542 penta->GetInputValue(&pressure,node,PressureEnum); 561 543 penta->GetInputValue(&temperature,node,TemperatureEnum); 562 inputs->GetInputValue(&melting_offset,MeltingOffsetEnum);544 parameters->FindParam(&melting_offset,MeltingOffsetEnum); 563 545 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 564 546 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); … … 596 578 ElementVector* pe=new ElementVector(&node,1,this->parameters); 597 579 598 /*Retrieve all inputs andparameters*/580 /*Retrieve all parameters*/ 599 581 penta->GetInputValue(&pressure,node,PressureEnum); 600 582 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); -
issm/trunk-jpl/src/c/classes/Loads/Pengrid.h
r17236 r17268 23 23 private: 24 24 25 int 26 int analysis_type;25 int id; 26 int analysis_type; 27 27 28 28 /*Hooks*/ … … 37 37 38 38 Parameters* parameters; //pointer to solution parameters 39 Inputs* inputs;40 39 41 40 /*internals: */
Note:
See TracChangeset
for help on using the changeset viewer.