18 #include "libmesh/libmesh_config.h" 19 #if defined(LIBMESH_ENABLE_VSMOOTHER) 22 #include "libmesh/mesh_smoother_vsmoother.h" 23 #include "libmesh/mesh_tools.h" 24 #include "libmesh/elem.h" 25 #include "libmesh/unstructured_mesh.h" 26 #include "libmesh/utility.h" 27 #include "libmesh/boundary_info.h" 28 #include "libmesh/equation_systems.h" 29 #include "libmesh/distributed_mesh.h" 30 #include "libmesh/steady_solver.h" 31 #include "libmesh/diff_solver.h" 32 #include "libmesh/variational_smoother_constraint.h" 33 #include "libmesh/parallel_ghost_sync.h" 47 #ifdef __INTEL_COMPILER 48 # pragma optimize ( "", off ) 54 const bool preserve_subdomain_boundaries) :
56 _dilation_weight(dilation_weight),
57 _preserve_subdomain_boundaries(preserve_subdomain_boundaries)
65 libmesh_not_implemented_msg(
"Meshes containing elements of differing dimension are not yet supported.");
111 std::make_unique<SteadySolver>(sys);
130 for (
auto * node_copy : mesh_copy.local_node_ptr_range())
134 node(d) = (*node_copy)(d);
143 #endif // defined(LIBMESH_ENABLE_VSMOOTHER)
This is the EquationSystems class.
const Real _dilation_weight
Smoother control variables.
Constraint class for the VariationalMeshSmoother.
static constexpr Real TOLERANCE
std::unique_ptr< TimeSolver > time_solver
A pointer to the solver object we're going to use.
const Parallel::Communicator & comm() const
The libMesh namespace provides an interface to certain functionality in the library.
void attach_constraint_object(Constraint &constrain)
Register a user object for imposing constraints.
The UnstructuredMesh class is derived from the MeshBase class.
Real & get_dilation_weight()
const std::set< unsigned char > & elem_dimensions() const
void sync_dofobject_data_by_id(const Communicator &comm, const Iterator &range_begin, const Iterator &range_end, SyncFunctor &sync)
Request data about a range of ghost dofobjects uniquely identified by their id.
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
unsigned int mesh_dimension() const
virtual void solve() override
Invokes the solver associated with the system.
VariationalMeshSmoother(UnstructuredMesh &mesh, Real dilation_weight=0.5, const bool preserve_subdomain_boundaries=true)
Simple constructor to use for smoothing purposes.
virtual const Node & node_ref(const dof_id_type i) const
This class provides the necessary interface for mesh smoothing.
virtual void init()
Initialize all the systems.
virtual System & add_system(std::string_view system_type, std::string_view name)
Add the system of type system_type named name to the systems array.
const bool _preserve_subdomain_boundaries
Whether subdomain boundaries are subject to change via smoothing.
virtual void smooth() override
Redefinition of the smooth function from the base class.