|
FEAT 3
Finite Element Analysis Toolbox
|
(Unpartitioned) mesh distortion class template More...
#include <mesh_distortion.hpp>
Public Types | |
| typedef MeshType_::CoordType | CoordType |
Public Member Functions | |
| MeshDistortion (MeshType_ &mesh) | |
| Constructor. More... | |
| MeshDistortion (MeshType_ &mesh, Random::SeedType seed) | |
| Constructor. More... | |
| void | distort_shortest_edge_local (CoordType scale=CoordType(0.1)) |
| Distorts the mesh according to the shortest local edge. More... | |
| void | distort_shortest_edge_uniform (CoordType scale=CoordType(0.1)) |
| Distorts the mesh according to the shortest edge. More... | |
| void | distort_uniform (CoordType rad) |
| Distorts the mesh uniformly. 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_shortest_edge () |
| determines for each vertex the length of the shortest adjacent edge More... | |
| virtual void | _synchronize () |
| synchronizes the distortion over all processes; is overridden in DistributedMeshDistortion More... | |
Protected Attributes | |
| std::vector< int > | _boundary_facets |
| vector to story which facet is at the boundary More... | |
| std::vector< int > | _boundary_vertices |
| vector to store which vertex is at the boundary More... | |
| MeshType_ & | _mesh |
| the mesh we want to distort More... | |
| const CoordType | _pi_val = Math::pi<CoordType>() |
| have a guess... More... | |
| Random | _rand |
| random number generator for random distortion More... | |
| std::vector< CoordType > | _shortest_edge |
| vector to store the length of the shortest edge belonging to each vertex More... | |
(Unpartitioned) mesh distortion class template
| MeshType_ | The type of the mesh that is to be distorted, e.g. ConformalMesh |
Definition at line 41 of file mesh_distortion.hpp.
| typedef MeshType_::CoordType FEAT::Geometry::MeshDistortion< MeshType_ >::CoordType |
Definition at line 44 of file mesh_distortion.hpp.
|
inlineexplicit |
Constructor.
| [in] | _mesh | A reference to the mesh that is to be distorted |
Definition at line 69 of file mesh_distortion.hpp.
|
inlineexplicit |
Constructor.
| [in] | _mesh | A reference to the mesh that is to be distorted |
| [in] | _seed | The seed for the random number generator |
Definition at line 87 of file mesh_distortion.hpp.
|
inlinevirtual |
Definition at line 96 of file mesh_distortion.hpp.
|
inlineprotectedvirtual |
determines for each facet whether it is a boundary facet or an inner facet
Reimplemented in FEAT::Geometry::DistributedMeshDistortion< MeshType_ >.
Definition at line 237 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_boundary_facets, and FEAT::Geometry::MeshDistortion< MeshType_ >::_mesh.
Referenced by FEAT::Geometry::DistributedMeshDistortion< MeshType_ >::_calc_boundary_facets(), and FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices().
|
inlineprotectedvirtual |
determines for each vertex whether it is a boundary vertex or an inner vertex
Definition at line 264 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_boundary_facets, FEAT::Geometry::MeshDistortion< MeshType_ >::_boundary_vertices, FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_facets(), and FEAT::Geometry::MeshDistortion< MeshType_ >::_mesh.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_uniform(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
inlineprotectedvirtual |
determines for each vertex the length of the shortest adjacent edge
Reimplemented in FEAT::Geometry::DistributedMeshDistortion< MeshType_ >.
Definition at line 287 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_mesh, FEAT::Geometry::MeshDistortion< MeshType_ >::_shortest_edge, and FEAT::Math::min().
Referenced by FEAT::Geometry::DistributedMeshDistortion< MeshType_ >::_calc_shortest_edge(), FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_uniform().
|
inlineprotectedvirtual |
synchronizes the distortion over all processes; is overridden in DistributedMeshDistortion
Reimplemented in FEAT::Geometry::DistributedMeshDistortion< MeshType_ >.
Definition at line 307 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
inline |
Distorts the mesh according to the shortest local edge.
Moves each inner vertex on an arbitrary point on a circle (2D) or sphere (3D) around the original vertex The radius of the circle/sphere is determined by the shortest edge adjacent to the vertex: radius = scale * length_shortest_edge
| [in] | scale | factor to scale the length of the shortest edge to determine the radius |
Definition at line 188 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_boundary_vertices, FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_shortest_edge(), FEAT::Geometry::MeshDistortion< MeshType_ >::_mesh, FEAT::Geometry::MeshDistortion< MeshType_ >::_pi_val, FEAT::Geometry::MeshDistortion< MeshType_ >::_rand, FEAT::Geometry::MeshDistortion< MeshType_ >::_shortest_edge, FEAT::Geometry::MeshDistortion< MeshType_ >::_synchronize(), FEAT::Math::cos(), and FEAT::Math::sin().
|
inline |
Distorts the mesh according to the shortest edge.
Moves each inner vertex on an arbitrary point on a circle (2D) or sphere (3D) around the original vertex The radius of the circle/sphere is determined by the shortest edge in the mesh:
radius = scale * shortest_edge
| [in] | scale | factor to scale the length of the shortest edge to determine the radius |
Definition at line 167 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_shortest_edge(), FEAT::Geometry::MeshDistortion< MeshType_ >::_shortest_edge, and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
inline |
Distorts the mesh uniformly.
Moves each inner vertex on an arbitrary point on a circle (2D) or sphere (3D) around the original vertex
| [in] | rad | Radius of the circle or sphere |
Definition at line 111 of file mesh_distortion.hpp.
References FEAT::Geometry::MeshDistortion< MeshType_ >::_boundary_vertices, FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::MeshDistortion< MeshType_ >::_mesh, FEAT::Geometry::MeshDistortion< MeshType_ >::_pi_val, FEAT::Geometry::MeshDistortion< MeshType_ >::_rand, FEAT::Geometry::MeshDistortion< MeshType_ >::_synchronize(), FEAT::Math::cos(), and FEAT::Math::sin().
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_uniform().
|
protected |
vector to story which facet is at the boundary
Definition at line 56 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_facets(), and FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices().
|
protected |
vector to store which vertex is at the boundary
Definition at line 54 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
protected |
the mesh we want to distort
Definition at line 50 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_facets(), FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_boundary_vertices(), FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_shortest_edge(), FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
protected |
have a guess...
Definition at line 60 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
protected |
random number generator for random distortion
Definition at line 52 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_uniform().
|
protected |
vector to store the length of the shortest edge belonging to each vertex
Definition at line 58 of file mesh_distortion.hpp.
Referenced by FEAT::Geometry::MeshDistortion< MeshType_ >::_calc_shortest_edge(), FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_local(), and FEAT::Geometry::MeshDistortion< MeshType_ >::distort_shortest_edge_uniform().
|
staticconstexpr |
Definition at line 45 of file mesh_distortion.hpp.
|
staticconstexpr |
Definition at line 46 of file mesh_distortion.hpp.