src/DiffEq/Dirichlet/MixDirichletCoeffPolicy.hpp file

MixDirichlet coefficients policies.

Contents

This file defines coefficients policy classes for the MixDirichlet SDE, defined in DiffEq/MixDirichlet.h.

General requirements on Dirichlet SDE coefficients policy classes:

  • Must define a constructor, which is used to initialize the SDE coefficients, b, S, and kappa. Required signature:

    CoeffPolicyName(
      tk::ctr::ncomp_t ncomp,
      ctr::NormalizationType norm,
      const std::vector< kw::sde_b::info::expect::type >& b_,
      const std::vector< kw::sde_S::info::expect::type >& S_,
      const std::vector< kw::sde_kappa::info::expect::type >& kprime_,
      const std::vector< kw::sde_r::info::expect::type >& rho_,
      std::vector< kw::sde_b::info::expect::type  >& b,
      std::vector< kw::sde_kappa::info::expect::type >& kprime,
      std::vector< kw::sde_S::info::expect::type >& S,
      std::vector< kw::sde_rho::info::expect::type >& rho,
      std::vector< kw::sde_r::info::expect::type >& r,
      std::vector< kw::sde_kappa::info::expect::type >& k );

    where

    • ncomp denotes the number of scalar components of the system of MixDirichlet SDEs.
    • norm selects the type of normalization used (heavy or light).
    • Constant references to b_, S_, kprime_, rho_, which denote vectors of real values used to initialize the parameter vectors of the MixDirichlet SDEs. The length of the vectors must be equal to the number of components given by ncomp.
    • References to b, kprime, S, rho, r, k, which denote the parameter vectors to be initialized based on b_, S_, kprime_, rho_.
  • Must define the static function type(), returning the enum value of the policy option. Example:

    static ctr::CoeffPolicyType type() noexcept {
      return ctr::CoeffPolicyType::CONST_COEFF;
    }

    which returns the enum value of the option from the underlying option class, collecting all possible options for coefficients policies.

  • Must define the function update(), called from MixDirichlet::advance(), updating the model coefficients. Required signature:

    void update(
           char depvar,
           ncomp_t ncomp,
           ctr::NormalizationType norm,
           std::size_t density_offset,
           std::size_t volume_offset,
           const std::map< tk::ctr::Product, tk::real >& moments,
           const std::vector< kw::sde_rho::info::expect::type >& rho,
           const std::vector< kw::sde_r::info::expect::type >& r,
           const std::vector< kw::sde_kappa::info::expect::type >& kprime,
           const std::vector< kw::sde_b::info::expect::type >& b,
           std::vector< kw::sde_kappa::info::expect::type >& k,
           std::vector< kw::sde_kappa::info::expect::type >& S ) const {}

    where depvar is the dependent variable associated with the mix Dirichlet SDE, specified in the control file by the user, ncomp is the number of components in the system, norm selects the type of normalization used (heavy or light). density_offset is the offset of the particle density in the solution array relative to the Nth scalar, volume_offset is the offset of the particle specific volume in the solution array relative to the Nth scalar, moments is the map associating moment IDs (tk::ctr::vector< tk::ctr::Term >) to values of statistical moments, rho, r, kprime, b are user-defined parameters, and k and S are the SDE parameters computed/updated, see also DiffEq/DiffEq/MixDirichlet.h.

Namespaces

namespace walker
Walker declarations and definitions.

Classes

class walker::MixDirichletCoeffConst
MixDirichlet constant coefficients policity: constants in time.
class walker::MixDirichletHomogeneous
class walker::MixDirichletHydroTimeScale