Changeset 12272


Ignore:
Timestamp:
05/21/12 14:35:31 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed BIG error in prognostic: melting rate correction was never defined

Location:
issm/trunk-jpl/src/c/objects
Files:
3 edited

Legend:

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

    r12014 r12272  
    629629                basal_melting_input->GetInputValue(&basal_melting_g,gauss);
    630630                thickness_input->GetInputValue(&thickness_g,gauss);
    631                 if(basal_melting_correction_input) basal_melting_correction_input->GetInputValue(&basal_melting_correction_g,gauss);
     631                if(basal_melting_correction_input)
     632                 basal_melting_correction_input->GetInputValue(&basal_melting_correction_g,gauss);
     633                else
     634                 basal_melting_correction_g=0.;
    632635
    633636                for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(thickness_g+dt*(surface_mass_balance_g-basal_melting_g-basal_melting_correction_g))*L[i];
  • issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp

    r11734 r12272  
    166166        double* localvalues=NULL;
    167167
     168        /*In debugging mode, check consistency (no NaN, and values not too big)*/
     169        this->CheckConsistency();
     170
    168171        if(this->fsize){
    169172                /*first, retrieve values that are in the f-set from the g-set values vector: */
     
    200203        }
    201204
     205}
     206/*}}}*/
     207/*FUNCTION ElementVector::CheckConsistency{{{1*/
     208void ElementVector::CheckConsistency(void){
     209        /*Check element matrix values, only in debugging mode*/
     210#ifdef _ISSM_DEBUG_
     211        for (int i=0;i<this->nrows;i++){
     212                if (isnan(this->values[i])) _error_("NaN found in Element Vector");
     213                if (fabs( this->values[i])>1.e+50) _error_("Element Vector values exceeds 1.e+50");
     214        }
     215#endif
    202216}
    203217/*}}}*/
  • issm/trunk-jpl/src/c/objects/Numerics/ElementVector.h

    r11679 r12272  
    4343                void InsertIntoGlobal(Vector* pf);
    4444                void Echo(void);
     45                void CheckConsistency(void);
    4546                void Init(ElementVector* pe);
    4647                void SetValue(double scalar);
Note: See TracChangeset for help on using the changeset viewer.