|
numerics 0.1.0
|
#include <grid3d.hpp>
Public Member Functions | |
| Grid3D (int nx, int ny, int nz, double dx=1.0) | |
| int | nx () const |
| int | ny () const |
| int | nz () const |
| double | dx () const |
| int | size () const |
| real & | operator() (int i, int j, int k) |
| real | operator() (int i, int j, int k) const |
| void | set (int i, int j, int k, real v) |
| void | fill (real v) |
| template<typename F > | |
| void | fill (F &&f) |
| Fill every cell with f(i, j, k). | |
| template<typename F > | |
| Grid3D (int nx, int ny, int nz, double dx, F &&f) | |
| Construct and fill from callable f(i, j, k) -> real. | |
| Vector | to_vector () const |
| Copy contents into a new Vector (for solver interop). | |
| void | from_vector (const Vector &v) |
| Copy solver result back into grid. | |
Definition at line 15 of file grid3d.hpp.
| num::Grid3D::Grid3D | ( | int | nx, |
| int | ny, | ||
| int | nz, | ||
| double | dx = 1.0 |
||
| ) |
| nx,ny,nz | Number of cells in each dimension |
| dx | Uniform cell size [m] |
Definition at line 7 of file grid3d.cpp.
|
inline |
Construct and fill from callable f(i, j, k) -> real.
Definition at line 60 of file grid3d.hpp.
References fill().
|
inline |
Definition at line 30 of file grid3d.hpp.
Referenced by num::curl_3d(), num::divergence_3d(), num::ScalarField3D::dx(), num::FieldSolver::solve_poisson(), and num::FieldSolver::solve_var_poisson().
|
inline |
Fill every cell with f(i, j, k).
Definition at line 51 of file grid3d.hpp.
| void num::Grid3D::fill | ( | real | v | ) |
Definition at line 14 of file grid3d.cpp.
Referenced by num::ScalarField3D::fill(), num::ScalarField3D::fill(), and Grid3D().
| void num::Grid3D::from_vector | ( | const Vector & | v | ) |
|
inline |
Definition at line 21 of file grid3d.hpp.
Referenced by num::curl_3d(), num::MagneticSolver::current_density(), num::divergence_3d(), num::ScalarField3D::nx(), num::FieldSolver::solve_poisson(), and num::FieldSolver::solve_var_poisson().
|
inline |
Definition at line 24 of file grid3d.hpp.
Referenced by num::curl_3d(), num::MagneticSolver::current_density(), num::divergence_3d(), num::ScalarField3D::ny(), num::FieldSolver::solve_poisson(), and num::FieldSolver::solve_var_poisson().
|
inline |
Definition at line 27 of file grid3d.hpp.
Referenced by num::curl_3d(), num::MagneticSolver::current_density(), num::divergence_3d(), num::ScalarField3D::nz(), num::FieldSolver::solve_poisson(), and num::FieldSolver::solve_var_poisson().
|
inline |
Definition at line 37 of file grid3d.hpp.
|
inline |
Definition at line 40 of file grid3d.hpp.
|
inline |
Definition at line 44 of file grid3d.hpp.
Referenced by num::ScalarField3D::set().
|
inline |
Definition at line 33 of file grid3d.hpp.
Referenced by from_vector(), and to_vector().
| Vector num::Grid3D::to_vector | ( | ) | const |
Copy contents into a new Vector (for solver interop).
Definition at line 18 of file grid3d.cpp.
References size().