Ice Sheet System Model  4.18
Code documentation
Public Member Functions | Data Fields
Massconaxpby Class Reference

#include <Massconaxpby.h>

Inheritance diagram for Massconaxpby:
Object Definition

Public Member Functions

 Massconaxpby ()
 
 Massconaxpby (char *in_name, int in_definitionenum, char *in_namex, char *in_namey, IssmDouble in_alpha, IssmDouble in_beta)
 
 ~Massconaxpby ()
 
Objectcopy ()
 
void DeepEcho (void)
 
void Echo (void)
 
int Id (void)
 
void Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
 
int ObjectEnum (void)
 
int DefinitionEnum ()
 
char * Name ()
 
IssmDouble Response (FemModel *femmodel)
 
- Public Member Functions inherited from Object
virtual ~Object ()
 
- Public Member Functions inherited from Definition
virtual ~Definition ()
 

Data Fields

int definitionenum
 
char * name
 
char * namex
 
char * namey
 
IssmDouble alpha
 
IssmDouble beta
 

Detailed Description

Definition at line 18 of file Massconaxpby.h.

Constructor & Destructor Documentation

◆ Massconaxpby() [1/2]

Massconaxpby::Massconaxpby ( )
inline

Definition at line 30 of file Massconaxpby.h.

30  {/*{{{*/
31 
32  this->definitionenum = -1;
33  this->name = NULL;
34  this->namex = NULL;
35  this->namey = NULL;
36  this->alpha=UNDEF;
37  this->beta=UNDEF;
38 
39  }

◆ Massconaxpby() [2/2]

Massconaxpby::Massconaxpby ( char *  in_name,
int  in_definitionenum,
char *  in_namex,
char *  in_namey,
IssmDouble  in_alpha,
IssmDouble  in_beta 
)
inline

Definition at line 41 of file Massconaxpby.h.

41  { /*{{{*/
42 
43  this->definitionenum = in_definitionenum;
44  this->name = xNew<char>(strlen(in_name)+1);
45  xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
46 
47  this->namex = xNew<char>(strlen(in_namex)+1);
48  xMemCpy<char>(this->namex,in_namex,strlen(in_namex)+1);
49 
50  this->namey = xNew<char>(strlen(in_namey)+1);
51  xMemCpy<char>(this->namey,in_namey,strlen(in_namey)+1);
52 
53  this->alpha=in_alpha;
54  this->beta=in_beta;
55 
56  }

◆ ~Massconaxpby()

Massconaxpby::~Massconaxpby ( )
inline

Definition at line 58 of file Massconaxpby.h.

58  {/*{{{*/
59  if(this->name)xDelete(this->name);
60  if(this->namex)xDelete(this->namex);
61  if(this->namey)xDelete(this->namey);
62  }

Member Function Documentation

◆ copy()

Object* Massconaxpby::copy ( void  )
inlinevirtual

Implements Object.

Definition at line 65 of file Massconaxpby.h.

65  {/*{{{*/
66  Massconaxpby* mf = new Massconaxpby(this->name,this->definitionenum,this->namex,this->namey, this->alpha, this->beta);
67  return (Object*) mf;
68  }

◆ DeepEcho()

void Massconaxpby::DeepEcho ( void  )
inlinevirtual

Implements Object.

Definition at line 70 of file Massconaxpby.h.

70  {/*{{{*/
71  this->Echo();
72  }

◆ Echo()

void Massconaxpby::Echo ( void  )
inlinevirtual

Implements Object.

Definition at line 74 of file Massconaxpby.h.

74  {/*{{{*/
75  _printf_(" Massconaxpby: " << this->name << " " << this->definitionenum << "\n");
76  _printf_(" namex: " << this->namex << "\n");
77  _printf_(" namey: " << this->namey << "\n");
78  _printf_(" alpha: " << this->alpha << "\n");
79  _printf_(" beta: " << this->beta << "\n");
80  }

◆ Id()

int Massconaxpby::Id ( void  )
inlinevirtual

Implements Object.

Definition at line 82 of file Massconaxpby.h.

