ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
Namespaces | Classes | Enumerations | Functions
Mesh generation and discretization

Namespaces

namespace  ryujin::GridGenerator
 
namespace  ryujin::Geometries
 
namespace  ryujin::Vectors
 

Classes

class  ryujin::CubicSpline
 
class  ryujin::Discretization< dim >
 
class  ryujin::Geometry< dim >
 
class  ryujin::Geometries::Airfoil< dim >
 
class  ryujin::Geometries::Annulus< dim >
 
class  ryujin::Geometries::Cylinder< dim >
 
class  ryujin::Geometries::Disk< dim >
 
class  ryujin::Geometries::GeoTIFFProfile< dim >
 
class  ryujin::Geometries::Reader< dim >
 
class  ryujin::Geometries::RectangularDomain< dim >
 
class  ryujin::Geometries::Step< dim >
 
class  ryujin::Geometries::WaveTank< dim >
 
class  ryujin::Geometries::Wall< dim >
 
class  ryujin::MeshAdaptor< Description, dim, Number >
 
class  ryujin::OfflineData< dim, Number >
 
class  ryujin::AssemblyScratchData< dim >
 
class  ryujin::SolutionTransfer< Description, dim, Number >
 
class  ryujin::TransfiniteInterpolationManifold< dim, spacedim >
 

Enumerations

enum  ryujin::Boundary : dealii::types::boundary_id {
  ryujin::do_nothing = 0 , ryujin::periodic = 1 , ryujin::slip = 2 , ryujin::no_slip = 3 ,
  ryujin::dirichlet = 4 , ryujin::dynamic = 5 , ryujin::dirichlet_momentum = 6
}
 
enum class  ryujin::Ansatz {
  ryujin::Ansatz::cg_q1 , ryujin::Ansatz::cg_q2 , ryujin::Ansatz::cg_q3 , ryujin::Ansatz::dg_q0 ,
  ryujin::Ansatz::dg_q1 , ryujin::Ansatz::dg_q2 , ryujin::Ansatz::dg_q3
}
 
enum class  ryujin::AdaptationStrategy { ryujin::AdaptationStrategy::global_refinement , ryujin::AdaptationStrategy::random_adaptation , ryujin::AdaptationStrategy::kelly_estimator }
 
enum class  ryujin::MarkingStrategy { ryujin::MarkingStrategy::fixed_number , ryujin::MarkingStrategy::fixed_fraction }
 
enum class  ryujin::TimePointSelectionStrategy { ryujin::TimePointSelectionStrategy::fixed_time_points , ryujin::TimePointSelectionStrategy::simulation_cycle }
 

Functions

template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::annulus (Triangulation< dim, spacedim > &, const double, const double, const double, const double)
 
template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::cylinder (Triangulation< dim, spacedim > &, const double, const double, const double, const double)
 
template<int dim, typename T >
void ryujin::Geometries::populate_geometry_list (T &geometry_list, const std::string &subsection)
 
template<int dim, template< int, int > class Triangulation>
void ryujin::GridGenerator::step (Triangulation< dim, dim > &, const double, const double, const double, const double)
 
template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::wavetank (Triangulation< dim, spacedim > &, const double, const double, const double, const double)
 
template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::wall (Triangulation< dim, spacedim > &, const double, const double, const double)
 
template<int dim, typename Number , typename Number2 , bool add>
void ryujin::internal::integrate_add_tensor_product_value_linear (const Number2 &value, Number2 *values, const dealii::Point< dim, Number > &p)
 

Detailed Description

Several classes and helper functions for creating meshes for a number of benchmark configurations and controlling the finite element discretization.

Enumeration Type Documentation

◆ Boundary

enum ryujin::Boundary : dealii::types::boundary_id

An enum of type dealii::types::boundary_id that provides an mnemonic for prescribing different boundary conditions on faces.

Note
In deal.II boundary ids are prescribed on faces. However, in our stencil-based method we need such an information for individual boundary degrees of freedom. Thus, the face boundary indicator has to be translated to individual degrees of freedom which happens in OfflineData::prepare() when constructing the OfflineData::boundary_map_ object.
OfflineData::boundary_map_ is a std::vector that stores all encountered boundary conditions for an individual degree of freedom. The individual algebraic constraint is applied in no particular order. It is thus important to ensure that neighboring boundary conditions, are compatible. For example, inflow conditions prescribed via a Boundary::dirichlet face neighboring a Boundary::no_slip face have to ensure that they prescribe a state compatible with the no slip condition, etc.
Data structures in OfflineData are initialized with the ensemble subrange communicator stored in MPIEnsemble.
Enumerator
do_nothing 

