Abstract
In this work we propose an original implementation of a large family of lowest-order methods for diffusive problems including standard and hybrid finite volume methods, mimetic finite difference-type schemes, and cell centered Galerkin methods. The key idea is to regard the method at hand as a (Petrov–)Galerkin scheme based on possibly incomplete, broken affine spaces defined from a gradient reconstruction and a point value. The resulting unified framework serves as a basis for the development of a FreeFEM-like domain specific language targeted at defining discrete linear and bilinear forms. Both the back-end and the front-end of the language are extensively discussed, and several examples of applications are provided. The overhead of the language is evaluated with respect to a more traditional implementation. A benchmark including the comparison with more classical finite element methods on standard meshes is also proposed.
Similar content being viewed by others
References
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(5), 1700–1716 (1998)
Aavatsmark, I., Eigestad, G.T., Mallison, B.T., Nordbotten, J.M.: A compact multipoint flux approximation method with improved robustness. Numer. Methods Partial Differ. Equ. 24, 1329–1360 (2008)
Agélas, L., Di Pietro, D.A., Droniou, J.: The G method for heterogeneous anisotropic diffusion on general meshes. Modél. Math. Anal. Numér. 44, 597–625 (2010)
Agélas, L., Di Pietro, D.A., Eymard, R., Masson, R.: An abstract analysis framework for nonconforming approximations of diffusion problems on general meshes. Int. J. Finite Vol. 7(1), 1–29 (2010)
Arnold, D.N.: An interior penalty finite element method with discontinuous elements. SIAM J. Numer. Anal. 19, 742–760 (1982)
Bassi, F., Botti, L., Colombo, A., Di Pietro, D.A., Tesini, P.: On the flexibility of agglomeration based physical space discontinuous Galerkin discretizations. J. Comput. Phys. 231(1–2), 45–65 (2012)
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. Models Methods Appl. Sci. 15, 1533–1553 (2005)
Burman, E., Stamm, B.: Minimal stabilization for discontinuous Galerkin finite element methods for hyperbolic problems. Commun. Comput. Phys. 5, 498–524 (2009)
Ciarlet, P.G.: Basic error estimates for elliptic problems. In: Ciarlet, P.G., Lions, J.-L. (eds.) Finite Element Methods. Handbook of Numerical Analysis, vol. II. North-Holland, Amsterdam (1991). Chap. 2
Di Pietro, D.A.: Cell-centered Galerkin methods. C. R. Math. Acad. Sci. Paris 348, 31–34 (2010)
Di Pietro, D.A.: A compact cell-centered Galerkin method with subgrid stabilization. C. R. Acad. Sci. Paris, Ser. I 348(1–2), 93–98 (2011)
Di Pietro, D.A.: Cell centered Galerkin methods for diffusive problems. Modél. Math. Anal. Numér. 46(1), 111–144 (2012)
Di Pietro, D.A., Ern, A.: Mathematical Aspects of Discontinuous Galerkin Methods. Mathématiques & Applications, vol. 69. Springer, Berlin (2011)
Di Pietro, D.A., Ern, A.: Analysis of a discontinuous Galerkin method for heterogeneous diffusion problems with low-regularity solutions. Numer. Methods Partial Differ. Equ. 28(4), 1161–1177 (2012)
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, vol. VI, pp. 3–19. Springer, Berlin (2011)
Droniou, J., Eymard, R.: A mixed finite volume scheme for anisotropic diffusion problems on any grid. Numer. Math. 105(1), 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(2), 265–295 (2010)
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)
Ern, A., Guermond, J.-L.: Theory and Practice of Finite Elements. Applied Mathematical Sciences, vol. 159. Springer, New York (2004)
Eymard, R., Gallouët, T., 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)
Eymard, R., Henry, G., Herbin, R., Hubert, F., Klöfkorn, R., Manzini, G.: 3D benchmark on discretization schemes for anisotropic diffusion problems on general grids. In: Fořt, J., Fürst, J., Halama, J., Herbin, R., Hubert, F. (eds.) Finite Volumes for Complex Applications. Problems & Perspectives, vol. VI, pp. 95–130. Springer, Berlin (2011)
Geuzaine, C., Remacle, J.-F.: Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. Int. J. Numer. Methods Eng. 79(11), 1309–1331 (2009)
Grospellier, G., Lelandais, B.: The Arcane development framework. In: Proceedings of the 8th Workshop on Parallel/High-performance Object-Oriented Scientific Computing, POOSC’09, pp. 4:1–4:11. ACM, New York (2009)
Hansbo, P., Larson, M.G.: Discontinuous Galerkin and the Crouzeix–Raviart element: application to elasticity. Modél. Math. Anal. Numér. 37(1), 63–72 (2003)
Hecht, F., Pironneau, O.: FreeFEM++ manual. Laboratoire Jacques Louis Lions (2005)
Herbin, R., Hubert, F.: Benchmark on discretization schemes for anisotropic diffusion problems on general grids. In: Finite Volumes for Complex Applications, vol. V, pp. 659–692. Wiley, New York (2008)
Logg, A., Mardal, K.-A., Wells, G.N.: Automated Solution of Differential Equations by the Finite Element Method. Lecture Notes in Computational Science and Engineering, vol. 84. Springer, Berlin (2012)
Long, K., Kirby, R., van Bloemen Waanders, B.: Unified embedded parallel finite element computations via software-based Fréchet differentiation. SIAM J. Sci. Comput. 32, 3323–3351 (2010)
Niebler, E.: boost::proto documentation (2011). http://www.boost.org/doc/libs/1_47_0/doc/html/proto.html
Prud’homme, C.: A domain specific embedded language in C++ for automatic differentiation, projection, integration and variational formulations. Sci. Program. 14(2), 81–110 (2006)
Prud’Homme, C., Chabannes, V., Doyeux, V., Ismail, M., Samake, A., Pena, G.: Feel++: a computational framework for Galerkin methods and advanced numerical methods. Accepted in ESAIM Proc., http://hal.archives-ouvertes.fr/hal-00662868, January 2012
Prud’homme, C., Chabannes, V., Pena, G., Veys, S.: Feel++: finite element embedded language in C++. Free software available at http://www.feelpp.org. Contributions from A. Samake, V. Doyeux, M. Ismail
ISO: Information technology—Syntactic metalanguage—Extended BNF. ISO Standard: ISO/IEC 14977:1996
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Hans Petter Langtangen.
Rights and permissions
About this article
Cite this article
Di Pietro, D.A., Gratien, JM. & Prud’homme, C. A domain-specific embedded language in C++ for lowest-order discretizations of diffusive problems on general meshes. Bit Numer Math 53, 111–152 (2013). https://doi.org/10.1007/s10543-012-0403-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10543-012-0403-3
Keywords
- Domain specific embedded language
- Finite volume methods
- Cell centered Galerkin methods
- Petrov–Galerkin methods