Class HelicalGridTurbulence

Inheritance Relationships

Base Type

Class Documentation

class HelicalGridTurbulence : public SimpleGridTurbulence

Turbulent grid-based magnetic field with a simple power-law spectrum.

Public Functions

HelicalGridTurbulence(const SimpleTurbulenceSpectrum &spectrum, const GridProperties &gridProp, double H, unsigned int seed = 0)

Create a random initialization of a turbulent field.

Parameters

Vector3d getField(const Vector3d &pos) const
virtual Vector3d getField(const Vector3d &position, double z) const
const ref_ptr<Grid3f> &getGrid() const

Return a const reference to the grid

Vector3f getMeanFieldVector() const

Evaluate the mean vector of all grid points

double getMeanFieldStrength() const

Evaluate the mean of all grid points

double getRmsFieldStrength() const

Evaluate the RMS of all grid points

std::array<float, 3> getRmsFieldStrengthPerAxis() const

Evaluate the RMS of all grid points per axis

std::vector<std::pair<int, float>> getPowerSpectrum() const

Evaluate generated power-spectrum

void dumpToFile(std::string filename) const

Dump a Grid3f to a binary file

double getBrms() const
virtual double getCorrelationLength() const
size_t addReference() const
size_t removeReference() const
int removeReferenceNoDelete() const
size_t getReferenceCount() const

Public Static Functions

void initTurbulence(ref_ptr<Grid3f> grid, double Brms, double lMin, double lMax, double alpha, int seed, double H)
void initTurbulence(ref_ptr<Grid3f> grid, double Brms, double lMin, double lMax, double alpha, int seed)
void checkGridRequirements(ref_ptr<Grid3f> grid, double lMin, double lMax)
void executeInverseFFTInplace(ref_ptr<Grid3f> grid, fftwf_complex *Bkx, fftwf_complex *Bky, fftwf_complex *Bkz)

Protected Functions

void initTurbulence()
void initGrid(const GridProperties &grid)

Protected Attributes

unsigned int seed
ref_ptr<Grid3f> gridPtr
const TurbulenceSpectrum &spectrum
size_t _referenceCount