Fill ghost nodes with given boundary conditions for cell scalars.
Functions/Subroutines | |
subroutine | explicit_add_cell_bc (scalar, boundary_condition) |
Compute the equivalent Dirichlet boundary value of a field and store the result in the first ghost cell in each direction. | |
subroutine mod_explicit_add_cell_bc::explicit_add_cell_bc | ( | double precision, dimension(:,:,:), intent(inout) | scalar, |
type(t_boundary_condition), intent(in) | boundary_condition ) |
The computation is done for Neumann boundaries.
This is done by applying a different Neumann condition which is the extrapolation of the derivative at the extrapolated point (order 2):
\[ \phi(\alpha) \simeq \phi(x_0) + \alpha D^1(x_0) + \alpha^2/2 D^2(x_0) \Rightarrow \frac{d \phi}{d x}(\alpha) \simeq D^1(x_0) + \alpha D^2(x_0) \Rightarrow D^1(x_0) \simeq \frac{d \phi}{d x}(\alpha) - \alpha D^2(x_0) \]
where \( \alpha \) is the distance between the extrapolation cell and the place where the derivative is given.
[in,out] | scalar | scalar field |
[in] | boundary_condition | boundary conditions. |