The one of the most important issues to define is the domain boundary. After determining the boundary ΓA by the initial constant nodes (lines 1-18 of the presented below algorithm), the next task is to determine which new nodes are lying on boundary line segments Γ (as it is visible in Fig. 4). These selection is done with a help of the following algorithm:
Fig. 4 presents the square domain divided into a set of new elements Ωi with corresponding set of line segments Γi being its boundary. A way of finding new nodes constitutes the main point of the mesh generation process (see Sec. 3.2) while a selection of nodes is perform according to the algorithm from Sec. 3.3 a) nodes a,b,c,d have been classified as boundary nodes whereas b) nodes e,f,g have been determined as internal nodes.