The "do nothing" outflow boundary condition: no special treatment of the boundary degree of freedom. For stability reasons it is important to ensure that this boundary id is only prescribed on degrees of freedom with a velocity vector pointing outward of the computational domain and coming from the interior of the domain.

periodic 

Prescribe periodic boundary conditions by identifying opposing degrees of freedom. This currently requires a mesh with "standard orientation".

slip 

On (free) slip boundary degrees of freedom we enforce a vanishing normal component of the momentum in the Euler module. This is done by explicitly removing the normal component of the momentum for the degree of freedom at the end of TimeStep::euler_step(). In the dissipation module \(v\cdot n\) is enforced strongly which leads to a natural boundary condition on the symmetric stress tensor: \(\tau\cdot\mathbb{S}(v)\cdot\vec n\).

no_slip 

On no-slip boundary degrees of freedom we enforce a vanishing normal component of the momentum in the Euler module. This is done by explicitly removing the normal component of the momentum for the degree of freedom at the end of TimeStep::euler_step(). In the dissipation module a vanishing velocity \(v=0\) is enforced strongly.

dirichlet 

On degrees of freedom marked as Dirichlet boundary we reset the state of the degree of freedom to the value of InitialData::initial_state(). Such Dirichlet conditions can only be meaningfully enforced as inflow conditions, i.e., the velocity vector associated with a Dirichlet boundary degree of freedom has to point into the computational domain, and no "backward traveling" shock front or other flow feature must reach a Dirichlet boundary degree of freedom during the computation.

dynamic 

On degrees of freedom marked as a "dynamic" boundary we distinguish four cases (for the compressible Euler equations or related PDEs):

  • supersonic inflow, where we reset the state of a boundary degree of freedom to the value returned by InitialData::initial_state(). This is equivalent to "dirichlet" boundary conditions.
  • supersonic outflow, where we do nothing, similarly to the "do nothing" boundary conditions.
  • in case of subsonic in-, or outflow the state of a boundary degree of freedom is translated into "Riemann characteristics" and the values of all incoming characteristics are replaced by the corresponding value of the state returned by InitialData::initial_state().
dirichlet_momentum 

For the Shallow Water Equations: On degrees of freedom marked as "dirichlet momentum" boundary, we reset only the momentum of the degree of freedom to the value of InitialData::initial_state(). Such conditions are used in many steady state problems with inflow conditions.

Definition at line 52 of file discretization.h.

◆ Ansatz

enum class ryujin::Ansatz
strong

An enum class for setting the finite element ansatz.

Enumerator
cg_q1 

cG Q1: continuous bi- (tri-) linear Lagrange elements

cg_q2 

cG Q2: continuous bi- (tri-) quadratic Lagrange elements

cg_q3 

cG Q3: continuous bi- (tri-) cubic Lagrange elements

dg_q0 

dG Q0: discontinuous piecewise constant elements

dg_q1 

dG Q1: discontinuous bi- (tri-) linear Lagrange elements

dg_q2 

dG Q2: discontinuous bi- (tri-) quadratic Lagrange elements

dg_q3 

dG Q3: discontinuous bi- (tri-) cubic Lagrange elements

Definition at line 135 of file discretization.h.

◆ AdaptationStrategy

enum class ryujin::AdaptationStrategy
strong

Controls the spatial mesh adaptation strategy.

Enumerator
global_refinement 

Perform a uniform global refinement.

random_adaptation 

Perform random refinement and coarsening with a deterministic Mersenne Twister and a chosen seed. This refinement strategy is only useful for debugging and testing.

kelly_estimator 

Perform local refinement and coarsening based on Kelly error estimator.

Definition at line 23 of file mesh_adaptor.h.

◆ MarkingStrategy

enum class ryujin::MarkingStrategy
strong

Controls the marking strategy used for mesh adaptation. This configuration option is ignored for the uniform global refinement strategy.

