1 Introduction

The first stage in the Finite Element Method (FEM) is the meshing, by which the problem domain is partitioned into elements. In two dimensions (2D), typical elements are triangles or quadrilaterals, whereas in three dimensions (3D), tetrahedra, pyramids, prisms or 8-node hexahedra are common choices. Often, these elements have arbitrary shapes since they have to suit complicated boundary conditions. Numerical integration is employed over these elements to compute the different matrices involved.

Well-known quadrature rules exist in 2D for triangles and a few 3D regions, such as tetrahedra, prisms and hexahedra. Optimal rules that minimize the number of nodes for a given region can be developed (see e.g. [46]) in 2D and higher dimensions. All these methods are tailored to specific element shapes, although, in the case of triangles and tetrahedra, an affine map [37], allows to express the integrals over a standard domain, where both tensor and non-tensor formulas can be readily used.

A more complicated problem that arises in eXtended Finite Element Method (XFEM) and Boundary Element Method (BEM) is the numerical integration of singular functions. This has originated a wide range of transformations that share an algebraic-geometric purpose: they try to cancel, or at least attenuate, the singularities in the integrand whilst expressing the integrals over a standard (parent) domain, usually a hypercube or a simplex.

Most 3D methods are based on affine mappings of tetrahedra or isoparametric mappings of hexahedra. The Duffy transformation (see e.g. [9]), is a particular case of the latter, that maps the unit cube onto a standard pyramid. This idea dates back to 1982, although some previous works [33, 38, 41] preceded significantly. Extensions of the Duffy map to dimension n are found in [5, 6], whereas a composition with a power transformation, in 2D and 3D, is developed in [32]. On the other hand, trigonometric [34, 36] and hyperbolic [30] maps have also been proposed.

This work extends the variable transformation method developed in [3] to the 3D case, for arbitrary regions and integrands. A pyramidal map denoted by \(\mathcal {P}\) is introduced as a degenerate case of the trilinear isoparametric transformation. Further non-linear transformations from the unit cube onto itself are then composed with \(\mathcal {P}\) in order to attenuate the remaining singularities in the integral kernel.

2 The Isoparametric Transformation

The isoparametric transformation is a widely established technique in FEM problems (see e.g. [7, 14]). We recall the formulation of the n-dimensional case, and show that homogeneous transformations are particular degenerate cases.

2.1 The Isoparametric Map for Multilinear Elements

The expression of the first-order shape functions in the unit interval is:

$$\begin{aligned} N_{0}(u)= & {} 1-u,\\ N_{1}(u)= & {} u. \end{aligned}$$

By a tensor product method, it is easy to build the multilinear shape functions for the unit hypercube \(C_{n}=[0,1]^{n}\), namely

$$\begin{aligned} N_{\mathbf {i}}(\mathbf {u})=\prod _{j=1}^{n}N_{i_{j}}(u^{j}), \end{aligned}$$
(1)

where \(\mathbf {i}=i_{1}\ldots i_{n}\) is the multi-index with \(i_{j}\in \{0,1\}\) and \(\mathbf {u}=(u^{1},\ldots ,u^{n})\) are the parent coordinates. The shape functions in (1) are the product of polynomials of degree one in each parent coordinate. As an example in 3D, with the usual notation \(\mathbf {u}=(u,v,w)\), we have that \(N_{010}(u,v,w)=(1-u)v(1-w).\)

The \(2^{n}\) vertices of \(C_{n}\) can be mapped onto an arbitrary set \(S=\left\{ \mathbf {x}_{\mathbf {i}}:\mathbf {i}\in I_{n}\right\} \), with \(I_{n}=\{0,1\}^{n}\), of \(2^{n}\) points in \(\mathbb {R}^{n}\) by the isoparametric transformation

$$\begin{aligned} \mathbf {x}(\mathbf {u})=\sum _{\mathbf {i}\in I_{n}}N_{\mathbf {i}}(\mathbf {u})\mathbf {x}_{\mathbf {i}}, \end{aligned}$$
(2)

where \(\mathbf {x}=(x^{1},\ldots ,x^{n})\) are the physical coordinates.

The shape functions satisfy the interpolation property (see e.g. [14]): if \(\mathbf {u}_{\mathbf {j}}\) is the \(\mathbf {j}\)-th vertex of \(C_{n}\) then \(N_{\mathbf {i}}(\mathbf {u}_{\mathbf {j}})=\delta _{\mathbf {i}\mathbf {j}}\), \(\mathbf {i}\in I_{n}\), \(\delta _{\mathbf {i}\mathbf {j}}\) being the Kronecker tensor. It follows that (2) maps the vertices of \(C_{n}\) onto S: \(\mathbf {x}(\mathbf {u}_{\mathbf {j}})=\mathbf {x}_{\mathbf {j}}\). A consequence of this fact is the Partition of Unity (PU) property of the shape functions:

$$\begin{aligned} \sum _{\mathbf {i}\in I_{n}}N_{\mathbf {i}}(\mathbf {u})=1, \end{aligned}$$

and since \(N_{\mathbf {i}}(\mathbf {u})\geqslant 0\) for \(\mathbf {i}\in I_{n}\), we have that (2) expresses \(\mathbf {x}\) as a convex combination of the points \(\mathbf {x}_{\mathbf {i}}\in S\). The image of \(C_{n}\) by this transformation is usually called a multilinear element (see e.g. [11, 14, 15, 22, 45, 50]). In 3D, the element defined by (2) is the 8-node, curved-face hexahedron H (Fig. 1).

Fig. 1
figure 1

Isoparametric transformation in 3D

2.2 The Pyramidal Transformation

Transforming a physical element onto \(C_{n}\) allows us to use a standard tensor-product rule to evaluate the corresponding integrals. In addition, there are certain algebraic properties of the transformation that may be desirable in some situations, particularly when the integrand is singular. For example, if the singular kernel is a homogeneous function, the use of a transformation that has (at least partially) separated variables may result in one or more variables factored out from the rest of the integral kernel. Moreover, the Jacobian of the transformation may help cancelling the singularity itself. This cancellation may be total or partial depending on the singular kernel degree.

To this purpose, we will focus on transformations that are homogeneous in the first parent coordinate when \(\mathbf {x_{0}}=\mathbf {x}_{000}\) is taken as the origin, i.e.

$$\begin{aligned} \mathbf {x}(\mathbf {u})-\mathbf {x}_{\mathbf {0}}=u\mathbf {r}(\mathbf {v}), \end{aligned}$$
(3)

where \(\mathbf {u}=(u,v^{1},\ldots ,v^{n-1})=(u,\mathbf {v})\) and \(\mathbf {r}(\mathbf {v})\) is a linear combination of shape functions, that are polynomials of degree one in each of the variables \(v^{1},\ldots ,v^{n-1}\).

