Domain decomposition

In this section the domain decomposition algorithm implemented in CalculiX is explained in more detail, taking interface loading as example (cf. Section 6.11.3; the main routine is interfaceloading.c). It runs as follows:

  1. (only for interface loading; subroutine calcglobmastsurf.f) Determine the external faces of the volumetric mesh of the structure. These faces constitute the master surface.

  2. (subroutine triangucont_load.f) Triangulate each face of the master surface by appropriately connecting its nodes. For instance, for a 8-noded face the triangulation can be performed as in Figure (184). The number of triangles is stored in ncont, and the topology of triangle i in field koncont(1...4,i): the first three entries are the node numbers belonging to the triangle in clockwise order when looking out of the body, koncont(4,i) contains the master face the triangle belongs to in the form 10*elem+localface, where nelem is the master element number and localface is the local face number as explained e.g. under the keyword *DLOAD.

    Figure 184: Examplary decomposition of a 8-noded face into triangles
    \begin{figure}\begin{center}
\epsfig{file=domcom1.eps,width=8cm}\end{center}\end{figure}

  3. (trianeighbor.f) Catalogue the edges of the triangulation and neighboring information of each triangle using the fields ipe, ime and imastop as explained in the previous section.

  4. (catmastnodes.f) Catalogue the master nodes in imastnodes in ascending order (cf previous section).

  5. (updatecontpen_load.f) For each triangle, store the coordinates of its center of gravity in field cg (3,*) and the coefficients of the plane's equation through each of its edges and bisecting the normal on the triangle and the normal on the triangle adjacent to the edge in straight(1...12,*) (4 coefficients per plane). Store the coefficients of the triangle's plane in straight(13...16,*) (4 coefficients)

  6. For each slave face (mastintpoints.f):

    1. Calculate a mean normal $ \boldsymbol{n}$ satisfying:

      $\displaystyle \boldsymbol{n} = \frac{\sum_{i=1}^{n_s} \boldsymbol{n}_i }{\Vert \sum_{i=1}^{n_s} \boldsymbol{n}_i \Vert},$ (946)

      and its center of gravity

      $\displaystyle \boldsymbol{x}_{\text{cg}} = \frac{\sum_{i=1}^{n_s} \boldsymbol{x}_i}{n_s},$ (947)

      leading to its mean slave plane satisfying:

      $\displaystyle \boldsymbol{n} \cdot (\boldsymbol{x} - \boldsymbol{x}_{\text{cg}})=0.$ (948)

      $ n_s$ is the number of nodes belonging to the slave face, $ \boldsymbol{x}_i$ the spatial coordinates of the nodes and $ \boldsymbol{n}_i$ the local normal in the nodes in the spatial configuration. Notice that a slave face does not have to be plane.

    2. Identify for the nodes of the slave face opposite master faces. To this end identify for each node (the coordinates of which are slightly moved towards the slave face's center of gravity to avoid numerical difficulties for slave faces positioned exactly on one opposite master face) the master triangle the center of gravity of which is closest to the slave node (using the nearest neighbor algorithm of Section 10.15. The triangle is considered to be valid if $ \boldsymbol{n} \cdot \boldsymbol{n}_t < -0.7$ ( $ \boldsymbol{n}_t$ is the triangle's normal; slave and master face should have normals in opposite directions). If valid, store its parent master face to in field maface(i), i=1,...,nmaface.

      Figure 185: Clipping the slave face with the triangles of a triangulated master face
      \begin{figure}\epsfig{file=domcom2.eps,width=12cm}\end{figure}

    3. For each master face $ m^l$ on the stack (cf Figure 185):

      1. Subdivide the face into convex polygons such that the edges of the polygons are a subset of the edges of the master triangulation. The dashed line in Figure 185, for instance, is an edge of the master triangulation but is not needed to create the subdivision of the master face in convex polygons.

      2. For each convex master polygon (e.g. the dashed triangle in Figure 185):

        1. Apply the Sutherland-Hodgman algorithm [103] to clip the slave face by the polygon after projecting both on the mean slave plane. The field pvertex(1..3,i), i=1,..,nvertex, which contains at the start of the Sutherland-Hodgman algorithm the projected coordinates of the slave face, contains at the end the projected coordinates of the vertices of the clipped slave face.

        2. Determine the edges of the polygon the neighboring master faces of which deserve further attention (the so-called active edges). They are stored in iactiveline(1..2,i),i=1,...,nactiveline. The entry iactiveline(1,i) contains the edge number from field ime, iactiveline(2,i) contains the parent master face of the triangle to which the edge belongs and which has already been treated.

        3. Subdivide the clipped slave face (the doubly dashed triangle in Figure 185) into triangles and determine the local master coordinates of their vertices by projecting back onto the master face (using the finite element containment algorithm in Section 10.15). This point here is specific for interface loading. For contact calculations the projection is done on the slave surface, not on the master surface (routine treatmasterface.f).

        4. Determine the local coordinates of the integration points within each clipped slave face triangle using a 7-point integration scheme. Determine the local coordinates of these integrations points within the master face by using the local master coordinates of the triangle's vertices. The corresponding formula amounts to:

          $\displaystyle \xi_{\text{ip,glob}} = \xi_1 \xi_ {\text{ip,loc}} + \xi_2 \eta _ {\text{ip,loc}} + \xi_3 (1 - \xi _ {\text{ip,loc}} - \eta_ {\text{ip,loc}}),$ (949)

          where $ (\xi_ {\text{ip,loc}}, \eta_ {\text{ip,loc}})$ are the local coordinates of the integration point within the clipped slave face triangle ( $ 0 \le \xi_ {\text{ip,loc}}, \eta_
{\text{ip,loc}} \le 1$) and $ 0 \le \xi_ {\text{ip,loc}}+\eta_
{\text{ip,loc}} \le 1$), $ (\xi_1,\xi_2,\xi_3)$ are the local coordinates of the vertices of the clipped polygon triangle within the master face and $ (\xi_{\text{ip,glob}}, \eta_{\text{ip,glob}})$ are the local coordinates of the integration point within the master face. For each integration point, increment the integration point counter nintpoint by one, store its local coordinates within the master face and the weight in pmastload(1..3,nintpoint), store the slave face (10*element+local face) into imastload(1,nintpoint) and a pointer to any previous interface loading for this master face in imastload(2,nintpoint). If an interface loading iload already exists for the master face at stake, set nelemload(2,iload)=nintpoint, if not, create such loading. An interfaceloading is characterized by a label sideload(iload) starting with 'I'.

          The other way around, an interface loading i is characterized by sideload(i)(1:1)='I'. The master face with this loading is determined by the elenent number nelemload(1) and a local face number sideload(i)(2:2). The first integration point for this loading is at location j=nelemload(2) in fields imastload and pmastload yielding the local coordinates pmastload(1..2,j), the weight pmastload(3,j), the slave face imastload(1,j) and a pointer to the next integration point imastload(2,j), and so on until imastload(2,k)=0 for some k. The slave face is important, since the interface loading defined by the user on this slave face specifies the size of the loading and the load amplitude, if applicable.

    4. Mark the master face as treated by storing it in field icovered(i),i=1,...,ncovered in the form 10*element+local face number (this field is sorted in ascending order for searching purposes).

    5. Analyze the master faces adjacent to the active edges in the same way. Keep track of the active edges deactivating them as soon as all adjacent master faces were covered and activating new ones as needed. Continue until no master faces are left which can possibly have an intersection with the slave face

