Ignore:
Timestamp:
02/16/10 14:42:51 (15 years ago)
Author:
Eric.Larour
Message:

Better update of thickness.

File:
1 edited

Legend:

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

    r3041 r3048  
    45954595        double  B_list[3];
    45964596        double  B_average;
     4597        double  new_h[3];
    45974598
    45984599        ParameterInputs* inputs=NULL;
     
    46024603
    46034604        /*Update internal data if inputs holds new values: */
    4604         inputs->Recover("thickness",&h[0],1,dofs,3,(void**)nodes);
     4605        if(inputs->Recover("thickness",&new_h[0],1,dofs,3,(void**)nodes)){
     4606                /*density, needed later: */
     4607                double di=(this->matpar->rho_ice/this->matpar->rho_water);
     4608                /*Go through grids: */
     4609                for (i=0;i<3;i++){
     4610                        if(this->nodes[i]->onshelf){
     4611                                this->b[i]=this->b[i]-di*(new_h[i]-h[i]); //hydrostatic equilibrium;
     4612                        }
     4613                        this->s[i]=this->b[i]+new_h[i];
     4614                }
     4615        }
    46054616        inputs->Recover("surface",&s[0],1,dofs,3,(void**)nodes);
    46064617        inputs->Recover("bed",&b[0],1,dofs,3,(void**)nodes);
Note: See TracChangeset for help on using the changeset viewer.