inciter namespace

Inciter declarations and definitions.

Namespaces

namespace cmd
Inciter command line grammar definition.
namespace ctr
Inciter control facilitating user input to internal data transfer.
namespace deck
Inciter input deck facilitating user input for computing shock hydrodynamics.

Classes

class CmdLineParser
Command-line parser for Inciter.
class InputDeckParser
Control file parser for Inciter.
class ALE
ALE Charm++ chare array used to perform arbitrary ALE mesh movement.
class ALECG
ALECG Charm++ chare array used to advance PDEs in time with ALECG+RK.
class DG
DG Charm++ chare array used to advance PDEs in time with DG+RK.
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 face-connectivity data useful for DG discretization.
class FluxCorrector
class NodeDiagnostics
NodeDiagnostics class used to compute diagnostics while integrating PDEs.
class Partitioner
class Refiner
Mesh refiner for interfacing the mesh refinement library.
class Scheme
Base class for generic forwarding interface to discretization proxies.
class Sorter
Mesh sorter for global distributed mesh node reordering.
struct Transfer
Description of solution transfer between two solvers holding different meshes.
class Transporter
Transporter drives the time integration of transport equations.
class InciterDriver
Inciter driver used polymorphically with tk::Driver.
class InciterPrint
InciterPrint : tk::Print.
class CGPDE
Partial differential equation base for continuous Galerkin PDEs.
class CompFlowProblemGaussHump
CompFlow system of PDEs problem: GaussHump.
class CompFlowProblemNLEnergyGrowth
class CompFlowProblemRayleighTaylor
class CompFlowProblemRotatedSodShocktube
class CompFlowProblemSedovBlastwave
CompFlow system of PDEs problem: Sedov blast-wave.
class CompFlowProblemSheddingFlow
CompFlow system of PDEs problem: Shedding flow.
class CompFlowProblemSodShocktube
class CompFlowProblemTaylorGreen
class CompFlowProblemUserDefined
CompFlow system of PDEs problem: user defined.
class CompFlowProblemVorticalFlow
struct registerRiemannSolver
Functor to register a Riemann solver into the Riemann solver factory.
template<class Eq>
struct ConfigBC
class DGPDE
Partial differential equation base for discontinuous Galerkin PDEs.
class MultiMatProblemInterfaceAdvection
class MultiMatProblemShockHeBubble
class MultiMatProblemSodShocktube
class MultiMatProblemUnderwaterEx
class MultiMatProblemUserDefined
MultiMat system of PDEs problem: user defined.
class MultiMatProblemWaterAirShocktube
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.
template<template<class, class> class Eq>
struct registerCG
template<template<class, class> class Eq>
struct registerDG
class PDEStack
Partial differential equations stack.
struct AUSM
struct HLL
struct HLLC
struct LaxFriedrichs
class RiemannSolver
Generic Riemann solver interface class for various Riemann solvers.
struct Rusanov
struct Upwind
Upwind Riemann solver.
class TransportProblemCylAdvect
Transport PDE problem: advection of cylinder.
class TransportProblemCylVortex
Transport PDE problem: deformation of cylinder in a vortex.
class TransportProblemGaussHump
Transport PDE problem: advection of two-dimensional Gaussian hump.
class TransportProblemShearDiff
class TransportProblemSlotCyl

Enums

enum Diag { L2SOL =0, L2ERR, L2RES, LINFERR, TOTALSOL, ITER, TIME, DT }
Diagnostics labels.
enum ProgMesh { PART =0, DIST, REFINE, BND, COMM, MASK, REORD }
Indices for progress report on mesh preparation.
enum ProgWork { CREATE =0, BNDFACE, COMFAC, GHOST, ADJ }
Indices for progress report on workers preparation.

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 communicate across faces.
using HistData = tk::TaggedTuple<brigand::list<tag::id, std::string, tag::elem, std::size_t, tag::coord, std::array<tk::real, 3>, tag::fn, std::array<tk::real, 4>>>
History point data.
using CompFlowProblems = brigand::list<CompFlowProblemUserDefined, CompFlowProblemVorticalFlow, CompFlowProblemNLEnergyGrowth, CompFlowProblemRayleighTaylor, CompFlowProblemTaylorGreen, CompFlowProblemSodShocktube, CompFlowProblemSheddingFlow, CompFlowProblemRotatedSodShocktube, CompFlowProblemSedovBlastwave, CompFlowProblemGaussHump>
List of all CompFlow Problem policies (defined in the includes above)
using CompFlowRiemannFactory = std::map<ctr::FluxType, std::function<RiemannSolver()>>
using MultiMatProblems = brigand::list<MultiMatProblemUserDefined, MultiMatProblemSodShocktube, MultiMatProblemInterfaceAdvection, MultiMatProblemWaterAirShocktube, MultiMatProblemShockHeBubble, MultiMatProblemUnderwaterEx>
List of all MultiMat Problem policies (defined in the includes above)
using MultiMatRiemannFactory = std::map<ctr::FluxType, std::function<RiemannSolver()>>
using CGFactory = std::map<ctr::PDEKey, std::function<CGPDE(const tk::ctr::ncomp_t&)>>
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_t&)>>
Factory for PDEs using discontinuous Galerkin discretization storing keys associated to their constructors.
using TransportProblems = brigand::list<TransportProblemShearDiff, TransportProblemSlotCyl, TransportProblemGaussHump, TransportProblemCylAdvect, TransportProblemCylVortex>
List of all Transport Problem policies (defined in the includes above)

Functions