Since the general isoparametric transformation (2) is affine in each variable, it follows that

$$\begin{aligned} \mathbf {x}(\mathbf {u})=(1-u)\mathbf {x}(0,\mathbf {v})+u\mathbf {x}(1,\mathbf {v}). \end{aligned}$$
(4)

In consequence, (4) takes the form (3) if and only if \(\mathbf {x}(0,\mathbf {v})=\mathbf {x_{0}}\), or, by the PU property, when \(\mathbf {x}_{0i_{2}\ldots i_{n}}\) collapse into \(\mathbf {x_{0}}\). It follows from (3) that \(\mathbf {r}(\mathbf {v})=\mathbf {x}(1,\mathbf {v})-\mathbf {x}_{\mathbf {0}}\) and thus the base of the element, i.e. the points for which \(u=1\), is not restricted to a hyperplane, but rather corresponds to the more general form of an \((n-1)\)-dimensional face of a multilinear element. If we assume that \(\mathbf {x}_{1i_{2}\ldots i_{n}}\ne \mathbf {x}_{\mathbf {0}}\) it is then clear that \(\mathbf {r}(\mathbf {v})\ne \mathbf {0}\). Indeed, the geometric interpretation of \(\mathbf {r}(\mathbf {v})\) is the radius vector of the base points, \(\mathbf {x}(1,\mathbf {v})\), measured from \(\mathbf {x}_{\mathbf {0}}\).

In 3D, the vertices \(\mathbf {x}_{001}\), \(\mathbf {x}_{010}\) and \(\mathbf {x}_{011}\) of the 8-node hexahedron (Fig. 1) collapse onto \(\mathbf {x_{0}}\). A trilinear pyramid P is then obtained (Fig. 2) with 5 faces (4 of them triangles), 8 edges and 5 vertices. In general, the four vertices \(\mathbf {x}_{1i_{2}i_{3}}\) are not coplanar, but rather belong to a doubly ruled surface (a hyperbolic paraboloid).

We remark that the most general 3D isoparametric element for which (3) exists is the curved-base pyramid in Fig. 2, and therefore other common elements in the FEM context, such as 6-node pentahedra, with triangular prisms as particular cases [27] and 8-node non-degenerated hexahedra [14, 49] are excluded from a u-homogeneous transformation.

Particular cases of (3) are commonly referred in the engineering literature as Duffy transformations [5, 9, 30, 32], although this term has also been used for other cases of degenerate hexahedra, such as prisms, see e.g. [27], p. 188.

Fig. 2
figure 2

Pyramidal transformation in 3D

2.3 The Jacobian of the Pyramidal Transformation in 3D

Considerable effort has been dedicated to establish the (local) invertibility of the isoparametric map for 8-node hexahedra, see e.g. [25, 26, 45, 49]. Sufficient conditions exist but, to our knowledge, no necessary and sufficient algebraic conditions for positive Jacobian have been derived yet.

The reasonable algebraic complexity of the pyramidal transformation (3) makes it possible to find a closed expression for its Jacobian, as well as a necessary and sufficient algebraic condition for its invertibility.

Theorem 1

The Jacobian of the pyramidal transformation is

$$\begin{aligned} J_{\mathcal {P}}(\mathbf {u})=u^{2}\sum _{\mathbf {i}\in I_{2}}N_{\mathbf {i}}(\mathbf {v})V_{\mathbf {i}}, \end{aligned}$$
(5)

for all \(\mathbf {u}\in C_{3}\), where \(V_{\mathbf {i}}\) is the (signed) volume of the parallelepiped determined by the edges \(\mathbf {x}_{1i_{1}i_{2}}-\mathbf {x}_{\mathbf {0}}\), \(\mathbf {x}_{11i_{2}}-\mathbf {x}_{10i_{2}}\) and \(\mathbf {x}_{1i_{1}1}-\mathbf {x}_{1i_{1}0}\) of the pyramid, namely

$$\begin{aligned} V_{\mathbf {i}}=\left| \begin{array}{ccc} \mathbf {x}_{1i_{1}i_{2}}-\mathbf {x}_{\mathbf {0}}&\quad \mathbf {x}_{11i_{2}}-\mathbf {x}_{10i_{2}}&\quad \mathbf {x}_{1i_{1}1}-\mathbf {x}_{1i_{1}0}\end{array}\right| . \end{aligned}$$

Proof

The Jacobian of the transformation is given by the determinant:

$$\begin{aligned} J_{\mathcal {P}}(\mathbf {u})= & {} \left| \begin{array}{ccc} \frac{\partial \mathbf {x}(\mathbf {u})}{\partial u}&\quad \frac{\partial \mathbf {x}(\mathbf {u})}{\partial v}&\quad \frac{\partial \mathbf {x}(\mathbf {u})}{\partial w}\end{array}\right| \nonumber \\= & {} u^{2}\left| \begin{array}{ccc} \mathbf {r}(\mathbf {v})&\quad \frac{\partial \mathbf {r}(\mathbf {v})}{\partial v}&\quad \frac{\partial \mathbf {r}(\mathbf {v})}{\partial w}\end{array}\right| . \end{aligned}$$
(6)

A direct application of the PU property yields

$$\begin{aligned} \mathbf {r}(\mathbf {v})= & {} \sum _{\mathbf {i}\in I_{2}}N_{\mathbf {i}}(\mathbf {v})(\mathbf {x}_{1i_{1}i_{2}}-\mathbf {x_{0}}), \end{aligned}$$
(7)

and recalling that \(N_{\mathbf {i}}(\mathbf {v})=N_{i_{1}}(v)N_{i_{2}}(w)\) it is immediate to show that the partial derivatives of \(\mathbf {r}(\mathbf {v})\) are

$$\begin{aligned} \frac{\partial \mathbf {r}(\mathbf {v})}{\partial v}= & {} \sum _{i_{2}\in I_{1}}N_{i_{2}}(w)\left( \mathbf {x}_{11i_{2}}-\mathbf {x}_{10i_{2}}\right) , \end{aligned}$$
(8)
$$\begin{aligned} \frac{\partial \mathbf {r}(\mathbf {v})}{\partial w}= & {} \sum _{i_{1}\in I_{1}}N_{i_{1}}(v)\left( \mathbf {x}_{1i_{1}1}-\mathbf {x}_{1i_{1}0}\right) . \end{aligned}$$
(9)

It is then clear that \(\frac{\partial ^{2}\mathbf {r}(\mathbf {v})}{\partial v^{2}}=\frac{\partial ^{2}\mathbf {r}(\mathbf {v})}{\partial w^{2}}=0,\) from where it follows that

$$\begin{aligned} \frac{\partial ^{2}J_{\mathcal {P}}(\mathbf {u})}{\partial v^{2}}=\frac{\partial ^{2}J_{\mathcal {P}}(\mathbf {u})}{\partial w^{2}}=0, \end{aligned}$$

and this means that the Jacobian of \(\mathcal {P}\) is a polynomial of degree one in each of the variables v, w. Taking into account (6)–(9) it is immediate to show that the value of \(J_{\mathcal {P}}\) at the vertex \(\mathbf {x}_{1i_{1}i_{2}}\) is \(V_{\mathbf {i}}\), which finishes the proof. \(\square \)

Corollary 1

The necessary and sufficient condition for \(J_{\mathcal {P}}\) to be positive in the interior of \(C_{3}\) is that all \(V_{\mathbf {i}}\geqslant 0\), with at least one positive volume.

For the standard pyramid \(P_{1}\) [9, 32] with vertices (0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0) and (1, 1, 1) the pyramidal transformation (3) reduces to

$$\begin{aligned} \mathbf {x}(\mathbf {u})= & {} (u,uv,uw),\\ J_{\mathcal {P}}(\mathbf {u})= & {} u^{2}. \end{aligned}$$

Tetrahedra are obtained by collapsing two additional pyramid vertices, excluding the apex. If we make \(\mathbf {x}_{101}\) collapse with \(\mathbf {x}_{100}\), (3) becomes

$$\begin{aligned} \mathbf {x}(\mathbf {u})-\mathbf {x_{0}}= & {} u\left( -\mathbf {x_{0}}+(1-v)\mathbf {x}_{100}+v(1-w)\mathbf {x}_{110}+vw\mathbf {x}_{111}\right) ,\nonumber \\ J_{\mathcal {P}}(\mathbf {u})= & {} u^{2}vV_{10}=6u^{2}vV_{T}, \end{aligned}$$
(10)

where \(V_{T}\) is the volume of the tetrahedron determined by \(\mathbf {x_{0}}\), \(\mathbf {x}_{100}\), \(\mathbf {x}_{110}\), \(\mathbf {x}_{111}\). For the standard tetrahedron \(T_{1}\) with vertices (0, 0, 0), (1, 0, 0), (1, 1, 0) and (1, 1, 1), (10) reduces to

$$\begin{aligned} \mathbf {x}(\mathbf {u})= & {} (u,uv,uvw),\\ J_{\mathcal {P}}(\mathbf {u})= & {} u^{2}v. \end{aligned}$$

3 The Integration of Vertex Singularities in 3D

We now consider the following vertex-singular integral:

$$\begin{aligned} I=\int \!\!\!\int \!\!\!\int _{P}\frac{g(\mathbf {x})}{f(\mathbf {x}-\mathbf {x}_{\mathbf {0}})}d\mathbf {x}, \end{aligned}$$
(11)

where P is a pyramid with apex \(\mathbf {x}_{\mathbf {0}}\) such that \(J_{\mathcal {P}}>0\) in the interior of \(C_{3}\), g is a regular integrable function and f is an \(\alpha \)-positively homogeneous function, i.e. \(f(t\mathbf {x})=t^{\alpha }f(\mathbf {x})\), \(\forall t>0\). We assume that f vanishes nowhere apart from the origin. A typical example in terms of the Euclidean distance would be \(f(\mathbf {x})=|\mathbf {x}|^{\alpha }\). The real parameter \(\alpha \) is the singularity strength, with \(\alpha <3\) for (11) to be finite.

From now on we denote the parent coordinates as \({\bar{\mathbf {u}}}=(\bar{u},\bar{v},\bar{w})\). Applying the pyramidal transformation (3), (5) to the integral in (11) results in

$$\begin{aligned} I=\int \!\!\!\int \!\!\!\int _{C_{3}}g(\mathbf {x}({\bar{\mathbf {u}}}))\bar{u}^{2-\alpha }\phi (\bar{v},\bar{w})d{\bar{\mathbf u}}, \end{aligned}$$
(12)

where \(C_{3}=[0,1]^{3}\), the scalar function \(\phi (\bar{v},\bar{w})\) is defined by

$$\begin{aligned} \phi (\bar{v},\bar{w})=\frac{\sum _{\mathbf {i}\in I_{2}}N_{\mathbf {i}}(\bar{v},\bar{w})V_{\mathbf {i}}}{f(\mathbf {r}(\bar{v},\bar{w}))}, \end{aligned}$$
(13)

and \(g(\mathbf {x}({\bar{\mathbf u}}))\) is regular since g is regular and \(\mathbf {x}\) is a polynomial map. The regular part of the integrand, g, is typically composed of a polynomial of arbitrary degree related to isoparametric shape functions and their derivatives. Moreover, in certain problems related to crack growth or fracture mechanics, branch functions may appear as a factor of g (see Sect. 4 for details).

The integral I in (12) is expressed over a standard domain, whilst its singular kernel becomes factorized into a radial part, \(\bar{u}^{2-\alpha }\), and an angular part, \(\phi (\bar{v},\bar{w})\). Unfortunately, this transformation may not completely remove the singularities. For example, the radial term \(\bar{u}^{2-\alpha }\) is regular for integer \(\alpha \), but for non-integer \(\alpha \) the successive derivatives of \(\bar{u}^{2-\alpha }\) may be singular at \(\bar{u}=0\). In fact, if \(\alpha >2\) the integrand itself is still singular at \(\bar{u}=0\), as pointed out in [32].

On the other hand, the angular term \(\phi (\bar{v},\bar{w})\), is non-singular in \(C_{2}=[0,1]^{2}\) since, according to the previous section, \(\mathbf {r}\) does not vanish and neither does \(f(\mathbf {r})\). However, it will be shown that \(\phi (\bar{v},\bar{w})\) may have near-singularities over \(C_{2}\), i.e., points where the function and/or its partial derivatives take very large, yet finite values.

The next subsections describe how to deal with the remaining singularities in each separate part of the kernel. More specifically, a radial transformation will be introduced to treat the singularity in the term \(\bar{u}^{2-{\alpha }}\), whereas angular transformations will take care of the near-singularities in \(\phi \).

3.1 The Radial Kernel

Several strategies have been devised to treat the radial singularity. Some authors try to soften the singularity by applying quadrature rules adapted to specific kernels, by means of moment fitting methods. For example, Gauss–Jacobi and composite Gauss–Legendre rules are used in [5, 6] and Gauss–Jacobi rules in [9]. On the other hand, there exist transformation methods that aim at attenuating the \(\bar{u}\)-singularity and produce the simplest possible kernel in terms of integration, namely a polynomial. They consist of a map of the unit interval [0, 1] onto itself, such that the exponent of the new variable in the kernel is increased to an integer value, to make the function softer without compromising the computational cost of the procedure (see e.g. [32]).

Extending the ideas in [3], we propose a map \(\bar{u}=\bar{u}(u)\) that verifies the following equation

