|
waLBerla 7.2
|
Neumann boundary handling for PDEs.
This boundary condition imposes a Neumann condition with arbitrary values on a PDE. It does so by modifying the right-hand side and the stencil field. Anything that has internal copies of the stencil field (e.g. the multigrid V-cycle's coarsened stencils) is responsible for updating its copies when boundary conditions are changed.
| Stencil_T | The stencil used for the discrete operator |
| flag_t | The integer type used by the flag field |
#include <Neumann.h>
Inheritance diagram for walberla::pde::Neumann< Stencil_T, flag_t >:Classes | |
| class | NeumannBC |
Public Member Functions | |
| Neumann (const BoundaryUID &boundaryUID, const FlagUID &uid, Field_T *const rhsField, const StencilField_T *const stencilField, StencilField_T *const adaptBCStencilField, FlagField< flag_t > *const flagField, const StructuredBlockStorage &blocks) | |
| Creates a Neumann boundary. | |
| void | pushFlags (std::vector< FlagUID > &uids) const |
| void | beforeBoundaryTreatment () const |
| void | afterBoundaryTreatment () |
| template<typename Buffer_T > | |
| void | packCell (Buffer_T &buffer, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z) const |
| template<typename Buffer_T > | |
| void | registerCell (Buffer_T &buffer, const flag_t, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z) |
| void | registerCell (const flag_t, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const BoundaryConfiguration &neumannBC) |
| void | registerCells (const flag_t, const CellInterval &cells, const BoundaryConfiguration &neumannBC) |
| template<typename CellIterator > | |
| void | registerCells (const flag_t, const CellIterator &begin, const CellIterator &end, const BoundaryConfiguration &neumannBC) |
| void | unregisterCell (const flag_t, const cell_idx_t x, const cell_idx_t y, const cell_idx_t z) |
| void | treatDirection (const cell_idx_t x, const cell_idx_t y, const cell_idx_t z, const stencil::Direction dir, const cell_idx_t nx, const cell_idx_t ny, const cell_idx_t nz, const flag_t mask) |
| Treat one direction by adapting RHS according to Neumann boundary value. | |
| const real_t & | getValue (const cell_idx_t x, cell_idx_t y, cell_idx_t z) const |
Public Member Functions inherited from walberla::boundary::Boundary< flag_t > | |
| Boundary (const BoundaryUID &boundaryUID) | |
| void | setMask (const flag_t mask) |
| flag_t | getMask () const |
| const BoundaryUID & | getUID () const |
Static Public Member Functions | |
| static shared_ptr< NeumannBC > | createConfiguration (const Config::BlockHandle &config) |
Static Public Attributes | |
| static const bool | threadsafe = false |
Private Types | |
| using | Field_T = GhostLayerField<real_t, 1> |
| using | StencilField_T = GhostLayerField<real_t, Stencil_T::Size> |
Private Attributes | |
| const FlagUID | uid_ |
| const flag_t | formerNeumann_ |
| uint_t | numDirtyCells_ |
| std::array< real_t, Stencil_T::Q > | dx_ |
| Field_T *const | rhsField_ |
| shared_ptr< Field_T > | neumannBC_ |
| const StencilField_T *const | stencilField_ |
| StencilField_T *const | adaptBCStencilField_ |
| FlagField< flag_t > *const | flagField_ |
Additional Inherited Members | |
Protected Attributes inherited from walberla::boundary::Boundary< flag_t > | |
| const BoundaryUID | boundaryUID_ |
| flag_t | mask_ |
| bool | maskSet_ {false} |
|
private |
|
private |
|
inline |
Creates a Neumann boundary.
| boundaryUID | the UID of the boundary condition |
| uid | the UID of the flag that marks cells with this boundary condition |
| rhsField | pointer to the right-hand side field, which will be adapted by this boundary condition |
| stencilField | pointer to the operator stencil field. It should contain the stencil weights that don't take into account the boundary conditions. |
| adaptBCStencilField | pointer to the operator stencil field that will be adapted by this boundary condition. Initially, this field needs to contain the same values as stencilField. This is the stencil field that should be passed to the actual PDE solver. |
| flagField | pointer to the flag field |
| blocks |
| void walberla::pde::Neumann< Stencil_T, flag_t >::afterBoundaryTreatment | ( | ) |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Treat one direction by adapting RHS according to Neumann boundary value.
| void walberla::pde::Neumann< Stencil_T, flag_t >::unregisterCell | ( | const flag_t | , |
| const cell_idx_t | x, | ||
| const cell_idx_t | y, | ||
| const cell_idx_t | z ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
private |