auto serialize(std::size_t meshid, 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.
auto numericFieldNames(tk::Centering c) -> std::vector<std::string>
Collect field output names from numerical solution based on user input.
auto numericFieldOutput(const tk::Fields& U, tk::Centering c, const tk::Fields& P) -> std::vector<std::vector<tk::real>>
Collect field output from numerical solution based on user input.
template<class PDE>
void analyticFieldNames(const PDE& eq, tk::Centering c, std::vector<std::string>& f)
template<class PDE>
void analyticFieldOutput(const PDE& eq, tk::Centering c, const std::vector<tk::real>& x, const std::vector<tk::real>& y, const std::vector<tk::real>& z, tk::real t, std::vector<std::vector<tk::real>>& f)
auto match(] tk::ctr::ncomp_t ncomp, tk::real t, tk::real dt, const std::vector<tk::real>& tp, const std::vector<tk::real>& dtp, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, std::size_t>& lid, const std::map<int, std::vector<std::size_t>>& bnode, bool increment) -> std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>>
auto correctBC(const tk::Fields& a, const tk::Fields& dul, const std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>>& dirbc) -> bool
Verify that the change in the solution at those nodes where Dirichlet boundary conditions are set is exactly the amount the BCs prescribe.
auto match(tk::ctr::ncomp_t ncomp, tk::real t, tk::real dt, const std::vector<tk::real>& tp, const std::vector<tk::real>& dtp, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, std::size_t>& lid, const std::map<int, std::vector<std::size_t>>& sidenodes, bool increment) -> std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>>
Match user-specified boundary conditions at nodes for side sets.
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 initializeBox(std::size_t system, tk::real VRatio, tk::real t, const inciter::ctr::box& b, tk::real bgpreic, tk::real cv, std::vector<tk::real>& s)
Set the solution in the user-defined IC box.
auto CompFlowFieldNames() -> std::vector<std::string>
Return field names to be output to file.
auto CompFlowFieldOutput(ncomp_t system, ncomp_t offset, std::size_t nunk, std::size_t rdof, const tk::Fields& U) -> std::vector<std::vector<tk::real>>
Return field output going to file.
auto CompFlowSurfNames() -> std::vector<std::string>
Return surface field names to be output to file.
auto CompFlowSurfOutput(ncomp_t system, const std::map<int, std::vector<std::size_t>>& bnd, const tk::Fields& U) -> std::vector<std::vector<tk::real>>
Return surface field output going to file.
auto CompFlowHistNames() -> std::vector<std::string>
Return time history field names to be output to file.
auto CompFlowHistOutput(ncomp_t system, const std::vector<HistData>& h, const std::vector<std::size_t>& inpoel, const tk::Fields& U) -> std::vector<std::vector<tk::real>>
Return time history field output evaluated at time history points.
auto compflowRiemannSolvers() -> CompFlowRiemannFactory
Register available Riemann solvers into a factory.
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::ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>>
Return information on the compressible flow PDE.
void assignCompFlowGetVars(const std::string& name, tk::GetVarFn& f)
Assign function that computes physics variables from the numerical solution for CompFlow.
void registerMultiMat(DGFactory& df, std::set<ctr::PDEType>& dgt)
Register compressible flow PDEs into PDE factory.
auto infoMultiMat(std::map<ctr::PDEType, tk::ctr::ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>>
Return information on the multi-material compressible flow PDE.
void assignMultiMatGetVars(const std::string& name, tk::GetVarFn& f)
Assign function that computes physics variables from the numerical solution for MultiMat.
auto assignGetVars(const std::string& name) -> tk::GetVarFn
Assign all functions that compute output variables from the numerical solution.
template<class Keyword>
void assign(const std::string& name, const tk::GetVarFn& src, tk::GetVarFn& dst)
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::ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>>
Return information on the transport PDE.
void assignTransportGetVars(const std::string& name, tk::GetVarFn& f)
Assign function that computes physics variables from the numerical solution for MultiMat.
auto invalidBC(ncomp_t, ncomp_t, const std::vector<tk::real>&, tk::real, tk::real, tk::real, tk::real, const std::array<tk::real, 3>&) -> tk::StateFn::result_type
State function for invalid/un-configured boundary conditions.
template<class Eq, class Prop>
auto getmatprop(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto gamma(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto cv(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto pstiff(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto k(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto mu(ncomp_t system, std::size_t imat = 0) -> tk::real
template<class Eq>
auto eos_density(ncomp_t system, tk::real pr, tk::real temp, std::size_t imat = 0) -> tk::real
Calculate density from the material pressure and temperature using the stiffened-gas equation of state.
template<class Eq>
auto eos_pressure(ncomp_t system, tk::real arho, tk::real u, tk::real v, tk::real w, tk::real arhoE, tk::real alpha = 1.0, std::size_t imat = 0) -> tk::real
Calculate pressure from the material density, momentum and total energy using the stiffened-gas equation of state.
template<class Eq>
auto eos_soundspeed(ncomp_t system, tk::real arho, tk::real apr, tk::real alpha = 1.0, std::size_t imat = 0) -> tk::real
template<class Eq>
auto eos_totalenergy(ncomp_t system, tk::real rho, tk::real u, tk::real v, tk::real w, tk::real pr, std::size_t imat = 0) -> tk::real
Calculate material specific total energy from the material density, momentum and material pressure.
template<class Eq>
auto eos_temperature(ncomp_t system, tk::real arho, tk::real u, tk::real v, tk::real w, tk::real arhoE, tk::real alpha = 1.0, std::size_t imat = 0) -> tk::real
Calculate material temperature from the material density, and material specific total energy.
template<class Eq>
auto constrain_pressure(ncomp_t system, tk::real apr, tk::real alpha = 1.0, std::size_t imat = 0) -> tk::real
template<class eq>
void infoMesh(std::size_t c, std::vector<std::pair<std::string, std::string>>& nfo)
void WENO_P1(const std::vector<int>& esuel, inciter::ncomp_t offset, tk::Fields& U)
Weighted Essentially Non-Oscillatory (WENO) limiter for DGP1.
void Superbee_P1(const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, inciter::ncomp_t offset, const tk::UnsMesh::Coords& coord, tk::Fields& U)
Superbee limiter for DGP1.
void SuperbeeMultiMat_P1(const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t system, inciter::ncomp_t offset, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P, std::size_t nmat)
Superbee limiter for multi-material DGP1.
void VertexBasedTransport_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t system, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U)
Kuzmin's vertex-based limiter for transport DGP1.
void VertexBasedCompflow_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U)
Kuzmin's vertex-based limiter for single-material DGP1.
void VertexBasedCompflow_P2(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::vector<std::vector<tk::real>>& uNodalExtrm, tk::Fields& U)
Kuzmin's vertex-based limiter for single-material DGP2.
void VertexBasedMultiMat_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t system, std::size_t offset, ] const inciter::FaceData& fd, ] const tk::Fields& geoFace, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P, std::size_t nmat, std::vector<std::size_t>& shockmarker)
void WENOLimiting(const tk::Fields& U, const std::vector<int>& esuel, std::size_t e, inciter::ncomp_t c, std::size_t rdof, inciter::ncomp_t offset, tk::real cweight, std::array<std::vector<tk::real>, 3>& limU)
WENO limiter function calculation for P1 dofs.
auto SuperbeeLimiting(const tk::Fields& U, const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, std::size_t e, std::size_t ndof, std::size_t rdof, std::size_t dof_el, inciter::ncomp_t offset, inciter::ncomp_t ncomp, tk::real beta_lim) -> std::vector<tk::real>
Superbee limiter function calculation for P1 dofs.
void VertexBasedLimiting(const std::vector<std::vector<tk::real>>& unk, const tk::Fields& U, const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& geoElem, std::size_t e, std::size_t rdof, std::size_t dof_el, std::size_t offset, std::size_t ncomp, std::vector<tk::real>& phi, const std::array<std::size_t, 2>& VarRange)
Kuzmin's vertex-based limiter function calculation for P1 dofs.
auto VertexBasedLimiting_P2(const std::vector<std::vector<tk::real>>& unk, const tk::Fields& U, const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& geoElem, std::size_t e, std::size_t rdof, ] std::size_t dof_el, std::size_t offset, std::size_t ncomp, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::vector<std::vector<tk::real>>& NodalExtrm) -> std::vector<tk::real>
void consistentMultiMatLimiting_P1(std::size_t nmat, ncomp_t offset, std::size_t rdof, std::size_t e, tk::Fields& U, ] tk::Fields& P, std::vector<tk::real>& phic, ] std::vector<tk::real>& phip)
void BoundPreservingLimiting(std::size_t nmat, ncomp_t offset, std::size_t ndof, std::size_t e, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& U, std::vector<tk::real>& phic)
Bound preserving limiter for the P1 dofs of volume fractions.
auto interfaceIndicator(std::size_t nmat, const std::vector<tk::real>& al, std::vector<std::size_t>& matInt) -> bool
Interface indicator function, which checks element for material interface.
void MarkShockCells(const std::size_t nelem, const std::size_t nmat, const std::size_t system, const std::size_t offset, const std::size_t ndof, const std::size_t rdof, const std::vector<std::size_t>& ndofel, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const inciter::FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const tk::Fields& U, const tk::Fields& P, std::vector<std::size_t>& shockmarker)
void VertexBasedMultiMat_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t system, std::size_t offset, const inciter::FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P, std::size_t nmat, std::vector<std::size_t>& shockmarker)
Kuzmin's vertex-based limiter for multi-material DGP1.
auto VertexBasedLimiting_P2(const std::vector<std::vector<tk::real>>& unk, const tk::Fields& U, const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& geoElem, std::size_t e, std::size_t rdof, std::size_t dof_el, std::size_t offset, std::size_t ncomp, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::vector<std::vector<tk::real>>& NodalExtrm) -> std::vector<tk::real>
Kuzmin's vertex-based limiter function calculation for P2 dofs.
void consistentMultiMatLimiting_P1(std::size_t nmat, ncomp_t offset, std::size_t rdof, std::size_t e, tk::Fields& U, tk::Fields& P, std::vector<tk::real>& phic, std::vector<tk::real>& phip)
Consistent limiter modifications for P1 dofs.
void initializeBox(std::size_t system, tk::real VRatio, tk::real, const inciter::ctr::box& b, std::vector<tk::real>& s)
Set the solution in the user-defined IC box.
auto MultiMatFieldNames(std::size_t nmat) -> std::vector<std::string>
Return multi-material field names to be output to file.
auto MultiMatFieldOutput(ncomp_t, std::size_t nmat, ncomp_t offset, std::size_t nunk, std::size_t rdof, const std::vector<tk::real>&, const std::array<std::vector<tk::real>, 3>&, const tk::Fields& U, const tk::Fields& P) -> std::vector<std::vector<tk::real>>
Return field output going to file.
auto MultiMatHistNames() -> std::vector<std::string>
Return time history field names to be output to file.
auto multimatRiemannSolvers() -> MultiMatRiemannFactory
Register available Riemann solvers into a factory.
void spectral_decay(std::size_t nmat, std::size_t nunk, const std::vector<int>& esuel, const tk::Fields& unk, std::size_t ndof, std::size_t ndofmax, tk::real tolref, std::vector<std::size_t>& ndofel)
Evaluate the spectral-decay indicator and mark the ndof for each element.
void non_conformity(std::size_t nunk, std::size_t Nbfac, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const std::vector<int>& esuel, const std::vector<int>& esuf, const std::vector<std::size_t>& inpofa, const tk::Fields& unk, std::size_t ndof, std::size_t ndofmax, std::vector<std::size_t>& ndofel)
Evaluate the non-conformity indicator and mark the ndof for each element.
auto evalDiscIndicator_CompFlow(std::size_t e, ncomp_t ncomp, const std::size_t ndof, const std::size_t ndofel, const tk::Fields& unk) -> tk::real
Evaluate the spectral decay indicator for single-material flow.
auto evalDiscIndicator_MultiMat(std::size_t e, std::size_t nmat, ncomp_t ncomp, const std::size_t ndof, const std::size_t ndofel, const tk::Fields& unk) -> tk::real
Evaluate the spectral decay indicator for multi-material flow.

