Closed willGraham01 closed 1 year ago
Patch coverage: 54
% and project coverage change: -1
:warning:
Comparison is base (
b6de664
) 27% compared to head (a0ba713
) 26%.:exclamation: Current head a0ba713 differs from pull request most recent head 56cae1e. Consider uploading reports for the commit 56cae1e to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Detaches
XYZVector
class from MATLABThe XYZVector class was previously a collection of three
double *
pointers, which were cast tomxGetPr
or similar.This PR allows
HDF5Reader.read()
to read an XYZVector, rather than us needing to rely on the MATLAB API.MaterialCollection
,{C,D}CollectionBase
,{C,D}Material
tasks.It also detaches the following classes from MATLAB, which depended on
XYZVector
:dispersive_multilayer
: This was already detached, but now we can safely allocate the members and it has been broken out ofarrays.h
.material_collections.h
This file reworks the old
MaterialCollection
,CCollectionBase
,CCollection
,CMaterial
,DCollectionBase
,DCollection
,DMaterial
classes. There are now just 4 structs to hold the data that these classes previously contained,CMaterial
,CCollection
,DMaterial
andDCollection
. The two "D
" objects are actually identical save for the group in the input file that they read from, so are just typedefs of a slightly more generalDBase
class so that we avoid repeating definitions for theHDF5Reader.read()
method.Speaking of which,
HDF5Reader.read()
can now read in these 4 new classes.Testing
Existing tests have been preserved, where possible. Since the majority of the new classes in
material_collections.h
are now simplystructs
that reply onstd::vector
functionality, their unit tests are no longer present.In their place are unit tests for the new overloads of the
HDF5Reader.read()
method, for reading each of the new classes and reworkedXYZVector
class in.