SpECTRE Documentation Coverage Report
Current view: top level - DataStructures - FloatingPointType.hpp Hit Total Coverage
Commit: 9ddc33268b29014a4956c8f0c24ca90b397463e1 Lines: 0 6 0.0 %
Date: 2024-04-26 20:00:04
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // 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           0 : enum FloatingPointType { Float, Double };
      24             : 
      25           0 : std::ostream& operator<<(std::ostream& os, const FloatingPointType& t);
      26             : 
      27             : template <>
      28           0 : struct Options::create_from_yaml<FloatingPointType> {
      29             :   template <typename Metavariables>
      30           0 :   static FloatingPointType create(const Options::Option& options) {
      31             :     return create<void>(options);
      32             :   }
      33             : };
      34             : 
      35             : template <>
      36           0 : FloatingPointType Options::create_from_yaml<FloatingPointType>::create<void>(
      37             :     const Options::Option& options);

Generated by: LCOV version 1.14