ryujin 2.5.0 revision 3a6c8d57210175dea14d8116e1fe878f349f8c1c
Loading...
Searching...
No Matches
Classes | List of all members
ryujin::Interface::OfflineData< dim, Number > Class Template Referenceabstract

#include <include/ryujin/interface/offline_data.h>

Inheritance diagram for ryujin::Interface::OfflineData< dim, Number >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::Interface::OfflineData< dim, Number >:
Collaboration graph
[legend]

Classes

struct  CouplingDescription
 

Public Types

Typedefs and constexpr constants
using BoundaryDescription = std::tuple< unsigned int, dealii::Tensor< 1, dim, Number >, Number, Number, dealii::types::boundary_id, dealii::Point< dim > >
 
using BoundaryMap = std::vector< BoundaryDescription >
 
using CouplingBoundaryPairs = std::vector< CouplingDescription >
 

Public Member Functions

Setup
virtual void prepare (const unsigned int problem_dimension, const unsigned int n_precomputed_values)=0
 

Protected Attributes

Internal data
dealii::ObserverPointer< const Discretization< dim > > discretization_
 
std::unique_ptr< dealii::DoFHandler< dim > > dof_handler_cg_
 
std::unique_ptr< dealii::DoFHandler< dim > > dof_handler_dg_
 
std::unique_ptr< dealii::AffineConstraints< Number > > affine_constraints_cg_
 
std::unique_ptr< dealii::AffineConstraints< Number > > affine_constraints_dg_
 
std::shared_ptr< const dealii::Utilities::MPI::Partitioner > scalar_partitioner_
 
std::shared_ptr< const dealii::Utilities::MPI::Partitioner > hyperbolic_vector_partitioner_
 
std::shared_ptr< const dealii::Utilities::MPI::Partitioner > precomputed_vector_partitioner_
 
unsigned int n_export_indices_
 
unsigned int n_locally_internal_
 
unsigned int n_locally_owned_
 
unsigned int n_locally_relevant_
 
BoundaryMap boundary_map_
 
std::vector< BoundaryMap > level_boundary_map_
 
std::unique_ptr< Mirrored< unsigned int * > > boundary_indices_
 
std::vector< unsigned int > boundary_slots_
 
std::unique_ptr< Mirrored< CouplingDescription * > > coupling_boundary_pairs_
 
std::unique_ptr< dealii::DynamicSparsityPattern > sparsity_pattern_
 
std::unique_ptr< SparsityPattern< warp_size > > sparsity_pattern_simd_
 
std::unique_ptr< SparseMatrix< Number > > mass_matrix_
 
std::unique_ptr< SparseMatrix< Number > > mass_matrix_inverse_
 
std::unique_ptr< ScalarVector< Number > > lumped_mass_matrix_
 
std::unique_ptr< ScalarVector< Number > > lumped_mass_matrix_inverse_
 
std::vector< ScalarHostVector< float > > level_lumped_mass_matrix_
 
std::unique_ptr< SparseMatrix< Number > > betaij_matrix_
 
std::unique_ptr< SparseMatrix< Number, dim > > cij_matrix_
 
std::unique_ptr< SparseMatrix< Number > > incidence_matrix_
 
Number measure_of_omega_
 

Information and statistics

const dealii::DoFHandler< dim > & dof_handler () const
 
const dealii::AffineConstraints< Number > & affine_constraints () const
 
 OfflineData (const Discretization< dim > &discretization, const std::string &subsection)
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::Interface::OfflineData< dim, Number >

The interface of an OfflineData object: all data that can be precomputed offline, most notably the DoFHandler, the sparsity patterns, the partitioners, and all matrices (mass matrix, lumped mass matrix, $c_{ij}$ matrices, and $n_{ij}$ matrices).

The interface holds all state in protected fields with a non-virtual accessor each. Objects of class type are held in std::unique_ptr. A derived class fills the fields in prepare(). After prepare() is called, all getter functions return valid references.

Definition at line 50 of file offline_data.h.

Member Typedef Documentation

◆ BoundaryDescription

template<int dim, typename Number = double>
using ryujin::Interface::OfflineData< dim, Number >::BoundaryDescription = std::tuple<unsigned int , dealii::Tensor<1, dim, Number> , Number , Number , dealii::types::boundary_id , dealii::Point<dim> >

A tuple describing (local) dof index, boundary normal, normal mass, boundary mass, boundary id, and position of the boundary degree of freedom.

Definition at line 63 of file offline_data.h.

◆ BoundaryMap

template<int dim, typename Number = double>
using ryujin::Interface::OfflineData< dim, Number >::BoundaryMap = std::vector<BoundaryDescription>

