Quinoa regression test code coverage report
Current view: top level - DiffEq/Dirichlet - DirichletCoeffPolicy.cpp (source / functions) Hit Total Coverage
Commit: Quinoa_v0.3-957-gb4f0efae0 Lines: 8 8 100.0 %
Date: 2021-11-11 13:17:06 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 24 12.5 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/DiffEq/Dirichlet/DirichletCoeffPolicy.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     Dirichlet coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the Dirichlet
      10                 :            :              SDE, defined in DiffEq/Dirichlet/Dirichlet.h. For general
      11                 :            :              requirements on Dirichlet SDE coefficients policy classes see the
      12                 :            :              header file.
      13                 :            : */
      14                 :            : // *****************************************************************************
      15                 :            : 
      16                 :            : #include "DirichletCoeffPolicy.hpp"
      17                 :            : 
      18                 :            : using walker::DirichletCoeffConst;
      19                 :            : 
      20                 :         22 : DirichletCoeffConst::DirichletCoeffConst(
      21                 :            :   tk::ctr::ncomp_t ncomp,
      22                 :            :   const std::vector< kw::sde_b::info::expect::type >& b_,
      23                 :            :   const std::vector< kw::sde_S::info::expect::type >& S_,
      24                 :            :   const std::vector< kw::sde_kappa::info::expect::type >& k_,
      25                 :            :   std::vector< kw::sde_b::info::expect::type  >& b,
      26                 :            :   std::vector< kw::sde_S::info::expect::type >& S,
      27                 :            :   std::vector< kw::sde_kappa::info::expect::type >& k )
      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,out] b Coefficient vector to be initialized
      35                 :            : //! \param[in,out] S Coefficient vector to be initialized
      36                 :            : //! \param[in,out] k Coefficient vector to be initialized
      37                 :            : // *****************************************************************************
      38                 :            : {
      39 [ -  + ][ -  - ]:         22 :   ErrChk( b_.size() == ncomp,
         [ -  - ][ -  - ]
      40                 :            :           "Wrong number of Dirichlet SDE parameters 'b'");
      41 [ -  + ][ -  - ]:         22 :   ErrChk( S_.size() == ncomp,
         [ -  - ][ -  - ]
      42                 :            :           "Wrong number of Dirichlet SDE parameters 'S'");
      43 [ -  + ][ -  - ]:         22 :   ErrChk( k_.size() == ncomp,
         [ -  - ][ -  - ]
      44                 :            :           "Wrong number of Dirichlet SDE parameters 'kappa'");
      45                 :            : 
      46                 :         22 :   b = b_;
      47                 :         22 :   S = S_;
      48                 :         22 :   k = k_;
      49                 :         22 : }

Generated by: LCOV version 1.14