numerics
Loading...
Searching...
No Matches
num::VectorField3D Struct Reference

#include <fields.hpp>

Public Member Functions

 VectorField3D (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
 Trilinear-interpolated field vector at world position.
 
void scale (float s)
 Multiply all components by scalar s.
 

Public Attributes

ScalarField3D x
 
ScalarField3D y
 
ScalarField3D z
 x, y, z components on the same grid layout
 

Detailed Description

Definition at line 56 of file fields.hpp.

Constructor & Destructor Documentation

◆ VectorField3D()

num::VectorField3D::VectorField3D ( int  nx,
int  ny,
int  nz,
float  dx,
float  ox = 0.0f,
float  oy = 0.0f,
float  oz = 0.0f 
)

Definition at line 45 of file fields.cpp.

Member Function Documentation

◆ sample()

std::array< float, 3 > num::VectorField3D::sample ( float  px,
float  py,
float  pz 
) const

Trilinear-interpolated field vector at world position.

Definition at line 51 of file fields.cpp.

References num::ipow(), num::ScalarField3D::sample(), x, y, and z.

◆ scale()

void num::VectorField3D::scale ( float  s)

Multiply all components by scalar s.

Definition at line 55 of file fields.cpp.

References num::ScalarField3D::grid(), num::ipow(), num::scale(), x, y, and z.

Member Data Documentation

◆ x

◆ y

◆ z

ScalarField3D num::VectorField3D::z

x, y, z components on the same grid layout

Definition at line 57 of file fields.hpp.

Referenced by num::MagneticSolver::current_density(), main(), sample(), scale(), and num::MagneticSolver::solve_magnetic_field().


The documentation for this struct was generated from the following files: