Quinoa all test code coverage report
Current view: top level - DiffEq/OrnsteinUhlenbeck - OrnsteinUhlenbeckCoeffPolicy.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/OrnsteinUhlenbeck/OrnsteinUhlenbeckCoeffPolicy.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     Ornstein-Uhlenbeck coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the
      10                 :            :     Ornstein-Uhlenbeck SDE, defined in DiffEq/OrnsteinUhlenbeck.h.
      11                 :            : 
      12                 :            :     General requirements on the Ornstein-Uhlenbeck SDE coefficients policy
      13                 :            :     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                 :            :         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 Ornstein-Uhlenbeck SDEs. The length of the vector sigmasq_
      33                 :            :         must be equal to ncomp*(ncomp+1)/2, while the number of components of
      34                 :            :         the vectors theta_, and mu_, must be equal to ncomp.
      35                 :            :       - References to sigmasq, theta, and mu, which denote the parameter vectors
      36                 :            :         to be initialized based on sigmasq_, theta_, and mu_.
      37                 :            : 
      38                 :            :     - Must define the static function _type()_, returning the enum value of the
      39                 :            :       policy option. Example:
      40                 :            :       \code{.cpp}
      41                 :            :         static ctr::CoeffPolicyType type() noexcept {
      42                 :            :           return ctr::CoeffPolicyType::CONST_COEFF;
      43                 :            :         }
      44                 :            :       \endcode
      45                 :            :       which returns the enum value of the option from the underlying option
      46                 :            :       class, collecting all possible options for coefficients policies.
      47                 :            : */
      48                 :            : // *****************************************************************************
      49                 :            : #ifndef OrnsteinUhlenbeckCoeffPolicy_h
      50                 :            : #define OrnsteinUhlenbeckCoeffPolicy_h
      51                 :            : 
      52                 :            : #include <brigand/sequences/list.hpp>
      53                 :            : 
      54                 :            : #include "Types.hpp"
      55                 :            : #include "Walker/Options/CoeffPolicy.hpp"
      56                 :            : #include "SystemComponents.hpp"
      57                 :            : 
      58                 :            : namespace walker {
      59                 :            : 
      60                 :            : //! Ornstein-Uhlenbeck constant coefficients policity: constants in time
      61                 :            : class OrnsteinUhlenbeckCoeffConst {
      62                 :            : 
      63                 :            :   public:
      64                 :            :     //! Constructor: initialize coefficients
      65                 :            :     OrnsteinUhlenbeckCoeffConst(
      66                 :            :       tk::ctr::ncomp_t ncomp,
      67                 :            :       const std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq_,
      68                 :            :       const std::vector< kw::sde_theta::info::expect::type >& theta_,
      69                 :            :       const std::vector< kw::sde_mu::info::expect::type >& mu_,
      70                 :            :       std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq,
      71                 :            :       std::vector< kw::sde_theta::info::expect::type >& theta,
      72                 :            :       std::vector< kw::sde_mu::info::expect::type >& mu );
      73                 :            :   
      74                 :       2584 :     static ctr::CoeffPolicyType type() noexcept
      75                 :       2584 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      76                 :            : };
      77                 :            : 
      78                 :            : //! List of all Ornstein-Uhlenbeck's coefficients policies
      79                 :            : using OrnsteinUhlenbeckCoeffPolicies =
      80                 :            :   brigand::list< OrnsteinUhlenbeckCoeffConst >;
      81                 :            : 
      82                 :            : } // walker::
      83                 :            : 
      84                 :            : #endif // OrnsteinUhlenbeckCoeffPolicy_h

Generated by: LCOV version 1.14