# Multi-Material Topology Optimization Taking into Account the Position of Material Interfaces in 3D
## 3 Methods
### Optimization Method  
The optimization loop begins with remeshing the current geometry, which is parameterized with the RCLSM [11] and thus by two level set functions on the level set mesh (LS-mesh). The remeshing method uses a copy of the LS-mesh as a starting point. The tetrahedra of the copied mesh are split based on the cases of the marching tetrahedra method and the respective material IDs are assigned using the two level set functions. The resulting mesh is then improved using the following four iterative phases [31]:  
* split all edges with \(l_{e}>l_{e_{max}}\)
* collapse edges \(l_{e}<l_{e_{min}}\)  
Figure 2: The combination of the values of the two level set functions \(\varphi_{1}(\mathbf{x})\) (gray) and \(\varphi_{2}(\mathbf{x})\) (blue) represents the multi-material system in the design domain D. The interface of the two materials is referred to as \(\Gamma\)[15].  
* swap edges of elements with \(q<q_{min}\)
* smooth all vertices  
First, all edges with a length \(l_{e}\) greater than the maximum length \(l_{e_{max}}\) are split and all edges with a length \(l_{e}\) less than the minimum length \(l_{e_{min}}\) are collapsed. Then edge swaps are performed for all tetrahedra with an element quality \(q\) less than the minimum element quality \(q_{min}\) followed by a hierarchical smoothing of the vertices [31].  
To complete the remeshing method, the last remaining tetrahedra with low quality are eliminated.  
The resulting mesh (FE mesh) is then used to determine the system response and calculate the sensitivities using linear FE. The design variables (normal velocities) are updated by the MMA optimization algorithm [8; 32] using the computed sensitivities.  
In the next step, the normal velocities are extrapolated into the entire design domain using a two-stage explicit velocity extension method [15]. In the first step of the velocity extension method, the surface (\(\varphi(\mathbf{x})=0\)) is sampled and the normal velocities at the sample points are evaluated using linear interpolation. The second step is the actual extrapolation. For this purpose, the projection on the surface mesh sampled in the first step is identified for each point on the LS mesh. The normal velocity value is determined at the identified point using linear interpolation and assigned to the original node of the LS-mesh.  
Following the extrapolation of the normal velocities, these are smoothed using the Helmholtz Equation (10). The filter step stabilizes the optimization process. The Helmholtz equation used is solved using FEM and is [33]:  
\[-r_{f}^{2}\
abla^{2}\hat{v}^{n}+\hat{v}^{n}=v^{n}. \tag{10}\]  
\(\hat{v}^{n}\) is the filtered normal velocity field and \(r_{f}\) a filter parameter that describes the size of the filter mask [33].  
The two level set functions are then developed in the filtered normal velocity fields using (7) and possible overlaps are eliminated using the mbo operator (9).  
Finally, the SDF property of the level set functions is restored using an explicit re-distancing method. The redistancing method begins with the discretization of the level set function using the marching tetrahedra method. The closest point on the discretized surface is then identified for each node of the LS-mesh and thereafter the distance between the two points is determined. This distance is assigned to the original point as the SDF value. In addition, the sign is identified using fast-winding-number [34].