step/stepcore
StepCore::CoulombForce Class Reference
[Physical forces]
Coulomb electrostatic force. More...
#include <coulombforce.h>

Public Member Functions | |
| CoulombForce (double coulombConst=Constants::Coulomb) | |
| void | calcForce (bool calcVariances) |
| double | coulombConst () const |
| CoulombForceErrors * | coulombForceErrors () |
| void | setCoulombConst (double coulombConst) |
Protected Member Functions | |
| ObjectErrors * | createObjectErrors () |
Protected Attributes | |
| double | _coulombConst |
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.
Definition at line 42 of file coulombforce.cc.
Member Function Documentation
| void StepCore::CoulombForce::calcForce | ( | bool | calcVariances | ) | [virtual] |
Calculate force.
Bodies can be accessed through this->world()->bodies()
Implements StepCore::Force.
Definition at line 49 of file coulombforce.cc.
| double StepCore::CoulombForce::coulombConst | ( | ) | const [inline] |
Get coulomb const.
Definition at line 93 of file coulombforce.h.
| CoulombForceErrors* StepCore::CoulombForce::coulombForceErrors | ( | ) | [inline] |
Get (and possibly create) CoulombForceErrors object.
Definition at line 98 of file coulombforce.h.
| ObjectErrors* StepCore::CoulombForce::createObjectErrors | ( | ) | [inline, protected, virtual] |
For internal use only.
Creates specific ObjectErrors-derived class (to be reimplemented in derived classes)
Reimplemented from StepCore::Item.
Definition at line 102 of file coulombforce.h.
| void StepCore::CoulombForce::setCoulombConst | ( | double | coulombConst | ) | [inline] |
Set coulomb const.
Definition at line 95 of file coulombforce.h.
Member Data Documentation
double StepCore::CoulombForce::_coulombConst [protected] |
Definition at line 104 of file coulombforce.h.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference