template<class Physics, class Problem>
inciter::dg::MultiMat class

MultiMat used polymorphically with tk::DGPDE.

The template arguments specify policies and are used to configure the behavior of the class. The policies are:

  • Physics - physics configuration, see PDE/MultiMat/Physics.h
  • Problem - problem configuration, see PDE/MultiMat/Problem.h

Constructors, destructors, conversion operators

MultiMat(ncomp_t c) explicit

Public functions

auto nprim() const -> std::size_t
void initialize(const tk::Fields& L, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, tk::Fields& unk, tk::real t, const std::size_t nielem) const
void lhs(const tk::Fields& geoElem, tk::Fields& l) const
void updatePrimitives(const tk::Fields& unk, tk::Fields& prim, std::size_t nielem) const
void reconstruct(tk::real t, const tk::Fields& geoFace, const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P) const
void limit(] tk::real t, ] const tk::Fields& geoFace, ] const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const std::vector<std::size_t>& ndofel, tk::Fields& U, tk::Fields& P) const
void rhs(tk::real t, const tk::Fields& geoFace, const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& U, const tk::Fields& P, const std::vector<std::size_t>& ndofel, tk::Fields& R) const
auto dt(const std::array<std::vector<tk::real>, 3>& coord, const std::vector<std::size_t>& inpoel, const inciter::FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const std::vector<std::size_t>&, const tk::Fields& U) const -> tk::real
auto velocity(const tk::Fields& U, const std::array<std::vector<tk::real>, 3>&, const std::array<std::size_t, 4>& N) const -> std::array<std::array<tk::real, 4>, 3>
void side(std::unordered_set<int>& conf) const
Query all side set IDs the user has configured for all components in this PDE system.
auto fieldNames() const -> std::vector<std::string>
auto fieldOutput(tk::real t, const tk::Fields& geoElem, tk::Fields& U) const -> std::vector<std::vector<tk::real>>
auto avgElemToNode(const std::vector<std::size_t>&, const tk::UnsMesh::Coords&, const tk::Fields&, const tk::Fields&) const -> std::vector<std::vector<tk::real>>
Return nodal field output going to file.
auto names() const -> std::vector<std::string>
auto analyticSolution(tk::real xi, tk::real yi, tk::real zi, tk::real t) const -> std::vector<tk::real>

Function documentation

template<class Physics, class Problem>
inciter::dg::MultiMat<Physics, Problem>::MultiMat(ncomp_t c) explicit

Parameters
in Equation system index (among multiple systems configured)

Constructor

template<class Physics, class Problem>
std::size_t inciter::dg::MultiMat<Physics, Problem>::nprim() const

Returns The number of primitive quantities required to be stored for this PDE system

Find the number of primitive quantities required for this PDE system

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::initialize(const tk::Fields& L, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, tk::Fields& unk, tk::real t, const std::size_t nielem) const

Parameters
in Block diagonal mass matrix
inpoel in Element-node connectivity
coord in Array of nodal coordinates
unk in/out Array of unknowns
in Physical time
nielem in Number of internal elements

Initalize the compressible flow equations, prepare for time integration

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::lhs(const tk::Fields& geoElem, tk::Fields& l) const

Parameters
geoElem in Element geometry array
in/out Block diagonal mass matrix

Compute the left hand side block-diagonal mass matrix

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::updatePrimitives(const tk::Fields& unk, tk::Fields& prim, std::size_t nielem) const

Parameters
unk in Array of unknowns
prim in/out Array of primitives
nielem in Number of internal elements

Update the primitives for this PDE system This function computes and stores the dofs for primitive quantities, which are required for obtaining reconstructed states used in the Riemann solver. See /PDE/Integrate/Riemann/AUSM.hpp, where the normal velocity for advection is calculated from independently reconstructed velocities.

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::reconstruct(tk::real t, const tk::Fields& geoFace, const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, tk::Fields& U, tk::Fields& P) const

Parameters
in Physical time
geoFace in Face geometry array
geoElem in Element geometry array
fd in Face connectivity and boundary conditions object
inpoel in Element-node connectivity
coord in Array of nodal coordinates
in/out Solution vector at recent time step
in/out Vector of primitives at recent time step

