|
| | WakeGroupCaster (std::string name, const SourceSetWakeSettings &settings, ISimObjectLogger &logger) |
| |
| void | Register (EnvironmentProvider &environment) |
| |
| int | Join (const std::string &member, double rho) |
| |
| void | Attach (int member, const WakeCastingObject &body, double T) |
| |
| void | Update (double T, const double *X) |
| |
|
marenv::wake::WakeQuery | Query () const |
| | The members' query: the group's lumped field skipped, its private field composed in; empty before the first Join().
|
| |
|
const WakeCaster * | Caster () const |
| | The caster; null before the first Join().
|
| |
|
const std::string & | Name () const |
| | The group's name.
|
| |
|
const SourceSetWakeSettings & | Settings () const |
| | The group's wake parameters.
|
| |
|
int | NumBodies () const override |
| | Number of members.
|
| |
|
WakeCastState | Body (const double *X, int body) const override |
| | The member body's Reference().
|
| |
|
double | BodyRadius (int body) const override |
| | The member body's Radius().
|
| |
|
SourceLoad | BodyLoad (const double *X, int body, const double bodyVel[3], const double waterVel[3]) const override |
| | The member body's BodyLoad().
|
| |
The members of a wake group as one IndexedWakeCastingObject, and the WakeCaster that casts them.
Life cycle, whatever the order of the group and its members in the input:
| Phase | Group (WakeGroup SimObject) | Member (BodyWake with WakeGroup) |
SharedResourceSetup | Register(): known to the environment by name | – |
FinalSetup | – | Join(): a member number; the first one creates and registers the caster with its density |
PreOdeFcn | Update() | Attach() its body, then Update(), then its take with Query() |
FhSim calls every SharedResourceSetup before any FinalSetup, and every FinalSetup before the first PreOdeFcn. The first Update() at a new time rebuilds when due, the later ones at that time do nothing, so every member's take sees the same build. A member hands its body only in its PreOdeFcn, so the first pass attaches them, and the group casts from the next step on, once every member's body is known: the result does not depend on the order (WakeBuildTime is then the time of the second step at the earliest).
The time alone tells a new pass from a repeated call: Update() at a new time, also an earlier one, updates the caster once; at the time of the last update it does nothing. So an FMU that rolls back and repeats a step at the same time keeps the first attempt's update, and a member's state changed through IStateUpdater later in the same pass is seen from the next time on (doc/user/wakes.md, "Wake groups").
Not thread-safe: FhSim runs SharedResourceSetup, FinalSetup and PreOdeFcn serially.