17 #ifndef _FCST_FUELCELL_SYSTEM_MANAGEMENT_H_
18 #define _FCST_FUELCELL_SYSTEM_MANAGEMENT_H_
20 #include <deal.II/base/parameter_handler.h>
28 #include <boost/algorithm/string/join.hpp>
30 using namespace dealii;
31 using namespace FuelCell::ApplicationCore;
41 typedef std::map< std::string , std::map<std::string, DoFTools::Coupling> >
couplings_map;
143 namespace ApplicationCore
325 Table<2, DoFTools::Coupling>& cell_couplings,
326 Table<2, DoFTools::Coupling>& flux_couplings);
343 Table<2, DoFTools::Coupling>& rcell_couplings,
344 Table<2, DoFTools::Coupling>& rflux_couplings)
346 block_info = &rblock_info;
347 cell_couplings = &rcell_couplings;
348 flux_couplings = &rflux_couplings;
354 void declare_parameters(ParameterHandler& param)
const;
359 void initialize(ParameterHandler& param);
369 static std::map<VariableNames, std::string> VariableNames_strings;
370 if (VariableNames_strings.size() == 0){
371 #define INSERT_ELEMENT(p) VariableNames_strings[p] = #p
375 #undef INSERT_ELEMENT
378 return VariableNames_strings[value];
386 const bool solution_in_userlist(
const std::string& name)
const;
394 const unsigned int solution_name_to_index(
const std::string& name)
const;
410 const unsigned int equation_name_to_index(
const std::string& name)
const;
427 const unsigned int matrix_block_index(
const std::string& equation_name,
428 const std::string& solution_name)
const;
434 const std::string& solution_name)
const
436 const unsigned int line = this->equation_name_to_index(equation_name);
437 const unsigned int column = this->solution_name_to_index(solution_name);
440 if ( (*cell_couplings)(line,column) != 0 )
450 void make_cell_couplings(
const std::vector<couplings_map>& src);
459 void make_flux_couplings(
const std::vector<couplings_map>& src);
472 return all_solution_names;
481 return all_equation_names;
490 return solution_names;
499 return equation_names;
508 return n_solution_names;
522 void print_system_info()
const;
537 <<
"A " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in available FCST solution variables");
547 <<
"An " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in available FCST equations");
557 <<
"A " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in user defined solution variables");
567 <<
"An " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in user defined equations");
577 DeclException5(SystemMatrixBlockDoesNotExist,
583 <<
"A " << arg1 <<
" (" << arg2 <<
"," << arg3 <<
") " <<
"does not exist, because the variable \"" << arg4 <<
"\" is not coupled with the equation \"" << arg5 <<
"\"");
627 void set_all_solution_names();
634 void set_all_equation_names();
641 void check_solution_names()
const;
648 void check_equation_names()
const;
Definition: system_management.h:181
const std::vector< std::string > & get_equation_names() const
This function returns equation_names.
Definition: system_management.h:497
Definition: system_management.h:86
Definition: system_management.h:115
Definition: system_management.h:121
Definition: system_management.h:78
Definition: system_management.h:107
std::vector< std::string > solution_names
Vector storing the names of user defined solution variables.
Definition: system_management.h:675
A small structure collecting the different BlockIndices of FEVector vectors (for instance, solution) involved in the computations.
Definition: mesh_loop_info_objects.h:173
Definition: system_management.h:150
Definition: system_management.h:99
Definition: system_management.h:102
std::vector< std::string > all_equation_names
Vector storing the names of available FCST equations.
Definition: system_management.h:670
Definition: system_management.h:109
std::map< VariableNames, std::string > VariableNames_strings
Definition: system_management.h:689
Definition: system_management.h:88
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:63
Definition: system_management.h:149
Definition: system_management.h:75
Definition: system_management.h:71
unsigned int n_solution_names
The number of user defined solution variables.
Definition: system_management.h:687
Definition: system_management.h:97
Definition: system_management.h:178
Definition: system_management.h:95
Definition: system_management.h:116
const std::vector< std::string > & get_all_solution_names() const
This function returns all_solution_names.
Definition: system_management.h:470
#define INSERT_ELEMENT(p)
Definition: system_management.h:81
std::map< std::string, std::map< std::string, DoFTools::Coupling > > couplings_map
The typedef for the map of cell or flux (DG FEM only) couplings stored in the actual equation classes...
Definition: system_management.h:41
Definition: system_management.h:120
Definition: system_management.h:119
Definition: system_management.h:69
Definition: system_management.h:76
Definition: system_management.h:147
Definition: system_management.h:73
Definition: system_management.h:84
Definition: system_management.h:101
Definition: system_management.h:100
Definition: system_management.h:83
Definition: system_management.h:94
Definition: system_management.h:180
Definition: system_management.h:74
SolverName
Definition: system_management.h:145
Definition: system_management.h:89
Definition: system_management.h:111
std::vector< std::string > all_solution_names
Vector storing the names of available FCST solution variables.
Definition: system_management.h:665
Definition: system_management.h:77
ReactionNames
Definition: system_management.h:177
Definition: system_management.h:122
DeclException2(VariableShouldExistForEquation, std::string, std::string,<< "The user-defined variable with name \""<< arg1<< "\" should be one of the solution variables for equation with name \""<< arg2<< "\"")
Exception thrown when a particular variable required by the equation class, does not exist in the use...
Definition: system_management.h:80
Definition: system_management.h:68
Definition: system_management.h:87
Definition: system_management.h:117
Definition: system_management.h:106
Definition: system_management.h:105
Table< 2, DoFTools::Coupling > * cell_couplings
Pointer to the external YourApplication<dim>::cell_couplings object.
Definition: system_management.h:606
Definition: system_management.h:92
const unsigned int & get_number_of_solution_names() const
This function returns n_solution_names.
Definition: system_management.h:506
Definition: system_management.h:65
Definition: system_management.h:110
Definition: system_management.h:67
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:300
Definition: system_management.h:148
void initialize(FuelCell::ApplicationCore::BlockInfo &rblock_info, Table< 2, DoFTools::Coupling > &rcell_couplings, Table< 2, DoFTools::Coupling > &rflux_couplings)
This function assembles.
Definition: system_management.h:342
Definition: system_management.h:72
Definition: system_management.h:96
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.
Definition: system_management.h:433
FuelCell::ApplicationCore::BlockInfo * block_info
Pointer to the external YourApplication<dim>::block_info object.
Definition: system_management.h:599
Definition: system_management.h:112
Definition: system_management.h:90
Definition: system_management.h:70
Definition: system_management.h:104
const std::string & get_VariableNames(const VariableNames value)
Definition: system_management.h:367
const std::vector< std::string > & get_solution_names() const
This function returns solution_names.
Definition: system_management.h:488
const std::vector< std::string > & get_all_equation_names() const
This function returns all_equation_names.
Definition: system_management.h:479
std::vector< std::string > equation_names
Vector storing the names of user defined equations.
Definition: system_management.h:680
Definition: system_management.h:114
Table< 2, DoFTools::Coupling > * flux_couplings
Pointer to the external YourApplication<dim>::flux_couplings (DG FEM only) object.
Definition: system_management.h:613