17 #ifndef _FCST_FUELCELLSHOP_EQUATION_EQUATION_BASE_H_
18 #define _FCST_FUELCELLSHOP_EQUATION_EQUATION_BASE_H_
28 using namespace dealii;
29 using namespace FuelCell::ApplicationCore;
31 namespace FuelCellShop
163 <<
"The user-defined variable with name \"" << arg1 <<
"\" should be one of the solution variables for equation with name \"" << arg2 <<
"\"");
173 <<
"The index of variable \"" << arg1 <<
"\" do not match with the index of equation \"" << arg2 <<
"\"");
213 print_caller_name(__FUNCTION__);
223 print_caller_name(__FUNCTION__);
233 print_caller_name(__FUNCTION__);
243 print_caller_name(__FUNCTION__);
258 AssertThrow( !internal_cell_couplings.empty() , ExcInternalError() );
259 return internal_cell_couplings;
269 AssertThrow( !internal_flux_couplings.empty() , ExcInternalError() );
270 return internal_flux_couplings;
280 AssertThrow( !component_materialID_value.empty() , ExcInternalError() );
281 return component_materialID_value;
291 AssertThrow( !component_boundaryID_value.empty() , ExcInternalError() );
292 return component_boundaryID_value;
302 return boundary_types;
312 return multi_boundary_types;
332 return multi_output_types;
342 return equation_name;
352 return matrix_block_indices;
362 return residual_indices;
372 print_caller_name(__FUNCTION__);
424 virtual void declare_parameters(ParameterHandler& param)
const;
429 virtual void initialize(ParameterHandler& param);
436 const std::vector<double>& value_dvar,
437 ParameterHandler& param)
439 print_caller_name(__FUNCTION__);
453 print_caller_name(__FUNCTION__);
462 print_caller_name(__FUNCTION__);
471 print_caller_name(__FUNCTION__);
481 print_caller_name(__FUNCTION__);
491 print_caller_name(__FUNCTION__);
506 print_caller_name(__FUNCTION__);
516 print_caller_name(__FUNCTION__);
526 print_caller_name(__FUNCTION__);
536 print_caller_name(__FUNCTION__);
546 print_caller_name(__FUNCTION__);
556 print_caller_name(__FUNCTION__);
566 print_caller_name(__FUNCTION__);
576 print_caller_name(__FUNCTION__);
586 print_caller_name(__FUNCTION__);
596 print_caller_name(__FUNCTION__);
609 void standard_to_block_wise(FullMatrix<double>& target)
const;
616 void standard_to_block_wise(Vector<double>& target)
const;
632 const FullMatrix<double>& src,
633 const std::vector<unsigned int>& matrix_block_indices)
const;
649 const Vector<double>& src,
650 const std::vector<unsigned int>& residual_indices)
const;
664 const unsigned int& param_boundary_id)
const
666 return tria_boundary_id == param_boundary_id;
680 void print_caller_name(
const std::string& caller_name)
const;
This simple structure describes an output type of a derived equation class.
Definition: equation_base.h:87
virtual void set_parameters(const std::vector< std::string > &name_dvar, const std::vector< double > &value_dvar, ParameterHandler ¶m)
Set parameters using the parameter file, in order to run parametric/optimization studies.
Definition: equation_base.h:435
std::vector< double > JxW_cell
Jacobian of mapping by Weight in the quadrature points of a cell.
Definition: equation_base.h:763
unsigned int solution_index
Index of the user-defined solution variable, retrieved from #SystemManagement.
Definition: equation_base.h:126
bool variable_initial_data
true, if variable initial data is prescribed on a part of the domain.
Definition: equation_base.h:383
const std::string & get_equation_name() const
This function returns equation_name of a derived equation class.
Definition: equation_base.h:340
virtual void make_component_materialID_value()
This function fills out component_materialID_value of a derived equation class.
Definition: equation_base.h:524
std::vector< std::vector< OutputType > > multi_output_types
The list of multiple output types of a derived equation class.
Definition: equation_base.h:879
virtual void print_equation_info() const
This function prints out the equations info of a derived equation class.
Definition: equation_base.h:370
bool belongs_to_boundary(const unsigned int &tria_boundary_id, const unsigned int ¶m_boundary_id) const
This function returns true if a boundary indicator of an external face on the triangulation coincides...
Definition: equation_base.h:663
std::vector< BoundaryType > boundary_types
The list of boundary types of a derived equation class.
Definition: equation_base.h:858
unsigned int boundary_id
Boundary indicator.
Definition: equation_base.h:72
virtual void make_assemblers_bdry_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info)
This function is overridden in the derived equation classes.
Definition: equation_base.h:469
FuelCell::SystemManagement * system_management
Pointer to the external YourApplication<dim>::system_management object.
Definition: equation_base.h:817
const component_boundaryID_value_map & get_component_boundaryID_value() const
This function returns component_boundaryID_value of a derived equation class.
Definition: equation_base.h:289
const std::vector< OutputType > & get_output_types() const
This function returns output_types of a derived equation class.
Definition: equation_base.h:320
unsigned int dofs_per_cell
Number of degrees of freedom per cell.
Definition: equation_base.h:695
const std::vector< std::vector< OutputType > > & get_multi_output_types() const
This function returns multi_output_types of a derived equation class.
Definition: equation_base.h:330
std::vector< OutputType > output_types
The list of output types of a derived equation class.
Definition: equation_base.h:872
virtual void make_boundary_types()
This function fills out boundary_types of a derived equation class.
Definition: equation_base.h:544
virtual void make_assemblers_cell_constant_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info)
This function is overridden in the derived equation classes.
Definition: equation_base.h:460
std::vector< unsigned int > residual_indices
The residual indices (a derived equation class) drawn from the global structure (a derived equation c...
Definition: equation_base.h:906
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
std::map< std::string, std::map< types::material_id, double > > component_materialID_value_map
The typedef for the std::map that reflects the following structure:
Definition: initial_and_boundary_data.h:79
std::string name_base_variable
Const std::string member storing name of the base solution variable corresponding to the equation rep...
Definition: equation_base.h:892
virtual void make_multi_boundary_types()
This function fills out multi_boundary_types of a derived equation class.
Definition: equation_base.h:554
std::map< std::string, std::map< types::boundary_id, double > > component_boundaryID_value_map
The typedef for the std::map that reflects the following structure:
Definition: initial_and_boundary_data.h:90
std::string boundary_condition
Type of boundary condition.
Definition: equation_base.h:77
bool variable_boundary_data
true, if variable Dirichlet boundary conditions are prescribed on a part of the boundary.
Definition: equation_base.h:391
virtual void make_component_boundaryID_value()
This function fills out component_boundaryID_value of a derived equation class.
Definition: equation_base.h:534
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:625
const std::vector< unsigned int > & get_residual_indices() const
This function returns residual_indices of a derived equation class.
Definition: equation_base.h:360
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
const std::vector< unsigned int > & get_matrix_block_indices() const
This function returns matrix_block_indices of a derived equation class.
Definition: equation_base.h:350
DoFHandler< dim >::active_face_iterator bdry
Currently active DoFHandler<dim> active boundary iterator.
Definition: equation_base.h:732
component_materialID_value_map component_materialID_value
This object reflects the following structure (see FuelCell::InitialAndBoundaryData namespace docs): ...
Definition: equation_base.h:841
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...
virtual void assemble_bdry_residual(FuelCell::ApplicationCore::FEVector &bdry_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary residual.
Definition: equation_base.h:239
unsigned int n_q_points_bdry
Number of quadrature points per boundary.
Definition: equation_base.h:717
virtual void make_assemblers_cell_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function is overridden in the derived equation classes.
Definition: equation_base.h:478
couplings_map internal_flux_couplings
This object contains the info on how the "X" and "Y" of a derived equation class are coupled (DG FEM ...
Definition: equation_base.h:831
virtual void assemble_cell_matrix(FuelCell::ApplicationCore::MatrixVector &cell_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell matrix.
Definition: equation_base.h:209
virtual void make_residual_indices()
This function fills out residual_indices of a derived equation class.
Definition: equation_base.h:594
std::string variable_name
Variable name.
Definition: equation_base.h:92
virtual void make_assemblers_generic_constant_data()
This function is overridden in the derived equation classes.
Definition: equation_base.h:451
const couplings_map & get_internal_cell_couplings() const
This function returns internal_cell_couplings of a derived equation class.
Definition: equation_base.h:256
unsigned int block_index
Block index of the matrix relating to the variable corresponding to an equation, retrieved from #Syst...
Definition: equation_base.h:131
std::vector< Point< dim > > normal_vectors
Normal vectors in the quadrature points of a boundary.
Definition: equation_base.h:800
std::vector< unsigned int > matrix_block_indices
The system matrix block indices (a derived equation class) drawn from the global structure (a derived...
Definition: equation_base.h:899
virtual void assemble_bdry_matrix(FuelCell::ApplicationCore::MatrixVector &bdry_matrices, const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local boundary matrix.
Definition: equation_base.h:229
const component_materialID_value_map & get_component_materialID_value() const
This function returns component_materialID_value of a derived equation class.
Definition: equation_base.h:278
std::vector< std::vector< Point< dim > > > tangential_vectors
Tangential vectors in the quadrature points of a boundary.
Definition: equation_base.h:806
virtual void make_output_types()
This function fills out output_types of a derived equation class.
Definition: equation_base.h:564
std::string variable_interpretation
Variable interpretation.
Definition: equation_base.h:103
This class contains generic data and methods heavily used by all derived equation classes...
Definition: equation_base.h:199
virtual void assemble_cell_residual(FuelCell::ApplicationCore::FEVector &cell_residual, const typename FuelCell::ApplicationCore::DoFApplication< dim >::CellInfo &cell_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
Assemble local cell residual.
Definition: equation_base.h:219
virtual void make_matrix_block_indices()
This function fills out matrix_block_indices of a derived equation class.
Definition: equation_base.h:584
virtual void make_internal_cell_couplings()
This function fills out internal_cell_couplings of a derived equation class.
Definition: equation_base.h:504
component_boundaryID_value_map component_boundaryID_value
This object reflects the following structure (see FuelCell::InitialAndBoundaryData namespace docs): ...
Definition: equation_base.h:851
IMPORTANT: Add all new solution variables and equations here !
Definition: system_management.h:271
This simple structure stores certain information regarding a particular variable for the equation (al...
Definition: equation_base.h:121
couplings_map internal_cell_couplings
This object contains the info on how the equations and solution variables of a derived equation class...
Definition: equation_base.h:824
const std::vector< BoundaryType > & get_boundary_types() const
This function returns boundary_types of a derived equation class.
Definition: equation_base.h:300
virtual void make_assemblers_bdry_variable_data(const typename FuelCell::ApplicationCore::DoFApplication< dim >::FaceInfo &bdry_info, FuelCellShop::Layer::BaseLayer< dim > *const layer)
This function is overridden in the derived equation classes.
Definition: equation_base.h:488
This simple structure describes a boundary type of a derived equation class.
Definition: equation_base.h:62
Definition: dof_application.h:85
virtual void make_internal_flux_couplings()
This function fills out internal_flux_couplings (DG FEM only) of a derived equation class...
Definition: equation_base.h:514
std::string boundary_name
Boundary name.
Definition: equation_base.h:67
std::vector< double > JxW_bdry
Jacobian of mapping by Weight in the quadrature points of a boundary.
Definition: equation_base.h:794
DoFHandler< dim >::active_cell_iterator cell
Currently active DoFHandler<dim> active cell iterator.
Definition: equation_base.h:727
const std::vector< std::vector< BoundaryType > > & get_multi_boundary_types() const
This function returns multi_boundary_types of a derived equation class.
Definition: equation_base.h:310
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:39
const couplings_map & get_internal_flux_couplings() const
This function returns internal_flux_couplings (DG FEM only) of a derived equation class...
Definition: equation_base.h:267
std::vector< bool > counter
This vector contains the collection of internal "counters" used by the derived equation classes...
Definition: equation_base.h:913
Virtual class used to characterize a generic layer interface.
Definition: base_layer.h:58
unsigned int n_q_points_cell
Number of quadrature points per cell.
Definition: equation_base.h:706
std::vector< std::vector< BoundaryType > > multi_boundary_types
The list of multiple boundary types of a derived equation class.
Definition: equation_base.h:865
bool indices_exist
Boolean storing whether indices exist or not.
Definition: equation_base.h:144
std::string equation_name
The name of a derived equation class.
Definition: equation_base.h:885
unsigned int fetype_index
Index corresponding to type of fevalue object used for this variable.
Definition: equation_base.h:137
virtual void make_multi_output_types()
This function fills out multi_output_types of a derived equation class.
Definition: equation_base.h:574