A class that handles the extraction of the phasors on the user-specified surface.
More...
#include <surface_phasors.h>
|
| SurfacePhasors (mxArray *mx_surface_vertices, int _f_ex_vector_size) |
| Construct a new Surface Phasors object, using the set_from_matlab_array() method.
|
|
void | set_from_matlab_array (mxArray *mx_surface_vertices, int f_ex_vector_size) |
| Sets the surface_vertices pointer and number of surface vertices tracker from the MATLAB array passed in.
|
|
void | zero_surface_EH () |
| Zeros the surface_EH{r,i} arrays.
|
|
int | get_n_surface_vertices () |
| Get the number of surface vertices.
|
|
mxArray * | get_vertex_list () |
| Get the list of vertices.
|
|
mxArray * | get_mx_surface_amplitudes () |
| Get the array of complex surface amplitudes.
|
|
void | normalise_surface (int frequency_index, std::complex< double > Enorm, std::complex< double > Hnorm) |
| Normalise the surface amplitudes at frequency_vector_index by the E- and H-norms provided.
|
|
void | extractPhasorsSurface (int frequency_index, ElectricSplitField &E, MagneticSplitField &H, int n, double omega, int Nt, SimulationParameters ¶ms, bool interpolate=true) |
| Extract the phasor values at the vertices on the surface, for the given frequency index.
|
|
void | create_vertex_list (GridLabels input_grid_labels) |
| Pulls the GridLabels information of vertices on the surface into vertex_list, a continuous block of memory.
|
|
void | update_surface_EH (int frequency_index, int vertex_index, FullFieldSnapshot F) |
| Incriments surface_EH{r,i} at the given index by the field values provided.
|
|
|
int ** | surface_vertices = nullptr |
| Pointer to the vertices on the surface.
|
|
int | n_surface_vertices = 0 |
| Number of vertices on the surface.
|
|
mxArray * | vertex_list = nullptr |
|
double ** | vertex_list_data_ptr |
|
mxArray * | mx_surface_amplitudes = nullptr |
|
int | f_ex_vector_size |
|
double *** | surface_EHr = nullptr |
|
double *** | surface_EHi = nullptr |
|
A class that handles the extraction of the phasors on the user-specified surface.
This class stores:
- The number of vertices on the surface,
- Their indicies in the global indexing convention,
- The data (phasors) at each of these vertices,
- A pointer to the output array
◆ create_vertex_list()
void SurfacePhasors::create_vertex_list |
( |
GridLabels |
input_grid_labels | ) |
|
Pulls the GridLabels information of vertices on the surface into vertex_list, a continuous block of memory.
The vertex_list attribute will consist only of vertices that lie on the surface that the given class instance defines.
- Parameters
-
◆ extractPhasorsSurface()
Extract the phasor values at the vertices on the surface, for the given frequency index.
- Parameters
-
frequency_index | The entries in surface_EH{r,i}[frequency_index] will be written to |
E,H | The electric,magnetic field |
n | Current timestep index |
omega | Angular frequency |
Nt | The number of timesteps in a sinusoidal period |
params | The parameters for this simulation |
interpolate | If true, perform interpolation on the fields when extracting phasors |
◆ normalise_surface()
void SurfacePhasors::normalise_surface |
( |
int |
frequency_index, |
|
|
std::complex< double > |
Enorm, |
|
|
std::complex< double > |
Hnorm |
|
) |
| |
Normalise the surface amplitudes at frequency_vector_index by the E- and H-norms provided.
E-field components in surface_EH are divided by the (complex) Enorm. H-field components in surface_EH are divided by the (complex) Hnorm.
- Parameters
-
frequency_vector_index | Frequency index, surface_EH{r,i}[frequency_vector_index] will be normalised |
Enorm,Hnorm | The {E,H}-norm to normalise the {E,H}-components by |
◆ set_from_matlab_array()
void SurfacePhasors::set_from_matlab_array |
( |
mxArray * |
mx_surface_vertices, |
|
|
int |
f_ex_vector_size |
|
) |
| |
Sets the surface_vertices pointer and number of surface vertices tracker from the MATLAB array passed in.
- Parameters
-
mx_surface_vertices | MATLAB array containing the vertex information |
_f_ex_vector_size | The FrequencyExtractionVector size, which we need to reserve sufficient memory |
◆ update_surface_EH()
void SurfacePhasors::update_surface_EH |
( |
int |
frequency_index, |
|
|
int |
vertex_index, |
|
|
FullFieldSnapshot |
F |
|
) |
| |
Incriments surface_EH{r,i} at the given index by the field values provided.
If we allow element-wise assignment, we are essentially performing the operations: surface_EHr[frequency_vector_index][:][vertex_index] += F.real(), surface_EHi[frequency_vector_index][:][vertex_index] += F.imag().
- Parameters
-
frequency_index | Frequency vector index (k) to assign to |
vertex_index | Vertex index (i) to assign to |
F | Field values to assign |
◆ f_ex_vector_size
int SurfacePhasors::f_ex_vector_size |
|
private |
◆ surface_EHi
double *** SurfacePhasors::surface_EHi = nullptr |
|
private |
◆ vertex_list_data_ptr
double** SurfacePhasors::vertex_list_data_ptr |
|
private |
The documentation for this class was generated from the following files: