Next: Dirichlet boundary conditions
Up: Boundary Conditions
Previous: Boundary Conditions
In this section we describe how to use wavelets with homogeneous Dirichlet-, Neumann- or periodic BC.
For multiscale coefficients, stored e.g. in AdaptiveData<DIM>, it is necessary to specify the basis functions,
including their builtin boundary conditions. In AWFD we use the following mechanism:
- The first step is to get the filter masks for the desired type of Wavelets (Interpolets, Daubechies,..) and the desired order
using the constructor of Wavelets.
- The Wavelets
are passed to the constructors of
UniformData<D>,
LevelAdaptiveGrid<D>,
AdaptiveGrid<D>.
- The type of builtin boundary conditions is a property of the the numerical data itself.
As we will see, it is necessary to handle for a particular (adaptive) grid at the same time
coefficients w.r.t. wavelets with e.g. homogeneous Dirichlet conditions and
coefficients w.r.t. wavelets with no boundary conditions.
The most common way to set the boundary conditions are
- Linear algebra: For example, if two AdaptiveDatas have the same homogeneous/periodic boundary conditions one can add them. The result inherits
the boundary conditions.
- Application of operators:If one computes a Petrov-Galerkin or FD discretization of a derivative along a
coordinate direction, say the i-th, using the ApplyOp(.) member functions, one has to specify the homogeneous/periodic
boundary conditions of the test functions on the according two faces
and
. The result inherits these BC.
A special operation for ApplyOp is PROJECTION. This operation computes the 'Petrov-Galerkin'-projection of the argument to a trial space
of wavelets with the given type of boundary conditions on the according two faces. An example where this operation is needed
is the computation of the right hand side for e.g. a Poisson equation, see section 9.5 or e.g. the 'lift'
of coefficients w.r.t. wavelets with homogeneous Neumann conditions to a representation w.r.t. wavelets with no boundary conditions.
After that, an inverse transform directly leads to the nodal values of the functions. Without the lifting, we would obtain
nodal values on an (in some sense) incomplete grid.
- The SetFunction() (and AdaptiveData::SetBoundaryValueFunction()) members return e.g. UniformDatas/AdaptiveDatas/LevelAdaptiveDatas
with either no boundary or periodic conditions on the respective faces.
If one wants to write a new function to generate/manipulate numerical data, for example, a new reader for a proprietary file format,
one has to set the BC explicitly using the ::SetBoundaryConditions(.) member functions. Below we describe the identifiers to be used
as arguments.
Boundary condition identifiers:
The boundary conditions are stored in an array int BC[D][2] as an attribute of the so-called
Extensions<D>
which also contain other basic information on the numerical data.
The BC[][] array contains just identifiers for the builtin boundary conditions on the respective face.
Let be the computational domain, then BC[i][0] represents the boundary condition type on the face
and BC[i][1] represents the boundary condition type on
( ).
The following values of BC[][] are possible:
-1 |
no boundary conditions, just wavelets on the interval |
0 |
homogeneous Dirichlet conditions |
1 |
homogeneous Neumann conditions |
PERIODIC |
periodic boundary conditions, BC[i][0] must be -1 and BC[i][1] must be PERIODIC then |
Consistency checks:
The AWFD functions provide a plenty of runtime checks related to the boundary conditions of numerical data.
It is strongly recommended to read Section 6 for details and further understanding.
Next: Dirichlet boundary conditions
Up: Boundary Conditions
Previous: Boundary Conditions
koster
2003-07-29
|