inciter namespace
Inciter declarations and definitions.
Namespaces
Classes
 class ALECG
 ALECG Charm++ chare array used to advance PDEs in time with ALECG+RK.
 class CGPDE
 Partial differential equation base for continuous Galerkin PDEs.
 class CmdLineParser
 Commandline parser for Inciter.
 class CompFlowProblemNLEnergyGrowth
 class CompFlowProblemRayleighTaylor
 class CompFlowProblemRotatedSodShocktube
 class CompFlowProblemSedovBlastwave
 CompFlow system of PDEs problem: Sedov blastwave.
 class CompFlowProblemSodShocktube
 class CompFlowProblemTaylorGreen
 class CompFlowProblemUserDefined
 CompFlow system of PDEs problem: user defined.
 class CompFlowProblemVorticalFlow
 class DG
 DG Charm++ chare array used to advance PDEs in time with DG+RK.
 class DGPDE
 Partial differential equation base for discontinuous Galerkin PDEs.
 class DiagCG
 DiagCG Charm++ chare array used to advance PDEs in time with DiagCG+LW+FCT.
 class Discretization
 Discretization Charm++ chare array holding common functinoality to all discretization schemes.
 class DistFCT
 DistFCT Charm++ chare array used to advance PDEs in time with DiagCG+LW+FCT.
 class ElemDiagnostics
 ElemDiagnostics class used to compute diagnostics while integrating PDEs.
 class FaceData
 FaceData class holding faceconnectivity data useful for DG discretization.
 class FluxCorrector
 struct HLLC
 class InciterDriver
 Inciter driver used polymorphically with tk::Driver.
 class InciterPrint
 InciterPrint : tk::
Print .  class InputDeckParser
 Control file parser for Inciter.
 struct LaxFriedrichs
 class MatCG
 MatCG Charm++ chare array used to advance PDEs in time with MatCG+LW+FCT.
 class MultiMatProblemUserDefined
 MultiMat system of PDEs problem: user defined.
 class MultiMatProblemVorticalFlow
 class NodeDiagnostics
 NodeDiagnostics class used to compute diagnostics while integrating PDEs.
 class Partitioner
 class PDEStack
 Partial differential equations stack.
 class Refiner
 Mesh refiner for interfacing the mesh refinement library.

template<template<class, class> class Eq>struct registerCG

template<template<class, class> class Eq>struct registerDG

template<template<class, class> class Eq, class Factory, class PDE>struct registerPDE
 Function object for registering a partial differential equation into the partial differential equation factory.
 struct registerRiemannSolver
 Functor to register a Riemann solver into the Riemann solver factory.
 class RiemannSolver
 Generic Riemann solver interface class for various Riemann solvers.
 class Scheme
 Generic forwarding interface to discretization proxies.
 class SchemeBase
 Base class for generic forwarding interface to discretization proxies.
 class Sorter
 Mesh sorter for global distributed mesh node reordering.
 class Transporter
 Transporter drives the time integration of transport equations.
 class TransportProblemCylAdvect
 Transport PDE problem: advection of cylinder.
 class TransportProblemGaussHump
 Transport PDE problem: advection of twodimensional Gaussian hump.
 class TransportProblemShearDiff
 class TransportProblemSlotCyl
 struct Upwind
 Upwind Riemann solver.
Enums
Typedefs

using GhostData = std::unordered_map<std::size_t, std::tuple<std::vector<std::size_t>, std::vector<tk::
real >, std::array<tk::real , 3>, std::size_t, std::array<std::size_t, 4>>>  Data associated to a tetrahedron cell id used to comunicate across faces.
 using CompFlowProblems = brigand::list<CompFlowProblemUserDefined, CompFlowProblemVorticalFlow, CompFlowProblemNLEnergyGrowth, CompFlowProblemRayleighTaylor, CompFlowProblemTaylorGreen, CompFlowProblemSodShocktube, CompFlowProblemRotatedSodShocktube, CompFlowProblemSedovBlastwave>
 List of all CompFlow Problem policies (defined in the includes above)

using RiemannFactory = std::map<ctr::
FluxType , std::function<RiemannSolver()>>  using MultiMatProblems = brigand::list<MultiMatProblemUserDefined, MultiMatProblemVorticalFlow>
 List of all MultiMat Problem policies (defined in the includes above)

using CGFactory = std::map<ctr::
PDEKey , std::function<CGPDE(const tk::ctr:: &)>>ncomp_type  Factory for PDEs using continuous Galerkin discretization storing keys associated to their constructors.

