27#include <boost/math/constants/constants.hpp>
29#include <Eigen/Sparse>
30#include <unsupported/Eigen/SparseExtra>
76 std::ostream & output = std::cout
85 Eigen::VectorXd & UDir,
165 return m_vhhospace.
mesh();
212 const int doe_cell = -1,
213 const int doe_face = -1
218 const std::vector<Eigen::VectorXd> & list_dofs
223 const Eigen::VectorXd & p
228 std::pair<Eigen::MatrixXd, Eigen::VectorXd>
229 _compute_local_contribution(
234 const Eigen::VectorXd & u0,
235 const double & time_step
242 void _assemble_local_contribution(
244 const std::pair<Eigen::MatrixXd, Eigen::VectorXd> & lsT,
245 std::list<Eigen::Triplet<double> > & A1,
246 Eigen::VectorXd & b1,
247 std::list<Eigen::Triplet<double> > & A2,
257 std::ostream & m_output;
258 const size_t m_nloc_sc_u;
259 const size_t m_nloc_sc_p;
263 Eigen::VectorXd m_sc_b;
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
Base class for global DOF spaces. Provides functions to manipulate global DOFs (the local version bei...
Definition globaldofspace.hpp:16
Class definition: polynomial bases and operators.
Definition vhhospace.hpp:52
Eigen::Vector2d VectorRd
Definition basis.hpp:55
Eigen::Matrix2d MatrixRd
Definition basis.hpp:54
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
const Mesh & mesh() const
Return a const reference to the mesh.
Definition vhhospace.hpp:140
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
std::size_t n_cells() const
number of cells in the mesh.
Definition Mesh2D.hpp:63
Definition ddr-klplate.hpp:27
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
Class for Stokes model.
Definition hho-stokes.hpp:59
Stokes(const VHHOSpace &vhho_space, const GlobalDOFSpace &p_space, const BoundaryConditions &BC, bool use_threads, std::ostream &output=std::cout)
Constructor.
Eigen::VectorXd & scVector()
Returns the static condensation rhs.
Definition hho-ustokes.hpp:204
const VHHOSpace & vhhospace() const
Returns the velocity space.
Definition hho-ustokes.hpp:151
std::function< VectorRd(const VectorRd &)> VelocityType
Definition hho-ustokes.hpp:64
SystemMatrixType & systemMatrix()
Returns the linear system matrix.
Definition hho-ustokes.hpp:174
std::function< double(const VectorRd &)> PressureType
Definition hho-ustokes.hpp:66
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.
std::function< MatrixRd(const VectorRd &)> VelocityGradientType
Definition hho-ustokes.hpp:65
Eigen::VectorXd interpolate(const VelocityType &u, const PressureType &p, const int doe_cell=-1, const int doe_face=-1) const
Interpolates velocity and pressure.
Eigen::VectorXd & systemVector()
Returns the linear system right-hand side vector.
Definition hho-ustokes.hpp:184
const Eigen::VectorXd & systemVector() const
Returns the linear system right-hand side vector.
Definition hho-ustokes.hpp:179
std::function< VectorRd(const VectorRd &)> PressureGradientType
Definition hho-ustokes.hpp:67
size_t numSCDOFs_u() const
Returns the number of velocity statically condensed DOFs.
Definition hho-ustokes.hpp:103
const GlobalDOFSpace & pspace() const
Returns the pressure space.
Definition hho-ustokes.hpp:157
size_t nloc_sc_u() const
Returns the local number of velocity statically condensed DOFs.
Definition hho-ustokes.hpp:91
Eigen::VectorXd pressureVertexValues(const Eigen::VectorXd &p) const
Create vertex values for the pressure (from the element values), for plotting.
Definition hho-ustokes.cpp:690
const Mesh & mesh() const
Returns the mesh.
Definition hho-ustokes.hpp:163
Eigen::SparseMatrix< double > SystemMatrixType
Definition hho-ustokes.hpp:60
std::function< double(const VectorRd &)> CompressibilityForcingTermType
Definition hho-ustokes.hpp:63
size_t nloc_sc_p() const
Returns the local number of pressure statically condensed DOFs.
Definition hho-ustokes.hpp:97
void assembleLinearSystem(const MomentumForcingTermType &f, const CompressibilityForcingTermType &g, const ViscosityType &mu, const VelocityType &u, Eigen::VectorXd &UDir)
Assemble the global system
Definition hho-stokes.cpp:292
const SystemMatrixType & systemMatrix() const
Returns the linear system matrix.
Definition hho-ustokes.hpp:169
size_t dimPressure() const
Returns the dimension of pressure space.
Definition hho-ustokes.hpp:133
size_t dimVelocity() const
Returns the dimension of velocity space.
Definition hho-ustokes.hpp:127
double & stabilizationParameter()
Returns the stabilization parameter.
Definition hho-ustokes.hpp:194
size_t numDirDOFs() const
Returns the number of Dirichlet DOFs.
Definition hho-ustokes.hpp:121
size_t numSCDOFs() const
Returns the number of statically condensed DOFs.
Definition hho-ustokes.hpp:115
size_t sizeSystem() const
Returns the size of the final system with Lagrange multiplier, after application of SC and removal of...
Definition hho-ustokes.hpp:145
const double & stabilizationParameter() const
Returns the stabilization parameter (scaling)
Definition hho-ustokes.hpp:189
IntegralWeight ViscosityType
Definition hho-ustokes.hpp:68
const SystemMatrixType & scMatrix() const
Returns the static condensation recovery operator.
Definition hho-ustokes.hpp:199
size_t numNonSCDOFs() const
Returns the number of DOFs after SC and with Lagrange multiplier, but before eliminating Dirichlet DO...
Definition hho-ustokes.hpp:139
size_t numSCDOFs_p() const
Returns the number of pressure statically condensed DOFs.
Definition hho-ustokes.hpp:109
std::function< VectorRd(const VectorRd &)> MomentumForcingTermType
Definition hho-ustokes.hpp:62