source: issm/trunk-jpl/src/c/classes/objects/Inputs/IntInput.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: 4.0 KB
Line 
1/*! \file IntInput.h
2 * \brief: header file for triavertexinput object
3 */
4
5
6#ifndef _INTINPUT_H_
7#define _INTINPUT_H_
8
9/*Headers:*/
10/*{{{*/
11#include "./Input.h"
12#include "../../../include/include.h"
13class GaussTria;
14/*}}}*/
15
16class IntInput: public Input{
17
18 public:
19 /*just hold 3 values for 3 vertices: */
20 int enum_type;
21 IssmInt value;
22
23 /*IntInput constructors, destructors: {{{*/
24 IntInput();
25 IntInput(int enum_type,IssmInt value);
26 ~IntInput();
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 /*IntInput management: {{{*/
37 int InstanceEnum();
38 Input* SpawnTriaInput(int* indices);
39 Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
40 Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
41 Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
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);
48 void GetInputValue(int* pvalue);
49 void GetInputValue(IssmDouble* pvalue);
50 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
51 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
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);
58 void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
59 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
60 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
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 void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
68 void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
69 void Scale(IssmDouble scale_factor);
70 void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
71 void AXPY(Input* xinput,IssmDouble scalar);
72 void Constrain(IssmDouble cm_min, IssmDouble cm_max);
73 IssmDouble InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
74 IssmDouble Max(void){_error_("Max not implemented for integers");};
75 IssmDouble MaxAbs(void){_error_("Max not implemented for integers");};
76 IssmDouble Min(void){_error_("Min not implemented for integers");};
77 IssmDouble MinAbs(void){_error_("Min not implemented for integers");};
78 void Extrude(void){_error_("not supported yet");};
79 void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
80 void GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist);
81 void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
82 /*}}}*/
83
84};
85#endif /* _INTINPUT_H */
Note: See TracBrowser for help on using the repository browser.