Variables

ctr::InputDeck g_inputdeck
ctr::InputDeck g_inputdeck_defaults
std::vector<CGPDE> g_cgpde
static const std::array<tk::real, 3> rkcoef
Runge-Kutta coefficients.
std::vector<DGPDE> g_dgpde
static const std::array<std::array<tk::real, 3>, 2> rkcoef
Runge-Kutta coefficients.
const std::size_t NUMDIAG
Number of entries in diagnostics vector (of vectors)
static const std::array<std::string, 7> ProgMeshPrefix
Prefixes for progress report on mesh preparation.
static const std::array<std::string, 5> ProgWorkPrefix
Prefixes for progress report on workers preparation.

Functions that compute indices for physics variables for MultiMat

auto volfracIdx(std::size_t, std::size_t kmat) -> std::size_t
auto densityIdx(std::size_t nmat, std::size_t kmat) -> std::size_t
auto momentumIdx(std::size_t nmat, std::size_t idir) -> std::size_t
auto energyIdx(std::size_t nmat, std::size_t kmat) -> std::size_t
auto velocityIdx(std::size_t nmat, std::size_t idir) -> std::size_t
auto pressureIdx(std::size_t, std::size_t kmat) -> std::size_t
auto volfracDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of material volume fraction from the DG solution vector.
auto densityDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of material continuity equation from the DG solution vector.
auto momentumDofIdx(std::size_t nmat, std::size_t idir, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of momentum equation component from the DG solution vector.
auto energyDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of material total energy equation from the DG solution vector.
auto velocityDofIdx(std::size_t nmat, std::size_t idir, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of velocity component from the DG vector of primitives.
auto pressureDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof) -> std::size_t
Get the index of the required DOF of material pressure from the DG vector of primitives.

Enum documentation

enum inciter::Diag

Diagnostics labels.

Enumerators
L2SOL

L2 norm of numerical solution.

L2ERR

L2 norm of numerical-analytic solution.

L2RES

L2 norm of the residual.

LINFERR

L_inf norm of numerical-analytic solution.

TOTALSOL

Sum of conserved solution over entire domain.

ITER

Iteration count.

TIME

Physical time.

DT

Typedef documentation

using inciter::CompFlowRiemannFactory = 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.

using inciter::MultiMatRiemannFactory = 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

std::pair<int, std::unique_ptr<char[]>> inciter::serialize(std::size_t meshid, const std::vector<std::vector<tk::real>>& d)

Serialize std::vector to raw memory stream.

Parameters
meshid in Mesh ID
in Diagnostics vector of vectors (of eq components)
Returns Pair of the length and the raw stream containing the serialized vectors

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

std::vector<std::string> inciter::numericFieldNames(tk::Centering c)

Collect field output names from numerical solution based on user input.

Parameters
in Extract variable names only with this centering
Returns Output field names requested by user

std::vector<std::vector<tk::real>> inciter::numericFieldOutput(const tk::Fields& U, tk::Centering c, const tk::Fields& P)

Collect field output from numerical solution based on user input.

Parameters
in Solution data to extract from
in Extract variables only with this centering
in Optional primitive variable solution data to extract from
Returns Output fields requested by user

template<class PDE>
void inciter::analyticFieldNames(const PDE& eq, tk::Centering c, std::vector<std::string>& f)

Template parameters
PDE Partial differential equation type
Parameters
eq in PDE whose analytic solution field names to query
in Extract variables only with this centering
in/out Output field names augmented

Collect field output names from analytic solutions based on user input

template<class PDE>
void inciter::analyticFieldOutput(const PDE& eq, tk::Centering c, const std::vector<tk::real>& x, const std::vector<tk::real>& y, const std::vector<tk::real>& z, tk::real t, std::vector<std::vector<tk::real>>& f)

Template parameters
PDE Partial differential equation type
Parameters
eq in PDE whose analytic solution to output
in Extract variables only with this centering
in x coordinates at which to evaluate the analytic solution
in y coordinates at which to evaluate the analytic solution
in z coordinates at which to evaluate the analytic solution
in Physical time at which to evaluate the analytic solution
in/out Output fields augmented by analytic solutions requested

Collect field output from analytic solutions based on user input

std::unordered_map<std::size_t, std::vector<std::pair<bool, tk::real>>> inciter::match(] tk::ctr::ncomp_t ncomp, tk::real t, tk::real dt, const std::vector<tk::real>& tp, const std::vector<tk::real>& dtp, const tk::UnsMesh::Coords& coord, const std::unordered_map<std::size_t, std::size_t>& lid, const std::map<int, std::vector<std::size_t>>& bnode, bool increment)

