Changeset 5908 for issm/trunk/src/c/objects/Elements/Tria.cpp
- Timestamp:
- 09/20/10 13:50:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r5881 r5908 2429 2429 /*Initialize Element matrix and return if necessary*/ 2430 2430 if(IsOnWater()) return NULL; 2431 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);2431 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 2432 2432 2433 2433 /*Retrieve all Inputs and parameters: */ … … 2534 2534 /*Initialize Element matrix and return if necessary*/ 2535 2535 if(IsOnWater()) return NULL; 2536 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);2536 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 2537 2537 2538 2538 /*Retrieve all inputs and parameters*/ … … 2601 2601 /*Initialize Element matrix and return if necessary*/ 2602 2602 if(IsOnWater()) return NULL; 2603 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);2603 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 2604 2604 2605 2605 /*Retrieve all inputs and parameters*/ … … 2733 2733 /*Initialize Element matrix and return if necessary*/ 2734 2734 if(IsOnWater()) return NULL; 2735 ElementMatrix* Ke= this->NewElementMatrix(MacAyealApproximationEnum);2735 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 2736 2736 2737 2737 /*Retrieve all inputs and parameters*/ … … 2801 2801 /*Initialize Element matrix and return if necessary*/ 2802 2802 if(IsOnWater() || IsOnShelf()) return NULL; 2803 ElementMatrix* Ke= this->NewElementMatrix(MacAyealApproximationEnum);2803 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 2804 2804 2805 2805 /*Retrieve all inputs and parameters*/ … … 2872 2872 /*Initialize Element matrix and return if necessary*/ 2873 2873 if(IsOnWater() || IsOnShelf()) return NULL; 2874 ElementMatrix* Ke1= this->NewElementMatrix(MacAyealApproximationEnum);2875 ElementMatrix* Ke2= this->NewElementMatrix(PattynApproximationEnum);2874 ElementMatrix* Ke1=NewElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 2875 ElementMatrix* Ke2=NewElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum); 2876 2876 ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2); 2877 2877 delete Ke1; delete Ke2; … … 2961 2961 /*Initialize Element matrix and return if necessary*/ 2962 2962 if(IsOnWater() || IsOnShelf()) return NULL; 2963 ElementMatrix* Ke= this->NewElementMatrix(PattynApproximationEnum);2963 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum); 2964 2964 2965 2965 /*Retrieve all inputs and parameters*/ … … 3021 3021 /*Initialize Element matrix and return if necessary*/ 3022 3022 if(IsOnWater()) return NULL; 3023 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3023 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3024 3024 3025 3025 /*Create Element matrix*/ … … 3052 3052 /*Initialize Element matrix and return if necessary*/ 3053 3053 if(IsOnWater()) return NULL; 3054 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3054 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3055 3055 3056 3056 /*Retrieve all inputs and parameters*/ … … 3102 3102 /*Initialize Element matrix and return if necessary*/ 3103 3103 if(IsOnWater()) return NULL; 3104 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3104 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3105 3105 3106 3106 /*Retrieve all inputs and parameters*/ … … 3173 3173 /*Initialize Element matrix and return if necessary*/ 3174 3174 if(IsOnWater()) return NULL; 3175 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3175 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3176 3176 3177 3177 /*Retrieve all inputs and parameters*/ … … 3293 3293 /*Initialize Element matrix and return if necessary*/ 3294 3294 if(IsOnWater()) return NULL; 3295 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3295 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3296 3296 3297 3297 /*Retrieve all inputs and parameters*/ … … 3368 3368 /*Initialize Element matrix and return if necessary*/ 3369 3369 if(IsOnWater()) return NULL; 3370 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3370 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3371 3371 3372 3372 GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES); … … 3419 3419 /*Initialize Element matrix and return if necessary*/ 3420 3420 if(IsOnWater() || !IsOnShelf()) return NULL; 3421 ElementMatrix* Ke= this->NewElementMatrix(NoneApproximationEnum);3421 ElementMatrix* Ke=NewElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 3422 3422 3423 3423 /*Retrieve all inputs and parameters*/ … … 3744 3744 3745 3745 /*Initialize element vector: */ 3746 pe= this->NewElementVector(MacAyealApproximationEnum);3746 pe=NewElementVector(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum); 3747 3747 3748 3748 /*Add pe_g values to pe element stifness load: */ … … 5453 5453 } 5454 5454 /*}}}*/ 5455 /*FUNCTION Tria::NewElementMatrix{{{1*/5456 ElementMatrix* Tria::NewElementMatrix(int approximation){5457 5458 /*parameters: */5459 bool kff=false;5460 5461 /*output: */5462 ElementMatrix* Ke=NULL;5463 int gsize;5464 int fsize;5465 int ssize;5466 int* gglobaldoflist=NULL;5467 int* flocaldoflist=NULL;5468 int* fglobaldoflist=NULL;5469 int* slocaldoflist=NULL;5470 int* sglobaldoflist=NULL;5471 bool square=true;5472 5473 /*retrieve some parameters: */5474 this->parameters->FindParam(&kff,KffEnum);5475 5476 /*get number of dofs in sets g,f and s: */5477 gsize=this->GetNumberOfDofs(approximation,GsetEnum);5478 if(kff){5479 fsize=this->GetNumberOfDofs(approximation,FsetEnum);5480 ssize=this->GetNumberOfDofs(approximation,SsetEnum);5481 }5482 5483 /*get dof lists for f and s set: */5484 gglobaldoflist=this->GetGlobalDofList(approximation,GsetEnum);5485 if(kff){5486 flocaldoflist=this->GetLocalDofList(approximation,FsetEnum);5487 fglobaldoflist=this->GetGlobalDofList(approximation,FsetEnum);5488 slocaldoflist=this->GetLocalDofList(approximation,SsetEnum);5489 sglobaldoflist=this->GetGlobalDofList(approximation,SsetEnum);5490 }5491 5492 /*Use square constructor for ElementMatrix: */5493 if(!kff) Ke=new ElementMatrix(square,gglobaldoflist,gsize);5494 else Ke=new ElementMatrix(square,gglobaldoflist,gsize,flocaldoflist,fglobaldoflist,fsize,slocaldoflist,sglobaldoflist,ssize);5495 5496 /*Free ressources and return:*/5497 xfree((void**)&gglobaldoflist);5498 xfree((void**)&flocaldoflist);5499 xfree((void**)&fglobaldoflist);5500 xfree((void**)&slocaldoflist);5501 xfree((void**)&sglobaldoflist);5502 5503 return Ke;5504 }5505 /*}}}*/5506 /*FUNCTION Tria::NewElementVector{{{1*/5507 ElementVector* Tria::NewElementVector(int approximation){5508 5509 /*parameters: */5510 bool kff=false;5511 5512 /*output: */5513 ElementVector* pe=NULL;5514 int gsize;5515 int fsize;5516 int* gglobaldoflist=NULL;5517 int* flocaldoflist=NULL;5518 int* fglobaldoflist=NULL;5519 5520 /*retrieve some parameters: */5521 this->parameters->FindParam(&kff,KffEnum);5522 5523 /*get number of dofs in sets g,f and s: */5524 gsize=this->GetNumberOfDofs(approximation,GsetEnum);5525 if(kff)fsize=this->GetNumberOfDofs(approximation,FsetEnum);5526 5527 /*get dof lists for f and s set: */5528 if(!kff){5529 gglobaldoflist=this->GetGlobalDofList(approximation,GsetEnum);5530 }5531 else{5532 flocaldoflist=this->GetLocalDofList(approximation,FsetEnum);5533 fglobaldoflist=this->GetGlobalDofList(approximation,FsetEnum);5534 }5535 5536 /*constructor for ElementVector: */5537 if(!kff)pe=new ElementVector(gsize,gglobaldoflist);5538 else pe=new ElementVector(gsize,flocaldoflist,fglobaldoflist,fsize);5539 5540 /*Free ressources and return:*/5541 xfree((void**)&gglobaldoflist);5542 xfree((void**)&flocaldoflist);5543 xfree((void**)&fglobaldoflist);5544 5545 return pe;5546 }5547 /*}}}*/5548 5455 /*FUNCTION Tria::SetClone {{{1*/ 5549 5456 void Tria::SetClone(int* minranks){
Note:
See TracChangeset
for help on using the changeset viewer.