1 Introduction

1.1 Finite cell method

The finite cell method (FCM) is an embedded domain approach based on an unfitted discretization and high-order shape functions [1,2,3], enabling an efficient and accurate simulation of geometrically complex structures including hole regions [4, 5] and inclusions of additional material [6, 7]. As point of departure, a general multi-material problem is depicted in Fig. 1a. Here, \(\Omega = \Omega _1 \cup \Omega _2\) is the physical domain of interest, \(\partial \Omega \) its boundary, and \(\Gamma _{\textrm{D}}\) together with \(\Gamma _{\textrm{N}}\) the Dirichlet and Neumann boundaries, respectively. Finally, \(\Gamma _{12}\) is the material interface between \(\Omega _1\) and \(\Omega _2\). In the FCM framework, \(\Omega \) is embedded into a larger domain \(\Omega _{\textrm{e}}\) (Fig. 1b), giving rise to the fictitious domain \(\Omega _\textrm{fict} = \Omega _{\textrm{e}} {\setminus } \Omega \) of theoretically zero stiffness. Due to its simple shape, a straightforward discretization of \(\Omega _{\textrm{e}}\) is possible by Cartesian meshes (Fig. 1c). Thus, the often cumbersome and error-prone generation of a geometry-conforming discretization by means of distorted finite elements can be avoided.

Fig. 1
figure 1

FCM concept

Note that due to the unfitted discretization, cut cells arise, that require extra attention regarding the implementation of boundary conditions [8, 9], the condition number of the global system of equations [10,11,12], and the numerical integration of cell matrices (Sect. 1.2). For the fictitious domains, the volume integrals are penalized by the indicator function

$$\begin{aligned} \alpha = {\left\{ \begin{array}{ll} 1 &{}\text {in}~~\Omega \\ 10^{-q} &{}\text {in}~~\Omega _{\textrm{fict}} \end{array}\right. } \end{aligned}$$
(1)

in order to avoid a large energy contribution of \(\Omega _\textrm{fict}\) to the total system (for a more detailed mathematical formulation of the FCM involving void regions, see Sect. 4.1). In contrast to void regions, the displacement field along \(\Gamma _{12}\) is generally \(C^0\)-continuous. Such displacement fields are poorly approximated by a linear combination of smooth shape functions over the cut cells. Regardless of the polynomial degree, the insufficiently captured kink in the displacement field causes severe oscillations in the strain and stress fields, which lead to a severely deteriorated accuracy of the simulation and sub-optimal convergences rates [6].

In the extended finite element method (XFEM) [13,14,15], an accurate approximation of the displacement field for multi-material elements is achieved by a local enrichment of the Ansatz space. Here, the key idea is based on introducing additional shape functions that are constructed to be \(C^0\)-continuous along \(\Gamma _{12}\). In the context of the FCM, Joulaian and Düster proposed the hp-d-FCM and hp-d/PUM-FCM approaches for dealing with material interfaces [6, 7]. In both cases, the discontinuity is dealt with on a superimposed overlay mesh. In the former approach, the local behavior around the interface is captured by a geometry-conforming mesh, while in the latter one, the local enrichment of the XFEM is adopted. Note however, that in the hp-d/PUM-FCM, the unfitted overlay mesh is not necessarily aligned to the base mesh. Thus, it is possible to define larger overlay patches that span multiple cells in the enrichment zone. The weak form corresponding to the multi-material FCM in conjunction with the local enrichment approach is given in Sect. 4.2.

1.2 Integration of discontinuous functions

For an accurate FCM simulation, a proper integration of the cut cell matrices is of crucial importance. Since for discontinuous integrals, the integration accuracy of Gaussian quadrature rules is severely deteriorated, more suitable numerical integration schemes are required. Approaches being available for this purpose can be classified as follows:

  1. 1.

    A main branch is based on partitioning the integration domain into several integration sub-cells using quadtree/octree-decomposition techniques (QTD/OTD). Here, rectangular [5, 16] or tetrahedral sub-cells [17, 18] are often used, however, geometry-conforming sub-cells with linear [19, 20], high-order [21, 22] or blending mapping functions [23,24,25] are also possible.

  2. 2.

    Another branch is represented by the Moment Fitting (MF) approach, where in each cut cell, a unique quadrature rule is derived [26, 27]. By pre-defining the position of the integration points, the computational complexity of this method can be significantly reduced [28,29,30,31]. Furthermore, by appropriate combination with an adaptive space-decomposition technique [32], or by using a non-negative least square solver [33, 34], application of MF to non-linear problems is also possible. Finally Düster and Allix proposed and investigated the combination of moment fitting with the local enrichment approach [35].

  3. 3.

    A different idea is seen in the equivalent polynomials [36,37,38] method, which is based on the replacement of the discontinuous integrand by a continuous one yielding the same integral value. Thus, similar to the MF, the computationally often expensive space-partitioning can be avoided.

  4. 4.

    Further methods use the Divergence Theorem for reducing higher dimensional integrals to surface and line integrals [39]. Here, radial basis functions [40, 41] or pre-derivation can be used [42] for evaluating the antiderivatives required by this method.

Provided that the embedded geometry is accurately captured during the integration phase, exponential convergence rates are possible [10]. For further reading on the key concepts of the FCM, we refer the readers to Refs. [3, 43].

1.3 Boolean finite cell method

Due to its robustness and straightforward implementation, the QTD/OTD-based integration scheme was already utilized in the early days of FCM [5, 16, 44, 45] and is still widely used by the community nowadays [46,47,48,49,50]. However, if a high integration accuracy is desired, it requires a large number of integration points, having a significant impact on the computational time. In our previous articles, we introduced an effective approach based on merging the integration sub-cells both in 2D [51, 52] and 3D [53] for reduced computational time.

In this contribution, the Boolean FCM (B-FCM) [1], whose aim is also the reduction of integration points, is investigated and extended for multi-material problems. The B-FCM for single material problems was also investigated in Ref. [51], where promising results were obtained. The B-FCM extends the integration procedure by Boolean operations and can be easily combined with standard space-decomposition techniques. Originally, it was developed for single-material domains with hole regions. The advantage of the method is best demonstrated by Fig. 2, where Fig. 2a, depicts a cut cell, over which the function \(\alpha f\) should be integrated. The standard FCM approach follows the QTD-based integration scheme as depicted in Fig. 2b, requiring 10 sub-cells. In the context of the B-FCM, the same integration accuracy can be obtained for the given example by employing 2 sub-cells only. This is achieved by first, integrating over the entire domain, where \(\alpha \) is set to a value of 1 and second, by subtracting the contribution of the fictitious domain, which means that \(\alpha \) is set to 0 in the physical part of the sub-cell and takes the value of 1 in the fictitious part. It was shown in Refs. [1] and [51] that by using this approach a significant amount of integration points can be saved.

Fig. 2
figure 2

Two-dimensional example for visualizing the basic concept of the Boolean FCM approach (reproduced from Ref.[1])

1.4 Motivation

As mentioned in Sect. 1.3, the B-FCM was originally developed for problems that (i) solely consist of \(\Omega \) and \(\Omega _{\textrm{fict}}\), where (ii) the discontinuity in the integrals is caused by the piece-wise constant indicator function \(\alpha \). On the contrary, in case of multi-material problems, the physical domain is composed by \(n_\textrm{d}\) material sub-domains

$$\begin{aligned} \Omega = \bigcup _{i=1}^{n_{\textrm{d}}} \Omega _i, \end{aligned}$$
(2)

and the discontinuity in the integrand is caused by an arbitrary function \(D\) resulting from the enriched Ansatz space. Thus, for extending the single-material B-FCM to a multi-material version, two main steps are needed: (i) a generalization of the Boolean space-partitioning technique for decomposing the multi-material integration domain and (ii) an adjustment of the integrands over the Boolean sub-cells, which depend on the chosen enrichment type.

2 Simplifying integrals with Boolean operations

In this section, the key idea of the Boolean integration scheme is presented for embedded problems that contain several sub-domains with arbitrary functions defined over them.

2.1 Two domains

Let \(\Omega \in {\mathbb {R}}^1\) be a union of the disjoint domains \(\Omega _1\) and \(\Omega _2\). Over \(\Omega \), we consider the continuous and discontinuous functions \(f(\xi )\) and \(D(\xi )\), respectively, where the latter one is defined as

$$\begin{aligned} D(\xi ) = {\left\{ \begin{array}{ll} D_1(\xi ) \forall \xi \in \Omega _1\\ D_2(\xi ) \forall \xi \in \Omega _2\\ \end{array}\right. }. \end{aligned}$$
(3)

Then, the integral of the product \(Df\) over \(\Omega \) is composed by integrating over the sub-domains \(\Omega _1\) and \(\Omega _2\) as

$$\begin{aligned} \int \limits _{\Omega } Df \,\textrm{d} \xi = \int \limits _{\Omega _1} D_1 f\,\textrm{d} \xi + \int \limits _{\Omega _2} D_2 f \,\textrm{d} \xi . \end{aligned}$$
(4)

Assuming that \(D_1\) is a well defined and known function not only over \(\Omega _1\), but also over \(\Omega \), Eq. (4) can be reformulated, such that

$$\begin{aligned} \int \limits _{\Omega } Df \, \textrm{d} \xi = \int \limits _{\Omega } D_1 f \,\textrm{d} \xi + \int \limits _{\Omega _2} \big ( D_2-D_1 \big ) f\,\textrm{d} \xi , \end{aligned}$$
(5)

where the integral of the term \(Df\) is computed by the following two steps: First, the continuous function \(D_1 f\) is integrated over the entire domain \(\Omega \) and second, the integral value of the first term is augmented by \((D_2-D_1)f\) over \(\Omega _2\).

Example: An example visualizing Eq. (5) is given in Fig. 3, where

$$\begin{aligned} \Omega _1= & {} \{ \xi ~|~ \xi \in [-1,0.25] \} \end{aligned}$$
(6)
$$\begin{aligned} \Omega _2= & {} \{ \xi ~|~ \xi \in \,\, ]0.25,1] \}. \end{aligned}$$
(7)

For simplicity, \(f(\xi ) = 1\) is chosen,Footnote 1 and \(D(\xi )\) defined as \(D_1 = \textrm{sin}(8\xi )\) in \(\Omega _1\) and \(D_2 = \xi ^2\) in \(\Omega _2\). The total integral value of the function \(Df\) is depicted by the gray area in Fig. 3a. In Fig. 3b, the first integral on the right hand side of Eq. (5) is visualized. Finally, Fig. 3c depicts the contribution of the second term, where the red (green) color indicates regions that need be subtracted from (added to) the gray area in Fig. 3b in order to obtain the correct integral value.

Fig. 3
figure 3

One-dimensional example for visualizing Eq. (5)

Of course, there is nothing special about choosing \(\Omega _1\) and \(D_1\) as the base term in Eq. (5). The formulation works equally well for \(\Omega _2\) and \(D_2\). In this case, however, it must hold that \(D_2\) is defined not only over \(\Omega _2\) but also over \(\Omega \)