One notices from the above discussion that the Sutherland-Hodgman algorithm is an important element in the overall algorithm. It clips a slave face (face a-b-c-d-e-f-g-h in Figure 185) by a convex master polygon (e.g. polygon 1-2-3 in Figure 185). The viewing angle in the figure is from outside onto the slave face, therefore the slave face is numbered counterclockwise, while the master polygon is numbered clockwise. The clipping is done taking one master polygon edge at a time, starting e.g. by edge 1-2. If the edge is active, it is deactivated, since an edge can belong to at most two master faces. Now, the edge is extended indefinitely (dot-dashed line in Figure 185) and the state of each slave surface edge w.r.t. this line is verified. The following cases arise:

  1. The edge is not cut and lies on the side of the master polygon (edge d-e) in the Figure: the downstream vertex (vertex e) is included in the clipped slave face description.

  2. The edge is cut such that the downstream vertex lies outside of the master polygon (edge e-f): the intersection point (A) is determined and included into the clipped slave face description. If the master polygon edge (1-2) was not deactivated it is activated.

  3. The edge is cut such that the upstream vertex lies outside the master polygon (edge c-d): the intersection point (B) and the downstream vertex (d) are both included into the clipped slave face description. If the master polygon edge (1-2) was not deactivated it is activated.

  4. The edge is not cut and lies outside the master polygon: no vertex is included into the clipped slave face description. If the master polygon edge (1-2) was not deactivated it is activated.

After all master polygon edges have been treated, a check is performed whether at least 3 vertices belong to the clipped master face. If not, all master polygon edges are deactivated.