Branch data Line data Source code
1 : : // ***************************************************************************** 2 : : /*! 3 : : \file src/DiffEq/Beta/MassFractionBetaCoeffPolicy.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 Mass-fraction beta SDE coefficients policies 9 : : \details This file defines coefficients policy classes for the mass-fraction 10 : : beta SDE, defined in DiffEq/Beta/MassFractionBeta.h. For general 11 : : requirements on mass-fraction beta SDE coefficients policy classes 12 : : see the header file. 13 : : */ 14 : : // ***************************************************************************** 15 : : 16 : : #include "MassFractionBetaCoeffPolicy.hpp" 17 : : 18 : : using walker::MassFractionBetaCoeffConst; 19 : : 20 : 11 : MassFractionBetaCoeffConst::MassFractionBetaCoeffConst( 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 : : const std::vector< kw::sde_rho2::info::expect::type >& rho2_, 26 : : const std::vector< kw::sde_r::info::expect::type >& r_, 27 : : std::vector< kw::sde_b::info::expect::type >& b, 28 : : std::vector< kw::sde_S::info::expect::type >& S, 29 : : std::vector< kw::sde_kappa::info::expect::type >& k, 30 : : std::vector< kw::sde_rho2::info::expect::type >& rho2, 31 : : std::vector< kw::sde_r::info::expect::type >& r ) 32 : : // ***************************************************************************** 33 : : // Constructor: initialize coefficients 34 : : //! \param[in] ncomp Number of scalar components in this SDE system 35 : : //! \param[in] b_ Vector used to initialize coefficient vector b 36 : : //! \param[in] S_ Vector used to initialize coefficient vector S 37 : : //! \param[in] k_ Vector used to initialize coefficient vector k 38 : : //! \param[in] rho2_ Vector used to initialize coefficient vector rho2 39 : : //! \param[in] r_ Vector used to initialize coefficient vector r 40 : : //! \param[in,out] b Coefficient vector to be initialized 41 : : //! \param[in,out] S Coefficient vector to be initialized 42 : : //! \param[in,out] k Coefficient vector to be initialized 43 : : //! \param[in,out] rho2 Coefficient vector to be initialized 44 : : //! \param[in,out] r Coefficient vector to be initialized 45 : : // ***************************************************************************** 46 : : { 47 [ - + ][ - - ]: 11 : ErrChk( b_.size() == ncomp, [ - - ][ - - ] 48 : : "Wrong number of number-fraction beta SDE parameters 'b'"); 49 [ - + ][ - - ]: 11 : ErrChk( S_.size() == ncomp, [ - - ][ - - ] 50 : : "Wrong number of number-fraction beta SDE parameters 'S'"); 51 [ - + ][ - - ]: 11 : ErrChk( k_.size() == ncomp, [ - - ][ - - ] 52 : : "Wrong number of number-fraction beta SDE parameters 'kappa'"); 53 [ - + ][ - - ]: 11 : ErrChk( rho2_.size() == ncomp, [ - - ][ - - ] 54 : : "Wrong number of number-fraction beta SDE parameters 'rho2'"); 55 [ - + ][ - - ]: 11 : ErrChk( r_.size() == ncomp, [ - - ][ - - ] 56 : : "Wrong number of number-fraction beta SDE parameters 'r'"); 57 : : 58 : 11 : b = b_; 59 : 11 : S = S_; 60 : 11 : k = k_; 61 : 11 : rho2 = rho2_; 62 : 11 : r = r_; 63 : 11 : }