Bembel
H2Matrix

The H2Matrix module provides functionality for an efficient compression of the system matrix and reduction of the computational complexity of the matrix-vector multiplication. More...

Classes

class  Eigen::H2MatrixBase< Derived >
 
struct  Bembel::H2Multipole::ChebychevRoots
 Computes the number_of_points Chebychev points. More...
 
struct  Bembel::H2Multipole::Moment1D< InterpolationPoints, LinOp >
 Computes 1D moment for FMM. All calculations ar performed on [0,1]. More...
 
struct  Bembel::H2Multipole::Moment1DDerivative< InterpolationPoints, LinOp >
 Computes 1D moment for FMM using derivatives of the basis functions. All calculations ar performed on [0,1]. More...
 
struct  Bembel::H2Multipole::Moment2D< InterpolationPoints, LinOp >
 Computes all 2D moment for the FMM by tensorisation of the 1D moments. Specialice this for your linear operator if you need derivatives on your local shape functions. See e.g. MaxwellSingleLayerOperator for an example. More...
 

Functions

template<typename InterpolationPoints >
Eigen::MatrixXd Bembel::H2Multipole::computeLagrangePolynomials (int number_of_points)
 computes the Lagrange polynomials wrt the interpolation points given by the InterpolationPoints struct wrt. Newton basis
 
template<typename InterpolationPoints >
double Bembel::H2Multipole::evaluatePolynomial (const Eigen::VectorXd &L, double xi)
 evaluates a given polynomial in the Newton basis wrt the interpolation points at a given location
 
template<typename InterpolationPoints >
Eigen::MatrixXd Bembel::H2Multipole::computeTransferMatrices (int number_of_points)
 Computes transfer matrices in required order to apply them all-at-once in a matrix-vector-product, i.e. the order in the output is [T0 T2 T3 T1]. More...
 
template<typename Mom1D_1 , typename Mom1D_2 , typename LinOp >
Eigen::MatrixXd Bembel::H2Multipole::moment2DComputer (const SuperSpace< LinOp > &super_space, const int cluster_level, const int cluster_refinements, const int number_of_points)
 Computes a single 2D moment for the FMM by tensorisation of the 1D moments. More...
 
Eigen::MatrixXd Bembel::H2Multipole::interpolationPoints2D (const Eigen::VectorXd &x)
 Compute tensor interpolation points on unit square from 1D interpolation points.
 
template<typename LinOp >
Eigen::Matrix< typename LinearOperatorTraits< LinOp >::Scalar, Eigen::Dynamic, Eigen::Dynamic > Bembel::H2Multipole::interpolateKernel (const LinOp &linOp, const SuperSpace< LinOp > &super_space, const Eigen::MatrixXd &x, const Bembel::ElementTreeNode &cluster1, const Bembel::ElementTreeNode &cluster2)
 Interpolate kernel function on reference domain for FMM.
 
template<typename Scalar >
std::vector< Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > > Bembel::H2Multipole::forwardTransformation (const Eigen::MatrixXd &moment_matrices, const Eigen::MatrixXd &transfer_matrices, const int steps, const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &long_rhs_matrix)
 Forward transformation for FMM.
 
template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Bembel::H2Multipole::backwardTransformation (const Eigen::MatrixXd &moment_matrices, const Eigen::MatrixXd &transfer_matrices, const int steps, std::vector< Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic >> &long_dst_backward)
 Backward transformation for FMM. The content of long_dst_backward is destroyed.
 

Detailed Description

The H2Matrix module provides functionality for an efficient compression of the system matrix and reduction of the computational complexity of the matrix-vector multiplication.

Function Documentation

◆ computeTransferMatrices()

template<typename InterpolationPoints >
Eigen::MatrixXd Bembel::H2Multipole::computeTransferMatrices ( int  number_of_points)

Computes transfer matrices in required order to apply them all-at-once in a matrix-vector-product, i.e. the order in the output is [T0 T2 T3 T1].

initialize Lagrange polynomials and interpolation nodes

initialize values of Lagrange functions on the interpolation points as follows: E(:,0:npts-1) containes the values of the Lagrange polynomials on the interpolation points scaled to [0, 0.5]. E(:,npts:2*npts-1) containes the values of the Lagrange polynomials on the interpolation points scaled to [0.5, 1]. E(i,j) containes the value of the j.th polynomial on the ith point

Definition at line 77 of file H2Multipole.hpp.

◆ moment2DComputer()

template<typename Mom1D_1 , typename Mom1D_2 , typename LinOp >
Eigen::MatrixXd Bembel::H2Multipole::moment2DComputer ( const SuperSpace< LinOp > &  super_space,
const int  cluster_level,
const int  cluster_refinements,
const int  number_of_points 
)

Computes a single 2D moment for the FMM by tensorisation of the 1D moments.

Throughout this code we face the problem of memory serialisation for the traversel of elements in the element tree. the canonical orders would either be row major or column major traversal of a given patch resulting in e.g. element(i,j) = *(elementRoot + i * n + j) for n = 1 << j. However, to achieve a localisation of matrix blocks if their corresponding shape functions are geometrically close, we typically use a hierarchical ordering of the elements. The mapping from hierarchical to row major ordering is easily facilitated by computing the elements position in its patch using its llc_. For our special situation of a balanced quadtree, this mapping is the same for every patch. In particular, the moments in our construction of the FMM only depend on the current level of uniform refinement and not on a particular patch. Next, we explicitly set up this mapping, where index_s determines the location of a given element along the first coordinate in the reference domain and index_t its second coordinate in the reference domain. Note that this piece of code only has to be used once in the entire setup of the FMM, such that the overhead is quite small.

Definition at line 225 of file H2Multipole.hpp.