HArD::Core2D
Hybrid Arbitrary Degree::Core 2D  Library to implement 2D schemes with edge and cell polynomials as unknowns

HArD::Core (sources: https://github.com/jdroniou/HArDCore) provides a suite of C++ tools to implement numerical schemes whose unknowns are polynomials in the cells, on the edges, and on the faces. The focus is on dealing on generic polytopal meshes. This document addresses the 2D version of HArD::Core. The tools are similar in 2D and 3D, and we refer to the main page of documentation of the 3D version for a more thorough introduction to the library. We only present here the specific way of loading a 2D mesh structure (which differs from the 3D version), and a brief description of the schemes available in this 2D library.
Transferring a scheme's implementation from 3D to 2D or viceversa is very straightforward, provided that the scheme's mathematical definition does not depend on the dimension and that the generic types provided in basis.hpp
are used; see README file of the HArD::Core github depository https://github.com/jdroniou/HArDCore.
HArDCore2D currently reads meshes in the typ2
format designed for the FVCA5 Benchmark. A short documentation describing this format is provided in the typ2_meshes
directory (see README.pdf therein). Several meshes can also be found in this directory.
A mesh file must be read using an instance of the MeshReaderTyp2
class, and then built using MeshBuilder
. A working example is given below (assuming the executable will be in build/Schemes
for example).
Note: the typ2
format allows for meshes with very generic polygonal cells, including nonconvex cells. However, the builder assumes that each cell is starshaped with respect to the isobarycenter of its vertices – otherwise, the calculation of the center of mass may be incorrect. Similarly, the quadrature rules assume that each cell is starshaped with respect to its center of mass.
The following schemes are currently available in HArD::Core2D. The Hybrid HighOrder schemes follow the implementation principles described in Appendix B of the book available at https://hal.archivesouvertes.fr/hal02151813.
The directory runs
contains BASH to run series of tests on families of meshes. The files data.sh
describe the parameters of the test cases (polynomial degrees, boundary conditions, mesh families, etc.). The script produces results in the output
directory, including a pdf file rate.pdf
describing the rates of convergence in various energy norms.
To run the scripts as they are, you will need pdflatex
and (for the LEPNC and HMM schemes) a FORTRAN compiler (adjust the Makefile
to your compiler).