libMesh
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
libMesh::LaplaceMeshSmoother Class Reference

This class defines the data structures necessary for Laplace smoothing. More...

#include <mesh_smoother_laplace.h>

Inheritance diagram for libMesh::LaplaceMeshSmoother:
[legend]

Public Member Functions

 LaplaceMeshSmoother (UnstructuredMesh &mesh)
 Constructor. More...
 
virtual ~LaplaceMeshSmoother ()
 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=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...
 

Detailed Description

This class defines the data structures necessary for Laplace smoothing.

Note
This is a simple averaging smoother, which does not guarantee that points will be smoothed to valid locations, e.g. locations inside the boundary! This aspect could use work.
Author
John W. Peterson
Date
2002-2007

Definition at line 44 of file mesh_smoother_laplace.h.

Constructor & Destructor Documentation

◆ LaplaceMeshSmoother()

libMesh::LaplaceMeshSmoother::LaplaceMeshSmoother ( UnstructuredMesh mesh)
explicit

Constructor.

Sets the constant mesh reference in the protected data section of the class.

◆ ~LaplaceMeshSmoother()

virtual libMesh::LaplaceMeshSmoother::~LaplaceMeshSmoother ( )
virtual

Destructor.

Definition at line 57 of file mesh_smoother_laplace.h.

57 {}

Member Function Documentation

◆ allgather_graph()

void libMesh::LaplaceMeshSmoother::allgather_graph ( )
private

This function allgather's the (local) graph after it is computed on each processor by the init() function.

◆ 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.

◆ print_graph()

void libMesh::LaplaceMeshSmoother::print_graph ( std::ostream &  out = libMesh::out) const

Mainly for debugging, this function will print out the connectivity graph which has been created.

◆ smooth() [1/2]

virtual void libMesh::LaplaceMeshSmoother::smooth ( )
overridevirtual

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().

65 { this->smooth(1); }
virtual void smooth() override
Redefinition of the smooth function from the base class.

◆ smooth() [2/2]

void libMesh::LaplaceMeshSmoother::smooth ( unsigned int  n_iterations)

The actual smoothing function, gets called whenever the user specifies an actual number of smoothing iterations.

Member Data Documentation

◆ _graph

std::vector<std::vector<dof_id_type> > libMesh::LaplaceMeshSmoother::_graph
private

Data structure for holding the L-graph.

Definition at line 104 of file mesh_smoother_laplace.h.

◆ _initialized

bool libMesh::LaplaceMeshSmoother::_initialized
private

True if the L-graph has been created, false otherwise.

Definition at line 99 of file mesh_smoother_laplace.h.

◆ _mesh

UnstructuredMesh& libMesh::MeshSmoother::_mesh
protectedinherited

Definition at line 61 of file mesh_smoother.h.


The documentation for this class was generated from the following file: