H2Lib  3.0
Data Fields
_bem3d Struct Reference

Main container object for computation of BEM related matrices and vectors. More...

#include <bem3d.h>

Data Fields

pcsurface3d gr
 Polyedric 3 dimensional surface mesh. More...
 
psingquad2d sq
 Quadrature rules used within BEM computation. More...
 
basisfunctionbem3d row_basis
 Type of basis function for neumann-data.
 
basisfunctionbem3d col_basis
 Type of basis function for dirichlet-data.
 
realmass
 Mass-matrix of reference basis functions. More...
 
field alpha
 Boundary integral operator + $\alpha$ mass matrix.
 
field k
 Wavenumber for Helmholtz type problems, possibly complex valued.
 
field kernel_const
 A constant factor extracted from the kernel function to speed up quadrature.
 
plistnodev2t
 This field describes the mapping from the vertices of a geometry to the triangles they belong to. More...
 
void(* nearfield )(const uint *ridx, const uint *cidx, pcbem3d bem, bool ntrans, pamatrix N)
 Computes nearfield entries of Galerkin matrices. More...
 
void(* nearfield_far )(const uint *ridx, const uint *cidx, pcbem3d bem, bool ntrans, pamatrix N)
 Computes nearfield entries of Galkerin matrices for disjoint clusters. More...
 
void(* farfield_rk )(pccluster rc, uint rname, pccluster cc, uint cname, pcbem3d bem, prkmatrix R)
 Computes rank-k-approximations of a given block. More...
 
void(* farfield_u )(uint rname, uint cname, uint bname, pcbem3d bem)
 Computes coupling matrix $ S_b $ for uniform matrices. More...
 
void(* farfield_wave_u )(uint rname, uint cname, uint bname, pcbem3d bem)
 Computes coupling matrix $ S_b^c $ for duniform matrices for some direction $c$. More...
 
void(* leaf_row )(uint rname, pcbem3d bem)
 Computes the the matrix $ V_t $ for a leaf cluster $ t \in \mathcal L_{\mathcal I} $ . More...
 
void(* leaf_wave_row )(uint rname, pcbem3d bem)
 Computes the the matrix $ V_{t,c_\iota} $ for a leaf cluster $ t \in \mathcal L_{\mathcal I} $ and a direction $c_\iota$. More...
 
void(* leaf_col )(uint cname, pcbem3d bem)
 Computes the the matrix $ W_s $ for a leaf cluster $ s \in \mathcal L_{\mathcal J} $ . More...
 
void(* leaf_wave_col )(uint cname, pcbem3d bem)
 Computes the the matrix $ W_{s, c_\iota} $ for a leaf cluster $ s \in \mathcal L_{\mathcal J} $ and a direction $c_\iota$. More...
 
