VSimEm.mac

This macro file can be imported to an input file with

$ import VSimEm

It is imported by VSim if VPM_SIMULATION_TYPE is electromagnetic.

This macro file is available to all packages.

This macro file defines the finalizeUpdaters() macro, specific to electromagnetic simulations, and it also defines many macros for adding EM update steps.

Public Macros

writeMovingWindow(shiftPos, shiftSpd)
Write a moving window in the X-Direction block to the top level of the .in file.
Parameters:
  • shiftPos – The fractional amount of the domain for the speed below to cross before shifting.
  • shiftSpd – The fraction of light speed to move the window by.
writeMovingWindow(shiftDir, shiftPos, shiftSpd)

Write a moving window to the top level of the .in file with specifiable direction.

Parameters:
  • shiftDir – The capital character describing the (Cartesian) direction to shift the window. One of X,Y,Z.
  • shiftPos – The fractional amount of the domain for the speed below to cross before shifting.
  • shiftSpd – The fraction of light speed to move the window by.
addCurrentDistribution(name, j0, j1, j2, lc, uc)

Add a current distribution into a slab.

Parameters:
  • name – The name of this current distribution.
  • j0 – Function giving component 0 (x) of the current distribution.
  • j1 – Function giving component 1 of the current distribution.
  • j2 – Function giving component 2 of the current distribution.
  • lc – Lower limits of the coordinate slab over which to apply this current distribution
  • uc – Upper limits of the coordinate slab over which to apply this current distribution
addDipoleCurrentDistribution(name, comp, function, coordinate)

Add a dipole current at a coordinate.

Parameters:
  • name – The name of this dipole current distribution.
  • comp – The component of j that is being set.
  • function – Function that the component of j will be set to.
  • coordinate – The location for this dipole current.
finalizeUpdaters()

Create all of the updaters needed for an EM simulation. Writing them occurs in writeMultiField, which is called by finalize().