Ignore:
Timestamp:
08/31/12 17:23:24 (13 years ago)
Author:
Eric.Larour
Message:

NEW: large change to the code, to adapt to ADOLC requirements.

This change relates to the introduction of template classes and functions for the
Option.h abstract class. This is needed, because we want to make the Matlab
API independent from the libCore objects, which are dependent on the IssmDouble*
ADOLC type (adouble), when the Matlab API is dependent on the IssmPDouble* type (double).

To make them independent, we need to be able to specify at run time Options, Matrix and
Vector objects that hold either IssmDouble or IssmPDouble objects. The only way to do
that is through the use of templated classes for Option.h, Matrix and Vector.

The change gets rid of a lot of useless code (especially in the classes/objects/Options
directory), by introducing template versions of the same code.

The bulk of the changes to src/modules and src/mex modules is to adapt to this
new runtime declaration of templated Matrix, Vector and Option objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/objects/Params/GenericParam.h

    r13186 r13216  
    4747                  _printLine_("   value: " << myP);;
    4848                }
    49                  void  Echo() {DeepEcho();};
     49                void  Echo() {DeepEcho();};
    5050                int   Id(){ return -1; };
    5151                int   MyRank() { extern int my_rank; return my_rank;} ;
     
    7777                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a IssmDouble array");}
    7878                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a matrix array");}
    79                 void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a Vec");}
    80                 void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a Mat");}
     79                void  GetParameterValue(Vector<IssmDouble>** pvec){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a Vec");}
     80                void  GetParameterValue(Matrix<IssmDouble>** pmat){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a Mat");}
    8181                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot return a FILE");}
    8282
     
    9090                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a IssmDouble array");}
    9191                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a IssmDouble array");}
    92                 void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a Vec");}
    93                 void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a Mat");}
     92                void  SetValue(Vector<IssmDouble>* vec){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a Vec");}
     93                void  SetValue(Matrix<IssmDouble>* mat){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a Mat");}
    9494                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold a FILE");}
    9595                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(myEnumVal) << " cannot hold an array of matrices");}
Note: See TracChangeset for help on using the changeset viewer.