TDMS
Time Domain Maxwell Solver
Loading...
Searching...
No Matches
SplitField Class Referenceabstract

A split field defined over a grid. More...

#include <field.h>

Inheritance diagram for SplitField:
[legend]
Collaboration diagram for SplitField:
[legend]

Public Member Functions

 SplitField ()=default
 SplitField (int I_total, int J_total, int K_total)
void allocate ()
void zero ()
void allocate_and_zero ()
void initialise_fftw_plan (int n_threads, EHVec &eh_vec)
double largest_field_value ()
 Fetches the largest absolute value of the field.
virtual double interpolate_to_centre_of (AxialDirection d, CellCoordinate cell)=0
 Interpolates a SplitField component to the centre of a Yee cell.
Public Member Functions inherited from Grid
int max_IJK_tot () const
void set_preferred_interpolation_methods (tdms_flags::InterpolationMethod im)
 Set the preferred interpolation methods.

Public Attributes

SplitFieldComponent xy
SplitFieldComponent xz
SplitFieldComponent yx
SplitFieldComponent yz
SplitFieldComponent zx
SplitFieldComponent zy
Public Attributes inherited from Grid
IJKDimensions tot = {0, 0, 0}

Protected Member Functions

virtual int delta_n ()=0

Additional Inherited Members

Protected Attributes inherited from Grid
tdms_flags::InterpolationMethod interpolation_method

Detailed Description

A split field defined over a grid.

To reconstruct the components we have e.g.: Ex = Exy + Exz multiplied by a phase factor

Constructor & Destructor Documentation

◆ SplitField() [1/2]

SplitField::SplitField ( )
default

Default no arguments constructor

◆ SplitField() [2/2]

SplitField::SplitField ( int I_total,
int J_total,
int K_total )

Constructor of the field with a defined size in the x, y, z Cartesian dimensions

Member Function Documentation

◆ allocate()

void SplitField::allocate ( )

Allocate the memory appropriate for all the 3D tensors associated with this split field

◆ allocate_and_zero()

void SplitField::allocate_and_zero ( )
inline

Allocate and set to zero all components of the field

◆ initialise_fftw_plan()

void SplitField::initialise_fftw_plan ( int n_threads,
EHVec & eh_vec )

Initialise the fftw plans for all components

Parameters
n_threadsNumber of threads to split over
eh_vec// TODO

◆ interpolate_to_centre_of()

virtual double SplitField::interpolate_to_centre_of ( AxialDirection d,
CellCoordinate cell )
pure virtual

Interpolates a SplitField component to the centre of a Yee cell.

Parameters
dSplitField component to interpolate
cellIndex (i,j,k) of the Yee cell to interpolate to the centre of
Returns
double The interpolated field value

Implemented in CurrentDensitySplitField, ElectricSplitField, and MagneticSplitField.

◆ largest_field_value()

double SplitField::largest_field_value ( )

Fetches the largest absolute value of the field.

Split field values are sums of the corresponding components, so this function returns the largest absolute value of the entries in (xy + xz), (yx + yz), (zx + zy)

Returns
double Largest (by absolute value) field value

◆ zero()

void SplitField::zero ( )

Set all the values of all components of the field to zero

Member Data Documentation

◆ xy

SplitFieldComponent SplitField::xy

Magnitude of the xy component at each grid point (i,j,k)

◆ xz

SplitFieldComponent SplitField::xz

Magnitude of the xz component at each grid point (i,j,k)

◆ yx

SplitFieldComponent SplitField::yx

Magnitude of the yx component at each grid point (i,j,k)

◆ yz

SplitFieldComponent SplitField::yz

Magnitude of the yz component at each grid point (i,j,k)

◆ zx

SplitFieldComponent SplitField::zx

Magnitude of the zx component at each grid point (i,j,k)

◆ zy

SplitFieldComponent SplitField::zy

Magnitude of the zy component at each grid point (i,j,k)


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