DNDSR 0.1.0.dev1+gcd065ad
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"
8#include "DNDS/JsonUtil.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 DNDS_FIELD(maxOrder, "Polynomial degree of reconstruction",
47 DNDS_FIELD(intOrder, "Global integration degree",
49 DNDS_FIELD(ignoreMeshGeometryDeficiency, "Ignore mesh geometry deficiency warnings");
50 DNDS_FIELD(nIterCellSmoothScale, "Cell smooth scale iterations",
52 }
53
54 /// @brief Backward-compatible write (used by Python bindings and VRSettings).
55 DNDS_HOST void WriteIntoJson(json &jsonSetting) const
56 {
57 to_json(jsonSetting, *this);
58 }
59
60 /// @brief Backward-compatible read (used by Python bindings and VRSettings).
61 DNDS_HOST void ParseFromJson(const json &jsonSetting)
62 {
63 from_json(jsonSetting, *this);
64 }
65 };
66}
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:91
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).