Parameters
ncomp in Number of scalar components in PDE system
in Physical time at which to query boundary conditions
dt in Time step size (for querying BC increments in time)
tp in Physical time for each mesh node
dtp in Time step size for each mesh node
coord in Mesh node coordinates
lid in Local node IDs associated to local node IDs
bnode in Map storing global mesh node IDs mapped to side set ids
increment in If true, evaluate the solution increment between t and t+dt for Dirichlet BCs. If false, evlauate the solution instead.
Returns Vector of pairs of bool and boundary condition value associated to local 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 (or the value of) 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 multiple systems of PDEs integrated at the node lists associated to side set IDs, given by bnode. 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 bnode. 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>>>& dirbc)

Verify that the change in the solution at those nodes where Dirichlet boundary conditions are set is exactly the amount the BCs prescribe.

Parameters
in Limited antidiffusive element contributions (from FCT)
dul in Low order solution increment
dirbc in Vector of boundary conditions (true/false + BC value) for all scalar components integrated associated of all systems to local node ID
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 anti-diffusive 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 no-op. We could initialize the factory in InciterDriver's constructor and let this function re-create 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 re-create (when unpacking) the factory, which eliminates the need for pre-creating 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 no-op. We could initialize the factory in InciterDriver's constructor and let this function re-create 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 re-create (when unpacking) the factory, which eliminates the need for pre-creating 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::initializeBox(std::size_t system, tk::real VRatio, tk::real t, const inciter::ctr::box& b, tk::real bgpreic, tk::real cv, std::vector<tk::real>& s)

Set the solution in the user-defined IC box.

Parameters
system in Equation system index
VRatio in Ratio of exact box volume to discrete box volume
in Physical time
in IC box configuration to use
bgpreic in Background pressure user input
cv in Specific heats ratio user input
in/out Solution vector that is set to box ICs

This function sets the fluid density and total specific energy within a box initial condition, configured by the user. If the user is specified a box where mass is specified, we also assume here that internal energy content (energy per unit volume) is also specified. Specific internal energy (energy per unit mass) is then computed here (and added to the kinetic energy) from the internal energy per unit volume by multiplying it with the total box volume and dividing it by the total mass of the material in the box. Example (SI) units of the quantities involved:

  • internal energy content (energy per unit volume): J/m^3
  • specific energy (internal energy per unit mass): J/kg

std::vector<std::string> inciter::CompFlowFieldNames()

Return field names to be output to file.

Returns Vector of strings labelling fields output in file

std::vector<std::vector<tk::real>> inciter::CompFlowFieldOutput(ncomp_t system, ncomp_t offset, std::size_t nunk, std::size_t rdof, const tk::Fields& U)

Return field output going to file.

Parameters
system in Equation system index, i.e., which compressible flow equation system we operate on among the systems of PDEs
offset in System offset specifying the position of the system of PDEs among other systems
nunk in Number of unknowns to extract
rdof in Number of reconstructed degrees of freedom. This is used as the number of scalar components to shift when extracting scalar components.
in Solution vector at recent time step
Returns Vector of vectors to be output to file

std::vector<std::string> inciter::CompFlowSurfNames()

Return surface field names to be output to file.

Returns Vector of strings labelling surface fields output in file

std::vector<std::vector<tk::real>> inciter::CompFlowSurfOutput(ncomp_t system, const std::map<int, std::vector<std::size_t>>& bnd, const tk::Fields& U)

Return surface field output going to file.

Parameters
system in Equation system index, i.e., which compressible flow equation system we operate on among the systems of PDEs
bnd in Boundary node/elem lists mapped to side set ids
in Solution vector at recent time step
Returns Vector of vectors of solution along side sets to be output to file

