|
|
|
@ -35,8 +35,16 @@ void CFDStructDataSolverNumericalMethodManager::saveDataToDom(rapidjson::Documen
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "limiter"});
|
|
|
|
|
jsonAdd(dom, m_timeFormat,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "timeType"});
|
|
|
|
|
jsonAdd(dom, m_iterationMethod,
|
|
|
|
|
// 此变量在ui中对应下拉框,但仅有一个选项,并且json值不为0,所以该变量不需要读取
|
|
|
|
|
// jsonAdd(dom, m_iterationMethod,
|
|
|
|
|
// {"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
|
|
if (m_timeFormat == 0) {
|
|
|
|
|
jsonAdd(dom, 2,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
|
|
} else if (m_timeFormat == 1) {
|
|
|
|
|
jsonAdd(dom, 1,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
|
|
}
|
|
|
|
|
jsonAdd(dom, m_relaxationFactor,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "lussor"});
|
|
|
|
|
jsonAdd(dom, m_multigridLevels,
|
|
|
|
@ -51,10 +59,78 @@ void CFDStructDataSolverNumericalMethodManager::saveDataToDom(rapidjson::Documen
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cfl"});
|
|
|
|
|
jsonAdd(dom, m_EntropyCorrectionType,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "EntropyFixVal"});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO 时间格式,会随定常和非定常变化
|
|
|
|
|
// TODO 迭代方法,会随定常和非定常变化
|
|
|
|
|
// TODO 熵修正类型,未确定
|
|
|
|
|
void CFDStructDataSolverNumericalMethodManager::readDataFromDom(rapidjson::Document &dom) {
|
|
|
|
|
QVariant temp;
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "generalFmt"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_fluxFormat = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "twojamson"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_secondOrderArtificialViscosity = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fourjamson"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_fourthOrderArtificialViscosity = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "accuracy"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_spaceAccuracy = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "limiter"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_limiter = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "timeType"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_timeFormat = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
// 此变量在ui中对应下拉框,但仅有一个选项,并且json值不为0,所以该变量不需要读取
|
|
|
|
|
// jsonRead(dom, m_iterationMethod,
|
|
|
|
|
// {"region", 0, "numericMethod", "numMethodParm", "iterType"});
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "lussor"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_relaxationFactor = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "gridLevelNum"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_multigridLevels = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cycleType"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_cycleType = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "coarseGridNum"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_coarseGridCFL = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "fineGridNum"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_fineGridCFL = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "cfl"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_turbulentCFL = temp.toDouble();
|
|
|
|
|
}
|
|
|
|
|
jsonRead(dom, temp,
|
|
|
|
|
{"region", 0, "numericMethod", "numMethodParm", "EntropyFixVal"});
|
|
|
|
|
if (temp != QVariant()) {
|
|
|
|
|
m_EntropyCorrectionType = temp.toInt();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIConfig *CFDStructDataSolverNumericalMethodManager::genJamesonModeUIConfig() {
|
|
|
|
|