SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
grmhd::AnalyticData::InitialMagneticFields Namespace Reference

Things related to the initial (seed) magnetic field that can be superposed on GRMHD initial data. More...

Classes

class  InitialMagneticField
 The abstract base class for initial magnetic field configurations. More...
 
class  Poloidal
 Poloidal magnetic field for GRMHD initial data. More...
 
class  Toroidal
 Toroidal magnetic field for GRMHD initial data. More...
 

Typedefs

using initial_magnetic_fields = implementation defined
 Typelist of available InitialMagneticFields.
 

Functions

bool operator!= (const Toroidal &lhs, const Toroidal &rhs)
 

Detailed Description

Things related to the initial (seed) magnetic field that can be superposed on GRMHD initial data.

In many cases we assign magnetic fields in terms of the vector potential, which can be computed as

Bi=naϵaijkjAk=1γ[ijk]jAk,

where [ijk] is the total anti-symmetric symbol.

For example, in the Cartesian coordinates,

Bx=1γ(yAzzAy),By=1γ(zAxxAz),Bz=1γ(xAyyAx).

Warning
The magnetic field classes assume the magnetic field is initialized, both in size and value, before being passed into the variables function. This is so that multiple magnetic fields can be superposed. Each magnetic field configuration does a += to make this possible.