how to solve a large sparse linear system arising in groundwater and cfd problems
DESCRIPTION
How to solve a large sparse linear system arising in groundwater and CFD problems J. Erhel, team Sage, INRIA, Rennes, France Joint work with A. Beaudoin (U. Le Havre) J.-R. de Dreuzy ( Geosciences Rennes) D. Nuentsa Wakam (team Sage) G. Pichot (U. Le Havre, soon team Sage) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/1.jpg)
How to solve a large sparse linear system
arising in groundwater and CFD problems
J. Erhel, team Sage, INRIA, Rennes, France
Joint work with A. Beaudoin (U. Le Havre)
J.-R. de Dreuzy (Geosciences Rennes)
D. Nuentsa Wakam (team Sage)
G. Pichot (U. Le Havre, soon team Sage)
B. Poirriez (team Sage)
D. Tromeur-Dervout (U. Lyon)
Financial support from ANR-CIS (MICAS project)
and from ANR-RNTL (LIBRAERO project)
![Page 2: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/2.jpg)
Ax=b
with A non singular and sparse
Bad idea: compute A-1 then x=A-1 b
Good idea: apply a direct or iterative solver
![Page 3: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/3.jpg)
First case
A symmetric positive definite (spd)
First example: flow in heterogeneous porous media
Second example: flow in 3D discrete fracture networks
Second case
A non symmetric
Example: Navier-Stokes with turbulence
![Page 4: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/4.jpg)
Numerical methodsGW_NUM
Random physical models
Porous MediaPARADIS
Solvers
PDE solversODE solversLinear solversParticle tracker
UtilitariesGW_UTIL
Input / OutputVisualizationResults structuresParameters structuresParallel and grid toolsGeometry
Open source libraries
Boost, FFTW, CGal, Hypre, Sundials, MPI, OpenGL, Xerces-C,…
UQ methods
Monte-Carlo
FractureNetworksMP_FRAC
Fractured-Porous Media
H2OLab software platform
![Page 5: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/5.jpg)
Optimization and Efficiency Use of free numerical libraries and own libraries Test and comparison of numerical methods Parallel computation (distributed and grid computing)
Genericity and modularity Object-oriented programming (C++) Encapsulated objects and interface definitions
Maintenance and use Intensive testing and collection of benchmark tests Documentation : user’s guide, developer’s guide Database of results and web portal
Collaborative development Advanced Server (Gforge) with control of version (SVN),… Integrated development environments (Visual, Eclipse) Cross-platform software (Cmake, Ctest) Software registration and future free distribution
H2OLab methodology
![Page 6: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/6.jpg)
First caseA symmetric positive definite (spd)
arising from an elliptic or parabolic problemFlow equations of a groundwater modelQ = - K*grad (h) in Ω div (Q) = 0 in Ω Boundary conditions on ∂Ω
Spatial discretization schemeFinite element method or finite volume method …Ax=b, with A spd and sparse
![Page 7: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/7.jpg)
2D Heterogeneous permeability fieldStochastic model Y = ln(K)with correlation function
2( ) expY YY
C
rr
31 Y
An example of domain and dataHeterogeneous porous mediaFi
xed
head
Fixe
d he
ad
Nul flux
Nul flux
![Page 8: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/8.jpg)
Numerical method for 2D heterogeneous porous medium
Finite Volume Method with a regular mesh
Large sparse structured matrix of order N with 5 entries per row
![Page 9: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/9.jpg)
First solver for A spd and ellipticDirect method based on Cholesy factorization
Cholesky factorizationA=LDLT with L lower triangular and D diagonalBased on elimination process
Fill-in in LL sparse but not as much as A
More memory and timeDue to fill-in
![Page 10: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/10.jpg)
Fill-in in Cholesy factorizationdepends on renumbering
Symmetric renumberingPT A P = LDLT with P permutation matrix
L full matrix L as sparse as A: no fill-in
![Page 11: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/11.jpg)
Analysis of fill-in with elimination treeMatrix graph and interpretation of eliminationj connected to i1,i2 and i3 in the graph
Elimination treeAll steps of elimination in Cholesky algorithm
![Page 12: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/12.jpg)
Sparse Cholesky factorization
Symbolic factorizationBuild the elimination tree
Reduction of fill-inRenumber the unknowns with matrix Pminimum degree algorithmNested dissection algorithm
Numerical factorizationBuild the matrices L and DSix variants of the nested three loopsTwo column-oriented variants: left-looking and right-lookingUse of BLAS3 thanks to a multifrontal or supernodal technique
![Page 13: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/13.jpg)
Sparse direct solver (here PSPASES) applied to heterogeneous porous
media
Theory : NZ(L) = O(N logN) Theory : Time = O(N1.5)
Fill-in CPU time
![Page 14: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/14.jpg)
Parallel Monte-Carlo results
• Cluster of nodes with a Myrinet network• Each node is one-core bi-processor, with 2Go memory• Monte-Carlo run of flow and transport simulations• Computational domain of size 1024x1024
1 2 3 4 5 60
1
2
3
4
5
6
7
speed-up
24 sim
50 sim
100 sim
200 sim
400 sim
![Page 15: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/15.jpg)
Software architecture for solving sparse linear solvers
![Page 16: How to solve a large sparse linear system arising in groundwater and CFD problems](https://reader034.vdocument.in/reader034/viewer/2022051219/56816637550346895dd9a3b5/html5/thumbnails/16.jpg)
GPREMS(m) combined with deflation