std::vector<std::string> inciter::CompFlowHistNames()

Return time history field names to be output to file.

Returns Vector of strings labelling time history fields output in file

std::vector<std::vector<tk::real>> inciter::CompFlowHistOutput(ncomp_t system, const std::vector<HistData>& h, const std::vector<std::size_t>& inpoel, const tk::Fields& U)

Return time history field output evaluated at time history points.

Parameters
system in Equation system index, i.e., which compressible flow equation system we operate on among the systems of PDEs
in History point data
inpoel in Mesh element connectivity
in Solution vector at recent time step
Returns Vector of vectors of solution variables evaluated in all history points. Inner vector: variables, outer vector: points.

CompFlowRiemannFactory inciter::compflowRiemannSolvers()

Register available Riemann solvers into a factory.

Returns Riemann solver factory

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_t>& 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::assignCompFlowGetVars(const std::string& name, tk::GetVarFn& f)

Assign function that computes physics variables from the numerical solution for CompFlow.

Parameters
name in Name of variable whose tk::GetVarFn is to be assigned
in/out Function assigned

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_t>& cnt)

Return information on the multi-material 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::assignMultiMatGetVars(const std::string& name, tk::GetVarFn& f)

Assign function that computes physics variables from the numerical solution for MultiMat.

Parameters
name in Name of variable whose tk::GetVarFn is to be assigned
in/out Function assigned

tk::GetVarFn inciter::assignGetVars(const std::string& name)

Assign all functions that compute output variables from the numerical solution.

Parameters
name in Name of variable whose OutVar::GetVarFn is to be assigned
Returns Function assigned to output variable

template<class Keyword>
void inciter::assign(const std::string& name, const tk::GetVarFn& src, tk::GetVarFn& dst)

Template parameters
Keyword Keyword used to match to variable name whose fn to assign
Parameters
name in Name of variable whose OutVar::GetVarFn is to be assigned
src in Function to assign if there is a match
dst in/out Function to assign to if there is a match

Assign a function to compute an output variable from the numerical solution

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

void inciter::assignTransportGetVars(const std::string& name, tk::GetVarFn& f)

Assign function that computes physics variables from the numerical solution for MultiMat.

Parameters
name in Name of variable whose tk::GetVarFn is to be assigned
in/out Function assigned

tk::StateFn::result_type inciter::invalidBC(ncomp_t, ncomp_t, const std::vector<tk::real>&, tk::real, tk::real, tk::real, tk::real, const std::array<tk::real, 3>&)

State function for invalid/un-configured boundary conditions.

State function for invalid/un-configured boundary conditions