void(* transfer_row )(uint rname, pcbem3d bem)
 Computes the transfer matrices $ E_{t'} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ . More...
 
void(* transfer_wave_row )(uint rname, pcbem3d bem)
 Computes the transfer matrices $ E_{t', c_\iota} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ and directions $c_\iota$. The father cluster $t$ is using the wave-Lagrange basis while the sons $t' \in \operatorname{sons}(t)$ use the standard Lagrange basis. More...
 
void(* transfer_wave_wave_row )(uint rname, pcbem3d bem)
 Computes the transfer matrices $ E_{t', c_\iota} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ and directions $c_\iota$. Both, the father cluster $t$ and sons $t' \in \operatorname{sons}(t)$ are using the wave-Lagrange basis. More...
 
void(* transfer_col )(uint cname, pcbem3d bem)
 Computes the transfer matrices $ F_{s'} $ for a cluster $ s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ . More...
 
void(* transfer_wave_col )(uint cname, pcbem3d bem)
 Computes the transfer matrices $ F_{s', c_\iota} $ for a cluster $ s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ and directions $c_\iota$. The father cluster $s$ is using the wave-Lagrange basis while the sons $s' \in \operatorname{sons}(s)$ use the standard Lagrange basis. More...
 
void(* transfer_wave_wave_col )(uint cname, pcbem3d bem)
 Computes the transfer matrices $ F_{s', c_\iota} $ for a cluster $s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ and directions $c_\iota$. Both, the father cluster $s$ and sons $s' \in \operatorname{sons}(s)$ are using the wave-Lagrange basis. More...
 
paprxbem3d aprx
 A collection of necessary data structures for approximating matrices with various techniques. More...
 
pparbem3d par
 Some helpers to make parallel computations possible. More...
 
pkernelbem3d kernels
 A collection of callback functions for different types of kernel evaluations. More...
 

Detailed Description

Main container object for computation of BEM related matrices and vectors.

This struct defines the essential part of all calculations concerning BEM. Just creating a simple bem3d object is not intended, though possible. Therefore call a problem specific constructor such as new_slp_laplace_bem3d or new_dlp_laplace_bem3d . This will initialize all needed callback functions to build up at least dense matrices. To be able to create h- or h2matrix approximations one needs to call one of the set_hmatrix_aprx* or set_h2matrix_aprx* depending on the type of your matrix, to fully initialize the bem3d object. Afterwards you can build up your desired matrix approximation with a few simple functions calls, delivered by the bem3d object, using your favored approximation technique. Calling another of these " set " functions will reinitialize the bem3d object and you can build another approximation with a different technique.

Field Documentation

paprxbem3d aprx

A collection of necessary data structures for approximating matrices with various techniques.

Necessary Objects for approximation matrices with different approximation schemes are stored within aprx.

void(* farfield_rk) (pccluster rc, uint rname, pccluster cc, uint cname, pcbem3d bem, prkmatrix R)

Computes rank-k-approximations of a given block.

This callback function computes a rank-k-approximation of a matrix block given by row cluster rc and column cluster cc. The Matrices A and B are stored in a rank-k-matrix R.

Parameters
rcCurrent row cluster .
rnameEnumerated number of current row cluster rc.
ccCurrent column cluster
cnameEnumerated number of current column cluster cc.
bemBEM-object containing additional information for computation of the matrix entries.
RRank-k-matrix, which takes up the resulting matrices A and B . The rank k is defined by the underlying approximation technique.
void(* farfield_u) (uint rname, uint cname, uint bname, pcbem3d bem)

Computes coupling matrix $ S_b $ for uniform matrices.

While using h2-matrices the coupling matrices $ S_b $ are computed by this callback function. Coupling matrices are stored in the struct uniform defining a certain block of the whole h2-matrix.

Parameters
rnameEnumerated number of current row cluster clusterbasis U->rb.
cnameEnumerated number of current column clusterbasis U->cb.
bmameEnumerated number of current block. From that number an object of type uniform containing the coupling matrix $ S_b $ , the row clusterbasis U->rb and the column clusterbasis U->cb can be derived.
bemBEM-object containing additional information for computation of the matrix entries.
void(* farfield_wave_u) (uint rname, uint cname, uint bname, pcbem3d bem)

Computes coupling matrix $ S_b^c $ for duniform matrices for some direction $c$.

While using Dh2-matrices the coupling matrices $ S_b^c $ are computed by this callback function. Coupling matrices are stored in the struct duniform defining a certain block of the whole Dh2-matrix.

Parameters
rnameEnumerated number of current row dcluster dclusterbasis U->rb.
cnameEnumerated number of current column dclusterbasis U->cb.
bmameEnumerated number of current dblock. From that number an object of type duniform containing the coupling matrix $ S_b $ , the row dclusterbasis U->rb and the column dclusterbasis U->cb can be derived.
bemBEM-object containing additional information for computation of the matrix entries.

Polyedric 3 dimensional surface mesh.

Polyedric boundary mesh used for the BEM-problem.

See also
_surface3d.
pkernelbem3d kernels

A collection of callback functions for different types of kernel evaluations.

This struct defines a set of callback functions that are based on the fundamental solution of the underlying problem. They are used to build up approximations that will be used within farfield_rk , farfield_u , leaf_row , leaf_col , transfer_row and transfer_col. In Order to receive correct result, the callback functions defined in kernels have to be set correctly to the given problem by a constructor. These callback functions also depend on the utilized basis functions for either neumann- and dirichlet-data. As an example the constructors new_slp_laplace_bem3d and new_dlp_laplace_bem3d should serve.

See also
kernelbem2d
void(* leaf_col) (uint cname, pcbem3d bem)

Computes the the matrix $ W_s $ for a leaf cluster $ s \in \mathcal L_{\mathcal J} $ .

leaf_col is used for building up a clusterbasis for the set $ \mathcal L_{\mathcal J} $ for h2matrices. For each $ s \in \mathcal L_{\mathcal J} $ leaf_col will construct the matrix $ W_s $ . In case of nested clusterbasis transfer_col has also to be set to a valid function constructing suitable transfer matrices $ F_s $ .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
cnameEnumerated number of current column clusterbasis cb.
void(* leaf_row) (uint rname, pcbem3d bem)

Computes the the matrix $ V_t $ for a leaf cluster $ t \in \mathcal L_{\mathcal I} $ .

leaf_row is used for building up a clusterbasis for the set $ \mathcal L_{\mathcal I} $ for h2matrices. For each $ t \in \mathcal L_{\mathcal I} $ leaf_row will construct the matrix $ V_t $ . In case of nested clusterbasis transfer_row has also to be set to a valid function constructing suitable transfer matrices $ E_t $ .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
rnameEnumerated number of current row clusterbasis rb.
void(* leaf_wave_col) (uint cname, pcbem3d bem)

Computes the the matrix $ W_{s, c_\iota} $ for a leaf cluster $ s \in \mathcal L_{\mathcal J} $ and a direction $c_\iota$.

leaf_wave_col is used for building up a dclusterbasis for the set $ \mathcal L_{\mathcal J} $ for Dh2matrices. For each $ s \in \mathcal L_{\mathcal J}$ and for all directions $c_\iota$ leaf_wave_col will construct the matrix $ W_{s, c_\iota}$ . In case of nested dclusterbasis transfer_wave_col and transfer_wave_wave_col also have to be set to valid functions constructing suitable transfer matrices $ F_{s, c_\iota}$ .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
cnameEnumerated number of current column dclusterbasis cb.
void(* leaf_wave_row) (uint rname, pcbem3d bem)

Computes the the matrix $ V_{t,c_\iota} $ for a leaf cluster $ t \in \mathcal L_{\mathcal I} $ and a direction $c_\iota$.

leaf_wave_row is used for building up a dclusterbasis for the set $ \mathcal L_{\mathcal I} $ for Dh2matrices. For each $ t \in \mathcal L_{\mathcal I}$ and all directions $c_\iota$. leaf_wave_row will construct the matrix $ V_{t,c_\iota} $ . In case of nested dclusterbasis transfer_wave_row and transfer_wave_wave_row also have to be set to valid functions constructing suitable transfer matrices $ E_{t,c_\iota}$ .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
rnameEnumerated number of current row dclusterbasis rb.
real* mass

Mass-matrix of reference basis functions.

Mass-matrix for all combinations of reference basis functions $ \widehat\varphi_i $ and $ \widehat\psi_j $ . Entries are computed as:

\[ M_{ij} = \int_\Gamma \widehat\varphi_i(x) \cdot \widehat\psi_j(x) \, \mathrm d x \]

void(* nearfield) (const uint *ridx, const uint *cidx, pcbem3d bem, bool ntrans, pamatrix N)

Computes nearfield entries of Galerkin matrices.

This callback function computes 'nearfield' entries of the underlying problem and integral-operator.

Parameters
ridxDefines the indices of row boundary elements used. If ridx equals NULL, then Elements 0, ..., N->rows-1 are used.
cidxDefines the indices of column boundary elements used. If cidx equals NULL, then Elements 0, ..., N->cols-1 are used.
bemBem3d object, that contains additional Information for the computation of the matrix entries.
ntransIs a boolean flag to indicates the way of storing the entries in matrix N . If ntrans == true the matrix entries will be stored in a transposed way.
NFor ntrans == false the matrix entries are computed as:

\[ N_{ij} = \int_\Gamma \int_\Gamma \varphi_i(x) \, g(x,y) \, \psi_j(y) \, \mathrm d y \, \mathrm d x \, ,\]

otherwise they are stored as

\[ N_{ji} = \int_\Gamma \int_\Gamma \varphi_i(x) \, g(x,y) \, \psi_j(y) \, \mathrm d y \, \mathrm d x \, .\]

void(* nearfield_far) (const uint *ridx, const uint *cidx, pcbem3d bem, bool ntrans, pamatrix N)

Computes nearfield entries of Galkerin matrices for disjoint clusters.

This callback function computes 'nearfield' entries of the underlying problem and integral-operator.

Parameters
ridxDefines the indices of row boundary elements used. If ridx equals NULL, then Elements 0, ..., N->rows-1 are used.
cidxDefines the indices of column boundary elements used. If cidx equals NULL, then Elements 0, ..., N->cols-1 are used.
bemBem3d object, that contains additional Information for the computation of the matrix entries.
ntransIs a boolean flag to indicates the way of storing the entries in matrix N . If ntrans == true the matrix entries will be stored in a transposed way.
NFor ntrans == false the matrix entries are computed as:

\[ N_{ij} = \int_\Gamma \int_\Gamma \varphi_i(x) \, g(x,y) \, \psi_j(y) \, \mathrm d y \, \mathrm d x \, ,\]

otherwise they are stored as

\[ N_{ji} = \int_\Gamma \int_\Gamma \varphi_i(x) \, g(x,y) \, \psi_j(y) \, \mathrm d y \, \mathrm d x \, .\]

pparbem3d par

Some helpers to make parallel computations possible.

For the sake of parallelism we need some auxiliary data structure, which are all collected within the struct par. Most commonly used is this struct for enumerated non linear data structures such als cluster- or blocktrees.

Quadrature rules used within BEM computation.

Singular quadrature formulas used within boundary-integral-Operator computation.

See also
_singquad2d.
void(* transfer_col) (uint cname, pcbem3d bem)

Computes the transfer matrices $ F_{s'} $ for a cluster $ s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ .

transfer_col will build up the transfer matrices $ F_{s'} $ , for all $ s \in \mathcal T_{\mathcal J}$ and $ s' \in \operatorname{sons}(s) $ . For a cluster $ s \in \mathcal T_{\mathcal J} $ transfer_col will compute the matrices $ F_{s_1}, \ldots, F_{s_\sigma} $ , $ \# \operatorname{sons}(s) = \sigma $ . The matrix $ F_{s_1} $ is stored in cb->son[0]->E, $ F_{s_2} $ is stored in cb->son[1]->E, $ \ldots F_{t_\sigma} $ is stored in cb->son[ $\sigma-1$]->E .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
cnameEnumerated number of current column clusterbasis cb.
void(* transfer_row) (uint rname, pcbem3d bem)

Computes the transfer matrices $ E_{t'} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ .

transfer_row will build up the transfer matrices $ E_{t'} $ , for all $ t \in \mathcal T_{\mathcal I}$ and $ t' \in \operatorname{sons}(t) $ . For a cluster $ t \in \mathcal T_{\mathcal I} $ transfer_row will compute the matrices $ E_{t_1}, \ldots, E_{t_\tau} $ , $ \# \operatorname{sons}(t) = \tau $ . The matrix $ E_{t_1} $ is stored in rb->son[0]->E, $ E_{t_2} $ is stored in rb->son[1]->E, $ \ldots E_{t_\tau} $ is stored in rb->son[ $\tau-1$]->E .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
rnameEnumerated number of current row clusterbasis rb.
void(* transfer_wave_col) (uint cname, pcbem3d bem)

Computes the transfer matrices $ F_{s', c_\iota} $ for a cluster $ s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ and directions $c_\iota$. The father cluster $s$ is using the wave-Lagrange basis while the sons $s' \in \operatorname{sons}(s)$ use the standard Lagrange basis.

transfer_wave_col will build up the transfer matrices $ F_{s', c_\iota} $ , for all $ s \in \mathcal T_{\mathcal J}$ and $ s' \in \operatorname{sons}(s) $ and directions $c_\iota$. For a cluster $ s \in \mathcal T_{\mathcal J} $ transfer_wave_col will compute the matrices $ F_{s_1, c_1}, \ldots, F_{s_1, c_d}, \ldots F_{s_\sigma, c_1}, \ldots F_{s_\sigma, c_d} $ , $ \# \operatorname{sons}(s) = \sigma $ and $\iota \in \{ 1, \ldots, d \}$. The matrix $ F_{s_1, c_1} $ is stored in cb->son[0]->E + 0, $ F_{s_1, c_2} $ is stored in cb->son[0]->E + 1, $ \ldots F_{s_\tau, c_d} $ is stored in cb->son[ $\sigma-1$]->E + (d - 1) .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
cnameEnumerated number of current column dclusterbasis cb.
void(* transfer_wave_row) (uint rname, pcbem3d bem)

Computes the transfer matrices $ E_{t', c_\iota} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ and directions $c_\iota$. The father cluster $t$ is using the wave-Lagrange basis while the sons $t' \in \operatorname{sons}(t)$ use the standard Lagrange basis.

transfer_wave_row will build up the transfer matrices $ E_{t', c_\iota} $ , for all $ t \in \mathcal T_{\mathcal I}$ and $ t' \in \operatorname{sons}(t) $ and directions $c_\iota$. For a cluster $ t \in \mathcal T_{\mathcal I} $ transfer_wave_row will compute the matrices $ E_{t_1, c_1}, \ldots, E_{t_1, c_d}, \ldots E_{t_\tau, c_1}, \ldots E_{t_\tau, c_d} $ , $ \# \operatorname{sons}(t) = \tau $ and $\iota \in \{ 1, \ldots, d \}$. The matrix $ E_{t_1, c_1} $ is stored in rb->son[0]->E + 0, $ E_{t_1, c_2} $ is stored in rb->son[0]->E + 1, $ \ldots E_{t_\tau, c_d} $ is stored in rb->son[ $\tau-1$]->E + (d - 1) .

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
rnameEnumerated number of current row dclusterbasis rb.
void(* transfer_wave_wave_col) (uint cname, pcbem3d bem)

Computes the transfer matrices $ F_{s', c_\iota} $ for a cluster $s \in \mathcal T_{\mathcal J} \, , s' \in \operatorname{sons}(s) $ and directions $c_\iota$. Both, the father cluster $s$ and sons $s' \in \operatorname{sons}(s)$ are using the wave-Lagrange basis.

transfer_wave_wave_col will build up the transfer matrices $F_{s', c_\iota} $ , for all $s \in \mathcal T_{\mathcal J}$ and $s' \in \operatorname{sons}(s) $ and directions $c_\iota$. For a cluster $s \in \mathcal T_{\mathcal J} $ transfer_wave_wave_col will compute the matrices $F_{s_1, c_1}, \ldots, F_{s_1, c_d}, \ldots F_{s_\sigma, c_1}, \ldots F_{s_\sigma, c_d} $ , $ \# \operatorname{sons}(s) = \sigma $ and $\iota \in \{ 1, \ldots, d \}$. The matrix $F_{s_1, c_1} $ is stored in cb->son[0]->E + 0, $ F_{s_1, c_2} $ is stored in cb->son[0]->E + 1, $ \ldots F_{t_\sigma, c_d} $ is stored in cb->son[ $\sigma-1$]->E + (d - 1) . The used directions $c_\iota$ correspond to some difference between directions $c^f_\iota$ used for the father $t$ and directions $c^s_\iota $. Therefore it holds

\[ c_\iota = c^f_\iota - c^s_\iota = c^f_\iota - \operatorname{sondir}(c^f_\iota) \]

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
cnameEnumerated number of current column dclusterbasis cb.
void(* transfer_wave_wave_row) (uint rname, pcbem3d bem)

Computes the transfer matrices $ E_{t', c_\iota} $ for a cluster $ t \in \mathcal T_{\mathcal I} \, , t' \in \operatorname{sons}(t) $ and directions $c_\iota$. Both, the father cluster $t$ and sons $t' \in \operatorname{sons}(t)$ are using the wave-Lagrange basis.

transfer_wave_wave_row will build up the transfer matrices $ E_{t', c_\iota} $ , for all $ t \in \mathcal T_{\mathcal I}$ and $ t' \in \operatorname{sons}(t) $ and directions $c_\iota$. For a cluster $ t \in \mathcal T_{\mathcal I} $ transfer_wave_wave_row will compute the matrices $ E_{t_1, c_1}, \ldots, E_{t_1, c_d}, \ldots E_{t_\tau, c_1}, \ldots E_{t_\tau, c_d} $ , $ \# \operatorname{sons}(t) = \tau $ and $\iota \in \{ 1, \ldots, d \}$. The matrix $ E_{t_1, c_1} $ is stored in rb->son[0]->E + 0, $ E_{t_1, c_2} $ is stored in rb->son[0]->E + 1, $ \ldots E_{t_\tau, c_d} $ is stored in rb->son[ $\tau-1$]->E + (d - 1) . The used directions $c_\iota$ correspond to some difference between directions $c^f_\iota$ used for the father $t$ and directions $c^s_\iota $. Therefore it holds

\[ c_\iota = c^f_\iota - c^s_\iota = c^f_\iota - \operatorname{sondir}(c^f_\iota) \]

Parameters
bemBEM-object containing additional information for computation of the matrix entries.
rnameEnumerated number of current row dclusterbasis rb.
plistnode* v2t

This field describes the mapping from the vertices of a geometry to the triangles they belong to.

The length of this array is equal to the number of vertices. For each vertex $ i $ the list v2t[i] enumerates all triangles that share this vertex $ i $.
This can be usefull within computation of matrix entries when linear basis functions are involved.


The documentation for this struct was generated from the following file: