Ice Sheet System Model  4.18
Code documentation
Data Structures | Functions
Massconaxpby.h File Reference

: header file for Massconaxpby object More...

#include "./Definition.h"
#include "../datastructures/datastructures.h"
#include "./Elements/Element.h"
#include "./Elements/Elements.h"
#include "./FemModel.h"
#include "../classes/Params/Parameters.h"

Go to the source code of this file.

Data Structures

class  Massconaxpby
 

Functions

IssmDouble OutputDefinitionsResponsex (FemModel *femmodel, const char *output_string)
 

Detailed Description

: header file for Massconaxpby object

Definition in file Massconaxpby.h.

Function Documentation

◆ OutputDefinitionsResponsex()

IssmDouble OutputDefinitionsResponsex ( FemModel femmodel,
const char *  output_string 
)

Definition at line 10 of file OutputDefinitionsResponsex.cpp.

10  {
11 
12  /*Ok, go find the output definitions dataset in the parameters, where our responses are hiding: */
14 
15  /*Now, go through the output definitions, and retrieve the object which corresponds to our requested response, output_string: */
16  for(int i=0;i<output_definitions->Size();i++){
17  Definition* definition=dynamic_cast<Definition*>(output_definitions->GetObjectByOffset(i));
18 
19  char* name = definition->Name();
20  if(strcmp(name,output_string)==0){
21 
22  /*This is the object that we have been chasing for. compute the response and return: */
23  IssmDouble return_value=definition->Response(femmodel);
24 
25  /*cleanup: */
26  xDelete<char>(name);
27 
28  /*return:*/
29  return return_value;
30  }
31  xDelete<char>(name);
32  }
33 
34  /*If we are here, did not find the definition for this response, not good!: */
35  _error_("Could not find the response for output definition " << output_string << " because could not find the definition itself!");
36 }
DataSet::Size
int Size()
Definition: DataSet.cpp:399
Definition::Response
virtual IssmDouble Response(FemModel *)=0
Definition::Name
virtual char * Name()=0
IssmDouble
double IssmDouble
Definition: types.h:37
FemModel::parameters
Parameters * parameters
Definition: FemModel.h:46
OutputdefinitionEnum
@ OutputdefinitionEnum
Definition: EnumDefinitions.h:285
Definition
Definition: Definition.h:10
DataSetParam
Definition: DataSetParam.h:20
_error_
#define _error_(StreamArgs)
Definition: exceptions.h:49
DataSet::GetObjectByOffset
Object * GetObjectByOffset(int offset)
Definition: DataSet.cpp:334
Parameters::FindParamObject
Param * FindParamObject(int enum_type)
Definition: Parameters.cpp:588
DataSet
Declaration of DataSet class.
Definition: DataSet.h:14
femmodel
FemModel * femmodel
Definition: esmfbinders.cpp:16