18 #ifndef _FCST_FUELCELL_SYSTEM_MANAGEMENT_H_
19 #define _FCST_FUELCELL_SYSTEM_MANAGEMENT_H_
21 #include <base/parameter_handler.h>
27 #include <boost/algorithm/string/join.hpp>
29 using namespace dealii;
30 using namespace FuelCell::ApplicationCore;
40 typedef std::map< std::string , std::map<std::string, DoFTools::Coupling> >
couplings_map;
296 Table<2, DoFTools::Coupling>& cell_couplings,
297 Table<2, DoFTools::Coupling>& flux_couplings);
314 Table<2, DoFTools::Coupling>& rcell_couplings,
315 Table<2, DoFTools::Coupling>& rflux_couplings)
317 block_info = &rblock_info;
318 cell_couplings = &rcell_couplings;
319 flux_couplings = &rflux_couplings;
325 void declare_parameters(ParameterHandler& param)
const;
330 void initialize(ParameterHandler& param);
340 static std::map<VariableNames, std::string> VariableNames_strings;
341 if (VariableNames_strings.size() == 0){
342 #define INSERT_ELEMENT(p) VariableNames_strings[p] = #p
346 #undef INSERT_ELEMENT
349 return VariableNames_strings[value];
357 const bool solution_in_userlist(
const std::string& name)
const;
365 const unsigned int solution_name_to_index(
const std::string& name)
const;
381 const unsigned int equation_name_to_index(
const std::string& name)
const;
398 const unsigned int matrix_block_index(
const std::string& equation_name,
399 const std::string& solution_name)
const;
408 void make_cell_couplings(
const std::vector<couplings_map>& src);
417 void make_flux_couplings(
const std::vector<couplings_map>& src);
430 return all_solution_names;
439 return all_equation_names;
448 return solution_names;
457 return equation_names;
466 return n_solution_names;
480 void print_system_info()
const;
495 <<
"A " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in available FCST solution variables");
505 <<
"An " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in available FCST equations");
515 <<
"A " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in user defined solution variables");
525 <<
"An " << arg1 <<
" with name \"" << arg2 <<
"\" is not stored in user defined equations");
535 DeclException5(SystemMatrixBlockDoesNotExist,
541 <<
"A " << arg1 <<
" (" << arg2 <<
"," << arg3 <<
") " <<
"does not exist, because the variable \"" << arg4 <<
"\" is not coupled with the equation \"" << arg5 <<
"\"");
585 void set_all_solution_names();
592 void set_all_equation_names();
599 void check_solution_names()
const;
606 void check_equation_names()
const;
Definition: system_management.h:152
const std::vector< std::string > & get_equation_names() const
This function returns equation_names.
Definition: system_management.h:455
Definition: system_management.h:85
Definition: system_management.h:114
Definition: system_management.h:120
Definition: system_management.h:77
Definition: system_management.h:106
std::vector< std::string > solution_names
Vector storing the names of user defined solution variables.
Definition: system_management.h:633
A small structure collecting the different BlockIndices of FEVector vectors (for instance, solution) involved in the computations.
Definition: mesh_loop_info_objects.h:182
Definition: system_management.h:98
Definition: system_management.h:101
std::vector< std::string > all_equation_names
Vector storing the names of available FCST equations.
Definition: system_management.h:628
Definition: system_management.h:108
std::map< VariableNames, std::string > VariableNames_strings
Definition: system_management.h:647
Definition: system_management.h:87
VariableNames
The enumeration containing the names of some of the available FCST solution variables and their deriv...
Definition: system_management.h:62
Definition: system_management.h:74
Definition: system_management.h:70
unsigned int n_solution_names
The number of user defined solution variables.
Definition: system_management.h:645
Definition: system_management.h:96
Definition: system_management.h:149
Definition: system_management.h:94
Definition: system_management.h:115
const std::vector< std::string > & get_all_solution_names() const
This function returns all_solution_names.
Definition: system_management.h:428
#define INSERT_ELEMENT(p)
Definition: system_management.h:80
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:40
Definition: system_management.h:119
Definition: system_management.h:118
Definition: system_management.h:68
Definition: system_management.h:75
Definition: system_management.h:72
Definition: system_management.h:83
Definition: system_management.h:100
Definition: system_management.h:99
Definition: system_management.h:82
Definition: system_management.h:93
Definition: system_management.h:151
Definition: system_management.h:73
Definition: system_management.h:88
Definition: system_management.h:110
std::vector< std::string > all_solution_names
Vector storing the names of available FCST solution variables.
Definition: system_management.h:623
Definition: system_management.h:76
ReactionNames
Definition: system_management.h:148
Definition: system_management.h:121
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:79
Definition: system_management.h:67
Definition: system_management.h:86
Definition: system_management.h:116
Definition: system_management.h:105
Definition: system_management.h:104
Table< 2, DoFTools::Coupling > * cell_couplings
Pointer to the external YourApplication<dim>::cell_couplings object.
Definition: system_management.h:564
Definition: system_management.h:91
const unsigned int & get_number_of_solution_names() const
This function returns n_solution_names.
Definition: system_management.h:464
Definition: system_management.h:64
Definition: system_management.h:109
Definition: system_management.h:66
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
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:313
Definition: system_management.h:71
Definition: system_management.h:95
FuelCell::ApplicationCore::BlockInfo * block_info
Pointer to the external YourApplication<dim>::block_info object.
Definition: system_management.h:557
Definition: system_management.h:111
Definition: system_management.h:89
Definition: system_management.h:69
Definition: system_management.h:103
const std::string & get_VariableNames(const VariableNames value)
Definition: system_management.h:338
const std::vector< std::string > & get_solution_names() const
This function returns solution_names.
Definition: system_management.h:446
const std::vector< std::string > & get_all_equation_names() const
This function returns all_equation_names.
Definition: system_management.h:437
std::vector< std::string > equation_names
Vector storing the names of user defined equations.
Definition: system_management.h:638
Definition: system_management.h:113
Table< 2, DoFTools::Coupling > * flux_couplings
Pointer to the external YourApplication<dim>::flux_couplings (DG FEM only) object.
Definition: system_management.h:571