FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::UmbrellaSmoother< MeshType_ > Class Template Reference

Umbrella mesh smoother with both uniform and scale-dependent neighbor averaging For more information see More...

#include <umbrella_smoother.hpp>

Inheritance diagram for FEAT::Geometry::UmbrellaSmoother< MeshType_ >:
FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >

Public Types

typedef MeshType_::CoordType CoordType
 
typedef MeshType_::VertexSetType VertexSetType
 

Public Member Functions

 UmbrellaSmoother (MeshType_ &mesh)
 Constructor. More...
 
void compile ()
 
void smooth (Index max_iter, CoordType tol, bool uniform=true)
 Smooths the mesh with an umbrella operator. More...
 

Static Public Attributes

static constexpr int shape_dim = MeshType_::shape_dim
 
static constexpr int world_dim = MeshType_::world_dim
 

Protected Member Functions

virtual void _calc_boundary_facets ()
 determines for each facet whether it is a boundary facet or an inner facet More...
 
virtual void _calc_boundary_vertices ()
 determines for each vertex whether it is a boundary vertex or an inner vertex More...
 
virtual void _calc_max (CoordType &)
 calculates global maximum over all processes; is overridden in DistributedUmbrellaSmoother More...
 
virtual void _synchronize (std::vector< Tiny::Vector< CoordType, world_dim > > &, std::vector< CoordType > &)
 synchronizes the smoother over all processes; is overridden in DistributedUmbrellaSmoother More...
 

Protected Attributes

std::vector< int > _boundary_facets
 vector to store which facet is at the boundary More...
 
std::vector< int > _boundary_vertices
 vector to store which vertex is at the boundary More...
 
std::vector< CoordType > _edge_weights
 
MeshType_ & _mesh
 the mesh we want to smooth More...
 
VertexSetType & _vtx
 

Detailed Description

template<typename MeshType_>
class FEAT::Geometry::UmbrellaSmoother< MeshType_ >

Umbrella mesh smoother with both uniform and scale-dependent neighbor averaging For more information see

Template Parameters
MeshType_The type of the mesh that is to be smoothed, e.g. ConformalMesh
Attention
This class should only be used in serial applications, i.e. on unpartitioned meshes! If you need to distort a partitioned mesh, use the derived DistributedUmbrellaSmoother class template instead!
Only use uniform = false if you know what you are doing
Author
Pia Ritter

Definition at line 46 of file umbrella_smoother.hpp.

Member Typedef Documentation

◆ CoordType

template<typename MeshType_ >
typedef MeshType_::CoordType FEAT::Geometry::UmbrellaSmoother< MeshType_ >::CoordType

Definition at line 49 of file umbrella_smoother.hpp.

◆ VertexSetType

template<typename MeshType_ >
typedef MeshType_::VertexSetType FEAT::Geometry::UmbrellaSmoother< MeshType_ >::VertexSetType

Definition at line 50 of file umbrella_smoother.hpp.

Constructor & Destructor Documentation

◆ UmbrellaSmoother()

template<typename MeshType_ >
FEAT::Geometry::UmbrellaSmoother< MeshType_ >::UmbrellaSmoother ( MeshType_ &  mesh)
inlineexplicit

Constructor.

Parameters
[in]_meshA reference to the mesh that is to be smoothed

Definition at line 74 of file umbrella_smoother.hpp.

◆ ~UmbrellaSmoother()

template<typename MeshType_ >
virtual FEAT::Geometry::UmbrellaSmoother< MeshType_ >::~UmbrellaSmoother ( )
inlinevirtual

Definition at line 84 of file umbrella_smoother.hpp.

Member Function Documentation

◆ _calc_boundary_facets()

template<typename MeshType_ >
virtual void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_boundary_facets ( )
inlineprotectedvirtual

◆ _calc_boundary_vertices()

template<typename MeshType_ >
virtual void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_boundary_vertices ( )
inlineprotectedvirtual

◆ _calc_max()

template<typename MeshType_ >
virtual void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_max ( CoordType &  )
inlineprotectedvirtual

calculates global maximum over all processes; is overridden in DistributedUmbrellaSmoother

Reimplemented in FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >.

Definition at line 269 of file umbrella_smoother.hpp.

Referenced by FEAT::Geometry::UmbrellaSmoother< MeshType_ >::smooth().

◆ _synchronize()

template<typename MeshType_ >
virtual void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_synchronize ( std::vector< Tiny::Vector< CoordType, world_dim > > &  ,
std::vector< CoordType > &   
)
inlineprotectedvirtual

synchronizes the smoother over all processes; is overridden in DistributedUmbrellaSmoother

Reimplemented in FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >.

Definition at line 263 of file umbrella_smoother.hpp.

Referenced by FEAT::Geometry::UmbrellaSmoother< MeshType_ >::smooth().

◆ compile()

template<typename MeshType_ >
void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::compile ( )
inline

Definition at line 88 of file umbrella_smoother.hpp.

◆ smooth()

template<typename MeshType_ >
void FEAT::Geometry::UmbrellaSmoother< MeshType_ >::smooth ( Index  max_iter,
CoordType  tol,
bool  uniform = true 
)
inline

Smooths the mesh with an umbrella operator.

Iteratively moves each inner vertex towards the (possibly weighted) average of its adjacent vertices (Jacobi update). The weights are either uniform or inversely proportional to the edge lengths (w_ij = 1 / |e_ij|).

Parameters
[in]uniformtrue for uniform operator and false for scale dependent operator
[in]max_iterMaximum number of smoothing iterations
[in]tolIteration stops if the largest vertex displacement between two steps falls below this threshold
Note
This function only moves inner vertices and leaves boundary vertices untouched.

Definition at line 115 of file umbrella_smoother.hpp.

References FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_boundary_vertices, FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_max(), FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_mesh, FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_synchronize(), FEAT::Math::maxi(), and FEAT::Math::sqrt().

Member Data Documentation

◆ _boundary_facets

template<typename MeshType_ >
std::vector<int> FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_boundary_facets
protected

◆ _boundary_vertices

template<typename MeshType_ >
std::vector<int> FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_boundary_vertices
protected

vector to store which vertex is at the boundary

Definition at line 58 of file umbrella_smoother.hpp.

Referenced by FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_calc_boundary_vertices(), and FEAT::Geometry::UmbrellaSmoother< MeshType_ >::smooth().

◆ _edge_weights

template<typename MeshType_ >
std::vector<CoordType> FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_edge_weights
protected

Definition at line 62 of file umbrella_smoother.hpp.

◆ _mesh

◆ _vtx

template<typename MeshType_ >
VertexSetType& FEAT::Geometry::UmbrellaSmoother< MeshType_ >::_vtx
protected

Definition at line 64 of file umbrella_smoother.hpp.

◆ shape_dim

template<typename MeshType_ >
constexpr int FEAT::Geometry::UmbrellaSmoother< MeshType_ >::shape_dim = MeshType_::shape_dim
staticconstexpr

Definition at line 51 of file umbrella_smoother.hpp.

◆ world_dim

template<typename MeshType_ >
constexpr int FEAT::Geometry::UmbrellaSmoother< MeshType_ >::world_dim = MeshType_::world_dim
staticconstexpr

Definition at line 52 of file umbrella_smoother.hpp.


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