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;