-
Notifications
You must be signed in to change notification settings - Fork 9
Add Catalyst Plugin. #496
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
base: main
Are you sure you want to change the base?
Add Catalyst Plugin. #496
Conversation
jbigot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add Kitware to the copyright at the top of the root CMakeLists.txt you contributed to
|
Thank you so much for the contribution @francois-kitware ! From our point of view, it's basically good to go as-is, if you maintain the plugin separately in a submodule. We just need to add a Changelog entry, and some other minor elements related to our "checkboxes". Would you also be interested in the review of the plugin code? In this case, this should be done on your gitlab since from github we only have a submodule reference. |
d9b3078 to
98655ea
Compare
| #include <assert.h> | ||
| #include <math.h> | ||
| #include <stdio.h> | ||
| #include <stdlib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must add #include <stdint.h> to build from source, otherwise basic types like uint8_t are unknown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably better to include cstdint instead.
| project(pdi_catalyst_plugin LANGUAGES C CXX) | ||
|
|
||
| find_package(PDI REQUIRED COMPONENTS plugins) | ||
| find_package(Catalyst REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a mismatch in the package name. The main PDI CMakeLists.txt needs catalyst_DIR variable whereas the plugin ask for Catalyst_DIR (with a capital C at the beginning).
A quick solution is to change this line to find_package(catalyst REQUIRED)
| configure_file(config_init.yml config.yml) | ||
|
|
||
| find_package(Python3 COMPONENTS Interpreter) | ||
| add_test(NAME Test_tuto_september_2025_ghost_attributes COMMAND ${Python3_EXECUTABLE} "${CMAKE_SOURCE_DIR}/test_tuto_september_2025_ghost_attributes/run_test.py" "${CMAKE_BINARY_DIR}/test_tuto_september_2025_ghost_attributes/" "${CMAKE_SOURCE_DIR}/test_tuto_september_2025_ghost_attributes/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this test?
I would suggest to move it to the test folder, add the "Catalyst" word in the name and maybe remove the date reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in this directory correspond to a demo given in a PDI tutorial.
The purpose of this code, it is to show how to introduce ghost cells.
Perhaps, it is better to create a repository example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be moved to the tutorial repo.
| env["CATALYST_DATA_DUMP_DIRECTORY"] = binary_folder | ||
| env["PDI_PLUGIN_PATH"] = binary_folder + '/..' | ||
|
|
||
| result = subprocess.run([binary_folder + "/Test_tuto_september_2025", binary_folder + "/ex6.yml"], env=env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is ex6.yml file? I can't find it in this plugin folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for the comment, this file correspond to config.yml in old version of previous commit
Add the catalyst plugin developed by Kitware as an official PDI plugin.
The plugin code have been copied in the branch and the catalyst library dependency is added as a submodule for easy update in the future.
When built with
BUILD_TESTINGCMake variable, the pdi-catalyst-plugin tests should pass:Looks like lots of boxes below are not checked. I'll update everything after PDI's team code review.
François
List of things to check before making a PR
Before merging your code, please check the following:
.clang-format;Fix #issuekeyword to autoclose the issue when merged.