Changeset 16037


Ignore:
Timestamp:
08/30/13 10:36:28 (12 years ago)
Author:
seroussi
Message:

CHG: some more cleaning in enthalpy postprocessing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r16036 r16037  
    53105310        IssmDouble  normal_base[3], d1enthalpy[3];
    53115311        IssmDouble  basalmeltingrate[NUMVERTICES], watercolumn[NUMVERTICES];
    5312         IssmDouble  enthalpy[NUMVERTICES], enthalpyup;
    5313         IssmDouble  pressure[NUMVERTICES], pressureup;
     5312        IssmDouble  enthalpy[NUMVERTICES],pressure[NUMVERTICES];
    53145313        IssmDouble  temperature, waterfraction;
    53155314        IssmDouble  latentheat, rho_ice;
     
    53405339        Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input);
    53415340
     5341        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
    53425342        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
    53435343
     
    53485348        /*Ok, get meltingrates now from basal conditions*/
    53495349        GaussPenta* gauss=new GaussPenta();
    5350         GaussPenta* gaussup=new GaussPenta();
    53515350        for(int iv=0;iv<3;iv++){
    53525351
    53535352                gauss->GaussVertex(iv);
    5354                 gaussup->GaussVertex(iv+3);
    53555353                checkpositivethickness=true;
    53565354
     
    54085406        /*Clean up and return*/
    54095407        delete gauss;
    5410         delete gaussup;
    54115408        delete friction;
    54125409}
     
    54205417        IssmDouble enthalpy[NUMVERTICES], pressure[NUMVERTICES];
    54215418        IssmDouble latentheat, dt;
    5422         GaussPenta* gauss;
    5423 
    5424         Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input);
    5425         Input* enthalpy_input=inputs->GetInput(EnthalpyEnum);       _assert_(enthalpy_input);
    5426         Input* pressure_input=inputs->GetInput(PressureEnum);       _assert_(pressure_input);
    54275419
    54285420        /*Check wether enthalpy is activated*/
     
    54305422        if(!isenthalpy) return;       
    54315423
     5424        GetInputListOnVertices(&enthalpy[0],EnthalpyEnum);
     5425        GetInputListOnVertices(&pressure[0],PressureEnum);
    54325426        this->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
    54335427        latentheat=matpar->GetLatentHeat();
    54345428
    5435         gauss=new GaussPenta();
    54365429        for(int iv=0;iv<NUMVERTICES;iv++){
    5437                 gauss->GaussVertex(iv);
    5438                 enthalpy_input->GetInputValue(&enthalpy[iv], gauss);
    5439                 pressure_input->GetInputValue(&pressure[iv], gauss);
    54405430                matpar->EnthalpyToThermal(&temperature[iv],&waterfraction[iv], enthalpy[iv],pressure[iv]);
    54415431
Note: See TracChangeset for help on using the changeset viewer.