A vector of BoundaryDescription entries.

Definition at line 87 of file offline_data.h.

◆ CouplingBoundaryPairs

template<int dim, typename Number = double>
using ryujin::Interface::OfflineData< dim, Number >::CouplingBoundaryPairs = std::vector<CouplingDescription>

A vector of CouplingDescription entries.

Definition at line 92 of file offline_data.h.

Constructor & Destructor Documentation

◆ OfflineData()

template<int dim, typename Number = double>
ryujin::Interface::OfflineData< dim, Number >::OfflineData ( const Discretization< dim > &  discretization,
const std::string &  subsection 
)
inlineprotected

An MPI partitioner for the (scalar) Vector storing a scalar-valued quantity. An MPI partitioner for the MultiComponentVector storing a vector-valued quantity of size HyperbolicSystem::problem_dimension. An MPI partitioner for the MultiComponentVector storing a vector-valued quantity of size HyperbolicSystem::problem_dimension. The subinterval \([0,\texttt{n_export_indices()})\) contains all (SIMD-vectorized) indices of the interval \([0,\texttt{n_locally_internal()})\) that are exported to neighboring MPI ranks.

Note
The interval \([\texttt{n_locally_internal()}, \texttt{n_locally_relevant()})\) (consisting of non-SIMD-vectorized indices) contains additional degrees of freedom that might have to be exported to neighboring MPI ranks. Number of locally owned internal degrees of freedom: In (MPI rank) local numbering all indices in the half open interval [0, n_locally_internal_) are owned by this processor, have standard connectivity, and are not situated at a boundary. Number of locally owned degrees of freedom: In (MPI rank) local numbering all indices in the half open interval [0, n_locally_owned_) are owned by this processor. Number of locally relevant degrees of freedom: This number is the total number of degrees of freedom we store locally on this MPI rank. I.e., we can access the half open interval [0, n_locally_relevant_) on this machine. The boundary map. Local numbering.

For every degree of freedom that has nonzero support at the boundary we record the global degree of freedom index along with a weighted boundary normal, the associated boundary id, and position.

This map is later used in OfflineData to handle boundary degrees of freedom after every time step (for example to implement reflective boundary conditions). A compacted, strictly increasing list of all locally owned degrees of freedom that appear in the boundary_map(). The function returns a reference to a Mirrored object that can be accessed on both memory spaces with view() and size(). For every entry of the boundary_map() the position of its degree of freedom in boundary_indices(). Local numbering.

Note
The boundary map can contain more than one entry for the same degree of freedom (for example a corner that is simultaneously located on a slip and a dirichlet boundary). All such entries share the same position. An array of CouplingDescription structures describing coupling degrees of freedom i and j where both degrees of freedom are collocated at the boundary (and hence the d_ij matrix has to be symmetrized). The function returns a reference to a Mirrored object holding (i, col_idx, j) triples that can be accessed on both memory spaces with view() and size(). The boundary map on all levels of the grid in case multilevel support was enabled. A sparsity pattern for (standard deal.II) matrices storing indices in (deal.II typical) global numbering. A sparsity pattern for matrices in vectorized format. Local numbering. The mass matrix. (SIMD storage, local numbering) The inverse mass matrix. (SIMD storage, local numbering)

This matrix is only available for a discontinuous finite Element ansatz. The lumped mass matrix. (stored as vector, local numbering) The inverse of the lumped mass matrix. (stored as vector, local numbering) The lumped mass matrix on all levels of the grid in case multilevel support was enabled. The stiffness matrix \((beta_{ij})\): \(\beta_{ij} = \nabla\varphi_{j}\cdot\nabla\varphi_{i}\) (SIMD storage, local numbering) The \((c_{ij})\) matrix. (SIMD storage, local numbering) The incidence matrix \((beta_{ij})\): 1 for coupling face degrees of freedom that share the same support point coordinate, 0 otherwise.

(SIMD storage, local numbering)

This matrix is only available for a discontinuous finite Element ansatz. Size of computational domain. Returns a reference of the underlying Discretization object. Constructor.

Definition at line 377 of file offline_data.h.

Member Function Documentation

◆ prepare()

template<int dim, typename Number = double>
virtual void ryujin::Interface::OfflineData< dim, Number >::prepare ( const unsigned int  problem_dimension,
const unsigned int  n_precomputed_values 
)
pure virtual

Prepare offline data. A call to prepare() sets up storage, dof handlers, sparsity patterns, and assembles all matrices.

The problem_dimension and n_precomputed_values parameters is used to set up appropriately sized vector partitioners for the state and precomputed MultiComponentVector.

