SpECTRE
v2025.03.17
|
Toroidal magnetic field for GRMHD initial data. More...
#include <Toroidal.hpp>
Classes | |
struct | Center |
struct | CutoffPressure |
struct | MaxDistanceFromCenter |
struct | PressureExponent |
struct | VectorPotentialAmplitude |
Public Types | |
using | options = implementation defined |
Public Member Functions | |
Toroidal (const Toroidal &)=default | |
Toroidal & | operator= (const Toroidal &)=default |
Toroidal (Toroidal &&)=default | |
Toroidal & | operator= (Toroidal &&)=default |
Toroidal (size_t pressure_exponent, double cutoff_pressure, double vector_potential_amplitude, std::array< double, 3 > center, double max_distance_from_center) | |
auto | get_clone () const -> std::unique_ptr< InitialMagneticField > override |
void | pup (PUP::er &p) override |
void | variables (gsl::not_null< tnsr::I< DataVector, 3 > * > result, const tnsr::I< DataVector, 3 > &coords, const Scalar< DataVector > &pressure, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::i< DataVector, 3 > &deriv_pressure) const override |
Retrieve magnetic fields at (x) More... | |
void | variables (gsl::not_null< tnsr::I< double, 3 > * > result, const tnsr::I< double, 3 > &coords, const Scalar< double > &pressure, const Scalar< double > &sqrt_det_spatial_metric, const tnsr::i< double, 3 > &deriv_pressure) const override |
Retrieve magnetic fields at (x) More... | |
bool | is_equal (const InitialMagneticField &rhs) const override |
virtual auto | get_clone () const -> std::unique_ptr< InitialMagneticField >=0 |
virtual void | variables (gsl::not_null< tnsr::I< DataVector, 3 > * > result, const tnsr::I< DataVector, 3 > &coords, const Scalar< DataVector > &pressure, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::i< DataVector, 3 > &deriv_pressure) const =0 |
virtual void | variables (gsl::not_null< tnsr::I< double, 3 > * > result, const tnsr::I< double, 3 > &coords, const Scalar< double > &pressure, const Scalar< double > &sqrt_det_spatial_metric, const tnsr::i< double, 3 > &deriv_pressure) const =0 |
virtual bool | is_equal (const InitialMagneticField &rhs) const =0 |
Static Public Attributes | |
static constexpr Options::String | help = {"Toroidal initial magnetic field"} |
Friends | |
bool | operator== (const Toroidal &lhs, const Toroidal &rhs) |
Toroidal magnetic field for GRMHD initial data.
The vector potential has the form
where
On the region where the field is non-zero, the magnetic field is given by:
Note that the coordinates are relative to the Center
passed in, so the field can be centered about any arbitrary point. The field is also zero outside of MaxDistanceFromCenter
, so that compact support can be imposed if necessary.
variables
function. This is so that multiple magnetic fields can be superposed. Each magnetic field configuration does a +=
to make this possible.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Retrieve magnetic fields at (x)
Implements grmhd::AnalyticData::InitialMagneticFields::InitialMagneticField.
|
overridevirtual |
Retrieve magnetic fields at (x)
Implements grmhd::AnalyticData::InitialMagneticFields::InitialMagneticField.