Hypergraph grammar based
linear computational cost solver
for three dimensional grids with point singularities
Piotr Gurgul
1, Anna Paszy´
nska
2, and Maciej Paszy´
nski
31 AGH University of Science and Technology, Krakow, Poland [email protected]
2 Jagiellonian University, Krakow, Poland [email protected]
3 AGH University of Science and Technology, Krakow, Poland [email protected]
Abstract
In this paper we present a hypergraph grammar based multi-frontal solver for three dimensional grids with point singularities. We show experimentally that the computational cost of the resulting solver algorithm is linear with respect to the number of degrees of freedom. We also propose a reutilization algorithm that enables to reuse LU factorizations over unrefined parts of the mesh when new local refinements are executed by the hypergraph grammar productions.
Keywords: hypergraph grammar, direct solver, reuitlization,hadaptivity
1
Introduction
Adaptive grids are widely used in computational community [10, 3, 2], with strong theoretical background developed [4] for h adaptive algorithms delivering algebraic convergence as well as hp adaptive algorithms delivering exponential convergence rates of the numerical accuracy with respect to the mesh size. Multi-frontal solver is the state of the art algorithm for solving systems of linear equations generated by finite element computations [5, 6, 7].
The multi-frontal solver executed on a uniform computational grid delivers computational cost of the order of O(N2) for three dimensional grids [5, 6, 7]. In this paper we show that for a special class of grids, namely the adaptive grids, it is possible not only to reduce the computational cost to the linear one in case of point singularities, but also to employ the reutilization technique that will allow to keep this linear cost for the entire sequence of refined grids. We also show that for other kind of singularities, like edge singularity, this reduction of computational cost leads down toO(N1.5).
Volume 29, 2014, Pages 1078–1089
ICCS 2014. 14th International Conference on Computational Science
1078 Selection and peer-review under responsibility of the Scientific Programme Committee of ICCS 2014
The usage of the graph grammars for modeling both the mesh refinement process and multi-frontal solver algorithm has been already proven for the case of CP-graph grammars in the case of two dimensional tetrahedral and rectangular grids [14, 13, 15, 16], three dimensional hexahedral grids [11, 12] and for multi-frontal solver algorithms [18, 19].
Hypergraphs and hypergraph grammar were originally introduced by [8, 9] and redefined for modeling of two dimensional mesh transformations [20].
The graph grammars allows for expressing the mesh generation and adaptation algorithms as well as the solver algorithms by a sequence of simple tasks called the graph grammar pro-ductions. Having such the sequence we can analyse the dependency relation between them and possibly derive the parallel version of the solver algorithm. This however will be our fu-ture work, and in this paper we focus just on expression of the sequential reutilization solver algorithm by graph grammar producions.
In this paper we present a hypergraph grammar based multi-frontal solver dedicated for three dimensional grids with hexahedral elements refined towards point singularities.
Following the idea presented in [17], we also present how to introduce the reutilization technique in the graph grammar model in order to reduce the computational cost of the solver algorithm executed over a sequence of gridshrefined towards a point singularity.
2
Hypergraph grammar for modeling the multi-frontal
di-rect solver algorithm with the reutilization technique
The multi-frontal solver algorithm has been already expressed by means of CP-graph grammar productions for the case of two dimensional rectangular elements [19] as well as three dimen-sional tetrahedral elements [18]. In this paper we generalize these concepts to hypergraph grammars.We start with generation of a uniform eight elements mesh, which is expressed by production
(P init)as it is presented in Figure 1. In this example we assume that the left top corner of the mesh constitutes the point singularity.
The first graph grammar productions are responsible for generation of the frontal element matrices. This is done by productions (P agreg init) responsible for generation of matrix entries associated with interior node, (P agreg boundary)and(P agreg face)responsible for generation of matrix entries associated with boundary and interior faces,(P agreg edge)
and (P agreg vertex) responsible for generation of matrix entries associated with element edges and vertices. These graph grammar productions are illustrated in Figure 3.
Having the frontal matrix assembled, it is possible now to start elimination of the fully assembled nodes. We can eliminate interior node, which is denoted by production(P elim int)
presented in Figure 4, we can also eliminate boundary faces, which is denoted by production
(P elim face)as well as boundary edges and vertices, compare productions (P elim edge)
and(P elim vertex)in Figure 4.
Having the adjacent elements frontal matrices with eliminated interior and boundary nodes, we can now merge the frontal matrices into one matrix and eliminate full assembled nodes from the common face. It is expressed by productions (P merge eliminate) illustrated in Figure 5. This procedure of merging of frontal matrices and eliminating fully assembled nodes located on common faces is repeated until all the nodes are eliminated in the mesh. For uniform three dimensional grids the multi-frontal solver algorithm has computational cost of the order ofO(N2).
take advantage of the multi-level structure of the computational grid in the following way. We start with the grid presented in Figure 1. We execute the multi-frontal solver algorithm for all the elements, except the element located close to the point singularity.
We execute the graph grammar productions (P agreg init)- (P agreg boundary)- (P agreg face) - (P agreg edge) - (P agreg vertex) creating the element frontal matrices for all elements from the top level. Next, we execute productions (P elim int) - (P elim boundary) - (P elim edge) - (P elim vertex) for all the elements from the top level. Finally, we merge frontal matrices, by executing productions (P merge eliminate)as many times as we end up with the interface of the top level with respect to the next level, as it is presented in Figure 7. We store the Schur complement matrix associated with the interface.
At this point, we can aggregate the frontal matrix associated with the element close to the point singularity, by executing productions(P agreg init)- (P agreg boundary)- (P agreg face) - (P agreg edge) - (P agreg vertex). Next, we can merge the element frontal matrix with the Schur complement matrix, by executing the new production bf (P merge with Schur). We have a fully assembled matrix and we can solve the problem close the singularity.
If more accuracy of the solution is required, we can break the element close to the singularity, by executing the production(P break singularity)presented in Figure 6, preserving the Schur complement close to the broken element.
At this point, we can start solution of the problem over the newly refined elements by
executing the following chain of productions: (P agreg init)- (P agreg boundary)- (P agreg face) - (P agreg edge) - (P agreg vertex)generating the element frontal matrices and productions(P elim int) - (P elim boundary) - (P elim edge) - (P elim vertex), together with(P merge with Schur)reutilizing the Schur complement matrix for the interface with other part of the mesh. In other words, we do not need to recompute the LU factorizations over unrefined parts of the mesh.
The resulting elimination tree for the multi-frontal solver algorithm will have a structure as it is presented on the left panel in Figure 8. The solver algorithm expressed by graph grammar productions presented in the previous section actually computes the frontal matrix that contains Schur complement of the level with respect to the interface.
When we refine the central level of the mesh, we can reuse the Schur complement matrix, and restart the solver just for the central, already refined levels, as it is presented in the right panel in Figure 8. In other words, when we solve the problem many times, over a sequence of the gridhrefined towards point singularity, we can reuse all the LU factorizations already computed in the previous step for the unrefined parts of the mesh.
The resulting computational cost in comparison to MUMPS state of the art solver [1] is presented in Figure 9. The example depicts simple heat transfer problem over the cube shape domain. To sum up, we show that for the reutilization algorithm, the cost of processing new refinements is constant.
3
Extension to more complex grids
Let us consider the mesh with mixed point and edge singularities, as presented in Figure 10. Such the mesh can be obtained from h adaptive algorithm executed for the Fichera model problem, where the internal corners and dirichlet boundary conditions generate singularities along the three internal edges. In such the case the reutilization procedure is still possible however it is necessary to construct layers along all the three edges, and the size of the layers is actually growing, since the refinements are also generated in the directions perpendicular to the edges. In such the case we recover theO(N1.5) computational complexity of the reutilization algorithm, compare Figure 11.
4
Conclusions
In this paper we presented the hypergraph grammar model for the multi-frontal direct solver executed over three dimensional computational grids refined towards the point singularities. We showed how to implement the reutilization technique within the graph grammar model in order to significantly reduce the computational cost of the multi-frontal solver algorithm. The
paper was summarized by the numerical experiments concerning the reutilization technique for the heat transfer problem over the model cube domainhrefined towards point singularity.
AcknowledgementsThe work of MP and AP has been supported by Polish National Science Center grant no. 2012/06/M/ST1/00363. The work of PG has been supported by Polish National Science Center grant no. 2011/03/N/ST6/01397.
References
[1] P.R. Amestoy, I.S. Duff, and J.-Y. L’Excellent. Mumps multifrontal massively parallel solver version 3.7, 2013.
[2] Liu D. Bao G., Hu G. Anh-adaptive finite element solver for the calculations of the electronic structures. Journal of Computational Physics, 231(14):4967–4979, 2012.
[3] Tabbar M. Belytschko T.h-adaptive finite element methods for dynamic problems, with emphasis on localization. International Journal for Numerical Methods in Engineering, 36(24):4245–4625, 1993.
[4] Pardo D. Paszy´nski M. Rachowicz W. Zdunek A. Demkowicz L., Kurtz J. Computing with hp-Adaptive Finite Elements, Vol. II. Frontiers: Three Dimensional Elliptic and Maxwell Problems with Applications. Chapman & Hall / CRC Applied Mathematics & Nonlinear Science, 2007. [5] Reid K. Duff I.S. The multifrontal solution of indefinite sparse symmetric linear systems. ACM
Transactions on Mathematical Software.
[6] Reid K. Duff I.S. The multifrontal solution of unsymmetric sets of linear systems. SIAM Journal on Scientific and Statistical Computing.
Figure 5: The productions for merging two frontal matrices and elimination of fully assembled nodes from common face
[7] P. Geng and T. J. Oden. A parallel multifrontal algorithm and its implementation. Computer Methods in Applied Mechanics and Engineering, 149:289–301, 2006.
[8] A. Habel and H.J. Kreowski. May we introduce to you: Hyperedge replacement. Lecture Notes in Computer Science, 291:5–26, 1987.
[9] A. Habel and H.J. Kreowski. Some structural aspects of hypergraph languages generated by hyperedge replacement. Lecture Notes in Computer Science, 247:207–219, 1987.
Figure 6: The hypergraph grammar derivation of gird with point singularity
Elliptic and Maxwell Problems. Chapman & Hall / CRC Applied Mathematics & Nonlinear Science, 2007.
[11] A. Paszynska, E. Grabska, and M. Paszynski. A graph grammar model of the hp adaptive three dimensional finite element method. part I. Fundamenta Informaticae, 114(2):149–182, 2012. [12] A. Paszynska, E. Grabska, and M. Paszynski. A graph grammar model of the hp adaptive three
Figure 7: The interface between layers
[13] A. Paszynska, M. Paszynski, and A. Grabska. Graph transformations for modeling hp-adaptive finite element method with triangular elements.Lecture Notes in Computer Science, 5103:604–613, 2008.
[14] A. Paszynska, M. Paszynski, and E. Grabska. Graph transformations for modeling hp-adaptive finite element method with mixed triangular and rectangular elements.Lecture Notes in Computer Science, 5545:875–884, 2009.
[15] M Paszynski. On the parallelization of self-adaptive hp-finite element methods part I. composite programmable graph grammarmodel. Fundamenta Informaticae, 93(4):411–434, 2009.
[16] M Paszynski. On the parallelization of self-adaptive hp-finite element methods part II. partitioning communication agglomeration mapping (pcam) analysis. Fundamenta Informaticae, 93(4):435– 457, 2009.
[17] M. Paszynski, D. Pardo, and V. Calo. A direct solver with reutilization of lu factorizations for h-adaptive finite element grids with point singularities.Computers & Mathematics with Applications, 65(8):1140–1151, 2013.
[18] M. Paszy´nski, D. Pardo, and A. Paszy´nska. Parallel multi-frontal solver for p adaptive finite element modeling of multi-physics computational problems. Journal of Computational Science, 1:48–54, 2010.
[19] M. Paszynski and R. Schaefer. Graph grammar-driven parallel partial differential equation solver. Concurrency and Computation: Practice and Experience, 22(9):1063–1097, 2010.
Figure 8: Reutilization of partial LU factorizations over unrefined parts of the mesh
Figure 9: The comparison of execution time of the solver with reutilization and the MUMPS solver
Figure 10: The mixed single point and three edge singularities
[20] G. ´Slusarczyk and A. Paszy´nska. Hypergraph grammars in hp-adaptive finite element method.
Figure 11: The reutilization procedure executed for mixed point and edges singularities for the Fichera problem