inciter namespace
Inciter declarations and definitions.
Contents
Namespaces
Classes
- class CmdLineParser
- Command-line parser for Inciter.
- class LuaParser
- Control file lua-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 Discretization
- Discretization Charm++ chare array holding common functinoality to all discretization schemes.
- class ElemDiagnostics
- ElemDiagnostics class used to compute diagnostics while integrating PDEs.
- class FaceData
- FaceData class holding face-connectivity data useful for DG discretization.
- class FV
- FV Charm++ chare array used to advance PDEs in time with FV.
- class Ghosts
- Ghosts Charm++ chare array used to determine ghost data structures.
- class NodeDiagnostics
- NodeDiagnostics class used to compute diagnostics while integrating PDEs.
- class OversetFE
- OversetFE Charm++ chare array used to advance PDEs in time with OversetFE+RK.
- 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 CompFlowProblemShockDensityWave
- class CompFlowProblemSodShocktube
- class CompFlowProblemTaylorGreen
- class CompFlowProblemUserDefined
- CompFlow system of PDEs problem: user defined.
- class CompFlowProblemVorticalFlow
- struct ConfigBC
- class DGPDE
- Partial differential equation base for discontinuous Galerkin PDEs.
- class EOS
- Base class for generic forwarding interface to eos types.
- class FVPDE
- Partial differential equation base for discontinuous Galerkin PDEs.
- class MultiMatProblemEquilInterfaceAdvect
- MultiMat system of PDEs problem: equilibrium interface advection.
- class MultiMatProblemInterfaceAdvection
- class MultiMatProblemRichtmyerMeshkov
- MultiMat system of PDEs problem: equilibrium interface advection.
- class MultiMatProblemShockDensityWave
- class MultiMatProblemShockHeBubble
- class MultiMatProblemSinewavePacket
- MultiMat system of PDEs problem: sinewave packet advection.
- class MultiMatProblemSodShocktube
- class MultiMatProblemUnderwaterEx
- class MultiMatProblemUserDefined
- MultiMat system of PDEs problem: user defined.
- class MultiMatProblemWaterAirShocktube
- class MultiSpeciesProblemUserDefined
- MultiSpecies system of PDEs problem: user defined.
-
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
-
template<template<class, class> class Eq>struct registerFV
- class PDEStack
- Partial differential equations stack.
- struct AUSM
- AUSM+up approximate Riemann solver.
- struct AUSMCompFlow
- AUSM+up approximate Riemann solver.
- struct AUSMMultiSpecies
- AUSMMultiSpecies+up approximate Riemann solver.
- struct HLL
- HLL approximate Riemann solver.
- struct HLLC
- HLLC approximate Riemann solver.
- struct HLLCMultiMat
- HLLC approximate Riemann solver for solids.
- struct HLLCSolids
- HLLC approximate Riemann solver for solids.
- struct LaxFriedrichs
- Lax-Friedrichs approximate Riemann solver.
- struct LaxFriedrichsSolids
- Lax-Friedrichs approximate Riemann solver for solids.
- struct LDFSS
- LDFSS approximate Riemann solver.
- struct Rusanov
- Rusanov approximate Riemann solver.
- 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.
- enum class EqType: uint8_t { compflow, multimat, multispecies }
- Equation types.
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, CompFlowProblemShockDensityWave>
- List of all CompFlow Problem policies (defined in the includes above)
- using MultiMatProblems = brigand::list<MultiMatProblemUserDefined, MultiMatProblemSodShocktube, MultiMatProblemInterfaceAdvection, MultiMatProblemWaterAirShocktube, MultiMatProblemShockHeBubble, MultiMatProblemUnderwaterEx, MultiMatProblemShockDensityWave, MultiMatProblemEquilInterfaceAdvect, MultiMatProblemRichtmyerMeshkov, MultiMatProblemSinewavePacket>
- List of all MultiMat Problem policies (defined in the includes above)
- using MultiSpeciesProblems = brigand::list<MultiSpeciesProblemUserDefined>
- List of all MultiSpecies Problem policies (defined in the includes above)
-
using CGFactory = std::map<ctr::
PDEKey, std::function<CGPDE()>> - Factory for PDEs using continuous Galerkin discretization storing keys associated to their constructors.
-
using DGFactory = std::map<ctr::
PDEKey, std::function<DGPDE()>> - Factory for PDEs using discontinuous Galerkin discretization storing keys associated to their constructors.
-
using FVFactory = std::map<ctr::
PDEKey, std::function<FVPDE()>> - Factory for PDEs using finite volume 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,
std::size_t ncomp,
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 std::map<std::string, tk:: GetVarFn>& outvarfn, const tk::Fields& P) -> std::vector<std::vector<tk:: real>> - Collect field output from numerical solution based on user input.
-
void evalSolution(const Discretization& D,
const std::vector<std::size_t>& inpoel,
const tk::
UnsMesh:: Coords& coord, const std::unordered_map<std::size_t, std::size_t>& addedTets, const std::vector<std::size_t>& ndofel, const tk::Fields& U, const tk::Fields& P, tk::Fields& uElemfields, tk::Fields& pElemfields, tk::Fields& uNodefields, tk::Fields& pNodefields) - Evaluate solution on incoming (a potentially refined) mesh.
-
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(std::size_t meshid,
] tk::
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 match(std::size_t meshid,
tk::
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 operator|(PUP::er& p, std::vector<FVPDE>& eqs)
- Pack/Unpack selected partial differential equations using finite volume discretization.
-
template<class B>void initializeBox(const std::vector<EOS>& mat_blk, tk::
real VRatio, tk:: real V_ex, tk:: real t, const B& b, tk:: real bgpreic, tk:: real cv, std::vector<tk:: real>& s) - Set the solution in the user-defined IC box.
-
auto CompFlowOutVarFn() -> std::map<std::string, tk::
GetVarFn> - Return a map that associates user-specified strings to functions.
- auto CompFlowSurfNames() -> std::vector<std::string>
- Return surface field names to be output to file.
-
auto CompFlowSurfOutput(const std::vector<EOS>& mat_blk,
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 CompFlowElemSurfOutput(const std::vector<EOS>& mat_blk,
const std::map<int, std::vector<std::size_t>>& bface,
const std::vector<std::size_t>& triinpoel,
const tk::Fields& U) -> std::vector<std::vector<tk::
real>> - Return element surface field output (on triangle faces) going to file.
- auto CompFlowHistNames() -> std::vector<std::string>
- Return time history field names to be output to file.
-
auto CompFlowHistOutput(const std::vector<EOS>& mat_blk,
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.
-
static auto compflowRiemannSolver(ctr::
FluxType flux) -> const tk:: RiemannFluxFn -
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:: ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>> - Return information on the compressible flow PDE.
-
void registerMultiMat(DGFactory& df,
FVFactory& ff,
std::set<ctr::
PDEType>& fvt, std::set<ctr:: PDEType>& dgt) - Register compressible flow PDEs into PDE factory.
-
auto infoMultiMat(std::map<ctr::
PDEType, tk:: ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>> - Return information on the multi-material compressible flow PDE.
-
void registerMultiSpecies(DGFactory& df,
FVFactory&,
std::set<ctr::
PDEType>&, std::set<ctr:: PDEType>& dgt) - Register compressible flow PDEs into PDE factory.
-
auto infoMultiSpecies(std::map<ctr::
PDEType, tk:: ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>> - Return information on the multi-species 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:: ncomp_t>& cnt) -> std::vector<std::pair<std::string, std::string>> - Return information on the transport PDE.
-
auto invalidBC(ncomp_
t, const std::vector<EOS>&, 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 Prop>auto getmatprop(std::size_t imat = 0) -> tk::
real -
template<class Prop>auto getspecprop(std::size_t ispec = 0) -> tk::
real - void WENO_P1(const std::vector<int>& esuel, 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,
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,
const tk::
UnsMesh:: Coords& coord, const std::vector<std::size_t>& solidx, 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,
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,
const std::vector<inciter::
EOS>& mat_blk, const inciter:: FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const tk:: UnsMesh:: Coords& coord, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, tk::Fields& U, std::vector<std::size_t>& shockmarker) - 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,
const std::vector<inciter::
EOS>& mat_blk, const inciter:: FaceData& fd, const tk::Fields& geoFace, 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, ] const std::vector<std::vector<tk:: real>>& mtInv, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, tk::Fields& U, 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,
const std::vector<inciter::
EOS>& mat_blk, const inciter:: FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const tk:: UnsMesh:: Coords& coord, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, 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.
-
void VertexBasedMultiMat_P2(const bool pref,
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,
const std::vector<inciter::
EOS>& mat_blk, const inciter:: FaceData& fd, const tk::Fields& geoFace, 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, ] const std::vector<std::vector<tk:: real>>& pNodalExtrm, ] const std::vector<std::vector<tk:: real>>& mtInv, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, tk::Fields& U, tk::Fields& P, std::size_t nmat, std::vector<std::size_t>& shockmarker) -
void VertexBasedMultiMat_FV(const std::map<std::size_t, std::vector<std::size_t>>& esup,
const std::vector<std::size_t>& inpoel,
std::size_t nelem,
const tk::
UnsMesh:: Coords& coord, const std::vector<int>& srcFlag, const std::vector<std::size_t>& solidx, tk::Fields& U, tk::Fields& P, std::size_t nmat) - Kuzmin's vertex-based limiter for multi-material FV.
-
void VertexBasedMultiSpecies_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,
const std::vector<inciter::
EOS>&, const inciter:: FaceData&, const tk::Fields&, const tk::Fields&, const tk:: UnsMesh:: Coords& coord, const tk:: FluxFn&, tk::Fields& U, std::size_t nspec, std::vector<std::size_t>& shockmarker) - Kuzmin's vertex-based limiter for multi-species DGP1.
-
void WENOLimiting(const tk::Fields& U,
const std::vector<int>& esuel,
std::size_t e,
inciter::
ncomp_t c, std::size_t rdof, 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 ncomp, tk:: real beta_lim) -> std::vector<tk:: real> - Superbee limiter function calculation for P1 dofs.
-
void VertexBasedLimiting(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, std::size_t e, std::size_t rdof, std::size_t dof_el, std::size_t ncomp, std::vector<tk:: real>& phi, const std::vector<std::size_t>& VarList) - Kuzmin's vertex-based limiter function calculation for P1 dofs.
-
void 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, std::size_t e, std::size_t rdof, ] std::size_t dof_el, 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, const std::vector<std::size_t>& VarList, std::vector<tk:: real>& phi) -
void consistentMultiMatLimiting_P1(std::size_t nmat,
std::size_t rdof,
std::size_t e,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
] tk::Fields& P,
std::vector<tk::
real>& phic_p1, std::vector<tk:: real>& phic_p2) -
void BoundPreservingLimiting(std::size_t nmat,
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_p1, std::vector<tk:: real>& phic_p2) - Bound preserving limiter for the volume fractions.
-
auto BoundPreservingLimitingFunction(const tk::
real min, const tk:: real max, const tk:: real al_gp, const tk:: real al_avg) -> tk:: real - Bound preserving limiter function for the volume fractions.
-
void PositivityLimitingMultiMat(std::size_t nmat,
const std::vector<inciter::
EOS>& mat_blk, std::size_t rdof, std::size_t ndof_el, const std::vector<std::size_t>& ndofel, std::size_t e, const std::vector<std::size_t>& inpoel, const tk:: UnsMesh:: Coords& coord, const std::vector<int>& esuel, const tk::Fields& U, const tk::Fields& P, std::vector<tk:: real>& phic_p1, std::vector<tk:: real>& phic_p2, std::vector<tk:: real>& phip_p1, std::vector<tk:: real>& phip_p2) - Positivity preserving limiter for multi-material solver.
-
void PositivityPreservingMultiMat_FV(const std::vector<std::size_t>& inpoel,
std::size_t nelem,
std::size_t nmat,
const std::vector<inciter::
EOS>& mat_blk, const tk:: UnsMesh:: Coords& coord, const tk::Fields&, tk::Fields& U, tk::Fields& P) - Positivity preserving limiter for the FV multi-material solver.
-
auto PositivityLimiting(const tk::
real min, const tk:: real u_gp, const tk:: real u_avg) -> tk:: real - Positivity preserving limiter function.
-
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 bool pref,
const std::size_t nelem,
const std::size_t nmat,
const std::size_t ndof,
const std::size_t rdof,
const std::vector<inciter::
EOS>& mat_blk, 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:: FluxFn& flux, const std::vector<std::size_t>& solidx, const tk::Fields& U, const tk::Fields& P, std::vector<std::size_t>& shockmarker) -
void correctLimConservMultiMat(std::size_t nelem,
const std::vector<EOS>& mat_blk,
std::size_t nmat,
const std::vector<std::size_t>& inpoel,
const tk::
UnsMesh:: Coords& coord, const tk::Fields& geoElem, const tk::Fields& prim, tk::Fields& unk) - Update the conservative quantities after limiting for multi-material systems.
-
auto constrain_pressure(const std::vector<EOS>& mat_blk,
tk::
real apr, tk:: real arho, tk:: real alpha = 1.0, std::size_t imat = 0) -> tk:: real - Constrain material partial pressure (alpha_k * p_k)
-
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,
const std::vector<EOS>& mat_blk,
const inciter::
FaceData& fd, const tk::Fields& geoFace, 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, const std::vector<std::vector<tk:: real>>& mtInv, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, tk::Fields& U, std::vector<std::size_t>& shockmarker) - Kuzmin's vertex-based limiter for single-material DGP2.
-
void VertexBasedMultiMat_P2(const bool pref,
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,
const std::vector<EOS>& mat_blk,
const inciter::
FaceData& fd, const tk::Fields& geoFace, 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, const std::vector<std::vector<tk:: real>>& pNodalExtrm, const std::vector<std::vector<tk:: real>>& mtInv, const tk:: FluxFn& flux, const std::vector<std::size_t>& solidx, tk::Fields& U, tk::Fields& P, std::size_t nmat, std::vector<std::size_t>& shockmarker) - Kuzmin's vertex-based limiter for multi-material DGP2.
-
void 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, std::size_t e, std::size_t rdof, std::size_t dof_el, 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, const std::vector<std::size_t>& VarList, std::vector<tk:: real>& phi) - Kuzmin's vertex-based limiter function calculation for P2 dofs.
-
void consistentMultiMatLimiting_P1(const std::size_t nmat,
const std::size_t rdof,
const std::size_t e,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
tk::Fields& P,
std::vector<tk::
real>& phic_p1, std::vector<tk:: real>& phic_p2) - Consistent limiter modifications for P1 dofs.
-
void MarkShockCells(const bool pref,
const std::size_t nelem,
const std::size_t nmat,
const std::size_t ndof,
const std::size_t rdof,
const std::vector<EOS>& mat_blk,
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:: FluxFn& flux, const std::vector<std::size_t>& solidx, const tk::Fields& U, const tk::Fields& P, std::vector<std::size_t>& shockmarker) - Mark the cells that contain discontinuity according to the interface.
-
static auto symmetry(ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>& fn) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at symmetry boundaries.
-
static auto farfield(ncomp_
t ncomp, const std::vector<EOS>& mat_blk, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>& fn) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at farfield boundaries.
-
static auto extrapolate(ncomp_
t, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at extrapolation boundaries.
-
static auto noslipwall(ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>& fn) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at no-slip wall boundaries.
-
static auto noOpGrad(ncomp_
t, const std::vector<EOS>&, const std::vector<tk:: real>& dul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary gradient function copying the left gradient to the right gradient at a face.
-
static auto symmetryGrad(ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& dul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary gradient function for the symmetry boundary condition.
- void initializeMaterialEoS(std::vector<EOS>& mat_blk)
-
auto cleanTraceMultiMat(tk::
real t, std::size_t nelem, const std::vector<EOS>& mat_blk, const tk::Fields& geoElem, std::size_t nmat, tk::Fields& U, tk::Fields& P) -> bool - Clean up the state of trace materials for multi-material PDE system.
-
auto timeStepSizeMultiMat(const std::vector<EOS>& mat_blk,
const std::vector<int>& esuf,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const std::size_t nelem,
std::size_t nmat,
const tk::Fields& U,
const tk::Fields& P) -> tk::
real - Time step restriction for multi material cell-centered schemes.
-
auto timeStepSizeMultiMatFV(const std::vector<EOS>& mat_blk,
const tk::Fields& geoElem,
std::size_t nelem,
std::size_t nmat,
const tk::Fields& U,
const tk::Fields& P,
std::vector<tk::
real>& local_dte) -> tk:: real - Time step restriction for multi material cell-centered FV scheme.
-
auto timeStepSizeViscousFV(const tk::Fields& geoElem,
std::size_t nelem,
std::size_t nmat,
const tk::Fields& U) -> tk::
real - Compute the time step size restriction based on viscosity.
- void resetSolidTensors(std::size_t nmat, std::size_t k, std::size_t e, tk::Fields& U, tk::Fields& P)
- Reset the solid tensors.
-
auto getDeformGrad(std::size_t nmat,
std::size_t k,
const std::vector<tk::
real>& state) -> std::array<std::array<tk:: real, 3>, 3> - Get the inverse deformation gradient tensor for a material at given location.
-
auto getCauchyStress(std::size_t nmat,
std::size_t k,
std::size_t ncomp,
const std::vector<tk::
real>& state) -> std::array<std::array<tk:: real, 3>, 3> - Get the elastic Cauchy stress tensor for a material at given location.
- auto haveSolid(std::size_t nmat, const std::vector<std::size_t>& solidx) -> bool
- Check whether we have solid materials in our problem.
- auto numSolids(std::size_t nmat, const std::vector<std::size_t>& solidx) -> std::size_t
- Count total number of solid materials in the problem.
-
template<class B>void initializeBox(const std::vector<EOS>& mat_blk, tk::
real V_ex, tk:: real t, const B& b, tk:: real bgpreic, tk:: real bgtempic, std::vector<tk:: real>& s) -
auto MultiMatOutVarFn() -> std::map<std::string, tk::
GetVarFn> - Return a map that associates user-specified strings to functions.
- 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, const std::vector<EOS>& mat_blk, 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 MultiMatSurfNames() -> std::vector<std::string>
- Return surface field names to be output to file.
-
auto MultiMatSurfOutput(const std::size_t nmat,
const std::size_t rdof,
const FaceData& fd,
const tk::Fields& U,
const tk::Fields& P) -> std::vector<std::vector<tk::
real>> - Return element surface field output (on triangle faces) going to file.
- auto MultiMatHistNames() -> std::vector<std::string>
- Return time history field names to be output to file.
- auto MultiMatDiagNames(std::size_t nmat) -> std::vector<std::string>
- Return diagnostic var names to be output to file.
-
static auto multimatRiemannSolver(ctr::
FluxType flux) -> const tk:: RiemannFluxFn -
static auto symmetry(] ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>& fn) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at symmetry boundaries.
-
static auto farfield(] ncomp_
t ncomp, const std::vector<EOS>& mat_blk, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>& fn) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at farfield boundaries.
-
static auto extrapolate(ncomp_
t, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at extrapolation boundaries.
-
static auto noslipwall(] ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& ul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary state function providing the left and right state of a face at no-slip wall boundaries.
-
static auto noOpGrad(ncomp_
t, const std::vector<EOS>&, const std::vector<tk:: real>& dul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary gradient function copying the left gradient to the right gradient at a face.
-
static auto symmetryGrad(ncomp_
t ncomp, const std::vector<EOS>&, const std::vector<tk:: real>& dul, tk:: real, tk:: real, tk:: real, tk:: real, const std::array<tk:: real, 3>&) -> tk::StateFn::result_type - Boundary gradient function for the symmetry boundary condition.
- void initializeSpeciesEoS(std::vector<EOS>& mat_blk)
-
auto timeStepSizeMultiSpecies(const std::vector<EOS>& mat_blk,
const std::vector<int>& esuf,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const std::size_t nelem,
std::size_t nspec,
const tk::Fields& U,
const tk::Fields&) -> tk::
real - Time step restriction for multi material cell-centered schemes.
-
template<class B>void initializeBox(const std::vector<EOS>& mat_blk, tk::
real, tk:: real, const B& b, std::vector<tk:: real>& s) -
auto MultiSpeciesOutVarFn() -> std::map<std::string, tk::
GetVarFn> - Return a map that associates user-specified strings to functions.
- auto MultiSpeciesFieldNames(std::size_t nspec) -> std::vector<std::string>
- Return multi-species field names to be output to file.
- auto MultiSpeciesSurfNames() -> std::vector<std::string>
- Return surface field names to be output to file.
-
auto MultiSpeciesSurfOutput(const std::size_t nspec,
const std::size_t rdof,
const FaceData& fd,
const tk::Fields& U,
const tk::Fields&) -> std::vector<std::vector<tk::
real>> - Return element surface field output (on triangle faces) going to file.
- auto MultiSpeciesHistNames() -> std::vector<std::string>
- Return time history field names to be output to file.
- auto MultiSpeciesDiagNames(std::size_t nspec) -> std::vector<std::string>
- Return diagnostic var names to be output to file.
-
static auto multispeciesRiemannSolver(ctr::
FluxType flux) -> const tk:: RiemannFluxFn -
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.
-
static auto splitmach_ausm(tk::
real fa, tk:: real mach) -> std::array<tk:: real, 4>
Variables
- ctr::InputDeck g_inputdeck
- 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.
- static const tk::
real rk_gamma - Implicit-Explicit Runge-Kutta Coefficients.
- const std::size_t NUMDIAG
- Number of entries in diagnostics vector (of vectors)
- ctr::InputDeck g_inputdeck_defaults
- std::vector<FVPDE> g_fvpde
- static const std::array<tk::
real, 3> rkcoef - Runge-Kutta coefficients.
- 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
- const std::array<std::array<std::size_t, 3>, 3> stressCmp
- Index for Cauchy stress components, since only the 6 independent components are stored.
- 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 deformIdx(std::size_t nmat, std::size_t ksld, std::size_t i, std::size_t j) -> 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 stressIdx(std::size_t nmat, std::size_t ksld, std::size_t i) -> 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 deformDofIdx(std::size_t nmat, std::size_t ksld, std::size_t i, std::size_t j, std::size_t ndof, std::size_t idof) -> std::size_t
- Get the index of the required DOF of material deformation gradient 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.
- auto stressDofIdx(std::size_t nmat, std::size_t ksld, std::size_t i, std::size_t ndof, std::size_t idof) -> std::size_t
- Get the index of the required DOF of material stress component from the DG vector of primitives.
- auto newSolidsAccFn(std::size_t kmat, std::size_t i, std::size_t j, std::size_t l) -> std::size_t
- Get the index of the quantity vel[l]*g[i][j] computed inside the Riemann flux solver.
- auto solidTensorIdx(std::size_t ksld, std::size_t i, std::size_t j) -> std::size_t
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 |
Function documentation
std::pair<int, std::unique_ptr<char[]>> inciter:: serialize(std::size_t meshid,
std::size_t ncomp,
const std::vector<std::vector<tk:: real>>& d)
Serialize std::vector to raw memory stream.
Parameters | |
---|---|
meshid in | Mesh ID |
ncomp in | Number of scalar components being solved |
d 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 | |
---|---|
c 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 std::map<std::string, tk:: GetVarFn>& outvarfn,
const tk::Fields& P)
Collect field output from numerical solution based on user input.
Parameters | |
---|---|
U in | Solution data to extract from |
c in | Extract variables only with this centering |
outvarfn in | Map of outvar functions |
P in | Optional primitive variable solution data to extract from |
Returns | Output fields requested by user |
void inciter:: evalSolution(const Discretization& D,
const std::vector<std::size_t>& inpoel,
const tk:: UnsMesh:: Coords& coord,
const std::unordered_map<std::size_t, std::size_t>& addedTets,
const std::vector<std::size_t>& ndofel,
const tk::Fields& U,
const tk::Fields& P,
tk::Fields& uElemfields,
tk::Fields& pElemfields,
tk::Fields& uNodefields,
tk::Fields& pNodefields)
Evaluate solution on incoming (a potentially refined) mesh.
Parameters | |
---|---|
D in | Discretization base class to read from |
inpoel in | Incoming (potentially refined field-output) mesh connectivity |
coord in | Incoming (potentially refined Field-output) mesh node coordinates |
addedTets in | Field-output mesh cells and their parents (local ids) |
ndofel in | Vector of local number of degrees of freedom |
U in | Solution vector |
P in | Vector of primitives |
uElemfields in/out | Solution elem output fields |
pElemfields in/out | Primitive elem output fields |
uNodefields in/out | Solution nodal output fields |
pNodefields in/out | Primitive nodal output fields |
This function evaluates the solution on the incoming mesh, and stores it in uElemfields, pElemfields, uNodefields, and pNodefields appropriately. The incoming mesh can be refined but can also be just the mesh the numerical solution is computed on.
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 |
c in | Extract variables only with this centering |
f 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 |
c in | Extract variables only with this centering |
x in | x coordinates at which to evaluate the analytic solution |
y in | y coordinates at which to evaluate the analytic solution |
z in | z coordinates at which to evaluate the analytic solution |
t in | Physical time at which to evaluate the analytic solution |
f 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(std::size_t meshid,
] tk:: 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 | |
---|---|
meshid | |
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) |
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.
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:: operator|(PUP::er& p,
std::vector<FVPDE>& eqs)
Pack/Unpack selected partial differential equations using finite volume 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).
template<class B>
void inciter:: initializeBox(const std::vector<EOS>& mat_blk,
tk:: real VRatio,
tk:: real V_ex,
tk:: real t,
const B& b,
tk:: real bgpreic,
tk:: real cv,
std::vector<tk:: real>& s)
Set the solution in the user-defined IC box.
Template parameters | |
---|---|
B | IC-block type to operate, ctr::box, or ctr::meshblock |
Parameters | |
mat_blk | |
VRatio in | Ratio of exact box volume to discrete box volume |
V_ex in | Exact box volume |
t in | Physical time |
b in | IC box configuration to use |
bgpreic in | Background pressure user input |
cv in | Specific heats ratio user input |
s 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::map<std::string, tk:: GetVarFn> inciter:: CompFlowOutVarFn()
Return a map that associates user-specified strings to functions.
Returns | Map that associates user-specified strings to functions that compute relevant quantities 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(const std::vector<EOS>& mat_blk,
const std::map<int, std::vector<std::size_t>>& bnd,
const tk::Fields& U)
Return surface field output going to file.
Parameters | |
---|---|
mat_blk | |
bnd in | Boundary node/elem lists mapped to side set ids |
U in | Solution vector at recent time step |
Returns | Vector of vectors of solution along side sets to be output to file |
std::vector<std::vector<tk:: real>> inciter:: CompFlowElemSurfOutput(const std::vector<EOS>& mat_blk,
const std::map<int, std::vector<std::size_t>>& bface,
const std::vector<std::size_t>& triinpoel,
const tk::Fields& U)
Return element surface field output (on triangle faces) going to file.
Parameters | |
---|---|
mat_blk in | Material EOS block |
bface in | Boundary-faces mapped to side set ids |
triinpoel in | Boundary triangle face connecitivity with local ids |
U in | Solution vector at recent time step |
Returns | Vector of vectors of solution on side set faces 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(const std::vector<EOS>& mat_blk,
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 | |
---|---|
mat_blk | |
h in | History point data |
inpoel in | Mesh element connectivity |
U 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. |
static const tk:: RiemannFluxFn inciter:: compflowRiemannSolver(ctr:: FluxType flux)
Parameters | |
---|---|
flux in | Riemann solver from input deck |
Returns | Function pointer to the Riemann solver, must be of type tk:: |
Get the Riemann solver function according to control file setup
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:: 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:: registerMultiMat(DGFactory& df,
FVFactory& ff,
std::set<ctr:: PDEType>& fvt,
std::set<ctr:: PDEType>& dgt)
Register compressible flow PDEs into PDE factory.
Parameters | |
---|---|
df in/out | Discontinuous Galerkin PDE factory to register to |
ff in/out | Finite volume PDE factory to register to |
fvt in/out | Counters for equation types registered into FV factory |
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:: 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:: registerMultiSpecies(DGFactory& df,
FVFactory&,
std::set<ctr:: PDEType>&,
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:: infoMultiSpecies(std::map<ctr:: PDEType, tk:: ncomp_t>& cnt)
Return information on the multi-species 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:: 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 |
tk::StateFn::result_type inciter:: invalidBC(ncomp_ t,
const std::vector<EOS>&,
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 Prop>
tk:: real inciter:: getmatprop(std::size_t imat = 0)
Template parameters | |
---|---|
Prop | Tag of property required |
Parameters | |
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 property Prop |
Get a property for a material
template<class Prop>
tk:: real inciter:: getspecprop(std::size_t ispec = 0)
Template parameters | |
---|---|
Prop | Tag of property required |
Parameters | |
ispec in | Species-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 | Species property Prop |
Get a property for a species
void inciter:: WENO_P1(const std::vector<int>& esuel,
tk::Fields& U)
Weighted Essentially Non-Oscillatory (WENO) limiter for DGP1.
Parameters | |
---|---|
esuel in | Elements surrounding elements |
U 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,
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 |
coord in | Array of nodal coordinates |
U 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,
const tk:: UnsMesh:: Coords& coord,
const std::vector<std::size_t>& solidx,
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 |
coord in | Array of nodal coordinates |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
P 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,
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 |
coord in | Array of nodal coordinates |
U 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,
const std::vector<inciter:: EOS>& mat_blk,
const inciter:: FaceData& fd,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const tk:: UnsMesh:: Coords& coord,
const tk:: FluxFn& flux,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
std::vector<std::size_t>& shockmarker)
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 |
mat_blk in | EOS material block |
fd in | Face connectivity and boundary conditions object |
geoFace in | Face geometry array |
geoElem | |
coord in | Array of nodal coordinates |
flux in | Riemann flux function to use |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
shockmarker in/out | Shock detection marker array |
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,
const std::vector<inciter:: EOS>& mat_blk,
const inciter:: FaceData& fd,
const tk::Fields& geoFace,
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,
] const std::vector<std::vector<tk:: real>>& mtInv,
const tk:: FluxFn& flux,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
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 |
mat_blk in | EOS material block |
fd in | Face connectivity and boundary conditions object |
geoFace in | Face geometry array |
geoElem | |
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 |
mtInv in | Inverse of Taylor mass matrix |
flux in | Riemann flux function to use |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
shockmarker in/out | Shock detection marker array |
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,
const std::vector<inciter:: EOS>& mat_blk,
const inciter:: FaceData& fd,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const tk:: UnsMesh:: Coords& coord,
const tk:: FluxFn& flux,
const std::vector<std::size_t>& solidx,
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.
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 |
mat_blk in | EOS material block |
fd in | Face connectivity and boundary conditions object |
geoFace in | Face geometry array |
geoElem | |
coord in | Array of nodal coordinates |
flux in | Riemann flux function to use |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
P 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:: VertexBasedMultiMat_P2(const bool pref,
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,
const std::vector<inciter:: EOS>& mat_blk,
const inciter:: FaceData& fd,
const tk::Fields& geoFace,
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,
] const std::vector<std::vector<tk:: real>>& pNodalExtrm,
] const std::vector<std::vector<tk:: real>>& mtInv,
const tk:: FluxFn& flux,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
tk::Fields& P,
std::size_t nmat,
std::vector<std::size_t>& shockmarker)
Parameters | |
---|---|
pref in | Indicator for p-adaptive algorithm |
esup in | Elements surrounding points |
inpoel in | Element connectivity |
ndofel in | Vector of local number of degrees of freedom |
nelem in | Number of elements |
mat_blk in | EOS material block |
fd in | Face connectivity and boundary conditions object |
geoFace in | Face geometry array |
geoElem | |
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 |
pNodalExtrm in | Chare-boundary nodal extrema for primitive variables |
mtInv in | Inverse of Taylor mass matrix |
flux in | Riemann flux function to use |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
P 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:: VertexBasedMultiMat_FV(const std::map<std::size_t, std::vector<std::size_t>>& esup,
const std::vector<std::size_t>& inpoel,
std::size_t nelem,
const tk:: UnsMesh:: Coords& coord,
const std::vector<int>& srcFlag,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
tk::Fields& P,
std::size_t nmat)
Kuzmin's vertex-based limiter for multi-material FV.
Parameters | |
---|---|
esup in | Elements surrounding points |
inpoel in | Element connectivity |
nelem in | Number of elements |
coord in | Array of nodal coordinates |
srcFlag in | Whether the energy source was added |
solidx in | Solid material index indicator |
U in/out | High-order solution vector which gets limited |
P in/out | High-order vector of primitives which gets limited |
nmat in | Number of materials in this PDE system |
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:: VertexBasedMultiSpecies_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,
const std::vector<inciter:: EOS>&,
const inciter:: FaceData&,
const tk::Fields&,
const tk::Fields&,
const tk:: UnsMesh:: Coords& coord,
const tk:: FluxFn&,
tk::Fields& U,
std::size_t nspec,
std::vector<std::size_t>& shockmarker)
Kuzmin's vertex-based limiter for multi-species 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 |
coord in | Array of nodal coordinates |
U in/out | High-order solution vector which gets limited |
nspec in | Number of species in this PDE system |
shockmarker in/out | Shock detection marker array |
This vertex-based limiter function should be called for multispecies. 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,
tk:: real cweight,
std::array<std::vector<tk:: real>, 3>& limU)
WENO limiter function calculation for P1 dofs.
Parameters | |
---|---|
U in | High-order solution vector which is to be limited |
esuel in | Elements surrounding elements |
e in | Id of element whose solution is to be limited |
c in | Index of component which is to be limited |
rdof in | Maximum number of reconstructed degrees of freedom |
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 ncomp,
tk:: real beta_lim)
Superbee limiter function calculation for P1 dofs.
Parameters | |
---|---|
U 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 |
e 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 |
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 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,
std::size_t e,
std::size_t rdof,
std::size_t dof_el,
std::size_t ncomp,
std::vector<tk:: real>& phi,
const std::vector<std::size_t>& VarList)
Kuzmin's vertex-based limiter function calculation for P1 dofs.
Parameters | |
---|---|
U 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 |
e 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 |
ncomp in | Number of scalar components in this PDE system |
phi in/out | Limiter function for solution in element e |
VarList in | List of variable indices to be limited |
void 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,
std::size_t e,
std::size_t rdof,
] std::size_t dof_el,
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,
const std::vector<std::size_t>& VarList,
std::vector<tk:: real>& phi)
Parameters | |
---|---|
unk | |
U in | High-order solution vector which is to be limited |
esup in | Elements surrounding points |
inpoel in | Element connectivity |
e 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 |
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 |
VarList in | List of variable indices that need to be limited |
phi out | 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,
std::size_t rdof,
std::size_t e,
const std::vector<std::size_t>& solidx,
tk::Fields& U,
] tk::Fields& P,
std::vector<tk:: real>& phic_p1,
std::vector<tk:: real>& phic_p2)
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
rdof in | Total number of reconstructed dofs |
e in | Element being checked for consistency |
solidx in | Solid material index indicator |
U in | Vector of conservative variables |
P in | Vector of primitive variables |
phic_p1 in/out | Vector of limiter functions for P1 dofs of the conserved quantities |
phic_p2 |
void inciter:: BoundPreservingLimiting(std::size_t nmat,
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_p1,
std::vector<tk:: real>& phic_p2)
Bound preserving limiter for the volume fractions.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
ndof in | Total number of reconstructed dofs |
e in | Element being checked for consistency |
inpoel in | Element connectivity |
coord in | Array of nodal coordinates |
U in/out | Second-order solution vector which gets modified near material interfaces for consistency |
phic_p1 in/out | Vector of limiter functions for P1 dofs of the conserved quantities |
phic_p2 in/out | Vector of limiter functions for P2 dofs of 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.
tk:: real inciter:: BoundPreservingLimitingFunction(const tk:: real min,
const tk:: real max,
const tk:: real al_gp,
const tk:: real al_avg)
Bound preserving limiter function for the volume fractions.
Parameters | |
---|---|
min in | Minimum bound for volume fraction |
max in | Maximum bound for volume fraction |
al_gp in | Volume fraction at the quadrature point |
al_avg in | Cell-average volume fraction |
Returns | The limiting coefficient from the bound-preserving limiter function |
void inciter:: PositivityLimitingMultiMat(std::size_t nmat,
const std::vector<inciter:: EOS>& mat_blk,
std::size_t rdof,
std::size_t ndof_el,
const std::vector<std::size_t>& ndofel,
std::size_t e,
const std::vector<std::size_t>& inpoel,
const tk:: UnsMesh:: Coords& coord,
const std::vector<int>& esuel,
const tk::Fields& U,
const tk::Fields& P,
std::vector<tk:: real>& phic_p1,
std::vector<tk:: real>& phic_p2,
std::vector<tk:: real>& phip_p1,
std::vector<tk:: real>& phip_p2)
Positivity preserving limiter for multi-material solver.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
mat_blk in | EOS material block |
rdof in | Total number of reconstructed dofs |
ndof_el in | Number of dofs for element e |
ndofel in | Vector of local number of degrees of freedome |
e in | Element being checked for consistency |
inpoel in | Element connectivity |
coord in | Array of nodal coordinates |
esuel in | Elements surrounding elements |
U in | Vector of conservative variables |
P in | Vector of primitive variables |
phic_p1 in/out | Vector of limiter functions for P1 dofs of the conserved quantities |
phic_p2 in/out | Vector of limiter functions for P2 dofs of the conserved quantities |
phip_p1 in/out | Vector of limiter functions for P1 dofs of the primitive quantities |
phip_p2 in/out | Vector of limiter functions for P2 dofs of the primitive quantities |
void inciter:: PositivityPreservingMultiMat_FV(const std::vector<std::size_t>& inpoel,
std::size_t nelem,
std::size_t nmat,
const std::vector<inciter:: EOS>& mat_blk,
const tk:: UnsMesh:: Coords& coord,
const tk::Fields&,
tk::Fields& U,
tk::Fields& P)
Positivity preserving limiter for the FV multi-material solver.
Parameters | |
---|---|
inpoel in | Element connectivity |
nelem in | Number of elements |
nmat in | Number of materials in this PDE system |
mat_blk in | Material EOS block |
coord in | Array of nodal coordinates ! |
U in/out | High-order solution vector which gets limited |
P in/out | High-order vector of primitives which gets limited |
This positivity preserving limiter function should be called for FV multimat.
tk:: real inciter:: PositivityLimiting(const tk:: real min,
const tk:: real u_gp,
const tk:: real u_avg)
Positivity preserving limiter function.
Parameters | |
---|---|
min in | Minimum bound for volume fraction |
u_gp in | Variable quantity at the quadrature point |
u_avg in | Cell-average variable quantitiy |
Returns | The limiting coefficient from the positivity-preserving limiter function |
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 bool pref,
const std::size_t nelem,
const std::size_t nmat,
const std::size_t ndof,
const std::size_t rdof,
const std::vector<inciter:: EOS>& mat_blk,
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:: FluxFn& flux,
const std::vector<std::size_t>& solidx,
const tk::Fields& U,
const tk::Fields& P,
std::vector<std::size_t>& shockmarker)
Parameters | |
---|---|
pref in | Indicator for p-adaptive algorithm |
nelem in | Number of elements |
nmat in | Number of materials in this PDE system |
ndof in | Maximum number of degrees of freedom |
rdof in | Maximum number of reconstructed degrees of freedom |
mat_blk in | EOS material block |
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 |
flux in | Flux function to use |
solidx in | Solid material index indicator |
U in | Solution vector at recent time step |
P 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:/
void inciter:: correctLimConservMultiMat(std::size_t nelem,
const std::vector<EOS>& mat_blk,
std::size_t nmat,
const std::vector<std::size_t>& inpoel,
const tk:: UnsMesh:: Coords& coord,
const tk::Fields& geoElem,
const tk::Fields& prim,
tk::Fields& unk)
Update the conservative quantities after limiting for multi-material systems.
Parameters | |
---|---|
nelem in | Number of internal elements |
mat_blk in | EOS material block |
nmat in | Number of materials in this PDE system |
inpoel in | Element-node connectivity |
coord in | Array of nodal coordinates |
geoElem in | Element geometry array |
prim in | Array of primitive variables |
unk in/out | Array of conservative variables |
This function computes the updated dofs for conservative quantities based on the limited primitive quantities, to re-instate consistency between the limited primitive and evolved quantities. For further details, see Pandare et al. (2023). On the Design of Stable, Consistent, and Conservative High-Order Methods for Multi-Material Hydrodynamics. J Comp Phys, 112313.
tk:: real inciter:: constrain_pressure(const std::vector<EOS>& mat_blk,
tk:: real apr,
tk:: real arho,
tk:: real alpha = 1.0,
std::size_t imat = 0)
Constrain material partial pressure (alpha_k * p_k)
Parameters | |
---|---|
mat_blk | |
apr in | Material partial pressure (alpha_k * p_k) |
arho in | Material partial density (alpha_k * rho_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) |
static tk::StateFn::result_type inciter:: symmetry(ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>& fn)
Boundary state function providing the left and right state of a face at symmetry boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
ul in | Left (domain-internal) state |
fn in | Unit face normal |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: farfield(ncomp_ t ncomp,
const std::vector<EOS>& mat_blk,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>& fn)
Boundary state function providing the left and right state of a face at farfield boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
mat_blk | |
ul in | Left (domain-internal) state |
fn in | Unit face normal |
Returns | Left and right states for all scalar components in this PDE system |
The farfield boudary calculation, implemented here, is based on the characteristic theory of hyperbolic systems.
static tk::StateFn::result_type inciter:: extrapolate(ncomp_ t,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary state function providing the left and right state of a face at extrapolation boundaries.
Parameters | |
---|---|
ul in | Left (domain-internal) state |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: noslipwall(ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>& fn)
Boundary state function providing the left and right state of a face at no-slip wall boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
ul in | Left (domain-internal) state |
fn in | Unit face normal |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: noOpGrad(ncomp_ t,
const std::vector<EOS>&,
const std::vector<tk:: real>& dul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary gradient function copying the left gradient to the right gradient at a face.
Parameters | |
---|---|
dul in | Left (domain-internal) state |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: symmetryGrad(ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& dul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary gradient function for the symmetry boundary condition.
Parameters | |
---|---|
ncomp in | Number of variables whos gradients are needed |
dul in | Left (domain-internal) gradients |
Returns | Left and right states for all scalar components in this PDE system |
void inciter:: initializeMaterialEoS(std::vector<EOS>& mat_blk)
Parameters | |
---|---|
mat_blk in/out | Material block that gets initialized |
bool inciter:: cleanTraceMultiMat(tk:: real t,
std::size_t nelem,
const std::vector<EOS>& mat_blk,
const tk::Fields& geoElem,
std::size_t nmat,
tk::Fields& U,
tk::Fields& P)
Clean up the state of trace materials for multi-material PDE system.
Parameters | |
---|---|
t in | Physical time |
nelem in | Number of elements |
mat_blk in | EOS material block |
geoElem in | Element geometry array |
nmat in | Number of materials in this PDE system |
U | |
P | |
Returns | Boolean indicating if an unphysical material state was found |
tk:: real inciter:: timeStepSizeMultiMat(const std::vector<EOS>& mat_blk,
const std::vector<int>& esuf,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const std::size_t nelem,
std::size_t nmat,
const tk::Fields& U,
const tk::Fields& P)
Time step restriction for multi material cell-centered schemes.
Parameters | |
---|---|
mat_blk in | EOS material block |
esuf in | Elements surrounding elements array |
geoFace in | Face geometry array |
geoElem in | Element geometry array |
nelem in | Number of elements |
nmat in | Number of materials in this PDE system |
U in | High-order solution vector |
P in | High-order vector of primitives |
Returns | Maximum allowable time step based on cfl criterion |
tk:: real inciter:: timeStepSizeMultiMatFV(const std::vector<EOS>& mat_blk,
const tk::Fields& geoElem,
std::size_t nelem,
std::size_t nmat,
const tk::Fields& U,
const tk::Fields& P,
std::vector<tk:: real>& local_dte)
Time step restriction for multi material cell-centered FV scheme.
Parameters | |
---|---|
mat_blk in | Material EOS block |
geoElem in | Element geometry array |
nelem in | Number of elements |
nmat in | Number of materials in this PDE system |
U in | High-order solution vector |
P in | High-order vector of primitives |
local_dte in/out | Time step size for each element (for local time stepping) |
Returns | Maximum allowable time step based on cfl criterion |
tk:: real inciter:: timeStepSizeViscousFV(const tk::Fields& geoElem,
std::size_t nelem,
std::size_t nmat,
const tk::Fields& U)
Compute the time step size restriction based on viscosity.
Parameters | |
---|---|
geoElem in | Element geometry array |
nelem in | Number of elements |
nmat in | Number of materials |
U in | Solution vector |
Returns | Maximum allowable time step based on viscosity |
void inciter:: resetSolidTensors(std::size_t nmat,
std::size_t k,
std::size_t e,
tk::Fields& U,
tk::Fields& P)
Reset the solid tensors.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
k in | Material id whose deformation gradient is required |
e in | Id of element whose solution is to be limited |
U | |
P |
std::array<std::array<tk:: real, 3>, 3> inciter:: getDeformGrad(std::size_t nmat,
std::size_t k,
const std::vector<tk:: real>& state)
Get the inverse deformation gradient tensor for a material at given location.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
k in | Material id whose deformation gradient is required |
state in | State vector at location |
Returns | Inverse deformation gradient tensor (g_k) of material k |
std::array<std::array<tk:: real, 3>, 3> inciter:: getCauchyStress(std::size_t nmat,
std::size_t k,
std::size_t ncomp,
const std::vector<tk:: real>& state)
Get the elastic Cauchy stress tensor for a material at given location.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
k in | Material id whose deformation gradient is required |
ncomp in | Number of components in the PDE system |
state in | State vector at location |
Returns | Elastic Cauchy stress tensor (alpha * \sigma_ij) of material k |
bool inciter:: haveSolid(std::size_t nmat,
const std::vector<std::size_t>& solidx)
Check whether we have solid materials in our problem.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
solidx in | Material index indicator |
Returns | true if we have at least one solid, false otherwise. |
std::size_t inciter:: numSolids(std::size_t nmat,
const std::vector<std::size_t>& solidx)
Count total number of solid materials in the problem.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
solidx in | Material index indicator |
Returns | Total number of solid materials in the problem |
template<class B>
void inciter:: initializeBox(const std::vector<EOS>& mat_blk,
tk:: real V_ex,
tk:: real t,
const B& b,
tk:: real bgpreic,
tk:: real bgtempic,
std::vector<tk:: real>& s)
Template parameters | |
---|---|
B | IC-block type to operate, ctr::box, or ctr::meshblock |
Parameters | |
mat_blk | |
V_ex in | Exact box volume |
t in | Physical time |
b in | IC box configuration to use |
bgpreic in | Background pressure user input |
bgtempic in | Background temperature user input |
s 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::map<std::string, tk:: GetVarFn> inciter:: MultiMatOutVarFn()
Return a map that associates user-specified strings to functions.
Returns | Map that associates user-specified strings to functions that compute relevant quantities to be output to file |
---|
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,
const std::vector<EOS>& mat_blk,
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 |
mat_blk | |
nunk in | Number of unknowns to extract |
rdof in | Number of reconstructed degrees of freedom |
U in | Solution vector at recent time step |
P in | Vector of primitive quantities at recent time step |
Returns | Vector of vectors to be output to file |
std::vector<std::string> inciter:: MultiMatSurfNames()
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:: MultiMatSurfOutput(const std::size_t nmat,
const std::size_t rdof,
const FaceData& fd,
const tk::Fields& U,
const tk::Fields& P)
Return element surface field output (on triangle faces) going to file.
Parameters | |
---|---|
nmat in | Number of materials in this PDE system |
rdof in | Maximum number of reconstructed degrees of freedom |
fd in | Face connectivity and boundary conditions object |
U in | Solution vector at recent time step |
P in | Vector of primitives at recent time step |
Returns | Vector of vectors of solution on side set faces 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 |
---|
std::vector<std::string> inciter:: MultiMatDiagNames(std::size_t nmat)
Return diagnostic var names to be output to file.
Parameters | |
---|---|
nmat in | Number of materials in systen |
Returns | Vector of strings labelling diagnostic fields output in file |
static const tk:: RiemannFluxFn inciter:: multimatRiemannSolver(ctr:: FluxType flux)
Parameters | |
---|---|
flux in | Riemann solver from input deck |
Returns | Function pointer to the Riemann solver, must be of type tk:: |
Get the Riemann solver function according to control file setup
static tk::StateFn::result_type inciter:: symmetry(] ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>& fn)
Boundary state function providing the left and right state of a face at symmetry boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
ul in | Left (domain-internal) state |
fn in | Unit face normal |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: farfield(] ncomp_ t ncomp,
const std::vector<EOS>& mat_blk,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>& fn)
Boundary state function providing the left and right state of a face at farfield boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
mat_blk | |
ul in | Left (domain-internal) state |
fn in | Unit face normal |
Returns | Left and right states for all scalar components in this PDE system |
The farfield boudary calculation, implemented here, is based on the characteristic theory of hyperbolic systems.
static tk::StateFn::result_type inciter:: extrapolate(ncomp_ t,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary state function providing the left and right state of a face at extrapolation boundaries.
Parameters | |
---|---|
ul in | Left (domain-internal) state |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: noslipwall(] ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& ul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary state function providing the left and right state of a face at no-slip wall boundaries.
Parameters | |
---|---|
ncomp in | Number of scalar components in this PDE system |
ul in | Left (domain-internal) state |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: noOpGrad(ncomp_ t,
const std::vector<EOS>&,
const std::vector<tk:: real>& dul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary gradient function copying the left gradient to the right gradient at a face.
Parameters | |
---|---|
dul in | Left (domain-internal) state |
Returns | Left and right states for all scalar components in this PDE system |
static tk::StateFn::result_type inciter:: symmetryGrad(ncomp_ t ncomp,
const std::vector<EOS>&,
const std::vector<tk:: real>& dul,
tk:: real,
tk:: real,
tk:: real,
tk:: real,
const std::array<tk:: real, 3>&)
Boundary gradient function for the symmetry boundary condition.
Parameters | |
---|---|
ncomp in | Number of variables whos gradients are needed |
dul in | Left (domain-internal) gradients |
Returns | Left and right states for all scalar components in this PDE system |
void inciter:: initializeSpeciesEoS(std::vector<EOS>& mat_blk)
Parameters | |
---|---|
mat_blk in/out | Material block that gets initialized |
tk:: real inciter:: timeStepSizeMultiSpecies(const std::vector<EOS>& mat_blk,
const std::vector<int>& esuf,
const tk::Fields& geoFace,
const tk::Fields& geoElem,
const std::size_t nelem,
std::size_t nspec,
const tk::Fields& U,
const tk::Fields&)
Time step restriction for multi material cell-centered schemes.
Parameters | |
---|---|
mat_blk in | EOS species block |
esuf in | Elements surrounding elements array |
geoFace in | Face geometry array |
geoElem in | Element geometry array |
nelem in | Number of elements |
nspec in | Number of speciess in this PDE system |
U in | High-order solution vector |
Returns | Maximum allowable time step based on cfl criterion |
template<class B>
void inciter:: initializeBox(const std::vector<EOS>& mat_blk,
tk:: real,
tk:: real,
const B& b,
std::vector<tk:: real>& s)
Template parameters | |
---|---|
B | IC-block type to operate, ctr::box, or ctr::meshblock |
Parameters | |
mat_blk | |
b in | IC box configuration to use |
s 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::map<std::string, tk:: GetVarFn> inciter:: MultiSpeciesOutVarFn()
Return a map that associates user-specified strings to functions.
Returns | Map that associates user-specified strings to functions that compute relevant quantities to be output to file |
---|
std::vector<std::string> inciter:: MultiSpeciesFieldNames(std::size_t nspec)
Return multi-species field names to be output to file.
Parameters | |
---|---|
nspec in | Number of species in system |
Returns | Vector of strings labelling fields output in file |
std::vector<std::string> inciter:: MultiSpeciesSurfNames()
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:: MultiSpeciesSurfOutput(const std::size_t nspec,
const std::size_t rdof,
const FaceData& fd,
const tk::Fields& U,
const tk::Fields&)
Return element surface field output (on triangle faces) going to file.
Parameters | |
---|---|
nspec in | Number of species in this PDE system |
rdof in | Maximum number of reconstructed degrees of freedom |
fd in | Face connectivity and boundary conditions object |
U in | Solution vector at recent time step |
Returns | Vector of vectors of solution on side set faces to be output to file |
std::vector<std::string> inciter:: MultiSpeciesHistNames()
Return time history field names to be output to file.
Returns | Vector of strings labelling time history fields output in file |
---|
std::vector<std::string> inciter:: MultiSpeciesDiagNames(std::size_t nspec)
Return diagnostic var names to be output to file.
Parameters | |
---|---|
nspec in | Number of species in systen |
Returns | Vector of strings labelling diagnostic fields output in file |
static const tk:: RiemannFluxFn inciter:: multispeciesRiemannSolver(ctr:: FluxType flux)
Parameters | |
---|---|
flux in | Riemann solver from input deck |
Returns | Function pointer to the Riemann solver, must be of type tk:: |
Get the Riemann solver function according to control file setup
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 | |
---|---|
e 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 \detail The spectral indicator evaluates the density differences between the numerical solutions at different polynomial space |
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 | |
---|---|
e 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 \detail The spectral indicator evaluates the bulk density differences between the numerical solutions at different polynomial space |
Evaluate the spectral decay indicator
static std::array<tk:: real, 4> inciter:: splitmach_ausm(tk:: real fa,
tk:: real mach)
Parameters | |
---|---|
fa in | All-speed parameter |
mach in | Local Mach numner |
Returns | Values of the positive and negative split Mach and pressure polynomials. |
Split Mach polynomials for AUSM+ flux This function returns a vector with positive and negative Mach and pressure polynomials, as: ms[0] = M_4(+), ms[1] = M_4(-), ms[2] = P_5(+), and ms[3] = P_5(-). For more details, ref. Liou, M. S. (2006). A sequel to AUSM, Part II: AUSM+-up for all speeds. J. Comp. Phys., 214(1), 137-170.
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:: deformIdx(std::size_t nmat,
std::size_t ksld,
std::size_t i,
std::size_t j)
Parameters | |
---|---|
nmat in | Number of materials |
ksld in | Index of required solid |
i in | Row-index of required tensor component |
j in | Column-index of required tensor component |
Returns | Index of the required material deformation gradient equation |
Get the index of the required material deformation gradient 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:: stressIdx(std::size_t nmat,
std::size_t ksld,
std::size_t i)
Parameters | |
---|---|
nmat in | Number of materials |
ksld in | Index of required solid |
i in | Index of required stress component |
Returns | Index of the required material Cauchy stress component from vector of primitives |
Get the index of the required material stress component from 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:: deformDofIdx(std::size_t nmat,
std::size_t ksld,
std::size_t i,
std::size_t j,
std::size_t ndof,
std::size_t idof)
Get the index of the required DOF of material deformation gradient equation from the DG solution vector.
Parameters | |
---|---|
nmat in | Number of materials |
ksld in | Index of required solid |
i in | Row-index of required tensor component |
j in | Column-index of required tensor 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 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.
std::size_t inciter:: stressDofIdx(std::size_t nmat,
std::size_t ksld,
std::size_t i,
std::size_t ndof,
std::size_t idof)
Get the index of the required DOF of material stress component from the DG vector of primitives.
Parameters | |
---|---|
nmat in | Number of materials |
ksld in | Index of required solid |
i in | Index of required stress 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 material Cauchy stress component from vector of primitives |
This function is used to get the index of the required DOF in the primitives vector, which is of type tk::Fields.
std::size_t inciter:: newSolidsAccFn(std::size_t kmat,
std::size_t i,
std::size_t j,
std::size_t l)
Get the index of the quantity vel[l]*g[i][j] computed inside the Riemann flux solver.
Parameters | |
---|---|
kmat in | Index of required material |
i in | Row of inverse deformation tensor |
j in | Column of inverse deformation tensor |
l in | Velocity component |
Returns | Index of the quantity vel[l]*g[i][j] computed inside the Riemann flux solver. |
This function is used to get the index of the quantity vel[l]*g[i][j] computed inside the Riemann flux solver.
std::size_t inciter:: solidTensorIdx(std::size_t ksld,
std::size_t i,
std::size_t j)
Parameters | |
---|---|
ksld in | Index of required solid |
i in | Row-index of required tensor component |
j in | Column-index of required tensor component |
Returns | Index of the required material deformation gradient equation in the context of a list where only the g's of solid materials are present. |
Get the index of the required material deformation gradient equation in the context of a list where only the g's of solid materials are present. If one needs to access the deformation tensor within the state array one should use deformIdx instead!
Variable documentation
ctr::InputDeck inciter:: g_inputdeck
Lua Input deck filled by LuaParser, 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.
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.
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:/
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<FVPDE> inciter:: g_fvpde
Partial differential equations using finite volume 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.