class
CGPDEPartial differential equation base for continuous Galerkin PDEs.
Contents
This class uses runtime polymorphism without client-side inheritance: inheritance is confined to the internals of the this class, invisible to client-code. The class exclusively deals with ownership enabling client-side value semantics. Credit goes to Sean Parent at Adobe: https:/
Constructors, destructors, conversion operators
- CGPDE() defaulted explicit
- Default constructor taking no arguments for Charm++.
-
template<typename T>CGPDE(T x) explicit
-
template<typename T, typename... Args>CGPDE(std::function<T(Args...)> x, Args&&... args) explicit
- Constructor taking a function pointer to a constructor of an object modeling Concept.
- CGPDE(const CGPDE& x)
- Copy constructor.
- CGPDE(CGPDE&&) noexcept defaulted
- Move constructor.
Public functions
-
void IcBoxNodes(const tk::
UnsMesh:: Coords& coord, std::vector<std::unordered_set<std::size_t>>& inbox) - Public interface to determining which nodes are in IC box.
- void initialize(const std::array<std::vector<real>, 3>& coord, tk::Fields& unk, real t, real V, const std::vector<std::unordered_set<std::size_t>>& inbox)
- Public interface to setting the initial conditions for the diff eq.
-
void velocity(const tk::Fields& u,
tk::
UnsMesh:: Coords& v) const - Public interface to querying a velocity.
-
void soundspeed(const tk::Fields& u,
std::vector<tk::
real>& s) const - Public interface to querying a sound speed.
- void chBndGrad(const std::array<std::vector<real>, 3>& coord, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& bndel, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const tk::Fields& U, tk::Fields& G) const
- Public interface to computing the nodal gradients for ALECG.
- void rhs(real t, real deltat, const std::array<std::vector<real>, 3>& coord, const std::vector<std::size_t>& inpoel, const tk::Fields& U, tk::Fields& Ue, tk::Fields& R) const
- Public interface to computing the right-hand side vector for DiagCG.
- void rhs(real t, const std::array<std::vector<real>, 3>& coord, const std::vector<std::size_t>& inpoel, const std::vector<std::size_t>& triinpoel, const std::vector<std::size_t>& gid, const std::unordered_map<std::size_t, std::size_t>& bid, const std::unordered_map<std::size_t, std::size_t>& lid, const std::vector<real>& dfn, const std::pair<std::vector<std::size_t>, std::vector<std::size_t>>& psup, const std::pair<std::vector<std::size_t>, std::vector<std::size_t>>& esup, const std::vector<int>& symbctri, const std::unordered_set<std::size_t>& spongenodes, const std::vector<real>& vol, const std::vector<std::size_t>& edgenode, const std::vector<std::size_t>& edgeid, const std::vector<std::unordered_set<std::size_t>>& boxnodes, const tk::Fields& G, const tk::Fields& U, const tk::Fields& W, const std::vector<real>& tp, real V, tk::Fields& R) const
- Public interface to computing the right-hand side vector for ALECG.
-
auto dt(const std::array<std::vector<real>, 3>& coord,
const std::vector<std::size_t>& inpoel,
tk::
real t, tk:: real dtn, const tk::Fields& U, const std::vector<tk:: real>& vol, const std::vector<tk:: real>& voln) const -> real - Public interface for computing the minimum time step size.
- void dt(uint64_t it, const std::vector<real>& vol, const tk::Fields& U, std::vector<real>& dtp) const
- Public interface for computing a time step size for each mesh node.
- auto dirbc(real t, real deltat, const std::vector<real>& tp, const std::vector<real>& dtp, const std::pair<const int, std::vector<std::size_t>>& sides, const std::array<std::vector<real>, 3>& coord, bool increment) const -> std::map<std::size_t, std::vector<std::pair<bool, real>>>
- Public interface for querying Dirichlet boundary condition values set by the user on a given side set for all components in a PDE system.
- void symbc(tk::Fields& U, const std::array<std::vector<real>, 3>& coord, const std::unordered_map<int, std::unordered_map<std::size_t, std::array<real, 4>>>& bnorm, const std::unordered_set<std::size_t>& nodes) const
- Public interface to set symmetry boundary conditions at nodes.
- void farfieldbc(tk::Fields& U, const std::array<std::vector<real>, 3>& coord, const std::unordered_map<int, std::unordered_map<std::size_t, std::array<real, 4>>>& bnorm, const std::unordered_set<std::size_t>& nodes) const
- Public interface to set farfield boundary conditions at nodes.
- void sponge(tk::Fields& U, const std::array<std::vector<real>, 3>& coord, const std::unordered_set<std::size_t>& nodes) const
- Public interface to applying sponge conditions at nodes.
-
void timedepbc(tk::
real t, tk::Fields& U, const std::vector<std::unordered_set<std::size_t>>& nodes, const std::vector<tk:: Table<5>>& timedepfn) const - Public interface to applying time dependent boundary conditions at nodes.
- auto analyticFieldNames() const -> std::vector<std::string>
- Public interface to returning analytic field output labels.
- auto surfNames() const -> std::vector<std::string>
- Public interface to returning surface field output labels.
- auto histNames() const -> std::vector<std::string>
- Public interface to returning time history field output labels.
- auto names() const -> std::vector<std::string>
- Public interface to returning variable names.
- auto surfOutput(const std::map<int, std::vector<std::size_t>>& bnd, const tk::Fields& U) const -> std::vector<std::vector<real>>
- Public interface to returning surface field output.
- auto histOutput(const std::vector<HistData>& h, const std::vector<std::size_t>& inpoel, const tk::Fields& U) const -> std::vector<std::vector<real>>
- Public interface to returning time history output.
- auto analyticSolution(real xi, real yi, real zi, real t) const -> tk::InitializeFn::result_type
- Public interface to returning analytic solution.
-
auto solution(tk::
real xi, tk:: real yi, tk:: real zi, tk:: real t) const -> tk::InitializeFn::result_type - Public interface to returning the analytic solution for conserved vars.
- auto operator=(const CGPDE& x) -> CGPDE&
- Copy assignment.
- auto operator=(CGPDE&&) noexcept -> CGPDE& defaulted
- Move assignment.
Function documentation
template<typename T, typename... Args>
inciter:: CGPDE:: CGPDE(std::function<T(Args...)> x,
Args&&... args) explicit
Constructor taking a function pointer to a constructor of an object modeling Concept.
Parameters | |
---|---|
x in | Function pointer to a constructor of an object modeling Concept. |
args in | Zero or more constructor arguments |
Passing std::function allows late execution of the constructor, i.e., as late as inside this class' constructor, and thus usage from a factory. Note that there are at least two different ways of using this constructor:
- Bind T's constructor arguments and place it in std::function<T()> and passing no arguments as args.... This case then instantiates the model via its constructor and stores it in here.
Bind a single placeholder argument to T's constructor and pass it in as host's args..., which then forwards it to model's constructor. This allows late binding, i.e., binding the argument only here.