evoxels.fd_stencils
Classes
Class wrapper for finite difference stencils |
- class evoxels.fd_stencils.FDStencils
Class wrapper for finite difference stencils
Is inherited by the VoxelGrid to apply stencils to backend arrays.
- grad_x_center(field)
Gradient in x at cell center
- grad_x_face(field)
Gradient at face position staggered in x
- grad_y_center(field)
Gradient in x at cell center
- grad_y_face(field)
Gradient at face position staggered in y
- grad_z_center(field)
Gradient in x at cell center
- grad_z_face(field)
Gradient at face position staggered in z
- gradient_norm_squared(field)
Gradient norm squared at cell centers
- laplace(field)
Calculate laplace based on compact 2nd order stencil.
Laplace given as $nablacdot(nabla u)$ which in 3D is given by $partial^2 u/partial^2 x + partial^2 u/partial^2 y+ partial^2 u/partial^2 z$ Returned field has same shape as the input field (padded with zeros)
- normal_laplace(field)
Calculate the normal component of the laplacian
which is identical to the full laplacian minus curvature. It is defined as $partial^2_n u = nablacdot(nabla ucdot n)cdot n$ where $n$ denotes the surface normal. In the context of phasefield models $n$ is defined as $frac{nabla u}{|\nabla u|}$. The calaculation is based on a compact 2nd order stencil.
- to_x_face(field)
Interpolate to face position staggered in x
- to_y_face(field)
Interpolate to face position staggered in y
- to_z_face(field)
Interpolate to face position staggered in z