Skip to content

num::vector_field_3d

Defined in header <fields/field3d.hpp>

struct vector_field_3d;

Vector field on a 3D grid: three components on one grid.

Members

member description
scalar_field_3d x
scalar_field_3d x, y
scalar_field_3d x, y, z
vector_field_3d(int nx, int ny, int nz, float dx, float ox = 0.0f, float oy = 0.0f, float oz = 0.0f)
std::array<float, 3> sample(float px, float py, float pz) const Interpolate all components trilinearly at \((x, y, z)\).
void scale(float s) Scale the field: \(F \leftarrow s F\).