Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
base_yee_struc_t Class Reference

Base data structure to use in Yee block. More...

#include <yee.h>

Inheritance diagram for base_yee_struc_t:

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_tget_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_tget_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
 

Detailed Description

Base data structure to use in Yee block.

Member Function Documentation

◆ adjust_dimensions()

int base_yee_struc_t::adjust_dimensions ( int *  N,
const iVector_3 &  extra_cells,
int *  bc = NULL,
valtype *  courantf = NULL 
)
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.

Returns
>0 if changes are made, 0 if no changes are needed, <0 if dimensions or BCs are incompatible with the mesh block.

◆ data_size()

virtual size_t base_yee_struc_t::data_size ( ) const
inlinevirtual
Returns
size of all used media data in bytes (for messages only, don't use for memory allocation)

Reimplemented in emEJRectBlock.

◆ get_cell_cluster()

iVector_3 base_yee_struc_t::get_cell_cluster ( ) const
inline
Returns
the dimensions of sychronous clustering in vector grids

◆ get_dx()

Vector_3 base_yee_struc_t::get_dx ( bool  int_order = false) const
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.

◆ get_field_grid()

const grid_t & base_yee_struc_t::get_field_grid ( int  ftype,
int  dir 
) const
inline

Gets interpolation grid for each filed type and direction.

The grids normally can not be used for accessing field data. (const version)

◆ get_fix_aggregate_size()

static constexpr int base_yee_struc_t::get_fix_aggregate_size ( )
inlinestaticconstexpr
Returns
number of consecutive contours for which the contour fix flag is set, for example, if fields are stored per cell, this can be 3, meaning each fix is applied to 3 consecutive contours. The fix functions are then called only once for the aggregate size number of contours: set_contour_fix from emMeshContainer::analyze_geometry, apply_fixes_before and apply_fixes_after from this->Step The fix implementation is responsible for packing index shifts to pointers addressed by consecutive contours from the first pointer of the fix.

◆ get_sync_hsteps()

virtual int base_yee_struc_t::get_sync_hsteps ( ) const
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.

◆ get_vec_cell_bounding_box_extent()

template<typename contour_it_t >
Box base_yee_struc_t::get_vec_cell_bounding_box_extent ( const contour_it_t &  cnti) const
inline

Bounding box for current yee cell.

Bounding box for vector cell that includes current iterator

◆ packed_size()

virtual size_t base_yee_struc_t::packed_size ( ) const
inlinevirtual
Returns
size of media data after packing in bytes (for messages only, don't use for memory allocation)

Reimplemented in emEJRectBlock.

◆ put_media_type()

template<class contour_it >
indtype base_yee_struc_t::put_media_type ( const contour_it &  cnti,
valtype  dt,
emtype  perm,
emtype  loss 
)
protected

Records the media data for a contour given by.

  • cnti.

◆ set_contour_fix()

template<class contour_it >
int base_yee_struc_t::set_contour_fix ( const contour_it &  cnti,
int  fix_flags,
ptrdiff_t  shift 
)
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.

◆ set_fix_storage()

int base_yee_struc_t::set_fix_storage ( emFixStorage fs)
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.

◆ unpack_ind()

void base_yee_struc_t::unpack_ind ( indtype  ind,
int &  ftype,
int &  dir,
indtype &  ix,
indtype &  iy,
indtype &  iz 
) const
inline

Indexing the value.

Unpacks component indicies from integer.

Member Data Documentation

◆ decomp_recommendation

iVector_3 base_yee_struc_t::decomp_recommendation
protected

Recommendation for DomainDecomposition layout.

Should calculate in adjust_dimmensions (default is no recommendation).


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