We have implemented tetrahedral anisotropic mesh adaptation using the local operations of coarsening, swapping, refinement and smoothing in MATLAB without the use of any for-N loops, i.e. the script is fully vectorised. In the process of doing so, we have made three observations related to details of the implementation: 1. restricting refinement to a single edge split per element not only simplifies the code, it also improves mesh quality, 2. face to edge swapping is unnecessary, and 3. optimising for the Vassilevski functional tends to give a little higher value for the mean condition number functional than optimising for the condition number functional directly. These observations have been made for a uniform and a radial shock metric field, both starting from a structured mesh in a cube. Finally, we compare two coarsening techniques and demonstrate the importance of applying smoothing in the mesh adaptation loop. The results pertain to a unit cube geometry, but we also show the effect of corners and edges by applying the implementation in a spherical geometry. Program summaryProgram title: trullekrul v0.1.0Catalogue identifier: AEZC_v1_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AEZC_v1_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: New style BSD licenseNo. of lines in distributed program, including test data, etc.: 8395No. of bytes in distributed program, including test data, etc.: 92021Distribution format: tar.gzProgramming language: MATLAB/GNU Octave.Computer: Single core desktops.Operating system: Linux/Windows/Mac.RAM: Variable, from megabytes to gigabytesClassification: 4.2, 4.3, 4.12, 4.14.Nature of problem: Adaptation of tetrahedral meshes to metric fields.Solution method: Local operations, colouring and APL vectorised code.Restrictions: Region IDs/internal boundaries are not supported and 3D adaptation with 1M elements requires ≈4GB memory.Unusual features: Vectorised script implementation, signed distance functions, selection of refinement and coarsening techniques.Running time: 2D problems solve in seconds, but 3D problems can take up to an hour without running out of memory.
Read full abstract