$$\begin{aligned} \bar{u}(u)^{2-\alpha }\frac{d\bar{u}}{du}=c_{1}\frac{d\sigma (u)}{du}, \end{aligned}$$
(14)

where \(c_{1}\) is a constant to be determined and \(\sigma \) is a polynomial that maps [0, 1] onto itself, whose purpose is to make \(\bar{u}\) as smooth as possible. Thus, the radial factor of the kernel becomes a polynomial in u, that is written in terms of the derivative of another polynomial, \(\sigma \), in order to simplify the subsequent developments.

By direct integration of (14) we obtain the solution \(\bar{u}\) in closed form

$$\begin{aligned} c_{1}= & {} \frac{1}{3-\alpha },\\ \bar{u}(u)= & {} \sigma (u)^{\frac{1}{3-\alpha }}. \end{aligned}$$

In the simplest case where \(\sigma (u)=u\), the solution of (14) takes the form

$$\begin{aligned} \bar{u}(u)=u^{\frac{1}{3-\alpha }}, \end{aligned}$$

which is smooth enough for values of \(\alpha \) close to 3. However, if \(\alpha <\frac{5}{2}\), the second or even the first derivative of \(\bar{u}\) may be singular at \(u=0\), affecting severely the accuracy of the quadrature rule. Following the reasoning in [3] we take \(\sigma (u)=u^{n_{1}+1}\), where \(n_{1}\) is a small, suitable integer, from where

$$\begin{aligned} \bar{u}(u)=u^{\frac{n_{1}+1}{3-\alpha }}. \end{aligned}$$
(15)

If \(\alpha \) is an integer or a half-integer, the value of \(n_{1}\) can be easily chosen so that the exponent in (15) is an integer. For instance, if \(\alpha =\frac{1}{2},1,\frac{3}{2},2,\frac{5}{2}\), it suffices taking \(n_{1}=4,1,2,0,0\).

For more arbitrary values of \(\alpha \), the choice of \(n_{1}\) might not be so immediate. It is clear that the larger \(n_{1}\), the stronger the softening effect on \(\bar{u}(u)\). More specifically, if \(\frac{n_{1}+1}{3-\alpha }\geqslant k\), then the first k derivatives of \(\bar{u}(u)\) are non-singular at \(u=0\). However, the degree of the polynomials involved increases with \(n_{1}\), and this affects the exactness of the rule. Numerical simulations allow to determine the optimal trade-off value of \(n_{1}\) for which the quadrature error reaches a minimum. For example, if monomials up to degree two are used as the regular part of the integrand, i.e., \(g(x,y,z)=x^{i}y^{j}z^{k}\), \(i+j+k\leqslant 2\) over the standard pyramid \(P_{1}\), the optimal values of \(n_{1}\) can be picked from Table 1.

Table 1 Optimal exponent \(n_{1}\) for \(\bar{u}=u^{\frac{n_{1}+1}{3-\alpha }}\)

We remark that the idea of increasing the exponent to soften \(\bar{u}\) has been used in [32], for \(\alpha \) being an integer or the ratio of two small integers. The proposed transformation (15) can be readily used for any value of \(\alpha \in (0,3)\). Particularly, fast convergence rates are achieved for strong singularities with \(\alpha >2\).

3.2 The Angular Kernel

Unlike the radial singularity, less attention has been devoted in the literature to the near-singularities in the angular kernel. In fact, most existing methods implement a plain Gaussian rule on the non-radial variables [9, 30, 32, 36], although Dunavant rules (see [10]) have been used in [36], and some other techniques, such as sparse grids and Sobol’ sequences have been considered in [5, 6].

This subsection describes how the near-singularities in \(\phi (\bar{v},\bar{w})\) happen to be of a quite subtle nature, yet they have a strong influence on the performance of the quadrature rules. In order to illustrate this point, Fig. 3 shows the behaviour, for \(\alpha =1.6\) and \(f(\mathbf {r})=|\mathbf {r}|^{\alpha }\), of \(\phi (\bar{v},\bar{w})\) and its first derivatives \(\frac{\partial \phi }{\partial \bar{v}}\), \(\frac{\partial \phi }{\partial \bar{w}}\) for a regular element, namely the standard pyramid \(P_{1}\) (see Sect. 2.3), and a distorted element where the vertex \(\mathbf {x}_{100}\) has been displaced to the point \((0.5,-0.4,-0.2)\) (the same vertical scaling has been used for each pair of graphics). It is clear that much stronger variations occur in the case of the distorted element.

The standard strategy to soften the near-singularities in the angular kernel would be to treat \(\phi (\bar{v},\bar{w})\) as a weight function, and develop a quadrature rule, by means of moment fitting equations, specific to that particular weight. The obvious disadvantage of this idea is that a new quadrature rule would have to be developed whenever the vertex coordinates, or even the singularity strength \(\alpha \), were changed.

A different approach might be to extend the method introduced in [3] to the kernel in two variables, by finding a transformation

$$\begin{aligned} (\bar{v},\bar{w})= & {} (\bar{v}(v,w),\bar{w}(v,w)), \end{aligned}$$

that maps \(C_{2}\) onto itself and leaves a polynomial kernel. However, the fact that \(\phi (\bar{v},\bar{w})\) does not have, in general, separated variables, means that this procedure is likely to incur a high computational cost.

Fig. 3
figure 3

Behaviour of \(\phi (\bar{v},\bar{w})\) for a regular and a distorted element

3.2.1 The Behaviour of \(\phi \) on the Boundary of \(C_{2}\)

A simpler approach is possible by focusing on single-variable transformations that soften the angular kernel on the boundary of \(C_{2}\), rather than its interior. Numerical experiments show that there exist maps that improve simultaneously the behaviour of \(\phi \) on the boundary of \(C_{2}\) and its interior for some particular kernels. We next give some evidence on this statement.

The restriction of \(\phi (\bar{v},\bar{w})\) to any of the 4 sides of \(C_{2}\) can be written as

$$\begin{aligned} \phi _{B}(\bar{v})=\frac{(1-\bar{v})V_{1}+\bar{v}V_{2}}{f((1-\bar{v})\mathbf {x}_{1}+\bar{v}\mathbf {x}_{2})}, \end{aligned}$$
(16)

where short indices 1, 2 have been used. Here, the volumes \(V_{1}\), \(V_{2}\) coincide with one of the volumes \(V_{i_{1}i_{2}}\), \(\mathbf {x}_{1}\), \(\mathbf {x}_{2}\) stand for \(\mathbf {x}_{1i_{1}i_{2}}\), the origin has been set at \(\mathbf {x_{0}}\) and the variable \(\bar{w}\) has been renamed as \(\bar{v}\) where necessary. The correspondence between the short indices 1,2 and the tensor indices \(i_{1}i_{2}\) can be easily obtained from (13).

