StaticParticlesTrajectory#

class StaticParticlesTrajectory(name=None)[source]#

Trivial implementation for static particles to match the trajectory-module definition for Bloch simulations. When called (also increment_particles) just returns the identity operation for particle positions along with an empty dictionary usually containing the additional field look-ups.

Methods:

__call__(initial_positions, timing, **kwargs)

Returns a tiled tensor of the static positions

increment_particles(particle_positions, dt, ...)

Evaluates the new position of particles at given locations r for a temporal step width dt.

__call__(initial_positions, timing, **kwargs)[source]#

Returns a tiled tensor of the static positions

Parameters:
  • initial_position – (N, 3)

  • timing (Tensor) – (T, )

  • initial_positions (Tensor) –

Return type:

(Tensor, dict)

Returns:

r_const - (T, N, 3)

increment_particles(particle_positions, dt, **kwargs)[source]#

Evaluates the new position of particles at given locations r for a temporal step width dt. If the concrete implementation involves a look up (e.g. velocity fields) the values at the old location is also returned as dictionary.

Note

concrete implementations must be compatible with tf.function decoration

Parameters:
  • particle_positions (Tensor) – (N, 3) Current particle positions.

  • dt (Tensor) – (,) Temporal step width in milliseconds to evaluate the next positions

  • kwargs – Can vary in concrete implementation

Return type:

(Tensor, dict)

Returns:

r_new [tf.Tensor, (N, 3)], additional_fields [dict] containing the lookup values