ryujin 2.1.1 revision 4bf2aee841e245e84ddb1251f8ca4f7f06dda1bb
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ryujin::MeshAlignment< dim > Class Template Reference

#include <source/geometries/cut_cell_primitives.h>

Inheritance diagram for ryujin::MeshAlignment< dim >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::MeshAlignment< dim >:
Collaboration graph
[legend]

Public Member Functions

 MeshAlignment (const std::string &subsection)
 
template<typename Callable >
void align_with_elevation_profile (dealii::Triangulation< dim > &triangulation, const Callable &height) const
 

Static Public Member Functions

template<typename Callable >
static int vertex_state (const Callable &height, const dealii::Point< dim > &point)
 
template<typename T >
static void exchange_to_ghosts (dealii::Triangulation< dim > &triangulation, std::vector< T > &data)
 

Static Public Attributes

static constexpr unsigned int profile_direction = 1
 

Detailed Description

template<int dim>
class ryujin::MeshAlignment< dim >

A helper class that moves the vertices of a quadrilateral mesh so that the mesh aligns with an elevation profile h(x). By convention the negative y-direction points towards the bottom boundary described by the profile. The triangulation must be in standard orientation, i.e., vertex i of every cell has the coordinate bits (i & 1, i & 2).

After the alignment every cell is either entirely above the profile, entirely below, or cut along a line connecting two of its vertices, see CutCellDecomposition.

The class works on serial and parallel::distributed triangulations and the result does not depend on the number of MPI ranks: vertices are moved in phases in which all decisions are taken with respect to the vertex positions at the start of the phase, every rank moves the vertices it owns (in the sense of dealii::GridTools::get_locally_owned_vertices()), and the new positions are communicated to the ghost layers.

Note
Only implemented in 2D.

Definition at line 56 of file cut_cell_primitives.h.

Constructor & Destructor Documentation

◆ MeshAlignment()

template<int dim>
ryujin::MeshAlignment< dim >::MeshAlignment ( const std::string &  subsection)
inline

Definition at line 59 of file cut_cell_primitives.h.

Member Function Documentation

◆ vertex_state()

template<int dim>
template<typename Callable >
static int ryujin::MeshAlignment< dim >::vertex_state ( const Callable &  height,
const dealii::Point< dim > &  point 
)
inlinestatic

◆ exchange_to_ghosts()

template<int dim>
template<typename T >
static void ryujin::MeshAlignment< dim >::exchange_to_ghosts ( dealii::Triangulation< dim > &  triangulation,
std::vector< T > &  data 
)
inlinestatic

◆ align_with_elevation_profile()

template<int dim>
template<typename Callable >
void ryujin::MeshAlignment< dim >::align_with_elevation_profile ( dealii::Triangulation< dim > &  triangulation,
const Callable &  height 
) const
inline

Align the triangulation with the elevation profile in two stages:

  • Every edge that is cut by the profile is resolved by moving one of its vertices along the edge onto the cut. Afterwards every edge lies entirely above, entirely below, or has an endpoint on the profile.
  • An edge or cell diagonal connecting two vertices on the profile is a chord of the profile and cuts off every corner of the profile in between. Such corners are located by sampling the profile along the chord and captured by moving a vertex of the cell onto them.

A vertex on the left or right boundary only moves vertically.

height is a callable taking a Point<dim> and returning the height of the profile at the horizontal position of the point.

Definition at line 160 of file cut_cell_primitives.h.

References ryujin::MeshAlignment< dim >::exchange_to_ghosts(), ryujin::MeshAlignment< dim >::profile_direction, and ryujin::MeshAlignment< dim >::vertex_state().

Member Data Documentation

◆ profile_direction

template<int dim>
constexpr unsigned int ryujin::MeshAlignment< dim >::profile_direction = 1
staticconstexpr

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