Changeset 3842


Ignore:
Timestamp:
05/19/10 11:13:07 (15 years ago)
Author:
seroussi
Message:

better error message n parameters

Location:
issm/trunk/src/c/objects/Params
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Params/BoolParam.h

    r3834 r3842  
    6363                int   EnumType(){return enum_type;}
    6464                void  GetParameterValue(bool* pbool){*pbool=value;}
    65                 void  GetParameterValue(int* pinteger){ISSMERROR("Bool param cannot return an integer");}
    66                 void  GetParameterValue(double* pdouble){ISSMERROR("Bool param cannot return a double");}
    67                 void  GetParameterValue(char** pstring){ISSMERROR("Bool param cannot return a string");}
    68                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Bool param cannot return a string arrayl");}
    69                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Bool param cannot return a double array");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Bool param cannot return a double array");}
    71                 void  GetParameterValue(Vec* pvec){ISSMERROR("Bool param cannot return a Vec");}
    72                 void  GetParameterValue(Mat* pmat){ISSMERROR("Bool param cannot return a Mat");}
     65                void  GetParameterValue(int* pinteger){ISSMERROR("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(double* pdouble){ISSMERROR("Bool param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     67                void  GetParameterValue(char** pstring){ISSMERROR("Bool param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Bool param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(Vec* pvec){ISSMERROR("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Mat* pmat){ISSMERROR("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7373                char* GetParameterName(void);
    7474                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/DoubleMatParam.h

    r3834 r3842  
    6565                /*Param methods: {{{1*/
    6666                int   EnumType(){return enum_type;}
    67                 void  GetParameterValue(bool* pbool){ISSMERROR("DoubleMat param cannot return a bool");}
    68                 void  GetParameterValue(int* pinteger){ISSMERROR("DoubleMat param cannot return an integer");}
    69                 void  GetParameterValue(double* pdouble){ISSMERROR("DoubleMat param cannot return a double");}
    70                 void  GetParameterValue(char** pstring){ISSMERROR("DoubleMat param cannot return a string");}
    71                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleMat param cannot return a string arrayl");}
    72                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("DoubleMat param cannot return a double array");}
     67                void  GetParameterValue(bool* pbool){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(int* pinteger){ISSMERROR("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(double* pdouble){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(char** pstring){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
    7373                void  GetParameterValue(double** pdoublearray,int* pM,int* pN);
    74                 void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleMat param cannot return a Vec");}
    75                 void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param cannot return a Mat");}
     74                void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     75                void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7676                char* GetParameterName(void);
    7777                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/DoubleParam.cpp

    r3834 r3842  
    127127}
    128128/*}}}*/
     129/*FUNCTION DoubleParam::GetParameterValue(int* pinteger) {{{1*/
     130void DoubleParam::GetParameterValue(int* pinteger){
     131#ifdef _SERIAL_
     132
     133        *pinteger=(int)value;
     134#else
     135        ISSMERROR("Double param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));
     136#endif
     137}
     138/*}}}*/
     139
    129140/*FUNCTION DoubleParam::ProcessParams(double* partition,int numberofvertices);{{{1*/
    130141void  DoubleParam::Process(double* partition,int numberofvertices){
  • issm/trunk/src/c/objects/Params/DoubleParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("Double param cannot return a bool");}
    66                 void  GetParameterValue(int* pinteger){ISSMERROR("Double param cannot return an integer");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("Double param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(int* pinteger);
    6767                void  GetParameterValue(double* pdouble){*pdouble=value;}
    68                 void  GetParameterValue(char** pstring){ISSMERROR("Double param cannot return a string");}
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Double param cannot return a string arrayl");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Double param cannot return a double array");}
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Double param cannot return a double array");}
    72                 void  GetParameterValue(Vec* pvec){ISSMERROR("Double param cannot return a Vec");}
    73                 void  GetParameterValue(Mat* pmat){ISSMERROR("Double param cannot return a Mat");}
     68                void  GetParameterValue(char** pstring){ISSMERROR("Double param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Double param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Double param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Double param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Vec* pvec){ISSMERROR("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     73                void  GetParameterValue(Mat* pmat){ISSMERROR("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7474                char* GetParameterName(void);
    7575                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/DoubleVecParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("DoubleVec param cannot return a bool");}
    66                 void  GetParameterValue(int* pinteger){ISSMERROR("DoubleVec param cannot return an integer");}
    67                 void  GetParameterValue(double* pdouble){ISSMERROR("DoubleVec param cannot return a double");}
    68                 void  GetParameterValue(char** pstring){ISSMERROR("DoubleVec param cannot return a string");}
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleVec param cannot return a string arrayl");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(int* pinteger){ISSMERROR("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     67                void  GetParameterValue(double* pdouble){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(char** pstring){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
    7070                void  GetParameterValue(double** pdoublearray,int* pM);
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("DoubleVec param cannot return a double array");}
    72                 void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleVec param cannot return a Vec");}
    73                 void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param cannot return a Mat");}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Vec* pvec){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     73                void  GetParameterValue(Mat* pmat){ISSMERROR("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7474                char* GetParameterName(void);
    7575                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/IntParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("Int param cannot return a bool");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("Int param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
    6666                void  GetParameterValue(int* pinteger){*pinteger=value;}
    67                 void  GetParameterValue(double* pdouble){ISSMERROR("Int param cannot return a double");}
    68                 void  GetParameterValue(char** pstring){ISSMERROR("Int param cannot return a string");}
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Int param cannot return a string arrayl");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Int param cannot return a double array");}
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Int param cannot return a double array");}
    72                 void  GetParameterValue(Vec* pvec){ISSMERROR("Int param cannot return a Vec");}
    73                 void  GetParameterValue(Mat* pmat){ISSMERROR("Int param cannot return a Mat");}
     67                void  GetParameterValue(double* pdouble){ISSMERROR("Int param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(char** pstring){ISSMERROR("Int param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("Int param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("Int param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Vec* pvec){ISSMERROR("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     73                void  GetParameterValue(Mat* pmat){ISSMERROR("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7474                char* GetParameterName(void);
    7575                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/PetscMatParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("PetscMat param cannot return a bool");}
    66                 void  GetParameterValue(int* pinteger){ISSMERROR("PetscMat param cannot return an integer");}
    67                 void  GetParameterValue(double* pdouble){ISSMERROR("PetscMat param cannot return a double");}
    68                 void  GetParameterValue(char** pstring){ISSMERROR("PetscMat param cannot return a string");}
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscMat param cannot return a string arrayl");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscMat param cannot return a double array");}
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscMat param cannot return a double array");}
    72                 void  GetParameterValue(Vec* pvec){ISSMERROR("PetscMat param cannot return a vec");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("PetscMat param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(int* pinteger){ISSMERROR("PetscMat param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     67                void  GetParameterValue(double* pdouble){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(char** pstring){ISSMERROR("PetscMat param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscMat param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscMat param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Vec* pvec){ISSMERROR("PetscMat param of enum %i (%s) cannot return a vec",enum_type,EnumAsString(enum_type));}
    7373                void  GetParameterValue(Mat* poutput);
    7474                char* GetParameterName(void);
  • issm/trunk/src/c/objects/Params/PetscVecParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("PetscVec param cannot return a bool");}
    66                 void  GetParameterValue(int* pinteger){ISSMERROR("PetscVec param cannot return an integer");}
    67                 void  GetParameterValue(double* pdouble){ISSMERROR("PetscVec param cannot return a double");}
    68                 void  GetParameterValue(char** pstring){ISSMERROR("PetscVec param cannot return a string");}
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscVec param cannot return a string arrayl");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscVec param cannot return a double array");}
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscVec param cannot return a double array");}
    72                 void  GetParameterValue(Mat* pmat){ISSMERROR("PetscVec param cannot return a Mat");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("PetscVec param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(int* pinteger){ISSMERROR("PetscVec param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     67                void  GetParameterValue(double* pdouble){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(char** pstring){ISSMERROR("PetscVec param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("PetscVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("PetscVec param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Mat* pmat){ISSMERROR("PetscVec param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7373                void  GetParameterValue(Vec* poutput);
    7474                char* GetParameterName(void);
  • issm/trunk/src/c/objects/Params/StringArrayParam.h

    r3834 r3842  
    6565                /*Param methods: {{{1*/
    6666                int   EnumType(){return enum_type;}
    67                 void  GetParameterValue(bool* pbool){ISSMERROR("StringArray param cannot return a bool");}
    68                 void  GetParameterValue(int* pinteger){ISSMERROR("StringArray param cannot return an integer");}
    69                 void  GetParameterValue(double* pdouble){ISSMERROR("StringArray param cannot return a double");}
    70                 void  GetParameterValue(char** pstring){ISSMERROR("StringArray param cannot return a string");}
     67                void  GetParameterValue(bool* pbool){ISSMERROR("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     68                void  GetParameterValue(int* pinteger){ISSMERROR("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     69                void  GetParameterValue(double* pdouble){ISSMERROR("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(char** pstring){ISSMERROR("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumAsString(enum_type));}
    7171                void  GetParameterValue(char*** pstringarray,int* pM);
    72                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("StringArray param cannot return a double array");}
    73                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("StringArray param cannot return a double array");}
    74                 void  GetParameterValue(Vec* pvec){ISSMERROR("StringArray param cannot return a Vec");}
    75                 void  GetParameterValue(Mat* pmat){ISSMERROR("StringArray param cannot return a Mat");}
     72                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     73                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     74                void  GetParameterValue(Vec* pvec){ISSMERROR("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     75                void  GetParameterValue(Mat* pmat){ISSMERROR("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7676                char* GetParameterName(void);
    7777                void  Process(double* partition,int numberofvertices);
  • issm/trunk/src/c/objects/Params/StringParam.h

    r3834 r3842  
    6363                /*Param methods: {{{1*/
    6464                int   EnumType(){return enum_type;}
    65                 void  GetParameterValue(bool* pbool){ISSMERROR("String param cannot return a bool");}
    66                 void  GetParameterValue(int* pinteger){ISSMERROR("String param cannot return an integer");}
    67                 void  GetParameterValue(double* pdouble){ISSMERROR("String param cannot return a double");}
     65                void  GetParameterValue(bool* pbool){ISSMERROR("String param of enum %i (%s) cannot return a bool",enum_type,EnumAsString(enum_type));}
     66                void  GetParameterValue(int* pinteger){ISSMERROR("String param of enum %i (%s) cannot return an integer",enum_type,EnumAsString(enum_type));}
     67                void  GetParameterValue(double* pdouble){ISSMERROR("String param of enum %i (%s) cannot return a double",enum_type,EnumAsString(enum_type));}
    6868                void  GetParameterValue(char** pstring);
    69                 void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("String param cannot return a string arrayl");}
    70                 void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("String param cannot return a double array");}
    71                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("String param cannot return a double array");}
    72                 void  GetParameterValue(Vec* pvec){ISSMERROR("String param cannot return a Vec");}
    73                 void  GetParameterValue(Mat* pmat){ISSMERROR("String param cannot return a Mat");}
     69                void  GetParameterValue(char*** pstringarray,int* pM){ISSMERROR("String param of enum %i (%s) cannot return a string arrayl",enum_type,EnumAsString(enum_type));}
     70                void  GetParameterValue(double** pdoublearray,int* pM){ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     71                void  GetParameterValue(double** pdoublearray,int* pM, int* pN){ISSMERROR("String param of enum %i (%s) cannot return a double array",enum_type,EnumAsString(enum_type));}
     72                void  GetParameterValue(Vec* pvec){ISSMERROR("String param of enum %i (%s) cannot return a Vec",enum_type,EnumAsString(enum_type));}
     73                void  GetParameterValue(Mat* pmat){ISSMERROR("String param of enum %i (%s) cannot return a Mat",enum_type,EnumAsString(enum_type));}
    7474                char* GetParameterName(void);
    7575                void  Process(double* partition,int numberofvertices);
Note: See TracChangeset for help on using the changeset viewer.