$$\begin{aligned} \int \limits _{\Omega } Df\,\textrm{d} \xi = \int \limits _{\Omega } D_2 f\,\textrm{d} \xi + \int \limits _{\Omega _1} \big ( D_1-D_2 \big ) f\,\textrm{d} \xi . \end{aligned}$$
(8)

2.2 Multiple domains

The formulation given in Sect. 2.1 can be also extended to higher dimensional domains composed by \(n_{\textrm{d}}>2\) disjoint sub-domains according to Eq. (2) as well, where the discontinuous function \(D(\varvec{\xi })\) is defined individually over each sub-domain, such that

$$\begin{aligned} D(\varvec{\xi }) = D_i(\varvec{\xi }),~~\forall \varvec{\xi } \in \Omega _i. \end{aligned}$$
(9)

Then, for a chosen sub-domain i, Eq. (5) generalizes to

$$\begin{aligned} \int \limits _{\Omega } Df~\textrm{d}\varvec{\xi }= \int \limits _{\Omega } D_i f~\textrm{d}\varvec{\xi }+ \sum \limits _{\begin{array}{c} j=1\\ j\ne i \end{array}}^{n_\textrm{d}} \int \limits _{\Omega _j} \big ( D_j-D_i \big ) f~\textrm{d}\varvec{\xi }, \end{aligned}$$
(10)

where in the second term, \(j = i\) is excluded due to the integral value being zero. Note that each sub-domain i can be chosen as the basis of the formulation, assuming that \(D_i\) can be extended from \(\Omega _i\) to \(\Omega \). This is fairly simple for functions that are explicitly given, such as, piece-wise continuous material properties. However, for locally enriched multi-material problems, more steps are required for identifying \(D_i\) over \(\Omega \) (see Sect. 5).

Example: In Fig. 4, a two-dimensional example is given for Eq. (10), where a rectangular domain \(\Omega \in {\mathbb {R}}^2\) consists of three sub-domains (\(n_{\textrm{d}} = 3\)). In the current example, the discontinuous function \(D\) over \(\Omega \) is a piece-wise constant function with the values \(D_1 = 2\), \(D_2 = 4\) and \(D_3 = 1\) over the sub-domains \(\Omega _1\), \(\Omega _2\), and \(\Omega _3\), respectively (Fig. 4a)

$$\begin{aligned}&\Omega \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2]^{\textrm{T}}~|~ (-1 \le \xi _1 \le 1 ~\text {and}~ -1 \le \xi _2 \le 1 \} \end{aligned}$$
(11)
$$\begin{aligned}&\Omega _1 \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2]^{\textrm{T}}~|~ (\xi _1+1)^2 + (\xi _2+1)^2 \le 1 \}\end{aligned}$$
(12)
$$\begin{aligned}&\Omega _3 \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2]^{\textrm{T}}~|~ (\xi _1-1)^2 + (\xi _2-1)^2 \le 1 \}\end{aligned}$$
(13)
$$\begin{aligned}&\Omega _2 \;{:}{=}\; \Omega {\setminus } (\Omega _1 \cup \Omega _3). \end{aligned}$$
(14)

Also in this example, \(f=1\) is selected for simplicity. Choosing the sub-domain \(i=1\) as the basis for the formulation, the first and second terms in Eq. (10) are depicted in Figs. 4b and 4c, respectively. It is easy to see that the integral values based on the direct integration over the individual sub-domains (I) and on the Boolean formulation (\(I_\textrm{B}\)) are indeed equal \(I = I_\textrm{B} = 4 + \pi \)

$$\begin{aligned} I= & {} D_1 \cdot (\pi /4) + D_2\cdot (4-\pi /2) + D_3\cdot (\pi /4) \end{aligned}$$
(15)
$$\begin{aligned} I_\textrm{B}= & {} D_1 \cdot (4) + (D_2-D_1)\cdot (4-\pi /2) + (D_3-D_1)\cdot (\pi /4).\nonumber \\ \end{aligned}$$
(16)
Fig. 4
figure 4

Two-dimensional example for visualizing Eq. (10)

3 Combination of Boolean operations and space-tree decomposition techniques

Generally, using Eq. (10) over Eq. (4) does not have major advantages, when \(\Omega _i\) has a simple shape (e.g., quadrilateral, triangular, hexahedral, tetrahedral, or even circular domains [1]), such that the integrals can be computed either analytically, or via readily available numerical quadrature rules. However, when \(\Omega _i\) has a complex shape, Eq. (4) is often computed using the QTD and OTD space-tree decomposition techniques. As it will be shown later, if Eq. (10) is combined with a suitable space-decomposition strategy, the Boolean approach is more beneficial than the pure QTD/OTD, as it leads to a smaller number of integration points, while maintaining the integration accuracy.

3.1 Standard space-tree decomposition

The computation of Eq. (4) using the QTD/OTD approach is based on a recursive decomposition of the integration domain into a disjoint set of \(n_{\textrm{sc}}\) quadratic/cubic sub-cells \(\Omega = \bigcup _{k=1}^{n_{\textrm{sc}}} \omega _k\), where \( \omega _k\) is the domain of the kth sub-cell. The partition procedure is applied only to the cut sub-cells, leading to a set of integration domains with decreased size and increased density in the vicinity of the discontinuity, as depicted in Fig. 5 for the domains defined by Eqs. (11)–(14). The tree-depth is controlled by the refinement level \( {\mathcal {R}} \). Finally, the total integral value is computed by integrating the product \(Df\) via Gaussian quadrature over the individual sub-cells

$$\begin{aligned} \int \limits _{\Omega } Df \,\textrm{d}\varvec{\xi } = \sum \limits _{k=1}^{n_{\textrm{sc}}} \; \int \limits _{ \omega _k^{}} Df\,\textrm{d}\varvec{\xi }. \end{aligned}$$
(17)
Fig. 5
figure 5

Partitioning of the the parent cell via QTD with \( {\mathcal {R}} =3\) and geometry mapping of the sub-cell \( \omega _k\)

Each sub-cell has its own local coordinate system \(\varvec{\eta } \in {\mathbb {R}}^d\), where d is the dimensionality of the problem. Furthermore, the geometry mapping to the parent cell is established by the transformation \(\varvec{\eta } = {\varvec{Q}}_{\eta \rightarrow \xi }(\varvec{\xi })\) involving a uniform scaling and translation. Since integrals in Eq. (17) are computed in the local space of the individual sub-cells, the appropriate change of integration limits has to be taken into account by

$$\begin{aligned}{} & {} \int \limits _{ \omega _k^{}} D(\varvec{\xi }) f(\varvec{\xi }) \,\textrm{d}\varvec{\xi }= \nonumber \\{} & {} \int \limits _{{\tilde{ \omega }}^{}_k} D({\varvec{Q}}_{\eta \rightarrow \xi }\big (\varvec{\xi })\big ) f({\varvec{Q}}_{\eta \rightarrow \xi }\big (\varvec{\xi })\big )\det ({\varvec{J}}_{\eta \rightarrow \xi })\,\textrm{d}\varvec{\eta }, \end{aligned}$$
(18)

where \({\tilde{ \omega }}_k^{} = [-1,1] \times [-1,1]\) denotes the sub-cell in its local coordinate system \(\varvec{\eta }\). Furthermore, both the Jacobian matrix \({{\varvec{J}}_{\eta \rightarrow \xi } = \textrm{grad}_\eta ({\varvec{Q}}_{\eta \rightarrow \xi })}\) and its determinant are constants due to the nature of the geometry mapping. For sake of compactness, wherever it is possible in this article, the integrals over the sub-cells will be formulated w.r.t. \(\textrm{d}\varvec{\xi }\) rather than to \(\textrm{d}\varvec{\eta }\).

3.2 Boolean space-tree decomposition

The proposed Boolean integration scheme extends the conventional QTD/OTD algorithm three-fold, such that the resulting sub-cells are still square/cube-shaped, but (i) they are typically overlapping, (ii) have special labels that contain instructions for computing the integrals over the individual sub-cells (Sect. 3.2.1), and (iii) steer the space-partitioning process (Sect. 3.2.2). In the remainder of this paper, to emphasize the different nature of Boolean sub-cells, they are denoted by \( \omega ^\textrm{B} \), while the QTD/OTD algorithm enhanced by the Boolean approach is referred to as B-QTD/B-OTD. The typical hierarchic structure of the Boolean sub-cells and the distribution of integration points are depicted in Figs. 6 and 7, respectively. The actual meaning of the labels denoted by \({\mathcal {L}}\) and the color-coding associated with them will be discussed in the following sub-sections. From Fig. 5 vs. Figure 6 and Fig. 7a vs. Figure 7b, the key idea and the potential of the Boolean approach for reducing the number of sub-cells \(n_\textrm{SC}\) and integration points \(n_\textrm{IP}\) is already visible. In fact, in Sect. 3.3 and 6, it will be shown that the much more efficient distribution of integration points via the B-QTD/B-OTD algorithm leads to reduction in computational time by approximately 70–80%, while maintaining the same accuracy.

Fig. 6
figure 6

Overlapping sub-cells resulting from the B-QTD algorithm when applied for integrating the function depicted in Fig. 4a

Fig. 7
figure 7

Distribution of integration points using the QTD and B-QTD methods with \( {\mathcal {R}} =3\)where each sub-cell contains \(3\times 3\) integration points

3.2.1 Sub-cell labels

The Boolean approach sketched in Eq. (10) is based on integrating a discontinuous function in two steps: (i) a continuous function is integrated over a simple square/cube-shaped domain and (ii) a discontinuous function is integrated over a specific sub-domain, where the integrand results from the subtraction of two known functions. Although in the B-QTD/B-OTD, the integral value is not computed in two steps like in case of Eq. (10), but in \(n_{\textrm{sc}}\) steps

$$\begin{aligned} \int \limits _{\Omega } Df \,\textrm{d}\varvec{\xi }= \sum \limits _{k=1}^{n_{\textrm{sc}}} \int \limits _{ \omega ^\textrm{B} _k} \mathcal {D} f\,\textrm{d}\varvec{\xi } , \end{aligned}$$
(19)

each sub-cell is directly connected to one of the two terms in Eq. (10). Thus, although multiple calculations are required, in essence, the same procedure as described before applies. The actual purpose of a given sub-cell and the form of the discontinuous function \({\mathcal {D}}\) in the integrand for that specific sub-cell, is explicitly encoded in the developed labeling system. In particular, two different label types have been developed, which are comprehensively discussed in the following paragraphs.

Label type 1: The label of type 1 is composed by two domain IDs i and j in a specific order, and refers to the following integral over the given sub-cell

$$\begin{aligned} {\mathcal {L}}[i,j]:~~ +\int _{ \omega ^\textrm{B} _k} (D_i - D_j) f ~\textrm{d}\varvec{\xi }. \end{aligned}$$
(20)

The above integral essentially corresponds to the first term on the right hand side in Eq. (10), where the whole domain of interest is integrated and the discontinuity is ignored, regardless of whether the sub-cell is cut or not. However, instead of just using a single value of \(D_i\) like in Eq. (10), the term \(D_i-D_j\) is inserted, such that an overlapping sub-cell structure can be exploited. Note that label type 1 is always assigned to sub-cells created at the levels \( {\mathcal {R}} < {\mathcal {R}} _{\textrm{max}}\).

