# The transfer of boundary conditions on an orthogonal hexahedral mesh

In the simulation of physical processes and phenomena overall there is a problem of numerical solutions of differential problems in partial derivatives. One of the methods for numerical solutions of mathematical physics equations is the approach, based on the finite difference approximation. However, the major drawback of this method is the need to use orthogonal hexahedral mesh. While solving problems in practice, sometimes a complex geometric configuration of the computational domain (for example, see Figure 1) is used, and therefore, the drawback, mentioned above, is enough critical. # Picture 1 – The example of a complex surface as a part of the computational domain

Due to the aforesaid, there is quite a natural problem of the geometrical configuration approximation of computational domain by cell faces of the given orthogonal hexahedral mesh.

Let us turn to a more detailed problem statement. Let the computational mesh in 3D space be orthogonal and hexahedral. Namely, let be a set of mesh divisions along axis arranged in ascending order, similar to it let us introduce the ordered sets of mesh divisions along  and  respectively. According to designations, the following set of points is the set nodes of computational mesh . Geometric configuration that requires approximation by mesh faces, is defined by triangulated surface. Let be a set of triangles. This set is a part of surface triangulation, and its quantity is .With the numerical solution of mathematical physics problem, besides geometric approximation of surface by faces of mesh cells there is a problem of adequate transfer of triangulated surface area on cells faces, involved in its approximation. Thus, by means of set of triangles it is necessary to determine the set of faces of mesh cells, that approximate the triangulated surface, and match the transferred area with each of such face.

Let us give the algorithm, which solves the set above problem

1) Let us consider the mesh, which is dual to the initial one, i.e. such a mesh the nodes of which are cells centers of the initial computational mesh. Let us store a 3D array of real numbers, elements of which correspond to the cells of dual mesh. First of all we initialize elements of array by zeros.

2) The following operations we carry out for all .

• For each triangle from the set of find the set of cells of the dual mesh, which have nondegenerate intersection with it.

• For each cell from the set of we define the polygon area, cut off by cell from the triangle . We add the computed area to the element of array, that corresponds to the given cell.

• Let us consider 2 neighbouring by face cells of the dual mesh, that have a nonempty intersection with the triangle . Within each of the 2 considered cells there is one node of the initial computational mesh. Let us mark the edge, connecting these 2 nodes.

3) After processing of all triangles from the set we consider the set for those cells faces of the initial computational mesh, all 4 edges of which are marked. The set of faces from approximate the initial triangulated surface.

4) Let us transfer on the faces of the set the area of the initial triangulated surface. There are some methods for area transfer. In this article we will consider the following method:

a. For each cell of the dual mesh we find the set of faces from the set of faces, at least only 1 vertex of which is inside cell.

b. The area, which is stored in the element of array, corresponding to cell, we distribute in equal shares between faces from the set .

The example of the operation of the algorithm in application to the surface, shown on Picture 1, is presented on Picture 2. # Picture 2 – The example of the operation of the algorithm

It is necessary to mention, that this algorithm like any other algorithm of the computational geometry, operating with floating-point numbers, uses -arithmetic, and it affects the accuracy of the obtained results (for example, the value of the transferred areas). Also we can mention that in the problems of computational geometry we have to consider separately some particular cases, and sometimes the processing of these cases is no less harder than the processing of the common case.
The given algorithm is not an exception as well. While implementing this algorithm on PC it is necessary to process some cases separately. This situation occurs when the edge of the dual mesh gets into -neighbourhood of the triangulated computational surface, otherwise, following item 2 of the algorithm, the so-called «holes» may occur in the transferred surface.

The described algorithm solves a common problem and may be modified when solving particular problems, such as:

• surface approximation of the anthropogenic constructions by faces of the orthogonal hexahedral mesh;

• surface approximation of the plate by faces of the orthogonal hexahedral mesh when solving problems of plane-parallel deformation by means of finite-difference method;

• approximation of the geological surface layout by faces of the orthogonal hexahedral mesh;