We look for a single-variable map \(\bar{v}=\bar{v}(v)\) such that the near-singularities in the composite function \(\phi _{B}(\bar{v}(v))\) become attenuated. One transformation will be applied to one of the boundaries \((\bar{v},0)\) or \((\bar{v},1)\), wherever \(\phi _{B}\) behaves less smoothly. Similarly, another transformation will be applied to one of the boundaries \((0,\bar{w})\) or \((1,\bar{w})\). We impose that all maps leave [0, 1] invariant, in order to avoid hidden singularities on the boundaries of non-standard domains, as pointed out in e.g. [2, 39].

Fig. 4
figure 4

Triangular face of a pyramid

3.2.2 The Algebraic Kernel

As the actual form of the transformation \(\bar{v}\) depends on the particular kernel considered, we now focus on the algebraic case, that occurs when \(f(\mathbf {r})=|\mathbf {r}|^{\alpha }\) in (13), i.e.:

$$\begin{aligned} \phi (\bar{v},\bar{w})=\frac{\sum _{\mathbf {i}\in I_{2}}N_{\mathbf {i}}(\bar{v},\bar{w})V_{\mathbf {i}}}{|\mathbf {r}(\bar{v},\bar{w})|^{\alpha }}. \end{aligned}$$
(17)

Then, the restriction of (17) to the boundary of \(C_{2}\) takes the form:

$$\begin{aligned} \phi _{B}(\bar{v})=\frac{(1-\bar{v})V_{1}+\bar{v}V_{2}}{|(1-\bar{v})\mathbf {x}_{1}+\bar{v}\mathbf {x}_{2}|^{\alpha }}. \end{aligned}$$
(18)

We next show that (18) can be expressed in terms of the well-known near-singular kernel in one dimension. Denoting the scalar product of the vectors \(\mathbf {x}\) and \(\mathbf {y}\) by \(\mathbf {x}\cdot \mathbf {y}\), the following identity holds

$$\begin{aligned} |(1-\bar{v})\mathbf {x}_{1}+\bar{v}\mathbf {x}_{2}|^{2}= & {} |\mathbf {x}_{1}-\mathbf {x}_{2}|^{2}\bar{v}^{2}-2\mathbf {x}_{1}\cdot (\mathbf {x}_{1}-\mathbf {x}_{2})\bar{v}+|\mathbf {x}_{1}|^{2}. \end{aligned}$$

On the triangular face determined by the vertices \(\mathbf {x}_{0}\), \(\mathbf {x}_{1}\) and \(\mathbf {x}_{2}\) (Fig. 4), we have that \(\cos \theta _{1}=\frac{\mathbf {x}_{1}\cdot (\mathbf {x}_{1}-\mathbf {x}_{2})}{|\mathbf {x}_{1}||\mathbf {x}_{1}-\mathbf {x}_{2}|}\), from where it follows

$$\begin{aligned} \phi _{B}(\bar{v})= & {} \frac{(1-\bar{v})V_{1}+\bar{v}V_{2}}{|\mathbf {x}_{1}-\mathbf {x}_{2}|^{\alpha }}\left( \bar{v}^{2}-2\frac{|\mathbf {x}_{1}|}{|\mathbf {x}_{1}-\mathbf {x}_{2}|}\cos \theta _{1}\bar{v}+\frac{|\mathbf {x}_{1}|^{2}}{|\mathbf {x}_{1}-\mathbf {x}_{2}|^{2}}\right) ^{-\alpha /2}. \end{aligned}$$
(19)

The last factor in (19) can be expressed as

$$\begin{aligned} \phi _{N}(\bar{v})=\left( \left( \bar{v}-\bar{v}_{p}\right) ^{2}+\varepsilon ^{2}\right) ^{-\alpha /2}, \end{aligned}$$
(20)

with \(\varepsilon =\frac{|\mathbf {x}_{1}|}{|\mathbf {x}_{1}-\mathbf {x}_{2}|}\sin \theta _{1}\) and \(\bar{v}_{p}=\frac{|\mathbf {x}_{1}|}{|\mathbf {x}_{1}-\mathbf {x}_{2}|}\cos \theta _{1}\). This factor is near-singular whenever \(\varepsilon \) is small and \(\bar{v}_{p}\) is close to the interval [0, 1]. We next give some details on these two parameters, that characterize the behaviour of \(\phi _{N}\).

Fig. 5
figure 5

Position of the peak point \(\bar{v}_{p}\)

The near-singularity perturbation, \(\varepsilon \), provides a measure of the distortion, or aspect ratio, of the triangular face shown in Fig. 4. In fact, if h denotes the height of the triangle, we have that

$$\begin{aligned} \varepsilon =\frac{h}{|\mathbf {x}_{1}-\mathbf {x}_{2}|}. \end{aligned}$$

The near-singular kernel \(\phi _{N}\) has received considerable attention over the last 30 years [13, 1618, 23, 28, 29, 43, 44, 48], and it is a well-known fact that as \(\varepsilon \) becomes smaller, the integration of \(\phi _{N}\) is more difficult. Some recent works have considered extreme cases for which \(\varepsilon \) reaches \(10^{-10}\) or even less [16, 17, 51]. However, since this near-singularity is induced by the distortion of the triangular element, it is expected that \(\varepsilon \) will not be too small if a proper meshing has been performed.

On the other hand, it is commonly recognized that the integration of \(\phi _{N}\) is more difficult whenever \(\bar{v}_{p}\) lies inside the integration interval [1, 4, 1618, 23, 24, 29]. Figure 5 depicts three different examples of triangles for which the peak point \(\bar{v}_{p}\) lies outside, on the boundary, or inside the interval \(\bar{v}\in [0,1]\) (the cases \(\bar{v}_{p}=1\) and \(\bar{v}_{p}>1\) are easily obtained by symmetry). The rightmost case in Fig. 5, where the peak point lies inside the integration interval, is expected to be the hardest to integrate.

It is immediate from (19) to (20) that the boundary kernel \(\phi _{B}\) shares the near-singular behaviour of \(\phi _{N}\). However, this analogy does not extend immediately to the angular kernel \(\phi \) in \(C_{2}\). The reason for this is that \(\phi (\bar{v},\bar{w})\) in (17) depends on 12 parameters (the three spatial coordinates of the four vertices opposite to the pyramid apex), whereas the near-singular kernel in 2D, given by \(\left( x^{2}+y^{2}+\varepsilon ^{2}\right) ^{-\alpha /2}\), depends at most on 7 parameters (the two planar coordinates of the triangle vertices plus the near-singular perturbation \(\varepsilon \)). Therefore, \(\phi (\bar{v},\bar{w})\) is likely to be a more complicated function, in the general case, than the near-singular kernel in 2D.