Additionally, we would like to express integrals, where only \(D_i\) or \(-D_j\) is used. Therefore, an additional zero value \(D_0:=0\) is declared, while keeping in mind that the actual domain IDs start from 1, not from 0, cf. Eq. (2). Thus, using \(i=0\) or \(j=0\), special cases of Eq. (20) are also possible, which are needed for the algorithm to work

$$\begin{aligned} {\mathcal {L}}[i,0]&:&+\int _{ \omega ^\textrm{B} _k} D_i f \,\textrm{d}\varvec{\xi }, \end{aligned}$$
(21)
$$\begin{aligned} {\mathcal {L}}[0,j]&:&-\int _{ \omega ^\textrm{B} _k} D_j f \,\textrm{d}\varvec{\xi }. \end{aligned}$$
(22)

Label type 2: The second label type contains only a single domain ID j, and refers to the integral

$$\begin{aligned} {\mathcal {L}}[j]:~~\int _{ \omega ^\textrm{B} _k} (D- D_j) f \, \textrm{d}\varvec{\xi }, \end{aligned}$$
(23)

where, unlike for type 1 labels, the discontinuity is taken into account due to the presence of \(D\). The above integral corresponds to the second term on the right hand side in Eq. (10). Here, the discontinuity is taken into account and hence, the integration error resulting from the label type 1 sub-cells is corrected. Note that for points lying in \(\Omega _j\), the integrand is vanishing due to Eq. (9)

$$\begin{aligned} D- D_j = 0 ~\text {in}~ \Omega _j. \end{aligned}$$
(24)

This fact constitutes a key feature of the B-QTD/B-OTD algorithm, since every sub-cell and integration point located in \(\Omega _j\) can be directly discarded.

Similar to Eqs. (21) and (22), if \(j=0\) is used, Eq. (23) turns into simply integrating the discontinuous function \(Df\) over \( \omega ^\textrm{B} _k\)

$$\begin{aligned} {\mathcal {L}}[0]: ~~\int _{ \omega ^\textrm{B} _k} \!\!(D-D_0) f ~\textrm{d}\varvec{\xi }~~=~~ \int _{ \omega ^\textrm{B} _k} \!\!Df ~\textrm{d}\varvec{\xi }. \end{aligned}$$
(25)

due to the applied definition \(D_0=0\).

3.2.2 Labelling of new sub-cells

The labeling procedure is illustrated in Fig. 8 for the partitioning step of a quadratic sub-cell \(\omega _k \in {\mathbb {R}}^2\) with the type 2 label \({\mathcal {L}}[j]\). In principle, there are three cases how the B-QTD can proceed from this stage, which are elaborated below. Note that at the very beginning of the Boolean decomposition algorithm, \(j=0\) is set for the label.

Case 1: If the given sub-cell is not cut, it must completely belong to a single domain \(\omega _k \subset \Omega _i\). The sub-cell is excluded from further partitioning and its label modifies to \({\mathcal {L}}[i,j]\) (orange box in Fig. 8).

If the sub-cell is cut, four children are created and the following two additional steps are executed for the Boolean labeling process: (i) Find the material ID i for the sub-cell \( \omega ^\textrm{B} _k\), for which \(\Omega _i^k = \omega ^\textrm{B} _k \cap \Omega _i\) is the largest. In the current implementation, this is achieved by testing a set of sample points. (ii) Test whether \(\Omega _i^k\) occupies at least of \( \omega ^\textrm{B} _k\) in 2D and in 3D. This condition is denoted by \( {\mathcal {C}} \) in Fig. 8.

Case 2: If \( {\mathcal {C}} = \texttt {false}\), the parent sub-cell is deleted and all of its children inherit its label (green box in Fig. 8). Essentially, this scenario corresponds to the general procedure of the standard QTD, with the difference, that the sub-cells are also labeled. Since \( {\mathcal {C}} \) is violated, even the largest sub-domain has an area less then 25% of that of the parent sub-cell. Thus, none of the children can belong to a single sub-domain only. Note that \( {\mathcal {C}} \) = false only applies in cases where the sub-cells have at least 5 sub-domains.

Case 3: If \( {\mathcal {C}} = \texttt {true}\) for a cut sub-cell, the following procedure applies (blue box in Fig. 8): (i) Keep the parent sub-cell and assign label \({\mathcal {L}}[i,j]\) and (ii) assign the label \({\mathcal {L}}[i]\) to the children.

The benefit of the labeling procedure in this case is demonstrated in Fig. 9, where the example domain is discretized by a single cell with \( {\mathcal {R}} =1\). Since \( {\mathcal {C}} = \texttt {true}\) for \(\Omega _2\), the parent cell is kept and the labels are assigned according to Fig. 9b, where the white text boxes are used for numbering the sub-cells. In Fig. 9c, the vanishing integrand property given in Eq. (24) is utilized: Firstly, since sub-cells No. 3 and 4 lie completely in \(\Omega _2\), these can be directly discarded. Secondly, while sub-cells No. 2 and 5 are kept, a further reduction of integration points is still possible due to the integrand beeing \(D_2-D_2\) in \( \omega ^\textrm{B} _2 \cap \Omega _2\) and \( \omega ^\textrm{B} _5 \cap \Omega _2\) (green domain in Fig. 9c). Both, discarding the entire sub-cells and the integration points are possible due to the profound interplay between the assigned labels.

Fig. 8
figure 8

Illustration of the partitioning step and labeling of the parent sub-cell and its children

Remark 1

Note that performing a standard QTD and then assigning labels to the sub-cells is not possible. The labeling process has to be carried out parallel to the QTD.

Fig. 9
figure 9

Two-dimensional example for visualizing Eq. (10)

The procedure depicted in Fig. 8 is repeated for each cut sub-cell until the final refinement level \( {\mathcal {R}} _\textrm{max}\) is reached. Every time \( {\mathcal {C}} = \texttt {true}\), both a parent sub-cell and some of its children are kept. Using \( {\mathcal {R}} _\textrm{max} = 3\) for Fig. 9a results in the set of overlapping sub-cells depicted in Fig. 6, where the \( {\mathcal {R}} \)-axis indicates the refinement levels the individual sub-cells were generated on. A special color-coding is used to indicate the different sub-cell labels, whose corresponding integrands are depicted in the right side of Fig. 6.

Examining an arbitrary point \(P = [-0.1,\,-0.35] \in \Omega _2\) in Fig. 6, the integrand at P should evaluate to \(I= D_2\) (cf. Fig. 4a). By adding up the integrands represented by the Boolean sub-cells containing the given point,

$$\begin{aligned} I = \underbrace{D_2}_{ {\mathcal {R}} =0} + \underbrace{(D_1-D_2)}_{ {\mathcal {R}} =1} + \underbrace{(D_2-D_1)}_{ {\mathcal {R}} =2} + \underbrace{(D_2-D_2)}_{ {\mathcal {R}} =3} = D_2,\nonumber \\ \end{aligned}$$
(26)

it is evident, that the equality indeed holds. Note that on \( {\mathcal {R}} = 3\), the type 2 label is used as defined in Eq. (23).

Finally, the effect of the labeling concept on the integration points is depicted in Fig. 10, where \(3 \times 3\) integration points are distributed in each sub-cell of Fig. 6 and the same coloring scheme is used. Additionally, for each integration point, the corresponding integrand is given. The difference between the different label types is clear: Since sub-cell labels at \( {\mathcal {R}} < {\mathcal {R}} _{{\max }}\) are not taking the discontinuity into account (red and blue dashed lines), all integration points are used in the sub-cells. For the sub-cells at \( {\mathcal {R}} = {\mathcal {R}} _{\textrm{max}}\), label type 2 is used, where the discontinuity (red and blue solid lines) is taken into account during the integration. These cells generally contain integration points with vanishing integrand, such that they can be excluded from the integration procedure due to Eq. (24).

Fig. 10
figure 10

Integration points in the overlapping sub-cells of Fig. 6 and their corresponding integrands

3.3 Performance

In this sub-section, the performance of the B-QTD and B-OTD algorithms is investigated in terms of the reduction of integration points and achieved integration accuracy. Due to the Boolean sub-cell labels, the B-QTD has a much more efficient distribution of the integration points than the standard QTD. This can be clearly recognized in Fig. 7 presented earlier, where the integration points for the B-QTD are based on Fig. 10. Expressed quantitatively, the number of integration points using the QTD integration scheme \(n_\textrm{IP}^\textrm{QTD} \!= 252\) drops to \(n_\textrm{IP}^\mathrm {B-QTD} \!= 81\) for the current example, when the QTD is extended by the Boolean approach. Using these quantities, the reduction of integration points is introduced as

$$\begin{aligned} r_\textrm{IP}&= \left( 1- \dfrac{n_\textrm{IP}^{\mathrm {B-QTD}}}{n_\textrm{IP}^\textrm{QTD}} \right) \times 100\%, \end{aligned}$$
(27)

where \(r_\textrm{IP}>0 \,\%\) indicates a meaningful reduction and \(r_\textrm{IP}=0 \,\%\) means no reduction. For the example given in Fig. 7, a significant saving by \(r_\textrm{IP} = 67.86\%\) can be obtained. Similar to \(r_\textrm{IP}\), a reduction rate of sub-cells \(r_\textrm{SC}\) can also be defined. Both of these quantities are depicted in Fig. 11a for various refinement levels, where a reduction rate up to \(r_\textrm{IP} \approx 80\%\) is observed. Note that due to the additional savings of integration points in the leaf sub-cells (cf. Fig. 10d), \(r_\textrm{IP} \ge r_\textrm{SC}\). Furthermore, let \(e_\textrm{I}\) express the relative integration error

$$\begin{aligned} e_\textrm{I} = \left( 1- \dfrac{I}{I_\textrm{ref}} \right) \times 100\%, \end{aligned}$$
(28)

where I is the integral value obtained by different numerical methods and \(I_\textrm{ref}\) the reference value. For the current example \(I_\textrm{ref}\) is given in Eq. (15). Figure. 11b reveals that despite the significant reduction of integration points, the B-QTD yields the same integration accuracy as the QTD.

Fig. 11
figure 11

Comparison of the QTD ond B-QTD algorithms

The same significant reduction rate and no loss of accuracy can be observed for 3D problems as well, as depicted in Fig. 12 for a cubic domain composed by the sub-domains \(\Omega _1\), \(\Omega _2\), \(\Omega _3\), defined below.

$$\begin{aligned}&\Omega \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2,\xi _3]^{\textrm{T}}~|~ (-1 \le \xi _i \le 1 ~\text {for}~ i = 1,2,3 \} \end{aligned}$$
(29)
$$\begin{aligned}&\Omega _1 \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2,\xi _3]^{\textrm{T}}~|~ (\xi _1+1)^2 \nonumber \\&\qquad \quad + (\xi _2+1)^2 + (\xi _3+1)^2\le 1 \} \end{aligned}$$
(30)
$$\begin{aligned}&\Omega _2 \;{:}{=}\; \{ \varvec{\xi } = [\xi _1,\xi _2,\xi _3]^{\textrm{T}}~|~ (\xi _1-1)^2 \nonumber \\&\qquad \quad + (\xi _2-1)^2 + (\xi _3-1)^2 \le 1 \} \end{aligned}$$
(31)
$$\begin{aligned}&\Omega _3 \;{:}{=}\; \Omega {\setminus } (\Omega _1 \cup \Omega _2) \end{aligned}$$
(32)
Fig. 12
figure 12

Comparison of the QTD ond B-QTD algorithms

4 Multi-material finite cell method

In this section, the discussion in Sect. 1.1 is extended by the required mathematical formulation for multi-material problems. Let us consider a material domain \(\Omega \) that is composed by \(n_\textrm{d}\) disjoint sub-domains \(\Omega =\cup _{i=1}^{n_\textrm{d}}\Omega _i\), which are either void regions or other material domains.

4.1 Finite cell method

The original FCM formulation is concerned with porous media, i.e., the given problem consists of a single material and multiple void regions [3,4,5, 43]. It has been shown, that exponential convergence rates can be obtained [10]. Without derivation, the weak formulation of linear elasticity in the context of the FCM reads

$$\begin{aligned} \textit{Find}~{\varvec{u}} \in {\mathcal {S}}^{\textrm{h}}~\textit{such~that,}~~{\mathcal {B}}_{\textrm{e}}({\varvec{u}},{\varvec{v}}) = {\mathcal {F}}_{\textrm{e}}(v),~~\forall {\varvec{v}} \in {\mathcal {V}}^{\textrm{h}}. \end{aligned}$$
(33)

Here, \({\varvec{u}}\) is the displacement field, \({\varvec{v}}\) denotes the test function, and \({\mathcal {S}}^{\textrm{h}}\) together with \({\mathcal {V}}^{\textrm{h}}\) represent the appropriate finite dimensional function spaces, which in this article, are based on the spectral element concept [54,55,56]. Furthermore, \({\mathcal {B}}_{\textrm{e}}\) and \({\mathcal {F}}_{\textrm{e}}\) are bilinear and linear functionals, respectively, defined over the extended domain \( \Omega _\textrm{e} \)

$$\begin{aligned} {\mathcal {B}}_{\textrm{e}}({\varvec{u}},{\varvec{v}})= & {} \int \limits _{ \Omega _\textrm{e} } \alpha \rho \ddot{{\varvec{u}}} {\varvec{v}}\,\textrm{d}{\varvec{x}}+ \int \limits _{ \Omega _\textrm{e} } ({\varvec{L}} {\varvec{u}})^{\textrm{T}} \alpha {\varvec{C}} {\varvec{L}} {\varvec{v}}\,\textrm{d}{\varvec{x}} \end{aligned}$$
(34)
$$\begin{aligned} {\mathcal {F}}_{\textrm{e}}({\varvec{v}})= & {} \int \limits _{ \Omega _\textrm{e} } {\varvec{v}}^{\textrm{T}}\alpha {\varvec{b}}\,\textrm{d}{\varvec{x}}+ \int \limits _{\Gamma _{\textrm{N}}} {\varvec{v}}^{\textrm{T}}\hat{{\varvec{t}}}\,\textrm{d}{\varvec{x}}. \end{aligned}$$
(35)

In the above equations, \(\alpha \) is the indicator function defined in Eq. (1) for distinguishing between the physical and fictitious domains, while \(\rho \) and \({\varvec{C}}\) are the material density and stiffness, respectively. Furthermore, \(\ddot{{\varvec{u}}}\) is the acceleration field, \({\varvec{b}}\) stands for the body load vector, and \(\hat{{\varvec{t}}}\) represents the prescribed tractions along the Neumann boundary \(\Gamma _{\textrm{N}}\). Considering a two-dimensional setting for the sake of simplicity, in each finite cell, the displacement field \( {\varvec{u}}^{(c)} = [u_1^{(c)}, u_2^{(c)}]^{\textrm{T}}\) is approximated using smooth shape functions

$$\begin{aligned} {\varvec{u}}^{(c)} = {\varvec{N}}_{\!\textrm{u}}{\varvec{U}}^\mathrm {(c)}, \end{aligned}$$
(36)

where \({\varvec{N}}_{\!\textrm{u}}\in {\mathbb {R}}^{2\times 2 n_\textrm{N} }\) is a matrix containing the shape functions associated with the \( n_\textrm{N} \) nodes of the given cell

$$\begin{aligned} {\varvec{N}}_{\!\textrm{u}}= \begin{bmatrix} N_1 &{} 0 &{} N_2 &{} 0 &{} \cdots &{} N_{ n_\textrm{N} } &{} 0\\ 0 &{} N_1 &{} 0 &{} N_2 &{} 0 &{} \cdots &{} N_{ n_\textrm{N} } \end{bmatrix}, \end{aligned}$$
(37)

and \({\varvec{U}}^\mathrm {(c)}\) contains the unknown nodal displacements. The cell matrices as well as the global system matrices of the discretized problem will be given in Sect. 4.3 after a brief introduction to the local enrichment approach in Sect. 4.2.

4.2 Local enrichment

In the following, the focus is kept on multi-material problems without any void regions. Thus, \(\alpha =1\) applies to all cases. Nonetheless, the material properties are still discontinuous due to \({\varvec{C}}({\varvec{x}}) = {\varvec{C}}_i({\varvec{x}})\) and \(\rho ({\varvec{x}})=\rho _i({\varvec{x}})\) \(\forall {\varvec{x}} \in \Omega _i\). Furthermore, at the material interfaces, the displacements are generally \(C^0\)-continuous while stress and strains obey certain jump conditions. For locally enriched problems, the weak formulation reads

$$\begin{aligned}{} & {} \textit{Find}~{\varvec{u}} \in {\mathcal {S}}^{\textrm{h}},~\textit{such~that}\nonumber \\{} & {} {\left\{ \begin{array}{ll} {\mathcal {B}}_{\textrm{e}}({\varvec{u}}_\textrm{u}+{\varvec{u}}_\textrm{a},{\varvec{v}}_\textrm{u}) = {\mathcal {F}}_{\textrm{e}}({\varvec{v}}_\textrm{u}),~~\forall {\varvec{v}}_\textrm{u} \in {\mathcal {V}}^{\textrm{h}}_\textrm{u}\\ {\mathcal {B}}_{\textrm{e}}({\varvec{u}}_\textrm{u}+{\varvec{u}}_\textrm{a},{\varvec{v}}_\textrm{a}) = {\mathcal {F}}_{\textrm{e}}({\varvec{v}}_\textrm{a}),~~\forall {\varvec{v}}_\textrm{a} \in {\mathcal {V}}^{\textrm{h}}_\textrm{a} \end{array}\right. }, \end{aligned}$$
(38)

where \({\varvec{u}}\) is composed of the smooth \({\varvec{u}}_\textrm{u}\) and enriched displacements \({\varvec{u}}_\textrm{a}\), such that \({\varvec{u}} = {\varvec{u}}_\textrm{u} + {\varvec{u}}_\textrm{a}\). Furthermore, \({\varvec{v}}_\textrm{u}\) and \({\varvec{v}}_\textrm{a}\) are the test functions associated with the base \({\mathcal {V}}^\textrm{h}_\textrm{u}\) and enriched function spaces \({\mathcal {V}}^\textrm{h}_\textrm{a}\), respectively. Following from Eq. (38), for the approximation of \( {\varvec{u}}^{(c)} \), Eq. (36) turns into

$$\begin{aligned} {\varvec{u}}^{(c)} = {\varvec{N}}_{\!\textrm{u}}{\varvec{U}}^\mathrm {(c)} + {\varvec{N}}_{\!\textrm{a}}{\varvec{A}}^\mathrm {(c)}, \end{aligned}$$
(39)

where the first term is identical to the standard approximation in Eq. (36) and the second term includes the matrix of enrichment shape functions

$$\begin{aligned} {\varvec{N}}_{\!\textrm{a}}= \psi {\varvec{N}}_{\!\textrm{u}} \end{aligned}$$
(40)

and enrichement DOFs \({\varvec{A}}\). There are multiple ways how the enrichment function \(\psi \) in Eq. (40) can be defined. In this contribution, we follow the modified-abs enrichment proposed by Moës et al. [14]

$$\begin{aligned} \psi = {\varvec{N}} |\varvec{\varphi }| - |{\varvec{N}} \varvec{\varphi }| , \end{aligned}$$
(41)

which is based on a level-set function \(\varphi _i\) of the embedded geometries, where the domain and boundary of the ith geometric entity is defined by

$$\begin{aligned} \Omega _i= & {} \{ {\varvec{x}} ~|~ \varphi _i({\varvec{x}}) < 0 \} , \end{aligned}$$
(42)
$$\begin{aligned} \Gamma _i= & {} \{ {\varvec{x}} ~|~ \varphi _i({\varvec{x}}) = 0 \} . \end{aligned}$$
(43)

In Eq. (41), \({\varvec{N}}\) and \(\varvec{\varphi }\) are vectors containing the shape functions and level-set values associated with the individual nodes, respectively

$$\begin{aligned} {\varvec{N}}= & {} \begin{bmatrix} N_1&N_2&\cdots&N_{ n_\textrm{N} } \end{bmatrix}^{\textrm{T}}, \end{aligned}$$
(44)
$$\begin{aligned} \varvec{\varphi }= & {} \begin{bmatrix} \varphi _1&\varphi _2&\cdots&\varphi _{ n_\textrm{N} } \end{bmatrix}^{\textrm{T}}. \end{aligned}$$
(45)

Furthermore, the last term in Eq. (41) ensures the \(C^0\)-continuity of \(\psi \) along the interface, and subtracted from the first term, it yields a \(\psi \) that vanishes on the element edges that are not intersected by the boundary. Thus, parasitic terms and partially enriched transition elements can be avoided [57].

Note that in the general case, \({\varvec{N}}_{\!\textrm{u}}\), \({\varvec{N}}_{\!\textrm{a}}\) and \({\varvec{N}}\) can be based on different Ansatz spaces and meshes [6]. In this contribution, for all of these quantities, Lagrangian shape functions are used based on the Gauss–Legendre–Lobatto (GLL) nodal distribution. While for \({\varvec{N}}_{\!\textrm{u}}\), a user defined polynomial order p is used, the polynomial degree \(p_\psi \) of \({\varvec{N}}\) depends on the complexity of intersecting interface [6]. Finally, following from Eq. (40), the polynomial degree of \({\varvec{N}}_{\!\textrm{a}}\) is \(p_\textrm{a}=p+p_\psi \).

4.3 Discretization

Discretization of the coupled weak form leads to cell-specific stiffness matrices including terms that are only related to (i) the smooth displacements \({\varvec{K}}_\textrm{uu}^\textrm{c}\), (ii) the enriched displacements \({\varvec{K}}_\textrm{aa}^\textrm{c}\), and (iii) appropriate coupling terms \({\varvec{K}}_\textrm{ua}^\textrm{c}= ({\varvec{K}}_\textrm{au}^\textrm{c})^{\textrm{T}}\). Following the QTD/OTD-based integration scheme often used in the FCM (see Sect. 3.1), \( {\varvec{K}}^{c} \) is computed by integrating over the \(n_{\textrm{sc}}\) sub-cells

$$\begin{aligned} {\varvec{K}}^{c} = \begin{bmatrix} {\varvec{K}}_\textrm{uu}^\textrm{c}&{} {\varvec{K}}_\textrm{ua}^\textrm{c}\\ {\varvec{K}}_\textrm{au}^\textrm{c}&{} {\varvec{K}}_\textrm{aa}^\textrm{c}\end{bmatrix} = \sum _{k=1}^{n_{\textrm{sc}}}\, \int \limits _{ \omega _k} \begin{bmatrix} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}&{} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\textrm{a}}\\ {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}&{} {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\textrm{a}}\\ \end{bmatrix} \textrm{d}{\varvec{x}}. \end{aligned}$$
(46)

In the above equation, \({\varvec{B}}_{\!\textrm{u}}\) and \({\varvec{B}}_{\textrm{a}}\) are the strain-gradient operators associated with the standard and enriched displacements, respectively. Similar to \({\varvec{B}}_{\!\textrm{u}}\), \({\varvec{B}}_{\textrm{a}}\) is constructed as

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}= [{\varvec{B}}_{\textrm{a}}^{(1)},~ {\varvec{B}}_{\textrm{a}}^{(2)},\ldots , {\varvec{B}}_{\textrm{a}}^{( n_\textrm{N} )}], \end{aligned}$$
(47)

where \({\varvec{B}}_{\textrm{a}}^{(l)}\) is associated with the lth enrichment shape function, and for two-dimensional linear elastic problems it is of the form

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}^{(l)} = \begin{bmatrix} \dfrac{\partial (\psi N_l)}{\partial x_1} &{} 0\\ 0 &{} \dfrac{\partial (\psi N_l)}{\partial x_2} \\ \dfrac{\partial (\psi N_l)}{\partial x_2} &{} \dfrac{\partial (\psi N_l)}{\partial x_1} \end{bmatrix} . \end{aligned}$$
(48)

The differentiation of the individual entries w.r.t. \(x_m\) is realized using the product rule

$$\begin{aligned} \dfrac{\partial (\psi N_l)}{\partial x_m} = \dfrac{\partial \psi }{\partial x_m}N_l + \dfrac{\partial N_l}{\partial x_m} \psi , \end{aligned}$$
(49)

with \(m=1,2\). Based on Eq. (41), the derivative of the enrichment term \(\psi \) is

$$\begin{aligned} \dfrac{\partial \psi }{\partial x_m} = \dfrac{\partial {\varvec{N}}}{\partial x_m} |\varvec{\varphi }| - \texttt {sgn}({\varvec{N}}\varvec{\varphi }) \dfrac{\partial {\varvec{N}}}{\partial x_m} \varvec{\varphi }. \end{aligned}$$
(50)

Note that here the chain rule is utilized again and that the sgn-function results from differentiating the abs-function. Similar to Eq. (46), the cell-specific mass matrix has the structure

$$\begin{aligned} {\varvec{M}}^{c} = \begin{bmatrix} {\varvec{M}}_\textrm{uu}^\textrm{c} &{} {\varvec{M}}_\textrm{ua}^\textrm{c} \\ {\varvec{M}}_\textrm{au}^\textrm{c} &{} {\varvec{M}}_\textrm{aa}^\textrm{c} \end{bmatrix} = \sum _{k=1}^{n_{\textrm{sc}}}\, \int \limits _{ \omega _k} \rho \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{N}}_{\!\textrm{u}}^{~} &{} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{N}}_{\!\textrm{a}}^{~}\\ {\varvec{N}}_{\!\textrm{a}}^{\textrm{T}}{\varvec{N}}_{\!\textrm{u}}^{~} &{} {\varvec{N}}_{\!\textrm{a}}^{\textrm{T}}{\varvec{N}}_{\!\textrm{a}}^{~} \end{bmatrix} \textrm{d}{\varvec{x}}. \end{aligned}$$
(51)

Due to the enrichment, the highest polynomial degree in the integrands of \( {\varvec{K}}^{c} \) and \( {\varvec{M}}^{c} \) is \(2p_\textrm{a}=2(p+p_\psi )\). Thus, for an accurate numerical integrationFootnote 2, instead of the standard \(p+1\) integration points per direction, \(p+p_\psi +1\) integration points are required. Finally, after assembly, the coupled global equation system without damping reads

$$\begin{aligned} \begin{bmatrix} {\varvec{M}}_\textrm{uu} &{} {\varvec{M}}_\textrm{ua} \\ {\varvec{M}}_\textrm{au} &{} {\varvec{M}}_\textrm{aa} \end{bmatrix} \begin{bmatrix} \ddot{{\varvec{U}}}_{\!\textrm{u}} \\ \ddot{{\varvec{U}}}_{\!\textrm{a}} \end{bmatrix} + \begin{bmatrix} {\varvec{K}}_{\!\textrm{uu}}&{} {\varvec{K}}_{\!\textrm{ua}}\\ {\varvec{K}}_{\!\textrm{au}}&{} {\varvec{K}}_{\!\textrm{aa}}\end{bmatrix} \begin{bmatrix} {\varvec{U}}_{\!\textrm{u}} \\ {\varvec{U}}_{\!\textrm{a}} \end{bmatrix} = \begin{bmatrix} {\varvec{F}}_{\!\textrm{u}} \\ {\varvec{F}}_{\!\textrm{a}} \end{bmatrix}. \end{aligned}$$
(52)

5 B-FCM for multi-material problems

In this section, the Boolean integration approach given in Sect. 2 is combined with the local enrichment of the displacement field over cut cell. For simplicity, the focus is kept on cases where cut cells are intersected by nothing else but a single material interface. Thus, the cells contain two material domains \(\Omega _1\) and \(\Omega _2\), without the presence of any void regions. However, more complex scenarios are possible and constitute a straightforward extension of the proposed approach.

5.1 Intuitive implementation of the cell matrices

In order to apply the features presented in Sect. 3.2, a clear separation of the discontinuous (\(D\)) and continuous terms (f) is required. In the case of local enrichment, the discontinuity in Eq. (46) is not only caused by the strongly discontinuous material properties related to \({\varvec{C}}\), but also by \({\varvec{B}}_{\textrm{a}}\), that is derived from the weakly discontinuous enrichment function \(\psi \). Thus, when integrating the enriched stiffness matrix over a given Boolean sub-cell \( \omega ^\textrm{B} _k\), the integration labels defined in Eqs. (20) and (23) lead to

$$\begin{aligned} {\mathcal {L}}[i,j]:~~ {\left\{ \begin{array}{ll} {\varvec{K}}_\textrm{uu}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ( {\varvec{C}}_i-{\varvec{C}}_j \bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{ua}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ({\varvec{C}}_i{\varvec{B}}_{\textrm{a}i} -{\varvec{C}}_j {\varvec{B}}_{\textrm{a}j}\bigg )\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{au}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \bigg ({\varvec{B}}_{\textrm{a}i}^{\textrm{T}}{\varvec{C}}_i - {\varvec{B}}_{\textrm{a}j}^{\textrm{T}}{\varvec{C}}_j\bigg ){\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{aa}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \bigg ( {\varvec{B}}_{\textrm{a}i}^{\textrm{T}}{\varvec{C}}_i{\varvec{B}}_{\textrm{a}i} -{\varvec{B}}_{\textrm{a}j}^{\textrm{T}}{\varvec{C}}_j {\varvec{B}}_{\textrm{a}j} \bigg )\,\textrm{d}{\varvec{x}}\end{array}\right. }, \end{aligned}$$
(53)

and

$$\begin{aligned} {\mathcal {L}}[j]:~~ {\left\{ \begin{array}{ll} {\varvec{K}}_\textrm{uu}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ({\varvec{C}}-{\varvec{C}}_j\bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{ua}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ({\varvec{C}}{\varvec{B}}_{\textrm{a}} -{\varvec{C}}_j {\varvec{B}}_{\textrm{a}j}\bigg )\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{au}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \bigg ({\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} - {\varvec{B}}_{\textrm{a}j}^{\textrm{T}}{\varvec{C}}_j\bigg ){\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{aa}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \bigg ( {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}}{\varvec{B}}_{\textrm{a}} -{\varvec{B}}_{\textrm{a}j}^{\textrm{T}}{\varvec{C}}_j {\varvec{B}}_{\textrm{a}j} \bigg )\,\textrm{d}{\varvec{x}}\end{array}\right. }. \end{aligned}$$
(54)

Note that in the above equations, the terms are separated such that all weakly/strongly discontinuous terms are within the brackets. As a next step, the extension of these terms to the entire integration domain is required. On the one hand, this is not an issue for \({\varvec{C}}_1\) and \({\varvec{C}}_2\), which are often piece-wise constant functions. On the other hand, \({\varvec{B}}_{\textrm{a}1}\) and \({\varvec{B}}_{\textrm{a}2}\) are polynomial functions and form a piece-wise polynomial \({\varvec{B}}_{\textrm{a}}\), such that

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}= {\left\{ \begin{array}{ll} {\varvec{B}}_{\textrm{a}1} &{}\text {in}~~ \Omega _1^k \subset \omega ^\textrm{B} _k\\ {\varvec{B}}_{\textrm{a}2} &{}\text {in}~~ \Omega _2^k \subset \omega ^\textrm{B} _k \end{array}\right. }. \end{aligned}$$
(55)

Since the discontinuity in \({\varvec{B}}_{\textrm{a}}\) is caused by the enrichment function \(\psi \), the computation of \(\psi _i\) and its spatial derivatives are required for calculating \({\varvec{B}}_{\textrm{a}i}\). Based on Eqs. (48) and (49), for the sub-matrix of \({\varvec{B}}_{\textrm{a}i}\) associated with the lth enriched shape function,

$$\begin{aligned} {\varvec{B}}_{\textrm{a}i}^{(l)} = \begin{bmatrix} \dfrac{\partial \psi _i}{\partial x_1} N_l + \dfrac{\partial N_l}{\partial x_1} \psi _i &{} 0\\ 0 &{} \dfrac{\partial \psi _i}{\partial x_2} N_l + \dfrac{\partial N_l}{\partial x_2}\psi _i\\ \dfrac{\partial \psi _i}{\partial x_2} N_l + \dfrac{\partial N_l}{\partial x_2}\psi _i &{} \dfrac{\partial \psi _i}{\partial x_1} N_l + \dfrac{\partial N_l}{\partial x_1}\psi _i \end{bmatrix} . \end{aligned}$$
(56)

When using the modified abs-enrichment approach to construct \(\psi \), (cf. Eq. (41)), the weak discontinuity is introduced by the term \(|{\varvec{N}}\varvec{\varphi }|\). Thus, the enrichment function is divided along the isoline \({\varvec{N}}\varvec{\varphi }=0\) into \(\psi _1\) and \(\psi _2\), such that

$$\begin{aligned} \psi (\varvec{\xi }) = {\left\{ \begin{array}{ll} \psi _1(\varvec{\xi }) &{}\forall \varvec{\xi },~ {\varvec{N}}\varvec{\varphi } \le 0\\ \psi _2(\varvec{\xi }) &{}\forall \varvec{\xi },~ {\varvec{N}}\varvec{\varphi } > 0 \end{array}\right. }. \end{aligned}$$
(57)

Since \(|{\varvec{N}}\varvec{\varphi }| = {\varvec{N}}\varvec{\varphi }\) for \({\varvec{N}}\varvec{\varphi }>0\) and \(|{\varvec{N}}\varvec{\varphi }| = -{\varvec{N}}\varvec{\varphi }\) for \({\varvec{N}}\varvec{\varphi }<0\), \(\psi _1\) and \(\psi _2\) read

$$\begin{aligned} \psi _1= & {} {\varvec{N}} |\varvec{\varphi }| - {\varvec{N}} \,\varvec{\varphi } ~=~{\varvec{N}} \cdot (|\varvec{\varphi }|-\varvec{\varphi }), \end{aligned}$$
(58)
$$\begin{aligned} \psi _2= & {} {\varvec{N}} |\varvec{\varphi }| + {\varvec{N}} \,\varvec{\varphi } ~=~{\varvec{N}} \cdot (|\varvec{\varphi }|+\varvec{\varphi }). \end{aligned}$$
(59)

An example for this is given in Fig. 13, where Fig. 13a depicts a specific \(\psi \) whose parts over \(\Omega _1^{k}\) and \(\Omega _2^{k}\) are color-coded by green and orange. The extensions of \(\psi _1\) and \(\psi _2\) to the entire domain \( \omega ^\textrm{B} _k=\Omega _1^k \cup \Omega _2^k\) are depicted in Figs. 13b and 13c, respectively. For the current example, \( \omega ^\textrm{B} _k = [-1,1]\times [-1,1]\). Furthermore, \(\Omega _1^{k}\) and \(\Omega _2^{k}\) are the domains exterior and interior to a circle of radius \(R=1\), whose origin is located at \({\varvec{x}}_\textrm{o} = \{0.5,0.5\}\).

Fig. 13
figure 13

Example for \(\psi _1\) and \(\psi _2\) over the entire element domain. Note that for visualization purposes, that vertical axes are scaled differently

Finally, since in Eqs. (58) and (59), the vectors \({\varvec{N}}\) and \(\varvec{\varphi }\) contain polynomial and constant entries, respectively, the required partial derivatives of \(\psi _1\) and \(\psi _2\) in Eq. (56) are computed as

$$\begin{aligned} \dfrac{\partial \psi _1}{\partial x_m}= & {} \dfrac{\partial {\varvec{N}}}{\partial x_m} (|\varvec{\varphi }|-\varvec{\varphi }), \end{aligned}$$
(60)
$$\begin{aligned} \dfrac{\partial \psi _2}{\partial x_m}= & {} \dfrac{\partial {\varvec{N}}}{\partial x_m} (|\varvec{\varphi }|+\varvec{\varphi }). \end{aligned}$$
(61)

The formulation presented in this section sketches an intuitive concept of formulating the integrands over the Boolean sub-cells. Although it utilizes a reduced set of integration points, Eqs. (53) and (54) contain additional matrix operations. An example for this can be seen in the computation of \({\varvec{K}}_\textrm{aa}^\textrm{c}\) by means of Eq. (53), where instead of \({\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}}{\varvec{B}}_{\textrm{a}}^{~}\), \({\varvec{B}}_{\textrm{a}i}^{\textrm{T}}{\varvec{C}}_i^{~}{\varvec{B}}_{\textrm{a}i}^{~} - {\varvec{B}}_{\textrm{a}j}^{\textrm{T}}{\varvec{C}}_j^{~}{\varvec{B}}_{\textrm{a}j}^{~}\) is computed, i.e., the number of matrix operations is increased by a factor of two. For avoiding this feature, the next sub-section presents a more compact formulation, reducing the number of unnecessary matrix operations.

5.2 Compact implementation of the cell matrices

In the current sub-section, the notion of Sect. 5.1 is extended by an improved separation of the continuous and discontinuous terms, such that unnecessary or redundant matrix operations can be avoided and the computational time of the Boolean approach is further reduced. More details concerning the reduction in computational effort are given at the end of this section.

5.2.1 More efficient separation of terms

As a first step, Eq. (48) is rewritten, such that

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}^{(l)} = \begin{bmatrix} \dfrac{\partial \psi }{\partial x_1} &{} 0\\ 0 &{} \dfrac{\partial \psi }{\partial x_2}\\ \dfrac{\partial \psi }{\partial x_2} &{} \dfrac{\partial \psi }{\partial x_1} \end{bmatrix} N_l + \psi \begin{bmatrix} \dfrac{\partial N_l}{\partial x_1} &{} 0\\ 0 &{} \dfrac{\partial N_l}{\partial x_2}\\ \dfrac{\partial N_l}{\partial x_2} &{} \dfrac{\partial N_l}{\partial x_1} \end{bmatrix} = N_l \varvec{\Psi } + \psi {\varvec{B}}_{\!\textrm{u}}^{(l)}, \end{aligned}$$
(62)

where \(\varvec{\Psi }\) is a \(3\times 2\) matrix containing the spacial derivatives of \(\psi \). The same approach also applies when computing the entire matrix

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}= \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}+ \psi {\varvec{B}}_{\!\textrm{u}}. \end{aligned}$$
(63)

Note that in this case \({\varvec{B}}_{\textrm{a}}\) is reproduced by using the terms \({\varvec{N}}_{\!\textrm{u}}\) and \({\varvec{B}}_{\!\textrm{u}}\), which are generated only once for a given sub-cell. Using Eq. (63), let us rewrite the purely enriched term \({\varvec{K}}_\textrm{aa}^\textrm{c}\) in Eq. (46):

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\textrm{a}}^{~}= & {} \Big ( \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}+ \psi {\varvec{B}}_{\!\textrm{u}}\Big )^{\!\textrm{T}}\,{\varvec{C}}\,\Big ( \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}+ \psi {\varvec{B}}_{\!\textrm{u}}\Big ) \end{aligned}$$
(64)
$$\begin{aligned}= & {} \Big ( {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}\varvec{\Psi }^{\textrm{T}}{\varvec{C}} \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}+ {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}\varvec{\Psi }^{\textrm{T}}\psi {\varvec{C}} {\varvec{B}}_{\!\textrm{u}}^{~} \nonumber \\{} & {} \quad + {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\psi {\varvec{C}} \varvec{\Psi }{\varvec{N}}_{\!\textrm{u}}^{~} + \psi ^2 {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}^{~}\Big ). \end{aligned}$$
(65)

The above equation can be also expressed in a matrix form as

$$\begin{aligned} {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\textrm{a}}^{~}= & {} \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \cdot \underbrace{ \begin{bmatrix} \varvec{\Psi }^{\textrm{T}}{\varvec{C}} \varvec{\Psi } &{} \psi \varvec{\Psi }^{\textrm{T}}{\varvec{C}} \\ \psi {\varvec{C}} \varvec{\Psi } &{} \psi ^2 {\varvec{C}} \end{bmatrix} }_{\textstyle \varvec{D}^{\textrm{aa}} } \cdot \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix}, \end{aligned}$$
(66)

where \( \varvec{D}^{\textrm{aa}} \in {\mathbb {R}}^{5\times 5}\) contains all discontinuous properties associated with \({\varvec{K}}_\textrm{aa}^\textrm{c}\) in a compact form. Since \({\varvec{C}}\) is symmetric, \((\psi {\varvec{C}}\varvec{\Psi })^{\textrm{T}}= \psi \varvec{\Psi }^{\textrm{T}}{\varvec{C}}\), and the matrix \( \varvec{D}^{\textrm{aa}} \) is also symmetric

$$\begin{aligned} \varvec{D}^{\textrm{aa}} = \begin{bmatrix} \varvec{\Psi }^{\textrm{T}}{\varvec{C}} \varvec{\Psi } &{} \psi ({\varvec{C}} \varvec{\Psi })^{\textrm{T}}\\ \psi {\varvec{C}} \varvec{\Psi } &{} \psi ^2 {\varvec{C}} \end{bmatrix}. \end{aligned}$$
(67)

Using the same idea, the following two equations redefine the mixed terms associated with \({\varvec{K}}_\textrm{ua}^\textrm{c}\) and \({\varvec{K}}_\textrm{au}^\textrm{c}\):

$$\begin{aligned} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\textrm{a}}^{~}= & {} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\,{\varvec{C}}\,\Big ( \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}+ \psi {\varvec{B}}_{\!\textrm{u}}\Big )\nonumber \\= & {} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} \varvec{\Psi } {\varvec{N}}_{\!\textrm{u}}^{~} + \psi {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}^{~} ~=~ {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\underbrace{ \begin{bmatrix} {\varvec{C}} \varvec{\Psi }&\psi {\varvec{C}} \end{bmatrix} }_{\textstyle \varvec{D}^{\textrm{ua}} } \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix}, \end{aligned}$$
(68)
$$\begin{aligned} {\varvec{B}}_{\textrm{a}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}^{~}= & {} \Big ( {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}\varvec{\Psi }^{\textrm{T}}+ \psi {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\Big ) \,{\varvec{C}}\, {\varvec{B}}_{\!\textrm{u}}\nonumber \\= & {} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}\varvec{\Psi }^{\textrm{T}}{\varvec{C}} \, {\varvec{B}}_{\!\textrm{u}}+ \psi {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\,{\varvec{C}}\, {\varvec{B}}_{\!\textrm{u}}^{~} ~=~ \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \underbrace{ \begin{bmatrix} \varvec{\Psi }^{\textrm{T}}{\varvec{C}} \\ \psi {\varvec{C}} \end{bmatrix} }_{\textstyle \varvec{D}^{\textrm{au}} } {\varvec{B}}_{\!\textrm{u}}. \end{aligned}$$
(69)

Finally, the definition is also applied to \({\varvec{K}}_\textrm{uu}^\textrm{c}\), where due to \({\varvec{C}}\) being the only discontinuous term, \( \varvec{D}^{\textrm{uu}} ={\varvec{C}}\) applies

$$\begin{aligned} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}{\varvec{C}} {\varvec{B}}_{\!\textrm{u}}^{~} = {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}} \varvec{D}^{\textrm{uu}} {\varvec{B}}_{\!\textrm{u}}^{~}. \end{aligned}$$
(70)

Collecting all matrices containing the discontinuous terms in Eqs. (67)–(70), the set \(\mathbb {D}\) is defined, which is, in the remainder of this section, associated with the enriched \( {\varvec{K}}^{c} \) of Eq. (46):

$$\begin{aligned} \mathbb {D}= \{ \varvec{D}^{\textrm{uu}} ,~ \varvec{D}^{\textrm{ua}} ,~ \varvec{D}^{\textrm{au}} ,~ \varvec{D}^{\textrm{aa}} \}. \end{aligned}$$
(71)

5.2.2 Boolean operations

