5.2.1 Template Cloning, Merging, and Splitting

Template cloning, merging, and splitting are three related algorithms for template management.

Figure 5.8: The template cloning operation

\begin{subfigure}
% latex2html id marker 9626
[b]{0.90\textwidth}
\centering
\...
...]{figures/template_cloning_1}
\caption{Initial templated mesh}
\end{subfigure}


\begin{subfigure}
% latex2html id marker 9632
[b]{0.90\textwidth}
\centering
\...
...twidth]{figures/template_cloning_2}
\caption{Template cloning}
\end{subfigure}

The template $ X_1$ (top picture) is cloned by copying the template mesh and assigning every instance to one of the new templates $ X_2$ and $ X_3$ (bottom picture).

Template cloning (cf. Figure 5.8) is a technique where a mesh template $ {\Gamma}_i$ is cloned into two identical mesh templates. Each transformation function of the original mesh template is assigned to exactly one cloned mesh template. Cloning a template increases the memory consumption of the templated structure, because the mesh of the template has to be duplicated. If SVB (cf. Section 4.5) is used, the corresponding book-keeping has to be copied as well. No additional memory is required for the transformation functions, because each transformation occurs exactly once in the input and the output structure.

Template merging is the inverse operation to template cloning. If two different mesh templates $ {\Gamma}_i$ and $ {\Gamma}_j$ in a templated mesh are identical, these mesh templates can be merged into one single mesh template. The transformation functions of the resulting mesh template are the transformation functions of both source mesh templates $ {\Gamma}_i$ and $ {\Gamma}_j$. As template merging is the inverse operation to template cloning, it reduces the memory consumption.

Figure 5.9: The template splitting operation

\begin{subfigure}
% latex2html id marker 9650
[b]{0.90\textwidth}
\centering
\...
...figures/template_splitting_1}
\caption{Initial templated mesh}
\end{subfigure}


\begin{subfigure}
% latex2html id marker 9656
[b]{0.90\textwidth}
\centering
\...
...th]{figures/template_splitting_2}
\caption{Template splitting}
\end{subfigure}

The template $ X_1$ is split into two parts based on the area highlighted in green (top picture). The transformation functions and region indicators for every instance are copied to both new mesh templates $ X_2$ and $ X_3$ (bottom picture). In particular, $ T_{2,1} = T_{3,1} = T_{1,1}$ and $ T_{2,2} = T_{3,2} = T_{1,2}$.

Template splitting (cf. Figure 5.9) splits a template $ {\Gamma}_i$ into two different disjunct templates using a mesh partition of $ {\Gamma}_i$. To ensure that the resulting structure geometry-conforms to the same geometry, the transformation functions of $ {\Gamma}_i$ are copied to all new mesh templates. When storing the templated mesh without SVB, splitting a mesh template slightly increases the memory requirement because some vertices have to stored in both new templates and the transformation functions are copied. On the other hand, with SVB, there is an additional memory increase because the global vertices array and the local-to-global mapping array will grow due to additional shared vertices between the two new templates.

Figure 5.10: Combination of template splitting and cloning

\begin{subfigure}
% latex2html id marker 9679
[b]{0.90\textwidth}
\centering
\...
...template_splitting_cloning_1}
\caption{Initial templated mesh}
\end{subfigure}


\begin{subfigure}
% latex2html id marker 9685
[b]{0.90\textwidth}
\centering
\...
...res/template_splitting_cloning_2}
\caption{Template splitting}
\end{subfigure}


\begin{subfigure}
% latex2html id marker 9691
[b]{0.90\textwidth}
\centering
\...
...gures/template_splitting_cloning_3}
\caption{Template cloning}
\end{subfigure}

First, a template splitting operation is performed to extract the area visualized in green (middle picture). Then, the template $ X_3$ in the middle templated mesh is cloned (bottom picture). For the resulting templated mesh on the bottom, any operation performed in the area highlighted in yellow is local in the structure instance (because it only affects template $ X_6$).

As mentioned above, mesh operations in $ {\operatorname{AT}}(\Gamma )$ are not necessarily local and might affect other areas in $ {\operatorname{AT}}(\Gamma )$. If an operation is mandatory or highly beneficial in a certain area $ A$, but at the same time harmful to other areas, a combination of template splitting and cloning can be applied. At first, the mesh template is split into two templates, where the instance of one template covers $ A$.
Next, the template covering $ A$ is cloned into two templates, where one template only has the transformation function leading to the instance which covers $ A$. All other transformation functions are copied to the other new template. For the resulting templated mesh $ \Omega $, the operation is local in $ {\operatorname{AT}}(\Omega )$ and no other ares of $ {\operatorname{AT}}(\Omega )$ are affected. However, the resulting templated mesh $ \Omega $ requires more memory, because one template is stored twice. This process is visualized in Figure 5.10.

florian 2016-11-21