Reconstruct second-order solution from first-order

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::limit(] tk::real t, ] const tk::Fields& geoFace, ] const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const std::vector<std::size_t>& ndofel, tk::Fields& U, tk::Fields& P) const

Parameters
in Physical time
geoFace in Face geometry array
geoElem in Element geometry array
fd in Face connectivity and boundary conditions object
inpoel in Element-node connectivity
coord in Array of nodal coordinates
ndofel in Vector of local number of degrees of freedome
in/out Solution vector at recent time step
in/out Vector of primitives at recent time step

Limit second-order solution, and primitive quantities separately

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::rhs(tk::real t, const tk::Fields& geoFace, const tk::Fields& geoElem, const inciter::FaceData& fd, const std::vector<std::size_t>& inpoel, const tk::UnsMesh::Coords& coord, const tk::Fields& U, const tk::Fields& P, const std::vector<std::size_t>& ndofel, tk::Fields& R) const

Parameters
in Physical time
geoFace in Face geometry array
geoElem in Element geometry array
fd in Face connectivity and boundary conditions object
inpoel in Element-node connectivity
coord in Array of nodal coordinates
in Solution vector at recent time step
in Primitive vector at recent time step
ndofel in Vector of local number of degrees of freedome
in/out Right-hand side vector computed

Compute right hand side

template<class Physics, class Problem>
tk::real inciter::dg::MultiMat<Physics, Problem>::dt(const std::array<std::vector<tk::real>, 3>& coord, const std::vector<std::size_t>& inpoel, const inciter::FaceData& fd, const tk::Fields& geoFace, const tk::Fields& geoElem, const std::vector<std::size_t>&, const tk::Fields& U) const

Parameters
coord in Mesh node coordinates
inpoel in Mesh element connectivity
fd in Face connectivity and boundary conditions object
geoFace in Face geometry array
geoElem in Element geometry array
in Solution vector at recent time step
Returns Minimum time step size

Compute the minimum time step size

template<class Physics, class Problem>
std::array<std::array<tk::real, 4>, 3> inciter::dg::MultiMat<Physics, Problem>::velocity(const tk::Fields& U, const std::array<std::vector<tk::real>, 3>&, const std::array<std::size_t, 4>& N) const

Parameters
in Solution vector at recent time step
in Element node indices
Returns Array of the four values of the velocity field

Extract the velocity field at cell nodes. Currently unused.

template<class Physics, class Problem>
void inciter::dg::MultiMat<Physics, Problem>::side(std::unordered_set<int>& conf) const

Query all side set IDs the user has configured for all components in this PDE system.

Parameters
conf in/out Set of unique side set IDs to add to

template<class Physics, class Problem>
std::vector<std::string> inciter::dg::MultiMat<Physics, Problem>::fieldNames() const

Returns Vector of strings labelling fields output in file

Return field names to be output to file

template<class Physics, class Problem>
std::vector<std::vector<tk::real>> inciter::dg::MultiMat<Physics, Problem>::fieldOutput(tk::real t, const tk::Fields& geoElem, tk::Fields& U) const

Parameters
in Physical time
geoElem in Element geometry array
in/out Solution vector at recent time step
Returns Vector of vectors to be output to file

Return field output going to file

template<class Physics, class Problem>
std::vector<std::string> inciter::dg::MultiMat<Physics, Problem>::names() const

Returns Vector of strings labelling integral variables output

Return names of integral variables to be output to diagnostics file

template<class Physics, class Problem>
std::vector<tk::real> inciter::dg::MultiMat<Physics, Problem>::analyticSolution(tk::real xi, tk::real yi, tk::real zi, tk::real t) const

Parameters
xi in X-coordinate at which to evaluate the analytic solution
yi in Y-coordinate at which to evaluate the analytic solution
zi in Z-coordinate at which to evaluate the analytic solution
in Physical time at which to evaluate the analytic solution
Returns Vector of analytic solution at given location and time

Return analytic solution (if defined by Problem) at xi, yi, zi, t