Changeset 5885


Ignore:
Timestamp:
09/18/10 13:14:56 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added CheckConsitency method, used only in debugging mode

Location:
issm/trunk/src/c/objects/Numerics
Files:
2 edited

Legend:

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

    r5873 r5885  
    360360}
    361361/*}}}*/
     362/*FUNCTION ElementMatrix::CheckConsistency{{{1*/
     363void ElementMatrix::CheckConsistency(void){
     364        /*Check element matrix values, only in debugging mode*/
     365        #ifdef _ISSM_DEBUG_
     366        for (int i=0;i<this->nrows;i++){
     367                for(int j=0;j<this->ncols;j++){
     368                        if (isnan(this->values[i*this->ncols+j])) ISSMERROR("NaN found in Element Matrix");
     369                        if (fabs(this->values[i*this->ncols+j])>1.e+50) ISSMERROR("Element Matrix values exceeds 1.e+50");
     370                }
     371        }
     372        #endif
     373}
     374/*}}}*/
    362375/*FUNCTION ElementMatrix::Echo{{{1*/
    363376void ElementMatrix::Echo(void){
  • issm/trunk/src/c/objects/Numerics/ElementMatrix.h

    r5873 r5885  
    6060                void AddToGlobal(Mat Kgg, Mat Kff, Mat Kfs);
    6161                void Echo(void);
     62                void CheckConsistency(void);
    6263                void Init(ElementMatrix* Ke);
    6364                /*}}}*/
    6465};
    6566#endif //#ifndef _ELEMENT_MATRIX_H_
    66 
Note: See TracChangeset for help on using the changeset viewer.