template<class Eq, class Prop>
tk::real inciter::getmatprop(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Prop Tag of property required
Parameters
system in Equation system index
imat in Material-id who's property is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material ratio of specific heats (gamma)

Get a property for a material

template<class Eq>
tk::real inciter::gamma(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material ratio of specific heats (gamma)

Get the ratio of specific heats (gamma) for a material

template<class Eq>
tk::real inciter::cv(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material specific heat at constant volume (cv)

Get the specific heat at constant volume (cv) for a material

template<class Eq>
tk::real inciter::pstiff(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material stiffness parameter (pstiff)

Get the stiffness parameter (pstiff) for a material

template<class Eq>
tk::real inciter::k(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material thermal conductivity (k)

Get the thermal conductivity (k) for a material

template<class Eq>
tk::real inciter::mu(ncomp_t system, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material dynamic viscosity (mu)

Get the dynamic viscosity (mu) for a material

template<class Eq>
tk::real inciter::eos_density(ncomp_t system, tk::real pr, tk::real temp, std::size_t imat = 0)

Calculate density from the material pressure and temperature using the stiffened-gas equation of state.

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
pr in Material pressure
temp in Material temperature
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material density calculated using the stiffened-gas EoS

template<class Eq>
tk::real inciter::eos_pressure(ncomp_t system, tk::real arho, tk::real u, tk::real v, tk::real w, tk::real arhoE, tk::real alpha = 1.0, std::size_t imat = 0)

Calculate pressure from the material density, momentum and total energy using the stiffened-gas equation of state.

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
arho in Material partial density (alpha_k * rho_k)
in X-velocity
in Y-velocity
in Z-velocity
arhoE in Material total energy (alpha_k * rho_k * E_k)
alpha in Material volume fraction. Default is 1.0, so that for the single-material system, this argument can be left unspecified by the calling code
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material partial pressure (alpha_k * p_k) calculated using the stiffened-gas EoS

template<class Eq>
tk::real inciter::eos_soundspeed(ncomp_t system, tk::real arho, tk::real apr, tk::real alpha = 1.0, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
arho in Material partial density (alpha_k * rho_k)
apr in Material partial pressure (alpha_k * p_k)
alpha in Material volume fraction. Default is 1.0, so that for the single-material system, this argument can be left unspecified by the calling code
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material speed of sound using the stiffened-gas EoS

Calculate speed of sound from the material density and material pressure

template<class Eq>
tk::real inciter::eos_totalenergy(ncomp_t system, tk::real rho, tk::real u, tk::real v, tk::real w, tk::real pr, std::size_t imat = 0)

Calculate material specific total energy from the material density, momentum and material pressure.

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
rho in Material density
in X-velocity
in Y-velocity
in Z-velocity
pr in Material pressure
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material specific total energy using the stiffened-gas EoS

template<class Eq>
tk::real inciter::eos_temperature(ncomp_t system, tk::real arho, tk::real u, tk::real v, tk::real w, tk::real arhoE, tk::real alpha = 1.0, std::size_t imat = 0)

Calculate material temperature from the material density, and material specific total energy.

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
arho in Material partial density (alpha_k * rho_k)
in X-velocity
in Y-velocity
in Z-velocity
arhoE in Material total energy (alpha_k * rho_k * E_k)
alpha in Material volume fraction. Default is 1.0, so that for the single-material system, this argument can be left unspecified by the calling code
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Material temperature using the stiffened-gas EoS

template<class Eq>
tk::real inciter::constrain_pressure(ncomp_t system, tk::real apr, tk::real alpha = 1.0, std::size_t imat = 0)

Template parameters
Eq Equation type to operate on, e.g., tag::compflow, tag::multimat
Parameters
system in Equation system index
apr in Material partial pressure (alpha_k * p_k)
alpha in Material volume fraction. Default is 1.0, so that for the single-material system, this argument can be left unspecified by the calling code
imat in Material-id who's EoS is required. Default is 0, so that for the single-material system, this argument can be left unspecified by the calling code
Returns Constrained material partial pressure (alpha_k * p_k)

Constrain material partial pressure (alpha_k * p_k)

template<class eq>
void inciter::infoMesh(std::size_t c, std::vector<std::pair<std::string, std::string>>& nfo)

Template parameters
eq Equation (solver) type
Parameters
in Index of eq (solver) to extract info on
nfo in/out Info object to augment

Extract configuration info on mesh (solver) coupling

void inciter::WENO_P1(const std::vector<int>& esuel, inciter::ncomp_t offset, tk::Fields& U)

Weighted Essentially Non-Oscillatory (WENO) limiter for DGP1.

Parameters
esuel in Elements surrounding elements
offset in Index for equation systems
in/out High-order solution vector which gets limited

This WENO function should be called for transport and compflow

void inciter::Superbee_P1(const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, inciter::ncomp_t offset, const tk::UnsMesh::Coords& coord, tk::Fields& U)

Superbee limiter for DGP1.

Parameters
esuel in Elements surrounding elements
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
offset in Index for equation systems
coord in Array of nodal coordinates
in/out High-order solution vector which gets limited

This Superbee function should be called for transport and compflow

void inciter::SuperbeeMultiMat_P1(const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t system, inciter::ncomp_t offset, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P, std::size_t nmat)

Superbee limiter for multi-material DGP1.

Parameters
esuel in Elements surrounding elements
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
system in Index for equation systems
offset in Offset this PDE system operates from
coord in Array of nodal coordinates
in/out High-order solution vector which gets limited
in/out High-order vector of primitives which gets limited
nmat in Number of materials in this PDE system

This Superbee function should be called for multimat

void inciter::VertexBasedTransport_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t system, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U)

Kuzmin's vertex-based limiter for transport DGP1.

Parameters
esup in Elements surrounding points
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
nelem in Number of elements
system in Index for equation systems
offset in Index for equation systems
geoElem in Element geometry array
coord in Array of nodal coordinates
in/out High-order solution vector which gets limited

This vertex-based limiter function should be called for transport. For details see: Kuzmin, D. (2010). A vertex-based hierarchical slope limiter for p-adaptive discontinuous Galerkin methods. Journal of computational and applied mathematics, 233(12), 3077-3085.

void inciter::VertexBasedCompflow_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U)

Kuzmin's vertex-based limiter for single-material DGP1.

Parameters
esup in Elements surrounding points
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
nelem in Number of elements
offset in Index for equation systems
geoElem in Element geometry array
coord in Array of nodal coordinates
in/out High-order solution vector which gets limited

This vertex-based limiter function should be called for compflow. For details see: Kuzmin, D. (2010). A vertex-based hierarchical slope limiter for p-adaptive discontinuous Galerkin methods. Journal of computational and applied mathematics, 233(12), 3077-3085.

void inciter::VertexBasedCompflow_P2(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t offset, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::vector<std::vector<tk::real>>& uNodalExtrm, tk::Fields& U)

Kuzmin's vertex-based limiter for single-material DGP2.

Parameters
esup in Elements surrounding points
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
nelem in Number of elements
offset in Index for equation systems
geoElem in Element geometry array
coord in Array of nodal coordinates
gid in Local->global node id map
bid in Local chare-boundary node ids (value) associated to global node ids (key)
uNodalExtrm in Chare-boundary nodal extrema for conservative variables
in/out High-order solution vector which gets limited

This vertex-based limiter function should be called for compflow. For details see: Kuzmin, D. (2010). A vertex-based hierarchical slope limiter for p-adaptive discontinuous Galerkin methods. Journal of computational and applied mathematics, 233(12), 3077-3085.

void inciter::VertexBasedMultiMat_P1(const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& ndofel, std::size_t nelem, std::size_t system, std::size_t offset, ] const inciter::FaceData& fd, ] const tk::Fields& geoFace, const tk::Fields& geoElem, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P, std::size_t nmat, std::vector<std::size_t>& shockmarker)

Parameters
esup in Elements surrounding points
inpoel in Element connectivity
ndofel in Vector of local number of degrees of freedom
nelem in Number of elements
system in Index for equation systems
offset in Offset this PDE system operates from
fd
geoFace
geoElem in Element geometry array
coord in Array of nodal coordinates
in/out High-order solution vector which gets limited
in/out High-order vector of primitives which gets limited
nmat in Number of materials in this PDE system
shockmarker in/out Shock detection marker array

This vertex-based limiter function should be called for multimat. For details see: Kuzmin, D. (2010). A vertex-based hierarchical slope limiter for p-adaptive discontinuous Galerkin methods. Journal of computational and applied mathematics, 233(12), 3077-3085.

void inciter::WENOLimiting(const tk::Fields& U, const std::vector<int>& esuel, std::size_t e, inciter::ncomp_t c, std::size_t rdof, inciter::ncomp_t offset, tk::real cweight, std::array<std::vector<tk::real>, 3>& limU)

WENO limiter function calculation for P1 dofs.

Parameters
in High-order solution vector which is to be limited
esuel in Elements surrounding elements
in Id of element whose solution is to be limited
in Index of component which is to be limited
rdof in Maximum number of reconstructed degrees of freedom
offset in Index for equation systems
cweight in Weight of the central stencil
limU in/out Limited gradients of component c

std::vector<tk::real> inciter::SuperbeeLimiting(const tk::Fields& U, const std::vector<int>& esuel, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, std::size_t e, std::size_t ndof, std::size_t rdof, std::size_t dof_el, inciter::ncomp_t offset, inciter::ncomp_t ncomp, tk::real beta_lim)

Superbee limiter function calculation for P1 dofs.

Parameters
in High-order solution vector which is to be limited
esuel in Elements surrounding elements
inpoel in Element connectivity
coord in Array of nodal coordinates
in Id of element whose solution is to be limited
ndof in Maximum number of degrees of freedom
rdof in Maximum number of reconstructed degrees of freedom
dof_el in Local number of degrees of freedom
offset in Index for equation systems
ncomp in Number of scalar components in this PDE system
beta_lim in Parameter which is equal to 2 for Superbee and 1 for minmod limiter
Returns phi Limiter function for solution in element e

void inciter::VertexBasedLimiting(const std::vector<std::vector<tk::real>>& unk, const tk::Fields& U, const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& geoElem, std::size_t e, std::size_t rdof, std::size_t dof_el, std::size_t offset, std::size_t ncomp, std::vector<tk::real>& phi, const std::array<std::size_t, 2>& VarRange)

Kuzmin's vertex-based limiter function calculation for P1 dofs.

Parameters
unk
in High-order solution vector which is to be limited
esup in Elements surrounding points
inpoel in Element connectivity
coord in Array of nodal coordinates
geoElem in Element geometry array
in Id of element whose solution is to be limited
rdof in Maximum number of reconstructed degrees of freedom
dof_el in Local number of degrees of freedom
offset in Index for equation systems
ncomp in Number of scalar components in this PDE system
phi
VarRange
Returns phi Limiter function for solution in element e

std::vector<tk::real> inciter::VertexBasedLimiting_P2(const std::vector<std::vector<tk::real>>& unk, const tk::Fields& U, const std::map<std::size_t, std::vector<std::size_t>>& esup, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& geoElem, std::size_t e, std::size_t rdof, ] std::size_t dof_el, std::size_t offset, std::size_t ncomp, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::vector<std::vector<tk::real>>& NodalExtrm)

Parameters
unk
in High-order solution vector which is to be limited
esup in Elements surrounding points
inpoel in Element connectivity
coord in Array of nodal coordinates
geoElem in Element geometry array
in Id of element whose solution is to be limited
rdof in Maximum number of reconstructed degrees of freedom
dof_el in Local number of degrees of freedom
offset in Index for equation systems
ncomp in Number of scalar components in this PDE system
gid in Local->global node id map
bid in Local chare-boundary node ids (value) associated to global node ids (key)
NodalExtrm in Chare-boundary nodal extrema
Returns phi Limiter function for solution in element e

This function limits the P2 dofs of P2 solution in a hierachical way to P1 dof limiting. Here we treat the first order derivatives the same way as cell average while second order derivatives represent the gradients to be limited in the P1 limiting procedure.

void inciter::consistentMultiMatLimiting_P1(std::size_t nmat, ncomp_t offset, std::size_t rdof, std::size_t e, tk::Fields& U, ] tk::Fields& P, std::vector<tk::real>& phic, ] std::vector<tk::real>& phip)

