Changeset 3596


Ignore:
Timestamp:
04/21/10 16:11:25 (15 years ago)
Author:
Mathieu Morlighem
Message:

back to previous version for Eric

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Tria.cpp

    r3595 r3596  
    110110/*FUNCTION Tria::Configure {{{1*/
    111111void  Tria::Configure(void* ploadsin,void* pnodesin,void* pmaterialsin,void* pparametersin){
     112
     113        int i;
    112114
    113115        DataSet* loadsin=NULL;
     
    511513          /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    512514          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
    513521
    514522        /* Start  looping on the number of gaussian points: */
     
    37983806                /* Get Jacobian determinant: */
    37993807                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
    38003811
    38013812                /* Get nodal functions value at gaussian point:*/
     
    39233934        GetNodalFunctionsDerivatives(&dh1dh3[0][0],xyz_list, gauss_l1l2l3);
    39243935
     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
    39253942        /*Build B: */
    39263943        for (i=0;i<numgrids;i++){
     
    39573974        /*Get dh1dh2dh3 in actual coordinate system: */
    39583975        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
    39593982
    39603983        /*Build B_prog: */
     
    45354558        /* Get gaussian points and weights (make this a statically initialized list of points? fstd): */
    45364559        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
    45374565
    45384566        /* Start  looping on the number of gaussian points: */
     
    45644592                /* Get nodal functions value at gaussian point:*/
    45654593                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
    45664597
    45674598                /*Get nodal functions derivatives*/
     
    47684799                GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3);
    47694800                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
    47704804
    47714805                /*recover lambda and mu: */
    47724806                GetParameterValue(&lambda, &adjx_list[0],gauss_l1l2l3);
    47734807                GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3);
     4808                #ifdef _ISSM_DEBUG_
     4809                        printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);
     4810                #endif
    47744811                       
    47754812                /*recover vx and vy: */
    47764813                GetParameterValue(&vx, &vx_list[0],gauss_l1l2l3);
    47774814                GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3);
     4815                #ifdef _ISSM_DEBUG_
     4816                        printf("Velocity vector %20.20lf %20.20lf\n",vx,vy);
     4817                #endif
    47784818
    47794819                /* Get Jacobian determinant: */
    47804820                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               
    47824825                /* Get nodal functions value at gaussian point:*/
    47834826                GetNodalFunctions(l1l2l3, gauss_l1l2l3);
     
    49905033                GetParameterValue(&alpha_complement, &alpha_complement_list[0],gauss_l1l2l3);
    49915034                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
    49925038
    49935039                /*recover lambda mu and xi: */
     
    49955041                GetParameterValue(&mu, &adjy_list[0],gauss_l1l2l3);
    49965042                GetParameterValue(&xi, &adjz_list[0],gauss_l1l2l3);
     5043#ifdef _ISSM_DEBUG_
     5044                printf("Adjoint vector %20.20lf %20.20lf\n",lambda,mu);
     5045#endif
    49975046
    49985047                /*recover vx vy and vz: */
     
    50005049                GetParameterValue(&vy, &vy_list[0],gauss_l1l2l3);
    50015050                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
    50025061
    50035062                /* Get Jacobian determinant: */
    50045063                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
    50055067
    50065068                /* Get nodal functions value at gaussian point:*/
Note: See TracChangeset for help on using the changeset viewer.