Class providing helper methods and assemble and solve routines for general 2D HHO schemes.
More...
|
| HHO2D::HHO2D (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.
|
|
void | HHO2D::assemble () |
| A general assemble routine that calculates the statically condensed matrices required by solve.
|
|
UVector | HHO2D::solve () |
| Solves the statically condensed system.
|
|
UVector | HHO2D::neumann_solve () |
| Solves the system when the model is ill posed (not yet running)
|
|
double | HHO2D::energy_norm (const UVector) |
| Returns the energy norm of a given UVector.
|
|
void | HHO2D::set_global_operator (const MatrixFType &) |
| Set the global operator.
|
|
void | HHO2D::set_load_vector (const VectorFType &) |
| Set the load vector.
|
|
void | HHO2D::plot (const std::string, const UVector &, const FType< double > &) |
| Plot the numerical and exact solutions.
|
|
VectorFType | HHO2D::standard_load_vector (const CellFType< double > &) |
| Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions.
|
|
VectorFType | HHO2D::standard_load_vector (const CellFType< double > &, const CellFType< VectorRd > &, const BoundaryConditions &) |
| Returns the standard load vector (f, v_T)_T.
|
|
VectorFType | HHO2D::standard_load_vector (const CellFType< double > &, const FType< double > &, const BoundaryConditions &) |
| Returns the standard load vector (f, v_T)_T.
|
|
void | HHO2D::set_dirichlet (const FType< double > &, const size_t) |
| Set the Dirichlet boundary conditions.
|
|
void | HHO2D::set_dirichlet (const size_t) |
| Set the Dirichlet boundary condition to zero.
|
|
Eigen::SparseMatrix< double > | HHO2D::get_SysMat () |
| Return the (statically condensed) matrix system.
|
|
double | HHO2D::get_assembly_time () const |
| CPU time to assemble the scheme.
|
|
double | HHO2D::get_solving_time () const |
| CPU time to solve the scheme.
|
|
double | HHO2D::get_solving_error () const |
| Residual after solving the scheme.
|
|
Class providing helper methods and assemble and solve routines for general 2D HHO schemes.
The HHO2D class contains methods applicable to a general 2D 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.
◆ MatrixFType
type for the global operator as a function of a Cell and an ElementQuad
◆ VectorFType
type for the load vector as a function of a Cell and an ElementQuad
◆ assemble()
A general assemble routine that calculates the statically condensed matrices required by solve.
◆ energy_norm()
double HHO2D::energy_norm |
( |
const UVector |
Xh | ) |
|
Returns the energy norm of a given UVector.
◆ get_assembly_time()
double HHO2D::get_assembly_time |
( |
| ) |
const |
|
inline |
CPU time to assemble the scheme.
◆ get_solving_error()
double HHO2D::get_solving_error |
( |
| ) |
const |
|
inline |
Residual after solving the scheme.
◆ get_solving_time()
double HHO2D::get_solving_time |
( |
| ) |
const |
|
inline |
CPU time to solve the scheme.
◆ get_SysMat()
Eigen::SparseMatrix< double > HHO2D::get_SysMat |
( |
| ) |
|
|
inline |
Return the (statically condensed) matrix system.
◆ HHO2D()
HHO2D::HHO2D |
( |
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.
- Parameters
-
hho | A reference to the HybridCore object containing mesh data |
L | Cell polynomial degree |
K | Edge 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 edge quadrature degree. Default is 2 * K + 1 |
◆ neumann_solve()
Solves the system when the model is ill posed (not yet running)
◆ plot()
void HHO2D::plot |
( |
const std::string |
plot_file, |
|
|
const UVector & |
sol, |
|
|
const FType< double > & |
exact_sol |
|
) |
| |
Plot the numerical and exact solutions.
- Parameters
-
plot_file | Plot file |
sol | Numerical solution |
exact_sol | Exact solution |
◆ set_dirichlet() [1/2]
void HHO2D::set_dirichlet |
( |
const FType< double > & |
f, |
|
|
const size_t |
n_dir_edges |
|
) |
| |
Set the Dirichlet boundary conditions.
- Parameters
-
f | Function on the Dirichlet BC edges |
n_dir_edges | Number of Dirichlet edges |
◆ set_dirichlet() [2/2]
void HHO2D::set_dirichlet |
( |
const size_t |
n_dir_edges | ) |
|
Set the Dirichlet boundary condition to zero.
- Parameters
-
n_dir_edges | Number of Dirichlet edges |
◆ set_global_operator()
void HHO2D::set_global_operator |
( |
const MatrixFType & |
AT | ) |
|
◆ set_load_vector()
◆ solve()
Solves the statically condensed system.
◆ standard_load_vector() [1/3]
Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions.
- Parameters
-
◆ standard_load_vector() [2/3]
Returns the standard load vector (f, v_T)_T.
- Parameters
-
source | Source term |
f | Gradient to be dotted with the normal vector on each Neumann edge |
BC | A reference to the BC to determine Neumann edges |
◆ standard_load_vector() [3/3]
Returns the standard load vector (f, v_T)_T.
- Parameters
-
source | Source term |
f | Function on the Neumann BC edges |
BC | A reference to the BC to determine Neumann edges |