Parameters
nmat in Number of materials in this PDE system
offset in Index for equation system
rdof in Total number of reconstructed dofs
in Element being checked for consistency
in/out Second-order solution vector which gets modified near material interfaces for consistency
in/out Second-order vector of primitive quantities which gets modified near material interfaces for consistency
phic in/out Vector of limiter functions for the conserved quantities
phip in/out Vector of limiter functions for the primitive quantities

void inciter::BoundPreservingLimiting(std::size_t nmat, ncomp_t offset, std::size_t ndof, std::size_t e, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& U, std::vector<tk::real>& phic)

Bound preserving limiter for the P1 dofs of volume fractions.

Parameters
nmat in Number of materials in this PDE system
offset in Index for equation system
ndof in Total number of reconstructed dofs
in Element being checked for consistency
inpoel in Element connectivity
coord in Array of nodal coordinates
in/out Second-order solution vector which gets modified near material interfaces for consistency
phic in/out Vector of limiter functions for the conserved quantities

This bound-preserving limiter is specifically meant to enforce bounds [0,1], but it does not suppress oscillations like the other 'TVD' limiters. TVD limiters on the other hand, do not preserve such bounds. A combination of oscillation-suppressing and bound-preserving limiters can obtain a non-oscillatory and bounded solution.

bool inciter::interfaceIndicator(std::size_t nmat, const std::vector<tk::real>& al, std::vector<std::size_t>& matInt)

Interface indicator function, which checks element for material interface.

Parameters
nmat in Number of materials in this PDE system
al in Cell-averaged volume fractions
matInt in Array indicating which material has an interface
Returns Boolean which indicates if the element contains a material interface

void inciter::MarkShockCells(const std::size_t nelem, const std::size_t nmat, const std::size_t system, const std::size_t offset, const std::size_t ndof, const std::size_t rdof, const std::vector<std::size_t>& ndofel, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const inciter::FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const tk::Fields& U, const tk::Fields& P, std::vector<std::size_t>& shockmarker)

Parameters
nelem in Number of elements
nmat in Number of materials in this PDE system
system in Equation system index
offset in Offset this PDE system operates from
ndof in Maximum number of degrees of freedom
rdof in Maximum number of reconstructed degrees of freedom
ndofel in Vector of local number of degrees of freedome
inpoel in Element-node connectivity
coord in Array of nodal coordinates
fd in Face connectivity and boundary conditions object
geoFace in Face geometry array
geoElem in Element geometry array
in Solution vector at recent time step
in Vector of primitives at recent time step
shockmarker in/out Vector of the shock indicator

This function computes the discontinuity indicator based on interface conditon. It is based on the following paper: Hong L., Gianni A., Robert N. (2021) A moving discontinuous Galerkin finite element method with interface condition enforcement for compressible flows. Journal of Computational Physics, doi: https://doi.org/10.1016/j.jcp.2021.110618

void inciter::initializeBox(std::size_t system, tk::real VRatio, tk::real, const inciter::ctr::box& b, std::vector<tk::real>& s)

Set the solution in the user-defined IC box.

Parameters
system in Equation system index
VRatio in Ratio of exact box volume to discrete box volume
in IC box configuration to use
in/out Solution vector that is set to box ICs

This function sets the fluid density and total specific energy within a box initial condition, configured by the user. If the user is specified a box where mass is specified, we also assume here that internal energy content (energy per unit volume) is also specified. Specific internal energy (energy per unit mass) is then computed here (and added to the kinetic energy) from the internal energy per unit volume by multiplying it with the total box volume and dividing it by the total mass of the material in the box. Example (SI) units of the quantities involved:

  • internal energy content (energy per unit volume): J/m^3
  • specific energy (internal energy per unit mass): J/kg

std::vector<std::string> inciter::MultiMatFieldNames(std::size_t nmat)

Return multi-material field names to be output to file.

Parameters
nmat in Number of materials in system
Returns Vector of strings labelling fields output in file

std::vector<std::vector<tk::real>> inciter::MultiMatFieldOutput(ncomp_t, std::size_t nmat, ncomp_t offset, std::size_t nunk, std::size_t rdof, const std::vector<tk::real>&, const std::array<std::vector<tk::real>, 3>&, const tk::Fields& U, const tk::Fields& P)

Return field output going to file.

Parameters
nmat in Number of materials in systen
offset in System offset specifying the position of the system of PDEs among other systems
nunk in Number of unknowns to extract
rdof in Number of reconstructed degrees of freedom
in Solution vector at recent time step
in Vector of primitive quantities at recent time step
Returns Vector of vectors to be output to file

