template<template<class, class> class Eq, class Factory, class PDE>
inciter::registerPDE struct

Function object for registering a partial differential equation into the partial differential equation factory.

This functor is repeatedly called by MPL's cartesian_product, sweeping all combinations of the partial differential equation policies. The purpose of template template is to simplify client code as that will not have to specify the template arguments of the template argument (the policies of Eq), since we can figure it out here. See also http://stackoverflow.com/a/214900. The template argument Eq specifies a "child" class that is used polymorphically with a "base" class modeling a concept defined in the base. The base is given by the template argument PDE. The template argument Factory specifies which factory to store the registered and configured child

Constructors, destructors, conversion operators

registerPDE(Factory& f, ctr::PDEType t, std::set<ctr::PDEType>& eqTypes) explicit

Public functions

template<typename U>
void operator()(brigand::type_<U>)
Function call operator called with tk::cartesian_product for each unique sequence of policy combinations.

Public variables

Factory& factory
Need to store the reference to factory we are registering into.
const ctr::PDEType type
Need to store which differential equation we are registering.

Function documentation

template<template<class, class> class Eq, class Factory, class PDE>
inciter::registerPDE<Eq, Factory, PDE>::registerPDE(Factory& f, ctr::PDEType t, std::set<ctr::PDEType>& eqTypes) explicit

Parameters
in/out Factory into which to register PDE
in Enum selecting PDE type, Control/Inciter/Options/PDE.h
eqTypes in Equation type counters

Constructor, also count number of unique equation types registered