Ignore:
Timestamp:
10/01/15 10:45:44 (10 years ago)
Author:
Eric.Larour
Message:

CHG: applying patches for the AD mode to compile.

File:
1 edited

Legend:

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

    r19594 r19613  
    23752375                /*Calculate total system mass:*/
    23762376        sumMass=0; for(int i=0;i<m;i++) sumMass += dz[i]*d[i];
     2377
     2378        #ifndef _HAVE_ADOLC_ //we want to avoid the round operation at all cost. Not differentiable.
    23772379        dMass = sumMass + sumR + sumW - sumP - sumEC - initMass - sumMassAdd;
    2378         dMass = round(dMass * 100.0)/100.0;
     2380                dMass = round(dMass * 100.0)/100.0;
    23792381
    23802382                /*Check mass conservation:*/
    23812383        if (dMass != 0.0) _printf_("total system mass not conserved in MB function");
     2384                #endif
    23822385               
    23832386                /*Check bottom grid cell T is unchanged:*/
    23842387        if (T[m-1]!=T_bottom) _printf_("T(end)~=T_bottom" << "\n");
    23852388               
     2389                /*Free ressources: */
     2390                xDelete<IssmDouble>(swf);
     2391
     2392                /*increase counter:*/
    23862393                count++;
    23872394
     
    23992406        this->AddInput(new DoubleArrayInput(SmbWEnum,W,m));
    24002407        this->AddInput(new DoubleArrayInput(SmbAEnum,a,m));
    2401         this->AddInput(new DoubleArrayInput(SmbSwfEnum,swf,m));
    24022408        this->AddInput(new DoubleInput(SmbMassBalanceEnum,(sumP + sumEC -sumR)/rho_water/dt));
    24032409        this->AddInput(new DoubleInput(SmbRunoffEnum,sumR/rho_water/dt));
     
    24162422        xDelete<IssmDouble>(a);
    24172423        xDelete<IssmDouble>(T);
    2418         xDelete<IssmDouble>(swf);
    24192424        delete gauss;
    24202425        /*}}}*/
Note: See TracChangeset for help on using the changeset viewer.