Changeset 5714
- Timestamp:
- 09/09/10 09:00:34 (15 years ago)
- Location:
- issm/trunk/src/c/objects/Loads
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Loads/Icefront.cpp
r5713 r5714 30 30 /*FUNCTION Icefront::Icefront() {{{1*/ 31 31 Icefront::Icefront(){ 32 32 33 this->inputs=NULL; 33 34 this->parameters=NULL; 35 34 36 this->hnodes=NULL; 37 this->nodes= NULL; 35 38 this->helement=NULL; 39 this->element= NULL; 36 40 this->hmatpar=NULL; 41 this->matpar= NULL; 37 42 } 38 43 /*}}}*/ … … 93 98 this->inputs->AddInput(new IntInput(TypeEnum,in_icefront_type)); 94 99 95 // this->parameters: we still can't point to it, itmay not even exist. Configure will handle this.100 //parameters and hooked fields: we still can't point to them, they may not even exist. Configure will handle this. 96 101 this->parameters=NULL; 102 this->nodes= NULL; 103 this->element= NULL; 104 this->matpar= NULL; 97 105 } 98 106 … … 218 226 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset); 219 227 228 /*pointers are garbabe, until configuration is carried out: */ 229 nodes=NULL; 230 element=NULL; 231 matpar=NULL; 232 220 233 /*demarshall inputs: */ 221 234 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); … … 260 273 icefront->hmatpar=(Hook*)this->hmatpar->copy(); 261 274 275 /*corresponding fields*/ 276 icefront->nodes =(Node**)icefront->hnodes->deliverp(); 277 icefront->element=(Element*)icefront->helement->delivers(); 278 icefront->matpar =(Matpar*)icefront->hmatpar->delivers(); 279 262 280 return icefront; 263 281 … … 275 293 hmatpar->configure(materialsin); 276 294 295 /*Initialize hooked fields*/ 296 this->nodes =(Node**)hnodes->deliverp(); 297 this->element=(Element*)helement->delivers(); 298 this->matpar =(Matpar*)hmatpar->delivers(); 299 277 300 /*point parameters to real dataset: */ 278 301 this->parameters=parametersin; … … 281 304 /*FUNCTION Icefront::SetCurrentConfiguration {{{1*/ 282 305 void Icefront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){ 283 284 306 } 285 307 /*}}}*/ … … 295 317 void Icefront::CreatePVector(Vec pg){ 296 318 319 /*Checks in debugging mode*/ 320 ISSMASSERT(nodes); 321 ISSMASSERT(element); 322 ISSMASSERT(matpar); 323 324 /*Retrieve parameters: */ 297 325 int analysis_type; 298 299 /*Retrieve parameters: */300 326 this->parameters->FindParam(&analysis_type,AnalysisTypeEnum); 301 327 … … 404 430 /*Objects: */ 405 431 double pe_g[numdofs] = {0.0}; 406 Matpar *matpar = NULL;407 Node **nodes = NULL;408 Element *element = NULL;409 432 410 433 /*Segment*/ … … 429 452 Penta* penta=NULL; 430 453 431 /*Recover hook objects: */432 matpar =(Matpar*)hmatpar->delivers();433 element=(Element*)helement->delivers();434 nodes =(Node**)hnodes->deliverp();435 454 BeamRef* beam=NULL; 436 455 … … 539 558 /*Objects: */ 540 559 double pe_g[numdofs]={0.0}; 541 Matpar* matpar=NULL;542 560 Node** element_nodes=NULL; 543 Node** nodes=NULL;544 Element* element=NULL;545 561 int element_type; 546 562 … … 559 575 double v45[3]; 560 576 561 /*Recover hook objects: */562 matpar=(Matpar*)hmatpar->delivers();563 element=(Element*)helement->delivers();564 nodes=(Node**)hnodes->deliverp();565 577 566 578 element_type=element->Enum(); … … 675 687 /*Objects: */ 676 688 double pe_g[numdofs]={0.0}; 677 Matpar* matpar=NULL;678 689 Node** element_nodes=NULL; 679 Node** nodes=NULL;680 Element* element=NULL;681 690 Penta* penta=NULL; 682 691 … … 696 705 int approximation; 697 706 698 /*Recover hook objects: */699 matpar=(Matpar*)hmatpar->delivers();700 element=(Element*)helement->delivers();701 nodes=(Node**)hnodes->deliverp();702 703 707 /*check icefront is associated to a pentaelem: */ 704 708 if(element->Enum()!=PentaEnum) ISSMERROR("Only Penta supported yet"); … … 806 810 int* doflist=NULL; 807 811 808 /*pointers: */809 Node** nodes=NULL;810 811 /*recover pointers: */812 nodes=(Node**)hnodes->deliverp();813 812 814 813 /*recover type: */ … … 1368 1367 double value; 1369 1368 1370 /*dynamic objects pointed to by hooks: */1371 Element* element=NULL;1372 Node** nodes=NULL;1373 1374 /*recover objects from hooks: */1375 element=(Element*)helement->delivers();1376 nodes=(Node**)hnodes->deliverp();1377 1378 1369 /*Get value on Element 1*/ 1379 1370 element->GetParameterValue(&value,nodes[0],nodes[1],gauss_coord,input_in); -
issm/trunk/src/c/objects/Loads/Icefront.h
r5713 r5714 12 12 class Inputs; 13 13 class Parameters; 14 class Matpar; 15 class Node; 16 class Element; 14 17 class IoModel; 15 18 /*}}}*/ … … 25 28 Hook* helement; 26 29 Hook* hmatpar; 30 31 /*Corresponding fields*/ 32 Matpar *matpar; 33 Node **nodes; 34 Element *element; 27 35 28 36 /*inputs and parameters: */
Note:
See TracChangeset
for help on using the changeset viewer.