Skip to content

Commit

Permalink
Clean up following reversion to temporal_id for interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
moxcodes committed Aug 12, 2021
1 parent f29ecf6 commit cb92120
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "Evolution/Systems/GeneralizedHarmonic/BoundaryConditions/RegisterDerivedWithCharm.hpp"
#include "Evolution/Systems/GeneralizedHarmonic/BoundaryCorrections/RegisterDerived.hpp"
#include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/RegisterDerivedWithCharm.hpp"
#include "NumericalAlgorithms/Interpolation/AddTemporalIdsToInterpolationTarget.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ErrorOnFailedApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/FindApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "IO/Observer/ObserverComponent.hpp"
#include "IO/Observer/Tags.hpp"
#include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
#include "NumericalAlgorithms/Interpolation/AddTemporalIdsToInterpolationTarget.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/FindApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
#include "NumericalAlgorithms/Interpolation/CleanUpInterpolator.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "Evolution/Systems/GrMhd/GhValenciaDivClean/BoundaryCorrections/RegisterDerived.hpp"
#include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
#include "Evolution/VariableFixing/Tags.hpp"
#include "NumericalAlgorithms/Interpolation/AddTemporalIdsToInterpolationTarget.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ErrorOnFailedApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/FindApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
#include "NumericalAlgorithms/DiscontinuousGalerkin/Formulation.hpp"
#include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
#include "NumericalAlgorithms/Interpolation/Actions/ElementInitInterpPoints.hpp"
#include "NumericalAlgorithms/Interpolation/AddTemporalIdsToInterpolationTarget.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/FindApparentHorizon.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
#include "NumericalAlgorithms/Interpolation/CleanUpInterpolator.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#include "NumericalAlgorithms/DiscontinuousGalerkin/Formulation.hpp"
#include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp"
#include "NumericalAlgorithms/Interpolation/Actions/ElementInitInterpPoints.hpp"
#include "NumericalAlgorithms/Interpolation/AddTemporalIdsToInterpolationTarget.hpp"
#include "NumericalAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
#include "NumericalAlgorithms/Interpolation/CleanUpInterpolator.hpp"
#include "NumericalAlgorithms/Interpolation/InitializeInterpolationTarget.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Actions {
/// - If the InterpolationTarget is sequential
/// - If TemporalIds and PendingTemporalIds were both initially empty,
/// invokes Actions::VerifyTemporalIdsAndSendPoints. (Otherwise there
/// (is an interpolation in progress and nothing needs to be done.)
/// is an interpolation in progress and nothing needs to be done.)
/// - If the InterpolationTarget is not sequential
/// - Invokes Actions::SendPointsToInterpolator on all TemporalIds
/// - Invokes Actions::VerifyTemporalIdsAndSendPoints if PendingTemporalIds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "DataStructures/VariablesTag.hpp"
#include "IO/Logging/Tags.hpp"
#include "IO/Logging/Verbosity.hpp"
#include "NumericalAlgorithms/Interpolation/Actions/SendPointsToInterpolator.hpp"
#include "Parallel/GlobalCache.hpp"
#include "Parallel/Invoke.hpp"
#include "Parallel/Printf.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/NumericalAlgorithms/Interpolation/Interpolate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ namespace Tags {
template <typename TagsList>
struct Variables;
} // namespace Tags
template <size_t Dim> class Mesh;
template <size_t Dim>
class Mesh;
template <size_t VolumeDim>
class ElementId;
namespace intrp {
Expand Down
1 change: 0 additions & 1 deletion src/NumericalAlgorithms/Interpolation/Tags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class ElementId;

namespace intrp {


namespace OptionTags {
/*!
* \ingroup OptionGroupsGroup
Expand Down
21 changes: 19 additions & 2 deletions tests/Unit/ApparentHorizons/Test_ApparentHorizonFinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ void test_apparent_horizon(const gsl::not_null<size_t*> test_horizon_called,
const size_t l_max,
const size_t grid_points_each_dimension,
const double mass,
const std::array<double, 3>& dimensionless_spin) {
const std::array<double, 3>& dimensionless_spin,
const size_t max_its = 100_st) {
using metavars =
MockMetavariables<PostHorizonFindCallback, IsTimeDependent, Frame>;
using interp_component = mock_interpolator<metavars>;
Expand All @@ -269,7 +270,9 @@ void test_apparent_horizon(const gsl::not_null<size_t*> test_horizon_called,
// Options for all InterpolationTargets.
// The initial guess for the horizon search is a sphere of radius 2.8M.
intrp::OptionHolders::ApparentHorizon<Frame> apparent_horizon_opts(
Strahlkorper<Frame>{l_max, 2.8, {{0.0, 0.0, 0.0}}}, FastFlow{},
Strahlkorper<Frame>{l_max, 2.8, {{0.0, 0.0, 0.0}}},
FastFlow{FastFlow::FlowType::Fast, 1.0, 0.5, 1.e-12, 1.e-2, 1.2, 5,
max_its},
Verbosity::Verbose);

std::unique_ptr<DomainCreator<3>> domain_creator;
Expand Down Expand Up @@ -729,4 +732,18 @@ SPECTRE_TEST_CASE(
std::true_type, Frame::Inertial, true>(
&test_schwarzschild_horizon_called, 3, 4, 1.0, {{0.0, 0.0, 0.0}});
}

// [[OutputRegex, Cannot interpolate onto surface]]
SPECTRE_TEST_CASE("Unit.Interpolator.ApparentHorizonFinder.NotConvergedError",
"[Unit]") {
ERROR_TEST();
domain::creators::register_derived_with_charm();
domain::creators::time_dependence::register_derived_with_charm();
domain::FunctionsOfTime::register_derived_with_charm();

test_schwarzschild_horizon_called = 0;
test_apparent_horizon<TestSchwarzschildHorizon<Frame::Inertial>,
std::true_type, Frame::Inertial, true>(
&test_schwarzschild_horizon_called, 3, 4, 1.0, {{0.0, 0.0, 0.0}}, 1);
}
} // namespace

0 comments on commit cb92120

Please sign in to comment.