| [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];
 | 
|---|
| [24152] | 22 |                 int    EnumToIndex(int enum_in);
 | 
|---|
| [20635] | 23 | 
 | 
|---|
| [14996] | 24 |         public:
 | 
|---|
 | 25 | 
 | 
|---|
 | 26 |                 /*constructors, destructors*/ 
 | 
|---|
 | 27 |                 Parameters();
 | 
|---|
 | 28 |                 ~Parameters();
 | 
|---|
 | 29 | 
 | 
|---|
 | 30 |                 /*numerics*/
 | 
|---|
| [20635] | 31 |                 void  AddObject(Param* newparam);
 | 
|---|
 | 32 |                 Parameters* Copy(void);
 | 
|---|
| [20827] | 33 |                 void  DeepEcho();
 | 
|---|
 | 34 |                 void  Echo();
 | 
|---|
| [20943] | 35 |                 void  Delete(int enum_type);
 | 
|---|
| [20827] | 36 |                 bool  Exist(int enum_type);
 | 
|---|
| [25508] | 37 |                 void  Marshall(MarshallHandle* marshallhandle);
 | 
|---|
| [14996] | 38 | 
 | 
|---|
 | 39 |                 void  FindParam(bool* pinteger,int enum_type);
 | 
|---|
 | 40 |                 void  FindParam(int* pinteger,int enum_type);
 | 
|---|
 | 41 |                 void  FindParam(IssmDouble* pscalar, int enum_type);
 | 
|---|
 | 42 |                 void  FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time);
 | 
|---|
| [22628] | 43 |                 void  FindParam(IssmDouble* pscalar, int row,IssmDouble time,int enum_type);
 | 
|---|
| [14996] | 44 |                 void  FindParam(char** pstring,int enum_type);
 | 
|---|
 | 45 |                 void  FindParam(char*** pstringarray,int* pM,int enum_type);
 | 
|---|
 | 46 |                 void  FindParam(int** pintarray,int* pM,int enum_type);
 | 
|---|
 | 47 |                 void  FindParam(int** pintarray,int* pM,int* PN,int enum_type);
 | 
|---|
 | 48 |                 void  FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type);
 | 
|---|
 | 49 |                 void  FindParam(IssmDouble** pIssmDoublearray,int* pM,int* pN,int enum_type);
 | 
|---|
 | 50 |                 void  FindParam(IssmDouble*** parray,int* pM, int** pmdims_array,int** pndims_array,int enum_type);
 | 
|---|
 | 51 |                 void  FindParam(Vector<IssmDouble>** pvec,int enum_type);
 | 
|---|
 | 52 |                 void  FindParam(Matrix<IssmDouble>** pmat,int enum_type);
 | 
|---|
 | 53 |                 void  FindParam(FILE** pfid,int enum_type);
 | 
|---|
 | 54 |                 void  FindParam(DataSet** pdataset, int enum_type);
 | 
|---|
| [23305] | 55 |                 void  FindParamAndMakePassive(IssmPDouble* pscalar, int enum_type);
 | 
|---|
| [23310] | 56 |                 void  FindParamAndMakePassive(IssmPDouble** pvec,int* pM,int enum_type);
 | 
|---|
| [27696] | 57 |                 void  FindControlParam(IssmDouble** pvec,int* pM, int param_enum, const char* data);
 | 
|---|
 | 58 |                 void  FindControlParamAndMakePassive(IssmPDouble** pvec,int* pM, int param_enum, const char* data);
 | 
|---|
| [22617] | 59 |                 void  FindParamInDataset(IssmDouble** pIssmDoublearray,int* pM,int* pN,int dataset_type,int enum_type);
 | 
|---|
| [23644] | 60 |                 IssmDouble FindParam(int enum_type);
 | 
|---|
| [14996] | 61 | 
 | 
|---|
 | 62 |                 void  SetParam(bool boolean,int enum_type);
 | 
|---|
 | 63 |                 void  SetParam(int integer,int enum_type);
 | 
|---|
 | 64 |                 void  SetParam(IssmDouble scalar, int enum_type);
 | 
|---|
 | 65 |                 void  SetParam(char* string,int enum_type);
 | 
|---|
 | 66 |                 void  SetParam(char** stringarray,int M,int enum_type);
 | 
|---|
 | 67 |                 void  SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);
 | 
|---|
 | 68 |                 void  SetParam(IssmDouble* IssmDoublearray,int M,int N,int enum_type);
 | 
|---|
| [27696] | 69 |                 void  SetParam(IssmDouble* IssmDoublearray, int enum_type);
 | 
|---|
| [14996] | 70 |                 void  SetParam(int* intarray,int M,int enum_type);
 | 
|---|
 | 71 |                 void  SetParam(int* intarray,int M,int N,int enum_type);
 | 
|---|
 | 72 |                 void  SetParam(Vector<IssmDouble>* vec,int enum_type);
 | 
|---|
 | 73 |                 void  SetParam(Matrix<IssmDouble>* mat,int enum_type);
 | 
|---|
 | 74 |                 void  SetParam(FILE* fid,int enum_type);
 | 
|---|
| [16792] | 75 |                 void  SetParam(DataSet* dataset,int enum_type);
 | 
|---|
| [27696] | 76 |                 void  SetControlParam(IssmDouble* IssmDoublearray,int M, int enum_type);
 | 
|---|
 | 77 |                 void  ControlParamSetGradient(IssmDouble* IssmDoublearray, int M, int enum_type);
 | 
|---|
| [20635] | 78 |                 Param* FindParamObject(int enum_type);
 | 
|---|
| [14996] | 79 | 
 | 
|---|
 | 80 | };
 | 
|---|
 | 81 | 
 | 
|---|
 | 82 | /*Methods relating to parameters: */
 | 
|---|
| [22559] | 83 | char *OptionsFromAnalysis(char** ptoolkit,Parameters *parameters,int analysis_type);
 | 
|---|
| [20635] | 84 | void  ToolkitsOptionsFromAnalysis(Parameters* parameters,int analysis_type);
 | 
|---|
| [14996] | 85 | 
 | 
|---|
 | 86 | #endif //ifndef _PARAMETERS_H_
 | 
|---|