WIP: Implementation of a grid reader interface
I have implemented a proposal for the grid-reader interface (see issue #23) , using a CRTP abstract base class implementation, i.e. concrete file readers have to implement at least (2) of
template <class... Args> // (1)
static std::unique_ptr<Grid> readImp(const std::string &filename, Args&&... args);
template <class... Args> // (2)
static void readFactoryImp(GridFactory<Grid> &factory, const std::string &filename, Args&&... args);
The static method (1) redirects to (2) in its default implementation by creating a GridFactory
internally. The additional arguments are here just for illustrational purposes. They are forwarded to the concrete implementation.
Several readers are adopted to this interface, i.e. gmshreader
, starcdreader
, amirameshreader
, dgfparser
(a new reader classes is added), albertareader
. The amirareader could not yet be tested, due to lack of a the amira-code.
A small test is added that currently just calls the two read
methods for the grid implementations UGGrid
and AlbertaGrid
for dim=dimworld=3
. Therefore it was necessary to provide mesh-files that can be read by all the tested readers, i.e. simplicial-meshes in dimension 3.