21 #include "libmesh/libmesh_config.h" 23 #if defined(LIBMESH_HAVE_EIGEN_DENSE) && defined(LIBMESH_HAVE_PETSC) 25 #include "libmesh/nonlinear_implicit_system.h" 26 #include "libmesh/fe.h" 33 class StaticCondensation;
90 const unsigned int ivar_num,
91 const unsigned int jvar_num,
95 const std::vector<Real> & JxW_local,
96 const std::vector<std::vector<Real>> & phi,
97 const std::vector<Number> & sol,
98 const std::size_t n_dofs,
102 const std::vector<Real> & JxW_local,
103 const std::vector<std::vector<Real>> & phi,
104 const std::size_t n_dofs,
108 const unsigned int vel_component,
109 std::vector<Gradient> & sigma);
112 const std::vector<Number> & scalar_sol,
118 const std::vector<Number> & v_sol_local,
119 const unsigned int qp,
120 const unsigned int vel_component)
const;
123 const std::vector<Number> & v_sol_local,
124 const unsigned int qp,
125 const unsigned int vel_component,
126 const unsigned int vel_j_component,
127 const std::vector<std::vector<Real>> & phi,
128 const unsigned int j)
const;
131 const unsigned int vel_component,
132 std::vector<Gradient> & sigma,
163 const std::vector<Number> & scalar_sol,
164 const unsigned int vel_component,
173 const std::vector<Number> & scalar_sol,
174 const std::vector<Number> & lm_sol,
175 const unsigned int vel_component,
187 const std::vector<Number> & scalar_sol,
188 const std::vector<Number> & lm_sol,
189 const unsigned int vel_component,
201 const std::vector<Real> *
JxW;
203 const std::vector<std::vector<RealVectorValue>> *
vector_phi;
217 std::unordered_map<unsigned int, std::vector<dof_id_type>>
dof_indices;
265 #endif // HDG_PROBLEM_H
const std::vector< std::vector< Real > > * scalar_phi_face
void scalar_face_jacobian(const unsigned int vel_component, DenseMatrix< Number > &Jsq, DenseMatrix< Number > &Jsp, DenseMatrix< Number > &Jss, DenseMatrix< Number > &Jslm, DenseMatrix< Number > &Js_lmu, DenseMatrix< Number > &Js_lmv)
NumberVectorValue vel_cross_vel_residual(const std::vector< Number > &u_sol_local, const std::vector< Number > &v_sol_local, const unsigned int qp, const unsigned int vel_component) const
boundary_id_type bottom_bnd
std::unique_ptr< QBase > qface
HDGProblem(const Real nu_in, const bool cavity_in)
void create_identity_jacobian(const QBase &quadrature, const std::vector< Real > &JxW_local, const std::vector< std::vector< Real >> &phi, const std::size_t n_dofs, DenseMatrix< Number > &J)
const std::vector< std::vector< Real > > * scalar_phi
void vector_face_residual(const std::vector< Number > &lm_sol, DenseVector< Number > &R)
const std::vector< std::vector< RealVectorValue > > * vector_phi_face
void lm_face_jacobian(const unsigned int vel_component, DenseMatrix< Number > &Jlmq, DenseMatrix< Number > &Jlmp, DenseMatrix< Number > &Jlms, DenseMatrix< Number > &Jlmlm, DenseMatrix< Number > &Jlm_lmu, DenseMatrix< Number > &Jlm_lmv)
void pressure_face_residual(DenseVector< Number > &R)
std::vector< Gradient > sigma_u
const std::vector< std::vector< RealVectorValue > > * vector_phi
void scalar_face_residual(const std::vector< Gradient > &vector_sol, const std::vector< Number > &scalar_sol, const std::vector< Number > &lm_sol, const unsigned int vel_component, DenseVector< Number > &R)
std::unique_ptr< FEVectorBase > vector_fe
void vector_volume_residual(const std::vector< Gradient > &vector_sol, const std::vector< Number > &scalar_sol, DenseVector< Number > &R)
boundary_id_type current_bnd
std::unique_ptr< FEBase > lm_fe_face
std::vector< Number > v_sol
std::vector< Number > p_sol
This is the base class from which all geometric element types are derived.
void compute_stress(const std::vector< Gradient > &vel_gradient, const unsigned int vel_component, std::vector< Gradient > &sigma)
std::unique_ptr< FEBase > scalar_fe
void scalar_volume_residual(const std::vector< Gradient > &vel_gradient, const unsigned int vel_component, std::vector< Gradient > &sigma, DenseVector< Number > &R)
std::vector< Number > v_dof_values
void scalar_volume_jacobian(const unsigned int vel_component, DenseMatrix< Number > &Jsq, DenseMatrix< Number > &Jsp, DenseMatrix< Number > &Jsu, DenseMatrix< Number > &Jsv)
void pressure_volume_residual(DenseVector< Number > &Rp, DenseVector< Number > &Rglm)
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
The libMesh namespace provides an interface to certain functionality in the library.
const std::vector< Real > * JxW_face
This is the MeshBase class.
const std::vector< Real > * JxW
const std::vector< std::vector< Real > > * div_vector_phi
This class handles the numbering of degrees of freedom on a mesh.
const std::vector< Point > * q_point
Abstract base class to be used to calculate the residual of a nonlinear system.
void create_identity_residual(const QBase &quadrature, const std::vector< Real > &JxW_local, const std::vector< std::vector< Real >> &phi, const std::vector< Number > &sol, const std::size_t n_dofs, DenseVector< Number > &R)
virtual void residual(const NumericVector< Number > &X, NumericVector< Number > &R, NonlinearImplicitSystem &S) override
std::vector< Number > lm_u_sol
Abstract base class to be used to calculate the Jacobian of a nonlinear system.
std::unordered_map< unsigned int, std::vector< dof_id_type > > dof_indices
std::vector< Number > qv_dof_values
Manages consistently variables, degrees of freedom, and coefficient vectors.
std::size_t global_lm_n_dofs
std::vector< Number > p_dof_values
static constexpr Real tau
std::unique_ptr< QBase > qrule
std::vector< Number > lm_v_sol
const std::vector< std::vector< Real > > * lm_phi_face
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and non-linear solv...
void lm_face_residual(const std::vector< Gradient > &vector_sol, const std::vector< Number > &scalar_sol, const std::vector< Number > &lm_sol, const unsigned int vel_component, DenseVector< Number > &R)
std::vector< Number > u_sol
std::unique_ptr< FEBase > scalar_fe_face
void add_matrix(NonlinearImplicitSystem &sys, const unsigned int ivar_num, const unsigned int jvar_num, const DenseMatrix< Number > &elem_mat)
std::vector< Number > u_dof_values
virtual void jacobian(const NumericVector< Number > &X, SparseMatrix< Number > &, NonlinearImplicitSystem &S) override
void pressure_dirichlet_residual(DenseVector< Number > &R)
RealVectorValue get_dirichlet_velocity(const unsigned int qp) const
void scalar_dirichlet_jacobian(const unsigned int vel_component, DenseMatrix< Number > &Jsq, DenseMatrix< Number > &Jsp, DenseMatrix< Number > &Jss)
std::vector< Gradient > qu_sol
const std::vector< Point > * normals
std::vector< Gradient > qv_sol
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Number > qu_dof_values
void vector_volume_jacobian(DenseMatrix< Number > &Jqq, DenseMatrix< Number > &Jqs)
void pressure_face_jacobian(DenseMatrix< Number > &Jplm_u, DenseMatrix< Number > &Jplm_v)
boundary_id_type left_bnd
std::vector< Number > lm_u_dof_values
const std::vector< Point > * qface_point
Number global_lm_dof_value
void pressure_volume_jacobian(DenseMatrix< Number > &Jpu, DenseMatrix< Number > &Jpv, DenseMatrix< Number > &Jpglm, DenseMatrix< Number > &Jglmp)
void vector_face_jacobian(DenseMatrix< Number > &Jqlm)
std::vector< Number > lm_v_dof_values
const std::vector< std::vector< RealVectorValue > > * grad_scalar_phi
std::size_t scalar_n_dofs
std::size_t vector_n_dofs
void vector_dirichlet_residual(const unsigned int vel_component, DenseVector< Number > &R)
std::vector< Gradient > sigma_v
boundary_id_type right_bnd
The QBase class provides the basic functionality from which various quadrature rules can be derived...
std::unique_ptr< FEVectorBase > vector_fe_face
void scalar_dirichlet_residual(const std::vector< Gradient > &vector_sol, const std::vector< Number > &scalar_sol, const unsigned int vel_component, DenseVector< Number > &R)
std::vector< Number > qbar
NumberVectorValue vel_cross_vel_jacobian(const std::vector< Number > &u_sol_local, const std::vector< Number > &v_sol_local, const unsigned int qp, const unsigned int vel_component, const unsigned int vel_j_component, const std::vector< std::vector< Real >> &phi, const unsigned int j) const