We look now for a criterion to choose appropriate softening transformations able to regularize \(\phi _{N}\). It is known that the truncation error of the quadrature rules is reduced whenever the kernel poles are moved further away from the integration interval (see e.g. [8, 39]). We will consider a couple of maps, commonly utilized in the near-singular integration context, that serve this purpose.

3.2.3 The Cubic Transformation

The cubic transformation, introduced in [43], was one of the first attempts aimed at flattening the near-singular integrand \(\phi _{N}\). According to [43], the conditions verified by the cubic polynomial are

  1. 1.

    It transforms [0, 1] onto itself.

  2. 2.

    Its first derivative has a prescribed value at the near-singular point.

  3. 3.

    Its second derivative vanishes at the near-singular point.

The cubic map given by

$$\begin{aligned} q(t)=\bar{v}_{p}+rt+(1-r)t^{3}, \end{aligned}$$
(21)

where \(r\in [0,1]\) is a parameter to be established, verifies Conditions 2 and 3, but does not verify the first one, unless \(\bar{v}_{p}=0\). This drawback is easily solved by applying a further affine transformation from [0, 1] onto \([t_{0},t_{1}]\) given by

$$\begin{aligned} t(v)=t_{0}+(t_{1}-t_{0})v, \end{aligned}$$
(22)

with

$$\begin{aligned} t_{j}=q^{-1}(j),\quad j=0,1. \end{aligned}$$
(23)

Thus, the composite transformation given by

$$\begin{aligned} q(t(v))=\bar{v}_{p}+rt(v)+(1-r)t(v)^{3}, \end{aligned}$$
(24)

satisfies conditions 1–3, and motivates the choice \(\bar{v}(v)=q(t(v))\). Moreover, \(\bar{v}\) has the following non-vanishing Jacobian:

$$\begin{aligned} \frac{d\bar{v}}{dv}=(t_{1}-t_{0})\left( r+3(1-r)t(v)^{2}\right) . \end{aligned}$$
(25)

Denoting \(v_{p}=\bar{v}^{-1}(\bar{v}_{p})\) it is immediate that \(t(v_{p})=0\), from where it is easily shown that \(\left. \frac{d\bar{v}}{dv}\right| _{v_{p}}=(t_{1}-t_{0})r.\)

Even though the cubic map has been referenced by a large number of authors over the last years [1, 2, 4, 23, 39, 48] it is commonly acknowledged to have limited effectiveness due to the difficulty of finding the optimal value of r in (24). An approximate expression was derived in [43] and extended in [24], but it has been established [40] that a deviation of 1 % in the optimal value results in a severe loss of accuracy when computing the integrals involved.

A detailed analysis on the effect of the cubic transformation over the complex poles of \(\phi _{N}(q(t))\) allows to determine the optimal value of r, whose explicit value is provided in Sect. 3.2.5.

3.2.4 The sinh Transformation

The sinh transformation was first introduced in [23], although similar maps had been proposed previously (see e.g. [28]). It has found wide acceptance in the near-singular integration context ever since, see e.g. [2, 16, 17, 39, 47, 48, 51].

The sinh transformation given by

$$\begin{aligned} s(t)=\bar{v}_{p}+\varepsilon \sinh (\mu t),\quad \mu (\varepsilon )=\sinh ^{-1}\frac{1}{\varepsilon }, \end{aligned}$$
(26)

does not map [0, 1] onto itself, unless \(\bar{v}_{p}=0\). Proceeding as in the previous subsection, the affine map t(v) given in (22), with

$$\begin{aligned} t_{j}= & {} \frac{1}{\mu }\sinh ^{-1}\left( \frac{j-\bar{v}_{p}}{\varepsilon }\right) ,\quad j=0,1, \end{aligned}$$
(27)

is such that the composite transformation

$$\begin{aligned} \bar{v}(v)=s(t(v))=\bar{v}_{p}+\varepsilon \sinh (\mu t(v)), \end{aligned}$$
(28)

maps [0, 1] onto itself and has a non-vanishing Jacobian given by

$$\begin{aligned} \frac{d\bar{v}}{dv}=\varepsilon \mu (\varepsilon )(t_{1}-t_{0})\cosh (\mu (\varepsilon )t(v)). \end{aligned}$$
(29)

It is worth noting that, as in the case of the cubic transformation, the second derivative of \(\bar{v}(v)\) vanishes at \(v_{p}\). A detailed analysis on how the sinh transformation affects the complex poles of the kernel can be found in [12].

3.2.5 Effect of the Transformations on the Kernel Poles

Both methods, cubic (24) and sinh (28), incorporate information on \(\varepsilon \) and \(\bar{v}_{p}\), as pointed out in [24] for the sinh case. However, the composite kernels \(\phi _{N}(q(t))\) and \(\phi _{N}(s(t))\) only depend on \(\varepsilon \) through the parameters r and \(\mu \). In other words, the information on \(\bar{v}_{p}\) comes exclusively from the affine transformation t(v), that has no effect on the convergence speed.

In consequence, since the poles of \(\phi _{N}(\bar{v})\) are located at \(\bar{v}=\bar{v}_{p}\pm i\varepsilon \), the effect of the non-linear transformations (21) and (26) consists of increasing the imaginary part of these poles, i.e., moving them further away from the real axis. Therefore, even though the most peaked kernels occur for \(0<\bar{v}_{p}<1\), the same softening effect is applied as in the case \(|\bar{v}_{p}|\geqslant 1\). We remark that there exist other techniques that do enhance the performance of the rules for peaked kernels. More specifically, interval splitting at \(\bar{v}_{p}\) has been proposed e.g. in [1, 4, 23, 29, 39].

Focusing on the cubic transformation, the optimal value of the free parameter r, for which the distance of the poles of \(\phi _{N}(q(t))\) to the real axis becomes maximized, is established below.

Theorem 2

The value of r in the cubic transformation for which the poles of \(\phi _{N}(q(t))\) are moved furthest away from the real axis is

$$\begin{aligned} r_{0}(\varepsilon )=\frac{3\varepsilon ^{2/3}}{2}\left[ \left( \sqrt{1+\varepsilon ^{2}}+1\right) ^{1/3}-\left( \sqrt{1+\varepsilon ^{2}}-1\right) ^{1/3}\right] . \end{aligned}$$
(30)

Furthermore, the distance of the complex poles of \(\phi _{N}(\bar{v}(v))\) to the real axis is bounded below by \(\frac{\varepsilon ^{1/3}}{2}\).

A proof of this statement is provided in “Appendix” section.

3.2.6 Summary of the Methods Proposed

