Quinoa all test code coverage report
Current view: top level - DiffEq/Dirichlet - GeneralizedDirichletCoeffPolicy.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/Dirichlet/GeneralizedDirichletCoeffPolicy.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     Lochner's generalized Dirichlet coefficients policies
       9                 :            :   \details   This file defines coefficients policy classes for the generalized
      10                 :            :     Dirichlet SDE, defined in DiffEq/GeneralizedDirichlet.h.
      11                 :            : 
      12                 :            :     General requirements on generalized Dirichlet SDE coefficients policy
      13                 :            :     classes:
      14                 :            : 
      15                 :            :     - Must define a _constructor_, which is used to initialize the SDE
      16                 :            :       coefficients, b, S, kappa, and c. Required signature:
      17                 :            :       \code{.cpp}
      18                 :            :         CoeffPolicyName(
      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                 :            :       \endcode
      29                 :            :       where
      30                 :            :       - ncomp denotes the number of scalar components of the system of beta
      31                 :            :         SDEs.
      32                 :            :       - Constant references to b_, S_, k_, and c_, which denote four vectors of
      33                 :            :         real values used to initialize the parameter vectors of the generalized
      34                 :            :         Dirichlet SDEs. The length of the vectors b_, S_, and kappa_, must be
      35                 :            :         equal to the number of components given by ncomp, while the length of
      36                 :            :         vector c_ must be ncomp*(ncomp-1)/2.
      37                 :            :       - References to b, S, k, and c, which denote the parameter vectors to be
      38                 :            :         initialized based on b_, S_, k_, and c_.
      39                 :            : 
      40                 :            :     - Must define the static function _type()_, returning the enum value of the
      41                 :            :       policy option. Example:
      42                 :            :       \code{.cpp}
      43                 :            :         static ctr::CoeffPolicyType type() noexcept {
      44                 :            :           return ctr::CoeffPolicyType::CONST_COEFF;
      45                 :            :         }
      46                 :            :       \endcode
      47                 :            :       which returns the enum value of the option from the underlying option
      48                 :            :       class, collecting all possible options for coefficients policies.
      49                 :            : */
      50                 :            : // *****************************************************************************
      51                 :            : #ifndef GeneralizedDirichletCoeffPolicy_h
      52                 :            : #define GeneralizedDirichletCoeffPolicy_h
      53                 :            : 
      54                 :            : #include <brigand/sequences/list.hpp>
      55                 :            : 
      56                 :            : #include "Types.hpp"
      57                 :            : #include "Walker/Options/CoeffPolicy.hpp"
      58                 :            : #include "SystemComponents.hpp"
      59                 :            : 
      60                 :            : namespace walker {
      61                 :            : 
      62                 :            : //! Generalized Dirichlet constant coefficients policity: constants in time
      63                 :            : class GeneralizedDirichletCoeffConst {
      64                 :            : 
      65                 :            :   public:
      66                 :            :     //! Constructor: initialize coefficients
      67                 :            :     GeneralizedDirichletCoeffConst(
      68                 :            :       tk::ctr::ncomp_t ncomp,
      69                 :            :       const std::vector< kw::sde_b::info::expect::type >& b_,
      70                 :            :       const std::vector< kw::sde_S::info::expect::type >& S_,
      71                 :            :       const std::vector< kw::sde_kappa::info::expect::type >& k_,
      72                 :            :       const std::vector< kw::sde_c::info::expect::type >& c_,
      73                 :            :       std::vector< kw::sde_b::info::expect::type >& b,
      74                 :            :       std::vector< kw::sde_S::info::expect::type >& S,
      75                 :            :       std::vector< kw::sde_kappa::info::expect::type >& k,
      76                 :            :       std::vector< kw::sde_c::info::expect::type >& c );
      77                 :            : 
      78                 :       2584 :     static ctr::CoeffPolicyType type() noexcept
      79                 :       2584 :     { return ctr::CoeffPolicyType::CONST_COEFF; }
      80                 :            : };
      81                 :            : 
      82                 :            : //! List of all generalized Dirichlet's coefficients policies
      83                 :            : using GeneralizedDirichletCoeffPolicies =
      84                 :            :   brigand::list< GeneralizedDirichletCoeffConst >;
      85                 :            : 
      86                 :            : } // walker::
      87                 :            : 
      88                 :            : #endif // GeneralizedDirichletCoeffPolicy_h

Generated by: LCOV version 1.14