From f3b41ad63e3cf7f5161ba96e112a00026e10ee3f Mon Sep 17 00:00:00 2001 From: Lawrence Kidder Date: Tue, 17 Oct 2023 21:05:29 -0400 Subject: [PATCH 1/2] Use NeighborInfo to initialize MortarMesh after AMR --- .../Initialization/Mortars.hpp | 21 ++++++++++++-- .../Initialization/Test_Mortars.cpp | 28 ++++++++++++++----- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/src/Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp b/src/Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp index 8e7600e03590..dab57ab2a852 100644 --- a/src/Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp +++ b/src/Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp @@ -16,6 +16,8 @@ #include "DataStructures/DataBox/DataBoxTag.hpp" #include "DataStructures/DataBox/Prefixes.hpp" #include "DataStructures/Variables.hpp" +#include "Domain/Amr/Info.hpp" +#include "Domain/Amr/Tags/NeighborFlags.hpp" #include "Domain/Creators/Tags/InitialExtents.hpp" #include "Domain/Structure/Direction.hpp" #include "Domain/Structure/Element.hpp" @@ -32,6 +34,7 @@ #include "ParallelAlgorithms/Amr/Protocols/Projector.hpp" #include "ParallelAlgorithms/Initialization/MutateAssign.hpp" #include "Time/TimeStepId.hpp" +#include "Utilities/Gsl.hpp" #include "Utilities/TMPL.hpp" /// \cond @@ -183,7 +186,8 @@ struct ProjectMortars : tt::ConformsTo { evolution::dg::Tags::NormalCovectorAndMagnitude, Tags::MortarDataHistory>; using argument_tags = - tmpl::list, domain::Tags::Element>; + tmpl::list, domain::Tags::Element, + amr::Tags::NeighborInfo>; static void apply( const gsl::not_null<::dg::MortarMap>*> @@ -201,7 +205,8 @@ struct ProjectMortars : tt::ConformsTo { normal_covector_and_magnitude, const gsl::not_null /*mortar_data_history*/, - const Mesh& /*new_mesh*/, const Element& new_element, + const Mesh& new_mesh, const Element& new_element, + const std::unordered_map, amr::Info>& neighbor_info, const std::pair, Element>& /*old_mesh_and_element*/) { static_assert(not Metavariables::local_time_stepping, "AMR with local time-stepping is not yet supported"); @@ -216,7 +221,13 @@ struct ProjectMortars : tt::ConformsTo { for (const auto& neighbor : neighbors) { const auto mortar_id = std::make_pair(direction, neighbor); mortar_data->emplace(mortar_id, MortarData{1}); - mortar_mesh->emplace(mortar_id, Mesh{}); + const auto new_neighbor_mesh = neighbors.orientation().inverse_map()( + neighbor_info.at(neighbor).new_mesh); + mortar_mesh->emplace( + mortar_id, + ::dg::mortar_mesh( + new_mesh.slice_away(direction.dimension()), + new_neighbor_mesh.slice_away(direction.dimension()))); mortar_size->emplace( mortar_id, ::dg::mortar_size(new_element.id(), neighbor, direction.dimension(), @@ -246,6 +257,8 @@ struct ProjectMortars : tt::ConformsTo { const gsl::not_null /*mortar_data_history*/, const Mesh& /*new_mesh*/, const Element& /*new_element*/, + const std::unordered_map, + amr::Info>& /*neighbor_info*/, const tuples::TaggedTuple& /*parent_items*/) { ERROR("h-refinement not implemented yet"); } @@ -268,6 +281,8 @@ struct ProjectMortars : tt::ConformsTo { const gsl::not_null /*mortar_data_history*/, const Mesh& /*new_mesh*/, const Element& /*new_element*/, + const std::unordered_map, + amr::Info>& /*neighbor_info*/, const std::unordered_map, tuples::TaggedTuple>& /*children_items*/) { ERROR("h-refinement not implemented yet"); diff --git a/tests/Unit/Evolution/DiscontinuousGalerkin/Initialization/Test_Mortars.cpp b/tests/Unit/Evolution/DiscontinuousGalerkin/Initialization/Test_Mortars.cpp index 4e47d5dfc41e..b623222c13dd 100644 --- a/tests/Unit/Evolution/DiscontinuousGalerkin/Initialization/Test_Mortars.cpp +++ b/tests/Unit/Evolution/DiscontinuousGalerkin/Initialization/Test_Mortars.cpp @@ -16,6 +16,7 @@ #include "DataStructures/Tensor/Tensor.hpp" #include "DataStructures/Variables.hpp" #include "DataStructures/VariablesTag.hpp" +#include "Domain/Amr/Info.hpp" #include "Domain/Creators/Tags/InitialExtents.hpp" #include "Domain/Structure/CreateInitialMesh.hpp" #include "Domain/Structure/Direction.hpp" @@ -361,6 +362,7 @@ void test_p_refine( mortar_data_history_type& mortar_data_history, const Mesh& old_mesh, Mesh& new_mesh, const Element& old_element, Element& new_element, + std::unordered_map, amr::Info>& neighbor_info, const ::dg::MortarMap< Dim, evolution::dg::MortarData>& /*expected_mortar_data*/, const ::dg::MortarMap>& expected_mortar_mesh, @@ -374,12 +376,13 @@ void test_p_refine( const mortar_data_history_type& expected_mortar_data_history) { auto box = db::create, domain::Tags::Element, - Tags::MortarData, Tags::MortarMesh, Tags::MortarSize, + amr::Tags::NeighborInfo, Tags::MortarData, + Tags::MortarMesh, Tags::MortarSize, Tags::MortarNextTemporalId, evolution::dg::Tags::NormalCovectorAndMagnitude, Tags::MortarDataHistory::type>>>( - std::move(new_mesh), std::move(new_element), std::move(mortar_data), - std::move(mortar_mesh), std::move(mortar_size), + std::move(new_mesh), std::move(new_element), std::move(neighbor_info), + std::move(mortar_data), std::move(mortar_mesh), std::move(mortar_size), std::move(mortar_next_temporal_id), std::move(normal_covector_and_magnitude), std::move(mortar_data_history)); @@ -452,6 +455,8 @@ void test_p_refine_gts() { Spectral::Quadrature::GaussLobatto}; Mesh new_mesh{3, Spectral::Basis::Legendre, Spectral::Quadrature::GaussLobatto}; + Mesh neighbor_mesh{5, Spectral::Basis::Legendre, + Spectral::Quadrature::GaussLobatto}; const auto old_element = make_element(); auto new_element = make_element(); @@ -469,10 +474,14 @@ void test_p_refine_gts() { mortar_data_history_type mortar_data_history{}; ::dg::MortarMap mortar_next_temporal_ids{}; + std::unordered_map, amr::Info> neighbor_info{}; for (const auto& [direction, neighbors] : old_element.neighbors()) { for (const auto& neighbor : neighbors) { const auto mortar_id = std::make_pair(direction, neighbor); mortar_next_temporal_ids.emplace(mortar_id, next_temporal_id); + neighbor_info.emplace( + neighbor, + amr::Info{std::array{}, neighbor_mesh}); } } @@ -491,7 +500,11 @@ void test_p_refine_gts() { for (const auto& neighbor : neighbors) { const auto mortar_id = std::make_pair(direction, neighbor); expected_mortar_data.emplace(mortar_id, MortarData{1}); - expected_mortar_mesh.emplace(mortar_id, Mesh{}); + expected_mortar_mesh.emplace( + mortar_id, + ::dg::mortar_mesh(new_mesh.slice_away(direction.dimension()), + neighbor_info.at(neighbor).new_mesh.slice_away( + direction.dimension()))); expected_mortar_size.emplace( mortar_id, ::dg::mortar_size(new_element.id(), neighbor, direction.dimension(), @@ -506,9 +519,10 @@ void test_p_refine_gts() { test_p_refine( mortar_data, mortar_mesh, mortar_size, mortar_next_temporal_ids, normal_covector_and_magnitude, mortar_data_history, old_mesh, new_mesh, - old_element, new_element, expected_mortar_data, expected_mortar_mesh, - expected_mortar_size, expected_mortar_next_temporal_ids, - expected_normal_covector_and_magnitude, expected_mortar_data_history); + old_element, new_element, neighbor_info, expected_mortar_data, + expected_mortar_mesh, expected_mortar_size, + expected_mortar_next_temporal_ids, expected_normal_covector_and_magnitude, + expected_mortar_data_history); } } // namespace From fd25de715499114cd4633b7bbc9513b2deff0684 Mon Sep 17 00:00:00 2001 From: Lawrence Kidder Date: Tue, 17 Oct 2023 21:09:06 -0400 Subject: [PATCH 2/2] Enable AMR for ScalarWave Currently only works for global time stepping. The 2D and 3D input files do not do any AMR, look at the 1D examples to actually perform AMR. --- .../Executables/ScalarWave/CMakeLists.txt | 3 + .../ScalarWave/EvolveScalarWave.cpp | 5 +- .../ScalarWave/EvolveScalarWave.hpp | 93 +++++++++++++++---- src/Parallel/PhaseControl/Factory.hpp | 5 +- tests/InputFiles/ScalarWave/PlaneWave1D.yaml | 29 +++--- .../PlaneWave1DEventsAndTriggersExample.yaml | 21 ++++- .../ScalarWave/PlaneWave1DObserveExample.yaml | 25 +++-- tests/InputFiles/ScalarWave/PlaneWave2D.yaml | 18 +--- tests/InputFiles/ScalarWave/PlaneWave3D.yaml | 12 +-- 9 files changed, 149 insertions(+), 62 deletions(-) diff --git a/src/Evolution/Executables/ScalarWave/CMakeLists.txt b/src/Evolution/Executables/ScalarWave/CMakeLists.txt index a83cdcf1d912..0abff5be4a8a 100644 --- a/src/Evolution/Executables/ScalarWave/CMakeLists.txt +++ b/src/Evolution/Executables/ScalarWave/CMakeLists.txt @@ -3,6 +3,9 @@ set(LIBS_TO_LINK Charmxx::main + Amr + AmrCriteria + AmrProjectors CoordinateMaps DiscontinuousGalerkin DomainCreators diff --git a/src/Evolution/Executables/ScalarWave/EvolveScalarWave.cpp b/src/Evolution/Executables/ScalarWave/EvolveScalarWave.cpp index 591d921e2cc4..6ec77a7cfb70 100644 --- a/src/Evolution/Executables/ScalarWave/EvolveScalarWave.cpp +++ b/src/Evolution/Executables/ScalarWave/EvolveScalarWave.cpp @@ -10,6 +10,7 @@ #include "Domain/FunctionsOfTime/RegisterDerivedWithCharm.hpp" #include "Evolution/Systems/ScalarWave/BoundaryCorrections/RegisterDerived.hpp" #include "Parallel/CharmMain.tpp" +#include "ParallelAlgorithms/Amr/Actions/RegisterCallbacks.hpp" #include "Utilities/Serialization/RegisterDerivedClassesWithCharm.hpp" // Chosen in CMakeLists.txt @@ -22,6 +23,8 @@ extern "C" void CkRegisterMainModule() { &domain::creators::time_dependence::register_derived_with_charm, &domain::FunctionsOfTime::register_derived_with_charm, &ScalarWave::BoundaryCorrections::register_derived_with_charm, - ®ister_factory_classes_with_charm}, + ®ister_factory_classes_with_charm, + &amr::register_callbacks}, {}); } diff --git a/src/Evolution/Executables/ScalarWave/EvolveScalarWave.hpp b/src/Evolution/Executables/ScalarWave/EvolveScalarWave.hpp index e85a5e7e22c3..439339f2b353 100644 --- a/src/Evolution/Executables/ScalarWave/EvolveScalarWave.hpp +++ b/src/Evolution/Executables/ScalarWave/EvolveScalarWave.hpp @@ -17,7 +17,7 @@ #include "Evolution/ComputeTags.hpp" #include "Evolution/DiscontinuousGalerkin/Actions/ApplyBoundaryCorrections.hpp" #include "Evolution/DiscontinuousGalerkin/Actions/ComputeTimeDerivative.hpp" -#include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp" // IWYU pragma: keep +#include "Evolution/DiscontinuousGalerkin/DgElementArray.hpp" #include "Evolution/DiscontinuousGalerkin/Initialization/Mortars.hpp" #include "Evolution/DiscontinuousGalerkin/Initialization/QuadratureTag.hpp" #include "Evolution/EventsAndDenseTriggers/DenseTrigger.hpp" @@ -35,12 +35,12 @@ #include "Evolution/Systems/ScalarWave/System.hpp" #include "Evolution/Tags/Filter.hpp" #include "IO/Observer/Actions/RegisterEvents.hpp" -#include "IO/Observer/Helpers.hpp" // IWYU pragma: keep -#include "IO/Observer/ObserverComponent.hpp" // IWYU pragma: keep +#include "IO/Observer/Helpers.hpp" +#include "IO/Observer/ObserverComponent.hpp" #include "NumericalAlgorithms/DiscontinuousGalerkin/Formulation.hpp" #include "NumericalAlgorithms/DiscontinuousGalerkin/Tags.hpp" #include "NumericalAlgorithms/LinearOperators/ExponentialFilter.hpp" -#include "NumericalAlgorithms/LinearOperators/FilterAction.hpp" // IWYU pragma: keep +#include "NumericalAlgorithms/LinearOperators/FilterAction.hpp" #include "Options/Protocols/FactoryCreation.hpp" #include "Options/String.hpp" #include "Parallel/Local.hpp" @@ -56,26 +56,40 @@ #include "ParallelAlgorithms/Actions/InitializeItems.hpp" #include "ParallelAlgorithms/Actions/MutateApply.hpp" #include "ParallelAlgorithms/Actions/TerminatePhase.hpp" +#include "ParallelAlgorithms/Amr/Actions/CollectDataFromChildren.hpp" +#include "ParallelAlgorithms/Amr/Actions/Component.hpp" +#include "ParallelAlgorithms/Amr/Actions/CreateChild.hpp" +#include "ParallelAlgorithms/Amr/Actions/Initialize.hpp" +#include "ParallelAlgorithms/Amr/Actions/SendAmrDiagnostics.hpp" +#include "ParallelAlgorithms/Amr/Criteria/Criterion.hpp" +#include "ParallelAlgorithms/Amr/Criteria/DriveToTarget.hpp" +#include "ParallelAlgorithms/Amr/Criteria/Random.hpp" +#include "ParallelAlgorithms/Amr/Criteria/Tags/Criteria.hpp" +#include "ParallelAlgorithms/Amr/Criteria/TruncationError.hpp" +#include "ParallelAlgorithms/Amr/Projectors/DefaultInitialize.hpp" +#include "ParallelAlgorithms/Amr/Projectors/Tensors.hpp" +#include "ParallelAlgorithms/Amr/Projectors/Variables.hpp" +#include "ParallelAlgorithms/Amr/Protocols/AmrMetavariables.hpp" #include "ParallelAlgorithms/Events/Factory.hpp" // IWYU pragma: keep #include "ParallelAlgorithms/Events/Tags.hpp" #include "ParallelAlgorithms/EventsAndTriggers/Completion.hpp" #include "ParallelAlgorithms/EventsAndTriggers/Event.hpp" -#include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp" // IWYU pragma: keep +#include "ParallelAlgorithms/EventsAndTriggers/EventsAndTriggers.hpp" #include "ParallelAlgorithms/EventsAndTriggers/LogicalTriggers.hpp" #include "ParallelAlgorithms/EventsAndTriggers/Trigger.hpp" #include "PointwiseFunctions/AnalyticData/AnalyticData.hpp" #include "PointwiseFunctions/AnalyticSolutions/AnalyticSolution.hpp" #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp" #include "PointwiseFunctions/AnalyticSolutions/WaveEquation/Factory.hpp" -#include "PointwiseFunctions/AnalyticSolutions/WaveEquation/PlaneWave.hpp" // IWYU pragma: keep -#include "PointwiseFunctions/AnalyticSolutions/WaveEquation/RegularSphericalWave.hpp" // IWYU pragma: keep +#include "PointwiseFunctions/AnalyticSolutions/WaveEquation/PlaneWave.hpp" +#include "PointwiseFunctions/AnalyticSolutions/WaveEquation/RegularSphericalWave.hpp" #include "PointwiseFunctions/MathFunctions/Factory.hpp" #include "PointwiseFunctions/MathFunctions/MathFunction.hpp" -#include "Time/Actions/AdvanceTime.hpp" // IWYU pragma: keep -#include "Time/Actions/ChangeSlabSize.hpp" // IWYU pragma: keep -#include "Time/Actions/RecordTimeStepperData.hpp" // IWYU pragma: keep -#include "Time/Actions/SelfStartActions.hpp" // IWYU pragma: keep -#include "Time/Actions/UpdateU.hpp" // IWYU pragma: keep +#include "Time/Actions/AdvanceTime.hpp" +#include "Time/Actions/ChangeSlabSize.hpp" +#include "Time/Actions/RecordTimeStepperData.hpp" +#include "Time/Actions/SelfStartActions.hpp" +#include "Time/Actions/UpdateU.hpp" #include "Time/StepChoosers/ByBlock.hpp" #include "Time/StepChoosers/Factory.hpp" #include "Time/StepChoosers/StepChooser.hpp" @@ -115,7 +129,7 @@ struct EvolutionMetavars { static constexpr dg::Formulation dg_formulation = dg::Formulation::StrongInertial; using temporal_id = Tags::TimeStepId; - static constexpr bool local_time_stepping = true; + static constexpr bool local_time_stepping = false; using analytic_solution_fields = typename system::variables_tag::tags_list; using deriv_compute = ::Tags::DerivCompute< @@ -152,6 +166,11 @@ struct EvolutionMetavars { struct factory_creation : tt::ConformsTo { using factory_classes = tmpl::map< + tmpl::pair, + amr::Criteria::TruncationError< + volume_dim, + typename system::variables_tag::tags_list>>>, tmpl::pair, tmpl::pair, domain_creators>, tmpl::pair { + using projectors = tmpl::list< + Initialization::ProjectTimeStepping, + evolution::dg::Initialization::ProjectDomain, + Initialization::ProjectTimeStepperHistory, + ::amr::projectors::ProjectVariables, + ::amr::projectors::ProjectTensors, + evolution::dg::Initialization::ProjectMortars, + evolution::Actions::ProjectRunEventsAndDenseTriggers, + ::amr::projectors::DefaultInitialize< + Initialization::Tags::InitialTimeDelta, + Initialization::Tags::InitialSlabSize, + ::domain::Tags::InitialExtents, + ::domain::Tags::InitialRefinementLevels, + evolution::dg::Tags::Quadrature, + evolution::dg::Tags::NeighborMesh, + Tags::StepperError, + Tags::PreviousStepperError, + Tags::StepperErrorUpdated, + SelfStart::Tags::InitialValue, + SelfStart::Tags::InitialValue, + SelfStart::Tags::InitialValue>>>; + }; + using step_actions = tmpl::flatten, @@ -222,7 +267,8 @@ struct EvolutionMetavars { tmpl::list<>>>>; using const_global_cache_tags = - tmpl::list; + tmpl::list; using dg_registration_list = tmpl::list; @@ -231,6 +277,7 @@ struct EvolutionMetavars { Initialization::Actions::InitializeItems< Initialization::TimeStepping, evolution::dg::Initialization::Domain, + ::amr::Initialization::Initialize, Initialization::TimeStepperHistory>, Initialization::Actions::NonconservativeSystem, evolution::Initialization::Actions::SetVariables< @@ -257,6 +304,10 @@ struct EvolutionMetavars { tmpl::list>, + Parallel::PhaseActions>, + Parallel::PhaseActions< Parallel::Phase::Evolve, tmpl::list, + tmpl::list<::amr::Component, + observers::Observer, observers::ObserverWriter, dg_element_array>; @@ -279,10 +331,13 @@ struct EvolutionMetavars { "Evolve a Scalar Wave in Dim spatial dimension.\n\n" "The numerical flux is: UpwindFlux\n"}; - static constexpr std::array default_phase_order{ - {Parallel::Phase::Initialization, - Parallel::Phase::InitializeTimeStepperHistory, Parallel::Phase::Register, - Parallel::Phase::Evolve, Parallel::Phase::Exit}}; + static constexpr auto default_phase_order = + std::array{Parallel::Phase::Initialization, + Parallel::Phase::InitializeTimeStepperHistory, + Parallel::Phase::Register, + Parallel::Phase::CheckDomain, + Parallel::Phase::Evolve, + Parallel::Phase::Exit}; // NOLINTNEXTLINE(google-runtime-references) void pup(PUP::er& /*p*/) {} diff --git a/src/Parallel/PhaseControl/Factory.hpp b/src/Parallel/PhaseControl/Factory.hpp index 3e57e2c294d9..b0fd4f4bb916 100644 --- a/src/Parallel/PhaseControl/Factory.hpp +++ b/src/Parallel/PhaseControl/Factory.hpp @@ -10,7 +10,10 @@ namespace PhaseControl { using factory_creatable_classes = - tmpl::list, + tmpl::list, + VisitAndReturn, + VisitAndReturn, + VisitAndReturn, VisitAndReturn, CheckpointAndExitAfterWallclock>; } diff --git a/tests/InputFiles/ScalarWave/PlaneWave1D.yaml b/tests/InputFiles/ScalarWave/PlaneWave1D.yaml index 0d8efdec01ba..8c0fe03ed3af 100644 --- a/tests/InputFiles/ScalarWave/PlaneWave1D.yaml +++ b/tests/InputFiles/ScalarWave/PlaneWave1D.yaml @@ -10,6 +10,7 @@ Testing: ResourceInfo: AvoidGlobalProc0: false + Singletons: Auto InitialData: &InitialData PlaneWave: @@ -21,25 +22,31 @@ InitialData: &InitialData Wavenumber: 1.0 Phase: 0.0 +Amr: + Criteria: + - TruncationError: + VariablesToMonitor: [Psi] + AbsoluteTarget: 1.e-6 + RelativeTarget: 1.0 + Verbosity: Verbose + PhaseChangeAndTriggers: + - Trigger: + Slabs: + EvenlySpaced: + Interval: 1 + Offset: 0 + PhaseChanges: + - VisitAndReturn(EvaluateAmrCriteria) + - VisitAndReturn(AdjustDomain) + - VisitAndReturn(CheckDomain) Evolution: InitialTime: 0.0 InitialTimeStep: 0.001 - InitialSlabSize: 0.1 TimeStepper: AdamsBashforth: Order: 3 - StepChoosers: - - PreventRapidIncrease - - Increase: - Factor: 2 - - ErrorControl: - AbsoluteTolerance: 1.0e-5 - RelativeTolerance: 1.0e-5 - MaxFactor: 10000.0 - MinFactor: 0.0 - SafetyFactor: 0.9 DomainCreator: RotatedIntervals: diff --git a/tests/InputFiles/ScalarWave/PlaneWave1DEventsAndTriggersExample.yaml b/tests/InputFiles/ScalarWave/PlaneWave1DEventsAndTriggersExample.yaml index 73d7e21c8bbf..5b78eeda631b 100644 --- a/tests/InputFiles/ScalarWave/PlaneWave1DEventsAndTriggersExample.yaml +++ b/tests/InputFiles/ScalarWave/PlaneWave1DEventsAndTriggersExample.yaml @@ -12,6 +12,7 @@ ExpectedOutput: ResourceInfo: AvoidGlobalProc0: false + Singletons: Auto InitialData: PlaneWave: @@ -23,17 +24,31 @@ InitialData: Wavenumber: 1.0 Phase: 0.0 +Amr: + Criteria: + - TruncationError: + VariablesToMonitor: [Psi] + AbsoluteTarget: 1.e-6 + RelativeTarget: 1.0 + Verbosity: Verbose + PhaseChangeAndTriggers: + - Trigger: + Slabs: + EvenlySpaced: + Interval: 1 + Offset: 0 + PhaseChanges: + - VisitAndReturn(EvaluateAmrCriteria) + - VisitAndReturn(AdjustDomain) + - VisitAndReturn(CheckDomain) Evolution: InitialTime: 0.0 InitialTimeStep: 0.001 - InitialSlabSize: 0.01 TimeStepper: AdamsBashforth: Order: 3 - StepChoosers: - - Constant: 0.001 DomainCreator: Interval: diff --git a/tests/InputFiles/ScalarWave/PlaneWave1DObserveExample.yaml b/tests/InputFiles/ScalarWave/PlaneWave1DObserveExample.yaml index 55258301e951..2e501c2ab7eb 100644 --- a/tests/InputFiles/ScalarWave/PlaneWave1DObserveExample.yaml +++ b/tests/InputFiles/ScalarWave/PlaneWave1DObserveExample.yaml @@ -13,6 +13,7 @@ ExpectedOutput: ResourceInfo: AvoidGlobalProc0: false + Singletons: Auto InitialData: PlaneWave: @@ -24,22 +25,32 @@ InitialData: Wavenumber: 1.0 Phase: 0.0 +Amr: + Criteria: + - TruncationError: + VariablesToMonitor: [Psi] + AbsoluteTarget: 1.e-6 + RelativeTarget: 1.0 + Verbosity: Verbose + PhaseChangeAndTriggers: + - Trigger: + Slabs: + EvenlySpaced: + Interval: 10 + Offset: 0 + PhaseChanges: + - VisitAndReturn(EvaluateAmrCriteria) + - VisitAndReturn(AdjustDomain) + - VisitAndReturn(CheckDomain) Evolution: InitialTime: &InitialTime 0.0 InitialTimeStep: 0.001 - InitialSlabSize: 0.01 TimeStepper: AdamsBashforth: Order: 3 - StepChoosers: - - Constant: 0.05 - - Increase: - Factor: 2 - - Cfl: - SafetyFactor: 0.2 DomainCreator: Interval: diff --git a/tests/InputFiles/ScalarWave/PlaneWave2D.yaml b/tests/InputFiles/ScalarWave/PlaneWave2D.yaml index 72c392fd4696..2e431e75dafd 100644 --- a/tests/InputFiles/ScalarWave/PlaneWave2D.yaml +++ b/tests/InputFiles/ScalarWave/PlaneWave2D.yaml @@ -11,6 +11,7 @@ ExpectedOutput: ResourceInfo: AvoidGlobalProc0: false + Singletons: Auto InitialData: PlaneWave: @@ -22,27 +23,18 @@ InitialData: Wavenumber: 1.0 Phase: 0.0 +Amr: + Criteria: + Verbosity: Verbose + PhaseChangeAndTriggers: Evolution: InitialTime: &initial_time 0.0 InitialTimeStep: 0.001 - InitialSlabSize: 0.01 TimeStepper: AdamsBashforth: Order: 3 - StepChoosers: - - Constant: 0.05 - - Increase: - Factor: 2 - - ElementSizeCfl: - SafetyFactor: 0.5 - - ErrorControl: - AbsoluteTolerance: 1e-6 - RelativeTolerance: 1e-4 - MaxFactor: 2 - MinFactor: 0.25 - SafetyFactor: 0.95 DomainCreator: diff --git a/tests/InputFiles/ScalarWave/PlaneWave3D.yaml b/tests/InputFiles/ScalarWave/PlaneWave3D.yaml index 04b839f9de2d..566bd8b3154f 100644 --- a/tests/InputFiles/ScalarWave/PlaneWave3D.yaml +++ b/tests/InputFiles/ScalarWave/PlaneWave3D.yaml @@ -9,6 +9,7 @@ Testing: ResourceInfo: AvoidGlobalProc0: false + Singletons: Auto InitialData: PlaneWave: @@ -20,22 +21,19 @@ InitialData: Wavenumber: 1.0 Phase: 0.0 +Amr: + Criteria: + Verbosity: Verbose + PhaseChangeAndTriggers: Evolution: InitialTime: 0.0 # Test backwards evolution in an integration test InitialTimeStep: -0.001 - InitialSlabSize: 0.01 TimeStepper: AdamsBashforth: Order: 3 - StepChoosers: - - Constant: 0.05 - - Increase: - Factor: 2 - - Cfl: - SafetyFactor: 0.2 DomainCreator: Brick: