Skip to content

Separate MeshGraph input/output functions into a new class

Ted Stokes requested to merge TedStokes/nektar:feature/meshgraph-io into master

Issue/feature addressed

Once created, it shouldn't matter which file format a MeshGraph instance was loaded from. However because the format specific subclasses inherit from MeshGraph, it isn't trivial to read from an XML then write to an HDF5 file.

Proposed solution

Extract MeshGraph's input/output functions and put them in a new base class MeshGraphIO which has a subclass for each file format, so that MeshGraph is agnostic to the file format it is read from or written to.

Implementation

The MeshGraph class has had its IO functions trimmed out, and instead of MeshGraphXml, MeshGraphXmlCOmpressed and MeshGraphHDF5 there is MeshGraphIOXml, MeshGraphIOXmlCompressed and MeshGraphIOHDF5, which inherit from MeshGraphIO. A MeshGraph is now read by calling MeshGraph**IO**[format]::Read.

Tests

Suggested reviewers

@dmoxey

Notes

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Spencer Sherwin

Merge request reports