Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <cstddef> 7 : #include <memory> 8 : #include <string> 9 : 10 : #include "DataStructures/DataBox/Tag.hpp" 11 : #include "DataStructures/Tensor/Tensor.hpp" 12 : #include "Domain/Creators/DomainCreator.hpp" 13 : #include "Domain/Creators/OptionTags.hpp" 14 : #include "Domain/Structure/ObjectLabel.hpp" 15 : #include "Utilities/GetOutput.hpp" 16 : #include "Utilities/TMPL.hpp" 17 : 18 : /// \cond 19 : namespace Frame { 20 : struct Grid; 21 : } // namespace Frame 22 : /// \endcond 23 : 24 : namespace domain::Tags { 25 : /*! 26 : * \ingroup DataBoxTagsGroup 27 : * \ingroup ComputationalDomainGroup 28 : * \brief The grid frame center of the given object. 29 : * 30 : * \note Requires that the domain creator has a grid anchor with the name: 31 : * "Center + get_output(Label)" 32 : */ 33 : template <ObjectLabel Label> 34 1 : struct ObjectCenter : db::SimpleTag { 35 0 : using type = tnsr::I<double, 3, Frame::Grid>; 36 0 : static std::string name() { return "ObjectCenter" + get_output(Label); } 37 : 38 0 : using option_tags = tmpl::list<domain::OptionTags::DomainCreator<3>>; 39 0 : static constexpr bool pass_metavariables = false; 40 : 41 0 : static type create_from_options( 42 : const std::unique_ptr<::DomainCreator<3>>& domain_creator); 43 : }; 44 : } // namespace domain::Tags