FloatingPointType.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <iosfwd>
7 
8 /// \cond
9 namespace Options {
10 class Option;
11 template <typename T>
12 struct create_from_yaml;
13 } // namespace Options
14 /// \endcond
15 
16 /// \ingroup DataStructuresGroup
17 /// \brief Which floating point type to use
18 ///
19 /// An example use-case is for specifying in an input file to what precision
20 /// data is written to disk, since most simulations will not have full double
21 /// precision accuracy on volume data and we don't need all digits to visualize
22 /// the data.
23 enum FloatingPointType { Float, Double };
24 
25 std::ostream& operator<<(std::ostream& os, const FloatingPointType& t) noexcept;
26 
27 template <>
29  template <typename Metavariables>
30  static FloatingPointType create(const Options::Option& options) {
31  return create<void>(options);
32  }
33 };
34 
35 template <>
37  const Options::Option& options);
iosfwd
FloatingPointType
FloatingPointType
Which floating point type to use.
Definition: FloatingPointType.hpp:23
Options::Option
Definition: Options.hpp:108
Options
Utilities for parsing input files.
Definition: MinmodType.hpp:8
std::ostream
Options::create_from_yaml
Definition: MinmodType.hpp:11