-
Notifications
You must be signed in to change notification settings - Fork 35
[spec] Introducing Semi Structured Meshes
The semi-structured meshes we will be working with are called 2+1 meshes.
2+1 meshes are a type of hybrid mesh, unstructured in the 2D plane but structured in the vertical direction. All the layers, even if they are unstructured, they have the same layout of their elements so that the vertical structure is maintained. These type of meshes have applications in numerical weather modelling and wherever thin meshes are needed such as in designing shells for example. A thin mesh is essentially a 3D mesh which has a significantly smaller thickness than its length or width. In numerical weather prediction, we can model the atmosphere with this type of mesh as it offers a good approximation of the atmosphere which is a few kilometres in height but thousands of kilometres across.
The main idea behind using these meshes is to provide a way of accessing the different layers directly, in a structured way and avoid in this way being penalized by the cost of indirect accesses.
Visiting all the elements of the mesh can be a very expensive operation but through this method we aim to bring down the number of indirect accesses which make the processing of the mesh very expensive. The only indirect accesses will be performed in the 2D layer and for each element in the 2D layer there will be a column of other elements which will then be accessed directly using an offset from the current element. The information related to the neighbours of certain elements will be assembled from the information returned at the 2D level and the number of the layer. We therefore suffer the penalty of the indirect accesses only once for each element of the 2D layer.
The assumption is the 2D plane will be split into triangles hence each element of the mesh will be a triangular truncated prism. In order to deal with this type of elements in the efficient way described above some changes to the PyOP2 current standards have to be made.
One of the main changes that have to be brought to PyOP2 is to extend the flat mesh model and allow for 2+1 meshes to be used. This means that the knowledge about the mesh has to be held by either the kernel, the parallel loops or the mesh definition. The current proposal is to make these new features part of the mesh definition and have minimal impact (if at all) on the other PyOP2 standards.
The sets will have to have extra parameters which will allow them to define the 2D layer as well as the vertical dimension of the mesh.
The maps have to be changed to be able to reference elements in the vertical direction as well. At every visit of the element in the 2D layer the visits to all the elements stacked on top of it have to be performed.
The aim is to make use of the recently implemented iteration spaces to perform the processing of the elements in the vertical direction.
To do this we need to change the way the maps are implemented. The idea is to have the normal mapping from one mesh element to the corresponding neighbouring mesh elements as well as a mapping to all the neighbouring elements in the vertical direction.