Walker test code coverage report
Current view: top level - DiffEq/Beta - MassFractionBetaCoeffPolicy.hpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 2 2 100.0 %
Date: 2022-09-21 18:57:21 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/DiffEq/Beta/MassFractionBetaCoeffPolicy.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.
       7                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Mass-fraction beta SDE coefficients policies
       9                 :            :   \details   This file declares coefficients policy classes for the
      10                 :            :     mass-fraction beta SDE, defined in DiffEq/Beta/MassFractionBeta.h.
      11                 :            : 
      12                 :            :     General requirements on mass-fraction beta SDE coefficients policy
      13                 :            :     classes:
      14                 :            : 
      15                 :            :     - Must define a _constructor_, which is used to initialize the SDE
      16                 :            :       coefficients, b, S, kappa, rho2, and r. Required signature:
      17                 :            :       \code{.cpp}
      18                 :            :         CoeffPolicyName(
      19                 :            :           tk::ctr::ncomp_t ncomp,
      20                 :            :           const std::vector< kw::sde_b::info::expect::type >& b_,
      21                 :            :           const std::vector< kw::sde_S::info::expect::type >& S_,
      22                 :            :           const std::vector< kw::sde_kappa::info::expect::type >& k_,
      23                 :            :           const std::vector< kw::sde_rho2::info::expect::type >& rho2_,
      24                 :            :           const std::vector< kw::sde_r::info::expect::type >& r_,
      25                 :            :           std::vector< kw::sde_b::info::expect::type  >& b,
      26                 :            :           std::vector< kw::sde_S::info::expect::type >& S,
      27                 :            :           std::vector< kw::sde_kappa::info::expect::type >& k,
      28                 :            :           std::vector< kw::sde_rho2::info::expect::type >& rho2_,
      29                 :            :           std::vector< kw::sde_r::info::expect::type >& r_ );
      30                 :            :       \endcode
      31                 :            :       where
      32                 :            :       - ncomp denotes the number of scalar components of the system of
      33                 :            :         mass-fraction beta SDEs.
      34                 :            :       - Constant references to b_, S_, k_, rho2_, and r_, which denote five
      35                 :            :         vectors of real values used to initialize the parameter vectors of the
      36                 :            :         system of mass-fraction beta SDEs. The length of the vectors must be
      37                 :            :         equal to the number of components given by ncomp.
      38                 :            :       - References to b, S, k, rho2_, and r, which denote the parameter vectors
      39                 :            :         to be initialized based on b_, S_, k_, rho2_, and r_.
      40                 :            : 
      41                 :            :     - Must define the static function _type()_, returning the enum value of the
      42                 :            :       policy option. Example:
      43                 :            :       \code{.cpp}
      44                 :            :         static ctr::CoeffPolicyType type() noexcept {
      45                 :            :           return ctr::CoeffPolicyType::CONST_COEFF;
      46                 :            :         }
      47                 :            :       \endcode
      48                 :            :       which returns the enum value of the option from the underlying option
      49                 :            :       class, collecting all possible options for coefficients policies.
      50                 :            : */
      51                 :            : // *****************************************************************************
      52                 :            : #ifndef MassFractionBetaCoeffPolicy_h
      53                 :            : #define MassFractionBetaCoeffPolicy_h
      54                 :            : 
      55                 :            : #include <brigand/sequences/list.hpp>
      56                 :            : 
      57                 :            : #include "Types.hpp"
      58                 :            : #include "Walker/Options/CoeffPolicy.hpp"
      59                 :            : #include "SystemComponents.hpp"
      60                 :            : 
      61                 :            : namespace walker {
      62                 :            : 
      63                 :            : //! Mass-fraction beta SDE constant coefficients policity: constants in time
      64                 :            : class MassFractionBetaCoeffConst {
      65                 :            : 
      66                 :            :   public:
      67                 :            :     //! Constructor: initialize coefficients
      68                 :            :     MassFractionBetaCoeffConst(
      69                 :            :       tk::ctr::ncomp_t ncomp,
      70                 :            :       const std::vector< kw::sde_b::info::expect::type >& b_,
      71                 :            :       const std::vector< kw::sde_S::info::expect::type >& S_,
      72                 :            :       const std::vector< kw::sde_kappa::info::expect::type >& k_,
      73                 :            :       const std::vector< kw::sde_rho2::info::expect::type >& rho2_,
      74                 :            :       const std::vector< kw::sde_r::info::expect::type >& r_,
      75                 :            :       std::vector< kw::sde_b::info::expect::type  >& b,
      76                 :            :       std::vector< kw::sde_S::info::expect::type >& S,
      77                 :            :       std::vector< kw::sde_kappa::info::expect::type >& k,
      78                 :            :       std::vector< kw::sde_rho2::info::expect::type >& rho2,
      79                 :            :       std::vector< kw::sde_r::info::expect::type >& r );
      80                 :            : 
      81                 :            :     //! Coefficients policy type accessor
      82                 :       2992 :     static ctr::CoeffPolicyType type() noexcept
      83                 :       2992 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      84                 :            : };
      85                 :            : 
      86                 :            : //! List of all mass-fraction beta's coefficients policies
      87                 :            : using MassFractionBetaCoeffPolicies =
      88                 :            :   brigand::list< MassFractionBetaCoeffConst >;
      89                 :            : 
      90                 :            : } // walker::
      91                 :            : 
      92                 :            : #endif // MassFractionBetaCoeffPolicy_h

Generated by: LCOV version 1.14