Quinoa all test code coverage report
Current view: top level - DiffEq/Beta - NumberFractionBetaCoeffPolicy.hpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 2 2 100.0 %
Date: 2021-11-11 18:25:50 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/NumberFractionBetaCoeffPolicy.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     Number-fraction beta SDE coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the
      10                 :            :     number-fraction beta SDE, defined in DiffEq/NumberFractionBeta.h.
      11                 :            : 
      12                 :            :     General requirements on number-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 rcomma. 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_rcomma::info::expect::type >& rcomma_,
      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_rcomma::info::expect::type >& rcomma_ );
      30                 :            :       \endcode
      31                 :            :       where
      32                 :            :       - ncomp denotes the number of scalar components of the system of
      33                 :            :         number-fraction beta SDEs.
      34                 :            :       - Constant references to b_, S_, k_, rho2_, and rcomma_, which denote five
      35                 :            :         vectors of real values used to initialize the parameter vectors of the
      36                 :            :         system of number-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 rcomma, which denote the parameter
      39                 :            :         vectors to be initialized based on b_, S_, k_, rho2_, and rcomma_.
      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 NumberFractionBetaCoeffPolicy_h
      53                 :            : #define NumberFractionBetaCoeffPolicy_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                 :            : //! \brief Number-fraction beta SDE constant coefficients policity: constants in
      64                 :            : //!   time
      65                 :            : class NumFracBetaCoeffConst {
      66                 :            : 
      67                 :            :   public:
      68                 :            :     //! Constructor: initialize coefficients
      69                 :            :     NumFracBetaCoeffConst(
      70                 :            :       tk::ctr::ncomp_t ncomp,
      71                 :            :       const std::vector< kw::sde_b::info::expect::type >& b_,
      72                 :            :       const std::vector< kw::sde_S::info::expect::type >& S_,
      73                 :            :       const std::vector< kw::sde_kappa::info::expect::type >& k_,
      74                 :            :       const std::vector< kw::sde_rho2::info::expect::type >& rho2_,
      75                 :            :       const std::vector< kw::sde_rcomma::info::expect::type >& rcomma_,
      76                 :            :       std::vector< kw::sde_b::info::expect::type >& b,
      77                 :            :       std::vector< kw::sde_S::info::expect::type >& S,
      78                 :            :       std::vector< kw::sde_kappa::info::expect::type >& k,
      79                 :            :       std::vector< kw::sde_rho2::info::expect::type >& rho2,
      80                 :            :       std::vector< kw::sde_rcomma::info::expect::type >& rcomma );
      81                 :            : 
      82                 :            :     //! Coefficients policy type accessor
      83                 :       2584 :     static ctr::CoeffPolicyType type() noexcept
      84                 :       2584 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      85                 :            : };
      86                 :            : 
      87                 :            : //! List of all number-fraction beta's coefficients policies
      88                 :            : using NumberFractionBetaCoeffPolicies =
      89                 :            :   brigand::list< NumFracBetaCoeffConst >;
      90                 :            : 
      91                 :            : } // walker::
      92                 :            : 
      93                 :            : #endif // NumberFractionBetaCoeffPolicy_h

Generated by: LCOV version 1.14