[14996] | 1 | #ifndef _CONTAINER_PARAMETERS_H_
|
---|
| 2 | #define _CONTAINER_PARAMETERS_H_
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 |
|
---|
| 5 | /*forward declarations */
|
---|
[20635] | 6 | class Param;
|
---|
| 7 | class DataSet;
|
---|
[14996] | 8 | template <class doublematrix> class Matrix;
|
---|
| 9 | template <class doubletype> class Vector;
|
---|
[15012] | 10 | #include "../../shared/shared.h"
|
---|
[14996] | 11 |
|
---|
[20635] | 12 | #define NUMPARAMS ParametersENDEnum - ParametersSTARTEnum -1
|
---|
| 13 |
|
---|
[14996] | 14 | /*!\brief Declaration of Parameters class.
|
---|
| 15 | *
|
---|
[20635] | 16 | * Declaration of Parameters class. Parameters are a static array of Parameter objects.
|
---|
[14996] | 17 | */
|
---|
[20635] | 18 | class Parameters{
|
---|
[14996] | 19 |
|
---|
[20635] | 20 | private:
|
---|
| 21 | Param* params[NUMPARAMS];
|
---|
| 22 |
|
---|
[14996] | 23 | public:
|
---|
| 24 |
|
---|
| 25 | /*constructors, destructors*/
|
---|
| 26 | Parameters();
|
---|
| 27 | ~Parameters();
|
---|
| 28 |
|
---|
| 29 | /*numerics*/
|
---|
[20635] | 30 | void AddObject(Param* newparam);
|
---|
| 31 | Parameters* Copy(void);
|
---|
[20827] | 32 | void DeepEcho();
|
---|
| 33 | void Echo();
|
---|
| 34 | bool Exist(int enum_type);
|
---|
[20635] | 35 | void Marshall(char** pmarshalled_data, int* pmarshalled_data_size, int marshall_direction);
|
---|
[14996] | 36 |
|
---|
| 37 | void FindParam(bool* pinteger,int enum_type);
|
---|
| 38 | void FindParam(int* pinteger,int enum_type);
|
---|
| 39 | void FindParam(IssmDouble* pscalar, int enum_type);
|
---|
| 40 | void FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time);
|
---|
| 41 | void FindParam(char** pstring,int enum_type);
|
---|
| 42 | void FindParam(char*** pstringarray,int* pM,int enum_type);
|
---|
| 43 | void FindParam(int** pintarray,int* pM,int enum_type);
|
---|
| 44 | void FindParam(int** pintarray,int* pM,int* PN,int enum_type);
|
---|
| 45 | void FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type);
|
---|
| 46 | void FindParam(IssmDouble** pIssmDoublearray,int* pM,int* pN,int enum_type);
|
---|
| 47 | void FindParam(IssmDouble*** parray,int* pM, int** pmdims_array,int** pndims_array,int enum_type);
|
---|
| 48 | void FindParam(Vector<IssmDouble>** pvec,int enum_type);
|
---|
| 49 | void FindParam(Matrix<IssmDouble>** pmat,int enum_type);
|
---|
| 50 | void FindParam(FILE** pfid,int enum_type);
|
---|
| 51 | void FindParam(DataSet** pdataset, int enum_type);
|
---|
| 52 |
|
---|
| 53 | void SetParam(bool boolean,int enum_type);
|
---|
| 54 | void SetParam(int integer,int enum_type);
|
---|
| 55 | void SetParam(IssmDouble scalar, int enum_type);
|
---|
| 56 | void SetParam(char* string,int enum_type);
|
---|
| 57 | void SetParam(char** stringarray,int M,int enum_type);
|
---|
| 58 | void SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);
|
---|
| 59 | void SetParam(IssmDouble* IssmDoublearray,int M,int N,int enum_type);
|
---|
| 60 | void SetParam(int* intarray,int M,int enum_type);
|
---|
| 61 | void SetParam(int* intarray,int M,int N,int enum_type);
|
---|
| 62 | void SetParam(Vector<IssmDouble>* vec,int enum_type);
|
---|
| 63 | void SetParam(Matrix<IssmDouble>* mat,int enum_type);
|
---|
| 64 | void SetParam(FILE* fid,int enum_type);
|
---|
[16792] | 65 | void SetParam(DataSet* dataset,int enum_type);
|
---|
[14996] | 66 |
|
---|
[20635] | 67 | Param* FindParamObject(int enum_type);
|
---|
[14996] | 68 |
|
---|
| 69 | };
|
---|
| 70 |
|
---|
| 71 | /*Methods relating to parameters: */
|
---|
[20635] | 72 | char *OptionsFromAnalysis(Parameters *parameters,int analysis_type);
|
---|
| 73 | void ToolkitsOptionsFromAnalysis(Parameters* parameters,int analysis_type);
|
---|
[14996] | 74 |
|
---|
| 75 | #endif //ifndef _PARAMETERS_H_
|
---|