Changeset 4378


Ignore:
Timestamp:
07/01/10 09:16:46 (15 years ago)
Author:
Mathieu Morlighem
Message:

Fixed SpawnTria in PentaHook

Location:
issm/trunk/src/c/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r4371 r4378  
    17941794
    17951795        /*recover nodes, matice and matpar: */
    1796         this->nodes=(Node**)this->hnodes[analysis_counter].deliverp();
    1797         this->matice=(Matice*)this->hmatice.delivers();
    1798         this->matpar=(Matpar*)this->hmatpar.delivers();
     1796        tria->nodes=(Node**)tria->hnodes[analysis_counter].deliverp();
     1797        tria->matice=(Matice*)tria->hmatice.delivers();
     1798        tria->matpar=(Matpar*)tria->hmatpar.delivers();
    17991799       
    18001800        return tria;
  • issm/trunk/src/c/objects/Elements/PentaHook.cpp

    r4369 r4378  
    7272
    7373        for(i=0;i<this->numanalyses;i++){
     74                /*Do not do anything if Hook is empty*/
     75                if (this->hnodes[i].GetNum()==0) continue;
     76                /*Else, spawn Hook*/
    7477                this->hnodes[i].Spawn(&triahook->hnodes[i],indices,3);
    7578        }
    76        
    77         this->hmatice.copy(&triahook->hmatice);
    78         this->hmatpar.copy(&triahook->hmatpar);
     79        triahook->hmatice.copy(&this->hmatice);
     80        triahook->hmatpar.copy(&this->hmatpar);
    7981}
    8082/*}}}*/
  • issm/trunk/src/c/objects/Hook.cpp

    r4369 r4378  
    367367        int i;
    368368
     369        /*If this Hook is empty, simply return*/
     370        if(this->num==0){
     371                spawnedhook->num=0;
     372                return;
     373        }
     374
     375        /*Else, check that we are requesting a half of num*/
     376        if (numindices>this->num) ISSMERROR("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);
     377
    369378        /*go pickup the correct objects, ids and offsets :*/
    370379        spawnedhook->num=numindices;
Note: See TracChangeset for help on using the changeset viewer.