16#include <boost/timer/timer.hpp>
125 return double(assembly_time) * pow(10, -9);
131 return double(solving_time) * pow(10, -9);
137 return solving_error;
144 const bool m_use_threads;
153 const size_t n_cells = mesh_ptr->
n_cells();
154 const size_t n_edges = mesh_ptr->
n_edges();
159 const size_t n_total_cell_dofs = n_local_cell_dofs * n_cells;
160 const size_t n_total_edge_dofs = n_local_edge_dofs * n_edges;
161 const size_t n_total_dofs = n_total_cell_dofs + n_total_edge_dofs;
163 double solving_error;
165 size_t assembly_time;
167 std::vector<Eigen::MatrixXd> AT;
169 Eigen::VectorXd GlobRHS = Eigen::VectorXd::Zero(n_total_edge_dofs);
170 Eigen::VectorXd ScRHS = Eigen::VectorXd::Zero(n_total_cell_dofs);
171 Eigen::VectorXd UDir;
173 Eigen::SparseMatrix<double> GlobMat;
174 Eigen::SparseMatrix<double> SysMat;
175 Eigen::SparseMatrix<double> ScBeMat;
std::function< T(const VectorRd &, const Cell *)> CellFType
type for function of a point, that could be discontinuous between cells. T is the type of value of th...
Definition TestCase.hpp:42
The BoundaryConditions class provides definition of boundary conditions.
Definition BoundaryConditions.hpp:45
Definition elementquad.hpp:49
Definition hybridcore.hpp:179
Definition hybridcore.hpp:82
std::function< T(const VectorRd &)> FType
type for function of point. T is the type of value of the function
Definition basis.hpp:62
void assemble()
A general assemble routine that calculates the statically condensed matrices required by solve.
Definition HHO2D.cpp:219
void set_load_vector(const VectorFType &)
Set the load vector.
Definition HHO2D.cpp:34
std::function< Eigen::VectorXd(Cell *, ElementQuad &)> VectorFType
type for the load vector as a function of a Cell and an ElementQuad
Definition HHO2D.hpp:44
VectorFType standard_load_vector(const CellFType< double > &)
Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions.
Definition HHO2D.cpp:75
std::function< Eigen::MatrixXd(Cell *, ElementQuad &)> MatrixFType
type for the global operator as a function of a Cell and an ElementQuad
Definition HHO2D.hpp:43
double get_solving_time() const
CPU time to solve the scheme.
Definition HHO2D.hpp:129
double get_solving_error() const
Residual after solving the scheme.
Definition HHO2D.hpp:135
void set_global_operator(const MatrixFType &)
Set the global operator.
Definition HHO2D.cpp:26
UVector neumann_solve()
Solves the system when the model is ill posed (not yet running)
double energy_norm(const UVector)
Returns the energy norm of a given UVector.
Definition HHO2D.cpp:368
void set_dirichlet(const FType< double > &, const size_t)
Set the Dirichlet boundary conditions.
Definition HHO2D.cpp:200
Eigen::SparseMatrix< double > get_SysMat()
Return the (statically condensed) matrix system.
Definition HHO2D.hpp:117
void plot(const std::string, const UVector &, const FType< double > &)
Plot the numerical and exact solutions.
Definition HHO2D.cpp:42
double get_assembly_time() const
CPU time to assemble the scheme.
Definition HHO2D.hpp:123
UVector solve()
Solves the statically condensed system.
Definition HHO2D.cpp:312
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
const size_t DimPoly< Cell >(const int m)
Compute the size of the basis of 2-variate polynomials up to degree m.
Definition hybridcore.hpp:63
const Mesh * get_mesh() const
Returns a pointer to the mesh.
Definition hybridcore.hpp:201
const size_t DimPoly< Edge >(const int m)
Compute the size of the basis of 1-variate polynomials up to degree m.
Definition hybridcore.hpp:70
std::size_t n_cells() const
number of cells in the mesh.
Definition Mesh2D.hpp:63
std::size_t n_edges() const
number of edges in the mesh.
Definition Mesh2D.hpp:61