OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
FuelCell::SystemManagement Class Reference

IMPORTANT: Add all new solution variables and equations here ! More...

#include <system_management.h>

Inheritance diagram for FuelCell::SystemManagement:
Inheritance graph
[legend]
Collaboration diagram for FuelCell::SystemManagement:
Collaboration graph
[legend]

Public Member Functions

Constructors, destructor, and initialization
 SystemManagement ()
 Constructor assembling.
 
 SystemManagement (MeshWorker::BlockInfo &block_info, Table< 2, DoFTools::Coupling > &cell_couplings, Table< 2, DoFTools::Coupling > &flux_couplings)
 Constructor assembling.
 
 ~SystemManagement ()
 Destructor.
 
void initialize (MeshWorker::BlockInfo &rblock_info, Table< 2, DoFTools::Coupling > &rcell_couplings, Table< 2, DoFTools::Coupling > &rflux_couplings)
 This function assembles.
 
void declare_parameters (ParameterHandler &param) const
 Declare parameters.
 
void initialize (ParameterHandler &param)
 Initialize parameters.
 
Service functions
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.
 
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.
 
const unsigned int equation_name_to_index (const std::string &name) const
 This function returns the index of a user defined equation with name name stored in equation_names.
 
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.
 
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.
 
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.
 
Accessors and info
const std::vector< std::string > & get_all_solution_names () const
 This function returns all_solution_names.
 
const std::vector< std::string > & get_all_equation_names () const
 This function returns all_equation_names.
 
const std::vector< std::string > & get_solution_names () const
 This function returns solution_names.
 
const std::vector< std::string > & get_equation_names () const
 This function returns equation_names.
 
const unsigned int & get_number_of_solution_names () const
 This function returns n_solution_names.
 
void print_system_info () const
 This function prints out the information on available FCST solution variables and equations and what you have picked out.
 
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.
 
 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.
 
 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.
 
 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.
 
 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.
 

Public Attributes

External data pointers
MeshWorker::BlockInfoblock_info
 Pointer to the external YourApplication<dim>::block_info object.
 
Table< 2, DoFTools::Coupling > * cell_couplings
 Pointer to the external YourApplication<dim>::cell_couplings object.
 
Table< 2, DoFTools::Coupling > * flux_couplings
 Pointer to the external YourApplication<dim>::flux_couplings (DG FEM only) object.
 

Protected Member Functions

Other functions
void set_all_solution_names ()
 This function fills out all_solution_names.
 
void set_all_equation_names ()
 This function fills out all_equation_names.
 
void check_solution_names () const
 This function throws an exception if a user defined solution variable is not found among available FCST solution variables.
 
void check_equation_names () const
 This function throws an exception if a user defined equation is not found among available FCST equations.
 

Protected Attributes

System properties
std::vector< std::string > all_solution_names
 Vector storing the names of available FCST solution variables.
 
std::vector< std::string > all_equation_names
 Vector storing the names of available FCST equations.
 
std::vector< std::string > solution_names
 Vector storing the names of user defined solution variables.
 
std::vector< std::string > equation_names
 Vector storing the names of user defined equations.
 
unsigned int n_solution_names
 The number of user defined solution variables.
 

Detailed Description

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:

Author
Valentin N. Zingan, 2012-13
Marc Secanell Gallart, 2012-13

Constructor & Destructor Documentation

FuelCell::SystemManagement::SystemManagement ( )

Constructor assembling.

  • all_solution_names,
  • all_equation_names.
FuelCell::SystemManagement::SystemManagement ( MeshWorker::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.

Member Function Documentation

void FuelCell::SystemManagement::check_equation_names ( ) const
protected

This function throws an exception if a user defined equation is not found among available FCST equations.

void FuelCell::SystemManagement::check_solution_names ( ) const
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.

Note
Such a block has 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 equation with name name stored in equation_names.

const std::vector<std::string>& FuelCell::SystemManagement::get_all_equation_names ( ) const
inline

This function returns all_equation_names.

const std::vector<std::string>& FuelCell::SystemManagement::get_all_solution_names ( ) const
inline

This function returns all_solution_names.

const std::vector<std::string>& FuelCell::SystemManagement::get_equation_names ( ) const
inline

This function returns equation_names.

const unsigned int& FuelCell::SystemManagement::get_number_of_solution_names ( ) const
inline
const std::vector<std::string>& FuelCell::SystemManagement::get_solution_names ( ) const
inline

This function returns solution_names.

void FuelCell::SystemManagement::initialize ( MeshWorker::BlockInfo rblock_info,
Table< 2, DoFTools::Coupling > &  rcell_couplings,
Table< 2, DoFTools::Coupling > &  rflux_couplings 
)
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.
Note
A system matrix block with cell_couplings(equation_name, solution_name) = DoFTools::none is missed.
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.

void FuelCell::SystemManagement::set_all_equation_names ( )
protected

This function fills out all_equation_names.

If you have a name of a new FCST equation, add it here.

void FuelCell::SystemManagement::set_all_solution_names ( )
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_piece_wise_constant_initial_data(), and FuelCell::InitialAndBoundaryData::make_zero_boundary_values().

Here is the caller graph for this function:

Member Data Documentation

std::vector<std::string> FuelCell::SystemManagement::all_equation_names
protected

Vector storing the names of available FCST equations.

std::vector<std::string> FuelCell::SystemManagement::all_solution_names
protected

Vector storing the names of available FCST solution variables.

MeshWorker::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.

std::vector<std::string> FuelCell::SystemManagement::equation_names
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.

unsigned int FuelCell::SystemManagement::n_solution_names
protected

The number of user defined solution variables.

The number of user defined equations is implicitly assumed to be the same.

std::vector<std::string> FuelCell::SystemManagement::solution_names
protected

Vector storing the names of user defined solution variables.


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