DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
FiniteVolumeSettings.hpp
Go to the documentation of this file.
1#pragma once
2
3// #ifndef __DNDS_REALLY_COMPILING__
4// #define __DNDS_REALLY_COMPILING__
5// #define __DNDS_REALLY_COMPILING__HEADER_ON__
6// #endif
7#include "DNDS/Defines.hpp"
10// #ifdef __DNDS_REALLY_COMPILING__HEADER_ON__
11// #undef __DNDS_REALLY_COMPILING__
12// #endif
13
14namespace DNDS::CFV
15{
16 /**
17 * @brief
18 * A means to translate nlohmann json into c++ primitive data types and back;
19 * and stores then during computation.
20 *
21 */
23 {
24 using json = nlohmann::ordered_json;
25
26 int maxOrder{1}; /// @brief polynomial degree of reconstruction
27 int intOrder{1}; /// @brief integration degree globally set @note this is actually reduced somewhat
29
31
32 // VRSettings()
33 // {
34 // }
35
37
42
44 {
45 // clang-format off
46 DNDS_FIELD(maxOrder, "Polynomial degree of reconstruction",
48 DNDS_FIELD(intOrder, "Global integration degree",
50 DNDS_FIELD(ignoreMeshGeometryDeficiency, "Ignore mesh geometry deficiency warnings");
51 DNDS_FIELD(nIterCellSmoothScale, "Cell smooth scale iterations",
53 // clang-format on
54 }
55
56 /// @brief Backward-compatible write (used by Python bindings and VRSettings).
57 DNDS_HOST void WriteIntoJson(json &jsonSetting) const
58 {
59 to_json(jsonSetting, *this);
60 }
61
62 /// @brief Backward-compatible read (used by Python bindings and VRSettings).
63 DNDS_HOST void ParseFromJson(const json &jsonSetting)
64 {
65 from_json(jsonSetting, *this);
66 }
67 };
68}
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.
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
#define DNDS_DEVICE_CALLABLE
Definition Defines.hpp:76
#define DNDS_HOST
Definition Defines.hpp:78
#define DNDS_DEVICE_TRIVIAL_COPY_DEFINE_NO_EMPTY_CTOR(T, T_Self)
Definition Defines.hpp:95
JSON-to-Eigen conversion utilities and nlohmann_json helper macros.
RangeTag range(double min)
Create a minimum-only range constraint.
void from_json(const nlohmann::ordered_json &j, host_device_vector< real > &v)
Definition JsonUtil.hpp:183
void to_json(nlohmann::ordered_json &j, const host_device_vector< real > &v)
Definition JsonUtil.hpp:177
A means to translate nlohmann json into c++ primitive data types and back; and stores then during com...
DNDS_HOST void WriteIntoJson(json &jsonSetting) const
Backward-compatible write (used by Python bindings and VRSettings).
int intOrder
polynomial degree of reconstruction
bool ignoreMeshGeometryDeficiency
integration degree globally set
DNDS_HOST void ParseFromJson(const json &jsonSetting)
Backward-compatible read (used by Python bindings and VRSettings).