ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
List of all members
ryujin::SolutionTransfer< Description, dim, Number > Class Template Reference

#include <source/solution_transfer.h>

Public Member Functions

Constructor and setup
 SolutionTransfer (const MPIEnsemble &mpi_ensemble, typename Discretization< dim >::Triangulation &triangulation, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem &parabolic_system)
 
 ~SolutionTransfer ()=default
 
Methods for solution transfer after mesh adaptation and

serialization/deserialization.

void prepare_projection (const StateVector &old_state_vector)
 
unsigned int get_handle () const
 
void set_handle (unsigned int handle)
 
void project (StateVector &new_state_vector)
 

Typedefs and constexpr constants

using HyperbolicSystem = typename Description::HyperbolicSystem
 
using ParabolicSystem = typename Description::ParabolicSystem
 
using View = typename Description::template HyperbolicSystemView< dim, Number >
 
using state_type = typename View::state_type
 
using StateVector = typename View::StateVector
 
using HyperbolicVector = typename View::HyperbolicVector
 
using ScalarVector = Vectors::ScalarVector< Number >
 
static constexpr auto problem_dimension = View::problem_dimension
 

Detailed Description

template<typename Description, int dim, typename Number = double>
class ryujin::SolutionTransfer< Description, dim, Number >

The SolutionTransfer class is an adaptation of the parallel::distributed::SolutionTransfer class and method implemented in deal.II. This class is, in contrast to the deal.II version, specifically taylored to our needs:

Definition at line 29 of file solution_transfer.h.

Member Typedef Documentation

◆ HyperbolicSystem

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::HyperbolicSystem = typename Description::HyperbolicSystem

Definition at line 37 of file solution_transfer.h.

◆ ParabolicSystem

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::ParabolicSystem = typename Description::ParabolicSystem

Definition at line 38 of file solution_transfer.h.

◆ View

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::View = typename Description::template HyperbolicSystemView<dim, Number>

Definition at line 40 of file solution_transfer.h.

◆ state_type

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::state_type = typename View::state_type

Definition at line 45 of file solution_transfer.h.

◆ StateVector

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::StateVector = typename View::StateVector

Definition at line 47 of file solution_transfer.h.

◆ HyperbolicVector

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::HyperbolicVector = typename View::HyperbolicVector

Definition at line 48 of file solution_transfer.h.

◆ ScalarVector

template<typename Description , int dim, typename Number = double>
using ryujin::SolutionTransfer< Description, dim, Number >::ScalarVector = Vectors::ScalarVector<Number>

Definition at line 50 of file solution_transfer.h.

Constructor & Destructor Documentation

◆ SolutionTransfer()

template<typename Description , int dim, typename Number >
ryujin::SolutionTransfer< Description, dim, Number >::SolutionTransfer ( const MPIEnsemble mpi_ensemble,
typename Discretization< dim >::Triangulation &  triangulation,
const OfflineData< dim, Number > &  offline_data,
const HyperbolicSystem hyperbolic_system,
const ParabolicSystem parabolic_system 
)

Constructor

Definition at line 39 of file solution_transfer.template.h.

◆ ~SolutionTransfer()

template<typename Description , int dim, typename Number = double>
ryujin::SolutionTransfer< Description, dim, Number >::~SolutionTransfer ( )
default

Destructor

Member Function Documentation

◆ prepare_projection()

template<typename Description , int dim, typename Number >
void ryujin::SolutionTransfer< Description, dim, Number >::prepare_projection ( const StateVector old_state_vector)

Prepare projection (and serialization) by registering a call back to all cells of the distributed triangulation. The call back attaches all necessary data to the triangulation to perform a projection after mesh adaptation, or a Triangulation::store()/load() operation.

Definition at line 131 of file solution_transfer.template.h.

References ryujin::internal::integrate_tensor_product_value().

Referenced by ryujin::TimeLoop< Description, dim, Number >::adapt_mesh_and_transfer_state_vector(), and ryujin::TimeLoop< Description, dim, Number >::write_checkpoint().

◆ get_handle()

template<typename Description , int dim, typename Number = double>
unsigned int ryujin::SolutionTransfer< Description, dim, Number >::get_handle ( ) const
inline

Return the handle associated with the call back that was set by prepare_projection() and the associated data attached to the triangulation.

Precondition
Can only be called after a call to prepare_projection().

Definition at line 94 of file solution_transfer.h.

Referenced by ryujin::TimeLoop< Description, dim, Number >::write_checkpoint().

◆ set_handle()

template<typename Description , int dim, typename Number = double>
void ryujin::SolutionTransfer< Description, dim, Number >::set_handle ( unsigned int  handle)
inline

Set the handle associated data attached to the triangulation. This function has to be called after a Triangulation::load() operation and prior to the SolutionTransfer::project().

Precondition
Cannot be called after a call to prepare_projection().

Definition at line 110 of file solution_transfer.h.

Referenced by ryujin::TimeLoop< Description, dim, Number >::read_checkpoint().

◆ project()

template<typename Description , int dim, typename Number >
void ryujin::SolutionTransfer< Description, dim, Number >::project ( StateVector new_state_vector)

Project the data stored in the triangulation into a new state vector new_state_vector. The attached data either comes from a previous call to prepare_projection() prior to mesh adaptation or has been read back in from a checkpoint after a call to Triangulation::load().

Note
After mesh refinement all internal data structures stored in the OfflineData object must be reinitialized with a call to prepare() and the new_state_vector must be appropriately initialized with the new Partitioner.

Definition at line 353 of file solution_transfer.template.h.

References ryujin::add().

Referenced by ryujin::TimeLoop< Description, dim, Number >::adapt_mesh_and_transfer_state_vector(), and ryujin::TimeLoop< Description, dim, Number >::read_checkpoint().

Member Data Documentation

◆ problem_dimension

template<typename Description , int dim, typename Number = double>
constexpr auto ryujin::SolutionTransfer< Description, dim, Number >::problem_dimension = View::problem_dimension
staticconstexpr

Definition at line 43 of file solution_transfer.h.


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