using DGFactory = std::map<ctr::
PDEKey , std::function<DGPDE(const tk::ctr:: &)>>ncomp_type  Factory for PDEs using discontinuous Galerkin discretization storing keys associated to their constructors.
 using TransportProblems = brigand::list<TransportProblemShearDiff, TransportProblemSlotCyl, TransportProblemGaussHump, TransportProblemCylAdvect>
 List of all Transport Problem policies (defined in the includes above)
Functions

auto serialize(const std::vector<std::vector<tk::
real >>& d) > std::pair<int, std::unique_ptr<char[]>>  Serialize std::vector to raw memory stream.
 auto mergeDiag(int nmsg, CkReductionMsg** msgs) > CkReductionMsg*
 Charm++ custom reducer for merging std::vectors during reduction across PEs.

template<typename T>auto serialize(const std::vector<std::pair<int, T>>& m) > std::pair<int, std::unique_ptr<char[]>>

template<typename T>auto mergeFields(int nmsg, CkReductionMsg** msgs) > CkReductionMsg*
 Charm++ custom reducer for merging mesh node indices categorized by chares during reduction across PEs.

auto match(tk::
ctr:: ncomp, tk::ncomp_type real t, tk::real dt, const tk::UnsMesh:: & coord, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::map<int, std::vector<std::size_t>>& sidenodes) > std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::Coords real >>>  Match userspecified boundary conditions at nodes for side sets.

auto correctBC(const tk::Fields& a,
const tk::Fields& dul,
const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::
real >>>& bc, const std::unordered_map<std::size_t, std::size_t>& lid) > bool  Verify that the change in the solution at those nodes where Dirichlet boundary conditions are set is exactly the amount the BCs prescribe.
 void operator(PUP::er& p, std::vector<CGPDE>& eqs)
 Pack/Unpack selected partial differential equations using continuous Galerkin discretization.
 void operator(PUP::er& p, std::vector<DGPDE>& eqs)
 Pack/Unpack selected partial differential equations using discontinuous Galerkin discretization.

void registerCompFlow(CGFactory& cf,
DGFactory& df,
std::set<ctr::
PDEType >& cgt, std::set<ctr::PDEType >& dgt)  Register compressible flow PDEs into PDE factory.

auto infoCompFlow(std::map<ctr::
PDEType , tk::ctr:: >& cnt) > std::vector<std::pair<std::string, std::string>>ncomp_type  Return information on the compressible flow PDE.

void registerMultiMat(DGFactory& df,
std::set<ctr::
PDEType >& dgt)  Register compressible flow PDEs into PDE factory.

auto infoMultiMat(std::map<ctr::
PDEType , tk::ctr:: >& cnt) > std::vector<std::pair<std::string, std::string>>ncomp_type  Return information on the multimaterial compressible flow PDE.

void registerTransport(CGFactory& cf,
DGFactory& df,
std::set<ctr::
PDEType >& cgt, std::set<ctr::PDEType >& dgt)  Register transport PDEs into PDE factory.

auto infoTransport(std::map<ctr::
PDEType , tk::ctr:: >& cnt) > std::vector<std::pair<std::string, std::string>>ncomp_type  Return information on the transport PDE.
 auto RiemannSolvers() > RiemannFactory
 Register available Riemann solvers into a factory.

void WENO_P1(const std::vector<int>& esuel,
inciter::
ncomp_t offset, const tk::Fields& U, tk::Fields& limFunc)  Weighted Essentially NonOscillatory (WENO) limiter for DGP1.

template<typename V>auto parameters(const V& v) > std::string
 Convert and return values from vector as string.
Variables
 ctr::
InputDeck g_inputdeck  ctr::
InputDeck g_inputdeck_defaults  std::vector<CGPDE> g_cgpde
 std::vector<DGPDE> g_dgpde
 const std::size_t NUMDIAG
 Number of entries in diagnostics vector (of vectors)
Enum documentation
Typedef documentation
using inciter::RiemannFactory = std::map<ctr::FluxType , std::function<RiemannSolver()>>
Factory for Riemann solvers
This factory is used to store the constructors as a std::function of specific Riemann solvers that can be invoked at a later time compared to the point where the map is populated. The key is an enum, uniquely idenfitying a specific Riemann solver. The value is std::function storing a constructor to be invoked. The type of object stored in std::function is a generic (base) class constructor, which provides a polymorphyic interface (overridable functions) that specific (child) Riemann solvers override, yielding runtime polymorphism.
Function documentation
CkReductionMsg* inciter:: mergeDiag(int nmsg,
CkReductionMsg** msgs)
Charm++ custom reducer for merging std::vectors during reduction across PEs.
Parameters  

