coulomb_kmc.kmc_full_long_range module

class coulomb_kmc.kmc_full_long_range.FullLongRangeEnergy(L, domain, local_exp_eval, mirror_direction=None)

Bases: coulomb_kmc.common.ProfInc

Class to apply the “far-field” operator R in Fast electrostatic solvers for kinetic Monte Carlo simulations.

Parameters
  • L (int) – Number of expansion terms.

  • domain – domain to use.

  • local_exp_eval – LocalExpEval instance to use for expansion manipulation.

  • mirror_direction – Mirror direction tuple for Dirichlet boundary conditions (default None).

accept(movedata)

Accept a move using the coulomb_kmc internal accepted move data structure.

Parameters

movedata – Move to accept.

eval_field(points, out, use_c=True)

Evaluate the far-field contribution to the potential field.

Parameters
  • points – Places to evaluate field.

  • out – Array to populate with the far-field contribution to the field.

extract(movedata)

Extract a charge using the coulomb_kmc internal accepted move data structure.

Parameters

movedata – Data for extraction.

get_old_energy(num_particles, host_data)
initialise(positions, charges)

Initialise the data structures K and E (see paper).

Parameters
  • positions – Initial positions of charges.

  • charges – Initial charge values.

inject(movedata)

Inject a charge using the coulomb_kmc internal accepted move data structure.

Parameters

movedata – Data for injection.

propose(total_movs, num_particles, host_data, cuda_data, arr, use_python=False)

Propose a move using the coulomb_kmc internal proposed move data structures. For details see coulomb_kmc.kmc_mpi_decomp.FMMMPIDecomp.setup_propose_with_dats.

py_propose(total_movs, num_particles, host_data, cuda_data, arr, use_python=True)

Propose a move using the coulomb_kmc internal proposed move data structures. For details see coulomb_kmc.kmc_mpi_decomp.FMMMPIDecomp.setup_propose_with_dats.

Warning: uses Python and hence will be slow (for testing).