Index: ../trunk-jpl/src/c/Makefile.am =================================================================== --- ../trunk-jpl/src/c/Makefile.am (revision 16377) +++ ../trunk-jpl/src/c/Makefile.am (revision 16378) @@ -24,6 +24,8 @@ ./datastructures/Object.h\ ./datastructures/datastructures.h\ ./classes/classes.h\ + ./classes/gauss/GaussSeg.h\ + ./classes/gauss/GaussSeg.cpp\ ./classes/gauss/GaussTria.h\ ./classes/gauss/GaussTria.cpp\ ./classes/Update.h\ Index: ../trunk-jpl/src/c/classes/Elements/SegRef.cpp =================================================================== --- ../trunk-jpl/src/c/classes/Elements/SegRef.cpp (revision 16377) +++ ../trunk-jpl/src/c/classes/Elements/SegRef.cpp (revision 16378) @@ -75,8 +75,7 @@ IssmDouble y2=xyz_list[3*1+1]; IssmDouble z2=xyz_list[3*1+2]; - *Jdet=.5*sqrt(pow(x2-x1,2) + pow(y2-y1,2) + pow(z2-z1,2)); - if(*Jdet<0) _error_("negative jacobian determinant!"); + *J=.5*sqrt(pow(x2-x1,2) + pow(y2-y1,2) + pow(z2-z1,2)); } /*}}}*/ /*FUNCTION SegRef::GetJacobianDeterminant{{{*/ @@ -85,7 +84,8 @@ * J is assumed to have been allocated of size NDOF2xNDOF2.*/ /*Call Jacobian routine to get the jacobian:*/ - GetJacobian(&Jdet, xyz_list, gauss); + GetJacobian(Jdet, xyz_list, gauss); + if(*Jdet<0) _error_("negative jacobian determinant!"); } /*}}}*/