nmsg in  Number of messages in msgs 
msgs in  Charm++ reduction message containing the serialized diagnostics 
Returns  Aggregated diagnostics built for further aggregation if needed 
template<typename T>
std::pair<int, std::unique_ptr<char[]>> inciter:: serialize(const std::vector<std::pair<int, T>>& m)
Parameters  

m in  Chare mesh node indices to serialize 
Returns  Pair of the length and the raw stream containing the serialized data 
Serialize mesh node indices categorized by chares to raw memory stream
template<typename T>
CkReductionMsg* inciter:: mergeFields(int nmsg,
CkReductionMsg** msgs)
Charm++ custom reducer for merging mesh node indices categorized by chares during reduction across PEs.
Parameters  

nmsg in  Number of messages in msgs 
msgs in  Charm++ reduction message containing the serialized mesh node indices categorized by chares 
Returns  Aggregated mesh node indices categorized by chares built for further aggregation if needed 
During aggregation the outer vector is simply concatenated.
std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real >>> inciter:: match(tk::ctr::ncomp_type ncomp,
tk::real t,
tk::real dt,
const tk::UnsMesh::Coords & coord,
const std::vector<std::size_t>& gid,
const std::unordered_map<std::size_t, std::size_t>& lid,
const std::map<int, std::vector<std::size_t>>& sidenodes)
Match userspecified boundary conditions at nodes for side sets.
Parameters  

ncomp in  Number of scalar components in PDE system 
t in  Physical time at which to query boundary conditions 
dt in  Time step size (for querying BC increments in time) 
coord in  Mesh node coordinates 
gid in  Global node IDs 
lid in  Local node IDs associated to global node IDs 
sidenodes in  Map storing global mesh node IDs mapped to side set ids 
Returns  Vector of pairs of bool and boundary condition value associated to mesh node IDs at which the user has set Dirichlet boundary conditions for all systems of PDEs integrated. The bool indicates whether the BC is set at the node for that component: if true, the real value is the increment (from t to dt) in the BC specified for a component. 
Boundary conditions (BC), mathematically speaking, are applied on finite surfaces. These finite surfaces are given by element sets (i.e., a list of elements). This function queries Dirichlet boundary condition values from all PDEs in the system of systems of PDEs integrated at the node lists associated to side set IDs, given by sidenodes. Each PDE system returns a BC data structure. Note that the BC mesh nodes that this function results in, stored in dirbc, only contains those nodes that are supplied via sidenodes, i.e., in parallel only a part of the mesh is worked on.
bool inciter:: correctBC(const tk::Fields& a,
const tk::Fields& dul,
const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real >>>& bc,
const std::unordered_map<std::size_t, std::size_t>& lid)
Verify that the change in the solution at those nodes where Dirichlet boundary conditions are set is exactly the amount the BCs prescribe.
Parameters  

a in  Limited antidiffusive element contributions (from FCT) 
dul in  Low order solution increment 
bc in  Vector of boundary conditions (true/false + BC value) for all scalar components integrated associated of all systems to global node ID 
lid in  Local node IDs associated to global node IDs 
Returns  True if solution is correct at Dirichlet boundary condition nodes 
We loop through the map that associates a vector of of boundary conditions (true/false, indicating whether the BC is set + BC value if true) for all scalar components integrated associated of all systems to global node IDs. Then for all scalar components of all systems of systems of PDEs integrated if a BC is to be set for a given component, we compute the low order solution increment + the antidiffusive element contributions (in FCT), which is the current solution increment (to be used to update the solution at time n in FCT) at that node. This solution increment must equal the BC prescribed at the given node as we solve for solution increments. If not, the BCs are not set correctly, which is an error.
void inciter:: operator(PUP::er& p,
std::vector<CGPDE>& eqs)
Pack/Unpack selected partial differential equations using continuous Galerkin discretization.
This Pack/Unpack method (re)creates the PDE factory since it needs to (re)bind function pointers on different processing elements. Therefore we circumvent Charm's usual pack/unpack for this type, and thus sizing does not make sense: sizing is a noop. We could initialize the factory in InciterDriver's constructor and let this function recreate the stack only when unpacking, but that leads to repeating the same code twice: once in InciterDriver's constructor, once here. Another option is to use this pack/unpack routine to both initially create (when packing) and to recreate (when unpacking) the factory, which eliminates the need for precreating the object in InciterDriver's constructor and therefore eliminates the repeated code. This explains the guard for sizing: the code below is called for packing only (in serial) and packing and unpacking (in parallel).
void inciter:: operator(PUP::er& p,
std::vector<DGPDE>& eqs)
Pack/Unpack selected partial differential equations using discontinuous Galerkin discretization.
This Pack/Unpack method (re)creates the PDE factory since it needs to (re)bind function pointers on different processing elements. Therefore we circumvent Charm's usual pack/unpack for this type, and thus sizing does not make sense: sizing is a noop. We could initialize the factory in InciterDriver's constructor and let this function recreate the stack only when unpacking, but that leads to repeating the same code twice: once in InciterDriver's constructor, once here. Another option is to use this pack/unpack routine to both initially create (when packing) and to recreate (when unpacking) the factory, which eliminates the need for precreating the object in InciterDriver's constructor and therefore eliminates the repeated code. This explains the guard for sizing: the code below is called for packing only (in serial) and packing and unpacking (in parallel).
void inciter:: registerCompFlow(CGFactory& cf,
DGFactory& df,
std::set<ctr::PDEType >& cgt,
std::set<ctr::PDEType >& dgt)
Register compressible flow PDEs into PDE factory.
Parameters  

cf in/out  Continuous Galerkin PDE factory to register to 
df in/out  Discontinuous Galerkin PDE factory to register to 
cgt in/out  Counters for equation types registered into CG factory 
dgt in/out  Counters for equation types registered into DG factory 
std::vector<std::pair<std::string, std::string>> inciter:: infoCompFlow(std::map<ctr::PDEType , tk::ctr::ncomp_type >& cnt)
Return information on the compressible flow PDE.
Parameters  

cnt in/out  std::map of counters for all PDE types 
Returns  vector of string pairs describing the PDE configuration 
void inciter:: registerMultiMat(DGFactory& df,
std::set<ctr::PDEType >& dgt)
Register compressible flow PDEs into PDE factory.
Parameters  

df in/out  Discontinuous Galerkin PDE factory to register to 
dgt in/out  Counters for equation types registered into DG factory 
std::vector<std::pair<std::string, std::string>> inciter:: infoMultiMat(std::map<ctr::PDEType , tk::ctr::ncomp_type >& cnt)
Return information on the multimaterial compressible flow PDE.
Parameters  

cnt in/out  std::map of counters for all PDE types 
Returns  vector of string pairs describing the PDE configuration 
void inciter:: registerTransport(CGFactory& cf,
DGFactory& df,
std::set<ctr::PDEType >& cgt,
std::set<ctr::PDEType >& dgt)
Register transport PDEs into PDE factory.
Parameters  

cf in/out  Continuous Galerkin PDE factory to register to 
df in/out  Discontinuous Galerkin PDE factory to register to 
cgt in/out  Counters for equation types registered into CG factory 
dgt in/out  Counters for equation types registered into DG factory 
std::vector<std::pair<std::string, std::string>> inciter:: infoTransport(std::map<ctr::PDEType , tk::ctr::ncomp_type >& cnt)
Return information on the transport PDE.
Parameters  

cnt in/out  std::map of counters for all PDE types 
Returns  vector of string pairs describing the PDE configuration 
RiemannFactory inciter:: RiemannSolvers()
Register available Riemann solvers into a factory.
Returns  Riemann solver factory 

void inciter:: WENO_P1(const std::vector<int>& esuel,
inciter::ncomp_t offset,
const tk::Fields& U,
tk::Fields& limFunc)
Weighted Essentially NonOscillatory (WENO) limiter for DGP1.
Parameters  

esuel in  Elements surrounding elements 
offset in  Index for equation systems 
U in  Highorder solution vector 
limFunc in/out  Limiter function 
template<typename V>
std::string inciter:: parameters(const V& v)
Convert and return values from vector as string.
Parameters  

v in  Vector whose components to return as a string 
Returns  Concatenated string of values read from a vector 
Variable documentation
ctr::InputDeck inciter::g_inputdeck
Input deck filled by parser, containing all input data
This object is in global scope, it contains all of user input, and thus it is made available to all PEs for convenience reasons. The runtime system distributes it to all PEs during initialization. Once distributed, the object does not change.
ctr::InputDeck inciter::g_inputdeck_defaults
Globalscope data. Initialized by the main chare and distibuted to all PEs by the Charm++ runtime system. Though semantically not const, all these global data should be considered readonly. See also http:/
This object is in global scope, it contains the default of all possible user input, and thus it is made available to all PEs for convenience reasons. The runtime system distributes it to all PEs during initialization. Once distributed, the object does not change.
std::vector<CGPDE> inciter::g_cgpde
Partial differential equations using continuous Galerkin selected by user
This vector is in global scope, because it holds polymorphic objects, and thus must be distributed to all PEs during initialization. Once distributed by the runtime system, the objects do not change.
std::vector<DGPDE> inciter::g_dgpde
Partial differential equations using discontinuous Galerkin selected by user
This vector is in global scope, because it holds polymorphic objects, and thus must be distributed to all PEs during initialization. Once distributed by the runtime system, the objects do not change.