16#include <boost/timer/timer.hpp>
123 return double(assembly_time) * pow(10, -9);
129 return double(solving_time) * pow(10, -9);
135 return solving_error;
142 const bool m_use_threads;
151 const size_t n_cells = mesh_ptr->
n_cells();
152 const size_t n_faces = mesh_ptr->
n_faces();
157 const size_t n_total_cell_dofs = n_local_cell_dofs * n_cells;
158 const size_t n_total_face_dofs = n_local_face_dofs * n_faces;
159 const size_t n_total_dofs = n_total_cell_dofs + n_total_face_dofs;
161 double solving_error;
163 size_t assembly_time;
165 std::vector<Eigen::MatrixXd> AT;
167 Eigen::VectorXd GlobRHS = Eigen::VectorXd::Zero(n_total_face_dofs);
168 Eigen::VectorXd ScRHS = Eigen::VectorXd::Zero(n_total_cell_dofs);
169 Eigen::VectorXd UDir;
171 Eigen::SparseMatrix<double> GlobMat;
172 Eigen::SparseMatrix<double> SysMat;
173 Eigen::SparseMatrix<double> ScBeMat;
The BoundaryConditions class provides definition of boundary conditions.
Definition BoundaryConditions.hpp:129
Definition elementquad.hpp:55
Definition hybridcore.hpp:174
Definition hybridcore.hpp:87
Class to describe a mesh.
Definition MeshND.hpp:17
std::function< T(const VectorRd &, const Cell *)> CellFType
type for function of point. T is the return type of the function
Definition basis.hpp:58
std::function< T(const VectorRd &)> FType
type for function of point. T is the return type of the function
Definition basis.hpp:55
@ Matrix
Definition basis.hpp:67
std::function< Eigen::VectorXd(Cell *, ElementQuad &)> VectorFType
type for the load vector as a function of a Cell and an ElementQuad
Definition HHO3D.hpp:42
void set_dirichlet(const FType< double > &, const size_t)
Set the Dirichlet boundary conditions.
Definition HHO3D.cpp:166
double get_solving_error() const
Residual after solving the scheme.
Definition HHO3D.hpp:133
std::function< Eigen::MatrixXd(Cell *, ElementQuad &)> MatrixFType
type for the global operator as a function of a Cell and an ElementQuad
Definition HHO3D.hpp:41
double get_assembly_time() const
CPU time to assemble the scheme.
Definition HHO3D.hpp:121
Eigen::SparseMatrix< double > get_SysMat()
Return the (statically condensed) matrix system.
Definition HHO3D.hpp:115
void set_load_vector(const VectorFType &)
Set the load vector.
Definition HHO3D.cpp:27
void plot(const std::string, const UVector &, const FType< double > &)
Plot the numerical and exact solutions.
Definition HHO3D.cpp:34
UVector solve()
Solves the statically condensed system.
Definition HHO3D.cpp:270
UVector neumann_solve()
Solves the system when the model is ill posed (not yet running)
void assemble()
A general assemble routine that calculates the statically condensed matrices required by solve.
Definition HHO3D.cpp:184
double energy_norm(const UVector)
Returns the energy norm of a given UVector.
Definition HHO3D.cpp:319
double get_solving_time() const
CPU time to solve the scheme.
Definition HHO3D.hpp:127
void set_global_operator(const MatrixFType &)
Set the global operator.
Definition HHO3D.cpp:20
VectorFType standard_load_vector(const CellFType< double > &)
Returns the standard load vector (f, v_T)_T with no Neumann boundary conditions.
Definition HHO3D.cpp:65
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
const size_t DimPoly< Face >(const int m)
Compute the size of the basis of 2-variate polynomials up to degree m.
Definition hybridcore.hpp:68
const Mesh * get_mesh() const
Returns a pointer to the mesh.
Definition hybridcore.hpp:198
const size_t DimPoly< Cell >(const int m)
Compute the size of the basis of 3-variate polynomials up to degree m.
Definition hybridcore.hpp:61
std::size_t n_faces() const
number of faces in the mesh.
Definition MeshND.hpp:59
std::size_t n_cells() const
number of cells in the mesh.
Definition MeshND.hpp:60