Skip to content

Commit

Permalink
Add gaussian plus constant for ScalarTensor
Browse files Browse the repository at this point in the history
  • Loading branch information
guilara committed Jun 27, 2024
1 parent 3f82fdb commit 54330ed
Show file tree
Hide file tree
Showing 18 changed files with 644 additions and 253 deletions.
30 changes: 16 additions & 14 deletions src/Evolution/Executables/ScalarTensor/ScalarTensorBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "Evolution/Systems/ScalarTensor/BoundaryConditions/ProductOfConditions.hpp"
#include "Evolution/Systems/ScalarTensor/BoundaryCorrections/Factory.hpp"
#include "Evolution/Systems/ScalarTensor/BoundaryCorrections/ProductOfCorrections.hpp"
#include "Evolution/Systems/ScalarTensor/ConstraintDamping/Tags.hpp"
#include "Evolution/Systems/ScalarTensor/Initialize.hpp"
#include "Evolution/Systems/ScalarTensor/Sources/ScalarSource.hpp"
#include "Evolution/Systems/ScalarTensor/StressEnergy.hpp"
Expand Down Expand Up @@ -398,24 +399,25 @@ struct ScalarTensorTemplateBase {
ScalarTensor::Initialization::scalar_tensor_3plus1_compute_tags<
volume_dim>>,
Actions::MutateApply<gh::gauges::SetPiAndPhiFromConstraints<volume_dim>>,
Initialization::Actions::AddSimpleTags<
CurvedScalarWave::Initialization::InitializeConstraintDampingGammas<
volume_dim>>,
Parallel::Actions::TerminatePhase>;

// A tmpl::list of tags to be added to the GlobalCache by the
// metavariables
using const_global_cache_tags =
tmpl::list<gh::gauges::Tags::GaugeCondition,
evolution::initial_data::Tags::InitialData,
gh::ConstraintDamping::Tags::DampingFunctionGamma0<
volume_dim, Frame::Grid>,
gh::ConstraintDamping::Tags::DampingFunctionGamma1<
volume_dim, Frame::Grid>,
gh::ConstraintDamping::Tags::DampingFunctionGamma2<
volume_dim, Frame::Grid>,
// Source parameters
ScalarTensor::Tags::ScalarMass>;
using const_global_cache_tags = tmpl::list<
gh::gauges::Tags::GaugeCondition,
evolution::initial_data::Tags::InitialData,
gh::ConstraintDamping::Tags::DampingFunctionGamma0<volume_dim,
Frame::Grid>,
gh::ConstraintDamping::Tags::DampingFunctionGamma1<volume_dim,
Frame::Grid>,
gh::ConstraintDamping::Tags::DampingFunctionGamma2<volume_dim,
Frame::Grid>,
ScalarTensor::ConstraintDamping::Tags::DampingFunctionGamma1<volume_dim,
Frame::Grid>,
ScalarTensor::ConstraintDamping::Tags::DampingFunctionGamma2<volume_dim,
Frame::Grid>,
// Source parameters
ScalarTensor::Tags::ScalarMass>;

using dg_registration_list =
tmpl::list<observers::Actions::RegisterEventsWithObservers>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
spectre_target_sources(
${LIBRARY}
PRIVATE
Constant.cpp
GaussianPlusConstant.cpp
RegisterDerivedWithCharm.cpp
TimeDependentTripleGaussian.cpp
)

spectre_target_headers(
${LIBRARY}
INCLUDE_DIRECTORY ${CMAKE_SOURCE_DIR}/src
HEADERS
Constant.hpp
DampingFunction.hpp
GaussianPlusConstant.hpp
RegisterDerivedWithCharm.hpp
Tags.hpp
TimeDependentTripleGaussian.hpp
)

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ class FunctionOfTime;
namespace gh::ConstraintDamping {
/// \cond
template <size_t VolumeDim, typename Fr>
class Constant;
template <size_t VolumeDim, typename Fr>
class GaussianPlusConstant;
class TimeDependentTripleGaussian;
/// \endcond

/*!
Expand All @@ -42,11 +39,8 @@ class DampingFunction : public PUP::able {
public:
using creatable_classes = tmpl::conditional_t<
(VolumeDim == 3 and std::is_same<Fr, Frame::Grid>::value),
tmpl::list<gh::ConstraintDamping::Constant<VolumeDim, Fr>,
gh::ConstraintDamping::GaussianPlusConstant<VolumeDim, Fr>,
gh::ConstraintDamping::TimeDependentTripleGaussian>,
tmpl::list<gh::ConstraintDamping::GaussianPlusConstant<VolumeDim, Fr>,
gh::ConstraintDamping::Constant<VolumeDim, Fr>>>;
tmpl::list<gh::ConstraintDamping::GaussianPlusConstant<VolumeDim, Fr>>,
tmpl::list<gh::ConstraintDamping::GaussianPlusConstant<VolumeDim, Fr>>>;
constexpr static size_t volume_dim = VolumeDim;
using frame = Fr;

Expand Down Expand Up @@ -84,6 +78,4 @@ class DampingFunction : public PUP::able {
};
} // namespace gh::ConstraintDamping

#include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/Constant.hpp"
#include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/GaussianPlusConstant.hpp"
#include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/TimeDependentTripleGaussian.hpp"
1 change: 1 addition & 0 deletions src/Evolution/Systems/ScalarTensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ target_link_libraries(

add_subdirectory(BoundaryConditions)
add_subdirectory(BoundaryCorrections)
add_subdirectory(ConstraintDamping)
add_subdirectory(Sources)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Distributed under the MIT License.
# See LICENSE.txt for details.

spectre_target_sources(
${LIBRARY}
PRIVATE
GaussianPlusConstant.cpp
RegisterDerivedWithCharm.cpp
TimeDependentTripleGaussian.cpp
)

spectre_target_headers(
${LIBRARY}
INCLUDE_DIRECTORY ${CMAKE_SOURCE_DIR}/src
HEADERS
ConstraintGammas.hpp
DampingFunction.hpp
GaussianPlusConstant.hpp
RegisterDerivedWithCharm.hpp
Tags.hpp
TimeDependentTripleGaussian.hpp
)
Loading

0 comments on commit 54330ed

Please sign in to comment.