Changeset 10584


Ignore:
Timestamp:
11/10/11 15:33:39 (13 years ago)
Author:
schlegel
Message:

Handle passing M,N in to get DoubleVecParam

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Params/DoubleVecParam.cpp

    r9883 r10584  
    162162}
    163163/*}}}*/
     164/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
     165void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
     166        double* output=NULL;
     167        int M;
     168        int N;
     169
     170        N=1;
     171        M=this->M;
     172        output=(double*)xmalloc(M*sizeof(double));
     173        memcpy(output,values,M*sizeof(double));
     174
     175        /*Assign output pointers:*/
     176        if(pM) *pM=M;
     177        if(pN) *pN=N;
     178        *pdoublearray=output;
     179}
     180/*}}}*/
    164181/*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{1*/
    165182void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
  • issm/trunk/src/c/objects/Params/DoubleVecParam.h

    r9883 r10584  
    5555                void  GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
    5656                void  GetParameterValue(int** pintarray,int* pM);
    57                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));};
     57                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));};
    5858                void  GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
    5959                void  GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
    6060                void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string arrayl",enum_type,EnumToStringx(enum_type));}
    6161                void  GetParameterValue(double** pdoublearray,int* pM);
    62                 void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleVec param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
     62                void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
    6363                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));}
    6464                void  GetParameterValue(Vec* pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
Note: See TracChangeset for help on using the changeset viewer.