|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
A custom force function. More...
#include <tfForce.h>


Public Member Functions | |
| virtual void | onTime (FPTYPE time) |
| virtual FVector3 | getValue () |
| void | setValue (const FVector3 &f) |
| void | setValue (UserForceFuncType *_userFunc=NULL) |
| FPTYPE | getPeriod () |
| void | setPeriod (const FPTYPE &period) |
| bool | isCustom () |
| Tests whether this object is a custom force type. | |
| CustomForce (const FVector3 &f, const FPTYPE &period=std::numeric_limits< FPTYPE >::max()) | |
| CustomForce (UserForceFuncType *f, const FPTYPE &period=std::numeric_limits< FPTYPE >::max()) | |
Public Member Functions inherited from TissueForge::Force | |
| HRESULT | bind_species (struct ParticleType *a_type, const std::string &coupling_symbol) |
| Bind a force to a species. | |
| Force & | operator+ (const Force &rhs) |
| virtual std::string | toString () |
| Get a JSON string representation. | |
Static Public Member Functions | |
| static CustomForce * | fromForce (Force *f) |
| Convert basic force to CustomForce. | |
Static Public Member Functions inherited from TissueForge::Force | |
| static Berendsen * | berendsen_tstat (const FPTYPE &tau) |
| Creates a Berendsen thermostat. | |
| static Gaussian * | random (const FPTYPE &std, const FPTYPE &mean, const FPTYPE &duration=0.01) |
| Creates a random force. | |
| static Friction * | friction (const FPTYPE &coef) |
| Creates a friction force. | |
| static Force * | fromString (const std::string &str) |
| Create from a JSON string representation. | |
Public Attributes | |
| UserForceFuncType * | userFunc |
| FPTYPE | updateInterval |
| FPTYPE | lastUpdate |
| FVector3 | force |
Public Attributes inherited from TissueForge::Force | |
| FORCE_TYPE | type = FORCE_FORCE |
| Force_EvalFcn | func |
| int | stateVectorIndex = -1 |
A custom force function.
The force is updated according to an update frequency.
|
static |
Convert basic force to CustomForce.
If the basic force is not a CustomForce, then NULL is returned.
| f |
|
inlinevirtual |
Tests whether this object is a custom force type.
Reimplemented from TissueForge::Force.
|
virtual |
notify this user force object of a simulation time step,
this will check if interval has elapsed, and update the function.
throws std::exception if userfunc is not a valid kind.
| void TissueForge::CustomForce::setValue | ( | const FVector3 & | f | ) |
sets the value of the force to a vector
throws std::exception if invalid value.
| void TissueForge::CustomForce::setValue | ( | UserForceFuncType * | _userFunc = NULL | ) |
sets the value of the force from a user function. if a user function is passed, then it is stored as the user function of the force
throws std::exception if invalid value.