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

Generated by: LCOV version 1.14