|
FhSim
3.1.0
Marine systems simulation
|
The net bin of Seine/Vessel: a sphere that pulls the net and warp nodes inside it.
More...
#include <AttractorNetBin.h>
Classes | |
| struct | Motion |
| Where the attractor is, how fast it moves, and how strongly it pulls. More... | |
Public Member Functions | |
| void | SetParams (const double radius, const double springStiffness, const double damping) |
| void | SetPosAndVelSource (PosAndVelSource source) |
Sets what moves the attractor (Seine/Vessel, when it creates it). | |
| void | SetStrengthSource (StrengthSource source) |
Sets what scales the attractor's pull (Seine/Operation, in its FinalSetup). | |
| Motion | MotionAt (double T, const double *X) const |
| void | AddForce (const Motion &motion, double *const adForce, const double *const adNodePos, const double *const adNodeVel) const |
| bool | Contains (const Motion &motion, const double *const adNodePos) const |
Whether adNodePos lies strictly inside the radius. | |
| void AttractorNetBin::AddForce | ( | const Motion & | motion, |
| double *const | adForce, | ||
| const double *const | adNodePos, | ||
| const double *const | adNodeVel | ||
| ) | const |
Adds the pull on a node at adNodePos moving at adNodeVel to adForce: nothing outside the radius; inside it relStrength·(−ê·k·d + (v_a − v_n)·c), with ê the unit vector from the attractor to the node and d their distance, plus the depth penalty −relStrength·1000·z in z, once, for a node with z > 0 (FISH-0111).
| Motion AttractorNetBin::MotionAt | ( | double | T, |
| const double * | X | ||
| ) | const |
The motion at (T, X), X the model-global states: a function of them alone, so every reader gets the same motion for the same (T, X), on any thread and in any order (FISH-0104). Without a source the attractor rests at the origin; without a strength source its strength is 1.