![]() |
ryujin 2.1.1 revision ae95f0746689649c34c5726a2385af071c7c8efd
|
Classes | |
class | ryujin::SynchronizationDispatch |
class | ryujin::Scope |
Functions | |
template<int dim> | |
void | ryujin::Checkpointing::load_mesh (Discretization< dim > &discretization, const std::string &base_name) |
template<int dim, typename Number , int n_comp, int simd_length> | |
void | ryujin::Checkpointing::load_state_vector (const OfflineData< dim, Number > &offline_data, const std::string &base_name, MultiComponentVector< Number, n_comp, simd_length > &U, Number &t, unsigned int &output_cycle, const MPI_Comm &mpi_communicator) |
template<int dim, typename Number , int n_comp, int simd_length> | |
void | ryujin::Checkpointing::write_checkpoint (const OfflineData< dim, Number > &offline_data, const std::string &base_name, const MultiComponentVector< Number, n_comp, simd_length > &U, const Number t, const unsigned int output_cycle, const MPI_Comm &mpi_communicator) |
template<int dim, typename Number , typename Callable > | |
ToFunction< dim, Number, Callable > | ryujin::to_function (const Callable &callable, const unsigned int k) |
Various convenience functions and macros | |
#define | AssertThrowSIMD(variable, condition, exception) |
#define | ACCESSOR_READ_ONLY(member) |
#define | ACCESSOR(member) |
#define | ACCESSOR_READ_ONLY_NO_DEREFERENCE(member) |
#define | ASM_LABEL(label) asm("#" label); |
OpenMP parallel for macros | |
Intended use: // serial work
// per thread work and thread-local storage declarations
for (unsigned int i = 0; i < size_internal; i += simd_length) {
// parallel for loop that is statically distributed on all available
// worker threads by slicing the interval [0,size_internal)
}
| |
#define | RYUJIN_PRAGMA(x) _Pragma(#x) |
#define | RYUJIN_PARALLEL_REGION_BEGIN |
#define | RYUJIN_PARALLEL_REGION_END } |
#define | RYUJIN_OMP_FOR RYUJIN_PRAGMA(omp for) |
#define | RYUJIN_OMP_FOR_NOWAIT RYUJIN_PRAGMA(omp for nowait) |
#define | RYUJIN_OMP_BARRIER RYUJIN_PRAGMA(omp barrier) |
#define | RYUJIN_OMP_CRITICAL RYUJIN_PRAGMA(omp critical) |
#define | RYUJIN_LIKELY(x) (__builtin_expect(!!(x), 1)) |
#define | RYUJIN_UNLIKELY(x) (__builtin_expect(!!(x), 0)) |
Miscellaneous helper functions, macros and classes.
#define AssertThrowSIMD | ( | variable, | |
condition, | |||
exception | |||
) |
Mixed serial/SIMD variant of the dealii AssertThrow macro. If variable is just a plain double or float, then this macro defaults to a simple call to dealii::AssertThrow(condition(variable), exception)
. Otherwise (if decltype(variable)
has a subscript operator operator[]
, the dealii::AssertThrow
macro is expanded for all components of the variable
.
Definition at line 119 of file convenience_macros.h.
#define ACCESSOR_READ_ONLY | ( | member | ) |
A convenience macro that automatically writes out an accessor (or getter) function:
or
depending on whether bar_ can be dereferenced, or not.
Definition at line 185 of file convenience_macros.h.
#define ACCESSOR | ( | member | ) |
Variant of the macro above that returns a mutable reference.
Definition at line 197 of file convenience_macros.h.
#define ACCESSOR_READ_ONLY_NO_DEREFERENCE | ( | member | ) |
Variant of the macro above that does not attempt to dereference the underlying object.
Definition at line 210 of file convenience_macros.h.
#define ASM_LABEL | ( | label | ) | asm("#" label); |
Injects a label into the generated assembly.
Definition at line 222 of file convenience_macros.h.
#define RYUJIN_PRAGMA | ( | x | ) | _Pragma(#x) |
#define RYUJIN_PARALLEL_REGION_BEGIN |
Begin an openmp parallel region.
#define RYUJIN_PARALLEL_REGION_END } |
#define RYUJIN_OMP_FOR RYUJIN_PRAGMA(omp for) |
#define RYUJIN_OMP_FOR_NOWAIT RYUJIN_PRAGMA(omp for nowait) |
#define RYUJIN_OMP_BARRIER RYUJIN_PRAGMA(omp barrier) |
#define RYUJIN_OMP_CRITICAL RYUJIN_PRAGMA(omp critical) |
#define RYUJIN_LIKELY | ( | x | ) | (__builtin_expect(!!(x), 1)) |
Compiler hint annotating a boolean to be likely true.
Intended use:
#define RYUJIN_UNLIKELY | ( | x | ) | (__builtin_expect(!!(x), 0)) |
Compiler hint annotating a boolean expression to be likely false.
Intended use:
void ryujin::Checkpointing::load_mesh | ( | Discretization< dim > & | discretization, |
const std::string & | base_name | ||
) |
Performs a resume operation. Given a base_name
the function tries to locate correponding checkpoint files and will read in the saved mesh and reinitializes the Discretization object.
Definition at line 39 of file checkpointing.h.
References ryujin::Discretization< dim >::prepare(), and ryujin::Discretization< dim >::triangulation().
Referenced by ryujin::TimeLoop< Description, dim, Number >::run().
void ryujin::Checkpointing::load_state_vector | ( | const OfflineData< dim, Number > & | offline_data, |
const std::string & | base_name, | ||
MultiComponentVector< Number, n_comp, simd_length > & | U, | ||
Number & | t, | ||
unsigned int & | output_cycle, | ||
const MPI_Comm & | mpi_communicator | ||
) |
Performs a resume operation. Given a base_name
the function tries to locate correponding checkpoint files and will read in the saved state U
at saved time t
with saved output cycle output_cycle
.
Definition at line 61 of file checkpointing.h.
References ryujin::OfflineData< dim, Number >::dof_handler(), ryujin::MultiComponentVector< Number, n_comp, simd_length >::insert_component(), and ryujin::OfflineData< dim, Number >::scalar_partitioner().
Referenced by ryujin::TimeLoop< Description, dim, Number >::run().
void ryujin::Checkpointing::write_checkpoint | ( | const OfflineData< dim, Number > & | offline_data, |
const std::string & | base_name, | ||
const MultiComponentVector< Number, n_comp, simd_length > & | U, | ||
const Number | t, | ||
const unsigned int | output_cycle, | ||
const MPI_Comm & | mpi_communicator | ||
) |
Writes out a checkpoint to disk. Given a base_name
and a current state U
at time t
and output cycle output_cycle
the function writes out the state to disk using boost::archive for serialization.
Definition at line 145 of file checkpointing.h.
References ryujin::OfflineData< dim, Number >::discretization(), ryujin::OfflineData< dim, Number >::dof_handler(), ryujin::MultiComponentVector< Number, n_comp, simd_length >::extract_component(), and ryujin::OfflineData< dim, Number >::scalar_partitioner().
Referenced by ryujin::TimeLoop< Description, dim, Number >::output().
ToFunction< dim, Number, Callable > ryujin::to_function | ( | const Callable & | callable, |
const unsigned int | k | ||
) |
Convenience wrapper that creates a (scalar) dealii::Function object out of a (fairly general) callable object returning array-like values. An example usage is given by the interpolation of initial values performed in InitialValues::interpolate();
callable | A callable object that provides an operator(const Point<dim> &) and returns an array or rank-1 tensor. More precisely, the return type must have a subscript operator operator[] . |
k | Index describing the component that is returned by the function object. |
Definition at line 68 of file convenience_macros.h.