OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
This structure is used to encapsulate data from constant values and variable solution data that is used in Layer classes to compute effective transport properties. More...
#include <fcst_variables.h>
Public Member Functions | |
Initialization | |
SolutionVariable () | |
Default Constructor. More... | |
SolutionVariable (const std::vector< double > *data_in, const VariableNames &name_in) | |
Constructor for setting up the pointer to solution variable values and name of the solution variable. More... | |
SolutionVariable (const double &value, const unsigned int &length, const VariableNames &name_in) | |
Constructor to initialize the solution variable values, taking a default value and size of the vector as an input argument. More... | |
SolutionVariable (const std::vector< double > &data_in, const VariableNames &name_in) | |
Constructor to initialize the solution variable values, taking values as an input vector argument. More... | |
Accessors | |
const std::vector< double > & | get_default_data () const |
Return a reference to the default_data stored in the class. More... | |
const std::vector< double > * | get_data () const |
VariableNames | get_variablename () const |
Function to get the VariableNames enumeration corresponding to this struct. More... | |
const bool | is_initialized () const |
Function to determine whether the structure is initialized or not. More... | |
const bool | is_default_data_initialized () const |
const bool | is_data_initialized () const |
unsigned int | size () const |
Function to the length of the internal data element. More... | |
Private Attributes | |
DATA | |
std::vector< double > | default_data |
Constant data. More... | |
const std::vector< double > * | data |
Data in quadrature points of a mesh entity. More... | |
VariableNames | name |
FCST variable name stored in VariableNames enumeration. More... | |
bool | initialized |
true if either default_data or data is initialized. More... | |
bool | initialized_default_data |
true if default_data is initialized. More... | |
bool | initialized_data |
true if data is initialized. More... | |
Operators | |
const double & | operator[] (const unsigned int &i) const |
Operator to access the value at a particular quadrature point in the cell. More... | |
SolutionVariable | operator* (const SolutionVariable &left, const double &right) |
Operator SolutionVariable * double . More... | |
SolutionVariable | operator* (const double &left, const SolutionVariable &right) |
Operator double * SolutionVariable . More... | |
SolutionVariable | operator/ (const SolutionVariable &left, const double &right) |
Operator SolutionVariable / double . More... | |
This structure is used to encapsulate data from constant values and variable solution data that is used in Layer classes to compute effective transport properties.
This structure is usually generated inside Equation classes and then passed to the layer class as appropriate. The layer then harvests the appropriate information.
This structure is used to store values for a particular solution variable, at all quadrature points in the cell. It is best utilized while setting previous Newton iteration values from application to the layer classes etc. It is recommended that those classes which require certain old solution values to compute effective properties etc. should contain this structure as their data member. This structure has four constructors. Default constructor doesn't set any value. It also sets the Boolean member initialized to false.
This can be checked by using is_initialized member function and is helpful to determine whether any values are stored or not inside the object. The other constructor takes std::vector<double>* corresponding to the solution variable values and enumeration VariableNames representing the name of the solution variable. The VariableNames of the solution variable can be accessed by get_variablename() method. In order to access value at a particular quadrature point, operator [ ] is provided. Other two constructors are useful in the case when we set some default values for a particular variable (which is not being solved in the current application).
Can we create a "super" SolutionVariable object that stores all constant and variable data needed at each quadrature point? The amount of data needed would be provided by SystemManagement in combination with Equation classes.
|
inline |
Default Constructor.
|
inline |
Constructor for setting up the pointer to solution variable values and name of the solution variable.
|
inline |
Constructor to initialize the solution variable values, taking a default value and size of the vector as an input argument.
|
inline |
Constructor to initialize the solution variable values, taking values as an input vector argument.
|
inline |
|
inline |
Return a reference to the default_data stored in the class.
The default_data is the data that was passed to the class in the constructor.
|
inline |
Function to get the VariableNames enumeration corresponding to this struct.
Referenced by FuelCellShop::is_phiM(), FuelCellShop::is_phiS(), FuelCellShop::SolutionMap::push_back(), FuelCellShop::MicroScale::HIPSD< dim >::set_capillary_pressure(), FuelCellShop::MicroScale::DualPSD< dim >::set_capillary_pressure(), FuelCellShop::MicroScale::HOPSD< dim >::set_capillary_pressure(), FuelCellShop::Layer::PorousLayer< dim >::set_capillary_pressure(), FuelCellShop::Equation::ReactionHeat::set_electrolyte_potential(), FuelCellShop::Kinetics::BaseKinetics::set_electrolyte_potential(), FuelCellShop::Material::PolymerElectrolyteBase::set_membrane_water_content(), FuelCellShop::Layer::PorousLayer< dim >::set_pressure(), FuelCellShop::Layer::PorousLayer< dim >::set_saturation(), FuelCellShop::Equation::ReactionHeat::set_solid_potential(), FuelCellShop::Kinetics::BaseKinetics::set_solid_potential(), FuelCellShop::Equation::ReactionHeat::set_temperature(), FuelCellShop::MicroScale::HIPSD< dim >::set_temperature(), FuelCellShop::MicroScale::DualPSD< dim >::set_temperature(), FuelCellShop::MicroScale::HOPSD< dim >::set_temperature(), FuelCellShop::Layer::PorousLayer< dim >::set_temperature(), FuelCellShop::Kinetics::BaseKinetics::set_temperature(), FuelCellShop::Material::PolymerElectrolyteBase::set_temperature(), and FuelCellShop::Material::PolymerElectrolyteBase::set_water_molar_fraction().
|
inline |
|
inline |
|
inline |
Function to determine whether the structure is initialized or not.
Referenced by FuelCellShop::Material::PolymerElectrolyteBase::set_membrane_water_content(), FuelCellShop::Material::PolymerElectrolyteBase::set_temperature(), and FuelCellShop::Material::PolymerElectrolyteBase::set_water_molar_fraction().
|
inline |
Operator to access the value at a particular quadrature point in the cell.
|
inline |
Function to the length of the internal data element.
|
friend |
Operator SolutionVariable
* double
.
All default_data
at quadrature points is multilpied by right
operand. The multiplication is performed on default_data
only. Therefore, to use this operator, default_data
is initialized and data
is NOT.
|
friend |
Operator double
* SolutionVariable
.
All default_data
at quadrature points is multilpied by left
operand. The multiplication is performed on default_data
only. Therefore, to use this operator, default_data
is initialized and data
is NOT.
|
friend |
Operator SolutionVariable
/ double
.
All default_data
at quadrature points is divided by right
operand. The division is performed on default_data
only. Therefore, to use this operator, default_data
is initialized and data
is NOT.
|
private |
Data in quadrature points of a mesh entity.
|
private |
Constant data.
|
private |
true
if either default_data
or data
is initialized.
|
private |
true
if data
is initialized.
|
private |
true
if default_data
is initialized.
|
private |
FCST variable name stored in VariableNames enumeration.