Walker test code coverage report
Current view: top level - DiffEq/Gamma - GammaCoeffPolicy.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/Gamma/GammaCoeffPolicy.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     Gamma coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the gamma SDE,
      10                 :            :     defined in DiffEq/Gamma.h.
      11                 :            : 
      12                 :            :     General requirements on gamma 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 gamma
      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                 :            :         gamma 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 GammaCoeffPolicy_h
      48                 :            : #define GammaCoeffPolicy_h
      49                 :            : 
      50                 :            : #include <brigand/sequences/list.hpp>
      51                 :            : 
      52                 :            : #include "Types.hpp"
      53                 :            : #include "Walker/Options/CoeffPolicy.hpp"
      54                 :            : #include "SystemComponents.hpp"
      55                 :            : 
      56                 :            : namespace walker {
      57                 :            : 
      58                 :            : //! Gamma constant coefficients policity: constants in time
      59                 :            : class GammaCoeffConst {
      60                 :            : 
      61                 :            :   public:
      62                 :            :     //! Constructor: initialize coefficients
      63                 :            :     GammaCoeffConst(
      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                 :       2992 :     static ctr::CoeffPolicyType type() noexcept
      73                 :       2992 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      74                 :            : };
      75                 :            : 
      76                 :            : //! List of all gamma's coefficients policies
      77                 :            : using GammaCoeffPolicies = brigand::list< GammaCoeffConst >;
      78                 :            : 
      79                 :            : } // walker::
      80                 :            : 
      81                 :            : #endif // GammaCoeffPolicy_h

Generated by: LCOV version 1.14