From a practical point of view, the cubic and sinh methods are implemented in separate transformations for the variables \(\bar{v}\) and \(\bar{w}\). In each case, the transformation is applied on the boundary where \(\phi _{N}\) behaves less smoothly, i.e., the one for which \(\varepsilon \) has the smallest value, according to the following steps:

  1. 1.

    On boundaries \((\bar{v},0)\), \((\bar{v},1)\), compute \(\varepsilon =\frac{h}{|\mathbf {x}_{1}-\mathbf {x}_{2}|}\) and take the smallest value.

  2. 2.

    Calculate \(r_{0}\) from (30) or \(\mu \) from (26).

  3. 3.

    Compute \(t_{0}\) and \(t_{1}\) by means of (23) or (27).

  4. 4.

    Construct \(\bar{v}\) and its Jacobian from (2425) or (2829).

  5. 5.

    Repeat Steps 1–4 on boundaries \((0,\bar{w})\), \((1,\bar{w})\) to obtain \(\bar{w}\) and its Jacobian.

Even though \(\bar{v}\) and \(\bar{w}\) are applied on the boundary of \(C_{2}\), numerical experiments in Sect. 4 will show noticeable improvements in convergence speed when compared to methods that implement no angular softening.

We remark that the use of separate univariate maps in both variables \(\bar{v}\) and \(\bar{w}\) has already been considered by a number of authors for the ordinary near-singular 2D kernel [18, 29, 51]. Further developments of [18] can be found, e.g., in [1921].

3.3 The Jacobian of the Softening Transformation

The procedures described above can be regarded as a softening transformation \(\mathcal {R}\) from the unit cube \(C_{3}\) onto itself, in separated variables, whose Jacobian is

$$\begin{aligned} J_{\mathcal {R}}(\mathbf {u})= & {} \frac{n_{1}+1}{3-\alpha }\bar{u}(u)^{\alpha -2}u^{n_{1}}\frac{d\bar{v}}{dv}\frac{d\bar{w}}{dw}. \end{aligned}$$

Thus, the composition of the pyramidal and softening maps has a Jacobian

$$\begin{aligned} J_{\mathcal {P}\circ \mathcal {R}}(\mathbf {u})=\frac{n_{1}+1}{3-\alpha }\bar{u}(u)^{\alpha }\sum _{\mathbf {i}\in I_{2}}\left( N_{\mathbf {i}}(\bar{v}(v),\bar{w}(w))V_{\mathbf {i}}\right) u^{n_{1}}\frac{d\bar{v}}{dv}\frac{d\bar{w}}{dw}. \end{aligned}$$

4 Numerical Results

The algorithms detailed in the previous section are now tested in a variety of situations, comparing its performance with some existing methods [9, 30, 32, 36]. Integrations are always performed in the physical domain by means of modified nodes and weights, obtained from

$$\begin{aligned} \mathbf {x}_{j}= & {} \mathbf {x}({\bar{\mathbf u}}(\mathbf {u}_{j})),\\ w_{j}^{*}= & {} J_{\mathcal {P}\circ \mathcal {R}}(\mathbf {u}_{j})w_{j}, \end{aligned}$$

for \(j=1,\ldots ,n_{w}\), where \(\mathbf {u}_{j}\) and \(w_{j}\) are the standard Gaussian nodes and weights, respectively, for the quadrature rule of order \(n_{w}\).

The singular part of the physical integrand is given by \(\frac{1}{|\mathbf {x}-\mathbf {x}_{\mathbf {0}}|^{\alpha }}\). Regarding the regular integrand, the following functions are taken:

$$\begin{aligned} g(x,y,z)=x^{i}y^{j}z^{k}f_{\ell }(\theta ), \end{aligned}$$

with \(i+j+k\leqslant d_{m}\), \(d_{m}\) being the total degree of monomials, \(\theta =\tan ^{-1}\frac{y}{x}\) and \(f_{\ell }(\theta )\) is the angular part of the crack-tip, or branch functions [31, 36, 42]: \(f_{1}(\theta )=\sin \frac{\theta }{2}\), \(f_{2}(\theta )=\cos \frac{\theta }{2}\), \(f_{3}(\theta )=\sin \frac{\theta }{2}\sin \theta \), \(f_{4}(\theta )=\cos \frac{\theta }{2}\sin \theta \). If no crack-tip function is used, it suffices taking \(f_{0}(\theta )=1\).

Table 2 Optimal exponent \(\beta _{1}\) for \(\mathcal {P}\circ \mathcal {W}\)
Fig. 6
figure 6

Performance of the methods over the standard pyramid \(P_{1}\)

Fig. 7
figure 7

Moderately distorted pyramid

4.1 Simulations Over Pyramids

The methods implemented for comparison purposes are:

  • \(\mathcal {P}\): Pyramidal transformation, already described in Sect. 2.2.

  • \(\mathcal {P}\circ \mathcal {C}\): Composition of \(\mathcal {P}\) with the cubic transformation

  • \(\mathcal {P}\circ \mathcal {S}\): Composition of \(\mathcal {P}\) with the sinh transformation

  • \(\mathcal {P}\circ \mathcal {W}\): Composition of \(\mathcal {P}\) with the power transformation, it is an extension of [32] to arbitrary pyramids given by

    $$\begin{aligned} \mathbf {x}(u,v,w)-\mathbf {x_{0}}= & {} u^{\beta _{1}}\mathbf {r}(v,w),\\ J_{\mathcal {P}\circ \mathcal {W}}(\mathbf {u})= & {} \beta _{1}u^{3\beta _{1}-1}\sum _{\mathbf {i}\in I_{2}}N_{\mathbf {i}}(\mathbf {v})V_{\mathbf {i}}. \end{aligned}$$

    The efficiency of the \(\mathcal {P}\circ \mathcal {W}\) method greatly relies on an adequate choice of the parameter \(\beta _{1}\), that plays a similar role to the parameter \(n_{1}\) in (15). The authors in [32] point out that when the singularity strength, \(\alpha \), is an integer or the ratio of two small integers (like \(\frac{1}{2}\), \(\frac{1}{3}\), \(\frac{2}{3}\) and so on), then the value of \(\beta _{1}\) should be equal to the denominator of \(\alpha \). However, when \(\alpha \) has a more arbitrary value, no systematic way of finding \(\beta _{1}\) is provided. As with \(n_{1}\), the optimal value of \(\beta _{1}\) can be picked from Table 2, that was obtained empirically.

Numerical experiments The exact value of the integrals is evaluated by means of a high-degree rule, with a total monomial degree of \(d_{m}=2\). On top of each graphic, the parameters \(d_{m}\), \(\alpha \), \(\beta _{1}\), \(n_{1}\), \(r_{v}\) (\(r_{0}\) for \(\bar{v}\)), and \(r_{w}\) (\(r_{0}\) for \(\bar{w}\)) are displayed.

