evoxels.boundary_conditions

Classes

CellCenteredBCs(vg)

StaggeredXBCs(vg)

class evoxels.boundary_conditions.CellCenteredBCs(vg)
__init__(vg)
pad_bc(field, bc)
pad_dirichlet_periodic(field, bc0=0, bc1=0)

Homogenous Dirichlet boundary conditions in x-drection, periodic in y- and z-direction. Consistent with cell centered grid, but loss of 2nd order convergence.

pad_fft_dirichlet_periodic(field)

Pad with inverse of flipped field in x direction.

pad_fft_periodic(field)

Periodic field needs no fft padding.

pad_fft_zero_flux_periodic(field)

Pad with flipped field in x direction.

pad_periodic(field)

Periodic boundary conditions in all directions. Consistent with cell centered grid.

pad_zero_flux_periodic(field)
trim_boundary_nodes(field)
trim_ghost_nodes(field)
class evoxels.boundary_conditions.StaggeredXBCs(vg)
__init__(vg)
pad_bc(field, bc)
pad_dirichlet_periodic(field, bc0=0, bc1=0)

Homogenous Dirichlet boundary conditions in x-drection, periodic in y- and z-direction. Consistent with staggered_x grid, maintains 2nd order convergence.

pad_fft_dirichlet_periodic(field)

Pad with inverse of flipped field in x direction.

pad_fft_periodic(field)

If field is fully periodic it should be in cell center convention!

pad_fft_zero_flux_periodic(field)

Pad with flipped field in x direction.

pad_periodic_BC_staggered_x(field)

If field is fully periodic it should be in cell center convention!

pad_zero_flux_periodic(field)

The following comes out of on interpolation polynomial p with p’(0) = 0, p(dx) = f(dx,…), p(2*dx) = f(2*dx,…) and then use p(0) for the ghost cell. This should be of sufficient order of f’(0) = 0, and even better if also f’’’(0) = 0 (as it holds for cos(k*pi*x) )

trim_boundary_nodes(field)

Trim boundary nodes of field for staggered grids.

trim_ghost_nodes(field)