Skip to content

Fix FieldConvert range option for hdf5 input files

Margarida Moragues Ginard requested to merge fix/FC_Hdf5_Range into master

Issue/feature addressed

The FieldConvert range option didn't work for hdf5 input files. For example, when doing:

FieldConvert -f -r -x1,x2,-y1,y2 -e <input_mesh_file>.xml <input_field_data>.fld <output_field_data>.vtu

The output vtu file didn't show the expected reduction on the domain range.

Proposed solution

The same functionality already available for xml input files was added for hdf5 input files.

Implementation

Added the CheckRange() method around the element shapes that read in MeshGraphHDF5::ReadCcomposite() which only adds a shape if it is within the region specfiied by the -r option and processed in the CheckRange method.

Tests

Added a test to include a case with an hdf5 input.

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

Warning

On the 19.07 the code formatting (code style) was standardised using clang-format, over the whole Nektar++ code. This means changes in your branch will conflict with formatting changes on the master branch. To resolve these conflicts , see #295 (closed)

Edited by Spencer Sherwin

Merge request reports