Solution structures
In solving boundary or initial value problems, one generally seeks a function that satisfies both certain boundary conditions and differential equations. In solution structures, the boundary conditions (or at least part of them) are already incorporated into the solution space. This provides greater flexibility in the choice of variational methods and, depending on the approach, allows for exact satisfaction of the boundary conditions.
This module provides functions to compute the solution structure at a given integration point using different modes, as well as to precompile and evaluate discrete solution structures by evaluating and storing shape functions, boundary conditions, and projection operators. Precompilation can improve the efficiency, but one has to consider how many discrete derivatives need to be evaluated for the given solution structure and pde.
The idea of the RFM (Rvachev-function method) solution structures is basically to multiply the solution space \(\phi\) with a smooth function \(\omega\) that vanishes on the boundary and to add subsequently a function \(b\) that satisfies the boundary conditions: \(\tilde{\phi} = \omega \phi + b\). The initial approximation \(\phi\) can e.g. be a finite element ansatz, but also some approach in which boundary conditions can not simply nodally imposed, such as smooth meshfree shape functions or a neural network. The global weighting function \(\omega\) can be constructed for example based on Rvachev functions that can be used as smooth distance functions to certain primitive elements. The boundary function \(b\) can be set up via transfinite interpolation in case there are different conditions on different segments of the boundary. The above procedure works well e.g. for a Laplace equation with Dirichlet conditions, but special techniques have to be used for more complex problems, see e.g. Rvachev and Sheiko (1995). These kind of solution structures may be implemented as a user-specific solution structure ‘user’ (see the source code for examples).
Here, a general technique is implemented with the solution structure type ‘first order set’ which can handle arbitrary order PDEs with multiple coupled boundary conditions. However, the prerequisite is that the problem is reformulated into a set of first-order problems and that a suitable variational method is used, such as a norm-equivalent first-order least square formulation (see, e.g., Gunzburger and Bochev (2009)). This means that not only, for example, the temperature field \(\theta\) serves as a primary variable, but also its derivatives, such as \(\theta_{,X}\) and \(\theta_{,t}\). If we gather all the primary fields into the vector \(\boldsymbol{\phi}\), boundary conditions of the form \(\boldsymbol{a}_i \cdot \boldsymbol{\phi} = b_i\) can be imposed by the following approach: \(\tilde{\boldsymbol{\phi}} = \boldsymbol{P} \cdot \boldsymbol{\phi} + \tilde{\boldsymbol{b}}\) with the projector field \(\boldsymbol{P} = \boldsymbol{I} - \sum_i (1 - \omega_i) \boldsymbol{a}_i \otimes \boldsymbol{a}_i\), where \(\boldsymbol{I}\) is the identity matrix, \(\omega_i\) is a boundary segment selector as a smooth distance funcion and the set of \(\boldsymbol{a}_i\) have to be orthogonal to each other at the boundary segments with each having a length of 1. The boundary function can be set up based on transfinite interpolations based on \(\tilde{\boldsymbol{b}} = \sum_i b_i \boldsymbol{a}_i\). An example can be found e.g. in space_time_fos_dirichlet_neumann_robin.py
Rvachev function solution structures and precompilation utilities
|
Computes the solution structure at a given integration point using various predefined schemes. |
|
Manually precompiles solution structures by evaluating and storing shape functions, boundary conditions, and projection operators for different integration points and domains. |
|
Precomputes a function and its derivatives up to a specified order at given integration points. |
|
Precomputes coupled boundary conditions and their derivatives up to a specified order at given integration points. |
|
Precomputes the projection operator and its derivatives up to a specified order at given integration points. |