Changeset 12474 for issm/trunk-jpl/src


Ignore:
Timestamp:
06/20/12 11:46:45 (13 years ago)
Author:
utke
Message:

type renames + one type bug fixed in DoubleMatArrayParam.cpp:225/226

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

Legend:

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

    r12365 r12474  
    4646                void  GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4747                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    48                 void  GetParameterValue(double* pdouble){_error_("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     48                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Bool param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    4949                void  GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    51                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     51                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5454                void  GetParameterValue(Vector** pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Matrix** pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    5858                void  SetValue(bool boolean){this->value=boolean;}
    5959                void  SetValue(int integer){this->value=(bool)integer;}
    60                 void  SetValue(double scalar){this->value=(bool)scalar;}
     60                void  SetValue(IssmDouble scalar){this->value=(bool)scalar;}
    6161                void  SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    63                 void  SetValue(double* doublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* pdoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     63                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6565                void  SetValue(int* intarray,int M){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* pintarray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6868                void  SetValue(Matrix* mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    6969                void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    70                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     70                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7171                void  UnitConversion(int direction_enum);
    7272               
  • issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp

    r12451 r12474  
    2626}
    2727/*}}}*/
    28 /*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array){{{*/
    29 DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
     28/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/
     29DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
    3030
    3131        int i;
    32         double* matrix=NULL;
     32        IssmDouble* matrix=NULL;
    3333        int     m,n;
    3434
     
    3636        M=in_M;
    3737        if(M){
    38                 array=xNew<double*>(M);
     38                array=xNew<IssmDouble*>(M);
    3939                mdim_array=xNew<int>(M);
    4040                ndim_array=xNew<int>(M);
     
    4848
    4949                        if(m*n){
    50                                 matrix=xNew<double>(m*n);
    51                                 memcpy(matrix,in_array[i],m*n*sizeof(double));
     50                                matrix=xNew<IssmDouble>(m*n);
     51                                xMemCpy<IssmDouble>(matrix,in_array[i],m*n);
    5252                        }
    5353                        else{
     
    6868
    6969        int i;
    70         double* matrix=NULL;
     70        IssmDouble* matrix=NULL;
    7171
    7272        xDelete<int>(mdim_array);
     
    7575        for(i=0;i<M;i++){
    7676                matrix=array[i];
    77                 xDelete<double>(matrix);
    78         }
    79        
    80         xDelete<double*>(array);
     77                xDelete<IssmDouble>(matrix);
     78        }
     79       
     80        xDelete<IssmDouble*>(array);
    8181        return;
    8282}
     
    9999        int i,j,k;
    100100        int m,n;
    101         double* matrix=NULL;
     101        IssmDouble* matrix=NULL;
    102102       
    103103        printf("DoubleMatArrayParam:\n");
     
    143143
    144144/*DoubleMatArrayParam virtual functions definitions: */
    145 /*FUNCTION DoubleMatArrayParam::GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){{{*/
    146 void  DoubleMatArrayParam::GetParameterValue(double*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){
     145/*FUNCTION DoubleMatArrayParam::GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){{{*/
     146void  DoubleMatArrayParam::GetParameterValue(IssmDouble*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){
    147147
    148148        int i,m,n;
    149         double* matrix=NULL;
    150         double* out_matrix=NULL;
     149        IssmDouble* matrix=NULL;
     150        IssmDouble* out_matrix=NULL;
    151151
    152152        /*output: */
    153         double** out_array=NULL;
     153        IssmDouble** out_array=NULL;
    154154        int      out_M;
    155155        int*     out_mdim_array=NULL;
     
    159159        out_M=this->M;
    160160        if(out_M){
    161                 out_array=xNew<double*>(M);
     161                out_array=xNew<IssmDouble*>(M);
    162162                out_mdim_array=xNew<int>(M);
    163163                out_ndim_array=xNew<int>(M);
    164164
    165                 memcpy(out_mdim_array,this->mdim_array,M*sizeof(int));
    166                 memcpy(out_ndim_array,this->ndim_array,M*sizeof(int));
     165                xMemCpy<int>(out_mdim_array,this->mdim_array,M);
     166                xMemCpy<int>(out_ndim_array,this->ndim_array,M);
    167167
    168168                for(i=0;i<this->M;i++){
     
    172172
    173173                        if(m*n){
    174                                 out_matrix=xNew<double>(m*n);
    175                                 memcpy(out_matrix,matrix,m*n*sizeof(double));
     174                                out_matrix=xNew<IssmDouble>(m*n);
     175                                xMemCpy<IssmDouble>(out_matrix,matrix,m*n);
    176176                        }
    177177                        else{
     
    201201}
    202202/*}}}*/
    203 /*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{*/
    204 void  DoubleMatArrayParam::SetValue(double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
     203/*FUNCTION DoubleMatArrayParam::SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/
     204void  DoubleMatArrayParam::SetValue(IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
    205205
    206206        int i,m,n;
    207         double* in_matrix=NULL;
    208         double* matrix=NULL;
     207        IssmDouble* in_matrix=NULL;
     208        IssmDouble* matrix=NULL;
    209209
    210210        /*avoid leak: */
     
    213213        for(i=0;i<M;i++){
    214214                matrix=array[i];
    215                 xDelete<double>(matrix);
    216         }
    217         xDelete<double*>(array);
     215                xDelete<IssmDouble>(matrix);
     216        }
     217        xDelete<IssmDouble*>(array);
    218218
    219219        /*copy data: */
    220220        this->M=in_M;
    221         this->array=xNew<double*>(M);
     221        this->array=xNew<IssmDouble*>(M);
    222222        this->mdim_array=xNew<int>(M);
    223223        this->ndim_array=xNew<int>(M);
    224224       
    225         memcpy(this->mdim_array,in_mdim_array,M*sizeof(double));
    226         memcpy(this->ndim_array,in_ndim_array,M*sizeof(double));
     225        xMemCpy<int>(this->mdim_array,in_mdim_array,M);
     226        xMemCpy<int>(this->ndim_array,in_ndim_array,M);
    227227
    228228        for(i=0;i<M;i++){
     
    231231                n=in_ndim_array[i];
    232232
    233                 matrix=xNew<double>(m*n);
    234                 memcpy(matrix,in_matrix,m*n*sizeof(double));
     233                matrix=xNew<IssmDouble>(m*n);
     234                xMemCpy<IssmDouble>(matrix,in_matrix,m*n);
    235235
    236236                this->array[i]=matrix;
     
    243243        /*go through all matrices and convert: */
    244244        for (int i=0;i<this->M;i++){
    245                 double* matrix=this->array[i];
     245                IssmDouble* matrix=this->array[i];
    246246                int     m=this->mdim_array[i];
    247247                int     n=this->ndim_array[i];
  • issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h

    r12365 r12474  
    2424        private:
    2525                int      enum_type;
    26                 double** array; //array of matrices
     26                IssmDouble** array; //array of matrices
    2727                int      M; //size of array
    2828                int*     mdim_array; //m-dimensions of matrices in the array
     
    3232                /*DoubleMatArrayParam constructors, destructors: {{{*/
    3333                DoubleMatArrayParam();
    34                 DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array);
     34                DoubleMatArrayParam(int enum_type,IssmDouble** array, int M, int* mdim_array, int* ndim_array);
    3535                ~DoubleMatArrayParam();
    3636                /*}}}*/
     
    4949                void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    51                 void  GetParameterValue(double* pdouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     51                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5252                void  GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5353                void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    55                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    56                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims);
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims);
    5757                void  GetParameterValue(Vector** pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5858                void  GetParameterValue(Matrix** pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6161                void  SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    63                 void  SetValue(double scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     63                void  SetValue(IssmDouble scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6464                void  SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6565                void  SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    66                 void  SetValue(double* doublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
    67                 void  SetValue(double* doublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
    6868                void  SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
    6969                void  SetValue(int* intarray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
     
    7171                void  SetValue(Matrix* mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7272                void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    73                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array);
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array);
    7474                void  UnitConversion(int direction_enum);
    7575
  • issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp

    r12452 r12474  
    2727/*}}}*/
    2828/*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{*/
    29 DoubleMatParam::DoubleMatParam(int in_enum_type,double* in_value, int in_M,int in_N){
     29DoubleMatParam::DoubleMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N){
    3030
    3131        enum_type=in_enum_type;
     
    3333        N=in_N;
    3434
    35         value=xNew<double>(M*N);
    36         memcpy(value,in_value,M*N*sizeof(double));
     35        value=xNew<IssmDouble>(M*N);
     36        xMemCpy<IssmDouble>(value,in_value,M*N);
    3737}
    3838/*}}}*/
    3939/*FUNCTION DoubleMatParam::~DoubleMatParam(){{{*/
    4040DoubleMatParam::~DoubleMatParam(){
    41         xDelete<double>(value);
     41        xDelete<IssmDouble>(value);
    4242        return;
    4343}
     
    9494
    9595/*DoubleMatParam virtual functions definitions: */
    96 /*FUNCTION DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
    97 void  DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
    98         double* output=NULL;
     96/*FUNCTION DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
     97void  DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
     98        IssmDouble* output=NULL;
    9999
    100         output=xNew<double>(M*N);
    101         memcpy(output,value,M*N*sizeof(double));
     100        output=xNew<IssmDouble>(M*N);
     101        xMemCpy<IssmDouble>(output,value,M*N);
    102102
    103103        /*Assign output pointers:*/
    104104        if(pM) *pM=M;
    105105        if(pN) *pN=N;
    106         *pdoublearray=output;
     106        *pIssmDoublearray=output;
    107107}
    108108/*}}}*/
     
    118118/*}}}*/
    119119/*FUNCTION DoubleMatParam::SetValue{{{*/
    120 void  DoubleMatParam::SetValue(double* doublearray,int in_M,int in_N){
     120void  DoubleMatParam::SetValue(IssmDouble* IssmDoublearray,int in_M,int in_N){
    121121
    122122        /*avoid leak: */
    123         xDelete<double>(this->value);
     123        xDelete<IssmDouble>(this->value);
    124124
    125         this->value=xNew<double>(in_M*in_N);
    126         memcpy(this->value,doublearray,in_M*in_N*sizeof(double));
     125        this->value=xNew<IssmDouble>(in_M*in_N);
     126        xMemCpy<IssmDouble>(this->value,IssmDoublearray,in_M*in_N);
    127127
    128128        this->M=in_M;
     
    138138/*diverse: */
    139139/*FUNCTION DoubleMatParam::GetPointer{{{*/
    140 double* DoubleMatParam::GetPointer(void){
     140IssmDouble* DoubleMatParam::GetPointer(void){
    141141        return this->value;
    142142}
  • issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h

    r12365 r12474  
    2424        protected:
    2525                int enum_type;
    26                 double* value;
     26                IssmDouble* value;
    2727                int M;
    2828                int N;
     
    4848                void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4949                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    50                 void  GetParameterValue(double* pdouble){_error_("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5252                void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double** pdoublearray,int* pM,int* pN);
    55                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN);
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Vector** pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5757                void  GetParameterValue(Matrix** pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6060                void  SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6161                void  SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    62                 void  SetValue(double scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     62                void  SetValue(IssmDouble scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6464                void  SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* doublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
    66                 void  SetValue(double* doublearray,int M,int N);
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M,int N);
    6767                void  SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
    6868                void  SetValue(int* intarray,int M,int N){_error_("DoubleMat param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
     
    7070                void  SetValue(Matrix* mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7171                void  SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    72                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7373                void  UnitConversion(int direction_enum);
    74                 double* GetPointer(void);
     74                IssmDouble* GetPointer(void);
    7575
    7676                void GetParameterName(char**pname);
  • issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp

    r12365 r12474  
    100100}
    101101/*}}}*/
    102 /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
    103 void DoubleParam::GetParameterValue(double** pdoublearray,int* pM){
    104         _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
     102/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
     103void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
     104        _error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
    105105}
    106106/*}}}*/
    107 /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
    108 void DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
    109         _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
     107/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
     108void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
     109        _error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
    110110}
    111111/*}}}*/
  • issm/trunk-jpl/src/c/objects/Params/DoubleParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM);
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    49                 void  GetParameterValue(double* pdouble){*pdouble=value;}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){*pIssmDouble=value;}
    5050                void  GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM);
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Vector** pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Matrix** pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
    5757                void  GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
    5858
    59                 void  SetValue(bool boolean){this->value=(double)boolean;}
    60                 void  SetValue(int integer){this->value=(double)integer;}
    61                 void  SetValue(double scalar){this->value=(double)scalar;}
     59                void  SetValue(bool boolean){this->value=(IssmDouble)boolean;}
     60                void  SetValue(int integer){this->value=(IssmDouble)integer;}
     61                void  SetValue(IssmDouble scalar){this->value=(IssmDouble)scalar;}
    6262                void  SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* doublearray,int M){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* pdoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* intarray,int M){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6767                void  SetValue(int* pintarray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6969                void  SetValue(Matrix* mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7070                void  SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373
  • issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp

    r12365 r12474  
    2121
    2222/*FUNCTION DoubleTransientMatParam::DoubleTransientMatParam(int enum_type,IssmDoubleMat value){{{*/
    23 DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,double* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){
     23DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){
    2424}
    2525/*}}}*/
  • issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp

    r12452 r12474  
    2727/*}}}*/
    2828/*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec values,int M){{{*/
    29 DoubleVecParam::DoubleVecParam(int in_enum_type,double* in_values, int in_M){
     29DoubleVecParam::DoubleVecParam(int in_enum_type,IssmDouble* in_values, int in_M){
    3030
    3131        enum_type=in_enum_type;
    3232        M=in_M;
    3333
    34         values=xNew<double>(M);
    35         memcpy(values,in_values,M*sizeof(double));
     34        values=xNew<IssmDouble>(M);
     35        xMemCpy<IssmDouble>(values,in_values,M);
    3636}
    3737/*}}}*/
    3838/*FUNCTION DoubleVecParam::~DoubleVecParam(){{{*/
    3939DoubleVecParam::~DoubleVecParam(){
    40         xDelete<double>(values);
     40        xDelete<IssmDouble>(values);
    4141        return;
    4242}
     
    9191
    9292/*DoubleVecParam virtual functions definitions: */
    93 /*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
    94 void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){
    95         double* output=NULL;
     93/*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
     94void  DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
     95        IssmDouble* output=NULL;
    9696        int M;
    9797
    9898        M=this->M;
    99         output=xNew<double>(M);
    100         memcpy(output,values,M*sizeof(double));
     99        output=xNew<IssmDouble>(M);
     100        xMemCpy<IssmDouble>(output,values,M);
    101101
    102102        /*Assign output pointers:*/
    103103        if(pM) *pM=M;
    104         *pdoublearray=output;
     104        *pIssmDoublearray=output;
    105105}
    106106/*}}}*/
    107 /*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
    108 void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
    109         double* output=NULL;
     107/*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
     108void  DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
     109        IssmDouble* output=NULL;
    110110        int M;
    111111        int N;
     
    113113        N=1;
    114114        M=this->M;
    115         output=xNew<double>(M);
    116         memcpy(output,values,M*sizeof(double));
     115        output=xNew<IssmDouble>(M);
     116        xMemCpy<IssmDouble>(output,values,M);
    117117
    118118        /*Assign output pointers:*/
    119119        if(pM) *pM=M;
    120120        if(pN) *pN=N;
    121         *pdoublearray=output;
     121        *pIssmDoublearray=output;
    122122}
    123123/*}}}*/
     
    133133/*}}}*/
    134134/*FUNCTION DoubleVecParam::SetValue{{{*/
    135 void  DoubleVecParam::SetValue(double* doublearray,int in_M){
     135void  DoubleVecParam::SetValue(IssmDouble* IssmDoublearray,int in_M){
    136136
    137137        /*avoid leak: */
    138         xDelete<double>(this->values);
     138        xDelete<IssmDouble>(this->values);
    139139
    140         this->values=xNew<double>(in_M);
    141         memcpy(this->values,doublearray,in_M*sizeof(double));
     140        this->values=xNew<IssmDouble>(in_M);
     141        xMemCpy<IssmDouble>(this->values,IssmDoublearray,in_M);
    142142
    143143        this->M=in_M;
  • issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM);
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));};
    49                 void  GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM);
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Vector** pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Matrix** pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    5959                void  SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6060                void  SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    61                 void  SetValue(double scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     61                void  SetValue(IssmDouble scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* doublearray,int M);
    65                 void  SetValue(double* pdoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M);
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
    6767                void  SetValue(int* pintarray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
     
    6969                void  SetValue(Matrix* mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7070                void  SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373               
  • issm/trunk-jpl/src/c/objects/Params/FileParam.h

    r12365 r12474  
    4343                int   InstanceEnum(){return enum_type;}
    4444                void  GetParameterValue(bool* pbool){  _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
    45                 void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
    46                 void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
    47                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
    48                 void  GetParameterValue(double* pdouble){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     45                void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
     46                void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
     47                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
     48                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    4949                void  GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    51                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     51                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5454                void  GetParameterValue(Vector** pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Matrix** pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    5858                void  SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    5959                void  SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    60                 void  SetValue(double scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
     60                void  SetValue(IssmDouble scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6161                void  SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    63                 void  SetValue(double* doublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* pdoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     63                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6565                void  SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* pintarray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6868                void  SetValue(Matrix* mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    6969                void  SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    70                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     70                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7171                void  UnitConversion(int direction_enum);
    7272
  • issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp

    r12451 r12474  
    3434
    3535        value=xNew<int>(M*N);
    36         memcpy(value,in_value,M*N*sizeof(int));
     36        xMemCpy<int>(value,in_value,M*N);
    3737}
    3838/*}}}*/
     
    9999
    100100        output=xNew<int>(M*N);
    101         memcpy(output,value,M*N*sizeof(int));
     101        xMemCpy<int>(output,value,M*N);
    102102
    103103        /*Assign output pointers:*/
     
    119119
    120120        this->value=xNew<int>(in_M*in_N);
    121         memcpy(this->value,intarray,in_M*in_N*sizeof(int));
     121        xMemCpy<int>(this->value,intarray,in_M*in_N);
    122122
    123123        this->M=in_M;
  • issm/trunk-jpl/src/c/objects/Params/IntMatParam.h

    r12365 r12474  
    4848                void  GetParameterValue(int** pintarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4949                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    50                 void  GetParameterValue(double* pdouble){_error_("IntMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char** pstring){_error_("IntMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5252                void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double** pdoublearray,int* pM,int* pN){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));};
    55                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));};
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Vector** pvec){_error_("IntMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5757                void  GetParameterValue(Matrix** pmat){_error_("IntMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6060                void  SetValue(bool boolean){_error_("IntMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6161                void  SetValue(int integer){_error_("IntMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    62                 void  SetValue(double scalar){_error_("IntMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     62                void  SetValue(IssmDouble scalar){_error_("IntMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char* string){_error_("IntMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6464                void  SetValue(char** stringarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* doublearray,int M){_error_("IntMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
    66                 void  SetValue(double* doublearray,int M,int N){_error_("IntMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));};
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));};
    6767                void  SetValue(int* intarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));};
    6868                void  SetValue(int* intarray,int M,int N);
     
    7070                void  SetValue(Matrix* mat){_error_("IntMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7171                void  SetValue(FILE* fid){_error_("IntMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    72                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/trunk-jpl/src/c/objects/Params/IntParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    49                 void  GetParameterValue(double* pdouble){_error_("Int param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Int param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Vector** pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Matrix** pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6161                void  SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(int* intarray,int M,int N){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
    63                 void  SetValue(double scalar){this->value=(int)scalar;}
     63                void  SetValue(IssmDouble scalar){this->value=(int)scalar;}
    6464                void  SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6565                void  SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    66                 void  SetValue(double* doublearray,int M){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    67                 void  SetValue(double* pdoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     67                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6868                void  SetValue(Vector* vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
    6969                void  SetValue(Matrix* mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7070                void  SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373
  • issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp

    r12451 r12474  
    3434        if(M){
    3535                values=xNew<int>(M);
    36                 memcpy(values,in_values,M*sizeof(int));
     36                xMemCpy<int>(values,in_values,M);
    3737        }
    3838        else values=NULL;
    3939}
    4040/*}}}*/
    41 /*FUNCTION IntVecParam::IntVecParam(int enum_type,double* values,int M){{{*/
    42 IntVecParam::IntVecParam(int in_enum_type,double* in_values, int in_M){
     41/*FUNCTION IntVecParam::IntVecParam(int enum_type,IssmDouble* values,int M){{{*/
     42IntVecParam::IntVecParam(int in_enum_type,IssmDouble* in_values, int in_M){
    4343
    4444        enum_type=in_enum_type;
     
    113113        if(M){
    114114                output=xNew<int>(M);
    115                 memcpy(output,values,M*sizeof(int));
     115                xMemCpy<int>(output,values,M);
    116116        }
    117117
     
    134134        if(in_M){
    135135                this->values=xNew<int>(in_M);
    136                 memcpy(this->values,intarray,in_M*sizeof(int));
     136                xMemCpy<int>(this->values,intarray,in_M);
    137137        }
    138138        else this->values=NULL;
  • issm/trunk-jpl/src/c/objects/Params/IntVecParam.h

    r12365 r12474  
    3131                IntVecParam();
    3232                IntVecParam(int enum_type,int* values,int M);
    33                 IntVecParam(int enum_type,double* values,int M);
     33                IntVecParam(int enum_type,IssmDouble* values,int M);
    3434                ~IntVecParam();
    3535                /*}}}*/
     
    4848                void  GetParameterValue(int** pintarray,int* pM);
    4949                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("IntVec param of enum %i (%s) cannot return a matrix",enum_type,EnumToStringx(enum_type));}
    50                 void  GetParameterValue(double* pdouble){_error_("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5252                void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    55                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array (maybe in serial?)",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Vector** pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5757                void  GetParameterValue(Matrix** pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6060                void  SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6161                void  SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    62                 void  SetValue(double scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     62                void  SetValue(IssmDouble scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6464                void  SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* doublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
    66                 void  SetValue(double* pdoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
    6767                void  SetValue(int* intarray,int M);
    6868                void  SetValue(int* pintarray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
     
    7070                void  SetValue(Matrix* mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7171                void  SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    72                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7373                void  UnitConversion(int direction_enum);
    7474               
  • issm/trunk-jpl/src/c/objects/Params/MatrixParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    49                 void  GetParameterValue(double* pdouble){_error_("Matrix param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char** pstring){_error_("Matrix param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Matrix param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Matrix param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Matrix param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Vector** pvec){_error_("Matrix param of enum %i (%s) cannot return a vec",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Matrix** poutput);
     
    5959                void  SetValue(bool boolean){_error_("Matrix param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6060                void  SetValue(int integer){_error_("Matrix param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    61                 void  SetValue(double scalar){_error_("Matrix param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     61                void  SetValue(IssmDouble scalar){_error_("Matrix param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char* string){_error_("Matrix param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char** stringarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* doublearray,int M){_error_("Matrix param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* pdoublearray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* intarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6767                void  SetValue(int* pintarray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6969                void  SetValue(Matrix* mat);
    7070                void  SetValue(FILE* fid){_error_("Matrix param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Matrix param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Matrix param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373
  • issm/trunk-jpl/src/c/objects/Params/Param.h

    r12365 r12474  
    3131                virtual void  GetParameterValue(int** pintarray,int* pM)=0;
    3232                virtual void  GetParameterValue(int** pintarray,int* pM,int* pN)=0;
    33                 virtual void  GetParameterValue(double* pdouble)=0;
     33                virtual void  GetParameterValue(IssmDouble* pIssmDouble)=0;
    3434                virtual void  GetParameterValue(char** pstring)=0;
    3535                virtual void  GetParameterValue(char*** pstringarray,int* pM)=0;
    36                 virtual void  GetParameterValue(double** pdoublearray,int* pM)=0;
    37                 virtual void  GetParameterValue(double** pdoublearray,int* pM,int* pN)=0;
    38                 virtual void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims)=0;
     36                virtual void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM)=0;
     37                virtual void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN)=0;
     38                virtual void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims)=0;
    3939                virtual void  GetParameterValue(Vector** pvec)=0;
    4040                virtual void  GetParameterValue(Matrix** pmat)=0;
     
    4343                virtual void  SetValue(bool boolean)=0;
    4444                virtual void  SetValue(int integer)=0;
    45                 virtual void  SetValue(double scalar)=0;
     45                virtual void  SetValue(IssmDouble scalar)=0;
    4646                virtual void  SetValue(char* string)=0;
    4747                virtual void  SetValue(char** stringarray,int M)=0;
    48                 virtual void  SetValue(double* doublearray,int M)=0;
    49                 virtual void  SetValue(double* pdoublearray,int M,int N)=0;
     48                virtual void  SetValue(IssmDouble* IssmDoublearray,int M)=0;
     49                virtual void  SetValue(IssmDouble* pIssmDoublearray,int M,int N)=0;
    5050                virtual void  SetValue(int* intarray,int M)=0;
    5151                virtual void  SetValue(int* pintarray,int M,int N)=0;
     
    5353                virtual void  SetValue(Matrix* mat)=0;
    5454                virtual void  SetValue(FILE* fid)=0;
    55                 virtual void  SetValue(double** array, int M, int* mdim_array, int* ndim_array)=0;
     55                virtual void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array)=0;
    5656                virtual void  UnitConversion(int direction_enum)=0;
    5757                virtual void  GetParameterName(char**pname)=0;
  • issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp

    r12451 r12474  
    4141                        size=strlen(in_values[i])+1;
    4242                        string=xNew<char>(size);
    43                         memcpy(string,in_values[i],size*sizeof(char));
     43                        xMemCpy<char>(string,in_values[i],size);
    4444                        value[i]=string;
    4545                }
     
    127127
    128128                        string2=xNew<char>(stringsize);
    129                         memcpy(string2,string,stringsize*sizeof(char));
     129                        xMemCpy<char>(string2,string,stringsize);
    130130
    131131                        outstrings[i]=string2;
     
    167167
    168168                string2=xNew<char>(stringsize);
    169                 memcpy(string2,string,stringsize*sizeof(char));
     169                xMemCpy<char>(string2,string,stringsize);
    170170
    171171                this->value[i]=string2;
  • issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h

    r12365 r12474  
    4949                void  GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    51                 void  GetParameterValue(double* pdouble){_error_("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     51                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5252                void  GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5353                void  GetParameterValue(char*** pstringarray,int* pM);
    54                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    55                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    56                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5757                void  GetParameterValue(Vector** pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5858                void  GetParameterValue(Matrix** pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    6161                void  SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    63                 void  SetValue(double scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     63                void  SetValue(IssmDouble scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6464                void  SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6565                void  SetValue(char** stringarray,int M);
    66                 void  SetValue(double* doublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    67                 void  SetValue(double* pdoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     67                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6868                void  SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6969                void  SetValue(int* pintarray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    7171                void  SetValue(Matrix* mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7272                void  SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    73                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7474                void  UnitConversion(int direction_enum);
    7575
  • issm/trunk-jpl/src/c/objects/Params/StringParam.cpp

    r12451 r12474  
    3131        enum_type=in_enum_type;
    3232        value=xNew<char>(strlen(in_value)+1);
    33         memcpy(value,in_value,(strlen(in_value)+1)*sizeof(char));
     33        xMemCpy<char>(value,in_value,(strlen(in_value)+1));
    3434
    3535       
     
    8989
    9090        outstring=xNew<char>(stringsize);
    91         memcpy(outstring,this->value,stringsize*sizeof(char));
     91        xMemCpy<char>(outstring,this->value,stringsize);
    9292
    9393        *pstring=outstring;
     
    111111        stringsize=strlen(string)+1;
    112112        this->value=xNew<char>(stringsize);
    113         memcpy(this->value,string,stringsize*sizeof(char));
     113        xMemCpy<char>(this->value,string,stringsize);
    114114
    115115}
  • issm/trunk-jpl/src/c/objects/Params/StringParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    49                 void  GetParameterValue(double* pdouble){_error_("String param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("String param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char** pstring);
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Vector** pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Matrix** pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
     
    5959                void  SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6060                void  SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    61                 void  SetValue(double scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     61                void  SetValue(IssmDouble scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char* string);
    6363                void  SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* doublearray,int M){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* pdoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6767                void  SetValue(int* pintarray,int M,int N){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6969                void  SetValue(Matrix* mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7070                void  SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373
  • issm/trunk-jpl/src/c/objects/Params/VectorParam.h

    r12365 r12474  
    4747                void  GetParameterValue(int** pintarray,int* pM){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
    49                 void  GetParameterValue(double* pdouble){_error_("Vector param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Vector param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
    5050                void  GetParameterValue(char** pstring){_error_("Vector param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    5151                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Vector param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
    52                 void  GetParameterValue(double** pdoublearray,int* pM){_error_("Vector param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    53                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Vector param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
    54                 void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vector param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vector param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
    5555                void  GetParameterValue(Matrix** pmat){_error_("Vector param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(Vector** poutput);
     
    5959                void  SetValue(bool boolean){_error_("Vector of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
    6060                void  SetValue(int integer){_error_("Vector of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
    61                 void  SetValue(double scalar){_error_("Vector of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
     61                void  SetValue(IssmDouble scalar){_error_("Vector of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
    6262                void  SetValue(char* string){_error_("Vector of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
    6363                void  SetValue(char** stringarray,int M){_error_("Vector of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
    64                 void  SetValue(double* doublearray,int M){_error_("Vector of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
    65                 void  SetValue(double* pdoublearray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
    6666                void  SetValue(int* intarray,int M){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
    6767                void  SetValue(int* pintarray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
     
    6969                void  SetValue(Matrix* mat){_error_("Vector of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
    7070                void  SetValue(FILE* fid){_error_("Vector of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
    71                 void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Vector param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Vector param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
    7272                void  UnitConversion(int direction_enum);
    7373
Note: See TracChangeset for help on using the changeset viewer.