num::field_solver¶
Defined in header <pde/field_solver.hpp>
class field_solver;
Routines for the Poisson equation and vector calculus on 3D fields.
Members¶
| member | description |
|---|---|
static solver_result solve_poisson(scalar_field_3d &phi, const scalar_field_3d &source, double tol = 1e-6, int max_iter = 500) |
Solve the Poisson equation with zero boundary values: \(\Delta \phi = s\). |
static solver_result solve_var_poisson(scalar_field_3d &phi, const scalar_field_3d &coeff, const array<dirichlet_bc> &bcs, double tol = 1e-6, int max_iter = 500) |
Solve the Poisson equation with a variable coefficient: \(\nabla \cdot (c \nabla \phi) = 0\). |
static vector_field_3d gradient(const scalar_field_3d &phi) |
Compute the gradient: \(\nabla \phi\). |
static scalar_field_3d divergence(const vector_field_3d &f) |
Compute the divergence: \(\nabla \cdot f\). |
static vector_field_3d curl(const vector_field_3d &A) |
Compute the curl: \(\nabla \times A\). |