Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <array> 7 : #include <cstddef> 8 : #include <optional> 9 : #include <string> 10 : #include <variant> 11 : 12 : #include "DataStructures/DataVector.hpp" 13 : #include "Domain/Creators/TimeDependentOptions/FromVolumeFile.hpp" 14 : #include "Options/Auto.hpp" 15 : #include "Options/Context.hpp" 16 : #include "Options/String.hpp" 17 : #include "Utilities/TMPL.hpp" 18 : 19 : namespace domain::creators::time_dependent_options { 20 : /*! 21 : * \brief Class to be used as an option for initializing translation map 22 : * coefficients. 23 : */ 24 : template <size_t Dim> 25 1 : struct TranslationMapOptions { 26 0 : using type = Options::Auto<TranslationMapOptions, Options::AutoLabel::None>; 27 0 : static std::string name() { return "TranslationMap"; } 28 0 : static constexpr Options::String help = { 29 : "Options for a time-dependent translation of the coordinates. Specify " 30 : "'None' to not use this map."}; 31 : 32 0 : struct InitialValues { 33 0 : using type = std::variant<std::array<std::array<double, Dim>, 3>, 34 : FromVolumeFile<names::Translation>>; 35 0 : static constexpr Options::String help = { 36 : "Initial values for the translation map, its velocity and " 37 : "acceleration."}; 38 : }; 39 : 40 0 : using options = tmpl::list<InitialValues>; 41 : 42 0 : TranslationMapOptions() = default; 43 : // NOLINTNEXTLINE(google-explicit-constructor) 44 0 : TranslationMapOptions(std::variant<std::array<std::array<double, Dim>, 3>, 45 : FromVolumeFile<names::Translation>> 46 : values_from_options); 47 : 48 0 : std::array<DataVector, 3> initial_values{}; 49 : }; 50 : } // namespace domain::creators::time_dependent_options