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 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 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&

Function documentation

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

Parameters
scheme in Discretization scheme
linearsolver in True if enable a linear solver 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.

Constructor

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 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(...).

Issue broadcast to Scheme entry method

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 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.

Call Scheme function via Charm++ chare array element's ckLocal()

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 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.

Function to call the insert entry method of an element proxy

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

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