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

Umbrella smoother class template. More...

#include <umbrella_smoother.hpp>

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

Public Types

typedef UmbrellaSmoother< MeshType_ > BaseClass
 
typedef BaseClass::CoordType CoordType
 
typedef MeshPart< MeshType > MeshPartType
 
typedef MeshType_ MeshType
 
typedef RootMeshNode< MeshType > RootMeshNodeType
 
typedef MeshType_::VertexSetType VertexSetType
 

Public Member Functions

 DistributedUmbrellaSmoother (const Dist::Comm &comm, RootMeshNodeType &root_mesh_node)
 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 facet_dim = MeshType::shape_dim - 1
 
static constexpr int shape_dim = MeshType_::shape_dim
 
static constexpr int world_dim = MeshType::world_dim
 

Protected Member Functions

virtual void _calc_boundary_facets () override
 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...
 
void _calc_max (CoordType &global_max) override
 calculates global maximum over all processes; is overridden in DistributedUmbrellaSmoother More...
 
void _init_edge_multiplicity ()
 Computes per-edge weights for distributed smoothing. More...
 
void _synchronize (std::vector< Tiny::Vector< CoordType, world_dim > > &sum_neigh, std::vector< CoordType > &deg) override
 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...
 
const Dist::Comm_comm
 a reference to our communicator More...
 
std::vector< CoordType > _edge_weights
 
MeshType_ & _mesh
 the mesh we want to smooth More...
 
RootMeshNodeType_root_mesh_node
 a reference to our root mesh node More...
 
VertexSetType & _vtx
 

Detailed Description

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

Umbrella smoother class template.

This class extends the functionality of the UmbrellaSmoother class by addition MPI-based synchronization to ensure that one obtains a consistently smoothed mesh in a distributed simulation. Note that this class needs to work with a RootMeshNode rather than a "naked" mesh object, because it requires the halos for synchronization, which are stored in the mesh node and not in the mesh object itself.

See the documentation of the base-class UmbrellaSmoother for more information

Template Parameters
MeshType_The type of the mesh that is to be smoothed, e.g. ConformalMesh
Author
Pia Ritter

Definition at line 292 of file umbrella_smoother.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename MeshType_ >
typedef UmbrellaSmoother<MeshType_> FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::BaseClass

Definition at line 296 of file umbrella_smoother.hpp.

◆ CoordType

template<typename MeshType_ >
typedef BaseClass::CoordType FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::CoordType

Definition at line 304 of file umbrella_smoother.hpp.

◆ MeshPartType

template<typename MeshType_ >
typedef MeshPart<MeshType> FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::MeshPartType

Definition at line 298 of file umbrella_smoother.hpp.

◆ MeshType

template<typename MeshType_ >
typedef MeshType_ FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::MeshType

Definition at line 297 of file umbrella_smoother.hpp.

◆ RootMeshNodeType

template<typename MeshType_ >
typedef RootMeshNode<MeshType> FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::RootMeshNodeType

Definition at line 299 of file umbrella_smoother.hpp.

◆ VertexSetType

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

Definition at line 50 of file umbrella_smoother.hpp.

Constructor & Destructor Documentation

◆ DistributedUmbrellaSmoother()

template<typename MeshType_ >
FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::DistributedUmbrellaSmoother ( const Dist::Comm comm,
RootMeshNodeType root_mesh_node 
)
inlineexplicit

Constructor.

Parameters
[in]commA resident reference to the communicator that was used for partitioning.
[in]root_mesh_nodeA resident reference to the root mesh node containing the mesh that is to be smoothed.

Definition at line 322 of file umbrella_smoother.hpp.

References FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::_init_edge_multiplicity().

◆ ~DistributedUmbrellaSmoother()

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

Definition at line 331 of file umbrella_smoother.hpp.

Member Function Documentation

◆ _calc_boundary_facets()

template<typename MeshType_ >
virtual void FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::_calc_boundary_facets ( )
inlineoverrideprotectedvirtual

◆ _calc_boundary_vertices()

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

◆ _calc_max()

template<typename MeshType_ >
void FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::_calc_max ( CoordType &  )
inlineoverrideprotectedvirtual

◆ _init_edge_multiplicity()

template<typename MeshType_ >
void FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::_init_edge_multiplicity ( )
inlineprotected

◆ _synchronize()

◆ compile()

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

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 
)
inlineinherited

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
protectedinherited

◆ _boundary_vertices

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

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

◆ _comm

◆ _edge_weights

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

Definition at line 62 of file umbrella_smoother.hpp.

◆ _mesh

◆ _root_mesh_node

◆ _vtx

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

Definition at line 64 of file umbrella_smoother.hpp.

◆ facet_dim

template<typename MeshType_ >
constexpr int FEAT::Geometry::DistributedUmbrellaSmoother< MeshType_ >::facet_dim = MeshType::shape_dim - 1
staticconstexpr

Definition at line 302 of file umbrella_smoother.hpp.

◆ shape_dim

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

Definition at line 51 of file umbrella_smoother.hpp.

◆ world_dim

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

Definition at line 301 of file umbrella_smoother.hpp.


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