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

itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader has hard-coded I/O filenames #4417

Open
jhlegarreta opened this issue Jan 21, 2024 · 4 comments
Labels
type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Comments

@jhlegarreta
Copy link
Member

Description

The itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader test in the FEM module has hard-coded I/O filenames. Additionally, it is not listed in the FEM module's test directory CMakeLists.txt file, so even if the module and testing are turned ON when configuring ITK, the build will succeed.

Steps to Reproduce

  1. Check-out ITK.
  2. Turn on the FEM module and building the tests when configuring.
  3. Build.
  4. Run ctest -V -R itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader -C Debug: no test will be found.

Expected behavior

No hard-coded paths should exist: the test should have its I/O arguments specified in the corresponding CMakeLists.txt entry.

Actual behavior

The itkFEMElement2DC0LinearQuadrilateralStressTestFEMObjectReader test in the FEM module has hard-coded I/O filenames. Additionally, it is not listed in the FEM module's test directory CMakeLists.txt file, so the test is not run even if turning ON the FEMmodule and building tests; it will fail if doing so, and adding an entry to CMakeLists.txt since the I/O filenames are hard-coded.

Reproducibility

100%.

Versions

ITK master.

Environment

Any

Additional Information

Its Trial.meta input file is not found on the current ITK source code tree; SpatialObjects.meta is found at https://github.com/InsightSoftwareConsortium/ITK/blob/5cf4a7226f1be5133f96fe7fcb49ba1fc367d525/Testing/Data/Input/SpatialObjects.meta.cid.

The test (including the hard-coded paths) was added by commit 23f10a9 (Kent Williams authored and @hjmjohnson committed on Jul 15, 2011). It does not look like Trial.meta has ever been committed.

@jhlegarreta jhlegarreta added the type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct label Jan 21, 2024
@jhlegarreta
Copy link
Member Author

Slightly related: itkFEMElementTest does also have some hard-coded paths:

char listloc[] = "../../Insight/Testing/Data/Input/FEM/input-list";

and
char filepath[] = "../../Insight/Testing/Data/Input/FEM/";

These should be given as parameters in the CMakeLists.txt file.

@jhlegarreta
Copy link
Member Author

Looks like some of the missing data files do not exist in ITK any more, but this repository seems to contain an old version of ITK that does have that data:
https://github.com/kiranhs/ITKv4FEM-Kiran

in folder Testing/Code/Numerics/FEM/Data.

However, it looks like the data format was changed at some point, and seems like the previous fem files were transitioned to the meta format. There is still some files that are in the above repository that are in the old format that would hlps in fixing this issue. @thewtex @dzenanz @hjmjohnson @blowekamp do you know how they were transitioned and whether the same principle should apply to the files that should be brought in order to fix this? Can you provide me with the tools to do the transition, please?

Applies to https://github.com/InsightSoftwareConsortium/ITK/blob/009b0a849aed8236be63f33161d9803dc47fb122/Modules/Numerics/FEM/test/itkFEMElement2DC0LinearLineStressItpackTest.cxx

as well.

@thewtex
Copy link
Member

thewtex commented Aug 12, 2024

@jhlegarreta thanks for taking a look. I do not recall any details on that transition.

@dzenanz
Copy link
Member

dzenanz commented Aug 12, 2024

I don't remember anything about it either. And I am not sure that anyone uses FEM module, so I would advise against investing much effort into its maintenance.

@jhlegarreta jhlegarreta added this to the ITK 6.0 Beta 1 milestone Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

No branches or pull requests

3 participants