|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
Force is a metatype, in that Tissue Forge has lots of different instances of force functions, that have different attributes, but only have one base type. More...
#include <tfForce.h>


Public Member Functions | |
| virtual bool | isCustom () |
| Tests whether this object is a custom force type. | |
| 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 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 | |
| FORCE_TYPE | type = FORCE_FORCE |
| Force_EvalFcn | func |
| int | stateVectorIndex = -1 |
Force is a metatype, in that Tissue Forge has lots of different instances of force functions, that have different attributes, but only have one base type.
Forces are one of the fundamental processes in Tissue Forge that cause objects to move.
|
static |
Creates a Berendsen thermostat.
The thermostat uses the target temperature 
The Berendsen thermostat force has the function form:
![\[
\frac{\mathbf{p}}{\tau_T} \left(\frac{T_0}{T} - 1 \right),
\]](../../form_15.png)
where 




| tau | time constant that determines how rapidly the thermostat effects the system. |
| HRESULT TissueForge::Force::bind_species | ( | struct ParticleType * | a_type, |
| const std::string & | coupling_symbol ) |
Bind a force to a species.
When a force is bound to a species, the magnitude of the force is scaled by the concentration of the species.
| a_type | particle type containing the species |
| coupling_symbol | symbol of the species |
|
static |
Creates a friction force.
A friction force has the form:
![\[
- \frac{|| \mathbf{v} ||}{\tau} \mathbf{v} ,
\]](../../form_19.png)
where 

| coef | time constant |
|
static |
Create from a JSON string representation.
| str |
|
inlinevirtual |
Tests whether this object is a custom force type.
Reimplemented in TissueForge::CustomForce.
|
static |
Creates a random force.
A random force has a randomly selected orientation and magnitude.
Orientation is selected according to a uniform distribution on the unit sphere.
Magnitude is selected according to a prescribed mean and standard deviation.
| std | standard deviation of magnitude |
| mean | mean of magnitude |
| duration | duration of force. Defaults to 0.01. |
|
virtual |
Get a JSON string representation.