5#include <marenv/marenv.h>
6#include <marenv/wake/WakeField.h>
7#include <marenv/wake/WakeSampleParts.h>
38 for (
int i = 0; i < 3; ++i)
46 for (
int i = 0; i < 3; ++i)
55 for (
int i = 0; i < 3; ++i)
175 virtual std::uint64_t
Revision()
const {
return 0; }
185 virtual void SampleMany(
double t, std::span<
const std::array<double, 3>> positions, std::span<JetSample> out, std::span<Status> status)
const
187 for (std::size_t i = 0; i < positions.size(); ++i)
188 status[i] =
Sample(t, positions[i].data(), out[i]);
Definition JetField.h:134
virtual std::uint64_t Revision() const
The change signal of the jet, as WakeField::Revision(); the default, for a field that cannot tell,...
Definition JetField.h:175
virtual void Sketch(double t, FieldSketch &out) const
Appends the jet's axis at t for a visualiser, as JetField::Sketch(); the default appends nothing.
Definition JetField.h:192
virtual bool MayReach(const WakeQueryRegion ®ion) const
Definition JetField.h:168
virtual JetSampleParts SampleParts(double t, const double pos[3]) const
Definition JetField.h:152
virtual Status Sample(double t, const double pos[3], JetSample &out) const =0
virtual bool StaticFrom(double t) const
Whether Sample() stays the same from t on until Revision() changes, as WakeField::StaticFrom(); the d...
Definition JetField.h:178
virtual void SampleMany(double t, std::span< const std::array< double, 3 > > positions, std::span< JetSample > out, std::span< Status > status) const
Samples many points at one time, as WakeField::SampleMany(); the default calls Sample() at each point...
Definition JetField.h:185
Status
Definition marenv.h:40
@ ERROR_NOT_SET
No valid data (outside a field's horizontal extent, a NaN position, no field); the value is not set (...
double BlendWeight(double t, double start, double time)
Definition WakeSampleParts.h:13
Policy mixin: this type is neither copyable nor movable.
Definition marenv.h:96
Definition FieldSketch.h:16
JetBlendSum previous
The state blended from at full weight (a single snapshot, R22); not inside without one.
Definition JetField.h:68
JetBlendSum At(double t) const
The sum at t: the snapshot blended to with BlendWeight(t), the state blended from with 1 - BlendWeigh...
Definition JetField.h:73
JetSample current
The snapshot blended to, unweighted.
Definition JetField.h:67
double time
Duration of the blend, s.
Definition JetField.h:70
bool currentInside
The snapshot blended to has extent at the point.
Definition JetField.h:66
double start
Start of the blend, s.
Definition JetField.h:69
Status ToSample(JetSample &out) const
Definition JetField.h:53
void Add(double share, const JetSample &sample)
Adds a snapshot's sample with its share of the blend.
Definition JetField.h:35
double velocity[3]
Sum of share Δu, m/s, NED.
Definition JetField.h:32
void Add(double share, const JetBlendSum &part)
Adds the sum of a state blended from with its share of the blend.
Definition JetField.h:43
bool inside
True once a snapshot contributed.
Definition JetField.h:31
JetBlendSamples blend
Blending: the samples of the blend's snapshots at the sample time.
Definition JetField.h:96
bool blending
True: the field blends at or after the sample time and At(t) weighs the blend at t.
Definition JetField.h:93
Status status
Not blending: the status of JetField::Sample() at the sample time.
Definition JetField.h:94
Status At(double t, JetSample &out) const
Definition JetField.h:102
JetSample sample
Not blending: JetField::Sample() at the sample time.
Definition JetField.h:95
double velocity[3]
Excess velocity Δu, m/s, NED.
Definition JetField.h:21
Definition WakeField.h:23