source: issm/trunk-jpl/src/c/classes/objects/Inputs/TriaP1Input.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: 3.7 KB
Line 
1/*! \file TriaP1Input.h
2 * \brief: header file for TriaP1Input object
3 */
4
5
6#ifndef _TRIAP1INPUT_H_
7#define _TRIAP1INPUT_H_
8
9/*Headers:*/
10/*{{{*/
11#include "./Input.h"
12#include "../Elements/TriaRef.h"
13class GaussTria;
14/*}}}*/
15
16class TriaP1Input: public Input,public TriaRef{
17
18 public:
19 /*just hold 3 values for 3 vertices: */
20 int enum_type;
21 IssmDouble values[3];
22
23 /*TriaP1Input constructors, destructors: {{{*/
24 TriaP1Input();
25 TriaP1Input(int enum_type,IssmDouble* values);
26 ~TriaP1Input();
27 /*}}}*/
28 /*Object virtual functions definitions:{{{ */
29 void Echo();
30 void DeepEcho();
31 int Id();
32 int MyRank();
33 int ObjectEnum();
34 Object* copy();
35 /*}}}*/
36 /*TriaP1Input management: {{{*/
37 int InstanceEnum();
38 Input* SpawnTriaInput(int* indices);
39 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
40 Input* PointwiseMin(Input* inputB);
41 Input* PointwiseMax(Input* inputB);
42 ElementResult* SpawnResult(int step, IssmDouble time);
43 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
44 void Configure(Parameters* parameters);
45 /*}}}*/
46 /*numerics: {{{*/
47 void GetInputValue(bool* pvalue){_error_("not implemented yet");}
48 void GetInputValue(int* pvalue){_error_("not implemented yet");}
49 void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");}
50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
52 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
53 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
54 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
55 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
56 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
57 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
58 void GetInputAverage(IssmDouble* pvalue);
59 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
60 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
61 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
62 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
63 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
64 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
65 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
66 void ChangeEnum(int newenumtype);
67
68 void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
69 void ConstrainMin(IssmDouble minimum);
70 void Scale(IssmDouble scale_factor);
71 void ArtificialNoise(IssmDouble min,IssmDouble max);
72 void AXPY(Input* xinput,IssmDouble scalar);
73 void Constrain(IssmDouble cm_min, IssmDouble cm_max);
74 IssmDouble InfinityNorm(void);
75 IssmDouble Max(void);
76 IssmDouble MaxAbs(void);
77 IssmDouble Min(void);
78 IssmDouble MinAbs(void);
79 void Extrude(void){_error_("not supported yet");};
80 void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
81 void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
82 void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
83 /*}}}*/
84
85};
86#endif /* _TRIAP1INPUT_H */
Note: See TracBrowser for help on using the repository browser.