libMesh
|
This class defines the data structures necessary for Laplace smoothing. More...
#include <mesh_smoother_laplace.h>
Public Member Functions | |
LaplaceMeshSmoother (UnstructuredMesh &mesh) | |
Constructor. More... | |
virtual | ~LaplaceMeshSmoother ()=default |
Destructor. More... | |
virtual void | smooth () override |
Redefinition of the smooth function from the base class. More... | |
void | smooth (unsigned int n_iterations) |
The actual smoothing function, gets called whenever the user specifies an actual number of smoothing iterations. More... | |
void | init () |
Initialization for the Laplace smoothing routine is basically identical to building an "L-graph" which is expensive. More... | |
void | print_graph (std::ostream &out_stream=libMesh::out) const |
Mainly for debugging, this function will print out the connectivity graph which has been created. More... | |
Protected Attributes | |
UnstructuredMesh & | _mesh |
Private Member Functions | |
void | allgather_graph () |
This function allgather's the (local) graph after it is computed on each processor by the init() function. More... | |
Private Attributes | |
bool | _initialized |
True if the L-graph has been created, false otherwise. More... | |
std::vector< std::vector< dof_id_type > > | _graph |
Data structure for holding the L-graph. More... | |
This class defines the data structures necessary for Laplace smoothing.
Definition at line 44 of file mesh_smoother_laplace.h.
|
explicit |
Constructor.
Sets the constant mesh reference in the protected data section of the class.
Definition at line 37 of file mesh_smoother_laplace.C.
|
virtualdefault |
Destructor.
|
private |
This function allgather's the (local) graph after it is computed on each processor by the init() function.
Definition at line 289 of file mesh_smoother_laplace.C.
References _graph, libMesh::MeshSmoother::_mesh, TIMPI::Communicator::allgather(), libMesh::ParallelObject::comm(), libMesh::make_range(), libMesh::MeshBase::max_node_id(), and libMesh::ParallelObject::n_processors().
Referenced by init().
void libMesh::LaplaceMeshSmoother::init | ( | ) |
Initialization for the Laplace smoothing routine is basically identical to building an "L-graph" which is expensive.
It's provided separately from the constructor since you may or may not want to build the L-graph on construction.
Definition at line 159 of file mesh_smoother_laplace.C.
References _graph, _initialized, libMesh::MeshSmoother::_mesh, allgather_graph(), libMesh::MeshBase::max_node_id(), libMesh::MeshBase::mesh_dimension(), libMesh::Elem::node_id(), libMesh::ParallelObject::processor_id(), and libMesh::Elem::side_index_range().
Referenced by smooth().
void libMesh::LaplaceMeshSmoother::print_graph | ( | std::ostream & | out_stream = libMesh::out | ) | const |
Mainly for debugging, this function will print out the connectivity graph which has been created.
Definition at line 275 of file mesh_smoother_laplace.C.
References _graph, and libMesh::index_range().
|
inlineoverridevirtual |
Redefinition of the smooth function from the base class.
All this does is call the smooth function in this class which takes an int, using a default value of 1.
Implements libMesh::MeshSmoother.
Definition at line 65 of file mesh_smoother_laplace.h.
References smooth().
Referenced by smooth(), libMesh::TriangleInterface::triangulate(), and libMesh::Poly2TriTriangulator::triangulate().
void libMesh::LaplaceMeshSmoother::smooth | ( | unsigned int | n_iterations | ) |
The actual smoothing function, gets called whenever the user specifies an actual number of smoothing iterations.
Definition at line 46 of file mesh_smoother_laplace.C.
References _graph, _initialized, libMesh::MeshSmoother::_mesh, libMesh::TypeVector< T >::add(), libMesh::as_range(), libMesh::ParallelObject::comm(), libMesh::MeshTools::find_block_boundary_nodes(), libMesh::MeshTools::find_boundary_nodes(), init(), libMesh::DofObject::invalid_processor_id, libMesh::MeshBase::max_node_id(), libMesh::MeshBase::node_ref(), libMesh::MeshBase::point(), libMesh::Real, and libMesh::Parallel::sync_dofobject_data_by_id().
|
private |
Data structure for holding the L-graph.
Definition at line 104 of file mesh_smoother_laplace.h.
Referenced by allgather_graph(), init(), print_graph(), and smooth().
|
private |
True if the L-graph has been created, false otherwise.
Definition at line 99 of file mesh_smoother_laplace.h.
|
protectedinherited |
Definition at line 61 of file mesh_smoother.h.
Referenced by libMesh::VariationalMeshSmoother::adjust_adapt_data(), allgather_graph(), init(), libMesh::VariationalMeshSmoother::metr_data_gen(), libMesh::VariationalMeshSmoother::readgr(), smooth(), libMesh::VariationalMeshSmoother::smooth(), and libMesh::VariationalMeshSmoother::writegr().