Common base class of ParallelPotential and QCPotential. More...
#include <GhostPotential.h>
Public Member Functions | |
| GhostPotential (AsapPotential *p) | |
| virtual bool | CheckAndUpdateAtoms (bool update)=0 |
| Check if the ghost atoms want the neighbor list updated. | |
| virtual void | CommunicateData (double data[])=0 |
| Place data on virtual atoms. | |
| virtual void | CommunicateData (double data[], int n)=0 |
| Place data on virtual atoms. | |
| virtual void | UpdateGhostPositions ()=0 |
| Update the position of ghost atoms. | |
| double | GetCutoffRadius () const |
| Get the cutoff of the wrapped potential. | |
| double | GetLatticeConstant () const |
| Get the lattice constant of the wrapped potential. | |
| Public Member Functions inherited from AsapPotential | |
| virtual | ~AsapPotential () |
| virtual void | SetAtoms (Atoms *a)=0 |
| Set the atoms belonging to this potential. | |
| virtual double | GetPotentialEnergy ()=0 |
| Calculate the total energy of the system. | |
| virtual const Vec * | GetCartesianForces ()=0 |
| Calculate the forces on all atoms and return the result. | |
| virtual const symTensor * | GetStresses (const Vec *momenta=0)=0 |
| Calculate the stress on all atoms. | |
| virtual void | GetStress (double stress[6], const Vec *momenta=0)=0 |
| Calculate the total stress of the system. | |
| virtual const double * | GetPotentialEnergies ()=0 |
| Calculate the energy of all atoms. | |
| virtual void | CheckNeighborLists ()=0 |
| virtual double | CalculateLatticeEnergy (const Vec a[3]) |
| Calculate the energy of an atom in a regular fcc(?) lattice. | |
| virtual void | CalculateDerivatives (const Vec a[3], double dEdaDota[6]) |
| Calculate derivative of the energy of an atom in a regular lattice. | |
| virtual double | GetData () const |
| Get data used by the QuasiContinuum method. | |
| virtual void | UpdateSuperCell (const SuperCell *newSuperCell)=0 |
| Tell the Potential that a new SuperCell has been assigned to the atoms. | |
| virtual int | GetNumberOfAtoms () const =0 |
| Get the number of atoms. | |
Protected Attributes | |
| AsapPotential * | potential |
| Pointer to the wrapped potential. | |
Common base class of ParallelPotential and QCPotential.
GhostPotential is a common base class of the functional extensions of Potential for extensions of Atoms which have the concept of ghost atoms (ParallelAtoms and QCAtoms).
A GhostPotential is derived from Potential since it replaces the normal potential in parallel/QC simulations. It also wraps a Potential, namely a specific implementation of Potential (EMT, MoPotential ...) describing the interatomic interactions. In this way both parallel and QC simulations are supported with minimal intrusion in the potentials (the specific potentials occationally need to check if the Atoms are really GhostAtoms and then call a few helper functions).
Definition at line 23 of file GhostPotential.h.
|
inline |
Definition at line 25 of file GhostPotential.h.
|
pure virtual |
Check if the ghost atoms want the neighbor list updated.
Called by NeihborList::CheckAndUpdateNeighborList() to post-process the decision to update the neighbor list. Only used by ParallelPotential, where all neighbor lists on all processors should be updated when one processor does it.
|
pure virtual |
Place data on virtual atoms.
CommunicateData is used by potentials where exactly one double per atom needs to be updated on all atoms. The data may originate from the corresponding arrays on other processors (this is the case in ParallelPotential) or be calculated (QCPotential). In EMT this quantity is sigma1. If future potentials need to communicate more date, this interface must be extended.
|
pure virtual |
Place data on virtual atoms.
|
inlinevirtual |
Get the cutoff of the wrapped potential.
Implements AsapPotential.
Definition at line 57 of file GhostPotential.h.
|
inlinevirtual |
Get the lattice constant of the wrapped potential.
Implements AsapPotential.
Definition at line 60 of file GhostPotential.h.
|
pure virtual |
Update the position of ghost atoms.
|
protected |
Pointer to the wrapped potential.
Definition at line 63 of file GhostPotential.h.