TDMS
Time Domain Maxwell Solver
Loading...
Searching...
No Matches
ElectricField Class Reference
Inheritance diagram for ElectricField:
[legend]
Collaboration diagram for ElectricField:
[legend]

Public Member Functions

 ElectricField (int I_total, int J_total, int K_total)
std::complex< double > interpolate_to_centre_of (AxialDirection d, CellCoordinate cell) override
 Interpolates an E-field component to the centre of a Yee cell.
void interpolate_transverse_electric_components (CellCoordinate cell, std::complex< double > *x_at_centre, std::complex< double > *y_at_centre, std::complex< double > *z_at_centre) override
 Interpolates the transverse electric components to the centre of Yee cell i,j,k.
void interpolate_transverse_magnetic_components (CellCoordinate cell, std::complex< double > *x_at_centre, std::complex< double > *y_at_centre, std::complex< double > *z_at_centre) override
 Interpolates the transverse magnetic components to the centre of Yee cell i,j,k.
Public Member Functions inherited from Field
 Field ()=default
 Field (int I_total, int J_total, int K_total)
void allocate ()
void zero ()
void allocate_and_zero ()
void normalise_volume ()
 Normalises the field entries by dividing by the angular norm.
void set_phasors (SplitField &F, int n, double omega, double dt, int Nt)
void add_to_angular_norm (int n, int Nt, SimulationParameters &params)
 Compute the phasor_norm of the current field and add it to the current norm-value.
std::complex< double > phasor_norm (double f, int n, double omega, double dt, int Nt)
void interpolate_over_range (mxArray *x_out, mxArray *y_out, mxArray *z_out, int i_lower, int i_upper, int j_lower, int j_upper, int k_lower, int k_upper, Dimension mode=Dimension::THREE)
 Interpolates the Field over the range provided.
void interpolate_over_range (mxArray *x_out, mxArray *y_out, mxArray *z_out, Dimension mode=Dimension::THREE)
 Interpolates the Field over the range provided.
void set_values_from (Field &other)
double normalised_difference (Field &other)
 Computes the maximum pointwise absolute difference of the other field to this one, divided by the largest absolute value of this field's components.
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.

Private Member Functions

double phase (int n, double omega, double dt) override

Additional Inherited Members

Public Attributes inherited from Field
double ft = 0.
std::complex< double > angular_norm = 0.
XYZTensor3D< double > real
XYZTensor3D< double > imag
int il = 0
int iu = 0
int jl = 0
int ju = 0
int kl = 0
int ku = 0
Public Attributes inherited from Grid
IJKDimensions tot = {0, 0, 0}
Protected Attributes inherited from Grid
tdms_flags::InterpolationMethod interpolation_method

Member Function Documentation

◆ interpolate_to_centre_of()

std::complex< double > ElectricField::interpolate_to_centre_of ( AxialDirection d,
CellCoordinate cell )
overridevirtual

Interpolates an E-field component to the centre of a Yee cell.

Parameters
dField component to interpolate
i,j,kIndex (i,j,k) of the Yee cell to interpolate to the centre of
Returns
std::complex<double> The interpolated component value

Implements Field.

◆ interpolate_transverse_electric_components()

void ElectricField::interpolate_transverse_electric_components ( CellCoordinate cell,
std::complex< double > * x_at_centre,
std::complex< double > * y_at_centre,
std::complex< double > * z_at_centre )
overridevirtual

Interpolates the transverse electric components to the centre of Yee cell i,j,k.

Ex and Ey are interpolated. Ez is set to a placeholder (default) value.

Parameters
[in]cellYee cell index
[out]x_at_centre,y_at_centre,z_at_centreAddresses to write interpolated values for the x,y,z components (respectively)

Implements Field.

◆ interpolate_transverse_magnetic_components()

void ElectricField::interpolate_transverse_magnetic_components ( CellCoordinate cell,
std::complex< double > * x_at_centre,
std::complex< double > * y_at_centre,
std::complex< double > * z_at_centre )
overridevirtual

Interpolates the transverse magnetic components to the centre of Yee cell i,j,k.

Ez is interpolated. Ex and Ey are set to a placeholder (default) values.

Parameters
[in]cellYee cell index
[out]x_at_centre,y_at_centre,z_at_centreAddresses to write interpolated values for the x,y,z components (respectively)

Implements Field.

◆ phase()

double ElectricField::phase ( int n,
double omega,
double dt )
overrideprivatevirtual

Implements Field.


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