Branch data Line data Source code
1 : : // ***************************************************************************** 2 : : /*! 3 : : \file src/DiffEq/SkewNormal/SkewNormalCoeffPolicy.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 Skew-normal coefficients policies 9 : : \details This file defines coefficients policy classes for the diagonal 10 : : skew-normal SDE, defined in DiffEq/SkewNormal.h. 11 : : 12 : : General requirements on the skew-normal SDE coefficients policy classes: 13 : : 14 : : - Must define a _constructor_, which is used to initialize the SDE 15 : : coefficients, timescale, sigmasq, and lambda. Required signature: 16 : : \code{.cpp} 17 : : CoeffPolicyName( 18 : : tk::ctr::ncomp_t ncomp, 19 : : const std::vector< kw::sde_T::info::expect::type >& timescale_, 20 : : const std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq_, 21 : : const std::vector< kw::sde_lambda::info::expect::type >& lambda_, 22 : : std::vector< kw::sde_T::info::expect::type >& timescale, 23 : : std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq, 24 : : std::vector< kw::sde_lambda::info::expect::type >& lambda ) 25 : : \endcode 26 : : where 27 : : - ncomp denotes the number of scalar components of the system of the 28 : : skew-normal SDEs. 29 : : - Constant references to timescale_, sigmasq_, and lambda_, which denote 30 : : three vectors of real values used to initialize the parameter vectors of 31 : : the system of skew-normal SDEs. The length of the vectors must be equal 32 : : to the number of components given by ncomp. 33 : : - References to timescale, sigmasq, and lambda, which denote the parameter 34 : : vectors to be initialized based on timescale_, sigmasq_, and lambda_. 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 SkewNormalCoeffPolicy_h 48 : : #define SkewNormalCoeffPolicy_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 : : //! Skew-normal SDE constant coefficients policity: constants in time 59 : : class SkewNormalCoeffConst { 60 : : 61 : : public: 62 : : //! Constructor: initialize coefficients 63 : : SkewNormalCoeffConst( 64 : : tk::ctr::ncomp_t ncomp, 65 : : const std::vector< kw::sde_T::info::expect::type >& timescale_, 66 : : const std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq_, 67 : : const std::vector< kw::sde_lambda::info::expect::type >& lambda_, 68 : : std::vector< kw::sde_T::info::expect::type >& timescale, 69 : : std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq, 70 : : std::vector< kw::sde_lambda::info::expect::type >& lambda ); 71 : : 72 : 2584 : static ctr::CoeffPolicyType type() noexcept 73 : 2584 : { return ctr::CoeffPolicyType::CONST_COEFF; } 74 : : }; 75 : : 76 : : //! List of all Skew-normal SDE's coefficients policies 77 : : using SkewNormalCoeffPolicies = brigand::list< SkewNormalCoeffConst >; 78 : : 79 : : } // walker:: 80 : : 81 : : #endif // SkewNormalCoeffPolicy_h