Abstract
Industrial simulation software has to manage: (1) the complexity of the underlying physical models, (2) the complexity of numerical methods used to solve the PDE systems, and finally (3) the complexity of the low-level computer science services required to have efficient software on modern hardware. Nowadays, some frameworks offer a number of advanced tools to deal with the complexity related to parallelism in a transparent way. However, high-level complexity related to discretization methods and physical models lacks tools to help physicists to develop complex applications. Generative programming and domain-specific languages (DSL) are key technologies allowing to write code with a high-level expressive language and take advantage of the efficiency of generated code for low-level services. Their application to scientific computing has been up to now limited to finite element (FE) methods and Galerkin methods, for which a unified mathematical framework has been existing for a long time (see projects like Freefem++, Getdp, Getfem++, Sundance, Feel++ Aavatsmark et al. (SIAM J. Sci. Comput., 19:1700–1716, 1998), Fenics project). In reservoir and basin modeling, lowest-order methods are promising methods allowing to handle general meshes. Extending finite volume (FV) methods, Aavatsmark, Barkve, Bøe, and Mannseth propose consistent schemes for nonorthogonal meshes while stability problems are solved with the mimetic finite difference method (MFD) and the mixed/hybrid finite volume methods (MHFV) (Aavatsmark et al. Discretization on non-orthogonal, curvilinear grids for multi-phase flow. In: Christie, M.A., Farmer, C.L., Guillon, O., Heinmann, Z.E. (eds.) Proceedings of the 4th European Conference on the Mathematics of Oil Recovery, Norway, 1994). However, the lack of a unified mathematical frame was a serious limit to the extension all of these methods to a large variety of problems. In Aavatsmark et al. (J. Comput. Phys., 127:2–14, 1996), the authors propose a unified way to express FV multipoint scheme and DFM/VFMH methods. This mathematical frame allows us to extend the DSL used for FE and Galerkin methods to lowest-order methods. We focus then on the capability of such language to allow the description and the resolution of various and complex problems with different lowest-order methods. We validate the design of the DSL that we have embedded in C++, on the implementation of several academic problems. We present some convergence results and compare the performance of their implementation with the DSEL to their hand-written counterpart.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Aavatsmark, I., Barkve, T., Bøe, Ø., Mannseth, T.: Discretization on non-orthogonal, curvilinear grids for multi-phase flow. In: Christie, M.A., Farmer, C.L., Guillon, O., Heinmann, Z.E. (eds.) Proceedings of the 4th European Conference on the Mathematics of Oil Recovery, Norway (1994)
Aavatsmark, I., Barkve, T., Bøe, Ø., Mannseth, T.: Discretization on non-orthogonal, quadrilateral grids for inhomogeneous, anisotropic media. J. Comput. Phys. 127, 2–14 (1996)
Aavatsmark, I., Barkve, T., Bøe, Ø., Mannseth, T.: Discretization on unstructured grids for inhomogeneous, anisotropic media, part I: derivation of the methods. SIAM J. Sci. Comput. 19, 1700–1716 (1998)
Aavatsmark, I., Barkve, T., Bøe, Ø., Mannseth, T.: Discretization on unstructured grids for inhomogeneous, anisotropic media, part II: discussion and numerical results. SIAM J. Sci. Comput. 19, 1717–1736 (1998)
Abrahams, D., Gurtovoy, I.: C++ template metaprogramming: concepts, tools, and techniques from Boost and beyond. In: C++ in Depth Series. Addison-Wesley Professional, Boston (2004)
Agélas, L., Di Pietro, D.A., Droniou, J.: The G method for heterogeneous anisotropic diffusion on general meshes. M2AN Math. Model. Numer. Anal. 44, 597–625 (2010)
Aubert, P., Di Césaré, N.: Expression templates and forward mode automatic differentiation. In: Corliss, G., Faure, C., Griewank, A., Hascoët, L., Naumann, U. (eds.) Computer and Information Science, pp. 311–315. Springer, New York (2001)
Brezzi, F., Lipnikov, K., Shashkov, M.: Convergence of mimetic finite difference methods for diffusion problems on polyhedral meshes. SIAM J. Numer. Anal. 45, 1872–1896 (2005)
Brezzi, F., Lipnikov, K., Simoncini, V.: A family of mimetic finite difference methods on polygonal and polyhedral meshes. Math. Mod. Meth. Appl. Sci. 15, 1533–1553 (2005)
Christie, M.A., Blunt, M.J.: Tenth SPE comparative solution project: a comparison of upscaling techniques. In: SPE Reservoir Simulation Symposium, Houston, TX, pp. 308–317 (2001)
Di Pietro, D.A.: Cell centered Galerkin methods. C. R. Acad. Sci. Paris Ser. I 348, 31–34 (2010)
Di Pietro, D.A.: Cell centered Galerkin methods for diffusive problems. ESAIM Math. Model. Numer. Anal. 46, 111–144 (2012)
Di Pietro, D.A.: A compact cell-centered Galerkin method with subgrid stabilization. C. R. Acad. Sci. Paris Ser. I 349 93–98 (2011)
Di Pietro, D.A., Gratien, J.-M.: Lowest order methods for diffusive problems on general meshes: a unified approach to definition and implementation. In: Fořt, J., Fürst, J., Halama, J., Herbin, R., Hubert, F. (eds.) Finite Volumes for Complex Applications VI: Problems and Perspectives, pp. 803–820. Springer, Heidelberg (2011)
Droniou, J., Eymard, R.: A mixed finite volume scheme for anisotropic diffusion problems on any grid. Num. Math. 105, 35–71 (2006)
Droniou, J., Eymard, R., Gallouët, T., Herbin, R.: A unified approach to mimetic finite difference, hybrid finite volume and mixed finite volume methods. Math. Models Methods Appl. Sci. 20, 265–295 (2010)
Edwards, M.G., Rogers, C.F.: A flux continuous scheme for the full tensor pressure equation. In: Christie, M.A., Farmer, C.L., Guillon, O., Heinmann, Z.E. (eds.) Proceedings of the 4th European Conference on the Mathematics of Oil Recovery, Norway (1994)
Edwards, M.G., Rogers, C.F.: Finite volume discretization with imposed flux continuity for the general tensor pressure equation. Comput. Geosci. 2, 259–290 (1998)
Eymard, R., Gallouët, Th., Herbin, R.: Discretization of heterogeneous and anisotropic diffusion problems on general nonconforming meshes SUSHI: a scheme using stabilization and hybrid interfaces. IMA J. Numer. Anal. 30, 1009–1043 (2010)
Grospellier, G., Lelandais, B.: The Arcane development framework. In: Proceedings of the 8th Workshop on Parallel/High-Performance Object-Oriented Scientific Computing, POOSC ’09, vol. 4. p. 11 (2009)
Prud’homme, C.: A domain specific embedded language in C++ for automatic differentiation, projection, integration and variational formulations. Sci. Program. 2, 81–110 (2006)
Prud’homme, C.: Life: overview of a unified C++ implementation of the finite and spectral element methods in 1D, 2D and 3D. In: Kågström, B., Elmroth, E., Dongarra, J.J., Waśniewski J. (eds.) Lecture Notes in Computer Science, vol. 4699, pp. 712–721. Springer, Heidelberg (2006)
Veldhuizen, T.: Using C++ template metaprograms. C++ Report 7, 36–43 (1995)
Web site for the 10th SPE Comparative Solution Project: www.spe.org/csp/ Accessed On Sep 2000
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer Science+Business Media New York
About this paper
Cite this paper
Gratien, JM. (2013). Implementing Lowest-Order Methods for Diffusive Problems with a DSEL. In: Ferreira, J., Barbeiro, S., Pena, G., Wheeler, M. (eds) Modelling and Simulation in Fluid Dynamics in Porous Media. Springer Proceedings in Mathematics & Statistics, vol 28. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-5055-9_10
Download citation
DOI: https://doi.org/10.1007/978-1-4614-5055-9_10
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-5054-2
Online ISBN: 978-1-4614-5055-9
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)