FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::wake::WakeSelection Class Reference

#include <WakeSelection.h>

Public Member Functions

WakeComposition Compose (double t, const double pos[3]) const
 The composition at a point of the region at time t.
 
void ComposeMany (double t, std::span< const std::array< double, 3 > > positions, std::span< WakeComposition > out) const
 
HeldWakes Hold (double t, std::span< const std::array< double, 3 > > positions, const OwnTagsAt &ownTags={}) const
 
int NumFields () const
 Number of registered wake fields selected.
 
int NumJets () const
 Number of registered jets selected.
 

Friends

class WakeRegistry
 

Detailed Description

The registered wake and jet fields that may reach a region, and the query they compose by (owner decision R47; WakeRegistry::Select()).

The composition rule, once for every caller: the registered fields in registry order by the momentum-flux rule (R95), the query's own field multiplied onto them last among the deficits (R88, R135), the jets in registry order summed apart and added after the deficits (ADR 0003). A field that answers a status other than Status::OK adds no wake; a zero or NaN deficit adds nothing (MENV-0020).

A selection is taken once (a step, a batch of points) after the fields were published, and composes at points of its region and times of its interval. With the exact tier (cutoff 0) that is bit for bit the composition of every registered field. It keeps its fields alive; a field published or registered after Select() is not accounted for. The const methods are thread-safe against concurrent publishes of the fields, as WakeField::Sample().

Member Function Documentation

◆ ComposeMany()

void marenv::wake::WakeSelection::ComposeMany ( double  t,
std::span< const std::array< double, 3 > >  positions,
std::span< WakeComposition >  out 
) const

Compose() at many points at one time, bit for bit; each field is sampled for all points at once (WakeField::SampleMany()).

Parameters
[out]outOne composition per point; as many as positions.

◆ Hold()

HeldWakes marenv::wake::WakeSelection::Hold ( double  t,
std::span< const std::array< double, 3 > >  positions,
const OwnTagsAt &  ownTags = {} 
) const

Samples the parts of every selected field and jet at the points at time t, to compose them later (owner rulings R46, R136).

Parameters
[in]tThe hold time, s.
[in]positionsThe points, m, NED.
[in]ownTagsThe own field's sources to leave out at each point (ENV-0107); empty leaves out the query's ownExcludedTags at every point.

The documentation for this class was generated from the following file: