Changeset 3596
- Timestamp:
- 04/21/10 16:11:25 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Tria.cpp
r3595 r3596 110 110 /*FUNCTION Tria::Configure {{{1*/ 111 111 void Tria::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){ 112 113 int i; 112 114 113 115 DataSet* loadsin=NULL; … … 511 513 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 512 514 GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 2); 515 516 #ifdef _ISSM_DEBUG_ 517 for (i=0;i<num_gauss;i++){ 518 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i)); 519 } 520 #endif 513 521 514 522 /* Start looping on the number of gaussian points: */ … … 3798 3806 /* Get Jacobian determinant: */ 3799 3807 GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 3808 #ifdef _ISSM_DEBUG_ 3809 printf("Element id %i Jacobian determinant: %g\n",GetId(),Jdet); 3810 #endif 3800 3811 3801 3812 /* Get nodal functions value at gaussian point:*/ … … 3923 3934 GetNodalFunctionsDerivatives(&dh1dh3[0][0],xyz_list, gauss_l1l2l3); 3924 3935 3936 #ifdef _ISSM_DEBUG_ 3937 for (i=0;i<3;i++){ 3938 printf("Node %i dh/dx=%lf dh/dy=%lf \n",i,dh1dh3[0][i],dh1dh3[1][i]); 3939 } 3940 #endif 3941 3925 3942 /*Build B: */ 3926 3943 for (i=0;i<numgrids;i++){ … … 3957 3974 /*Get dh1dh2dh3 in actual coordinate system: */ 3958 3975 GetNodalFunctions(&l1l2l3[0],gauss_l1l2l3); 3976 3977 #ifdef _ISSM_DEBUG_ 3978 for (i=0;i<3;i++){ 3979 printf("Node %i h=%lf \n",i,l1l2l3[i]); 3980 } 3981 #endif 3959 3982 3960 3983 /*Build B_prog: */ … … 4535 4558 /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */ 4536 4559 GaussTria( &num_gauss, &first_gauss_area_coord, &second_gauss_area_coord, &third_gauss_area_coord, &gauss_weights, 4); 4560 #ifdef _ISSM_DEBUG_ 4561 for (i=0;i<num_gauss;i++){ 4562 printf("Gauss coord %i: %lf %lf %lf Weight: %lf\n",i,*(first_gauss_area_coord+i),*(second_gauss_area_coord+i),*(third_gauss_area_coord+i),*(gauss_weights+i)); 4563 } 4564 #endif 4537 4565 4538 4566 /* Start looping on the number of gaussian points: */ … … 4564 4592 /* Get nodal functions value at gaussian point:*/ 4565 4593 GetNodalFunctions(l1l2l3, gauss_l1l2l3); 4594 #ifdef _ISSM_DEBUG_ 4595 printf("viscositycomp %g thickness %g dvx [%g %g] dvy [%g %g] dadjx [%g %g] dadjy[%g %g]\n",viscosity_complement,thickness,dvx[0],dvx[1],dvy[0],dvy[1],dadjx[0],dadjx[1],dadjy[0],dadjy[1]); 4596 #endif 4566 4597 4567 4598 /*Get nodal functions derivatives*/ … … 4768 4799 GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3); 4769 4800 GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3); 4801 #ifdef _ISSM_DEBUG_ 4802 printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag); 4803 #endif 4770 4804 4771 4805 /*recover lambda and mu: */ 4772 4806 GetParameterValue(&lambda, &adjx_list[0],gauss_l1l2l3); 4773 4807 GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3); 4808 #ifdef _ISSM_DEBUG_ 4809 printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu); 4810 #endif 4774 4811 4775 4812 /*recover vx and vy: */ 4776 4813 GetParameterValue(&vx, &vx_list[0],gauss_l1l2l3); 4777 4814 GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3); 4815 #ifdef _ISSM_DEBUG_ 4816 printf("Velocity vector %20.20lf %20.20lf\n",vx,vy); 4817 #endif 4778 4818 4779 4819 /* Get Jacobian determinant: */ 4780 4820 GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 4781 4821 #ifdef _ISSM_DEBUG_ 4822 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet); 4823 #endif 4824 4782 4825 /* Get nodal functions value at gaussian point:*/ 4783 4826 GetNodalFunctions(l1l2l3, gauss_l1l2l3); … … 4990 5033 GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3); 4991 5034 GetParameterValue(&drag, &this->properties.k[0],gauss_l1l2l3); 5035 #ifdef _ISSM_DEBUG_ 5036 printf("Drag complement: %20.20lf Drag: %20.20lf\n",alpha_complement,drag); 5037 #endif 4992 5038 4993 5039 /*recover lambda mu and xi: */ … … 4995 5041 GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3); 4996 5042 GetParameterValue(&xi, &adjz_list[0],gauss_l1l2l3); 5043 #ifdef _ISSM_DEBUG_ 5044 printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu); 5045 #endif 4997 5046 4998 5047 /*recover vx vy and vz: */ … … 5000 5049 GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3); 5001 5050 GetParameterValue(&vz, &vz_list[0],gauss_l1l2l3); 5051 #ifdef _ISSM_DEBUG_ 5052 printf("Velocity vector %20.20lf %20.20lf\n",vx,vy); 5053 5054 /*Get normal vecyor to the bed */ 5055 SurfaceNormal(&surface_normal[0],xyz_list); 5056 5057 bed_normal[0]=-surface_normal[0]; //Program is for surface, so the normal to the bed is the opposite of the result 5058 bed_normal[1]=-surface_normal[1]; 5059 bed_normal[2]=-surface_normal[2]; 5060 #endif 5002 5061 5003 5062 /* Get Jacobian determinant: */ 5004 5063 GetJacobianDeterminant3d(&Jdet, &xyz_list[0][0],gauss_l1l2l3); 5064 #ifdef _ISSM_DEBUG_ 5065 printf("Element id %i Jacobian determinant: %lf\n",GetId(),Jdet); 5066 #endif 5005 5067 5006 5068 /* Get nodal functions value at gaussian point:*/
Note:
See TracChangeset
for help on using the changeset viewer.