73 template <EulerModel model>
76 int nVars = getNVars(model);
111 ArrayRECV<nVarsFixed> uRec, uRecLimited, uRecNew, uRecNew1, uRecOld, uRec1, uRecInc, uRecInc1, uRecB, uRecB1;
114 ArrayDOFV<1> alphaPP, alphaPP1, betaPP, betaPP1, alphaPP_tmp, dTauTmp;
120 ssp<ArrayEigenVector<Eigen::Dynamic>> outDist;
121 ssp<ArrayEigenVector<Eigen::Dynamic>> outSerial;
122 ArrayTransformerType<ArrayEigenVector<Eigen::Dynamic>>::Type outDist2SerialTrans;
124 ssp<ArrayEigenVector<Eigen::Dynamic>> outDistPoint;
125 ssp<ArrayEigenVector<Eigen::Dynamic>> outGhostPoint;
126 ssp<ArrayEigenVector<Eigen::Dynamic>> outSerialPoint;
127 ArrayTransformerType<ArrayEigenVector<Eigen::Dynamic>>::Type outDist2SerialTransPoint;
128 ArrayPair<ArrayEigenVector<Eigen::Dynamic>> outDistPointPair;
129 static const int maxOutFutures{3};
130 std::mutex outArraysMutex;
131 std::array<std::future<void>, maxOutFutures> outFuture;
133 ssp<ArrayEigenVector<Eigen::Dynamic>> outDistBnd;
135 ssp<ArrayEigenVector<Eigen::Dynamic>> outSerialBnd;
136 ArrayTransformerType<ArrayEigenVector<Eigen::Dynamic>>::Type outDist2SerialTransBnd;
138 std::mutex outBndArraysMutex;
139 std::array<std::future<void>, maxOutFutures> outBndFuture;
140 std::future<void> outSeqFuture;
145 ssp<BoundaryHandler<model>> pBCHandler;
219 config.field_json(&T::odeSettingsExtra,
"odeSettingsExtra",
"Extra ODE integrator settings (opaque JSON)");
316 "=== Step {termBold}[{step:4d}] ",
317 "res {termBold}{termRed}{resRel:.3e}{termReset} ",
318 "t,dT,dTaumin,CFL,nFix {termGreen}[{tSimu:.3e},{curDtImplicit:.3e},{curDtMin:.3e},{CFLNow:.3e},[alphaInc({nLimInc},{alphaMinInc}), betaRec({nLimBeta},{minBeta}), alphaRes({nLimAlpha},{minAlpha})]]{termReset} ",
319 "Time[{telapsed:.3f}] recTime[{trec:.3f}] rhsTime[{trhs:.3f}] commTime[{tcomm:.3f}] limTime[{tLim:.3f}] limTimeA[{tLimiterA:.3f}] limTimeB[{tLimiterB:.3f}]"};
321 "\t Internal === Step [{step:4d},{iStep:2d},{iter:4d}] ",
322 "res {termRed}{resRel:.3e}{termReset} ",
323 "t,dT,dTaumin,CFL,nFix {termGreen}[{tSimu:.3e},{curDtImplicit:.3e},{curDtMin:.3e},{CFLNow:.3e},[alphaInc({nLimInc},{alphaMinInc:.3g}), betaRec({nLimBeta},{minBeta:.3g}), alphaRes({nLimAlpha},{minAlpha:.3g})]]{termReset} ",
324 "Time[{telapsedM:.3f}] recTime[{trecM:.3f}] rhsTime[{trhsM:.3f}] commTime[{tcommM:.3f}] limTime[{tLimM:.3f}] limTimeA[{tLimiterA:.3f}] limTimeB[{tLimiterB:.3f}]"};
326 "step",
"iStep",
"iterAll",
"iter",
"tSimu",
327 "res",
"curDtImplicit",
"curDtMin",
"CFLNow",
328 "nLimInc",
"alphaMinInc",
329 "nLimBeta",
"minBeta",
330 "nLimAlpha",
"minAlpha",
331 "tWall",
"telapsed",
"trec",
"trhs",
"tcomm",
"tLim",
"tLimiterA",
"tLimiterB",
332 "fluxWall",
"CL",
"CD",
"AoA"};
499 std::string
meshFile =
"data/mesh/NACA0012_WIDE_H3.cgns";
599 config.field_section(&T::restartWriter,
"restartWriter",
"Restart file serializer settings");
600 config.field_section(&T::meshPartitionedWriter,
"meshPartitionedWriter",
"Partitioned mesh serializer settings");
782 config.template field_map_of<CoarseGridLinearSolverControl>(
783 &T::coarseGridLinearSolverControlList,
784 "coarseGridLinearSolverControlList",
785 "Per-level coarse grid linear solver settings");
786 config.field_section(&T::directPrecControl,
"directPrecControl",
787 "Direct preconditioner settings");
854 config.field_section(&T::recMatrixWriter,
"recMatrixWriter",
855 "Serializer for reconstruction matrix output");
862 nlohmann::ordered_json
bcSettings = nlohmann::ordered_json::array();
868 config.field_section(&T::timeMarchControl,
"timeMarchControl",
"Time marching settings");
869 config.field_section(&T::implicitReconstructionControl,
"implicitReconstructionControl",
"Implicit reconstruction settings");
870 config.field_section(&T::outputControl,
"outputControl",
"Output settings");
871 config.field_section(&T::implicitCFLControl,
"implicitCFLControl",
"Implicit CFL settings");
872 config.field_section(&T::convergenceControl,
"convergenceControl",
"Convergence monitoring settings");
873 config.field_section(&T::dataIOControl,
"dataIOControl",
"Data I/O and restart settings");
874 config.field_section(&T::boundaryDefinition,
"boundaryDefinition",
"Periodic boundary geometry");
875 config.field_section(&T::limiterControl,
"limiterControl",
"Slope limiter settings");
876 config.field_section(&T::linearSolverControl,
"linearSolverControl",
"Linear solver settings");
877 config.field_section(&T::timeAverageControl,
"timeAverageControl",
"Time averaging settings");
878 config.field_section(&T::others,
"others",
"Miscellaneous settings");
879 config.field_section(&T::restartState,
"restartState",
"Restart checkpoint state");
880 config.field_section(&T::eulerSettings,
"eulerSettings",
"Euler evaluator physics settings");
881 config.field_section(&T::vfvSettings,
"vfvSettings",
"Variational reconstruction settings");
882 config.field_json_schema(&T::bcSettings,
"bcSettings",
883 "Boundary condition settings (per-BC array)",
887 config.check(
"bcSettings must be a JSON array", [](
const T &s)
889 return s.bcSettings.is_array();
935 DNDS_assert_info(nVars == getNVars(model),
"do not change the nVars for this model");
937 nOUTSPoint = nVars + 2;
938 nOUTSBnd = nVars + 2 + nVars + 3 + 1 + 3;
950 for (
auto &f : outFuture)
951 if (f.valid() && f.wait_for(std::chrono::microseconds(10)) != std::future_status::ready)
953 for (
auto &f : outBndFuture)
954 if (f.valid() && f.wait_for(std::chrono::microseconds(10)) != std::future_status::ready)
956 if (outSeqFuture.valid() && outSeqFuture.wait_for(std::chrono::microseconds(10)) != std::future_status::ready)
975 void ConfigureFromJson(
const std::string &jsonName,
bool read =
false,
const std::string &jsonMergeName =
"",
976 const std::vector<std::string> &overwriteKeys = {},
const std::vector<std::string> &overwriteValues = {})
980 auto fIn = std::ifstream(jsonName);
982 gSetting = nlohmann::ordered_json::parse(fIn,
nullptr,
true,
true);
984 if (read && !jsonMergeName.empty())
986 fIn = std::ifstream(jsonMergeName);
988 auto gSettingAdd = nlohmann::ordered_json::parse(fIn,
nullptr,
true,
true);
991 DNDS_assert(overwriteKeys.size() == overwriteValues.size());
992 for (
size_t i = 0;
i < overwriteKeys.size();
i++)
995 auto key = nlohmann::ordered_json::json_pointer(overwriteKeys[
i].c_str());
998 std::string valString =
1002 overwriteValues[i]);
1003 auto valDoc = nlohmann::ordered_json::parse(valString,
nullptr,
true,
true);
1005 log() <<
"JSON: overwrite key: " << key << std::endl
1006 <<
"JSON: overwrite val: " << valDoc[
"__val_entry"] << std::endl;
1007 gSetting[key] = valDoc[
"__val_entry"];
1009 catch (
const nlohmann::ordered_json::parse_error &e)
1013 std::string valString =
1017 overwriteValues[i]);
1018 auto valDoc = nlohmann::ordered_json::parse(valString,
nullptr,
true,
true);
1020 log() <<
"JSON: overwrite key: " << key << std::endl
1021 <<
"JSON: overwrite val: " << valDoc[
"__val_entry"] << std::endl;
1022 gSetting[key] = valDoc[
"__val_entry"];
1024 catch (
const std::exception &e)
1026 std::cerr << e.what() <<
"\n";
1027 std::cerr << overwriteValues[
i] <<
"\n";
1031 catch (
const std::exception &e)
1033 std::cerr << e.what() <<
"\n";
1034 std::cerr << overwriteValues[
i] <<
"\n";
1040 pBCHandler = std::make_shared<BoundaryHandler<model>>(nVars);
1042 gSetting[
"bcSettings"] = *pBCHandler;
1045 log() <<
"JSON: read value:" << std::endl
1046 << std::setw(4) <<
gSetting << std::endl;
1050 gSetting = nlohmann::ordered_json::object();
1053 gSetting[
"bcSettings"] = *pBCHandler;
1056 std::filesystem::path outFile{jsonName};
1057 std::filesystem::create_directories(outFile.parent_path() /
".");
1058 auto fIn = std::ofstream(jsonName);
1066 log() <<
"JSON: Parse " << (read ?
"read" :
"write")
1067 <<
" Done ===" << std::endl;
1111 std::filesystem::path outFile{logConfigFileName};
1112 std::filesystem::create_directories(outFile.parent_path() /
".");
1113 std::ofstream logConfig(logConfigFileName);
1115 gSetting[
"___Compile_Time_Defines"] = DNDS_Defines_state;
1116 gSetting[
"___Runtime_PartitionNumber"] = mpi.size;
1128 logConfig << std::setw(4) <<
gSetting;
1165 void PrintData(
const std::string &fname,
const std::string &fnameSeries,
1173 auto cwd = serializerP->GetCurrentPath();
1174 serializerP->CreatePath(name);
1175 serializerP->GoToPath(name);
1179 serializerP->GoToPath(cwd);
1181 nlohmann::ordered_json configJson;
1183 serializerP->WriteString(
"lastConfig", configJson.dump());
1187 serializerP->WriteInt(
"hasReconstructionValue", 1);
1191 serializerP->WriteInt(
"hasReconstructionValue", 0);
1195 template <
class TVal>
1196 std::enable_if_t<std::is_arithmetic_v<std::remove_reference_t<TVal>>>
1203 template <
class TVal>
1204 std::enable_if_t<!std::is_arithmetic_v<std::remove_reference_t<TVal>>>
1215 if (name ==
"res" || name ==
"fluxWall")
1216 for (
int i = 0;
i < nVars;
i++)
1217 v_map[name + std::to_string(
i)] = val[
i];
1228 initVec.setZero(nVars);
1229 std::vector<std::string> realNames;
1231 if (name ==
"res" || name ==
"fluxWall")
1234 for (
int i = 0;
i < nVars;
i++)
1235 realNames.push_back(name + std::to_string(
i));
1238 FillLogValue(v_map, name, 0.), realNames.push_back(name);
1246 return std::make_tuple(std::make_unique<DNDS::CsvLog>(
1326#define DNDS_EULERSOLVER_RUNNINGENV_GET_REF(name) auto &name = runningEnvironment.name
1328#define DNDS_EULERSOLVER_RUNNINGENV_GET_REF_LIST \
1329 auto &eval = *runningEnvironment.pEval; \
1330 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(logErr); \
1331 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(ode); \
1332 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(gmres); \
1333 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(gmresRec); \
1334 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(pcgRec); \
1335 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(pcgRec1); \
1336 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(tstart); \
1337 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(tstartInternal); \
1338 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(tInternalStats); \
1339 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(stepCount); \
1340 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(resBaseC); \
1341 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(resBaseCInternal); \
1342 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(tSimu); \
1343 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(tAverage); \
1344 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextTout); \
1345 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepOut); \
1346 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepOutC); \
1347 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepRestart); \
1348 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepRestartC); \
1349 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepOutAverage); \
1350 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nextStepOutAverageC); \
1352 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(CFLNow); \
1353 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(ifOutT); \
1354 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(curDtMin); \
1355 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(curDtImplicit); \
1356 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(curDtImplicitHistory); \
1357 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(step); \
1358 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(iterAll); \
1359 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(gradIsZero); \
1361 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nLimBeta); \
1362 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nLimAlpha); \
1363 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(minAlpha); \
1364 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(minBeta); \
1365 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(nLimInc); \
1366 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(alphaMinInc); \
1368 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(dtIncreaseCounter); \
1370 DNDS_EULERSOLVER_RUNNINGENV_GET_REF(addOutList);
1430#define DNDS_EULERSOLVER_INS_EXTERN(model, ext) \
1431 namespace DNDS::Euler \
1433 ext template void EulerSolver<model>::RunImplicitEuler(); \
1434 ext template void EulerSolver<model>::InitializeRunningEnvironment( \
1435 EulerSolver<model>::RunningEnvironment &env); \
1446#define DNDS_EULERSOLVER_PRINTDATA_INS_EXTERN(model, ext) \
1447 namespace DNDS::Euler \
1449 ext template void EulerSolver<model>::PrintData( \
1450 const std::string &fname, const std::string &fnameSeries, \
1451 const tCellScalarFGet &odeResidualF, \
1452 tAdditionalCellScalarList &additionalCellScalars, \
1453 TEval &eval, real tSimu, \
1454 PrintDataMode mode); \
1455 ext template void EulerSolver<model>::PrintRestart( \
1456 std::string fname); \
1457 ext template void EulerSolver<model>::ReadRestart( \
1458 std::string fname); \
1459 ext template void EulerSolver<model>::ReadRestartOtherSolver( \
1460 std::string fname, const std::vector<int> &dimStore); \
1471#define DNDS_EULERSOLVER_INIT_INS_EXTERN(model, ext) \
1472 namespace DNDS::Euler \
1474 ext template void EulerSolver<model>::ReadMeshAndInitialize(); \
1475 ext template bool EulerSolver<model>::functor_fstop( \
1476 int iter, ArrayDOFV<nVarsFixed> &cres, int iStep, RunningEnvironment &env); \
1477 ext template bool EulerSolver<model>::functor_fmainloop( \
1478 RunningEnvironment &env); \
pybind11-style configuration registration with macro-based field declaration and namespace-scoped tag...
#define DNDS_FIELD(name_, desc_,...)
Register a field inside a DNDS_DECLARE_CONFIG body.
Streaming CSV writer with auto-rotation and a dual int-or-double value type.
#define DNDS_assert_info(expr, info)
Debug-only assertion with an extra std::string info message.
#define DNDS_assert(expr)
Debug-only assertion (compiled out when DNDS_NDEBUG is defined). Prints the expression + file/line + ...
Boundary condition types, handlers, integration recorders, and 1-D profile utilities for the compress...
Core finite-volume evaluator for compressible Navier-Stokes / Euler equations.
#define DNDS_EULERSOLVER_INIT_INS_EXTERN(model, ext)
#define DNDS_EULERSOLVER_PRINTDATA_INS_EXTERN(model, ext)
#define DNDS_EULERSOLVER_INS_EXTERN(model, ext)
Ideal-gas Riemann solvers, flux functions, and thermodynamic utilities for the compressible Euler / N...
JSON-to-Eigen conversion utilities and nlohmann_json helper macros.
Pre-allocated object pool with RAII checkout/return semantics.
Configurable factory that builds either a SerializerJSON or a SerializerH5 with all tunables exposed ...
The VR class that provides any information needed in high-order CFV.
MPI-parallel distributed array of per-cell Degrees-of-Freedom (conservative variable vectors).
MPI-parallel distributed array of per-cell reconstruction coefficient matrices.
Per-zone boundary condition handler for Euler/Navier-Stokes solvers.
Core finite-volume evaluator for compressible Navier-Stokes / Euler equations.
static const int nVarsFixed
Number of conserved variables (compile-time fixed).
static const auto I4
Index of the energy equation (= dim+1).
ssp< CFV::VariationalReconstruction< gDim > > TpVFV
Shared pointer to the variational reconstruction object.
static const int gDim
Geometric dimension of the mesh.
static const int dim
Spatial dimension (2 or 3).
Top-level solver orchestrator for compressible Navier-Stokes / Euler equations.
void PrintData(const std::string &fname, const std::string &fnameSeries, const tCellScalarFGet &odeResidualF, tAdditionalCellScalarList &additionalCellScalars, TEval &eval, real TSimu=-1.0, PrintDataMode mode=PrintDataLatest)
Write solution data to VTK/HDF5/Tecplot output files.
auto & getU()
Get mutable reference to the DOF array.
TEval::TRec TRec
Reconstruction coefficient array type.
void ReadRestartOtherSolver(std::string fname, const std::vector< int > &dimStore)
Read a restart file from a different solver/model, remapping variable dimensions.
TEval::TVFV TVFV
Variational reconstruction type.
void WriteSerializer(Serializer::SerializerBaseSSP serializerP, const std::string &name)
Serialize the solution to a SerializerBase (currently unused standalone path).
void RunImplicitEuler()
Run the main implicit time-marching loop.
void ReadMeshAndInitialize()
Read the mesh and initialize the full solver pipeline.
TEval::TDiffU TDiffU
Gradient of conserved variables type.
EulerSolver(const MPIInfo &nmpi, int n_nVars=getNVars(model))
Construct an EulerSolver with MPI communicator information.
bool functor_fstop(int iter, ArrayDOFV< nVarsFixed > &cres, int iStep, RunningEnvironment &env)
Convergence/termination check functor called after each inner iteration.
void solveLinear(real alphaDiag, real t, TDof &cres, TDof &cx, TDof &cxInc, TRec &uRecC, TRec uRecIncC, JacobianDiagBlock< nVarsFixed > &JDC, tGMRES_u &gmres, int gridLevel)
Solve the implicit linear system at a given grid level.
static const int gDim
Geometric dimension of the mesh.
auto & getConfiguration()
Get mutable reference to the configuration.
auto & getAlphaPP()
Get mutable reference to the PP alpha array.
auto & getURecNew()
Get mutable reference to the new reconstruction array.
std::enable_if_t<!std::is_arithmetic_v< std::remove_reference_t< TVal > > > FillLogValue(tLogSimpleDIValueMap &v_map, const std::string &name, TVal &&val)
Fill a log value map entry for non-arithmetic types (vectors → per-component entries).
auto & getBCHandler()
Get mutable reference to the BC handler.
void InitializeRunningEnvironment(RunningEnvironment &env)
Populate a RunningEnvironment with allocated solvers, loggers, and initial state.
TEval::TVec TVec
Spatial vector type.
TEval::TpVFV TpVFV
Shared pointer to VFV type.
TEval::TU TU
Conservative variable vector type.
TEval::TScalar TScalar
Scalar reconstruction coefficient array type.
auto getMesh() const
Get shared pointer to the mesh.
auto & getEval()
Get mutable reference to the evaluator.
void doPrecondition(real alphaDiag, real t, TDof &crhs, TDof &cx, TDof &cxInc, TDof &uTemp, JacobianDiagBlock< nVarsFixed > &JDC, TU &sgsRes, bool &inputIsZero, bool &hasLUDone, int gridLevel)
Apply the preconditioner (SGS sweeps or ILU) to a right-hand side vector.
auto & getBetaPP()
Get mutable reference to the PP beta array.
auto & getDTauTmp()
Get mutable reference to the dTau temporary.
auto & getURec()
Get mutable reference to the reconstruction array.
void ReadRestart(std::string fname)
Read a restart file and populate u (and optionally uRec) from it.
EulerEvaluator< model > TEval
Evaluator type for this model.
~EulerSolver()
Destructor. Waits for all async output futures to complete.
struct DNDS::Euler::EulerSolver::Configuration config
TEval::TJacobianU TJacobianU
Flux Jacobian matrix type.
bool functor_fmainloop(RunningEnvironment &env)
Main outer-loop functor: performs one full time step (reconstruction, RHS, linear solve,...
nlohmann::ordered_json gSetting
Full JSON configuration (read from file, may be modified at runtime).
void PrintConfig(bool updateCommit=false)
Write the current configuration to a JSON log file.
std::enable_if_t< std::is_arithmetic_v< std::remove_reference_t< TVal > > > FillLogValue(tLogSimpleDIValueMap &v_map, const std::string &name, TVal &&val)
Fill a log value map entry for arithmetic types (scalars).
TEval::TMat TMat
Spatial matrix type.
auto & getURecLimited()
Get mutable reference to the limited reconstruction array.
static const int dim
Spatial dimension (2 or 3).
void ConfigureFromJson(const std::string &jsonName, bool read=false, const std::string &jsonMergeName="", const std::vector< std::string > &overwriteKeys={}, const std::vector< std::string > &overwriteValues={})
Load or write solver configuration from/to a JSON file.
auto getMPI() const
Get MPI communicator info.
std::string output_stamp
Unique stamp appended to output filenames for this run.
std::tuple< std::unique_ptr< CsvLog >, tLogSimpleDIValueMap > LogErrInitialize()
Initialize the CSV error logger and value map for convergence monitoring.
static const int nVarsFixed
Compile-time number of conserved variables.
static const int I4
Energy equation index (= dim + 1).
tCellScalarList tAdditionalCellScalarList
Type alias for additional output scalar list.
TEval::TDof TDof
Cell-centered DOF array type.
PrintDataMode
Output mode selector for PrintData.
@ PrintDataTimeAverage
Output the time-averaged solution.
@ PrintDataLatest
Output the current (latest) solution.
void PrintRestart(std::string fname)
Write the current solution state to a restart file.
auto & getJSource()
Get mutable reference to the source Jacobian.
auto & getIfUseLimiter()
Get mutable reference to the limiter flag array.
auto getVFV() const
Get shared pointer to the VFV reconstruction.
Per-cell diagonal or block-diagonal Jacobian storage for implicit time stepping.
Generic object pool: caches unique_ptr<T> instances and hands them out with RAII return-on-destructio...
DNDS::ArrayPair< DNDS::ArrayEigenVector< 1 > > tScalarPair
EnumValuesTag enum_values(std::vector< std::string > vals)
Create an enum allowed-values tag.
RangeTag range(double min)
Create a minimum-only range constraint.
std::vector< std::tuple< std::string, const tCellScalarFGet > > tCellScalarList
List of (field_name, getter_function) pairs for cell-scalar output.
std::function< real(index)> tCellScalarFGet
Function type returning a scalar value for a given cell index [0, NumCell).
nlohmann::ordered_json bcSettingsSchema()
Build a JSON Schema (draft-07) for the bcSettings array.
MPI_int Barrier(MPI_Comm comm)
Wrapper over MPI_Barrier.
ssp< SerializerBase > SerializerBaseSSP
std::map< std::string, LogSimpleDIValue > tLogSimpleDIValueMap
Convenience alias: the title -> value map type passed to CsvLog::WriteLine.
DNDS_CONSTANT const rowsize DynamicSize
Template parameter flag: "row width is set at runtime but uniform".
void from_json(const nlohmann::ordered_json &j, host_device_vector< real > &v)
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
std::shared_ptr< T > ssp
Shortened alias for std::shared_ptr used pervasively in DNDSR.
double real
Canonical floating-point scalar used throughout DNDSR (double precision).
std::ostream & log()
Return the current DNDSR log stream (either std::cout or the installed file).
void to_json(nlohmann::ordered_json &j, const host_device_vector< real > &v)
DNDS_CONSTANT const real veryLargeReal
Catch-all upper bound ("practically infinity") for physical scalars.
std::string GetSetVersionName(const std::string &ver)
Read/set the build version string accessible from code.
void WriteSerialize(Serializer::SerializerBaseSSP serializerP, const std::string &name, bool includePIG=true, bool includeSon=true)
Writes the ArrayPair (father, optional son, optional ghost mapping).
A means to translate nlohmann json into c++ primitive data types and back; and stores then during com...
Master configuration struct for the compressible Euler/Navier-Stokes evaluator.
Periodic boundary geometry definitions.
Eigen::Vector< real, -1 > PeriodicTranslation2
Eigen::Vector< real, -1 > PeriodicRotationCent3
Eigen::Vector< real, -1 > PeriodicRotationEulerAngles3
Eigen::Vector< real, -1 > PeriodicRotationEulerAngles2
Eigen::Vector< real, -1 > PeriodicRotationEulerAngles1
Eigen::Vector< real, -1 > PeriodicTranslation1
DNDS_DECLARE_CONFIG(BoundaryDefinition)
Eigen::Vector< real, -1 > PeriodicRotationCent2
Eigen::Vector< real, -1 > PeriodicRotationCent1
Eigen::Vector< real, -1 > PeriodicTranslation3
Convergence monitoring parameters.
real rhsThresholdInternal
DNDS_DECLARE_CONFIG(ConvergenceControl)
Data I/O control parameters.
real meshElevationRBFRadius
std::string vtuFloatEncodeMode
real meshElevationRefDWall
std::string meshPartitionedReaderType
int meshElevationInternalSmoother
std::string outRestartName
real meshElevationRBFPower
real rectifyNearPlaneThres
real meshElevationMaxIncludedAngle
Geom::UnstructuredMesh::WallDistOptions meshWallDistOptions
DNDS_DECLARE_CONFIG(DataIOControl)
Serializer::SerializerFactory meshPartitionedWriter
Geom::RBF::RBFKernelType meshElevationRBFKernel
Geom::UnstructuredMeshSerialRW::PartitionOptions meshPartitionOptions
std::vector< std::string > outCellScalarNames
const std::string & getOutLogName()
Serializer::SerializerFactory restartWriter
const std::string & getOutRestartName()
int meshElevationBoundaryMode
Implicit CFL number control parameters.
DNDS_DECLARE_CONFIG(ImplicitCFLControl)
Implicit reconstruction control parameters.
int nRecMultiplyForZeroedGrad
int zeroRecForStepsInternal
DNDS_DECLARE_CONFIG(ImplicitReconstructionControl)
Slope limiter control parameters.
bool ppRecLimiterCompressToMean
int smoothIndicatorProcedure
int nPartialLimiterStartLocal
DNDS_DECLARE_CONFIG(LimiterControl)
int centralSmoothInputResidual
DNDS_DECLARE_CONFIG(CoarseGridLinearSolverControl)
Linear solver control parameters.
DNDS_DECLARE_CONFIG(LinearSolverControl)
int multiGridLPInnerNIter
Direct::DirectPrecControl directPrecControl
std::map< std::string, CoarseGridLinearSolverControl > coarseGridLinearSolverControlList
Miscellaneous solver options (axisymmetric mode, passive scalar freezing, rec matrix output).
Serializer::SerializerFactory recMatrixWriter
DNDS_DECLARE_CONFIG(Others)
Output control parameters.
std::vector< std::string > logfileOutputTitles
std::vector< std::string > consoleMainOutputFormat
int consoleOutputEveryFix
std::vector< std::string > consoleMainOutputFormatInternal
DNDS_DECLARE_CONFIG(OutputControl)
int nConsoleCheckInternal
Restart checkpoint state.
std::string lastRestartFile
DNDS_DECLARE_CONFIG(RestartState)
std::vector< int > otherRestartStoreDim
std::string otherRestartFile
Time-averaging control for unsteady simulations.
DNDS_DECLARE_CONFIG(TimeAverageControl)
Time marching control parameters.
bool timeMarchIsTwoStage()
DNDS_DECLARE_CONFIG(TimeMarchControl)
nlohmann::ordered_json odeSettingsExtra
Complete solver configuration, serializable to/from JSON.
CFV::VRSettings vfvSettings
Variational reconstruction settings.
struct DNDS::Euler::EulerSolver::Configuration::DataIOControl dataIOControl
struct DNDS::Euler::EulerSolver::Configuration::ImplicitReconstructionControl implicitReconstructionControl
std::map< std::string, std::string > bcNameMapping
Mapping from mesh BC names to solver BC type names.
EulerEvaluatorSettings< model > eulerSettings
Physics settings passed to the EulerEvaluator.
struct DNDS::Euler::EulerSolver::Configuration::TimeAverageControl timeAverageControl
struct DNDS::Euler::EulerSolver::Configuration::Others others
void ReadWriteJson(nlohmann::ordered_json &jsonObj, int nVars, bool read)
Backward-compatible bidirectional JSON read/write.
struct DNDS::Euler::EulerSolver::Configuration::LinearSolverControl linearSolverControl
struct DNDS::Euler::EulerSolver::Configuration::TimeMarchControl timeMarchControl
struct DNDS::Euler::EulerSolver::Configuration::LimiterControl limiterControl
struct DNDS::Euler::EulerSolver::Configuration::BoundaryDefinition boundaryDefinition
DNDS_DECLARE_CONFIG(Configuration)
struct DNDS::Euler::EulerSolver::Configuration::RestartState restartState
struct DNDS::Euler::EulerSolver::Configuration::ConvergenceControl convergenceControl
struct DNDS::Euler::EulerSolver::Configuration::OutputControl outputControl
nlohmann::ordered_json bcSettings
Boundary condition definitions (JSON array).
struct DNDS::Euler::EulerSolver::Configuration::ImplicitCFLControl implicitCFLControl
Mutable state bundle for the time-marching loop.
std::unique_ptr< tPCG_uRec > pcgRec
tAdditionalCellScalarList addOutList
std::tuple< std::unique_ptr< CsvLog >, tLogSimpleDIValueMap > logErr
std::unique_ptr< tPCG_uRec > pcgRec1
ssp< ODE::ImplicitDualTimeStep< ArrayDOFV< nVarsFixed >, ArrayDOFV< 1 > > > ode
Eigen::VectorFMTSafe< real, -1 > resBaseC
ssp< EulerEvaluator< model > > pEval
Eigen::VectorFMTSafe< real, -1 > resBaseCInternal
std::unique_ptr< tGMRES_uRec > gmresRec
std::vector< real > curDtImplicitHistory
std::map< std::string, ScalarStatistics > tInternalStats
std::unique_ptr< tGMRES_u > gmres
Lightweight bundle of an MPI communicator and the calling rank's coordinates.
Config-backed factory selecting between JSON and HDF5 serializers.
Eigen::Matrix wrapper that hides begin/end from fmt.