OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
IMPORTANT: Add all new solution variables and equations here ! More...
#include <system_management.h>
Public Member Functions | |
Constructors, destructor, and initialization | |
SystemManagement () | |
Constructor assembling. More... | |
SystemManagement (FuelCell::ApplicationCore::BlockInfo &block_info, Table< 2, DoFTools::Coupling > &cell_couplings, Table< 2, DoFTools::Coupling > &flux_couplings) | |
Constructor assembling. More... | |
~SystemManagement () | |
Destructor. More... | |
void | initialize (FuelCell::ApplicationCore::BlockInfo &rblock_info, Table< 2, DoFTools::Coupling > &rcell_couplings, Table< 2, DoFTools::Coupling > &rflux_couplings) |
This function assembles. More... | |
void | declare_parameters (ParameterHandler ¶m) const |
Declare parameters. More... | |
void | initialize (ParameterHandler ¶m) |
Initialize parameters. More... | |
Service functions | |
const std::string & | get_VariableNames (const VariableNames value) |
const bool | solution_in_userlist (const std::string &name) const |
This function returns a boolean stating whether an available FCST solution variable with name name stored in solution_names . More... | |
const unsigned int | solution_name_to_index (const std::string &name) const |
This function returns the index of a user defined solution variable with name name stored in solution_names . More... | |
const unsigned int | equation_name_to_index (const std::string &name) const |
This function returns the index of a user defined solution variable with name name stored in solution_names . More... | |
const unsigned int | matrix_block_index (const std::string &equation_name, const std::string &solution_name) const |
This function returns the index of a system matrix block based on. More... | |
bool | matrix_block_index_exists (const std::string &equation_name, const std::string &solution_name) const |
Check if, based on cell_couplings, this block must be assembled. More... | |
void | make_cell_couplings (const std::vector< couplings_map > &src) |
This function fills out the* cell_couplings object based on the information drawn from the actual equation classes in use. More... | |
void | make_flux_couplings (const std::vector< couplings_map > &src) |
This function fills out the flux_couplings (DG FEM only) object based on the information drawn from the actual equation classes in use. More... | |
Accessors and info | |
const std::vector< std::string > & | get_all_solution_names () const |
This function returns all_solution_names . More... | |
const std::vector< std::string > & | get_all_equation_names () const |
This function returns all_equation_names . More... | |
const std::vector< std::string > & | get_solution_names () const |
This function returns solution_names . More... | |
const std::vector< std::string > & | get_equation_names () const |
This function returns equation_names . More... | |
const unsigned int & | get_number_of_solution_names () const |
This function returns n_solution_names . More... | |
void | print_system_info () const |
This function prints out the information on available FCST solution variables and equations and what you have picked out. More... | |
Exceptions | |
DeclException2 (VariableNotFoundInFCSTVariables, std::string, std::string,<< "A "<< arg1<< " with name \""<< arg2<< "\" is not stored in available FCST solution variables") | |
Exception thrown when a user defined solution variable is not found among available FCST solution variables. More... | |
DeclException2 (EquationNotFoundInFCSTEquations, std::string, std::string,<< "An "<< arg1<< " with name \""<< arg2<< "\" is not stored in available FCST equations") | |
Exception thrown when a user defined equation is not found among available FCST equations. More... | |
DeclException2 (VariableNotFoundInUserVariables, std::string, std::string,<< "A "<< arg1<< " with name \""<< arg2<< "\" is not stored in user defined solution variables") | |
Exception thrown when a name in solution_name_to_index function is not found among user defined solution variables. More... | |
DeclException2 (EquationNotFoundInUserEquations, std::string, std::string,<< "An "<< arg1<< " with name \""<< arg2<< "\" is not stored in user defined equations") | |
Exception thrown when a name in equation_name_to_index function is not found among user defined equations. More... | |
DeclException5 (SystemMatrixBlockDoesNotExist, std::string, unsigned int, unsigned int, std::string, std::string,<< "A "<< arg1<< " ("<< arg2<< ","<< arg3<< ") "<< "does not exist, because the variable \""<< arg4<< "\" is not coupled with the equation \""<< arg5<< "\"") | |
Exception thrown when a requested system matrix block does not exist. More... | |
Public Attributes | |
External data pointers | |
FuelCell::ApplicationCore::BlockInfo * | block_info |
Pointer to the external YourApplication<dim>::block_info object. More... | |
Table< 2, DoFTools::Coupling > * | cell_couplings |
Pointer to the external YourApplication<dim>::cell_couplings object. More... | |
Table< 2, DoFTools::Coupling > * | flux_couplings |
Pointer to the external YourApplication<dim>::flux_couplings (DG FEM only) object. More... | |
Protected Member Functions | |
Other functions | |
void | set_all_solution_names () |
This function fills out all_solution_names . More... | |
void | set_all_equation_names () |
This function fills out all_equation_names . More... | |
void | check_solution_names () const |
This function throws an exception if a user defined solution variable is not found among available FCST solution variables. More... | |
void | check_equation_names () const |
This function throws an exception if a user defined equation is not found among available FCST equations. More... | |
Protected Attributes | |
System properties | |
std::vector< std::string > | all_solution_names |
Vector storing the names of available FCST solution variables. More... | |
std::vector< std::string > | all_equation_names |
Vector storing the names of available FCST equations. More... | |
std::vector< std::string > | solution_names |
Vector storing the names of user defined solution variables. More... | |
std::vector< std::string > | equation_names |
Vector storing the names of user defined equations. More... | |
unsigned int | n_solution_names |
The number of user defined solution variables. More... | |
std::map< VariableNames, std::string > | VariableNames_strings |
IMPORTANT: Add all new solution variables and equations here !
This class contains all the information on available FCST solution variables and equations and feeds the actual equation classes with different types of information on the linear system structure.
Available FCST solution variables:
Available FCST equations:
FuelCell::SystemManagement::SystemManagement | ( | ) |
Constructor assembling.
all_solution_names
,all_equation_names
. FuelCell::SystemManagement::SystemManagement | ( | FuelCell::ApplicationCore::BlockInfo & | block_info, |
Table< 2, DoFTools::Coupling > & | cell_couplings, | ||
Table< 2, DoFTools::Coupling > & | flux_couplings | ||
) |
Constructor assembling.
all_solution_names
,all_equation_names
,block_info
(AppFrame structure) will be initialized by the AppFrame itself,cell_couplings
(AppFrame structure) will be initialized by the make_cell_couplings
function of this class called by a user defined application,flux_couplings
(AppFrame structure) will be initialized by the make_flux_couplings
function of this class called by a user defined application (DG FEM only). FuelCell::SystemManagement::~SystemManagement | ( | ) |
Destructor.
|
protected |
This function throws an exception if a user defined equation is not found among available FCST equations.
|
protected |
This function throws an exception if a user defined solution variable is not found among available FCST solution variables.
void FuelCell::SystemManagement::declare_parameters | ( | ParameterHandler & | param | ) | const |
Declare parameters.
FuelCell::SystemManagement::DeclException2 | ( | VariableNotFoundInFCSTVariables | , |
std::string | , | ||
std::string | , | ||
<< "A "<< arg1<< " with name \""<< arg2<< "\" is not stored in available FCST solution variables" | |||
) |
Exception thrown when a user defined solution variable is not found among available FCST solution variables.
FuelCell::SystemManagement::DeclException2 | ( | EquationNotFoundInFCSTEquations | , |
std::string | , | ||
std::string | , | ||
<< "An "<< arg1<< " with name \""<< arg2<< "\" is not stored in available FCST equations" | |||
) |
Exception thrown when a user defined equation is not found among available FCST equations.
FuelCell::SystemManagement::DeclException2 | ( | VariableNotFoundInUserVariables | , |
std::string | , | ||
std::string | , | ||
<< "A "<< arg1<< " with name \""<< arg2<< "\" is not stored in user defined solution variables" | |||
) |
Exception thrown when a name
in solution_name_to_index
function is not found among user defined solution variables.
FuelCell::SystemManagement::DeclException2 | ( | EquationNotFoundInUserEquations | , |
std::string | , | ||
std::string | , | ||
<< "An "<< arg1<< " with name \""<< arg2<< "\" is not stored in user defined equations" | |||
) |
Exception thrown when a name
in equation_name_to_index
function is not found among user defined equations.
FuelCell::SystemManagement::DeclException5 | ( | SystemMatrixBlockDoesNotExist | , |
std::string | , | ||
unsigned | int, | ||
unsigned | int, | ||
std::string | , | ||
std::string | , | ||
<< "A "<< arg1<< " ("<< arg2<< ","<< arg3<< ") "<< "does not | exist, | ||
because the variable\""<< arg4<< "\" is not coupled with the equation \""<< arg5<< "\"" | |||
) |
Exception thrown when a requested system matrix block does not exist.
cell_couplings
(equation_name
, solution_name
) = DoFTools::none. const unsigned int FuelCell::SystemManagement::equation_name_to_index | ( | const std::string & | name | ) | const |
This function returns the index of a user defined solution variable with name name
stored in solution_names
.
This function returns the index of a user defined equation with name name
stored in equation_names
.
|
inline |
This function returns all_equation_names
.
|
inline |
This function returns all_solution_names
.
|
inline |
This function returns equation_names
.
|
inline |
This function returns n_solution_names
.
Referenced by FuelCell::InitialAndBoundaryData::apply_piece_wise_constant_DirichletBCs(), FuelCell::InitialAndBoundaryData::make_constant_DirichletBC_values(), FuelCell::InitialAndBoundaryData::make_piece_wise_constant_initial_data(), and FuelCell::InitialAndBoundaryData::make_zero_boundary_values().
|
inline |
This function returns solution_names
.
|
inline |
References hydrogen_molar_fraction, INSERT_ELEMENT, oxygen_molar_fraction, and water_molar_fraction.
|
inline |
This function assembles.
block_info
(AppFrame structure) will be initialized by the AppFrame itself,cell_couplings
(AppFrame structure) will be initialized by the make_cell_couplings
function of this class called by a user defined application,flux_couplings
(AppFrame structure) will be initialized by the make_flux_couplings
function of this class called by a user defined application (DG FEM only)if the empty constructor was used.
void FuelCell::SystemManagement::initialize | ( | ParameterHandler & | param | ) |
Initialize parameters.
void FuelCell::SystemManagement::make_cell_couplings | ( | const std::vector< couplings_map > & | src | ) |
This function fills out the* cell_couplings
object based on the information drawn from the actual equation classes in use.
void FuelCell::SystemManagement::make_flux_couplings | ( | const std::vector< couplings_map > & | src | ) |
This function fills out the flux_couplings
(DG FEM only) object based on the information drawn from the actual equation classes in use.
const unsigned int FuelCell::SystemManagement::matrix_block_index | ( | const std::string & | equation_name, |
const std::string & | solution_name | ||
) | const |
This function returns the index of a system matrix block based on.
equation_name
(line),solution_name
(column),cell_couplings
.cell_couplings
(equation_name
, solution_name
) = DoFTools::none is missed.
|
inline |
Check if, based on cell_couplings, this block must be assembled.
void FuelCell::SystemManagement::print_system_info | ( | ) | const |
This function prints out the information on available FCST solution variables and equations and what you have picked out.
It also displays the basic linear system structure.
|
protected |
This function fills out all_equation_names
.
If you have a name of a new FCST equation, add it here.
|
protected |
This function fills out all_solution_names
.
If you have a name of a new FCST solution variable, add it here.
const bool FuelCell::SystemManagement::solution_in_userlist | ( | const std::string & | name | ) | const |
This function returns a boolean stating whether an available FCST solution variable with name name
stored in solution_names
.
const unsigned int FuelCell::SystemManagement::solution_name_to_index | ( | const std::string & | name | ) | const |
This function returns the index of a user defined solution variable with name name
stored in solution_names
.
Referenced by FuelCell::InitialAndBoundaryData::apply_piece_wise_constant_DirichletBCs(), FuelCell::InitialAndBoundaryData::make_constant_DirichletBC_values(), FuelCell::InitialAndBoundaryData::make_piece_wise_constant_initial_data(), and FuelCell::InitialAndBoundaryData::make_zero_boundary_values().
|
protected |
Vector storing the names of available FCST equations.
|
protected |
Vector storing the names of available FCST solution variables.
FuelCell::ApplicationCore::BlockInfo* FuelCell::SystemManagement::block_info |
Pointer to the external YourApplication<dim>::block_info object.
Direct access is provided.
Table<2, DoFTools::Coupling>* FuelCell::SystemManagement::cell_couplings |
Pointer to the external YourApplication<dim>::cell_couplings object.
Direct access is provided.
|
protected |
Vector storing the names of user defined equations.
Table<2, DoFTools::Coupling>* FuelCell::SystemManagement::flux_couplings |
Pointer to the external YourApplication<dim>::flux_couplings (DG FEM only) object.
Direct access is provided.
|
protected |
The number of user defined solution variables.
The number of user defined equations is implicitly assumed to be the same.
|
protected |
Vector storing the names of user defined solution variables.
|
protected |