Walker test code coverage report
Current view: top level - DiffEq/Dirichlet - GeneralizedDirichletCoeffPolicy.cpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 10 10 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: 5 58 8.6 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/DiffEq/Dirichlet/GeneralizedDirichletCoeffPolicy.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     Generalized Dirichlet coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the Generalized
      10                 :            :              Dirichlet SDE, defined in DiffEq/Dirichlet/GeneralizedDirichlet.h.
      11                 :            :              For general requirements on Generalized Dirichlet SDE coefficients
      12                 :            :              policy classes see the header file.
      13                 :            : */
      14                 :            : // *****************************************************************************
      15                 :            : 
      16                 :            : #include "GeneralizedDirichletCoeffPolicy.hpp"
      17                 :            : 
      18         [ -  + ]:         11 : walker::GeneralizedDirichletCoeffConst::GeneralizedDirichletCoeffConst(
      19                 :            :   tk::ctr::ncomp_t ncomp,
      20                 :            :   const std::vector< kw::sde_b::info::expect::type >& b_,
      21                 :            :   const std::vector< kw::sde_S::info::expect::type >& S_,
      22                 :            :   const std::vector< kw::sde_kappa::info::expect::type >& k_,
      23                 :            :   const std::vector< kw::sde_c::info::expect::type >& c_,
      24                 :            :   std::vector< kw::sde_b::info::expect::type >& b,
      25                 :            :   std::vector< kw::sde_S::info::expect::type >& S,
      26                 :            :   std::vector< kw::sde_kappa::info::expect::type >& k,
      27                 :            :   std::vector< kw::sde_c::info::expect::type >& c )
      28                 :            : // *****************************************************************************
      29                 :            : // Constructor: initialize coefficients
      30                 :            : //! \param[in] ncomp Number of scalar components in this SDE system
      31                 :            : //! \param[in] b_ Vector used to initialize coefficient vector b
      32                 :            : //! \param[in] S_ Vector used to initialize coefficient vector S
      33                 :            : //! \param[in] k_ Vector used to initialize coefficient vector k
      34                 :            : //! \param[in] c_ Vector used to initialize coefficient vector c
      35                 :            : //! \param[in,out] b Coefficient vector to be initialized
      36                 :            : //! \param[in,out] S Coefficient vector to be initialized
      37                 :            : //! \param[in,out] k Coefficient vector to be initialized
      38                 :            : //! \param[in,out] c Coefficient vector to be initialized
      39                 :            : // *****************************************************************************
      40                 :            : {
      41 [ -  + ][ -  - ]:         11 :   ErrChk( b_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      42                 :            :           "Wrong number of generalized Dirichlet SDE parameters 'b'");
      43 [ -  + ][ -  - ]:         11 :   ErrChk( S_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      44                 :            :           "Wrong number of generalized Dirichlet SDE parameters 'S'");
      45 [ -  + ][ -  - ]:         11 :   ErrChk( k_.size() == ncomp,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      46                 :            :           "Wrong number of generalized Dirichlet SDE parameters 'kappa'");
      47 [ -  + ][ -  - ]:         11 :   ErrChk( c_.size() == ncomp*(ncomp-1)/2,
         [ -  - ][ -  - ]
         [ -  - ][ -  - ]
                 [ -  - ]
      48                 :            :           "Wrong number of generalized Dirichlet SDE parameters 'c'");
      49                 :            : 
      50                 :         11 :   b = b_;
      51                 :         11 :   S = S_;
      52                 :         11 :   k = k_;
      53                 :         11 :   c = c_;
      54                 :         11 : }

Generated by: LCOV version 1.14