Changeset 14384
- Timestamp:
- 02/23/13 16:55:59 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/objects/Elements
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14378 r14384 301 301 302 302 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 303 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0], gauss);303 GetJacobianDeterminant(&Jdet, &xyz_list[0][0], gauss); 304 304 305 305 D_scalar=latentheat/heatcapacity*gauss->weight*Jdet; … … 378 378 gauss->GaussPoint(ig); 379 379 380 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);380 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 381 381 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 382 382 … … 494 494 vyaverage_input->GetInputValue(&vy,gauss); 495 495 496 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);496 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 497 497 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 498 498 … … 547 547 gauss->GaussPoint(ig); 548 548 549 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);549 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 550 550 D=gauss->weight*Jdet; 551 551 … … 668 668 gauss->GaussPoint(ig); 669 669 670 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);670 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 671 671 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 672 672 … … 716 716 gauss->GaussPoint(ig); 717 717 718 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);718 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 719 719 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 720 720 … … 766 766 gauss->GaussPoint(ig); 767 767 768 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);768 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 769 769 GetNodalFunctions(basis, gauss); 770 770 … … 1207 1207 1208 1208 /*Compute fraction of grounded element*/ 1209 GetJacobianDeterminant 2d(&area_init, xyz_list,gauss);1210 GetJacobianDeterminant 2d(&area_grounded, &xyz_bis[0][0],gauss);1209 GetJacobianDeterminant(&area_init, xyz_list,gauss); 1210 GetJacobianDeterminant(&area_grounded, &xyz_bis[0][0],gauss); 1211 1211 if(mainlyfloating==true) area_grounded=area_init-area_grounded; 1212 1212 phi=area_grounded/area_init; … … 3080 3080 gauss->GaussPoint(ig); 3081 3081 3082 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3082 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3083 3083 GetBMacAyeal(&B[0][0], &xyz_list[0][0], gauss); 3084 3084 GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss); … … 3164 3164 3165 3165 GetL(&L[0][0], &xyz_list[0][0], gauss,NDOF2); 3166 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3166 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3167 3167 DL_scalar=alpha2*gauss->weight*Jdet; 3168 3168 for (i=0;i<2;i++) DL[i][i]=DL_scalar; … … 3235 3235 gauss->GaussPoint(ig); 3236 3236 3237 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3237 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3238 3238 GetNodalFunctions(basis, gauss); 3239 3239 … … 3342 3342 gauss->GaussPoint(ig); 3343 3343 3344 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3344 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3345 3345 GetNodalFunctionsDerivatives(&dphi[0][0],&xyz_list[0][0],gauss); 3346 3346 … … 3611 3611 3612 3612 /* Get Jacobian determinant: */ 3613 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3613 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3614 3614 3615 3615 /*Get all parameters at gaussian point*/ … … 3821 3821 gauss->GaussPoint(ig); 3822 3822 3823 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3823 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3824 3824 GetNodalFunctionsDerivatives(&dbasis[0][0],&xyz_list[0][0],gauss); 3825 3825 weights_input->GetInputValue(&weight,gauss,weight_index); … … 3861 3861 gauss->GaussPoint(ig); 3862 3862 3863 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3863 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3864 3864 GetNodalFunctionsDerivatives(&dbasis[0][0],&xyz_list[0][0],gauss); 3865 3865 weights_input->GetInputValue(&weight,gauss,weight_index); … … 3919 3919 material->GetViscosityComplement(&viscosity_complement,&epsilon[0]); 3920 3920 3921 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3921 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3922 3922 GetNodalFunctions(basis,gauss); 3923 3923 … … 3976 3976 material->GetViscosityZComplement(&viscosity_complement,&epsilon[0]); 3977 3977 3978 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);3978 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 3979 3979 GetNodalFunctions(basis,gauss); 3980 3980 … … 4033 4033 gauss->GaussPoint(ig); 4034 4034 4035 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4035 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4036 4036 GetNodalFunctions(basis, gauss); 4037 4037 … … 4104 4104 gauss->GaussPoint(ig); 4105 4105 4106 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4106 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4107 4107 GetNodalFunctionsDerivatives(&dbasis[0][0],&xyz_list[0][0],gauss); 4108 4108 weights_input->GetInputValue(&weight,gauss,weight_index); … … 4166 4166 gauss->GaussPoint(ig); 4167 4167 4168 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4168 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4169 4169 GetNodalFunctions(basis, gauss); 4170 4170 … … 4209 4209 gauss->GaussPoint(ig); 4210 4210 4211 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4211 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4212 4212 GetNodalFunctions(basis, gauss); 4213 4213 … … 4267 4267 gauss->GaussPoint(ig); 4268 4268 4269 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4269 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4270 4270 GetNodalFunctions(basis, gauss); 4271 4271 GetNodalFunctionsDerivatives(&dbasis[0][0],&xyz_list[0][0],gauss); … … 4376 4376 4377 4377 /* Get Jacobian determinant: */ 4378 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4378 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4379 4379 4380 4380 /*Get all parameters at gaussian point*/ … … 4421 4421 4422 4422 /* Get Jacobian determinant: */ 4423 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4423 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4424 4424 4425 4425 /*Get all parameters at gaussian point*/ … … 4481 4481 4482 4482 /* Get Jacobian determinant: */ 4483 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4483 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4484 4484 4485 4485 /*Get all parameters at gaussian point*/ … … 4543 4543 4544 4544 /* Get Jacobian determinant: */ 4545 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4545 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4546 4546 4547 4547 /*Get all parameters at gaussian point*/ … … 4603 4603 4604 4604 /* Get Jacobian determinant: */ 4605 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4605 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4606 4606 4607 4607 /*Get all parameters at gaussian point*/ … … 4664 4664 4665 4665 /* Get Jacobian determinant: */ 4666 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4666 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4667 4667 4668 4668 /*Get all parameters at gaussian point*/ … … 4722 4722 4723 4723 /* Get Jacobian determinant: */ 4724 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4724 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4725 4725 4726 4726 /*Get all parameters at gaussian point*/ … … 4768 4768 4769 4769 /* Get Jacobian determinant: */ 4770 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4770 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4771 4771 4772 4772 /*Get all parameters at gaussian point*/ … … 4819 4819 4820 4820 /* Get Jacobian determinant: */ 4821 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4821 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4822 4822 4823 4823 /*Get all parameters at gaussian point*/ … … 4866 4866 4867 4867 /* Get Jacobian determinant: */ 4868 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4868 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4869 4869 4870 4870 /*Get parameters at gauss point*/ … … 4921 4921 gauss->GaussPoint(ig); 4922 4922 4923 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);4923 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 4924 4924 GetNodalFunctions(basis, gauss); 4925 4925 GetNodalFunctionsDerivatives(&dbasis[0][0],&xyz_list[0][0],gauss); … … 5018 5018 5019 5019 /* Get Jacobian determinant: */ 5020 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);5020 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 5021 5021 5022 5022 /*Get all parameters at gaussian point*/ … … 5200 5200 5201 5201 /* Get Jacobian determinant: */ 5202 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);5202 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 5203 5203 5204 5204 /*Get all parameters at gaussian point*/ … … 5366 5366 5367 5367 /* Get Jacobian determinant: */ 5368 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);5368 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 5369 5369 5370 5370 /*Get all parameters at gaussian point*/ … … 5439 5439 gauss->GaussPoint(ig); 5440 5440 5441 GetJacobianDeterminant 2d(&Jdet, &xyz_list[0][0],gauss);5441 GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss); 5442 5442 GetNodalFunctionsDerivatives(&dphi[0][0],&xyz_list[0][0],gauss); 5443 5443 … … 5700 5700 gauss->GaussPoint(ig); 5701 5701 5702 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);5702 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 5703 5703 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 5704 5704 … … 5793 5793 gauss->GaussPoint(ig); 5794 5794 5795 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);5795 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 5796 5796 GetNodalFunctions(basis, gauss); 5797 5797 … … 6079 6079 gauss->GaussPoint(ig); 6080 6080 6081 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);6081 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 6082 6082 GetBPrognostic(&B[0][0], &xyz_list[0][0], gauss); 6083 6083 GetBprimePrognostic(&Bprime[0][0], &xyz_list[0][0], gauss); … … 6173 6173 gauss->GaussPoint(ig); 6174 6174 6175 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);6175 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 6176 6176 /*WARNING: B and Bprime are inverted compared to usual prognostic!!!!*/ 6177 6177 GetBPrognostic(&Bprime[0][0], &xyz_list[0][0], gauss); … … 6242 6242 dhdt_input->GetInputValue(&dhdt_g,gauss); 6243 6243 6244 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);6244 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 6245 6245 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 6246 6246 … … 6285 6285 dhdt_input->GetInputValue(&dhdt_g,gauss); 6286 6286 6287 GetJacobianDeterminant 2d(&Jdettria, &xyz_list[0][0],gauss);6287 GetJacobianDeterminant(&Jdettria, &xyz_list[0][0],gauss); 6288 6288 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 6289 6289 -
issm/trunk-jpl/src/c/classes/objects/Elements/TriaRef.cpp
r13622 r14384 341 341 } 342 342 /*}}}*/ 343 /*FUNCTION TriaRef::GetJacobianDeterminant 2d{{{*/344 void TriaRef::GetJacobianDeterminant 2d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss){343 /*FUNCTION TriaRef::GetJacobianDeterminant{{{*/ 344 void TriaRef::GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss){ 345 345 /*The Jacobian determinant is constant over the element, discard the gaussian points. 346 346 * J is assumed to have been allocated of size NDOF2xNDOF2.*/ … … 352 352 /*Get Determinant*/ 353 353 Matrix2x2Determinant(Jdet,&J[0][0]); 354 if(*Jdet<0) _error_("negative jacobian determinant!");355 356 }357 /*}}}*/358 /*FUNCTION TriaRef::GetJacobianDeterminant3d {{{*/359 void TriaRef::GetJacobianDeterminant3d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss){360 /*The Jacobian determinant is constant over the element, discard the gaussian points.361 * J is assumed to have been allocated of size NDOF2xNDOF2.*/362 363 IssmDouble x1,x2,x3,y1,y2,y3,z1,z2,z3;364 365 x1=*(xyz_list+3*0+0);366 y1=*(xyz_list+3*0+1);367 z1=*(xyz_list+3*0+2);368 x2=*(xyz_list+3*1+0);369 y2=*(xyz_list+3*1+1);370 z2=*(xyz_list+3*1+2);371 x3=*(xyz_list+3*2+0);372 y3=*(xyz_list+3*2+1);373 z3=*(xyz_list+3*2+2);374 375 *Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);376 354 if(*Jdet<0) _error_("negative jacobian determinant!"); 377 355 -
issm/trunk-jpl/src/c/classes/objects/Elements/TriaRef.h
r13623 r14384 32 32 void GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussTria* gauss); 33 33 void GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss); 34 void GetJacobianDeterminant2d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss); 35 void GetJacobianDeterminant3d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss); 34 void GetJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss); 36 35 void GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussTria* gauss); 37 36 void GetNodalFunctions(IssmDouble* l1l2l3,GaussTria* gauss);
Note:
See TracChangeset
for help on using the changeset viewer.