82  {/*{{{*/
83  return -1;
84  }

◆ Marshall()

void Massconaxpby::Marshall ( char **  pmarshalled_data,
int *  pmarshalled_data_size,
int  marshall_direction 
)
inlinevirtual

Implements Object.

Definition at line 86 of file Massconaxpby.h.

86  {/*{{{*/
87  _error_("not implemented yet!");
88  }

◆ ObjectEnum()

int Massconaxpby::ObjectEnum ( void  )
inlinevirtual

Implements Object.

Definition at line 90 of file Massconaxpby.h.

90  {/*{{{*/
91  return MassconaxpbyEnum;
92  }

◆ DefinitionEnum()

int Massconaxpby::DefinitionEnum ( )
inlinevirtual

Implements Definition.

Definition at line 95 of file Massconaxpby.h.

95  {/*{{{*/
96 
97  return this->definitionenum;
98  }

◆ Name()

char* Massconaxpby::Name ( )
inlinevirtual

Implements Definition.

Definition at line 100 of file Massconaxpby.h.

100  {/*{{{*/
101 
102  char* name2=xNew<char>(strlen(this->name)+1);
103  xMemCpy(name2,this->name,strlen(this->name)+1);
104 
105  return name2;
106  }

◆ Response()

IssmDouble Massconaxpby::Response ( FemModel femmodel)
inlinevirtual

Implements Definition.

Definition at line 108 of file Massconaxpby.h.

108  {/*{{{*/
109 
110  IssmDouble xresponse,yresponse;
111 
112  /*Get response from both masscons: */
113  xresponse=OutputDefinitionsResponsex(femmodel,this->namex);
114  yresponse=OutputDefinitionsResponsex(femmodel,this->namey);
115 
116  return this->alpha*xresponse+this->beta*yresponse;
117  }

Field Documentation

◆ definitionenum

int Massconaxpby::definitionenum

Definition at line 22 of file Massconaxpby.h.

◆ name

char* Massconaxpby::name

Definition at line 23 of file Massconaxpby.h.

◆ namex

char* Massconaxpby::namex

Definition at line 24 of file Massconaxpby.h.

◆ namey

char* Massconaxpby::namey

Definition at line 25 of file Massconaxpby.h.

◆ alpha

IssmDouble Massconaxpby::alpha

Definition at line 26 of file Massconaxpby.h.

◆ beta

IssmDouble Massconaxpby::beta

Definition at line 27 of file Massconaxpby.h.


The documentation for this class was generated from the following file:
IssmDouble
double IssmDouble
Definition: types.h:37
_printf_
#define _printf_(StreamArgs)
Definition: Print.h:22
Massconaxpby::Echo
void Echo(void)
Definition: Massconaxpby.h:74
Massconaxpby::definitionenum
int definitionenum
Definition: Massconaxpby.h:22
Object
Definition: Object.h:13
Massconaxpby::beta
IssmDouble beta
Definition: Massconaxpby.h:27
Massconaxpby::namey
char * namey
Definition: Massconaxpby.h:25
xDelete
void xDelete(T **&aT_pp)
Definition: MemOps.h:97
MassconaxpbyEnum
@ MassconaxpbyEnum
Definition: EnumDefinitions.h:1161
Massconaxpby::name
char * name
Definition: Massconaxpby.h:23
UNDEF
#define UNDEF
Definition: constants.h:8
Massconaxpby::alpha
IssmDouble alpha
Definition: Massconaxpby.h:26
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
Massconaxpby::namex
char * namex
Definition: Massconaxpby.h:24
Massconaxpby
Definition: Massconaxpby.h:18
xMemCpy
T * xMemCpy(T *dest, const T *src, unsigned int size)
Definition: MemOps.h:152
Massconaxpby::Massconaxpby
Massconaxpby()
Definition: Massconaxpby.h:30
OutputDefinitionsResponsex
IssmDouble OutputDefinitionsResponsex(FemModel *femmodel, const char *output_string)
Definition: OutputDefinitionsResponsex.cpp:10
femmodel
FemModel * femmodel
Definition: esmfbinders.cpp:16