SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
gh::ConstraintDamping::TimeDependentTripleGaussian Class Reference

A sum of three Gaussians plus a constant, where the Gaussian widths are scaled by a domain::FunctionsOfTime::FunctionOfTime. More...

#include <TimeDependentTripleGaussian.hpp>

Classes

struct  Amplitude
 
struct  Center
 
struct  Constant
 
struct  Gaussian
 
struct  MovementMethod
 How to track the movement of the compact objects. More...
 
struct  Width
 

Public Types

using options = implementation defined
 
- Public Types inherited from gh::ConstraintDamping::DampingFunction< 3, Frame::Grid >
using creatable_classes = implementation defined
 
using frame = Frame::Grid
 

Public Member Functions

 TimeDependentTripleGaussian (CkMigrateMessage *msg)
 
 TimeDependentTripleGaussian (double constant, double amplitude_1, double width_1, const std::optional< std::array< double, 3 > > &center_1, double amplitude_2, double width_2, const std::optional< std::array< double, 3 > > &center_2, double amplitude_3, double width_3, const std::array< double, 3 > &center_3, const std::string &movement_method, const Options::Context &context={})
 
 TimeDependentTripleGaussian (const TimeDependentTripleGaussian &)=default
 
TimeDependentTripleGaussianoperator= (const TimeDependentTripleGaussian &)=default
 
 TimeDependentTripleGaussian (TimeDependentTripleGaussian &&)=default
 
TimeDependentTripleGaussianoperator= (TimeDependentTripleGaussian &&)=default
 
void operator() (gsl::not_null< Scalar< double > * > value_at_x, const tnsr::I< double, 3, Frame::Grid > &x, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const override
 
void operator() (gsl::not_null< Scalar< DataVector > * > value_at_x, const tnsr::I< DataVector, 3, Frame::Grid > &x, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const override
 
auto get_clone () const -> std::unique_ptr< DampingFunction< 3, Frame::Grid > > override
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from gh::ConstraintDamping::DampingFunction< 3, Frame::Grid >
 WRAPPED_PUPable_abstract (DampingFunction)
 
 DampingFunction (const DampingFunction &)=default
 
 DampingFunction (DampingFunction &&)=default
 
 DampingFunction (CkMigrateMessage *msg)
 
DampingFunctionoperator= (const DampingFunction &)=default
 
DampingFunctionoperator= (DampingFunction &&)=default
 
virtual auto get_clone () const -> std::unique_ptr< DampingFunction< VolumeDim, Frame::Grid > >=0
 
virtual void operator() (const gsl::not_null< Scalar< double > * > value_at_x, const tnsr::I< double, VolumeDim, Frame::Grid > &x, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const=0
 Returns the value of the function at the coordinate 'x'.
 
virtual void operator() (const gsl::not_null< Scalar< DataVector > * > value_at_x, const tnsr::I< DataVector, VolumeDim, Frame::Grid > &x, double time, const std::unordered_map< std::string, std::unique_ptr< domain::FunctionsOfTime::FunctionOfTime > > &functions_of_time) const=0
 Returns the value of the function at the coordinate 'x'.
 

Static Public Attributes

static constexpr Options::String help
 
- Static Public Attributes inherited from gh::ConstraintDamping::DampingFunction< 3, Frame::Grid >
static constexpr size_t volume_dim
 

Friends

bool operator== (const TimeDependentTripleGaussian &lhs, const TimeDependentTripleGaussian &rhs)
 

Detailed Description

A sum of three Gaussians plus a constant, where the Gaussian widths are scaled by a domain::FunctionsOfTime::FunctionOfTime.

Details

The function f is given by

(1)f=C+α=13Aαexp((x(x0)α)2wα2(t)).

Input file options are: Constant C, Amplitude[1-3] Aα, Width[1-3] wα, and Center[1-3] (x0)α. The function takes input coordinates x of type tnsr::I<T, 3, Frame::Grid>, where T is e.g. double or DataVector; note that this DampingFunction is only defined for three spatial dimensions and for the grid frame. The Gaussian widths wα are scaled by the inverse of the value of a scalar domain::FunctionsOfTime::FunctionOfTime f(t): wα(t)=wα/f(t).

You can choose one of two methods for tracking the object centers. ExpansionFactor should be used for BBH simulations where the expansion control system is used to track the objects. ObjectCenters sholud be used for BNS simulations where the coordinate centers of the two stars is tracked separately and there is no expansion control system.

Member Function Documentation

◆ get_clone()

auto gh::ConstraintDamping::TimeDependentTripleGaussian::get_clone ( ) const -> std::unique_ptr< DampingFunction< 3, Frame::Grid > >
overridevirtual

Member Data Documentation

◆ help

constexpr Options::String gh::ConstraintDamping::TimeDependentTripleGaussian::help
staticconstexpr
Initial value:
= {
"Computes a sum of a constant and 3 Gaussians (each with its own "
"amplitude, width, and coordinate center), with the Gaussian widths "
"scaled by the inverse of a FunctionOfTime."}

The documentation for this class was generated from the following file: