|
numerics 0.1.0
|
#include <fields.hpp>
Public Member Functions | |
| ScalarField3D (int nx, int ny, int nz, float dx, float ox=0.0f, float oy=0.0f, float oz=0.0f) | |
| Grid3D & | grid () |
| const Grid3D & | grid () const |
| int | nx () const |
| int | ny () const |
| int | nz () const |
| float | dx () const |
| float | ox () const |
| float | oy () const |
| float | oz () const |
| void | set (int i, int j, int k, double v) |
| void | fill (double v) |
| template<typename F > | |
| void | fill (F &&f) |
| Fill every cell with f(i, j, k). | |
| template<typename F > | |
| ScalarField3D (int nx, int ny, int nz, float dx, F &&f, float ox=0.0f, float oy=0.0f, float oz=0.0f) | |
| Construct and fill from callable f(i, j, k) -> double. | |
| float | sample (float x, float y, float z) const |
Definition at line 22 of file fields.hpp.
| num::ScalarField3D::ScalarField3D | ( | int | nx, |
| int | ny, | ||
| int | nz, | ||
| float | dx, | ||
| float | ox = 0.0f, |
||
| float | oy = 0.0f, |
||
| float | oz = 0.0f |
||
| ) |
| nx,ny,nz | Grid resolution |
| dx | Cell size [m] |
| ox,oy,oz | World-space origin |
Definition at line 14 of file fields.cpp.
|
inline |
Construct and fill from callable f(i, j, k) -> double.
Definition at line 76 of file fields.hpp.
References fill().
|
inline |
Definition at line 51 of file fields.hpp.
References num::Grid3D::dx().
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), sample(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 67 of file fields.hpp.
References num::Grid3D::fill().
Referenced by ScalarField3D().
|
inline |
Fill every cell with f(i, j, k).
Definition at line 72 of file fields.hpp.
References num::Grid3D::fill().
|
inline |
Definition at line 35 of file fields.hpp.
Referenced by num::FieldSolver::curl(), num::MagneticSolver::current_density(), num::FieldSolver::divergence(), num::FieldSolver::gradient(), num::VectorField3D::scale(), num::MagneticSolver::solve_magnetic_field(), num::FieldSolver::solve_poisson(), and num::FieldSolver::solve_var_poisson().
|
inline |
Definition at line 38 of file fields.hpp.
|
inline |
Definition at line 42 of file fields.hpp.
References num::Grid3D::nx().
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), sample(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 45 of file fields.hpp.
References num::Grid3D::ny().
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), sample(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 48 of file fields.hpp.
References num::Grid3D::nz().
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), sample(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 54 of file fields.hpp.
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 57 of file fields.hpp.
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), and num::MagneticSolver::solve_magnetic_field().
|
inline |
Definition at line 60 of file fields.hpp.
Referenced by num::FieldSolver::curl(), num::FieldSolver::divergence(), and num::MagneticSolver::solve_magnetic_field().
| float num::ScalarField3D::sample | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) | const |
Trilinear interpolation at world position (x,y,z). Returns 0 outside the grid domain.
Definition at line 18 of file fields.cpp.
References dx(), nx(), ny(), and nz().
Referenced by num::VectorField3D::sample().
|
inline |
Definition at line 64 of file fields.hpp.
References num::Grid3D::set().