Memosa-FVM  0.2
SpeciesModelOptions< T > Struct Template Reference

#include <SpeciesBC.h>

Inheritance diagram for SpeciesModelOptions< T >:
Collaboration diagram for SpeciesModelOptions< T >:

Public Member Functions

 SpeciesModelOptions ()
 
LinearSolvergetLinearSolver ()
 
- Public Member Functions inherited from FloatVarDict< T >
bool hasVar (const string varName) const
 
operator[] (const string varName) const
 
bool isField (const string varName) const
 
FieldgetField (const string varName) const
 
FloatVal< T > getVal (const string varName) const
 

Public Attributes

double relativeTolerance
 
double absoluteTolerance
 
bool useCentralDifference
 
LinearSolverlinearSolver
 
bool transient
 
bool ButlerVolmer
 
int timeDiscretizationOrder
 

Additional Inherited Members

- Public Types inherited from FloatVarDict< T >
typedef map< string, FloatVal
< T > > 
T_Parent
 
- Protected Member Functions inherited from FloatVarDict< T >
void defineVar (const string varName, const T defaultValue)
 

Detailed Description

template<class T>
struct SpeciesModelOptions< T >

Definition at line 32 of file SpeciesBC.h.

Constructor & Destructor Documentation

template<class T>
SpeciesModelOptions< T >::SpeciesModelOptions ( )
inline

Definition at line 34 of file SpeciesBC.h.

References SpeciesModelOptions< T >::absoluteTolerance, SpeciesModelOptions< T >::ButlerVolmer, FloatVarDict< T >::defineVar(), SpeciesModelOptions< T >::linearSolver, SpeciesModelOptions< T >::relativeTolerance, SpeciesModelOptions< T >::timeDiscretizationOrder, and SpeciesModelOptions< T >::useCentralDifference.

35  {
36  this->defineVar("A_coeff",T(1.0));
37  this->defineVar("B_coeff",T(0.0));
38  this->defineVar("ButlerVolmerRRConstant",T(5.0e-7));
39  this->defineVar("ButlerVolmerAnodeShellMeshID", int(-1));
40  this->defineVar("ButlerVolmerCathodeShellMeshID", int(-1));
41  this->defineVar("timeStep",T(0.1));
42  this->defineVar("interfaceUnderRelax",T(1.0));
43  this->relativeTolerance=1e-8;
44  this->absoluteTolerance=1e-16;
45  this->linearSolver = 0;
46  this->useCentralDifference=false;
47  this->transient = false;
48  this->ButlerVolmer = false;
50  }
double absoluteTolerance
Definition: SpeciesBC.h:52
int timeDiscretizationOrder
Definition: SpeciesBC.h:57
void defineVar(const string varName, const T defaultValue)
Definition: FloatVarDict.h:94
double relativeTolerance
Definition: SpeciesBC.h:51
bool useCentralDifference
Definition: SpeciesBC.h:53
LinearSolver * linearSolver
Definition: SpeciesBC.h:54

Member Function Documentation

template<class T>
LinearSolver& SpeciesModelOptions< T >::getLinearSolver ( )
inline

Definition at line 60 of file SpeciesBC.h.

References SpeciesModelOptions< T >::linearSolver, LinearSolver::nMaxIterations, LinearSolver::relativeTolerance, and LinearSolver::verbosity.

61  {
62  if (this->linearSolver == 0)
63  {
64  LinearSolver* ls(new AMG());
65  ls->relativeTolerance = 1e-1;
66  ls->nMaxIterations = 20;
67  ls->verbosity=0;
68  this->linearSolver = ls;
69  }
70  return *this->linearSolver ;
71  }
Definition: AMG.h:27
LinearSolver * linearSolver
Definition: SpeciesBC.h:54

Member Data Documentation

template<class T>
double SpeciesModelOptions< T >::absoluteTolerance

Definition at line 52 of file SpeciesBC.h.

Referenced by SpeciesModelOptions< T >::SpeciesModelOptions().

template<class T>
bool SpeciesModelOptions< T >::ButlerVolmer

Definition at line 56 of file SpeciesBC.h.

Referenced by SpeciesModelOptions< T >::SpeciesModelOptions().

template<class T>
LinearSolver* SpeciesModelOptions< T >::linearSolver
template<class T>
double SpeciesModelOptions< T >::relativeTolerance

Definition at line 51 of file SpeciesBC.h.

Referenced by SpeciesModelOptions< T >::SpeciesModelOptions().

template<class T>
int SpeciesModelOptions< T >::timeDiscretizationOrder

Definition at line 57 of file SpeciesBC.h.

Referenced by SpeciesModelOptions< T >::SpeciesModelOptions().

template<class T>
bool SpeciesModelOptions< T >::transient

Definition at line 55 of file SpeciesBC.h.

template<class T>
bool SpeciesModelOptions< T >::useCentralDifference

Definition at line 53 of file SpeciesBC.h.

Referenced by SpeciesModelOptions< T >::SpeciesModelOptions().


The documentation for this struct was generated from the following file: