You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.g. what should be the state of DipolarP3M when removing the DLC "extension"? The DipolarP3M force and energy kernels are not const, therefore the actor will be altered and no longer be in sync with the DP3M python class. Making the DP3M actor an argument of DLC removes the ambiguity. In addition, the Cython Actors class no longer has to keep track of active actors vs. active extensions.
clarify when on_coulomb_change(), parameter broadcasts and long-range actor sanity checks are really needed; right now they are called in too many places (e.g. sanity checks are run at each integration step during tuning) and parameter broadcasts override each other when an actor is adapted by ELC or DLC. Parameter broadcasts need to be removed entirely by making the tuning code synchronous, sanity checks should only be executed when an actor is active, and the on_coulomb_change() should only be called when activating, deactivating or modifying the state of an actor.
break dependencies in the core: at the moment, coulomb.hpp is indirectly included in around 60 files, half of which are totally unrelated to electrostatics; to break this chain of includes, we need to make the BondedCoulombSR kernels non-inline (i.e. remove its #include "coulomb_inline.hpp" and move it to a .cpp file) and split the pair criteria into individual classes
decouple magnetostatics events from electrostatics events (for example, modifying the DipolarP3M parameters should not reinitialize the P3MGPU parameters)
The text was updated successfully, but these errors were encountered:
Fixes#4454
Description of changes:
- apply the SOLID principles
- split electrostatics from magnetostatics
- factor out code duplication
- extract P3M/DP3M tuning code
- hide ELC details in private class methods (the energy/force correction logic used to be exposed in `coulomb.cpp`)
- hide Coulomb implementation details by no longer indirectly including `coulomb.hpp` in 30 unrelated files in the core
- write clear pre-conditions as event hooks
- these events are triggered upon box size change, periodicity change, node grid change and cell structure change
- partial fix for #4428
- setting a `node_grid` incompatible with a long-range actor is no longer possible (the old `node_grid` is restored)
- these preconditions always run once before the integration loop starts
- write test cases to check for these events
- bugfix: charge neutrality checks now run once before the integration loop starts, instead of once at actor activation
- encapsulate the state of long-range methods in classes managed by the script interface
- bugfix: the cached `DipolarP3M` energy correction is now invalidated when the box length changes
- remove global variables for CPU methods (partial fix for #2628) and introduce one global variable for each type of long-range actor: dipolar solver, Coulomb solver, Coulomb extension
- convert Cython files for long-range actors to Python files using the `ScriptInterface` framework
- long-range actors and their python object now have the same lifetime, regardless of whether the actor is active or not (partial fix for #4220)
- the list of active long-range actors can no longer end up in an invalid state (partial fix for #4219):
- updating an active actor with an invalid parameter now automatically restores the original parameter
- inserting an invalid long-range actor in the list of actors now automatically removes the actor from the list of active actors, even when the exception happens during tuning
- API changes:
- `ELC` and `DLC` are no longer extensions, instead they take another actor as argument
- `P3MGPU` is now able to execute the CPU energy and pressure kernels using parameters tuned for the GPU force kernel
- closes#239
- P3M-based reaction scripts run with 2x speed-up when reaction steps take place every 1000 integration steps
- `P3MGPU` is now supported by `ELC`
- long-range actor parameters are now immutable, since changing one parameter (e.g. the prefactor) would usually invalidate the tuned parameters
- the charge neutrality check sensitivity can now be modified via `actor.charge_neutrality_tolerance`; this is mostly relevant to actors coupled to `ICC`, whose induced charges can have value spanning several orders of magnitude
- under-the-hood changes:
- CPU-based long-range actors no longer rely on the `MpiCallbacks` framework
- the subtracted Coulomb bonded interaction and pair criteria no longer indirectly include `coulomb.hpp`
Many electrostatic and magnetostatic methods implemented for the GPU have the following design:
The
ScriptInterface
framework provides a convenient interface to store a shared pointer to a core class. It has many advantages:EspressoSystemInterface
global variableThe CPU implementations can also benefit from such a refactoring:
Roadmap
Rewrite electrostatic and magnetostatic methods as C++ classes
dipoles.hpp
should include all magnetostatic methods, instead of all magnetostatic methods includingdipoles.hpp
)Actors
framework in the coreelectrostatics
,magnetostatics
,p3m
(for common P3M code and FFT)actors
,electrostatics_magnetostatics
Write the script interface
ScriptInterface
classes for electrostatic methodsScriptInterface
classes for magnetostatic methodsScriptInterface
classes for ScaFaCoS methodsboost::mpi
communication withMpiCallbacks
communicationRoll out changes to the core
boost::optional<boost::variant<Method1,Method2,Method3>> magnetostatics_actor
global variables in the coreDipolarP3M
when removing theDLC
"extension"? TheDipolarP3M
force and energy kernels are notconst
, therefore the actor will be altered and no longer be in sync with theDP3M
python class. Making theDP3M
actor an argument ofDLC
removes the ambiguity. In addition, the CythonActors
class no longer has to keep track of active actors vs. active extensions.on_coulomb_change()
, parameter broadcasts and long-range actor sanity checks are really needed; right now they are called in too many places (e.g. sanity checks are run at each integration step during tuning) and parameter broadcasts override each other when an actor is adapted byELC
orDLC
. Parameter broadcasts need to be removed entirely by making the tuning code synchronous, sanity checks should only be executed when an actor is active, and theon_coulomb_change()
should only be called when activating, deactivating or modifying the state of an actor.coulomb.hpp
is indirectly included in around 60 files, half of which are totally unrelated to electrostatics; to break this chain of includes, we need to make theBondedCoulombSR
kernels non-inline (i.e. remove its#include "coulomb_inline.hpp"
and move it to a .cpp file) and split the pair criteria into individual classesDipolarP3M
parameters should not reinitialize theP3MGPU
parameters)The text was updated successfully, but these errors were encountered: