source: issm/trunk-jpl/src/c/classes/objects/ElementResults/DoubleElementResult.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: 1.5 KB
Line 
1/*! \file DoubleElementResult.h
2 * \brief: header file for IssmDouble result object
3 * A IssmDouble result object is just derived from a DoubleInput object, with additional time and step information.
4 */
5
6
7#ifndef _DOUBLEELEMENTRESULT_H_
8#define _DOUBLEELEMENTRESULT_H_
9
10/*Headers:*/
11/*{{{*/
12#include "../Inputs/Input.h"
13#include "../../../include/include.h"
14class Parameters;
15/*}}}*/
16
17class DoubleElementResult: public ElementResult{
18
19 private:
20 int enum_type;
21 IssmDouble value;
22 int step;
23 IssmDouble time;
24
25 public:
26
27 /*DoubleElementResult constructors, destructors: {{{*/
28 DoubleElementResult();
29 DoubleElementResult(int enum_type,IssmDouble value,int step,IssmDouble time);
30 ~DoubleElementResult();
31 /*}}}*/
32 /*Object virtual functions definitions:{{{ */
33 void Echo();
34 void DeepEcho();
35 int Id();
36 int MyRank();
37 int ObjectEnum();
38 Object* copy();
39 /*}}}*/
40 /*ElementResult virtual functions definitions: {{{*/
41 ElementResult* SpawnTriaElementResult(int* indices);
42 IssmDouble GetTime(void){return time;};
43 int GetStep(void){return step;};
44 void ProcessUnits(Parameters* parameters);
45 int NumberOfNodalValues(void);
46 void PatchFill(int row, Patch* patch);
47 /*}}}*/
48 /*DoubleElementResult management: {{{*/
49 int InstanceEnum();
50 void GetVectorFromResults(Vector<IssmDouble>* vector,int* doflist,int* connectivitylist,int numdofs);
51 void GetElementVectorFromResults(Vector<IssmDouble>* vector,int dof);
52 /*}}}*/
53};
54#endif /* _DOUBLEELEMENTRESULT_H */
Note: See TracBrowser for help on using the repository browser.