Enumerator
fixed_number 

Refine and coarsen a configurable selected percentage of cells.

fixed_fraction 

Refine and coarsen such that the criteria of cells getting flagged for refinement make up for a certain fraction of the total "error".

Definition at line 49 of file mesh_adaptor.h.

◆ TimePointSelectionStrategy

Controls the time point selection strategy.

Enumerator
fixed_time_points 

Perform a mesh adaptation cycle at preselected fixed time points.

simulation_cycle 

Perform a mesh adaptation cycle at every nth simulation cycle.

Definition at line 66 of file mesh_adaptor.h.

Function Documentation

◆ annulus()

template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::annulus ( Triangulation< dim, spacedim > &  ,
const double  ,
const double  ,
const double  ,
const double   
)

Create a 2D/3D partial annulus configuration with the given length, height, radii and angle coverage.

We set slip boundary conditions on all boundaries.

Definition at line 23 of file geometry_annulus.h.

Referenced by ryujin::Geometries::Annulus< dim >::create_triangulation().

◆ cylinder()

template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::cylinder ( Triangulation< dim, spacedim > &  ,
const double  ,
const double  ,
const double  ,
const double   
)

Create a 2D/3D cylinder configuration with the given length and height.

We set Dirichlet boundary conditions on the left boundary and do-nothing boundary conditions on the right boundary. All other boundaries (including the cylinder) have slip boundary conditions prescribed.

The 3D mesh is created by extruding the 2D mesh with a width equal to the "height".

Definition at line 29 of file geometry_cylinder.h.

Referenced by ryujin::Geometries::Cylinder< dim >::create_triangulation().

◆ populate_geometry_list()

template<int dim, typename T >
void ryujin::Geometries::populate_geometry_list ( T &  geometry_list,
const std::string &  subsection 
)

Populate a given container with all initial state defined in this namespace

Definition at line 36 of file geometry_library.h.

References ryujin::add().

◆ step()

template<int dim, template< int, int > class Triangulation>
void ryujin::GridGenerator::step ( Triangulation< dim, dim > &  ,
const double  ,
const double  ,
const double  ,
const double   
)

Create the 2D mach step triangulation.

Even though this function has a template parameter dim, it is only implemented for dimension 2.

Definition at line 23 of file geometry_step.h.

Referenced by ryujin::Geometries::Step< dim >::create_triangulation().

◆ wavetank()

template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::wavetank ( Triangulation< dim, spacedim > &  ,
const double  ,
const double  ,
const double  ,
const double   
)

Create a 2D numerical wave tank with specifications outlined in Figure 4 of [2018-SW-exps]. The tank consists of a rectangular water reservoir with a long flume attached to the "center" of the reservoir. For the sake of simplicity, we assume the centerline of the flume and reservoir align at y = 0.

All outer walls have "slip" boundary conditions except outer wall at the end of the tank which has dynamic outflow conditions.

Definition at line 28 of file geometry_tank.h.

Referenced by ryujin::Geometries::WaveTank< dim >::create_triangulation().

◆ wall()

template<int dim, int spacedim, template< int, int > class Triangulation>
void ryujin::GridGenerator::wall ( Triangulation< dim, spacedim > &  ,
const double  ,
const double  ,
const double   
)

Create a 2D double-mach reflection wall configuration:

A rectangular domain with given length and height. The boundary conditions are dirichlet conditions on the top and left of the domain and do-nothing on the right side and the front part of the bottom side from [0, wall_position). Slip boundary conditions are enforced on the bottom side on [wall_position, length).

Definition at line 27 of file geometry_wall.h.

Referenced by ryujin::Geometries::Wall< dim >::create_triangulation().

◆ integrate_add_tensor_product_value_linear()

template<int dim, typename Number , typename Number2 , bool add>
void ryujin::internal::integrate_add_tensor_product_value_linear ( const Number2 &  value,
Number2 *  values,
const dealii::Point< dim, Number > &  p 
)
inline

This is a copy of the integrate_add_tensor_product_value_linear() function shipped with deal.II that fixes a compilation error when instantiating with float.

Definition at line 31 of file tensor_product_point_kernels.h.

References ryujin::add().

Referenced by ryujin::internal::integrate_tensor_product_value().