Neumann boundary conditions

Assume the Neumann values on the face
are given by means of .
Similar to the Dirichlet case we can define a simple function which takes the Neumann values on via the wavelet
coefficients of . Then,

Clearly,

For a level 5 regular sparse or full grid, Neumann values as shown below(left), the resulting function looks like

The above situation represents a very simple case, as there are no other faces with Neumann BC. To explain the difficulties involved then, we consider the case of Neumann BC at the face and at , respectively. The Neumann values are shown below:

A simple idea to obtain would be to generate two functions and
in the same fashion as in (5.3) which take the Neumann BC on just and , respectively,
and to add these two functions.
In general
does not take the desired boundary values, e.g.

If , then our approach would work. Analogously, we obtain from the condition . Of course, we cannot expect that the Neumann values meet these constraints, in general. Nevertheless, it is possible to remedy this problem in the following way:

The idea ist to find a function which is non zero in a neighbourhood of the critical point only.
In the vicinity of , this function behaves like

One easily verifies that

Now, the clou is that under the additional constraint that

the modified Neumann-values and fulfill the conditions for the above simple scheme, i.e. and . Then, if the functions and are defined using the modified Neumann values, exactly takes the Neumann values.

Remark: (5.3) is simply the necessary condition on
the Neumann values to allow for the existence of a function which is
two times differentiable in (1,1).

In the high dimensional case we proceed in a similar fashion. First, some auxiliary functions
are computed which are defined in the vicinity of e.g. corners only where several Neumann faces touch.
E.g. in the three dimensional case and a Neumann-Neumann-Neumann-corner these functions look like

As you see, the whole thing gets more and more involved the higher the dimension is. For this reason the current implementation of AdaptiveData<D>::SetBoundaryValueFunction handles two- and three-dimensional cases, only.