step/stepcore
#include <coulombforce.h>
Public Member Functions | |
CoulombForce (double coulombConst=Constants::Coulomb) | |
void | calcForce (bool calcVariances) |
double | coulombConst () const |
CoulombForceErrors * | coulombForceErrors () |
void | setCoulombConst (double coulombConst) |
Public Member Functions inherited from StepCore::Item | |
Item (const QString &name=QString()) | |
Item (const Item &item) | |
virtual | ~Item () |
Color | color () const |
void | deleteObjectErrors () |
ItemGroup * | group () const |
ObjectErrors * | objectErrors () |
Item & | operator= (const Item &item) |
void | setColor (Color color) |
virtual void | setGroup (ItemGroup *group) |
virtual void | setWorld (World *world) |
ObjectErrors * | tryGetObjectErrors () const |
World * | world () const |
virtual void | worldItemRemoved (Item *item STEPCORE_UNUSED) |
Public Member Functions inherited from StepCore::Object | |
Object (const QString &name=QString()) | |
virtual | ~Object () |
const QString & | name () const |
void | setName (const QString &name) |
Public Member Functions inherited from StepCore::Force | |
virtual | ~Force () |
Protected Member Functions | |
ObjectErrors * | createObjectErrors () |
Protected Attributes | |
double | _coulombConst |
Protected Attributes inherited from StepCore::Object | |
QString | _name |
Detailed Description
Coulomb electrostatic force.
The force acts between pairs of charged bodies (currently only ChargedParticle) and equals:
where:
is CoulombForce::coulombConst
and is ChargedParticle::charge of the first and second body
is difference of Particle::position of the first and second body
- Todo:
- Add interface for charged bodies, support bodies with distributed charge
Definition at line 82 of file coulombforce.h.
Constructor & Destructor Documentation
StepCore::CoulombForce::CoulombForce | ( | double | coulombConst = Constants::Coulomb | ) |
Constructs CoulombForce.
Member Function Documentation
|
virtual |
Calculate force.
Bodies can be accessed through this->world()->bodies()
Implements StepCore::Force.
Definition at line 49 of file coulombforce.cc.
|
inline |
Get coulomb const.
Definition at line 93 of file coulombforce.h.
|
inline |
Get (and possibly create) CoulombForceErrors object.
Definition at line 98 of file coulombforce.h.
|
inlineprotectedvirtual |
Creates specific ObjectErrors-derived class (to be reimplemented in derived classes)
Reimplemented from StepCore::Item.
Definition at line 102 of file coulombforce.h.
|
inline |
Set coulomb const.
Definition at line 95 of file coulombforce.h.
Member Data Documentation
|
protected |
Definition at line 104 of file coulombforce.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.