Walker test code coverage report
Current view: top level - DiffEq/Beta - BetaCoeffPolicy.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/BetaCoeffPolicy.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     Beta coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the beta SDE,
      10                 :            :     defined in DiffEq/Beta.h.
      11                 :            : 
      12                 :            :     General requirements on beta SDE coefficients policy classes:
      13                 :            : 
      14                 :            :     - Must define a _constructor_, which is used to initialize the SDE
      15                 :            :       coefficients, b, S, and kappa. Required signature:
      16                 :            :       \code{.cpp}
      17                 :            :         CoeffPolicyName(
      18                 :            :           tk::ctr::ncomp_t ncomp,
      19                 :            :           const std::vector< kw::sde_b::info::expect::type >& b_,
      20                 :            :           const std::vector< kw::sde_S::info::expect::type >& S_,
      21                 :            :           const std::vector< kw::sde_kappa::info::expect::type >& k_,
      22                 :            :           std::vector< kw::sde_b::info::expect::type  >& b,
      23                 :            :           std::vector< kw::sde_S::info::expect::type >& S,
      24                 :            :           std::vector< kw::sde_kappa::info::expect::type >& k )
      25                 :            :       \endcode
      26                 :            :       where
      27                 :            :       - ncomp denotes the number of scalar components of the system of beta
      28                 :            :         SDEs.
      29                 :            :       - Constant references to b_, S_, and k_, which denote three vectors of
      30                 :            :         real values used to initialize the parameter vectors of the system of
      31                 :            :         beta SDEs. The length of the vectors must be equal to the number of
      32                 :            :         components given by ncomp.
      33                 :            :       - References to b, S, and k, which denote the parameter vectors to be
      34                 :            :         initialized based on b_, S_, and k_.
      35                 :            : 
      36                 :            :     - Must define the static function _type()_, returning the enum value of the
      37                 :            :       policy option. Example:
      38                 :            :       \code{.cpp}
      39                 :            :         static ctr::CoeffPolicyType type() noexcept {
      40                 :            :           return ctr::CoeffPolicyType::CONST_COEFF;
      41                 :            :         }
      42                 :            :       \endcode
      43                 :            :       which returns the enum value of the option from the underlying option
      44                 :            :       class, collecting all possible options for coefficients policies.
      45                 :            : */
      46                 :            : // *****************************************************************************
      47                 :            : #ifndef BetaCoeffPolicy_h
      48                 :            : #define BetaCoeffPolicy_h
      49                 :            : 
      50                 :            : #include <brigand/sequences/list.hpp>
      51                 :            : 
      52                 :            : #include "Types.hpp"
      53                 :            : #include "SystemComponents.hpp"
      54                 :            : #include "Walker/Options/CoeffPolicy.hpp"
      55                 :            : 
      56                 :            : namespace walker {
      57                 :            : 
      58                 :            : //! \brief Beta constant coefficients policity: constants in time
      59                 :            : class BetaCoeffConst {
      60                 :            : 
      61                 :            :   public:
      62                 :            :     //! Constructor: initialize coefficients
      63                 :            :     BetaCoeffConst(
      64                 :            :       tk::ctr::ncomp_t ncomp,
      65                 :            :       const std::vector< kw::sde_b::info::expect::type >& b_,
      66                 :            :       const std::vector< kw::sde_S::info::expect::type >& S_,
      67                 :            :       const std::vector< kw::sde_kappa::info::expect::type >& k_,
      68                 :            :       std::vector< kw::sde_b::info::expect::type  >& b,
      69                 :            :       std::vector< kw::sde_S::info::expect::type >& S,
      70                 :            :       std::vector< kw::sde_kappa::info::expect::type >& k );
      71                 :            : 
      72                 :            :     //! Coefficients policy type accessor
      73                 :       2992 :     static ctr::CoeffPolicyType type() noexcept
      74                 :       2992 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      75                 :            : };
      76                 :            : 
      77                 :            : //! List of all beta's coefficients policies
      78                 :            : using BetaCoeffPolicies = brigand::list< BetaCoeffConst >;
      79                 :            : 
      80                 :            : } // walker::
      81                 :            : 
      82                 :            : #endif // BetaCoeffPolicy_h

Generated by: LCOV version 1.14