Changeset 25242


Ignore:
Timestamp:
07/09/20 11:26:43 (5 years ago)
Author:
Mathieu Morlighem
Message:

CHG: trying to get rid of dynamic mem allocations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Element.cpp

    r25209 r25242  
    6565        IssmDouble dvx[3],dvy[3],dvz[3],dvmag[3];
    6666        IssmDouble eps[3][3],epseff,epsprime;
     67        IssmDouble lambdas[MAXVERTICES];
    6768        int         dim;
    6869        IssmDouble *xyz_list = NULL;
     
    7879        /*Allocate arrays*/
    7980        const int NUM_VERTICES = this->GetNumberOfVertices();
    80 
    81         IssmDouble* lambdas = xNew<IssmDouble>(NUM_VERTICES);
    8281
    8382        /* Start looping on the number of vertices: */
     
    133132
    134133        /*Add Stress tensor components into inputs*/
    135         this->AddInput2(LambdaSEnum,lambdas,P1Enum);
     134        this->AddInput2(LambdaSEnum,&lambdas[0],P1Enum);
    136135
    137136        /*Clean up and return*/
    138137        delete gauss;
    139138        xDelete<IssmDouble>(xyz_list);
    140         xDelete<IssmDouble>(lambdas);
    141 
    142 }
    143 /*}}}*/
     139}/*}}}*/
    144140void       Element::ComputeNewDamage(){/*{{{*/
    145141
Note: See TracChangeset for help on using the changeset viewer.