Ice Sheet System Model  4.18
Code documentation
TransientArrayParam.h
Go to the documentation of this file.
1 
5 #ifndef _TRANSIENTARRAYPARAM_H_
6 #define _TRANSIENTARRAYPARAM_H_
7 
8 /*Headers:*/
9 /*{{{*/
10 #ifdef HAVE_CONFIG_H
11  #include <config.h>
12 #else
13 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
14 #endif
15 
16 #include "./Param.h"
17 #include "../../shared/shared.h"
18 /*}}}*/
19 
20 class TransientArrayParam: public Param{
21 
22  protected:
23  int enum_type;
24  int N;
25  int M;
29 
30  public:
31  /*TransientArrayParam constructors, destructors: {{{*/
33  TransientArrayParam(int in_enum_type,IssmDouble* in_values,IssmDouble* in_time,bool interpolation_on,int in_N,int in_M);
35  /*}}}*/
36  /*Object virtual functions definitions:{{{ */
37  Param* copy();
38  void DeepEcho();
39  void Echo();
40  int Id();
41  void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
42  int ObjectEnum();
43  /*}}}*/
44  /*Param vritual function definitions: {{{*/
45  void GetParameterValue(bool* pbool){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a bool");}
46  void GetParameterValue(int* pinteger){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return an integer");}
47  void GetParameterValue(int** pintarray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return an array of integers");}
48  void GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a array of integers");}
49  void GetParameterValue(IssmDouble* pIssmDouble){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble");}
50  void GetParameterValue(IssmDouble* pdouble,int row,IssmDouble time);
51  void GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Parameter " <<EnumToStringx(enum_type) << " needs row to be specified");}
52  void GetParameterValue(char** pstring){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string");}
53  void GetParameterValue(char*** pstringarray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string array");}
54  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
55  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
56  void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a matrix array");}
57  void GetParameterValue(Vector<IssmDouble>** pvec){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Vec");}
58  void GetParameterValue(Matrix<IssmDouble>** pmat){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Mat");}
59  void GetParameterValue(FILE** pfid){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a FILE");}
60  void GetParameterValue(DataSet** pdataset){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a DataSet");}
61  int InstanceEnum(){return enum_type;}
62 
63  void SetEnum(int enum_in){this->enum_type = enum_in;};
64  void SetValue(bool boolean){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a boolean");}
65  void SetValue(int integer){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an integer");}
66  void SetValue(IssmDouble scalar){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a scalar");}
67  void SetValue(char* string){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string");}
68  void SetValue(char** stringarray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string array");}
69  void SetValue(IssmDouble* IssmDoublearray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
70  void SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
71  void SetValue(int* intarray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int vec array");}
72  void SetValue(int* intarray,int M,int N){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int mat array");};
73  void SetValue(Vector<IssmDouble>* vec){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Vec");}
74  void SetValue(Matrix<IssmDouble>* mat){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Mat");}
75  void SetValue(FILE* fid){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a FILE");}
76  void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an array of matrices");}
77  /*}}}*/
78 };
79 #endif /* _TRANSIENTARRAYPARAM_H */
Matrix< IssmDouble >
TransientArrayParam::SetValue
void SetValue(FILE *fid)
Definition: TransientArrayParam.h:75
TransientArrayParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM, int *pN)
Definition: TransientArrayParam.h:48
TransientArrayParam::GetParameterValue
void GetParameterValue(bool *pbool)
Definition: TransientArrayParam.h:45
IssmDouble
double IssmDouble
Definition: types.h:37
Param
Definition: Param.h:21
TransientArrayParam::interpolation
bool interpolation
Definition: TransientArrayParam.h:26
TransientArrayParam::GetParameterValue
void GetParameterValue(int *pinteger)
Definition: TransientArrayParam.h:46
TransientArrayParam::TransientArrayParam
TransientArrayParam()
Definition: TransientArrayParam.cpp:18
TransientArrayParam::DeepEcho
void DeepEcho()
Definition: TransientArrayParam.cpp:50
TransientArrayParam::SetValue
void SetValue(IssmDouble *IssmDoublearray, int M)
Definition: TransientArrayParam.h:69
TransientArrayParam::GetParameterValue
void GetParameterValue(IssmDouble ***parray, int *pM, int **pmdims, int **pndims)
Definition: TransientArrayParam.h:56
TransientArrayParam::Id
int Id()
Definition: TransientArrayParam.cpp:73
TransientArrayParam
Definition: TransientArrayParam.h:20
TransientArrayParam::SetEnum
void SetEnum(int enum_in)
Definition: TransientArrayParam.h:63
TransientArrayParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM)
Definition: TransientArrayParam.h:47
TransientArrayParam::SetValue
void SetValue(IssmDouble scalar)
Definition: TransientArrayParam.h:66
TransientArrayParam::SetValue
void SetValue(int integer)
Definition: TransientArrayParam.h:65
TransientArrayParam::GetParameterValue
void GetParameterValue(Matrix< IssmDouble > **pmat)
Definition: TransientArrayParam.h:58
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
TransientArrayParam::enum_type
int enum_type
Definition: TransientArrayParam.h:23
TransientArrayParam::GetParameterValue
void GetParameterValue(IssmDouble *pIssmDouble)
Definition: TransientArrayParam.h:49
TransientArrayParam::N
int N
Definition: TransientArrayParam.h:24
Param.h
abstract class for Param object
TransientArrayParam::GetParameterValue
void GetParameterValue(char **pstring)
Definition: TransientArrayParam.h:52
TransientArrayParam::Echo
void Echo()
Definition: TransientArrayParam.cpp:65
TransientArrayParam::values
IssmDouble * values
Definition: TransientArrayParam.h:27
TransientArrayParam::SetValue
void SetValue(char *string)
Definition: TransientArrayParam.h:67
TransientArrayParam::SetValue
void SetValue(int *intarray, int M)
Definition: TransientArrayParam.h:71
TransientArrayParam::SetValue
void SetValue(int *intarray, int M, int N)
Definition: TransientArrayParam.h:72
TransientArrayParam::ObjectEnum
int ObjectEnum()
Definition: TransientArrayParam.cpp:91
TransientArrayParam::GetParameterValue
void GetParameterValue(IssmDouble *pdouble, IssmDouble time)
Definition: TransientArrayParam.h:51
TransientArrayParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM)
Definition: TransientArrayParam.h:54
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
TransientArrayParam::copy
Param * copy()
Definition: TransientArrayParam.cpp:44
TransientArrayParam::SetValue
void SetValue(Matrix< IssmDouble > *mat)
Definition: TransientArrayParam.h:74
TransientArrayParam::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: TransientArrayParam.cpp:75
TransientArrayParam::SetValue
void SetValue(Vector< IssmDouble > *vec)
Definition: TransientArrayParam.h:73
TransientArrayParam::GetParameterValue
void GetParameterValue(FILE **pfid)
Definition: TransientArrayParam.h:59
TransientArrayParam::GetParameterValue
void GetParameterValue(Vector< IssmDouble > **pvec)
Definition: TransientArrayParam.h:57
TransientArrayParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM, int *pN)
Definition: TransientArrayParam.h:55
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
TransientArrayParam::GetParameterValue
void GetParameterValue(DataSet **pdataset)
Definition: TransientArrayParam.h:60
TransientArrayParam::SetValue
void SetValue(char **stringarray, int M)
Definition: TransientArrayParam.h:68
TransientArrayParam::~TransientArrayParam
~TransientArrayParam()
Definition: TransientArrayParam.cpp:38
TransientArrayParam::SetValue
void SetValue(IssmDouble **array, int M, int *mdim_array, int *ndim_array)
Definition: TransientArrayParam.h:76
Vector< IssmDouble >
TransientArrayParam::InstanceEnum
int InstanceEnum()
Definition: TransientArrayParam.h:61
TransientArrayParam::SetValue
void SetValue(bool boolean)
Definition: TransientArrayParam.h:64
TransientArrayParam::SetValue
void SetValue(IssmDouble *IssmDoublearray, int M, int N)
Definition: TransientArrayParam.h:70
TransientArrayParam::timesteps
IssmDouble * timesteps
Definition: TransientArrayParam.h:28
TransientArrayParam::GetParameterValue
void GetParameterValue(char ***pstringarray, int *pM)
Definition: TransientArrayParam.h:53
TransientArrayParam::M
int M
Definition: TransientArrayParam.h:25