std::vector<std::string> inciter::MultiMatHistNames()

Return time history field names to be output to file.

Returns Vector of strings labelling time history fields output in file

MultiMatRiemannFactory inciter::multimatRiemannSolvers()

Register available Riemann solvers into a factory.

Returns Riemann solver factory

void inciter::spectral_decay(std::size_t nmat, std::size_t nunk, const std::vector<int>& esuel, const tk::Fields& unk, std::size_t ndof, std::size_t ndofmax, tk::real tolref, std::vector<std::size_t>& ndofel)

Evaluate the spectral-decay indicator and mark the ndof for each element.

Parameters
nmat in Number of materials in this PDE system
nunk in Number of unknowns
esuel in Elements surrounding elements
unk in Array of unknowns
ndof in Number of degrees of freedom in the solution
ndofmax in Max number of degrees of freedom for p-refinement
tolref in Tolerance for p-refinement
ndofel in/out Vector of local number of degrees of freedome

Evaluate the spectral-decay indicator and mark the ndof for each element The spectral decay indicator, implemented in this functiopn, calculates the difference between the projections of the numerical solutions on finite element space of order p and p-1.

void inciter::non_conformity(std::size_t nunk, std::size_t Nbfac, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const std::vector<int>& esuel, const std::vector<int>& esuf, const std::vector<std::size_t>& inpofa, const tk::Fields& unk, std::size_t ndof, std::size_t ndofmax, std::vector<std::size_t>& ndofel)

Evaluate the non-conformity indicator and mark the ndof for each element.

Parameters
nunk in Number of unknowns
Nbfac in Number of internal faces
inpoel in Element-node connectivity
coord in Array of nodal coordinates
esuel in Elements surrounding elements
esuf in Elements surrounding faces
inpofa in Face-node connectivity
unk in Array of unknowns
ndof in Number of degrees of freedom in the solution
ndofmax in Max number of degrees of freedom for p-refinement
ndofel in/out Vector of local number of degrees of freedome

Evaluate the non-conformity indicator and mark the ndof for each element The non-conformity indicator, this function implements, evaluates the jump in the numerical solutions as a measure of the numerical error.

tk::real inciter::evalDiscIndicator_CompFlow(std::size_t e, ncomp_t ncomp, const std::size_t ndof, const std::size_t ndofel, const tk::Fields& unk)

Evaluate the spectral decay indicator for single-material flow.

Parameters
in Index for the tetrahedron element
ncomp in Number of scalar components in this PDE system
ndof in Number of degrees of freedom in the solution
ndofel in Local number of degrees of freedom
unk in Array of unknowns
Returns The value of spectral indicator for the element

Evaluate the spectral decay indicator

tk::real inciter::evalDiscIndicator_MultiMat(std::size_t e, std::size_t nmat, ncomp_t ncomp, const std::size_t ndof, const std::size_t ndofel, const tk::Fields& unk)

Evaluate the spectral decay indicator for multi-material flow.

Parameters
in Index for the tetrahedron element
nmat in Number of materials in this PDE system
ncomp in Number of scalar components in this PDE system
ndof in Number of degrees of freedom in the solution
ndofel in Local number of degrees of freedom
unk in Array of unknowns
Returns The value of spectral indicator for the element

Evaluate the spectral decay indicator

std::size_t inciter::volfracIdx(std::size_t, std::size_t kmat)

Parameters
kmat in Index of required material
Returns Index of the required material volume fraction

Get the index of the required material volume fraction

std::size_t inciter::densityIdx(std::size_t nmat, std::size_t kmat)

Parameters
nmat in Number of materials
kmat in Index of required material
Returns Index of the required material continuity equation

Get the index of the required material continuity equation

std::size_t inciter::momentumIdx(std::size_t nmat, std::size_t idir)

Parameters
nmat in Number of materials
idir in Required component direction; 0: X-component, 1: Y-component, 2: Z-component.
Returns Index of the required momentum equation component

Get the index of the required momentum equation component

std::size_t inciter::energyIdx(std::size_t nmat, std::size_t kmat)

Parameters
nmat in Number of materials
kmat in Index of required material
Returns Index of the required material total energy equation

Get the index of the required material total energy equation

std::size_t inciter::velocityIdx(std::size_t nmat, std::size_t idir)

Parameters
nmat in Number of materials
idir in Required component direction; 0: X-component, 1: Y-component, 2: Z-component.
Returns Index of the required velocity component from vector of primitives

Get the index of the required velocity component from vector of primitives

std::size_t inciter::pressureIdx(std::size_t, std::size_t kmat)

Parameters
kmat in Index of required material
Returns Index of the required material pressure from vector of primitives

Get the index of the required material pressure from vector of primitives

std::size_t inciter::volfracDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of material volume fraction from the DG solution vector.

Parameters
nmat in Number of materials
kmat in Index of required material
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required material volume fraction

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

std::size_t inciter::densityDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of material continuity equation from the DG solution vector.

Parameters
nmat in Number of materials
kmat in Index of required material
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required material continuity equation

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

std::size_t inciter::momentumDofIdx(std::size_t nmat, std::size_t idir, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of momentum equation component from the DG solution vector.

Parameters
nmat in Number of materials
idir in Required component direction; 0: X-component, 1: Y-component, 2: Z-component.
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required momentum equation component

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

std::size_t inciter::energyDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of material total energy equation from the DG solution vector.

Parameters
nmat in Number of materials
kmat in Index of required material
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required material total energy equation

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

std::size_t inciter::velocityDofIdx(std::size_t nmat, std::size_t idir, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of velocity component from the DG vector of primitives.

Parameters
nmat in Number of materials
idir in Required component direction; 0: X-component, 1: Y-component, 2: Z-component.
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required velocity component from vector of primitives

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

std::size_t inciter::pressureDofIdx(std::size_t nmat, std::size_t kmat, std::size_t ndof, std::size_t idof)

Get the index of the required DOF of material pressure from the DG vector of primitives.

Parameters
nmat in Number of materials
kmat in Index of required material
ndof in Number of solution DOFs stored in DG solution vector
idof in Index of required solution DOF from DG solution vector
Returns Index of the required material pressure from vector of primitives

This function is used to get the index of the required DOF in the solution vector, which is of type tk::Fields.

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

Global-scope 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 read-only. See also http://charm.cs.illinois.edu/manuals/html/charm++/manual.html. The data below is global-scope because they must be available to all PEs which could be on different machines. Defaults of input deck, facilitates detection what is set by user

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.