本文整理汇总了C++中IOdictionary::subOrEmptyDict方法的典型用法代码示例。如果您正苦于以下问题:C++ IOdictionary::subOrEmptyDict方法的具体用法?C++ IOdictionary::subOrEmptyDict怎么用?C++ IOdictionary::subOrEmptyDict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOdictionary
的用法示例。
在下文中一共展示了IOdictionary::subOrEmptyDict方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveTurbulenceParameters
void saveTurbulenceParameters(const IOdictionary& RASProperties,
pt::ptree& settings)
{
std::string dictName = "kOmegaSSTCoeffs";
dictionary kOmegaSSTCoeffsDict
(RASProperties.subOrEmptyDict(dictName));
scalar alphaK1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("alphaK1", 0.85034);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_ALPHA_K1, alphaK1);
scalar alphaK2 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("alphaK2", 1.0);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_ALPHA_K2, alphaK2);
scalar alphaOmega1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("alphaOmega1", 0.5);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_ALPHA_OMEGA1, alphaOmega1);
scalar alphaOmega2 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("alphaOmega2", 0.85616);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_ALPHA_OMEGA2, alphaOmega2);
scalar gamma1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("gamma1", 0.5532);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_GAMMA1, gamma1);
scalar gamma2 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("gamma2", 0.4403);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_GAMMA2, gamma2);
scalar beta1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("beta1", 0.0750);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_BETA1, beta1);
scalar beta2 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("beta2", 0.0828);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_BETA2, beta2);
scalar betaStar = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("betaStar", 0.09);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_BETASTAR, betaStar);
scalar a1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("a1", 0.31);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_A1, a1);
scalar c1 = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("c1", 10);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_C1, c1);
scalar Cmu = kOmegaSSTCoeffsDict.lookupOrDefault<scalar>("Cmu", 0.09);
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_CMU, Cmu);
scalar kappa = 0.41;
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_KAPPA, kappa);
scalar E = 9.8;
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_E, E);
scalar ypl = 11.0;
for (int i = 0; i < 10; i++)
{
ypl = ::log(E*ypl)/kappa;
}
scalar yPlusLam = ypl;
settings.put(dictName + "." + speeditcl::io::TURBULENCE_KOMEGASST_YPLUS_LAM, yPlusLam);
}