All methods are initially tested on the standard pyramid \(P_{1}\) (see Sect. 2.3), for values \(\alpha =0.53+0.63k\), \(k=0,1,2,3\). The cases with integer or half-integer \(\alpha \) are similar to the examples displayed, with \(\mathcal {P}\) and \(\mathcal {P}\circ \mathcal {W}\) being coincident for integer \(\alpha \). Notice that angular softening in the cubic transformation already applies (i.e., \(r_{v},r_{w}<1)\) to this apparently non-distorted case (Fig. 6).

A moderately distorted pyramid is considered as well. If we take \(\mathbf {x_{0}}=(0,0,0)\), \(\mathbf {x}_{100}=(1,0.5,0.5)\), \(\mathbf {x}_{101}=(1,-0.5,1)\), \(\mathbf {x}_{110}=(1.5,3,0.5)\), \(\mathbf {x}_{111}=(0.5,4.5,4)\), the angular softening becomes quite significant (Fig. 7).

For a more distorted pyramid, typically with obtuse tip angles \(\theta _{0}\), all methods perform more poorly, and the effect of angular softening is less evident. For example, taking \(\mathbf {x_{0}}=(0,0,0)\), \(\mathbf {x}_{100}=(2,-0.5,-0.5)\), \(\mathbf {x}_{101}=(1,-1,1)\), \(\mathbf {x}_{110}=(1.5,1,-1)\), \(\mathbf {x}_{111}=(0.5,3,3)\), yields the results shown in Fig. 8.

Fig. 8
figure 8

Strongly distorted pyramid

4.2 Simulations Over Tetrahedra

We assume without loss of generality that the vertex \(\mathbf {x}_{101}\) collapses onto \(\mathbf {x}_{100}\) to form a tetrahedron, in other words, the boundary \((0,\bar{w}\)) now reduces to a point.

All methods implemented for pyramids can be readily reformulated for arbitrary tetrahedra. Moreover, two additional transformations are considered:

Trigonometric transformation Denoted by \(\mathcal {T}\), it is a modification of the method proposed in [36]. More specifically it consists of two stages:

  1. 1.

    An affine transformation whose inverse maps an arbitrary tetrahedron T (in coordinates xyz) onto the standard tetrahedron \(T_{0}\) (in coordinates rst), with vertices (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1).

  2. 2.

    A trigonometric transformation whose inverse maps \(T_{0}\) onto the unit cube \(C_{3}\) (in coordinates uvw), with parametric equations

    $$\begin{aligned} r(\mathbf {u})= & {} u\cos ^{2}\left( \frac{\pi }{2}v\right) ,\\ s(\mathbf {u})= & {} u\cos ^{2}\left( \frac{\pi }{2}(1-v+vw)\right) ,\\ t(\mathbf {u})= & {} u-r(\mathbf {u})-s(\mathbf {u}),\\ J(\mathbf {u})= & {} \frac{\pi ^{2}}{4}u^{2}v\sin (\pi v)\sin (\pi (1-v+vw)). \end{aligned}$$

Hyperbolic transformation Denoted by \(\mathcal {H}\), it is an implementation in two steps of the method described in [30]:

  1. 1.

    An affine transformation whose inverse maps an arbitrary tetrahedron T (in coordinates xyz) onto \(T_{0}\) (in coordinates \(\xi ,\eta ,\zeta \)).

  2. 2.

    A hyperbolic transformation whose inverse maps \(T_{0}\) onto \(C_{3}\), given by

    $$\begin{aligned} \xi (\mathbf {u})= & {} u^{2}\frac{1-\sinh (\beta _{2}(2v-1))}{2}(1-w),\\ \eta (\mathbf {u})= & {} u^{2}\frac{1+\sinh (\beta _{2}(2v-1))}{2}(1-w),\\ \zeta (\mathbf {u})= & {} u^{2}w,\\ J(\mathbf {u})= & {} 2\beta _{2}u^{5}(1-w)\cosh (\beta _{2}(2v-1)), \end{aligned}$$

    with \(\beta _{2}=\sinh ^{-1}1=\log (1+\sqrt{2})\).

Fig. 9
figure 9

Standard tetrahedron \(T_{1}\)

Numerical experiments The results are very similar to the pyramid case: all methods degrade when applied to distorted elements, specially for large values of \(\alpha \).

The first element tested is the standard tetrahedron \(T_{1}\) (see Sect. 2.3), with results displayed in Fig. 9. Notice that angular softening in the cubic transformation is already needed (i.e., \(r_{v},r_{w}<1\)) for this non-distorted case.

The second element tested is a distorted tetrahedron with vertices \(\mathbf {x_{0}}=(0,0,0)\), \(\mathbf {x}_{100}=(1,0,0)\), \(\mathbf {x}_{110}=(1,4,0)\), \(\mathbf {x}_{111}=(0.5,4,3)\). As expected, all methods show a slower convergence (Fig. 10).

It is worth noting that in general, when using pyramids as well as tetrahedra, the performance of all methods deteriorates when crack-tip functions are part of the regular integrand. This effect is more evident as the tip angles \(\theta _{0}\) become larger.

Fig. 10
figure 10

Strongly distorted tetrahedron

5 Conclusions

A transformation method for singular integrals in 3D has been introduced, with specific treatment of the radial and angular variables. The method is designed for pyramidal elements, and can be extended, through partitioning, to prisms and hexahedra.

After describing the multilinear transformation, we focus on degenerate maps that are homogeneous in one of its variables, and show that they can be applied to sets of points more general than the n-dimensional pyramid (with hyperplanar base), but not as general as n-prisms. Furthermore, a number of maps considered previously in the literature are found to be particular cases of the degenerate isoparametric map.

The singularity in the radial variable can be successfully removed by means of a univariate transformation, but the subsequent treatment of the remaining angular kernel has proved to be, by far, the most delicate part of the method. Nevertheless, the effect of the angular distortion is too large to be ignored, so this question needs to be addressed.

A partial solution for the algebraic kernel has been provided, by considering a couple of non-linear algorithms, cubic and sinh, extensively used for the near-singular kernel in 1D. Experiments show that both methods can be successfully extended to the angular kernel in 3D, even though this is a more complicated function, in general, than the near-singular kernel in 2D.

We believe the main contributions of this work to be

  1. 1.

    A general and systematic framework for 3D singular transformations, establishing a necessary and sufficient algebraic condition for its inversion.

  2. 2.

    A first attempt at establishing a connection between the angular part of the 3D singular kernel and the near-singular integration problem, with significant results from the numerical point of view.

  3. 3.

    An analytic expression for the optimal value of the free parameter r in the cubic transformation, based on its effect over the complex poles of the kernel.

The feasibility of the proposed method for non-algebraic kernels (i.e the logarithmic kernel) is a question subject to further research, provided that the logarithm is no longer a homogeneous function of the coordinates. Another interesting question that will be considered in future works is the integration of edge-singular kernels, i.e., functions that have singularities not just at a vertex, but on a whole element edge.