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

Generated by: LCOV version 1.14