Skip to main content
Log in

A domain-specific embedded language in C++ for lowest-order discretizations of diffusive problems on general meshes

  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Listing 1
Figure 3
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9
Listing 10
Listing 11
Listing 12
Listing 13
Figure 4
Listing 14
Listing 15
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Listing 16

Similar content being viewed by others

References

  1. 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)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

    Article  MathSciNet  MATH  Google Scholar 

  3. 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)

    Article  MATH  Google Scholar 

  4. 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)

    MathSciNet  Google Scholar 

  5. Arnold, D.N.: An interior penalty finite element method with discontinuous elements. SIAM J. Numer. Anal. 19, 742–760 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  6. 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)

    Article  MathSciNet  MATH  Google Scholar 

  7. 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)

    Article  MathSciNet  Google Scholar 

  8. 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)

    Article  MathSciNet  MATH  Google Scholar 

  9. Burman, E., Stamm, B.: Minimal stabilization for discontinuous Galerkin finite element methods for hyperbolic problems. Commun. Comput. Phys. 5, 498–524 (2009)

    MathSciNet  Google Scholar 

  10. 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

    Google Scholar 

  11. Di Pietro, D.A.: Cell-centered Galerkin methods. C. R. Math. Acad. Sci. Paris 348, 31–34 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  12. 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)

    Article  Google Scholar 

  13. Di Pietro, D.A.: Cell centered Galerkin methods for diffusive problems. Modél. Math. Anal. Numér. 46(1), 111–144 (2012)

    Article  Google Scholar 

  14. Di Pietro, D.A., Ern, A.: Mathematical Aspects of Discontinuous Galerkin Methods. Mathématiques & Applications, vol. 69. Springer, Berlin (2011)

    Google Scholar 

  15. 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)

    Article  MATH  Google Scholar 

  16. 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)

    Google Scholar 

  17. Droniou, J., Eymard, R.: A mixed finite volume scheme for anisotropic diffusion problems on any grid. Numer. Math. 105(1), 35–71 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  18. 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)

    Article  MathSciNet  MATH  Google Scholar 

  19. 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)

    Article  MathSciNet  MATH  Google Scholar 

  20. Ern, A., Guermond, J.-L.: Theory and Practice of Finite Elements. Applied Mathematical Sciences, vol. 159. Springer, New York (2004)

    Book  MATH  Google Scholar 

  21. 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)

    Article  MathSciNet  MATH  Google Scholar 

  22. 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)

    Google Scholar 

  23. 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)

    Article  MathSciNet  MATH  Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Article  MathSciNet  MATH  Google Scholar 

  26. Hecht, F., Pironneau, O.: FreeFEM++ manual. Laboratoire Jacques Louis Lions (2005)

  27. 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)

    Google Scholar 

  28. 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)

    Book  MATH  Google Scholar 

  29. 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)

    Article  MathSciNet  MATH  Google Scholar 

  30. Niebler, E.: boost::proto documentation (2011). http://www.boost.org/doc/libs/1_47_0/doc/html/proto.html

  31. 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)

    Google Scholar 

  32. 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

  33. 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

  34. ISO: Information technology—Syntactic metalanguage—Extended BNF. ISO Standard: ISO/IEC 14977:1996

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniele A. Di Pietro.

Additional information

Communicated by Hans Petter Langtangen.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10543-012-0403-3

Keywords

Mathematics Subject Classification

Navigation