18 #ifndef LIBMESH_VARIATIONAL_SMOOTHER_SYSTEM_H 19 #define LIBMESH_VARIATIONAL_SMOOTHER_SYSTEM_H 22 #include "libmesh/enum_fe_family.h" 23 #include "libmesh/fem_function_base.h" 24 #include "libmesh/fem_system.h" 25 #include "libmesh/libmesh_common.h" 62 std::pair<Real, dof_id_type>
max_elem_det_S{std::numeric_limits<Real>::lowest(),
64 std::pair<Real, dof_id_type>
min_elem_det_S{std::numeric_limits<Real>::max(),
89 const std::string &
name,
105 virtual void assembly (
bool get_residual,
107 bool apply_heterogeneous_constraints =
false,
108 bool apply_no_constraints =
false)
override;
117 virtual void solve()
override;
126 static std::pair<std::unique_ptr<Elem>, std::vector<std::unique_ptr<Node>>>
139 std::vector<RealTensor> & jacobians,
140 std::vector<Real> & jacobian_dets);
218 #endif // LIBMESH_VARIATIONAL_SMOOTHER_SYSTEM_H virtual void init_data() override
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used...
std::pair< Real, dof_id_type > min_elem_dilation
virtual void solve() override
Solves the system to smooth the mesh.
ElemType
Defines an enum for geometric element types.
This is the EquationSystems class.
This class provides all data required for a physics package (e.g.
std::pair< Real, dof_id_type > max_elem_distortion
static constexpr Real TOLERANCE
std::pair< Real, dof_id_type > max_elem_det_S
Real _epsilon_squared_assembly
Epsilon squared value determined at runtime during each assembly.
This is the base class from which all geometric element types are derived.
virtual void assembly(bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
Assembly method to update the mesh based on the smoother solve.
static std::pair< std::unique_ptr< Elem >, std::vector< std::unique_ptr< Node > > > get_target_elem(const ElemType &type)
Get the target element for a given element type.
static void get_target_to_reference_jacobian(const Elem *const target_elem, const FEMContext &femcontext, std::vector< RealTensor > &jacobians, std::vector< Real > &jacobian_dets)
Get the jacobians (and determinants) of the target-to-reference element mapping.
The libMesh namespace provides an interface to certain functionality in the library.
std::pair< Real, dof_id_type > max_elem_combined
This class provides a specific system class.
Real _dilation_weight
The relative weight to give the dilation metric.
std::pair< Real, dof_id_type > min_elem_distortion
Struct to hold smoother-relevant information about the mesh quality.
unsigned int number() const
const MeshQualityInfo & get_mesh_info()
Getter for the _mesh_info attribute.
static const dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
This class provides all data required for a physics package (e.g.
Real & get_dilation_weight()
bool _untangling_solve
Flag to indicate if the current solve is to untangle or smooth.
virtual bool element_time_derivative(bool request_jacobian, libMesh::DiffContext &context) override
Adds the time derivative contribution on elem to elem_residual.
std::pair< Real, dof_id_type > min_elem_combined
Real _ref_vol
The reference volume for each element.
const Real _epsilon_squared
The small nonzero constant to prevent zero denominators (degenerate meshes only)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< ElemType, std::vector< Real > > _target_jacobian_dets
std::pair< Real, dof_id_type > min_elem_det_S
VariationalSmootherSystem(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
This is an FEMSystem to solve the optimization probelem posed by the VariationalMeshSmoother class...
virtual void init_context(libMesh::DiffContext &context) override
void compute_mesh_quality_info()
const std::string & name() const
std::map< ElemType, std::vector< RealTensor > > _target_jacobians
~VariationalSmootherSystem() override
void prepare_for_smoothing()
MeshQualityInfo _mesh_info
Information about the mesh quality.
std::pair< Real, dof_id_type > max_elem_dilation