Implemented in ryujin::OfflineData< dim, Number >.

◆ dof_handler()

template<int dim, typename Number = double>
const dealii::DoFHandler< dim > & ryujin::Interface::OfflineData< dim, Number >::dof_handler ( ) const
inline

Return a read-only const reference to the DoFHandler for the continuous ("cG") variant of the selected finite element space.

Note
If the selected finite element space is continuous then this method simply returns the same object as dof_handler(). Return a read-only const reference to the DoFHandler for the discontinuous ("dG") variant of the selected finite element space.
If the selected finite element space is discontinuous then this method simply returns the same object as dof_handler(). Return a read-only const reference to the dof handler.

Definition at line 138 of file offline_data.h.

References ryujin::Interface::OfflineData< dim, Number >::discretization_, ryujin::Interface::OfflineData< dim, Number >::dof_handler_cg_, and ryujin::Interface::OfflineData< dim, Number >::dof_handler_dg_.

Referenced by ryujin::MGSmoother< dim, Number >::initialize().

◆ affine_constraints()

template<int dim, typename Number = double>
const dealii::AffineConstraints< Number > & ryujin::Interface::OfflineData< dim, Number >::affine_constraints ( ) const
inline

An AffineConstraints object storing constraints for the continuous ("cG") variant of the selected finite element space in (deal.II typical) global numbering.

Note
The affine constraints object is populated with (a) hanging node constraints, and (b) periodicity constraints, that directly affect the chosen ansatz space.
If the selected finite element space is continuous then this method simply returns the same object as affine_constraints(). An AffineConstraints object storing constraints for the discontinuous ("dG") variant of the selected finite element space in (deal.II typical) global numbering.
The affine constraints object is populated with (a) hanging node constraints, and (b) periodicity constraints, that directly affect the chosen ansatz space.
If the selected finite element space is discontinuous then this method simply returns the same object as affine_constraints(). An AffineConstraints object storing constraints in (deal.II typical) global numbering.
The affine constraints object is populated with (a) hanging node constraints, and (b) periodicity constraints, that directly affect the chosen ansatz space.

Definition at line 185 of file offline_data.h.

References ryujin::Interface::OfflineData< dim, Number >::affine_constraints_cg_, ryujin::Interface::OfflineData< dim, Number >::affine_constraints_dg_, and ryujin::Interface::OfflineData< dim, Number >::discretization_.

Member Data Documentation

◆ discretization_

template<int dim, typename Number = double>
dealii::ObserverPointer<const Discretization<dim> > ryujin::Interface::OfflineData< dim, Number >::discretization_
protected

◆ dof_handler_cg_

template<int dim, typename Number = double>
std::unique_ptr<dealii::DoFHandler<dim> > ryujin::Interface::OfflineData< dim, Number >::dof_handler_cg_
protected

◆ dof_handler_dg_

template<int dim, typename Number = double>
std::unique_ptr<dealii::DoFHandler<dim> > ryujin::Interface::OfflineData< dim, Number >::dof_handler_dg_
protected

◆ affine_constraints_cg_

template<int dim, typename Number = double>
std::unique_ptr<dealii::AffineConstraints<Number> > ryujin::Interface::OfflineData< dim, Number >::affine_constraints_cg_
protected

◆ affine_constraints_dg_

template<int dim, typename Number = double>
std::unique_ptr<dealii::AffineConstraints<Number> > ryujin::Interface::OfflineData< dim, Number >::affine_constraints_dg_
protected

◆ scalar_partitioner_

template<int dim, typename Number = double>
std::shared_ptr<const dealii::Utilities::MPI::Partitioner> ryujin::Interface::OfflineData< dim, Number >::scalar_partitioner_
protected

Definition at line 403 of file offline_data.h.

◆ hyperbolic_vector_partitioner_

template<int dim, typename Number = double>
std::shared_ptr<const dealii::Utilities::MPI::Partitioner> ryujin::Interface::OfflineData< dim, Number >::hyperbolic_vector_partitioner_
protected

Definition at line 406 of file offline_data.h.

◆ precomputed_vector_partitioner_

template<int dim, typename Number = double>
std::shared_ptr<const dealii::Utilities::MPI::Partitioner> ryujin::Interface::OfflineData< dim, Number >::precomputed_vector_partitioner_
protected

Definition at line 409 of file offline_data.h.

◆ n_export_indices_

template<int dim, typename Number = double>
unsigned int ryujin::Interface::OfflineData< dim, Number >::n_export_indices_
protected

Definition at line 411 of file offline_data.h.

◆ n_locally_internal_

