SPH
Settings.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "objects/Exceptions.h"
13 #include "objects/wrappers/Flags.h"
17 #include <typeinfo>
18 
20 
21 class Path;
22 
23 template <typename TEnum>
24 class Settings;
25 
26 template <typename TEnum>
27 class SettingsIterator;
28 
30 struct EmptySettingsTag {};
31 
33 
37 struct EnumWrapper {
38  int value;
39 
41 
42  EnumWrapper() = default;
43 
44  template <typename TEnum>
45  explicit EnumWrapper(TEnum e)
46  : value(int(e))
47  , index(typeid(TEnum)) {
48  static_assert(std::is_enum<TEnum>::value, "Can be used only for enums");
49  }
50 
51  EnumWrapper(const int value, const EnumIndex& index)
52  : value(value)
53  , index(index) {}
54 
55  explicit operator int() const {
56  return value;
57  }
58 
59  template <typename T, typename = std::enable_if_t<std::is_enum<T>::value>>
60  explicit operator T() const {
61  SPH_ASSERT(std::type_index(typeid(T)) == index);
62  return T(value);
63  }
64 
65  bool operator==(const EnumWrapper& other) const {
66  return value == other.value && index == other.index;
67  }
68 
69  friend std::ostream& operator<<(std::ostream& ofs, const EnumWrapper& e) {
70  ofs << e.value << " (" << (e.index ? e.index->hash_code() : 0) << ")";
71  return ofs;
72  }
73 };
74 
77 public:
78  template <typename TEnum>
79  explicit InvalidSettingsAccess(const TEnum key)
80  : Exception("Error accessing parameter '" +
81  Settings<TEnum>::getEntryName(key).valueOr("unknown parameter") + "'") {
82  static_assert(std::is_enum<TEnum>::value, "InvalidSettingsAccess can only be used with enums");
83  }
84 };
85 
86 template <typename TEnum>
87 INLINE void checkSettingsAccess(const bool result, const TEnum key) {
88  if (!result) {
89  throw InvalidSettingsAccess(key);
90  }
91 }
92 
107 template <typename TEnum>
108 class Settings {
109  template <typename>
110  friend class SettingsIterator;
111 
112 private:
114  enum Types {
115  BOOL,
116  INT,
117  FLOAT,
118  INTERVAL,
119  STRING,
120  VECTOR,
123  ENUM,
124  };
125 
134  using Value = Variant<bool,
135  int,
136  Float,
137  Interval,
138  std::string,
139  Vector,
142  EnumWrapper>;
143 
144  struct Entry {
146  TEnum id;
147 
149  std::string name;
150 
152  Value value;
153 
155  std::string desc;
156 
157  Entry() = default;
158 
159  Entry(TEnum id, const std::string& name, const Value& value, const std::string& desc = "")
160  : id(id)
161  , name(name)
162  , value(value)
163  , desc(desc) {}
164 
165  template <typename T, typename = std::enable_if_t<std::is_enum<T>::value>>
166  Entry(TEnum id, const std::string& name, const T& value, const std::string& desc = "")
167  : id(id)
168  , name(name)
169  , value(EnumWrapper(value))
170  , desc(desc) {}
171 
172  template <typename T>
173  Entry(TEnum id, const std::string& name, Flags<T> flags, const std::string& desc = "")
174  : id(id)
175  , name(name)
176  , value(EnumWrapper(T(flags.value())))
177  , desc(desc) {}
178 
179  template <typename T>
180  INLINE bool hasType(std::enable_if_t<!std::is_enum<T>::value, int> = 0) const {
181  return value.has<T>();
182  }
183 
184  template <typename T>
185  INLINE bool hasType(std::enable_if_t<std::is_enum<T>::value, int> = 0) const {
186  return value.has<EnumWrapper>() && value.get<EnumWrapper>().index == std::type_index(typeid(T));
187  }
188  };
189 
190  FlatMap<TEnum, Entry> entries;
191 
192  static AutoPtr<Settings> instance;
193 
195  Settings(std::initializer_list<Entry> list);
196 
197 public:
199  Settings();
200 
203 
204  Settings(const Settings& other);
205 
206  Settings(Settings&& other);
207 
209  Settings& operator=(std::initializer_list<Entry> list);
210 
211  Settings& operator=(const Settings& other);
212 
213  Settings& operator=(Settings&& other);
214 
225  template <typename TValue>
226  Settings& set(const TEnum idx,
227  TValue&& value,
228  std::enable_if_t<!std::is_enum<std::decay_t<TValue>>::value, int> = 0) {
229  Optional<Entry&> entry = entries.tryGet(idx);
230  if (!entry) {
231  Entry& newEntry = entries.insert(idx, Entry{});
232  newEntry.value = std::forward<TValue>(value);
233  } else {
234  checkSettingsAccess(entry->template hasType<std::decay_t<TValue>>(), idx);
235  entry->value = std::forward<TValue>(value);
236  }
237  return *this;
238  }
239 
241  template <typename TValue>
242  Settings& set(const TEnum idx,
243  TValue&& value,
244  std::enable_if_t<std::is_enum<std::decay_t<TValue>>::value, int> = 0) {
245  Optional<Entry&> entry = entries.tryGet(idx);
246  if (!entry) {
247  Entry& newEntry = entries.insert(idx, Entry{});
248  newEntry.value = EnumWrapper(value);
249  } else {
250  checkSettingsAccess(entry->template hasType<std::decay_t<TValue>>(), idx);
251  entry->value = EnumWrapper(value);
252  }
253  return *this;
254  }
255 
261  template <typename TValue, typename = std::enable_if_t<std::is_enum<TValue>::value>>
262  Settings& set(const TEnum idx, const Flags<TValue> flags) {
263  return this->set(idx, EnumWrapper(TValue(flags.value())));
264  }
265 
271  Settings& set(const TEnum idx, EmptyFlags) {
272  Optional<Entry&> entry = entries.tryGet(idx);
273  checkSettingsAccess(entry && entry->value.template has<EnumWrapper>(), idx);
274  entry->value.template get<EnumWrapper>().value = 0;
275  return *this;
276  }
277 
283  Settings& set(const TEnum idx, const EnumWrapper ew) {
284  Optional<Entry&> entry = entries.tryGet(idx);
285  if (entry) {
286  Optional<EnumWrapper> current = entry->value.template tryGet<EnumWrapper>();
287  checkSettingsAccess(current && current->index == ew.index, idx);
288  }
289  this->set(idx, ew, 0); // zero needed to call the other overload
290  return *this;
291  }
292 
297  void addEntries(const Settings& settings) {
298  for (const typename SettingsIterator<TEnum>::IteratorValue& iv : settings) {
299  Optional<Entry&> entry = entries.tryGet(iv.id);
300  if (!entry) {
301  Entry& newEntry = entries.insert(iv.id, getDefaults().entries[iv.id]);
302  newEntry.value = iv.value;
303  } else {
304  checkSettingsAccess(entry->value.getTypeIdx() == iv.value.getTypeIdx(), iv.id);
305  entry->value = iv.value;
306  }
307  }
308  }
309 
313  void unset(const TEnum idx) {
314  entries.tryRemove(idx);
315  }
316 
325  template <typename TValue>
326  TValue get(const TEnum idx, std::enable_if_t<!std::is_enum<std::decay_t<TValue>>::value, int> = 0) const {
327  Optional<const Entry&> entry = entries.tryGet(idx);
328  checkSettingsAccess(entry && entry->value.template has<TValue>(), idx);
329 
330  return entry->value.template get<TValue>();
331  }
332 
334  template <typename TValue>
335  TValue get(const TEnum idx, std::enable_if_t<std::is_enum<std::decay_t<TValue>>::value, int> = 0) const {
336  Optional<const Entry&> entry = entries.tryGet(idx);
337  checkSettingsAccess(entry && entry->value.template has<EnumWrapper>(), idx);
338 
339  const EnumWrapper wrapper = entry->value.template get<EnumWrapper>();
340  checkSettingsAccess(wrapper.index == std::type_index(typeid(TValue)), idx);
341  return TValue(wrapper.value);
342  }
343 
347  template <typename TValue>
348  Flags<TValue> getFlags(const TEnum idx) const {
349  static_assert(std::is_enum<TValue>::value, "Can be only used for enums");
350  TValue value = this->get<TValue>(idx);
351  return Flags<TValue>::fromValue(std::underlying_type_t<TValue>(value));
352  }
353 
357  static Optional<std::string> getEntryName(const TEnum idx) {
358  const Settings& settings = getDefaults();
359  Optional<const Entry&> entry = settings.entries.tryGet(idx);
360  if (entry) {
361  return entry->name;
362  } else {
363  // idx might be invalid if loaded from older config file
364  return NOTHING;
365  }
366  }
367 
371  static Optional<int> getEntryType(const TEnum idx) {
372  const Settings& settings = getDefaults();
373  Optional<const Entry&> entry = settings.entries.tryGet(idx);
374  if (entry) {
375  return entry->value.getTypeIdx();
376  } else {
377  return NOTHING;
378  }
379  }
380 
384  static std::string typeToString(const int type);
385 
389  static Optional<std::string> getEntryDesc(const TEnum idx) {
390  const Settings& settings = getDefaults();
391  Optional<const Entry&> entry = settings.entries.tryGet(idx);
392  if (entry) {
393  return entry->desc;
394  } else {
395  // idx might be invalid if loaded from older config file
396  return NOTHING;
397  }
398  }
399 
403  static Optional<TEnum> getEntryId(const std::string& name) {
404  const Settings& settings = getDefaults();
405  for (const auto& p : settings.entries) {
406  if (p.value.name == name) {
407  return p.key;
408  }
409  }
410  return NOTHING;
411  }
412 
414  bool has(const TEnum idx) const {
415  return entries.contains(idx);
416  }
417 
421  template <typename TValue>
422  bool hasType(const TEnum idx) const {
423  Optional<const Entry&> entry = entries.tryGet(idx);
424  checkSettingsAccess(bool(entry), idx);
425  return entry->value.template has<TValue>();
426  }
427 
433  Outcome saveToFile(const Path& path) const;
434 
441  Outcome loadFromFile(const Path& path);
442 
464  bool tryLoadFileOrSaveCurrent(const Path& path, const Settings& overrides = EMPTY_SETTINGS);
465 
468 
471 
475  Size size() const;
476 
478  static const Settings& getDefaults();
479 
480 private:
481  bool setValueByType(Entry& entry, const Value& defaultValue, const std::string& str);
482 };
483 
485 template <typename TEnum>
487 private:
489 
490  ActIterator iter;
491 
492 public:
495 
496  struct IteratorValue {
498  TEnum id;
499 
502  };
503 
505  IteratorValue operator*() const;
506 
509 
511  bool operator==(const SettingsIterator& other) const;
512 
514  bool operator!=(const SettingsIterator& other) const;
515 };
516 
517 
518 enum class KernelEnum {
520  CUBIC_SPLINE,
521 
524 
526  GAUSSIAN,
527 
529  TRIANGLE,
530 
533 
536 
538  WENDLAND_C2,
539 
541  WENDLAND_C4,
542 
544  WENDLAND_C6,
545 };
546 
547 enum class TimesteppingEnum {
550 
552  LEAP_FROG,
553 
555  RUNGE_KUTTA,
556 
559 
562 
565 };
566 
569  COURANT = 1 << 1,
570 
572  DERIVATIVES = 1 << 2,
573 
575  ACCELERATION = 1 << 3,
576 
578  DIVERGENCE = 1 << 4,
579 
582 };
583 
584 enum class FinderEnum {
586  BRUTE_FORCE,
587 
589  KD_TREE,
590 
592  OCTREE,
593 
595  LINKED_LIST,
596 
598  UNIFORM_GRID,
599 
601  HASH_MAP,
602 };
603 
604 enum class BoundaryEnum {
606  NONE,
607 
610 
613 
616 
618  WIND_TUNNEL,
619 
621  PERIODIC,
622 
624  SYMMETRIC,
625 
628 
630  PROJECT_1D
631 };
632 
633 enum class DomainEnum {
635  NONE,
636 
638  SPHERICAL,
639 
641  ELLIPSOIDAL,
642 
644  BLOCK,
645 
647  CYLINDER,
648 
651 
653  HALF_SPACE,
654 };
655 
658 enum class ForceEnum {
660  PRESSURE = 1 << 0,
661 
664  SOLID_STRESS = 1 << 1,
665 
668  NAVIER_STOKES = 1 << 2,
669 
671  INTERNAL_FRICTION = 1 << 3,
672 
674  INERTIAL = 1 << 4,
675 
677  SELF_GRAVITY = 1 << 5,
678 
680  SURFACE_TENSION = 1 << 6,
681 };
682 
685  NONE,
686 
688  STANDARD,
689 
691  RIEMANN,
692 
695 };
696 
697 enum class SolverEnum {
700 
703 
706 
709 
712 
715 
719 };
720 
721 enum class ContinuityEnum {
723  STANDARD,
724 
728 
733 };
734 
735 enum class DiscretizationEnum {
737  STANDARD,
738 
740  BENZ_ASPHAUG,
741 };
742 
743 enum class YieldingEnum {
745  NONE,
746 
748  ELASTIC,
749 
751  VON_MISES,
752 
755 };
756 
757 enum class FractureEnum {
759  NONE,
760 
763 
766 };
767 
770  CONTINUITY_EQUATION = 1 << 1,
771 
774  SOUND_SPEED_ENFORCING = 1 << 2
775 };
776 
777 enum class SignalSpeedEnum {
780 
783 };
784 
785 enum class GravityEnum {
787  SPHERICAL,
788 
790  BRUTE_FORCE,
791 
793  BARNES_HUT,
794 };
795 
796 enum class GravityKernelEnum {
799 
801  SPH_KERNEL,
802 
806 };
807 
810  NONE,
811 
815 
819 
824 };
825 
826 enum class OverlapEnum {
828  NONE,
829 
831  FORCE_MERGE,
832 
834  REPEL,
835 
839 
842 
844 };
845 
846 enum class LoggerEnum {
848  NONE,
849 
851  STD_OUT,
852 
854  FILE
855 
857 };
858 
859 enum class IoEnum {
861  NONE,
862 
864  TEXT_FILE,
865 
869 
872  BINARY_FILE,
873 
877 
880  VTK_FILE,
881 
884  HDF5_FILE,
885 
887  MPCORP_FILE,
888 
891 };
892 
897 
901 Optional<IoEnum> getIoEnum(const std::string& ext);
902 
904 std::string getIoDescription(const IoEnum type);
905 
906 enum class IoCapability {
908  INPUT = 1 << 1,
909 
911  OUTPUT = 1 << 2,
912 };
913 
916 
917 
918 enum class OutputSpacing {
920  LINEAR,
921 
923  LOGARITHMIC,
924 
926  CUSTOM,
927 };
928 
929 enum class RngEnum {
931  UNIFORM,
932 
934  HALTON,
935 
938 };
939 
940 enum class UvMapEnum {
942  PLANAR,
943 
945  SPHERICAL,
946 };
947 
949 enum class RunSettingsId {
951  RUN_NAME,
952 
954  RUN_COMMENT,
955 
957  RUN_AUTHOR,
958 
960  RUN_EMAIL,
961 
964  RUN_TYPE,
965 
968 
971 
974 
977 
980 
983 
986 
989 
992 
997 
999  RUN_LOGGER,
1000 
1003 
1006 
1009 
1012 
1016 
1019  RUN_END_TIME,
1020 
1025 
1029 
1031  RUN_RNG,
1032 
1034  RUN_RNG_SEED,
1035 
1039 
1042 
1045 
1048 
1051 
1056 
1061 
1063  SPH_KERNEL,
1064 
1066  SPH_FINDER,
1067 
1070 
1076 
1081 
1084 
1087 
1091 
1096 
1098  SPH_AV_ALPHA,
1099 
1101  SPH_AV_BETA,
1102 
1105 
1107  SPH_AV_TYPE,
1108 
1112 
1115 
1117  SPH_USE_AC,
1118 
1120  SPH_AC_ALPHA,
1121 
1123  SPH_AC_BETA,
1124 
1127 
1129  SPH_USE_XSPH,
1130 
1134 
1137 
1140 
1143 
1146 
1149 
1152 
1159 
1161  SPH_DI_ALPHA,
1162 
1165 
1168 
1172 
1175 
1179 
1182 
1187 
1190 
1193 
1196 
1199 
1202 
1205 
1210 
1213 
1216 
1220 
1224 
1229 
1234 
1240 
1243 
1246 
1249 
1252 
1256 
1261 
1265 
1268 
1271 
1277 
1282 
1285 
1288 
1292 
1294 
1296 
1298 
1301 
1306 
1308  DOMAIN_TYPE,
1309 
1312 
1314  DOMAIN_CENTER,
1315 
1317  DOMAIN_RADIUS,
1318 
1320  DOMAIN_HEIGHT,
1321 
1323  DOMAIN_SIZE,
1324 
1327 
1330 
1332  GENERATE_UVWS,
1333 
1335  UVW_MAPPING,
1336 };
1337 
1338 
1339 enum class DistributionEnum {
1341  HEXAGONAL,
1342 
1344  CUBIC,
1345 
1347  RANDOM,
1348 
1350  DIEHL_ET_AL,
1351 
1353  STRATIFIED,
1354 
1357 
1359  LINEAR
1360 };
1361 
1362 
1363 enum class EosEnum {
1365  NONE,
1366 
1368  IDEAL_GAS,
1369 
1371  TAIT,
1372 
1374  MIE_GRUNEISEN,
1375 
1377  TILLOTSON,
1378 
1380  MURNAGHAN,
1381 
1384 
1386  ANEOS
1387 };
1388 
1394 enum class BodySettingsId {
1396  EOS = 0,
1397 
1400 
1404  CENTER_PARTICLES = 2,
1405 
1407  PARTICLE_SORTING = 3,
1408 
1413 
1415  DIEHL_STRENGTH = 5,
1416 
1420 
1422  DIEHL_ITERATION_COUNT = 71,
1423 
1425  SMOOTHING_LENGTH_ETA = 72,
1426 
1428  DENSITY = 7,
1429 
1431  DENSITY_RANGE = 8,
1432 
1435  DENSITY_MIN = 9,
1436 
1438  ENERGY = 10,
1439 
1441  ENERGY_RANGE = 11,
1442 
1444  ENERGY_MIN = 12,
1445 
1447  STRESS_TENSOR = 13,
1448 
1450  STRESS_TENSOR_MIN = 14,
1451 
1453  DAMAGE = 15,
1454 
1456  DAMAGE_RANGE = 16,
1457 
1459  DAMAGE_MIN = 17,
1460 
1462  ADIABATIC_INDEX = 18,
1463 
1465  TAIT_GAMMA = 19,
1466 
1468  TAIT_SOUND_SPEED = 20,
1469 
1471  BULK_MODULUS = 21,
1472 
1474  TILLOTSON_NONLINEAR_B = 22,
1475 
1477  TILLOTSON_SMALL_A = 23,
1478 
1480  TILLOTSON_SMALL_B = 24,
1481 
1483  TILLOTSON_ALPHA = 25,
1484 
1486  TILLOTSON_BETA = 26,
1487 
1489  TILLOTSON_SUBLIMATION = 27,
1490 
1492  TILLOTSON_ENERGY_IV = 28,
1493 
1495  TILLOTSON_ENERGY_CV = 29,
1496 
1498  GRUNEISEN_GAMMA = 30,
1499 
1501  BULK_SOUND_SPEED = 31,
1502 
1504  HUGONIOT_SLOPE = 32,
1505 
1507  RHEOLOGY_YIELDING = 33,
1508 
1510  RHEOLOGY_DAMAGE = 34,
1511 
1513  SHEAR_MODULUS = 35,
1514 
1516  YOUNG_MODULUS = 36,
1517 
1519  ELASTIC_MODULUS = 37,
1520 
1522  ELASTICITY_LIMIT = 38,
1523 
1525  MELT_ENERGY = 39,
1526 
1528  COHESION = 40,
1529 
1531  INTERNAL_FRICTION = 41,
1532 
1534  DRY_FRICTION = 42,
1535 
1538 
1541 
1544 
1547 
1549  RAYLEIGH_SOUND_SPEED = 47,
1550 
1552  WEIBULL_COEFFICIENT = 48,
1553 
1555  WEIBULL_EXPONENT = 49,
1556 
1560 
1562  DISTENTION = 81,
1563 
1564 
1565  BULK_VISCOSITY = 50,
1566 
1567  SHEAR_VISCOSITY = 51,
1568 
1569  DAMPING_COEFFICIENT = 52,
1570 
1571  DIFFUSIVITY = 53,
1572 
1574  SURFACE_TENSION = 54,
1575 
1577  PARTICLE_COUNT = 55,
1578 
1583  MIN_PARTICLE_COUNT = 56,
1584 
1588  AV_ALPHA = 57,
1589 
1591  AV_ALPHA_RANGE = 58,
1592 
1594  BULK_POROSITY = 64,
1595 
1597  HEAT_CAPACITY = 67,
1598 
1599  BODY_SHAPE_TYPE = 59,
1600 
1602  BODY_CENTER = 61,
1603 
1604  BODY_RADIUS = 68,
1605 
1606  BODY_DIMENSIONS = 69,
1607 
1608  BODY_HEIGHT = 73,
1609 
1610  BODY_SPIN_RATE = 70,
1611 
1612  VISUALIZATION_TEXTURE = 80,
1613 
1615  IDENTIFIER = 99,
1616 };
1617 
1619 template <>
1620 AutoPtr<RunSettings> RunSettings::instance;
1621 
1623 template <>
1624 AutoPtr<BodySettings> BodySettings::instance;
1625 
#define SPH_ASSERT(x,...)
Definition: Assert.h:94
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
Smart pointer performing cloning of stored resource rather than copying pointer.
@ NONE
No collision took place.
@ SUM_ONLY_UNDAMAGED
Only undamaged particles (particles with damage > 0) from the same body (body with the same flag) wil...
@ SYMMETRIC_TENSOR
@ TRACELESS_TENSOR
Helper object for converting enums to string, listing all available values of enum,...
Wrapper of type containing either a value or an error message.
Wrapper over enum allowing setting (and querying) individual bits of the stored value.
uint32_t Size
Integral type used to index arrays (by default).
Definition: Globals.h:16
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Definition: Globals.h:13
Object representing interval of real values.
#define INLINE
Macros for conditional compilation based on selected compiler.
Definition: Object.h:31
#define NAMESPACE_SPH_END
Definition: Object.h:12
const NothingType NOTHING
Definition: Optional.h:16
Return value of function that may fail, containing either SUCCEES (true) or error message.
@ PRESSURE
Pressure, reduced by yielding and fracture model (multiplied by 1-damage); always a scalar quantity.
@ DAMAGE
Damage, reducing the pressure and deviatoric stress.
@ ENERGY
Specific internal energy, always a scalar quantity.
@ DENSITY
Density, always a scalar quantity.
@ AV_ALPHA
Coefficient alpha of the artificial viscosity. Coefficient beta is always 2*alpha.
@ DISTENTION
Ratio of the solid and bulk density (parameter alpha in P-alpha and eps-alpha models).
Symmetric traceless 2nd order tensor.
Object capable of storing values of different types.
BasicVector< Float > Vector
Definition: Vector.h:539
Helper class used to allow calling a function only from within T.
Definition: Object.h:94
Generic exception.
Definition: Exceptions.h:10
Wrapper of an integral value providing functions for reading and modifying individual bits.
Definition: Flags.h:20
INLINE TValue value() const
Returns the underlying value.
Definition: Flags.h:118
constexpr static Flags fromValue(const TValue value)
Constructs object from underlying value.
Definition: Flags.h:49
INLINE bool tryRemove(const TKey &key)
Removes element with given key if present, otherwise it does nothing.
Definition: FlatMap.h:99
INLINE bool contains(const TKey &key) const
Returns true if the map contains element of given key.
Definition: FlatMap.h:140
INLINE TValue & insert(const TKey &key, const TValue &value)
Adds a new element into the map or sets new value of element with the same key.
Definition: FlatMap.h:65
INLINE Optional< TValue & > tryGet(const TKey &key)
Returns a reference to the value matching the given key, or NOTHING if no such value exists.
Definition: FlatMap.h:118
Object representing a 1D interval of real numbers.
Definition: Interval.h:17
Exception thrown on invalid access to entries of a Settings object.
Definition: Settings.h:76
InvalidSettingsAccess(const TEnum key)
Definition: Settings.h:79
INLINE Type & value()
Returns the reference to the stored value.
Definition: Optional.h:172
Object representing a path on a filesystem.
Definition: Path.h:17
Iterator useful for iterating over all entries in the settings.
Definition: Settings.h:486
SettingsIterator & operator++()
Moves to next entry.
bool operator==(const SettingsIterator &other) const
Equality operator between settings operators.
SettingsIterator(const ActIterator &iter, Badge< Settings< TEnum >>)
Constructs an iterator from iternal implementation; use Settings::begin and Settings::end.
IteratorValue operator*() const
Dereference the iterator, yielding a pair of entry ID and its value.
bool operator!=(const SettingsIterator &other) const
Unequality operator between settings operators.
Generic object containing various settings and parameters of the run.
Definition: Settings.h:108
void unset(const TEnum idx)
Removes given parameter from settings.
Definition: Settings.h:313
static Optional< std::string > getEntryDesc(const TEnum idx)
Returns a description of the entry with given index.
Definition: Settings.h:389
static std::string typeToString(const int type)
Returns the string name for given type index.
static Optional< std::string > getEntryName(const TEnum idx)
Returns the human-readable name of the entry with given index.
Definition: Settings.h:357
static Optional< TEnum > getEntryId(const std::string &name)
Returns an ID for given entry name.
Definition: Settings.h:403
Settings & set(const TEnum idx, const Flags< TValue > flags)
Saves flags into the settings.
Definition: Settings.h:262
TValue get(const TEnum idx, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0) const
Returns a value of given type from the settings.
Definition: Settings.h:326
static const Settings & getDefaults()
\brief Returns a reference to object containing default values of all settings.
Outcome saveToFile(const Path &path) const
Saves all values stored in settings into file.
Settings & operator=(std::initializer_list< Entry > list)
Assigns a list of settings into the object, erasing all previous entries.
Definition: Settings.impl.h:37
Settings()
Initialize settings by settings all value to their defaults.
Definition: Settings.impl.h:22
Flags< TValue > getFlags(const TEnum idx) const
Returns Flags from underlying value stored in settings.
Definition: Settings.h:348
TValue get(const TEnum idx, std::enable_if_t< std::is_enum< std::decay_t< TValue >>::value, int >=0) const
Returns a value of given type from the settings.
Definition: Settings.h:335
Settings & set(const TEnum idx, const EnumWrapper ew)
Special setter for value of type EnumWrapper.
Definition: Settings.h:283
bool has(const TEnum idx) const
Checks if the given entry is stored in the settings.
Definition: Settings.h:414
SettingsIterator< TEnum > begin() const
Iterator to the first entry of the settings storage.
Settings & set(const TEnum idx, TValue &&value, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0)
Saves a value into the settings.
Definition: Settings.h:226
void addEntries(const Settings &settings)
Adds entries from different Settings object into this one, overriding current entries.
Definition: Settings.h:297
Size size() const
Returns the number of entries in the settings.
static Optional< int > getEntryType(const TEnum idx)
Returns the type of the entry with given index.
Definition: Settings.h:371
Settings & set(const TEnum idx, TValue &&value, std::enable_if_t< std::is_enum< std::decay_t< TValue >>::value, int >=0)
Saves a value into the settings.
Definition: Settings.h:242
bool tryLoadFileOrSaveCurrent(const Path &path, const Settings &overrides=EMPTY_SETTINGS)
If the specified file exists, loads the settings from it, otherwise creates the file and saves the cu...
Outcome loadFromFile(const Path &path)
Loads the settings from file.
SettingsIterator< TEnum > end() const
Iterator to the one-past-end entry the settings storage.
bool hasType(const TEnum idx) const
Checks if the given entry has specified type.
Definition: Settings.h:422
Settings & set(const TEnum idx, EmptyFlags)
Clear flags of given parameter in settings.
Definition: Settings.h:271
Symmetric tensor of 2nd order.
Symmetric traceless 2nd order tensor.
Variant, an implementation of type-safe union, similar to std::variant or boost::variant.
Definition: Variant.h:171
CollisionHandlerEnum
Definition: Settings.h:808
ForceEnum
Definition: Settings.h:658
@ INTERNAL_FRICTION
Use internal friction given by the viscosity in the material.
@ INERTIAL
Use centrifugal force and Coriolis forces given by angular frequency of the coordinate frame.
@ SELF_GRAVITY
Use gravitational force in the model.
@ SURFACE_TENSION
Surface force proportional to surface curvature.
LoggerEnum
Definition: Settings.h:846
@ STD_OUT
Print log to standard output.
@ FILE
Print log to file.
YieldingEnum
Definition: Settings.h:743
@ ELASTIC
No yielding, just elastic deformations following Hooke's law.
@ VON_MISES
Von Mises criterion.
@ DRUCKER_PRAGER
Drucker-Prager pressure dependent yielding stress.
FinderEnum
Definition: Settings.h:584
@ UNIFORM_GRID
Partitioning particles into a grid uniform in space.
@ LINKED_LIST
Using linked list.
@ BRUTE_FORCE
Brute-force search by going through each pair of particles (O(N^2) complexity)
@ KD_TREE
Using K-d tree.
@ OCTREE
Using octree.
@ HASH_MAP
Using hash map.
RngEnum
Definition: Settings.h:929
@ HALTON
Halton QRNG.
@ UNIFORM
Mersenne Twister PRNG from Standard library.
INLINE void checkSettingsAccess(const bool result, const TEnum key)
Definition: Settings.h:87
TimeStepCriterionEnum
Definition: Settings.h:567
@ DIVERGENCE
Time step computed from velocity divergence.
@ DERIVATIVES
Time step computed by limiting value-to-derivative ratio of quantiites.
@ COURANT
Time step determined using CFL condition.
@ ACCELERATION
Time step computed from ratio of acceleration and smoothing length.
Optional< std::string > getIoExtension(const IoEnum type)
Returns the file extension associated with given IO type.
Definition: Settings.cpp:343
const EmptySettingsTag EMPTY_SETTINGS
Definition: Settings.h:32
GravityEnum
Definition: Settings.h:785
@ BARNES_HUT
Use Barnes-Hut algorithm, approximating gravity by multipole expansion (up to octupole order)
SignalSpeedEnum
Definition: Settings.h:777
@ PRESSURE_DIFFERENCE
Signal speed given by the absolute value of pressure difference, as in Price (2008)
@ VELOCITY_DIFFERENCE
Signal speed given by relative velocity projected to the positive vector, as in Valdarnini (2018),...
OutputSpacing
Definition: Settings.h:918
@ CUSTOM
User-defined list of output times.
@ LINEAR
Constant time between consecutive output times.
@ LOGARITHMIC
Constant ratio between consecutive output times.
IoEnum
Definition: Settings.h:859
@ TEXT_FILE
Formatted human-readable text file.
@ BINARY_FILE
@ PKDGRAV_INPUT
Pkdgrav input file.
@ MPCORP_FILE
Export from Minor Planet Center Orbit Database.
@ GNUPLOT_OUTPUT
@ COMPRESSED_FILE
TimesteppingEnum
Definition: Settings.h:547
@ LEAP_FROG
Leap-frog 2nd-order integration.
@ MODIFIED_MIDPOINT
Modified midpoint method with constant number of substeps.
@ BULIRSCH_STOER
Bulirsch-Stoer integrator.
@ RUNGE_KUTTA
Runge-Kutta 4-th order integration.
@ PREDICTOR_CORRECTOR
Predictor-corrector scheme.
@ EULER_EXPLICIT
Explicit (forward) 1st-order integration.
DiscretizationEnum
Definition: Settings.h:735
@ BENZ_ASPHAUG
(P_i + P_j) / (rho_i rho_j)
ContinuityEnum
Definition: Settings.h:721
@ DAMAGED_DECREASE_BULK_DENSITY
UvMapEnum
Definition: Settings.h:940
@ PLANAR
Planar mapping.
std::string getIoDescription(const IoEnum type)
Returns a short description of the file format.
Definition: Settings.cpp:387
IoCapability
Definition: Settings.h:906
@ OUTPUT
The format can be used as file output.
@ INPUT
The format can be used as file input.
GravityKernelEnum
Definition: Settings.h:796
@ SPH_KERNEL
Use gravity smoothing kernel corresponding to selected SPH kernel.
@ POINT_PARTICLES
Point-like particles with zero radius.
OverlapEnum
Definition: Settings.h:826
@ INTERNAL_BOUNCE
Particles are allowed to overlap and they bounce if moving towards each other.
@ REPEL
Particles are shifted until no overlap happens.
@ FORCE_MERGE
Overlapping particles are merged.
Flags< IoCapability > getIoCapabilities(const IoEnum type)
Returns the capabilities of given file format.
Definition: Settings.cpp:412
Optional< IoEnum > getIoEnum(const std::string &ext)
Returns the file type from file extension.
Definition: Settings.cpp:367
SolverEnum
Definition: Settings.h:697
@ SUMMATION_SOLVER
Density is obtained by direct summation over nearest SPH particles.
@ ENERGY_CONSERVING_SOLVER
Solver advancing internal energy using pair-wise work done by particles, by Owen (2009).
@ ELASTIC_DEFORMATION_SOLVER
Special solver used to simulate deformations of perfectly elastic bodies.
@ SYMMETRIC_SOLVER
SPH formulation using symmetrized evaluation of derivatives.
@ DENSITY_INDEPENDENT
Density independent solver by Saitoh & Makino (2013).
@ ASYMMETRIC_SOLVER
Generic solver evaluating all derivatives asymmetrically.
ArtificialViscosityEnum
Definition: Settings.h:683
@ RIEMANN
Artificial viscosity term analogous to Riemann solvers by Monaghan (1997)
@ MORRIS_MONAGHAN
Time-dependent artificial viscosity by Morris & Monaghan (1997).
@ STANDARD
Standard artificial viscosity term by Monaghan (1989).
DistributionEnum
Definition: Settings.h:1339
@ STRATIFIED
Stratified distribution to reduce clustering.
@ RANDOM
Random distribution of particles.
@ PARAMETRIZED_SPIRALING
Parametrized spiraling scheme by Saff & Kuijlaars (1997)
@ HEXAGONAL
Hexagonally close packing.
@ DIEHL_ET_AL
Isotropic uniform distribution by Diehl et al. (2012)
@ CUBIC
Cubic close packing.
KernelEnum
Definition: Settings.h:518
@ THOMAS_COUCHMAN
Modification of the standard M4 B-spline kernel, used to avoid particle clustering.
@ GAUSSIAN
Gaussian function.
@ FOURTH_ORDER_SPLINE
M5 B-spline (piecewise 4th-order polynomial)
@ CORE_TRIANGLE
Core Triangle (CT) kernel by Read et al. (2010)
@ WENDLAND_C2
Wendland kernel C2.
@ TRIANGLE
Simple triangle (piecewise linear) kernel.
@ WENDLAND_C6
Wendland kernel C6.
@ WENDLAND_C4
Wendland kernel C4.
@ CUBIC_SPLINE
M4 B-spline (piecewise cubic polynomial)
FractureEnum
Definition: Settings.h:757
@ SCALAR_GRADY_KIPP
Grady-Kipp model of fragmentation using scalar damage.
@ TENSOR_GRADY_KIPP
Grady-Kipp model of fragmentation using tensor damage.
EosEnum
Definition: Settings.h:1363
@ ANEOS
ANEOS given by look-up table.
@ MIE_GRUNEISEN
Mie-Gruneisen equation of state.
@ TAIT
Tait equation of state for simulations of liquids.
@ IDEAL_GAS
Equation of state for ideal gas.
@ TILLOTSON
Tillotson (1962) equation of state.
@ MURNAGHAN
Murnaghan equation of state.
@ SIMPLIFIED_TILLOTSON
Simplified version of the Tillotson equation of state.
BodySettingsId
Settings of a single body / gas phase / ...
Definition: Settings.h:1394
@ TILLOTSON_NONLINEAR_B
Coefficient B of the nonlinear compressive term in Tillotson equation.
@ ELASTICITY_LIMIT
Elasticity limit of the von Mises yielding criterion.
@ TILLOTSON_ALPHA
Alpha coefficient in expanded phase of Tillotson equation.
@ FLUIDIZATION_VISCOSITY
Effective viscosity of acoustic fludizations.
@ DRY_FRICTION
Coefficient of friction for fully damaged material.
@ WEIBULL_EXPONENT
Exponent of the Weibull distribution of flaws.
@ BODY_CENTER
Center point of the body. Currently used only by StabilizationSolver.
@ BULK_POROSITY
Bulk (macro)porosity of the body.
@ TILLOTSON_ENERGY_CV
Specific energy of complete vaporization.
@ TILLOTSON_SMALL_B
"Small b" coefficient in Tillotson equation
@ OSCILLATION_REGENERATION
Regeneration efficiency of acoustric oscillations.
@ DIEHL_STRENGTH
Strength parameter of the Diehl's distribution.
@ MELT_ENERGY
Melting energy, used for temperature-dependence of the stress tensor.
@ STRESS_TENSOR
Initial values of the deviatoric stress tensor.
@ ENERGY_MIN
Estimated minimal value of energy used to determine timestepping error.
@ PARTICLE_SORTING
If true, particles are sorted using Morton code, preserving locality in memory.
@ BULK_SOUND_SPEED
Used in Mie-Gruneisen equations of state.
@ USE_ACOUSTIC_FLUDIZATION
Whether to use the acoustic fludization model.
@ DAMAGE_MIN
Estimate minimal value of damage used to determine timestepping error.
@ ELASTIC_MODULUS
Elastic modulus lambda (a.k.a Lame's first parameter) of the material.
@ RHEOLOGY_DAMAGE
Model of fragmentation used within the rheological model.
@ IDENTIFIER
Arbitrary string identifying this material.
@ COHESION
Cohesion, yield strength at zero pressure.
@ TAIT_GAMMA
Exponent of density, representing a compressibility of a fluid. Used in Tait equation of state.
@ INITIAL_DISTRIBUTION
Initial distribution of SPH particles within the domain, see DistributionEnum for options.
@ DIEHL_ITERATION_COUNT
Number of iterations of particle repelling.
@ TILLOTSON_BETA
Beta coefficient in expanded phase of Tillotson equation.
@ DENSITY_RANGE
Allowed range of density. Densities of all particles all clamped to fit in the range.
@ SHEAR_MODULUS
Shear modulus mu (a.k.a Lame's second parameter) of the material.
@ YOUNG_MODULUS
Young modulus of the material.
@ ADIABATIC_INDEX
Adiabatic index used by some equations of state (such as ideal gas)
@ TAIT_SOUND_SPEED
Sound speed used in Tait equation of state.
@ BULK_MODULUS
Bulk modulus of the material.
@ SMOOTHING_LENGTH_ETA
Eta-factor between smoothing length and particle concentration (h = eta * n^(-1/d) )
@ AV_ALPHA_RANGE
Lower and upper bound of the alpha coefficient, used only for time-dependent artificial viscosity.
@ WEIBULL_COEFFICIENT
Coefficient (multiplier) of the Weibull distribution of flaws.
@ HEAT_CAPACITY
Heat capacity at constant pressure,.
@ OSCILLATION_DECAY_TIME
Characteristic decay time of acoustic oscillations in the material.
@ TILLOTSON_ENERGY_IV
Specific energy of incipient vaporization.
@ STRESS_TENSOR_MIN
Estimated minial value of stress tensor components used to determined timestepping error.
@ RAYLEIGH_SOUND_SPEED
Speed of crack growth, in units of local sound speed.
@ EOS
Equation of state for this material, see EosEnum for options.
@ ENERGY_RANGE
Allowed range of specific internal energy.
@ RHEOLOGY_YIELDING
Model of stress reducing used within the rheological model.
@ GRUNEISEN_GAMMA
Gruneisen's gamma paraemter used in Mie-Gruneisen equation of state.
@ TILLOTSON_SMALL_A
"Small a" coefficient in Tillotson equation
@ HUGONIOT_SLOPE
Linear Hugoniot slope coefficient used in Mie-Gruneisen equation of state.
@ DAMAGE_RANGE
Allowed range of damage.
@ TILLOTSON_SUBLIMATION
Specific sublimation energy.
@ WEIBULL_SAMPLE_DISTRIBUTIONS
BoundaryEnum
Definition: Settings.h:604
@ FIXED_PARTICLES
Creates dummy particles along the boundary.
@ SYMMETRIC
Particles are duplicated along the z=0 plane.
@ PROJECT_1D
Project all movement onto a line, effectivelly reducing the simulation to 1D.
@ KILL_ESCAPERS
Removes particles outside the domain.
@ GHOST_PARTICLES
Create ghosts to keep particles inside domain.
@ FROZEN_PARTICLES
Highest derivatives of all particles close to the boundary are set to zero.
@ PERIODIC
Periodic boundary conditions.
@ WIND_TUNNEL
Extension of Frozen Particles, pushing particles inside the domain and removing them on the other end...
SmoothingLengthEnum
Definition: Settings.h:768
@ CONTINUITY_EQUATION
Smoothing length is evolved using continuity equation.
RunSettingsId
Settings relevant for whole run of the simulation.
Definition: Settings.h:949
@ RUN_OUTPUT_QUANTITIES
List of quantities to write to text output. Binary output always stores all quantitites.
@ DOMAIN_CENTER
Center point of the domain.
@ SPH_SCRIPT_FILE
Path of an arbitrary ChaiScript script executed each timestep.
@ SPH_SUMMATION_MAX_ITERATIONS
Maximum number of iterations for self-consistent density computation of summation solver.
@ RUN_AUTHOR
Name of the person running the simulation.
@ SPH_STRAIN_RATE_CORRECTION_TENSOR
@ RUN_OUTPUT_INTERVAL
Time interval of dumping data to disk.
@ SPH_CONTINUITY_MODE
Specifies how the density is evolved, see ContinuityEnum.
@ TIMESTEPPING_MAX_TIMESTEP
@ DOMAIN_HEIGHT
Height of a cylindrical domain.
@ SPH_AV_STRESS_FACTOR
Multiplicative factor of the artificial stress term (= strength of the viscosity)
@ DOMAIN_GHOST_MIN_DIST
Minimal distance between a particle and its ghost, in units of smoothing length.
@ RUN_LOGGER
Selected logger of a run, see LoggerEnum.
@ RUN_EMAIL
E-mail of the person running the simulation.
@ SPH_AV_BALSARA_STORE
If true, Balsara factors will be saved as quantity AV_BALSARA. Mainly for debugging purposes.
@ RUN_VERBOSE_NAME
Path of a file where the verbose log is printed.
@ SPH_AV_STRESS_EXPONENT
Weighting function exponent n in artificial stress term.
@ SPH_USE_AC
Enables the artificial thermal conductivity term.
@ FINDER_LEAF_SIZE
Maximum number of particles in a leaf node.
@ SOFT_REPEL_STRENGTH
Magnitude of the repel force for the soft-body solver.
@ RUN_OUTPUT_SPACING
Type of output spacing in time, see enum OutputSpacing.
@ GENERATE_UVWS
If true, the mapping coordinates will be computed and saved for all bodies in the simulation.
@ COLLISION_HANDLER
Specifies how the collisions of particles should be handler; see CollisionHandlerEnum.
@ SPH_SOLVER_FORCES
List of forces to compute by the solver.
@ RUN_THREAD_CNT
Number of threads used by the code. If 0, all available threads are used.
@ SPH_AV_TYPE
Type of used artificial viscosity.
@ RUN_LOGGER_FILE
Path of a file where the log is printed, used only when selected logger is LoggerEnum::FILE.
@ SPH_AV_BETA
Artificial viscosity beta coefficient.
@ SPH_AV_ALPHA
Artificial viscosity alpha coefficient.
@ RUN_OUTPUT_PATH
Path where all output files (dumps, logs, ...) will be written.
@ DOMAIN_FROZEN_DIST
Distance to the boundary in units of smoothing length under which the particles are frozen.
@ SPH_SOLVER_TYPE
Selected solver for computing derivatives of physical variables.
@ NBODY_MAX_ROTATION_ANGLE
@ RUN_DIAGNOSTICS_INTERVAL
@ TIMESTEPPING_INITIAL_TIMESTEP
@ COLLISION_BOUNCE_MERGE_LIMIT
@ SPH_ADAPTIVE_SMOOTHING_LENGTH
Solution for evolutions of the smoothing length.
@ SPH_AV_USE_STRESS
Whether to use artificial stress.
@ GRAVITY_SOLVER
Algorithm to compute gravitational acceleration.
@ RUN_OUTPUT_CUSTOM_TIMES
List of comma-separated output times, used when RUN_OUTPUT_SPACING is set to CUSTOM.
@ TIMESTEPPING_DERIVATIVE_FACTOR
Multiplicative factor k for the derivative criterion; dt = k * v / dv.
@ SPH_SMOOTHING_LENGTH_MIN
Minimal value of smoothing length.
@ RUN_COMMENT
User-specified comment.
@ SPH_USE_XSPH
Turn on the XSPH correction.
@ SPH_SUMMATION_DENSITY_DELTA
@ SPH_DI_ALPHA
Alpha parameter of the density-independent solver.
@ COLLISION_ALLOWED_OVERLAP
@ SPH_DISCRETIZATION
Specifies a discretization of SPH equations; see DiscretizationEnum.
@ SPH_AC_ALPHA
Artificial conductivity alpha coefficient.
@ RUN_OUTPUT_TYPE
Selected format of the output file, see IoEnum.
@ SPH_VELOCITY_DIFFUSION_ALPHA
Alpha-coefficient of the delta-SPH modification.
@ UVW_MAPPING
Type of the UV mapping.
@ RUN_RNG
Selected random-number generator used within the run.
@ RUN_OUTPUT_FIRST_INDEX
Index of the first generated output file. Might not be zero if the simulation is resumed.
@ NBODY_AGGREGATES_SOURCE
Specifies the initial aggregates used in the simulation. See AggregateEnum.
@ TIMESTEPPING_INTEGRATOR
Selected timestepping integrator.
@ TIMESTEPPING_MAX_INCREASE
@ TIMESTEPPING_MIDPOINT_COUNT
Number of sub-steps in the modified midpoint method.
@ COLLISION_RESTITUTION_TANGENT
@ GRAVITY_MULTIPOLE_ORDER
Order of multipole expansion.
@ TIMESTEPPING_COURANT_NUMBER
Courant number.
@ SPH_FINDER
Structure for searching nearest neighbours of particles.
@ COLLISION_ROTATION_MERGE_LIMIT
@ SOFT_FRICTION_STRENGTH
Magnitude of the friction force for the soft-body solver.
@ COLLISION_OVERLAP
Specifies how particle overlaps should be handled.
@ DOMAIN_TYPE
Computational domain, enforced by boundary conditions.
@ SPH_AC_BETA
Artificial conductivity beta coefficient.
@ SPH_DENSITY_DIFFUSION_DELTA
Delta-coefficient of the delta-SPH modification, see Marrone et al. 2011.
@ RUN_LOGGER_VERBOSITY
Number specifying log verbosity. Can be between 0 and 3, going from least to most verbose.
@ SPH_SCRIPT_ENABLE
Enables or disables scripted term.
@ TIMESTEPPING_DIVERGENCE_FACTOR
Multiplicative factor for the divergence criterion.
@ RUN_NAME
User-specified name of the run, used in some output files.
@ RUN_VERBOSE_ENABLE
Enables verbose log of a simulation.
@ TIMESTEPPING_BS_ACCURACY
Required relative accuracy of the Bulirsch-Stoer integrator.
@ GRAVITY_RECOMPUTATION_PERIOD
@ GRAVITY_OPENING_ANGLE
Opening angle Theta for multipole approximation of gravity.
@ SPH_USE_DELTASPH
Turn on the delta-SPH correction.
@ DOMAIN_SIZE
(Vector) size of a block domain
@ SPH_PHASE_ANGLE
Evolve particle phase angle.
@ DOMAIN_BOUNDARY
Type of boundary conditions.
@ GRAVITY_CONSTANT
Gravitational constant. To be generalized.
@ SPH_SCRIPT_ONESHOT
Whether to execute the script only once or periodically.
@ SPH_STABILIZATION_DAMPING
@ GRAVITY_KERNEL
Gravity smoothing kernel.
@ RUN_RNG_SEED
Seed for the random-number generator.
@ FINDER_MAX_PARALLEL_DEPTH
@ SPH_ASYMMETRIC_COMPUTE_RADII_HASH_MAP
@ SPH_AC_SIGNAL_SPEED
Type of the signal speed used by artificial conductivity.
@ FRAME_CONSTANT_ACCELERATION
@ COLLISION_RESTITUTION_NORMAL
@ RUN_OUTPUT_NAME
File name of the output file (including extension), where d is a placeholder for output number.
DomainEnum
Definition: Settings.h:633
@ BLOCK
Block with edge sizes given by vector.
@ HALF_SPACE
Half-space z>0.
@ GAUSSIAN_SPHERE
Gaussian random sphere.
@ ELLIPSOIDAL
Axis-aligned ellipsoid.
@ CYLINDER
Cylindrical domain aligned with z axis.
Tag for initialization of empty settings object.
Definition: Settings.h:30
Wrapper of an enum.
Definition: Settings.h:37
friend std::ostream & operator<<(std::ostream &ofs, const EnumWrapper &e)
Definition: Settings.h:69
int value
Definition: Settings.h:38
EnumWrapper(const int value, const EnumIndex &index)
Definition: Settings.h:51
EnumWrapper(TEnum e)
Definition: Settings.h:45
EnumWrapper()=default
EnumIndex index
Definition: Settings.h:40
bool operator==(const EnumWrapper &other) const
Definition: Settings.h:65
Settings< TEnum >::Value value
Variant holding the value of the entry.
Definition: Settings.h:501
TEnum id
ID of settings entry.
Definition: Settings.h:498