coulomb_kmc.kmc_local module¶
This module handles the direct interactions between charges.
-
class
coulomb_kmc.kmc_local.
LocalParticleData
(mpi_decomp)¶ Bases:
coulomb_kmc.kmc_fmm_common.LocalOctalBase
Class to handle the direct interactions. Both field evaluation for proposals and accepted moves.
- Parameters
mpi_decomp – Instance of coulomb_kmc.kmc_mpi_decomp.FMMMPIDecomp.
-
accept
(movedata)¶ Accept a move using the coulomb_kmc internal accepted move data structure.
- Parameters
movedata – Move to accept.
-
eval_field
(points, out)¶ Appends the direct field at the given points onto out.
-
extract
(movedata)¶ Extract a charge from the data structures using the
old_position
.- Parameters
movedata – Standard datastructure for accepted moves.
realdata = movedata[:7].view(dtype=REAL) old_position = realdata[0:3:] charge = realdata[6] gid = movedata[7] old_fmm_cell = movedata[8]
-
get_old_energy
(num_particles, host_data)¶ Get old energies (for proposing extraction) using the coulomb_kmc internal proposed move data structures. For details see coulomb_kmc.kmc_mpi_decomp.FMMMPIDecomp.setup_propose_with_dats.
-
initialise
(positions, charges, fmm_cells, ids)¶ Initialise the data structures for the direct interactions.
- Parameters
positions – Initial positions of charges.
charges – Initial charge values.
fmm_cells – FMM cells of the input charges.
ids – Unique global ids of charges.
-
inject
(movedata)¶ Inject a charge from the data structures using the
new_position
.- Parameters
movedata – Standard datastructure for accepted moves.
realdata = movedata[:7].view(dtype=REAL) new_position = realdata[3:6:] charge = realdata[6] gid = movedata[7] new_fmm_cell = movedata[9]
-
propose
(total_movs, num_particles, host_data, cuda_data)¶ 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.