Ice Sheet System Model  4.18
Code documentation
MatrixParam.h
Go to the documentation of this file.
1 
5 #ifndef _MATRIXPARAM_H_
6 #define _MATRIXPARAM_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 MatrixParam: public Param{
21 
22  private:
23  /*just hold 3 values for 3 vertices: */
24  int enum_type;
26 
27  public:
28  /*MatrixParam constructors, destructors: {{{*/
29  MatrixParam();
31  ~MatrixParam();
32  /*}}}*/
33  /*Object virtual functions definitions:{{{ */
34  Param* copy();
35  void DeepEcho();
36  void Echo();
37  int Id();
38  void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ _error_("not implemented yet!"); };
39  int ObjectEnum();
40  /*}}}*/
41  /*Param vritual function definitions: {{{*/
42  void GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
43  void GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
44  void GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
45  void GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
46  void GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
47  void GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
48  void GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
49  void GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
50  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
51  void GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
52  void GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
53  void GetParameterValue(Vector<IssmDouble>** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a vec");}
54  void GetParameterValue(Matrix<IssmDouble>** poutput);
55  void GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
56  void GetParameterValue(DataSet** pdataset){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a DataSet");}
57  int InstanceEnum(){return enum_type;}
58 
59  void SetEnum(int enum_in){this->enum_type = enum_in;};
60  void SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
61  void SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
62  void SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
63  void SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
64  void SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
65  void SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
66  void SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
67  void SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
68  void SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
69  void SetValue(Vector<IssmDouble>* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
70  void SetValue(Matrix<IssmDouble>* mat);
71  void SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
72  void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
73  /*}}}*/
74 };
75 #endif /* _MATRIXPARAM_H */
Matrix< IssmDouble >
MatrixParam::Echo
void Echo()
Definition: MatrixParam.cpp:51
MatrixParam::copy
Param * copy()
Definition: MatrixParam.cpp:38
MatrixParam::GetParameterValue
void GetParameterValue(char **pstring)
Definition: MatrixParam.h:48
MatrixParam::SetValue
void SetValue(int *pintarray, int M, int N)
Definition: MatrixParam.h:68
IssmDouble
double IssmDouble
Definition: types.h:37
Param
Definition: Param.h:21
MatrixParam::Marshall
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
Definition: MatrixParam.h:38
MatrixParam::GetParameterValue
void GetParameterValue(IssmDouble ***parray, int *pM, int **pmdims, int **pndims)
Definition: MatrixParam.h:52
MatrixParam::SetValue
void SetValue(FILE *fid)
Definition: MatrixParam.h:71
MatrixParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM, int *pN)
Definition: MatrixParam.h:45
MatrixParam::DeepEcho
void DeepEcho()
Definition: MatrixParam.cpp:44
MatrixParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM, int *pN)
Definition: MatrixParam.h:51
MatrixParam::InstanceEnum
int InstanceEnum()
Definition: MatrixParam.h:57
MatrixParam::SetValue
void SetValue(IssmDouble *pIssmDoublearray, int M, int N)
Definition: MatrixParam.h:66
MatrixParam::GetParameterValue
void GetParameterValue(IssmDouble *pIssmDouble)
Definition: MatrixParam.h:46
MatrixParam::SetValue
void SetValue(char *string)
Definition: MatrixParam.h:63
MatrixParam::enum_type
int enum_type
Definition: MatrixParam.h:24
MatrixParam::GetParameterValue
void GetParameterValue(int **pintarray, int *pM)
Definition: MatrixParam.h:44
MatrixParam::GetParameterValue
void GetParameterValue(Vector< IssmDouble > **pvec)
Definition: MatrixParam.h:53
MatrixParam::Id
int Id()
Definition: MatrixParam.cpp:58
MatrixParam::value
Matrix< IssmDouble > * value
Definition: MatrixParam.h:25
MatrixParam::GetParameterValue
void GetParameterValue(char ***pstringarray, int *pM)
Definition: MatrixParam.h:49
MatrixParam::SetValue
void SetValue(IssmDouble scalar)
Definition: MatrixParam.h:62
MatrixParam::SetValue
void SetValue(int *intarray, int M)
Definition: MatrixParam.h:67
MatrixParam::ObjectEnum
int ObjectEnum()
Definition: MatrixParam.cpp:60
EnumToStringx
const char * EnumToStringx(int enum_in)
Definition: EnumToStringx.cpp:15
Param.h
abstract class for Param object
MatrixParam::GetParameterValue
void GetParameterValue(DataSet **pdataset)
Definition: MatrixParam.h:56
MatrixParam::GetParameterValue
void GetParameterValue(FILE **pfid)
Definition: MatrixParam.h:55
MatrixParam::GetParameterValue
void GetParameterValue(IssmDouble **pIssmDoublearray, int *pM)
Definition: MatrixParam.h:50
MatrixParam::GetParameterValue
void GetParameterValue(IssmDouble *pdouble, IssmDouble time)
Definition: MatrixParam.h:47
MatrixParam::SetEnum
void SetEnum(int enum_in)
Definition: MatrixParam.h:59
MatrixParam::SetValue
void SetValue(IssmDouble **array, int M, int *mdim_array, int *ndim_array)
Definition: MatrixParam.h:72
MatrixParam::SetValue
void SetValue(bool boolean)
Definition: MatrixParam.h:60
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
MatrixParam
Definition: MatrixParam.h:20
MatrixParam::SetValue
void SetValue(int integer)
Definition: MatrixParam.h:61
MatrixParam::~MatrixParam
~MatrixParam()
Definition: MatrixParam.cpp:32
MatrixParam::SetValue
void SetValue(Vector< IssmDouble > *vec)
Definition: MatrixParam.h:69
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
MatrixParam::SetValue
void SetValue(IssmDouble *IssmDoublearray, int M)
Definition: MatrixParam.h:65
MatrixParam::MatrixParam
MatrixParam()
Definition: MatrixParam.cpp:18
Vector< IssmDouble >
MatrixParam::GetParameterValue
void GetParameterValue(int *pinteger)
Definition: MatrixParam.h:43
MatrixParam::SetValue
void SetValue(char **stringarray, int M)
Definition: MatrixParam.h:64
MatrixParam::GetParameterValue
void GetParameterValue(bool *pbool)
Definition: MatrixParam.h:42