Let us now combine the formulation from the previous sub-section with the Boolean approach. All discontinuous terms in \(\mathbb {D}\) are composed by individually continuous parts, such that

$$\begin{aligned} \mathbb {D}= {\left\{ \begin{array}{ll} \mathbb {D}_1 ~~~\text {for}~~{\varvec{x}} \in \Omega _1\\ \mathbb {D}_2 ~~~\text {for}~~{\varvec{x}} \in \Omega _2\\ \end{array}\right. }\!\!, \end{aligned}$$
(72)

where

$$\begin{aligned} \mathbb {D}_i = \{ \varvec{D}^\textrm{uu}_{i} ,~ \varvec{D}^\textrm{ua}_{i} ,~ \varvec{D}^\textrm{au}_{i} ,~ \varvec{D}^\textrm{aa}_{i} \}. \end{aligned}$$
(73)

The above expression only requires evaluating the matrices \({\varvec{C}}_i\) and the scalars \(\psi _i\) and \(\partial \psi _i / \partial x_m\), for \(i=1,2\) and \(m=1,2\), where the latter ones constitute \(\varvec{\Psi }_i\). Using this formulation, Eqs. (53) and (54) can be reformulated as

$$\begin{aligned} {\mathcal {L}}[i,j]:~~ {\left\{ \begin{array}{ll} {\varvec{K}}_\textrm{uu}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ( \varvec{D}^\textrm{uu}_{i} - \varvec{D}^\textrm{uu}_{j} \bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{ua}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ( \varvec{D}^\textrm{ua}_{i} - \varvec{D}^\textrm{ua}_{j} \bigg ) \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix} \,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{au}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \bigg ( \varvec{D}^\textrm{au}_{i} - \varvec{D}^\textrm{au}_{j} \bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{aa}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \bigg ( \varvec{D}^\textrm{aa}_{i} - \varvec{D}^\textrm{aa}_{j} \bigg ) \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix} \,\textrm{d}{\varvec{x}}\end{array}\right. }, \end{aligned}$$
(74)

and

$$\begin{aligned} {\mathcal {L}}[j]:~~ {\left\{ \begin{array}{ll} {\varvec{K}}_\textrm{uu}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ( \varvec{D}^{\textrm{uu}} - \varvec{D}^\textrm{uu}_{j} \bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{ua}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\bigg ( \varvec{D}^{\textrm{ua}} - \varvec{D}^\textrm{ua}_{j} \bigg ) \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix} \,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{au}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \bigg ( \varvec{D}^{\textrm{au}} - \varvec{D}^\textrm{au}_{j} \bigg ) {\varvec{B}}_{\!\textrm{u}}\,\textrm{d}{\varvec{x}}\\ {\varvec{K}}_\textrm{aa}^\textrm{c}\!\!&{}=~ \displaystyle \int \limits _{ \omega ^\textrm{B} _k} \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}^{\textrm{T}}&{} {\varvec{B}}_{\!\textrm{u}}^{\textrm{T}}\end{bmatrix} \bigg ( \varvec{D}^{\textrm{aa}} - \varvec{D}^\textrm{aa}_{j} \bigg ) \begin{bmatrix} {\varvec{N}}_{\!\textrm{u}}\\ {\varvec{B}}_{\!\textrm{u}}\end{bmatrix} \,\textrm{d}{\varvec{x}}\end{array}\right. }. \end{aligned}$$
(75)

The application of the same approach to the enriched mass matrix \( {\varvec{M}}^{c} \) and body load vector \( {\varvec{F}}^{c} \) is presented in Appendices A.2 and A.3, respectively.

Recall that computing \({\varvec{K}}_\textrm{aa}^\textrm{c}\) in Eq. (53) involves evaluating the matrices \({\varvec{B}}_{\textrm{a}1}\) and \({\varvec{B}}_{\textrm{a}2}\), which are in turn used to determine the terms \({\varvec{B}}_{\textrm{a}1}^{\textrm{T}}{\varvec{C}}_1^{~}{\varvec{B}}_{\textrm{a}1}^{~}\) and \({\varvec{B}}_{\textrm{a}2}^{\textrm{T}}{\varvec{C}}_2^{~}{\varvec{B}}_{\textrm{a}2}^{~}\) as well as their difference (cf. end of Sect. 5.1). In the more compact version presented by Eq. (74), the matrices \({\varvec{B}}_{\textrm{a}1}\) and \({\varvec{B}}_{\textrm{a}2}\) are not computed explicitly and the Boolean operation is performed on significantly smaller matrices using \( \varvec{D}^\textrm{aa}_{1} \) and \( \varvec{D}^\textrm{aa}_{2} \). Thus, while the intuitive approach is more straightforward in its implementation, the more compact approach presented in this section generally leads to a decreased numerical effort.

6 Numerical examples

6.1 Circular plate with inclusion

In this section, a benchmark problem with a circular inclusion \(\Omega _1\) embedded into a circular plate \(\Omega _2\) is considered [58, 59]. Along the outer boundary of the plate, radial displacement boundary conditions are applied

$$\begin{aligned} u_\textrm{r}(r)= & {} {\left\{ \begin{array}{ll} \left[ \left( 1-\dfrac{b^2}{a^2}\right) \beta +\dfrac{b^2}{a^2}\right] r &{}0\le r \le a\\ \left( r-\dfrac{b^2}{r}\right) \beta + \dfrac{b^2}{r} &{}a\le r \le b \end{array}\right. }, \end{aligned}$$
(76)
$$\begin{aligned} u_\varphi= & {} 0, \end{aligned}$$
(77)

where a and b are the radii of the inclusion and embedding plate, respectively. The parameter \(\beta \) is determined by a and b, together with the Lamé constants of the inclusion \(\{r_1, \mu _1\}\) and the matrix \(\{r_2, \mu _2\}\)

$$\begin{aligned} \beta = \dfrac{(r_1 + \mu _1 + \mu _2)b^2 }{ (r_2 + \mu _2)a^2 + (r_1+\mu _1)(b^2-a^2)+\mu _2b^2 }. \end{aligned}$$
(78)

Instead of simulating the entire domain, a quadratic domain with a side length of c is considered with appropriate non-homogeneous Dirichlet boundary conditions (Fig. 14a). Regarding the geometry and material properties, the following parameters are used: \(a=3\,\textrm{mm}\), \(c=8\,{\textrm{mm}}\), \(b=15\,\textrm{mm}\), \(E_1=10{,}000\,{\text {MPa}}\), \(\nu _1=0.3\), \(E_2=0.1E_1\) and \(\nu _2=0.27\). Furthermore, a plane strain state is assumed. The analytical reference strain energy for the simulated domain is \(1/2\,{\mathcal {B}}({\varvec{u}}_{\textrm{ref}},{\varvec{u}}_{\textrm{ref}})=1.109766574913341\times 10^6\). For simplicity, the quadratic domain is discretized by a single finite cell and spectral shape functions with polynomial degrees from \(p=1\) to \(p=8\) are tested. For \(\psi \) in Eq. (41), quadratic shape functions are used, which are sufficient for approximating the level-set function of the circle. For each step of the p-refinement, the QTD is performed with \( {\mathcal {R}} =p+2\) and \((p+10)^2\) integration points per sub-cell are usedFootnote 3.

Fig. 14
figure 14

Circular plate with circular inclusion

When using the B-FCM approach, the simulation accuracy is maintained when compared to the standard FCM, resulting in basically identical convergence of the relative error in the energy norm

$$\begin{aligned} e = \sqrt{\dfrac{|{\mathcal {B}}({\varvec{u}}_\textrm{ref},{\varvec{u}}_\textrm{ref}) -{\mathcal {B}}({\varvec{u}},{\varvec{u}})|}{{\mathcal {B}}({\varvec{u}}_\textrm{ref},{\varvec{u}}_\textrm{ref})}} \cdot 100\%\, \end{aligned}$$
(79)

as depicted in Fig. 15a. Here, the B-FCM versions 1 and 2 refer to the different versions of the method introduced in Sects. 5.1 and 5.2, respectively. Additionally, Fig. 15a also depicts the severely deteriorated convergence curve of the case when no enrichment is used. Furthermore, the accuracy of the simulation is also demonstrated in Fig. 15b, where local values are evaluated for \(p=8\) along the cut line A–A’, indicated in Fig 14b. The red curve depicts the radial displacements, in which the sharp kink at the material interface is well captured, while the blue curve depicts the non-oscillatory strain energy density \(\psi =1/2\,\varvec{\sigma }:\varvec{\varepsilon }\).

Fig. 15
figure 15

Global and local results

Thus, it can be stated that the B-FCM achieves very accurate results, while requiring significantly less integration points and computational time compared to the standard FCM. Figure 16a compares the wall-clock times spent on the cut cells in an absolute, while Fig. 16b in a relative manner

Fig. 16
figure 16

Reduction of integration points and computational time when using the B-FCM

$$\begin{aligned} r_\textrm{t} = \left( 1-\dfrac{t_\mathrm {B\text {-}FCM}}{t_\textrm{FCM}} \right) \cdot 100\%. \end{aligned}$$
(80)

Additionally, the reduction of integration points is also depicted, which is fairly constant for the given example within a typical refinement range of \( {\mathcal {R}} =3...10\): \(r_\textrm{IP}=70{-}76\%\). The reduction of computational time \(r_\textrm{t}\) starts at about 30%, however with increasing p and \( {\mathcal {R}} \), it reaches values of \(r_\textrm{t} \approx 60\%\) for the B-FCM 1st version and \(r_\textrm{t} \approx 76\%\) for the B-FCM 2nd version. The reason for the larger difference between \(r_\textrm{IP}\) and \(r_\textrm{t}\) is due to the fact, that for low values of p and \( {\mathcal {R}} \), the integration time of \( {\varvec{K}}^{c} \) accounts for a relatively smaller chunk of the overall computational time spent on the cut cell. For higher values of p and \( {\mathcal {R}} \), the numerical integration is more costly, and the effect of reducing the integration points is more prominent. The additional time reduction by the blue curve is due to the more efficient formulation of the matrix operations in case of the 2nd version when compared to the 1st one. Note however, that despite these differences, both versions of the B-FCM (i) operate on the same number of integration points, (ii) reduce the computational time by a significant amount, while (iii) yielding the same accuracy as the standard FCM.

6.2 Cube with spherical inclusion

Fig. 17
figure 17

Simulation of a 3D inclusion problem with a single finite cell

Next, a 3D test is conducted involving a cube (\(\Omega _2\)) of side length \(a=4\) m and a spherical inclusion (\(\Omega _1\)) with a radius of \(R=2\) m, as depicted in Fig. 17a. The problem is formulated using the method of manufactured solutions (MoMS) [60, 61], i.e., a displacement field \({\varvec{u}}^*\) is given, for which the strong form of linear elastostaticsFootnote 4 yields the corresponding body loads \({\varvec{b}} = -\textrm{div}(\varvec{\sigma })\). These body loads, together with the appropriate boundary conditions are then given as input for the FCM simulation and the resulting \({\varvec{u}}\) is compared to \({\varvec{u}}^*\). Using this approach, the code functionality can be tested based on an analytical reference solution, and no overkill FEM solution is required. For the given example, a radial displacement field \({\varvec{u}}^*= [u_\textrm{r}^*,\,u_\varphi ^*,\,u_\theta ^*]\) is chosen in spherical coordinates

$$\begin{aligned} u_\textrm{r}^*(r)= & {} c^*(r) \dfrac{1}{1600} \left( r^5-4r^3\right) , \end{aligned}$$
(81)
$$\begin{aligned} u_\varphi ^*= & {} 0, \end{aligned}$$
(82)
$$\begin{aligned} u_\theta ^*= & {} 0, \end{aligned}$$
(83)

where

$$\begin{aligned} c^*(r) = {\left\{ \begin{array}{ll} 1 ~~~\forall r < R\\ c ~~~\forall r > R \end{array}\right. }. \end{aligned}$$
(84)
Fig. 18
figure 18

Global results and local field values along the cut line indicated in Fig. 17a

Note that for \(u_\textrm{r}^*(r=R) = 0\) and for any \(c\ne 1\), the manufactured displacement field exhibits a kink at the interface (Fig. 18b). In the current example, \(c=0.01\) is chosen and the deformed shape of the simulation domain is depicted in Fig. 17b. For the material properties, \(E_1 = 0.1\) Pa, \(E_2=10\) Pa and \(\nu _1 = \nu _2 = 0.3\) are chosen. The body loads, expressed in a spherical coordinate system, read

$$\begin{aligned} b_{\textrm{r}1}= & {} -\dfrac{ E_1 r (\nu _1-1) (7r^2-10)}{400(2\nu _1^2+\nu _1-1)}, \end{aligned}$$
(85)
$$\begin{aligned} b_{\textrm{r}2}= & {} -\dfrac{c E_2 r (\nu _2-1) (7r^2-10)}{400(2\nu _2^2+\nu _2-1)}, \end{aligned}$$
(86)

for the inclusion and matrix, respectively. Due to our specific choice of c, \(E_1 = cE_2\), and thus, \(b_{\textrm{r}1}=b_{\textrm{r}2}\). Consequently, tractions are continuous along the interface and jump conditions are naturally fulfilled (see Fig. 18d). In this special case, when following the MoMS approach, no weak boundary conditions along the interface are required and the problem complexity is kept at the necessary level.Footnote 5 The body load vectors for the B-FCM are given in Eqs. (100) and (101). Finally, the analytically evaluated reference strain energy for the manufactured solution reads

Fig. 19
figure 19

Numerical efforts required for problem given in Fig. 17a using the FCM and B-FCM approaches

Fig. 20
figure 20

Problem setup for an acoustic meta-material discretized by finite cells. All dimensions are given in [m]

$$\begin{aligned} \dfrac{1}{2}{\mathcal {B}}({\varvec{u}}^*,{\varvec{u}}^*) = 9.664790469963024 \cdot 10^{-2}\,\textrm{J}. \end{aligned}$$
(87)

For the current example, the simulation domain is discretized by a single finite cell only and the polynomial degrees \(p=1...6\) are tested. Furthermore, a constant \( {\mathcal {R}} = 8\) is chosen for all polynomial degrees and \((p+10)^3\) integration points are used per sub-cell. The global simulation accuracy measured by the relative error in the energy norm, is depicted Fig. 18a, where similar to the 2D case, the B-FCM approach yields the same convergence curve for the current 3D problem as the FCM. Furthermore, for the B-FCM simulation with \(p=6\), Fig. 18b–d depict local quantities of the solution, such as the radial displacement, strain and stress fields along the cut line B–B’ indicated in Fig. 17a. For all cases, the analytical reference solutions are also shown, demonstrating the high accuracy of B-FCM, while using a single finite cell only.

Analogous to Fig. 16 of the previous example, Fig. 19 depicts the absolute computational times as well as the reduction of those (\(r_\textrm{t}\)) and of the integration points (\(r_\textrm{IP}\)). Due to the constant refinement level, the reduction of integration points is basically constant, \(r_\textrm{IP} \approx 80\%\). However, since (i) generating \( {\varvec{K}}^{c} \) in 3D is computationally more intensive, and additionally, (ii) \({\varvec{F}}_\textrm{body}^c\) also has to be computed, the difference between the presented B-FCM versions is more pronounced. For the 2nd version (blue curve), \(r_\textrm{t}\) is about 70% for all values of p, while for the 1st version (red curve), the unnecessary matrix operations in \( {\varvec{K}}^{c} \) lead to additional computational overhead for higher values of p, rendering the method less effective. Nonetheless, even in this case, 50–70% of the computational time is saved.

6.3 Acoustic meta-material

Finally, the proposed multi-material B-FCM approach is applied to the analysis of an acoustic meta-material placed on a metal plate, where the meta-material consists of a foam matrix and several inclusions (Fig. 20). The simulation of the surrounding acoustic field is omitted at this point for simplicity, and the focus is kept on the vibrating structure. For testing the proposed integration scheme, a harmonic analysis is conducted on the structure using the material properties given in Table 1.

Table 1 Material properties for the plate with meta-material depicted in Fig. 20
Table 2 Material properties for the plate with meta-material depicted in Fig. 20
Fig. 21
figure 21

Dynamic response of the system to a mono-frequent harmonic excitation with an excitation frequency of \(f=2710\,\)Hz. The domain is discretized by 150 unfitted cells with Boolean integration approach. The dashed lines indicate the positions of the embedded inclusions

The simulation domain is discretized by \(5 \times 30\) finite cells, among which 28 are cut by the embedded material interfaces (yellow cells). The plate is subjected to a harmonic excitation along its bottom edge

$$\begin{aligned} p(t) = {\hat{p}}\, \textrm{e}^{\textrm{i}\Omega t}, \end{aligned}$$
(88)

where \({\hat{p}}\) is the pressure amplitude, \(\textrm{i}\) the imaginary unit and \(\Omega = 2\pi f\) the angular excitation frequency. The system answer \(\hat{{\varvec{U}}}\) is computed in the frequency domain by

$$\begin{aligned} (-\Omega ^2 {\varvec{M}}+\textrm{i}\Omega {\varvec{D}} + {\varvec{K}})\hat{{\varvec{U}}} = \hat{{\varvec{F}}}, \end{aligned}$$
(89)

where a stiffness proportional damping is used

$$\begin{aligned} {\varvec{D}} = \dfrac{\eta {\varvec{K}}}{\Omega }. \end{aligned}$$
(90)

Note that since the damping factor \(\eta \) is also yet another discontinuous material property (Table 1), Eq. (90), cannot be applied directly to generate the global stiffness matrix \({\varvec{K}}\). Instead, it is realized on the sub-cell level

$$\begin{aligned} {\varvec{D}}^{c} = \dfrac{1}{\Omega } \sum \limits _{k = 1}^{n_{\textrm{sc}}} \sum \limits _{i = 1}^{n_\textrm{d}^k} \eta _i {\varvec{K}}^{c} _{k,i}, \end{aligned}$$
(91)

where \( {\varvec{K}}^{c} _{k,i}\) is the contribution to the stiffness matrix \( {\varvec{K}}^{c} \) over \(\Omega _i^k \subset \omega ^\textrm{B} _k\), i.e., the ith material domain in the kth sub-cell, and \(\eta _i\) is the damping factor in that material region. Furthermore, \(n_\textrm{d}^k\) is the number of sub-domains in \( \omega ^\textrm{B} _k\). Note that Eq. (91) holds both for the FCM and B-FCM approaches, i.e., regardless of how \( {\varvec{K}}^{c} \) is computed.

Table 2 compares the FCM and B-FCM approaches in terms of the number of sub-cells (SC) and integration points (IP) generated in the cut cells, as well as the computation times required for creating the local integration mesh (LIM), the cut cell procedure, assembly, and solver. In both cases, \(p=5\) and \( {\mathcal {R}} = 5\) is used with \((p+10)^2\) integration points in each sub-cell. In the last row, the reductions of the different values are computed. Similar to the previous examples, a high reduction of integration points is obtained, \(r_\textrm{IP}=74.10\%\). While creating the LIM requires additional time in the B-FCM, its cost is negligible to the time spent on numerical integration. Thus, the overall time spent on the cut cells, that includes other miscellaneous tasks besides creating the LIM and integration, is reduced by 65%. Since the cut cells represent the computationally most intensive part of the assembly procedure, the assembly time is reduced by a similar amount. The deformed shape of the vibrating meta-material computed with the B-FCM is depicted in Fig. 21.

7 Conclusion

In this contribution, the B-FCM formulation for porous media (Sect. 1.3) is extended to multi-material problems for efficient simulation of complex structures with material interfaces in the FCM framework. The numerical integration in the proposed B-FCM approach is based on a quadtree-/octree-decomposition (QTD/OTD) of the cut cells (Sect. 3.1), as it is often done in the FCM. However, in the B-FCM implementation, sub-cells are equipped with special labels (Sect. 3.2), whose purpose is twofold:

  1. 1.

    They steer the decomposition, such that it generally results in an overlapping structure of integration domains (Figs. 6 and 10), leading to significantly less sub-cells and integration points.

  2. 2.

    The labels hold specific information regarding the form of the integrand over the individual sub-cells, such that Boolean operations can be used to successively compute the integral value over the overlapping sub-cells.

In our implementation, the \(C^0\)-continuous displacement field along the material interfaces is captured by a local enrichment approach. The multi-material B-FCM requires certain changes to the integrand such that the Boolean nature of the sub-cells can be exploited. While these changes are straightforward for discontinuities in the material properties, further steps are needed for discontinuities caused by the chosen enrichment function, as derived in Eqs. (58)–(61).

Numerical examples are conducted both in 2D and 3D, and the multi-material B-FCM concept is applied to the computation of stiffness and mass matrices as well as to the body load vector. The results show that compared to the conventional QTD/OTD-based FCM, its Boolean version requires up to 80% less integration points for reasonable refinement levels. Furthermore, despite a significant reduction in the computational effort, the global and local accuracy of the simulation is not altered. These statements apply to both presented B-FCM formulations in this paper. While the 1st version enables a more intuitive understanding of the integration over the Boolean sub-cells (Sect. 5.1), the 2nd version (Sect. 5.2) is based on a more efficient separation of continuous and discontinuous terms and thus, reduces the number of redundant matrix multiplications. For simpler problems, the difference in the two approaches is less prominent, as they reduce the time spent on the cut cells by \(\sim \)55–65% and \(\sim \)55–75%, respectively (Fig. 16). However, for problems with larger cell matrices, e.g., in case of 3D examples or when using high polynomial orders, the 2nd version is superior, leading to \(\sim \)70% time reduction, while the 1st version achieves roughly 50%.

In conclusion, while the implementation of the B-FCM requires slight modification of the decomposition scheme and integrands over the sub-cells, it reduces the computational effort of the QTD/OTD-based integration schemes by a significant amount, while enjoying the same level of robustness in combination with no loss in accuracy. If the simplest implementation of the B-FCM is required (e.g., for testing purposes), we recommend its 1st version, and if the maximum efficiency is desired, its 2nd version should be exploited.