Changeset 15640


Ignore:
Timestamp:
07/26/13 10:40:07 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: GetBFriction now dynamically calculated

File:
1 edited

Legend:

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

    r15638 r15640  
    632632         **/
    633633
    634         /*Get basis in actual coordinate system: */
    635         IssmDouble basis[6];
    636         GetNodalFunctionsP1(&basis[0],gauss);
    637 
    638         for(int i=0;i<NUMNODESP1;i++){
    639                 B[2*NUMNODESP1*0+2*i+0] = basis[i];
    640                 B[2*NUMNODESP1*0+2*i+1] = 0.;
    641                 B[2*NUMNODESP1*1+2*i+0] = 0.;
    642                 B[2*NUMNODESP1*1+2*i+1] = basis[i];
    643         }
     634
     635        /*Fetch number of nodes for this finite element*/
     636        int numnodes = this->NumberofNodes();
     637
     638        /*Get nodal functions derivatives*/
     639        IssmDouble* basis=xNew<IssmDouble>(numnodes);
     640        GetNodalFunctions(basis,gauss);
     641
     642        for(int i=0;i<numnodes;i++){
     643                B[2*numnodes*0+2*i+0] = basis[i];
     644                B[2*numnodes*0+2*i+1] = 0.;
     645                B[2*numnodes*1+2*i+0] = 0.;
     646                B[2*numnodes*1+2*i+1] = basis[i];
     647        }
     648
     649        /*Clean-up*/
     650        xDelete<IssmDouble>(basis);
    644651}
    645652/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.