22#ifndef HHOFULLGRADIENTDIFF_HPP
23#define HHOFULLGRADIENTDIFF_HPP
27#include <boost/math/constants/constants.hpp>
29#include <Eigen/Sparse>
30#include <unsupported/Eigen/SparseExtra>
68 std::ostream & output = std::cout
76 Eigen::VectorXd & UDir
112 return m_hhospace.
mesh();
157 const std::vector<Eigen::VectorXd> & list_dofs
162 std::pair<Eigen::MatrixXd, Eigen::VectorXd>
163 _compute_local_contribution(
173 void _assemble_local_contribution(
175 const std::pair<Eigen::MatrixXd, Eigen::VectorXd> & lsT,
176 std::list<Eigen::Triplet<double> > & A1,
177 Eigen::VectorXd & b1,
178 std::list<Eigen::Triplet<double> > & A2,
185 std::ostream & m_output;
186 const size_t m_nloc_sc;
190 Eigen::VectorXd m_sc_b;
198 static const double PI = boost::math::constants::pi<double>();
208 return vec_a.dot(x) + 4.;
229 return sin(
PI*x(0)) * sin(
PI*x(1));
235 cos(
PI*x(0)) * sin(
PI*x(1)) * sin(
PI*x(2)),
236 sin(
PI*x(0)) * cos(
PI*x(1)) * sin(
PI*x(2))
The BoundaryConditions class provides definition of boundary conditions.
Definition BoundaryConditions.hpp:45
const size_t n_dir_edges() const
Returns the number of Dirichlet edges.
Definition BoundaryConditions.hpp:70
Class definition: polynomial bases and operators.
Definition hhospace.hpp:53
Eigen::Vector2d VectorRd
Definition basis.hpp:55
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition localdofspace.hpp:61
size_t numLocalDofsEdge() const
Returns the number of local edge DOFs.
Definition localdofspace.hpp:45
static KirchhoffLove::DeflectionType trigonometric_u
Definition ddr-klplate.hpp:197
static const double PI
Definition ddr-klplate.hpp:187
const Mesh & mesh() const
Return a const reference to the mesh.
Definition hhospace.hpp:114
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
Eigen::VectorXd & scVector()
Returns the static condensation rhs.
Definition hho-fullgradientdiff.hpp:151
static FullGradientDiffusion::PermeabilityType trigonometric_kappa
Definition hho-fullgradientdiff.hpp:246
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition hho-fullgradientdiff.hpp:121
static FullGradientDiffusion::SolutionGradientType linear_gradu
Definition hho-fullgradientdiff.hpp:212
std::vector< double > computeEnergyNorms(const std::vector< Eigen::VectorXd > &list_dofs) const
Compute the discrete energy norm of a family of vectors representing the dofs.
Definition hho-fullgradientdiff.cpp:421
IntegralWeight PermeabilityType
Definition hho-fullgradientdiff.hpp:61
const SystemMatrixType & scMatrix() const
Returns the static condensation recovery operator.
Definition hho-fullgradientdiff.hpp:146
size_t numSkeletalDOFs() const
Returns the number of DOFs after SC but before eliminating Dirichlet DOFs.
Definition hho-fullgradientdiff.hpp:92
const double & stabilizationParameter() const
Returns the stabilization parameter (scaling)
Definition hho-fullgradientdiff.hpp:136
static FullGradientDiffusion::PermeabilityType linear_kappa
Definition hho-fullgradientdiff.hpp:222
std::function< double(const VectorRd &)> SolutionType
Definition hho-fullgradientdiff.hpp:59
const HHOSpace & hhospace() const
Returns the HHO space.
Definition hho-fullgradientdiff.hpp:104
size_t numDirDOFs() const
Returns the number of Dirichlet DOFs.
Definition hho-fullgradientdiff.hpp:86
std::function< double(const VectorRd &)> ForcingTermType
Definition hho-fullgradientdiff.hpp:58
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition hho-fullgradientdiff.hpp:126
static FullGradientDiffusion::SolutionGradientType trigonometric_gradu
Definition hho-fullgradientdiff.hpp:233
std::function< VectorRd(const VectorRd &)> SolutionGradientType
Definition hho-fullgradientdiff.hpp:60
static const VectorRd vec_a
Definition hho-fullgradientdiff.hpp:204
const Mesh & mesh() const
Returns the mesh.
Definition hho-fullgradientdiff.hpp:110
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition hho-fullgradientdiff.hpp:131
size_t sizeSystem() const
Returns the size of the final system, after application of SC and removal of Dirichlet BCs.
Definition hho-fullgradientdiff.hpp:98
Eigen::SparseMatrix< double > SystemMatrixType
Definition hho-fullgradientdiff.hpp:56
size_t numSCDOFs() const
Returns the number of statically condensed DOFs (the cell DOFs)
Definition hho-fullgradientdiff.hpp:80
double & stabilizationParameter()
Returns the stabilization parameter.
Definition hho-fullgradientdiff.hpp:141
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition hho-fullgradientdiff.hpp:116
void assembleLinearSystem(const ForcingTermType &f, const PermeabilityType &kappa, const SolutionType &u, Eigen::VectorXd &UDir)
Assemble the global system
Definition hho-fullgradientdiff.cpp:258
std::size_t n_cells() const
number of cells in the mesh.
Definition Mesh2D.hpp:63
Definition ddr-klplate.hpp:27
static QuadRot::PotentialType linear_u
Definition ddr-quadrot.hpp:200
static QuadRot::ForcingTermType trigonometric_f
Definition ddr-quadrot.hpp:367
static QuadRot::ForcingTermType linear_f
Definition ddr-quadrot.hpp:222
Assemble a diffusion problem.
Definition hho-fullgradientdiff.hpp:55
Structure for weights (scalar, at the moment) in integral.
Definition integralweight.hpp:33
Structure to store information for, and perform, local static condensation.
Definition local_static_condensation.hpp:25