Walker test code coverage report
Current view: top level - DiffEq/OrnsteinUhlenbeck - DiagOrnsteinUhlenbeckCoeffPolicy.cpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 8 8 100.0 %
Date: 2022-09-21 13:52:12 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 44 9.1 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/DiffEq/OrnsteinUhlenbeck/DiagOrnsteinUhlenbeckCoeffPolicy.cpp
       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 diagonal
      10                 :            :              Ornstein-Uhlenbeck SDE, defined in
      11                 :            :              DiffEq/OrnsteinUhlenbeck/DiagOrnsteinUhlenbeck.h. For general
      12                 :            :              requirements on the diagonal Ornstein-Uhlenbeck SDE coefficients
      13                 :            :              policy classes see the header file.
      14                 :            : */
      15                 :            : // *****************************************************************************
      16                 :            : 
      17                 :            : #include "DiagOrnsteinUhlenbeckCoeffPolicy.hpp"
      18                 :            : 
      19         [ -  + ]:         45 : walker::DiagOrnsteinUhlenbeckCoeffConst::DiagOrnsteinUhlenbeckCoeffConst(
      20                 :            :   tk::ctr::ncomp_t ncomp,
      21                 :            :   const std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq_,
      22                 :            :   const std::vector< kw::sde_theta::info::expect::type >& theta_,
      23                 :            :   const std::vector< kw::sde_mu::info::expect::type >& mu_,
      24                 :            :   std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq,
      25                 :            :   std::vector< kw::sde_theta::info::expect::type >& theta,
      26                 :            :   std::vector< kw::sde_mu::info::expect::type >& mu )
      27                 :            : // *****************************************************************************
      28                 :            : // Constructor: initialize coefficients
      29                 :            : //! \param[in] ncomp Number of scalar components in this SDE system
      30                 :            : //! \param[in] sigmasq_ Vector used to initialize coefficient vector sigmasq
      31                 :            : //! \param[in] theta_ Vector used to initialize coefficient vector theta
      32                 :            : //! \param[in] mu_ Vector used to initialize coefficient vector mu
      33                 :            : //! \param[in,out] sigmasq Coefficient vector to be initialized
      34                 :            : //! \param[in,out] theta Coefficient vector to be initialized
      35                 :            : //! \param[in,out] mu Coefficient vector to be initialized
      36                 :            : // *****************************************************************************
      37                 :            : {
      38 [ -  + ][ -  - ]:         45 :   ErrChk( sigmasq_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      39                 :            :    "Wrong number of diagonal Ornstein-Uhlenbeck SDE parameters 'sigmasq'");
      40 [ -  + ][ -  - ]:         45 :   ErrChk( theta_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      41                 :            :    "Wrong number of diagonal Ornstein_uhlenbeck SDE parameters 'theta'");
      42 [ -  + ][ -  - ]:         45 :   ErrChk( mu_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      43                 :            :    "Wrong number of diagonal Ornstein_uhlenbeck SDE parameters 'mu'");
      44                 :            : 
      45                 :         45 :   sigmasq = sigmasq_;
      46                 :         45 :   theta = theta_;
      47                 :         45 :   mu = mu_;
      48                 :         45 : }

Generated by: LCOV version 1.14