source: issm/trunk-jpl/src/c/Container/Parameters.h@ 13216

Last change on this file since 13216 was 13216, checked in by Eric.Larour, 13 years ago

NEW: large change to the code, to adapt to ADOLC requirements.

This change relates to the introduction of template classes and functions for the
Option.h abstract class. This is needed, because we want to make the Matlab
API independent from the libCore objects, which are dependent on the IssmDouble*
ADOLC type (adouble), when the Matlab API is dependent on the IssmPDouble* type (double).

To make them independent, we need to be able to specify at run time Options, Matrix and
Vector objects that hold either IssmDouble or IssmPDouble objects. The only way to do
that is through the use of templated classes for Option.h, Matrix and Vector.

The change gets rid of a lot of useless code (especially in the classes/objects/Options
directory), by introducing template versions of the same code.

The bulk of the changes to src/modules and src/mex modules is to adapt to this
new runtime declaration of templated Matrix, Vector and Option objects.

File size: 2.2 KB
Line 
1/*!\file: Parameters.h
2 * \brief prototypes for Parameters.h
3 */
4
5#ifndef _CONTAINER_PARAMETERS_H_
6#define _CONTAINER_PARAMETERS_H_
7#include <stdio.h>
8
9/*forward declarations */
10template <class doublematrix> class Matrix;
11template <class doubletype> class Vector;
12class Materials;
13class Parameters;
14class Elements;
15class Vertices;
16class Loads;
17class Nodes;
18class DataSet;
19class Inputs;
20
21class Parameters: public DataSet{
22
23 public:
24
25 /*constructors, destructors*/
26 Parameters();
27 ~Parameters();
28
29 /*numerics*/
30 bool Exist(int enum_type);
31
32 void FindParam(bool* pinteger,int enum_type);
33 void FindParam(int* pinteger,int enum_type);
34 void FindParam(IssmDouble* pscalar, int enum_type);
35 void FindParam(IssmDouble* pscalar, int enum_type,IssmDouble time);
36 void FindParam(char** pstring,int enum_type);
37 void FindParam(char*** pstringarray,int* pM,int enum_type);
38 void FindParam(int** pintarray,int* pM,int enum_type);
39 void FindParam(int** pintarray,int* pM,int* PN,int enum_type);
40 void FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type);
41 void FindParam(IssmDouble** pIssmDoublearray,int* pM,int* pN,int enum_type);
42 void FindParam(IssmDouble*** parray,int* pM, int** pmdims_array,int** pndims_array,int enum_type);
43 void FindParam(Vector<IssmDouble>** pvec,int enum_type);
44 void FindParam(Matrix<IssmDouble>** pmat,int enum_type);
45 void FindParam(FILE** pfid,int enum_type);
46
47 void SetParam(bool boolean,int enum_type);
48 void SetParam(int integer,int enum_type);
49 void SetParam(IssmDouble scalar, int enum_type);
50 void SetParam(char* string,int enum_type);
51 void SetParam(char** stringarray,int M,int enum_type);
52 void SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);
53 void SetParam(IssmDouble* IssmDoublearray,int M,int N,int enum_type);
54 void SetParam(int* intarray,int M,int enum_type);
55 void SetParam(int* intarray,int M,int N,int enum_type);
56 void SetParam(Vector<IssmDouble>* vec,int enum_type);
57 void SetParam(Matrix<IssmDouble>* mat,int enum_type);
58 void SetParam(FILE* fid,int enum_type);
59 void UnitConversion(int direction_enum);
60
61 Object* FindParamObject(int enum_type);
62
63};
64
65#endif //ifndef _PARAMETERS_H_
Note: See TracBrowser for help on using the repository browser.