Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Private Attributes
IntInput2 Class Reference

#include <IntInput2.h>

Inheritance diagram for IntInput2:
Input2 Object

Public Member Functions

 IntInput2 ()
 
 IntInput2 (int size_in)
 
 ~IntInput2 ()
 
Input2copy ()
 
void DeepEcho ()
 
void Echo ()
 
int Id ()
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
int ObjectEnum ()
 
void GetInput (int *pvalue, int index)
 
void SetInput (int index, int value)
 
- Public Member Functions inherited from Input2
int InstanceEnum ()
 
void ChangeEnum (int newenumtype)
 
virtual ~Input2 ()
 
virtual void Configure (Parameters *parameters)
 
virtual void GetInputAverage (IssmDouble *pvalue)
 
virtual IssmDouble GetInputMax (void)
 
virtual IssmDouble GetInputMaxAbs (void)
 
virtual IssmDouble GetInputMin (void)
 
virtual void GetInputDerivativeValue (IssmDouble *derivativevalues, IssmDouble *xyz_list, Gauss *gauss)
 
virtual void GetInputValue (IssmDouble *pvalue, Gauss *gauss)
 
virtual int GetInputInterpolationType ()
 
virtual SegInput2GetSegInput ()
 
virtual TriaInput2GetTriaInput ()
 
virtual PentaInput2GetPentaInput ()
 
virtual void AXPY (Input2 *xinput, IssmDouble scalar)
 
virtual void PointWiseMult (Input2 *xinput)
 
virtual void Pow (IssmDouble scale_factor)
 
virtual void Scale (IssmDouble scale_factor)
 
virtual int GetResultArraySize (void)
 
virtual int GetResultInterpolation (void)
 
virtual int GetResultNumberOfNodes (void)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 

Private Attributes

int size
 
int * values
 

Detailed Description

Definition at line 7 of file IntInput2.h.

Constructor & Destructor Documentation

◆ IntInput2() [1/2]

IntInput2::IntInput2 ( )

Definition at line 16 of file IntInput2.cpp.

16  {/*{{{*/
17  this->size = -1;
18  this->values = NULL;
19 }

◆ IntInput2() [2/2]

IntInput2::IntInput2 ( int  size_in)

Definition at line 21 of file IntInput2.cpp.

21  {/*{{{*/
22  _assert_(size_in>0);
23  _assert_(size_in<1e11);
24  this->size = size_in;
25  this->values = xNew<int>(size_in);
26 }

◆ ~IntInput2()

IntInput2::~IntInput2 ( )

Definition at line 28 of file IntInput2.cpp.

28  {/*{{{*/
29  xDelete<int>(this->values);
30 }

Member Function Documentation

◆ copy()

Input2 * IntInput2::copy ( void  )
virtual

Implements Input2.

Definition at line 34 of file IntInput2.cpp.

34  {/*{{{*/
35 
36  IntInput2* output = new IntInput2(this->size);
37  xMemCpy<int>(output->values,this->values,this->size);
38 
39  return output;
40 }

◆ DeepEcho()

void IntInput2::DeepEcho ( void  )
virtual

Implements Object.

Definition at line 42 of file IntInput2.cpp.

42  {/*{{{*/
43 
44  _printf_("IntInput2 Echo:\n");
45  _printf_(" Size: "<<size<<"\n");
46  printarray(this->values,this->size);
47  //_printf_(setw(15)<<" IntInput2 "<<setw(25)<<left<<EnumToStringx(this->enum_type)<<" "<<(value?"true":"false") << "\n");
48 }

◆ Echo()

void IntInput2::Echo ( void  )
virtual

Implements Object.

Definition at line 50 of file IntInput2.cpp.

50  {/*{{{*/
51  this->DeepEcho();
52 }

◆ Id()

int IntInput2::Id ( void  )
virtual

Implements Object.

Definition at line 54 of file IntInput2.cpp.

54 { return -1; }/*{{{*/

◆ Marshall()

void IntInput2::Marshall ( char **  pmarshalled_data,
int *  pmarshalled_data_size,
int  marshall_direction 
)
virtual

Implements Object.

Definition at line 56 of file IntInput2.cpp.

56  { /*{{{*/
57 
59 
60  MARSHALLING(this->size);
61  if(this->size > 0){
62  MARSHALLING_DYNAMIC(this->values,int,this->size)
63  }
64  else this->values = NULL;
65 
66 }

◆ ObjectEnum()

int IntInput2::ObjectEnum ( void  )
virtual

Implements Object.

Definition at line 68 of file IntInput2.cpp.

68  {/*{{{*/
69 
70  return IntInput2Enum;
71 
72 }

◆ GetInput()

void IntInput2::GetInput ( int *  pvalue,
int  index 
)

Definition at line 76 of file IntInput2.cpp.

76  {/*{{{*/
77 
78  _assert_(index>=0);
79  _assert_(index<this->size);
80 
81  *pvalue = this->values[index];
82 }

◆ SetInput()

void IntInput2::SetInput ( int  index,
int  value 
)

Definition at line 84 of file IntInput2.cpp.

84  {/*{{{*/
85 
86  _assert_(index>=0);
87  _assert_(index<this->size);
88 
89  this->values[index] = value;
90 }

Field Documentation

◆ size

int IntInput2::size
private

Definition at line 10 of file IntInput2.h.

◆ values

int* IntInput2::values
private

Definition at line 11 of file IntInput2.h.


The documentation for this class was generated from the following files:
_assert_
#define _assert_(ignore)
Definition: exceptions.h:37
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
MARSHALLING_ENUM
#define MARSHALLING_ENUM(EN)
Definition: Marshalling.h:14
IntInput2::values
int * values
Definition: IntInput2.h:11
IntInput2::DeepEcho
void DeepEcho()
Definition: IntInput2.cpp:42
MARSHALLING_DYNAMIC
#define MARSHALLING_DYNAMIC(FIELD, TYPE, SIZE)
Definition: Marshalling.h:61
MARSHALLING
#define MARSHALLING(FIELD)
Definition: Marshalling.h:29
IntInput2::IntInput2
IntInput2()
Definition: IntInput2.cpp:16
printarray
void printarray(IssmPDouble *array, int lines, int cols=1)
Definition: PrintArrays.cpp:6
IntInput2::size
int size
Definition: IntInput2.h:10
IntInput2
Definition: IntInput2.h:7
IntInput2Enum
@ IntInput2Enum
Definition: EnumDefinitions.h:996