|
HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
|
Class providing helper methods and assemble and solve routines for general 3D HHO schemes. More...
Classes | |
| class | HHO3D |
Typedefs | |
| typedef std::function< Eigen::MatrixXd(Cell *, ElementQuad &)> | MatrixFType |
| type for the global operator as a function of a Cell and an ElementQuad More... | |
| typedef std::function< Eigen::VectorXd(Cell *, ElementQuad &)> | VectorFType |
| type for the load vector as a function of a Cell and an ElementQuad More... | |
Functions | |
| HHO3D::HHO3D (HybridCore &, const size_t, const size_t, const bool use_threads=true, size_t doeT=0, size_t doeF=0) | |
| Class constructor: initialises the model by providing a HybridCore object, and the exact solution and boundary conditions of the model. More... | |
| void | HHO3D::assemble () |
| A general assemble routine that calculates the statically condensed matrices required by solve. More... | |
| UVector | HHO3D::solve () |
| Solves the statically condensed system. More... | |
| UVector | HHO3D::neumann_solve () |
| Solves the system when the model is ill posed (not yet running) More... | |
| double | HHO3D::energy_norm (const UVector) |
| Returns the energy norm of a given UVector. More... | |
| void | HHO3D::set_global_operator (const MatrixFType &) |
| Set the global operator. More... | |
| void | HHO3D::set_load_vector (const VectorFType &) |
| Set the load vector. More... | |
| void | HHO3D::plot (const std::string, const UVector &, const FType< double > &) |
| Plot the numerical and exact solutions. More... | |
| VectorFType | HHO3D::standard_load_vector (const CellFType< double > &) |
| Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions. More... | |
| VectorFType | HHO3D::standard_load_vector (const CellFType< double > &, const CellFType< VectorRd > &, const BoundaryConditions &) |
| Returns the standard load vector (f, v_T)_T. More... | |
| VectorFType | HHO3D::standard_load_vector (const CellFType< double > &, const FType< double > &, const BoundaryConditions &) |
| Returns the standard load vector (f, v_T)_T. More... | |
| void | HHO3D::set_dirichlet (const FType< double > &, const size_t) |
| Set the Dirichlet boundary conditions. More... | |
| void | HHO3D::set_dirichlet (const size_t) |
| Set the Dirichlet boundary condition to zero. More... | |
| Eigen::SparseMatrix< double > | HHO3D::get_SysMat () |
| Return the (statically condensed) matrix system. More... | |
| double | HHO3D::get_assembly_time () const |
| CPU time to assemble the scheme. More... | |
| double | HHO3D::get_solving_time () const |
| CPU time to solve the scheme. More... | |
| double | HHO3D::get_solving_error () const |
| Residual after solving the scheme. More... | |
Class providing helper methods and assemble and solve routines for general 3D HHO schemes.
| typedef std::function<Eigen::MatrixXd(Cell *, ElementQuad &)> MatrixFType |
type for the global operator as a function of a Cell and an ElementQuad
The HHO3D class contains methods applicable to a general 3D HHO model. It contains assemble and solve routines usable by any scheme. The global operator and load vector are passed to the model through setters and are then accessible by assemble and solve. The class also contains helper methods for writing HHO schemes.
| typedef std::function<Eigen::VectorXd(Cell *, ElementQuad &)> VectorFType |
type for the load vector as a function of a Cell and an ElementQuad
| void HHO3D::assemble | ( | ) |
A general assemble routine that calculates the statically condensed matrices required by solve.
| double HHO3D::energy_norm | ( | const UVector | Xh | ) |
Returns the energy norm of a given UVector.
|
inline |
CPU time to assemble the scheme.
|
inline |
Residual after solving the scheme.
|
inline |
CPU time to solve the scheme.
|
inline |
Return the (statically condensed) matrix system.
| HHO3D::HHO3D | ( | HybridCore & | hho, |
| const size_t | L, | ||
| const size_t | K, | ||
| const bool | use_threads = true, |
||
| size_t | doeT = 0, |
||
| size_t | doeF = 0 |
||
| ) |
Class constructor: initialises the model by providing a HybridCore object, and the exact solution and boundary conditions of the model.
| hho | A reference to the HybridCore object containing mesh data |
| L | Cell polynomial degree |
| K | Face polynomial degree |
| use_threads | Optional argument to indicate if threads should be used |
| doeT | Optional argument to set cell quadrature degree. Default is L + K + 1 |
| doeF | Optional argument to set face quadrature degree. Default is 2 * K + 1 |
| UVector HHO3D::neumann_solve | ( | ) |
Solves the system when the model is ill posed (not yet running)
| void HHO3D::plot | ( | const std::string | plot_file, |
| const UVector & | sol, | ||
| const FType< double > & | exact_sol | ||
| ) |
Plot the numerical and exact solutions.
| plot_file | Plot file |
| sol | Numerical solution |
| exact_sol | Exact solution |
| void HHO3D::set_dirichlet | ( | const FType< double > & | f, |
| const size_t | n_dir_faces | ||
| ) |
Set the Dirichlet boundary conditions.
| f | Function on the Dirichlet BC faces |
| n_dir_faces | Number of Dirichlet faces |
| void HHO3D::set_dirichlet | ( | const size_t | n_dir_faces | ) |
Set the Dirichlet boundary condition to zero.
| n_dir_faces | Number of Dirichlet faces |
| void HHO3D::set_global_operator | ( | const MatrixFType & | AT | ) |
Set the global operator.
| void HHO3D::set_load_vector | ( | const VectorFType & | bT | ) |
Set the load vector.
| UVector HHO3D::solve | ( | ) |
Solves the statically condensed system.
| VectorFType HHO3D::standard_load_vector | ( | const CellFType< double > & | source | ) |
Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions.
| source | Source term |
| VectorFType HHO3D::standard_load_vector | ( | const CellFType< double > & | source, |
| const CellFType< VectorRd > & | f, | ||
| const BoundaryConditions & | BC | ||
| ) |
Returns the standard load vector (f, v_T)_T.
| source | Source term |
| f | Gradient to be dotted with the normal vector on each Neumann face |
| BC | A reference to the BC to determine Neumann faces |
| VectorFType HHO3D::standard_load_vector | ( | const CellFType< double > & | source, |
| const FType< double > & | f, | ||
| const BoundaryConditions & | BC | ||
| ) |
Returns the standard load vector (f, v_T)_T.
| source | Source term |
| f | Function on the Neumann BC faces |
| BC | A reference to the BC to determine Neumann faces |