Changeset 4898 for issm/trunk/src/c/objects/Elements/TriaRef.cpp
- Timestamp:
- 07/30/10 09:00:31 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/TriaRef.cpp
r4885 r4898 249 249 /*The Jacobian determinant is constant over the element, discard the gaussian points. 250 250 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ 251 252 double x1,x2,x3,y1,y2,y3; 253 254 x1=*(xyz_list+3*0+0); 255 y1=*(xyz_list+3*0+1); 256 x2=*(xyz_list+3*1+0); 257 y2=*(xyz_list+3*1+1); 258 x3=*(xyz_list+3*2+0); 259 y3=*(xyz_list+3*2+1); 260 261 *Jdet=SQRT3/6.0*((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)); 262 263 if(Jdet<0){ 264 ISSMERROR("negative jacobian determinant!"); 265 } 251 double J[2][2]; 252 253 /*Get Jacobian*/ 254 GetJacobian(&J[0][0],xyz_list,gauss); 255 256 /*Get Determinant*/ 257 Matrix2x2Determinant(Jdet,&J[0][0]); 258 if(Jdet<0) ISSMERROR("negative jacobian determinant!"); 266 259 267 260 } … … 296 289 void TriaRef::GetJacobianInvert(double* Jinv, double* xyz_list,double* gauss){ 297 290 298 double Jdet; 299 const int NDOF2=2; 300 const int numgrids=3; 291 /*Jacobian*/ 292 double J[2][2]; 301 293 302 294 /*Call Jacobian routine to get the jacobian:*/ 303 GetJacobian( Jinv, xyz_list, gauss);295 GetJacobian(&J[0][0], xyz_list, gauss); 304 296 305 297 /*Invert Jacobian matrix: */ 306 Matrix Inverse(Jinv,NDOF2,NDOF2,NULL,0,&Jdet);298 Matrix2x2Invert(Jinv,&J[0][0]); 307 299 308 300 }
Note:
See TracChangeset
for help on using the changeset viewer.