template<int dim, typename Number = double>
unsigned int ryujin::Interface::OfflineData< dim, Number >::n_locally_internal_
protected

Definition at line 412 of file offline_data.h.

◆ n_locally_owned_

template<int dim, typename Number = double>
unsigned int ryujin::Interface::OfflineData< dim, Number >::n_locally_owned_
protected

Definition at line 413 of file offline_data.h.

◆ n_locally_relevant_

template<int dim, typename Number = double>
unsigned int ryujin::Interface::OfflineData< dim, Number >::n_locally_relevant_
protected

Definition at line 414 of file offline_data.h.

◆ boundary_map_

template<int dim, typename Number = double>
BoundaryMap ryujin::Interface::OfflineData< dim, Number >::boundary_map_
protected

Definition at line 416 of file offline_data.h.

◆ level_boundary_map_

template<int dim, typename Number = double>
std::vector<BoundaryMap> ryujin::Interface::OfflineData< dim, Number >::level_boundary_map_
protected

Definition at line 417 of file offline_data.h.

◆ boundary_indices_

template<int dim, typename Number = double>
std::unique_ptr<Mirrored<unsigned int *> > ryujin::Interface::OfflineData< dim, Number >::boundary_indices_
protected

Definition at line 419 of file offline_data.h.

◆ boundary_slots_

template<int dim, typename Number = double>
std::vector<unsigned int> ryujin::Interface::OfflineData< dim, Number >::boundary_slots_
protected

Definition at line 420 of file offline_data.h.

◆ coupling_boundary_pairs_

template<int dim, typename Number = double>
std::unique_ptr<Mirrored<CouplingDescription *> > ryujin::Interface::OfflineData< dim, Number >::coupling_boundary_pairs_
protected

Definition at line 422 of file offline_data.h.

◆ sparsity_pattern_

template<int dim, typename Number = double>
std::unique_ptr<dealii::DynamicSparsityPattern> ryujin::Interface::OfflineData< dim, Number >::sparsity_pattern_
protected

Definition at line 424 of file offline_data.h.

◆ sparsity_pattern_simd_

template<int dim, typename Number = double>
std::unique_ptr<SparsityPattern<warp_size> > ryujin::Interface::OfflineData< dim, Number >::sparsity_pattern_simd_
protected

Definition at line 426 of file offline_data.h.

◆ mass_matrix_

template<int dim, typename Number = double>
std::unique_ptr<SparseMatrix<Number> > ryujin::Interface::OfflineData< dim, Number >::mass_matrix_
protected

Definition at line 428 of file offline_data.h.

◆ mass_matrix_inverse_

template<int dim, typename Number = double>
std::unique_ptr<SparseMatrix<Number> > ryujin::Interface::OfflineData< dim, Number >::mass_matrix_inverse_
protected

Definition at line 429 of file offline_data.h.

◆ lumped_mass_matrix_

template<int dim, typename Number = double>
std::unique_ptr<ScalarVector<Number> > ryujin::Interface::OfflineData< dim, Number >::lumped_mass_matrix_
protected

Definition at line 431 of file offline_data.h.

◆ lumped_mass_matrix_inverse_

template<int dim, typename Number = double>
std::unique_ptr<ScalarVector<Number> > ryujin::Interface::OfflineData< dim, Number >::lumped_mass_matrix_inverse_
protected

Definition at line 432 of file offline_data.h.

◆ level_lumped_mass_matrix_

template<int dim, typename Number = double>
std::vector<ScalarHostVector<float> > ryujin::Interface::OfflineData< dim, Number >::level_lumped_mass_matrix_
protected

Definition at line 434 of file offline_data.h.

◆ betaij_matrix_

template<int dim, typename Number = double>
std::unique_ptr<SparseMatrix<Number> > ryujin::Interface::OfflineData< dim, Number >::betaij_matrix_
protected

Definition at line 436 of file offline_data.h.

◆ cij_matrix_

template<int dim, typename Number = double>
std::unique_ptr<SparseMatrix<Number, dim> > ryujin::Interface::OfflineData< dim, Number >::cij_matrix_
protected

Definition at line 437 of file offline_data.h.

◆ incidence_matrix_

template<int dim, typename Number = double>
std::unique_ptr<SparseMatrix<Number> > ryujin::Interface::OfflineData< dim, Number >::incidence_matrix_
protected

Definition at line 438 of file offline_data.h.

◆ measure_of_omega_

template<int dim, typename Number = double>
Number ryujin::Interface::OfflineData< dim, Number >::measure_of_omega_
protected

Definition at line 440 of file offline_data.h.


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