Changeset 22983


Ignore:
Timestamp:
07/19/18 16:37:45 (7 years ago)
Author:
Eric.Larour
Message:

CHG: added new JacobianDeterminant3D, which does not error out if jacobian is negative. Only used for domain 3d surface.

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

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

    r20810 r22983  
    116116        Matrix2x2Determinant(Jdet,&J[0][0]);
    117117        if(*Jdet<0) _error_("negative jacobian determinant!");
     118
     119}
     120/*}}}*/
     121void TriaRef::GetJacobianDeterminant3D(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
     122        /*The Jacobian determinant is constant over the element, discard the gaussian points.
     123         * J is assumed to have been allocated of size NDOF2xNDOF2.*/
     124        IssmDouble J[2][2];
     125
     126        /*Get Jacobian*/
     127        GetJacobian(&J[0][0],xyz_list,gauss);
     128
     129        /*Get Determinant*/
     130        Matrix2x2Determinant(Jdet,&J[0][0]);
    118131
    119132}
  • issm/trunk-jpl/src/c/classes/Elements/TriaRef.h

    r20810 r22983  
    2020                void GetJacobian(IssmDouble* J, IssmDouble* xyz_list,Gauss* gauss);
    2121                void GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
     22                void GetJacobianDeterminant3D(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss);
    2223                void GetJacobianInvert(IssmDouble*  Jinv, IssmDouble* xyz_list,Gauss* gauss);
    2324                void GetNodalFunctions(IssmDouble* basis,Gauss* gauss,int finiteelement);
Note: See TracChangeset for help on using the changeset viewer.