Electromagnetic Template Library (EMTL)
|
Base data structure to use in Yee block. More...
#include <yee.h>
Public Member Functions | |
int | adjust_dimensions (int *N, const iVector_3 &extra_cells, int *bc=NULL, valtype *courantf=NULL) |
Changes dimensions, resolution and boundary conditions according to requirements of the Block. | |
iVector_3 | get_cell_cluster () const |
int | init (const Box &B, const indtype *ndim, int wf_) |
Init override to initialize additional data. | |
void | unpack_ind (indtype ind, int &ftype, int &dir, indtype &ix, indtype &iy, indtype &iz) const |
Indexing the value. | |
indtype | pack_ind (int ftype, int dir, indtype ix, indtype iy, indtype iz) const |
Packs component indicies to integer. | |
grid_t & | get_field_grid (int ftype, int dir) |
Gets interpolation grid for each filed type and direction. The grids normally can not be used for accessing field data. | |
const grid_t & | get_field_grid (int ftype, int dir) const |
Gets interpolation grid for each filed type and direction. | |
virtual size_t | packed_size () const |
virtual size_t | data_size () const |
int | set_fix_storage (emFixStorage *fs) |
Sets a pointer for fix storage for contour fixes. | |
template<class contour_it > | |
int | set_contour_fix (const contour_it &cnti, int fix_flags, ptrdiff_t shift) |
Sets fix flags and shift from fix storage begin for a specific contour cnti. | |
template<class fix_stack_t > | |
void | apply_fixes_before (fix_stack_t &fix_stack, indtype oind, emtype *out) const |
Base data does not support contour fixes. | |
template<class fix_stack_t > | |
void | apply_fixes_after (fix_stack_t &fix_stack, indtype oind, emtype *out) const |
Base data does not support contour fixes. | |
virtual int | get_sync_hsteps () const |
Number of mesh steps per field (half steps) mesh block is performing between synchronization, i.e. | |
int | get_perm_sign () const |
Returns permutation sign if the coords are flipped: 1 = even (cycle), -1 = odd. | |
Vector_3 | get_dx (bool int_order=false) const |
Gets space steps. | |
template<typename contour_it_t > | |
Box | get_vec_cell_bounding_box_extent (const contour_it_t &cnti) const |
Bounding box for current yee cell. | |
Static Public Member Functions | |
static constexpr int | get_fix_aggregate_size () |
Protected Member Functions | |
int | StepO (int field) |
performs (optimized) explicit timestep | |
int | StepV (int field) |
performs vectorizable explicit timestep | |
indtype | get_start_ind (int field, int dir) const |
Gets starting index of the mesh of certain field and dir. All other mesh indicies for (field,dir) are then calculated by adding pack_ind(ix,iy,iz). | |
void | set_arr (emtype *sptr) |
Assigns external pointer for data array. | |
template<class contour_it > | |
indtype | put_media_type (const contour_it &cnti, valtype dt, emtype perm, emtype loss) |
Records the media data for a contour given by. | |
Protected Attributes | |
int | wf |
media coefficients for vectorized main loop | |
int | mpi_domains |
Number of domains in DomainDecomposition. | |
iVector_3 | decomp_recommendation |
Recommendation for DomainDecomposition layout. | |
indtype | SZ4 |
Slice sizes. | |
int | topthreads |
number of threads for processing | |
Base data structure to use in Yee block.
|
inline |
Changes dimensions, resolution and boundary conditions according to requirements of the Block.
For example, some blocks may require N=2^P setting, etc. To use before the construction of the block. Ajustments are made in the way that supercell size (N-extra cells)*dr remains the same, but total N matches the criterion.
|
inlinevirtual |
Reimplemented in emEJRectBlock.
|
inline |
|
inline |
Gets space steps.
If the parameter int_order is true, the steps are given in the order that is used internally. Use true for configuring actions of contour fixes.
|
inline |
Gets interpolation grid for each filed type and direction.
The grids normally can not be used for accessing field data. (const version)
|
inlinestaticconstexpr |
|
inlinevirtual |
Number of mesh steps per field (half steps) mesh block is performing between synchronization, i.e.
between subsequent Step calls If this value is 1, then the call to Step(field,...) results in the layered update of the corresponding field only If this value is N>1, then the call to Step(field,...) results in N/2 merged steps for 2 fields when the parameter field matches the starting field.
|
inline |
Bounding box for current yee cell.
Bounding box for vector cell that includes current iterator
|
inlinevirtual |
Reimplemented in emEJRectBlock.
|
protected |
Records the media data for a contour given by.
|
inline |
Sets fix flags and shift from fix storage begin for a specific contour cnti.
Base data does not support contour fixes, this function does nothing.
|
inline |
Sets a pointer for fix storage for contour fixes.
If not supported returns 0, >0 otherwise. Base data does not support contour fixes, this function does nothing.
|
inline |
Indexing the value.
Unpacks component indicies from integer.
|
protected |
Recommendation for DomainDecomposition layout.
Should calculate in adjust_dimmensions (default is no recommendation).