inciter::Scheme class

Base class for generic forwarding interface to discretization proxies.

Public types

struct resizePostAMR
Function tags for specific Scheme classes to use with ckLocal()
struct setup
Entry method tags for specific Scheme classes to use with bcast()
using ProxyElem = std::variant<CProxy_DiagCG::element_t, CProxy_DG::element_t, CProxy_ALECG::element_t>
Variant type listing all chare element proxy types.

Constructors, destructors, conversion operators

Scheme() explicit
Empty constructor for Charm++.
Scheme(ctr::SchemeType scheme, bool ale = false, bool linearsolver = false) explicit

Public functions

template<typename Fn, typename... Args>
void bcast(Args&&... args)
template<typename Fn, typename... Args>
auto ckLocal(const CkArrayIndex1D& x, Args&&... args) const -> auto
template<typename... Args>
void insert(const CkArrayIndex1D& x, Args&&... args)
auto disc() -> CProxy_Discretization& noexcept
auto fct() -> CProxy_DistFCT& noexcept
auto ale() -> CProxy_ALE& noexcept
auto conjugategradients() -> tk::CProxy_ConjugateGradients& noexcept
auto getProxy() -> const Proxy& noexcept
auto index() const -> std::size_t noexcept
auto index_element() const -> std::size_t noexcept
auto arrayoptions() -> const CkArrayOptions&

Charm++ pack/unpack serializer member functions

Proxy proxy
Variant storing one proxy to which this class is configured for.
CProxy_Discretization discproxy
Charm++ proxy to data and code common to all discretizations.
CProxy_DistFCT fctproxy
Charm++ proxy to flux-corrected transport (FCT) driver class.
CProxy_ALE aleproxy
Charm++ proxy to ALE class.
tk::CProxy_ConjugateGradients conjugategradientsproxy
Charm++ proxy to conjugate gradients linear solver class.
CkArrayOptions bound
Charm++ array options for binding chares.
void pup(PUP::er& p)
Pack/Unpack serialize member function.
void operator|(PUP::er& p, Scheme& s)
Pack/Unpack serialize operator|.

Function documentation

inciter::Scheme::Scheme(ctr::SchemeType scheme, bool ale = false, bool linearsolver = false) explicit

Parameters
scheme in Discretization scheme
ale in True if enable ALE
linearsolver in True if enable a linear solver

Constructor Based on the input enum we create at least two empty chare arrays: (1) discproxy which contains common functionality and data for all discretizations, and (2) proxy, which have functionality and data specific to a given discretization. Note that proxy is bound (in migration behavior and properties) to discproxy.

template<typename Fn, typename... Args>
void inciter::Scheme::bcast(Args&&... args)

Template parameters
Fn Function tag identifying the entry method to call
Args Types of arguments to pass to entry method
Parameters
args in Arguments to member function entry method to be called

Issue broadcast to Scheme entry method This function issues a broadcast to a member function entry method of the Scheme chare array (the child of Discretization) and is thus equivalent to proxy.Fn(...).

template<typename Fn, typename... Args>
auto inciter::Scheme::ckLocal(const CkArrayIndex1D& x, Args&&... args) const

Template parameters
Fn Function tag identifying the function to call
Args Types of arguments to pass to function
Parameters
in Chare array element index
args in Arguments to member function function to be called

Call Scheme function via Charm++ chare array element's ckLocal() This function calls a member function via Charm++'s ckLocal() behind the element proxy configured, indexed by the array index x. Since the call is behind ckLocal(), the member function does not have to be a Charm++ entry method.

template<typename... Args>
void inciter::Scheme::insert(const CkArrayIndex1D& x, Args&&... args)

Parameters
in Chare array element index
args in Arguments to member function (entry method) to be called

Function to call the insert entry method of an element proxy This function calls the insert member function of a chare array element proxy and thus equivalent to proxy[x].insert(...), using the last argument as default.

CProxy_Discretization& inciter::Scheme::disc() noexcept

Returns Discretization Charm++ chare array proxy

Get reference to discretization proxy

CProxy_DistFCT& inciter::Scheme::fct() noexcept

Returns DistFCT Charm++ chare array proxy

Get reference to DistFCT proxy

CProxy_ALE& inciter::Scheme::ale() noexcept

Returns ALE Charm++ chare array proxy

Get reference to ALE proxy

tk::CProxy_ConjugateGradients& inciter::Scheme::conjugategradients() noexcept

Returns ConjugateGradients Charm++ chare array proxy

Get reference to ConjugateGradients proxy

const Proxy& inciter::Scheme::getProxy() noexcept

Returns Variant storing Charm++ chare array proxy configured

Get reference to scheme proxy Get reference to scheme proxy

std::size_t inciter::Scheme::index() const noexcept

Returns Zero-based index into the set of types of Proxy

Query underlying proxy type

std::size_t inciter::Scheme::index_element() const noexcept

Returns Zero-based index that can be used, e.g., indexing into the set of types of ProxyElem

Query underlying proxy element type

const CkArrayOptions& inciter::Scheme::arrayoptions()

Returns Charm++ array options object reference

Charm++ array options accessor for binding external proxies

void inciter::Scheme::pup(PUP::er& p)

Pack/Unpack serialize member function.

Parameters
in/out Charm++'s PUP::er serializer object reference

void inciter::Scheme::operator|(PUP::er& p, Scheme& s)

Pack/Unpack serialize operator|.

Parameters
in/out Charm++'s PUP::er serializer object reference
in/out Scheme object reference