Branch data Line data Source code
1 : : // ***************************************************************************** 2 : : /*! 3 : : \file src/DiffEq/SkewNormal/SkewNormalCoeffPolicy.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 SkewNormal coefficients policies 9 : : \details This file defines coefficients policy classes for the skew-normal 10 : : SDE, defined in DiffEq/SkewNormal/SkewNormal.h. For general 11 : : requirements on skew-normal SDE coefficients policy classes see the 12 : : header file. 13 : : */ 14 : : // ***************************************************************************** 15 : : 16 : : #include "SkewNormalCoeffPolicy.hpp" 17 : : 18 : 38 : walker::SkewNormalCoeffConst::SkewNormalCoeffConst( 19 : : tk::ctr::ncomp_t ncomp, 20 : : const std::vector< kw::sde_T::info::expect::type >& timescale_, 21 : : const std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq_, 22 : : const std::vector< kw::sde_lambda::info::expect::type >& lambda_, 23 : : std::vector< kw::sde_T::info::expect::type >& timescale, 24 : : std::vector< kw::sde_sigmasq::info::expect::type >& sigmasq, 25 : : std::vector< kw::sde_lambda::info::expect::type >& lambda ) 26 : : // ***************************************************************************** 27 : : // Constructor: initialize coefficients 28 : : //! \param[in] ncomp Number of scalar components in this SDE system 29 : : //! \param[in] timescale_ Vector used to initialize coefficient vector timescale 30 : : //! \param[in] sigmasq_ Vector used to initialize coefficient vector sigmasq 31 : : //! \param[in] lambda_ Vector used to initialize coefficient vector lambda 32 : : //! \param[in,out] timescale Coefficient vector to be initialized 33 : : //! \param[in,out] sigmasq Coefficient vector to be initialized 34 : : //! \param[in,out] lambda Coefficient vector to be initialized 35 : : // ***************************************************************************** 36 : : { 37 [ - + ][ - - ]: 38 : ErrChk( timescale_.size() == ncomp, [ - - ][ - - ] [ - - ][ - - ] [ - - ] 38 : : "Wrong number of diagonal Skew-normal SDE parameters 'timescale'"); 39 [ - + ][ - - ]: 38 : ErrChk( sigmasq_.size() == ncomp, [ - - ][ - - ] [ - - ][ - - ] [ - - ] 40 : : "Wrong number of diagonal Skew-normal SDE parameters 'sigmasq'"); 41 [ - + ][ - - ]: 38 : ErrChk( lambda_.size() == ncomp, [ - - ][ - - ] [ - - ][ - - ] [ - - ] 42 : : "Wrong number of diagonal Skew-normal SDE parameters 'lambda'"); 43 : : 44 : 38 : timescale = timescale_; 45 : 38 : sigmasq = sigmasq_; 46 : 38 : lambda = lambda_; 47 : 38 : }