diff --git a/tests/Unit/Evolution/Systems/CurvedScalarWave/Worldtube/Test_Tags.cpp b/tests/Unit/Evolution/Systems/CurvedScalarWave/Worldtube/Test_Tags.cpp index 27ff1f216463..ca56508db6e8 100644 --- a/tests/Unit/Evolution/Systems/CurvedScalarWave/Worldtube/Test_Tags.cpp +++ b/tests/Unit/Evolution/Systems/CurvedScalarWave/Worldtube/Test_Tags.cpp @@ -71,8 +71,8 @@ void test_initial_position_velocity_tag() { const double orbital_radius = 7.; const double angular_vel = 0.1; const auto domain_creator = - TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object( - orbital_radius, 0.2, angular_vel); + TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object< + false>(orbital_radius, 0.2, angular_vel); const tnsr::I expected_pos{{orbital_radius, 0., 0.}}; const tnsr::I expected_vel{{0., angular_vel * orbital_radius, 0.}}; CHECK(Tags::InitialPositionAndVelocity::create_from_options( @@ -192,8 +192,8 @@ void test_compute_face_coordinates_grid() { void test_compute_face_coordinates() { static constexpr size_t Dim = 3; const auto domain_creator = - TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object( - 7., 0.2, pow(7, -1.5)); + TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object< + false>(7., 0.2, pow(7, -1.5)); const double initial_time = 0.; auto domain = domain_creator->create_domain(); const auto excision_sphere = domain.excision_spheres().at("ExcisionSphereA"); @@ -321,8 +321,8 @@ void test_particle_position_velocity_compute() { const double orbit_radius = 9.; const double angular_velocity = 1. / (sqrt(orbit_radius) * orbit_radius); const auto domain_creator = - TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object( - orbit_radius, 0.2, angular_velocity); + TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object< + false>(orbit_radius, 0.2, angular_velocity); const double initial_time = 0.; auto domain = domain_creator->create_domain(); const auto excision_sphere = domain.excision_spheres().at("ExcisionSphereA"); @@ -632,15 +632,15 @@ void test_puncture_field() { void test_check_input_file() { const auto bbh_correct = - TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object( - 7., 0.2, pow(7., -1.5)); + TestHelpers::CurvedScalarWave::Worldtube::worldtube_binary_compact_object< + false>(7., 0.2, pow(7., -1.5)); const gr::Solutions::KerrSchild kerr_schild_correct( 1., make_array(0., 0., 0.), make_array(0., 0., 0.)); CHECK(Tags::CheckInputFile<3, gr::Solutions::KerrSchild>::create_from_options( bbh_correct, "ExcisionSphereA", kerr_schild_correct)); { const auto bbh_incorrect = TestHelpers::CurvedScalarWave::Worldtube:: - worldtube_binary_compact_object(7., 0.2, 1.); + worldtube_binary_compact_object(7., 0.2, 1.); CHECK_THROWS_WITH( (Tags::CheckInputFile<3, gr::Solutions::KerrSchild>:: create_from_options(bbh_incorrect, "ExcisionSphereA", diff --git a/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.cpp b/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.cpp index 34a33a83ffa3..d496ab2fa529 100644 --- a/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.cpp +++ b/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.cpp @@ -14,6 +14,8 @@ #include "Helpers/Domain/BoundaryConditions/BoundaryCondition.hpp" namespace TestHelpers::CurvedScalarWave::Worldtube { + +template std::unique_ptr> worldtube_binary_compact_object( const double orbit_radius, const double worldtube_radius, const double angular_velocity) { @@ -70,21 +72,25 @@ std::unique_ptr> worldtube_binary_compact_object( " InitialAngularVelocity: [0.0, 0.0," + angular_velocity_stream.str() + "]\n" - " TranslationMap:\n" - " InitialValues: [[0.0, 0.0, 0.0], [0.0, 0.0, 0.], [0.0, 0.0, " - "0.0]]\n" + " TranslationMap: None\n" " ShapeMapA:\n" - " LMax: 8\n" + " LMax: 2\n" " InitialValues: Spherical\n" " SizeInitialValues: [0.0, 0.0, 0.0]\n" " TransitionEndsAtCube: false\n" " ShapeMapB:\n" - " LMax: 8\n" + " LMax: 2\n" " InitialValues: Spherical\n" " SizeInitialValues: [0.0, 0.0, 0.0]\n" " TransitionEndsAtCube: false\n"; return ::TestHelpers::test_option_tag<::domain::OptionTags::DomainCreator<3>, - Metavariables>( + Metavariables>( binary_compact_object_options); } + +template std::unique_ptr> +worldtube_binary_compact_object(double, double, double); + +template std::unique_ptr> +worldtube_binary_compact_object(double, double, double); } // namespace TestHelpers::CurvedScalarWave::Worldtube diff --git a/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.hpp b/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.hpp index 6d7841d06fcb..0852252b245a 100644 --- a/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.hpp +++ b/tests/Unit/Helpers/Evolution/Systems/CurvedScalarWave/Worldtube/TestHelpers.hpp @@ -15,6 +15,7 @@ #include "Utilities/TMPL.hpp" namespace TestHelpers::CurvedScalarWave::Worldtube { +template struct Metavariables { using system = TestHelpers::domain::BoundaryConditions::SystemWithBoundaryConditions<3>; @@ -22,9 +23,9 @@ struct Metavariables { : tt::ConformsTo { // we set `UseWorldtube` to `false` here so the functions of time are valid // which simplifies testing. - using factory_classes = tmpl::map< - tmpl::pair, - tmpl::list<::domain::creators::BinaryCompactObject>>>; + using factory_classes = tmpl::map, + tmpl::list<::domain::creators::BinaryCompactObject>>>; }; }; @@ -32,6 +33,7 @@ struct Metavariables { // corresponding to the circular worldtube setup: a central excision sphere // (the central black hole) and a worldtube excision sphere in circular orbit // around it with angular velocity R^{-3/2}, where R is the orbital radius. +template std::unique_ptr> worldtube_binary_compact_object( const double orbit_radius, const double worldtube_radius, const double angular_velocity);