Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH/BUG: Add DataStructure::validateGeometries() method #903

Conversation

imikejackson
Copy link
Contributor

@imikejackson imikejackson commented Apr 2, 2024

This method is run by IFilter::execute() after the actual filter's executeImpl() is run. The code will validate that the geometry's Attribute Matrices are correctly sized to match the vertex/edge/face/cell shared lists.

Some filters and unit tests bugs were also found and fixed by this update.

Copy link
Collaborator

@mmarineBlueQuartz mmarineBlueQuartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of note, this does not actually check the AttributeMatrix validity (what prevents importing data) beyond that of a single DataArray that each AttributeMatrix that relates to a geometry contains. To solve this, each of those matrices would have to loop over their arrays and check tuple counts individually.

Similarly to any geometry not at the top-level of the DataStructure (montage groupings, perchance?), this will not find any AttributeMatrix not specifically created through a geometry. We have a CreateAttributeMatrix filter in Core, so the import dream3d error is not necessarily solved with just checking geometries. Add a DataStructure::validateMatrices() method as well, and both this and my previous point will be solved.

src/simplnx/DataStructure/DataStructure.cpp Outdated Show resolved Hide resolved
src/simplnx/Filter/IFilter.cpp Outdated Show resolved Hide resolved
@imikejackson imikejackson force-pushed the topic/geometry_validation branch from 348c956 to 48b8cfd Compare April 2, 2024 15:09
Copy link
Collaborator

@mmarineBlueQuartz mmarineBlueQuartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix unit tests

This method is run by IFilter::execute() after the actual filter's executeImpl()
is run. The code will validate that the geometry's Attribute Matrices are correctly
sized to match the vertex/edge/face/cell shared lists.

Some filters and unit tests bugs were also found and fixed by this update.

Signed-off-by: Michael Jackson <[email protected]>
Signed-off-by: Michael Jackson <[email protected]>
@imikejackson imikejackson force-pushed the topic/geometry_validation branch from 7d31b11 to c343f17 Compare April 3, 2024 03:49
@imikejackson imikejackson merged commit cab149c into BlueQuartzSoftware:develop Apr 3, 2024
8 checks passed
@imikejackson imikejackson deleted the topic/geometry_validation branch April 3, 2024 12:53
imikejackson added a commit to imikejackson/simplnx that referenced this pull request Oct 20, 2024
…uteMatrices() method (BlueQuartzSoftware#903)

This ensures that each geometry and AttributeMatrix are all consistent with DataArray Lengths and total number of tuples. 

Signed-off-by: Michael Jackson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants