Skip to content

First MFEM backend PR - #248

Draft
sean-baccas wants to merge 18 commits into
xdg-org:mainfrom
sean-baccas:mfem
Draft

First MFEM backend PR#248
sean-baccas wants to merge 18 commits into
xdg-org:mainfrom
sean-baccas:mfem

Conversation

@sean-baccas

Copy link
Copy Markdown

No description provided.

@pshriwise pshriwise mentioned this pull request Aug 4, 2026
@sean-baccas
sean-baccas force-pushed the mfem branch 2 times, most recently from e5f530b to bddc23c Compare August 19, 2026 10:11

@Waqar-ukaea Waqar-ukaea left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor points on CI/testing

Comment thread .github/workflows/ci.yml
Comment on lines 17 to 23
matrix:
libmesh: [true, false]
moab: [true, false]
mfem: [true, false]
exclude:
- moab: false
libmesh: false

@Waqar-ukaea Waqar-ukaea Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We need to add an exclude for mfem too:

```suggestion
matrix:
libmesh: [true, false]
moab: [true, false]
        mfem: [true, false]
exclude:
- moab: false
libmesh: false
mfem: false

Currently we are excluding the case moab=false, libmesh=false, mfem=true but this change should ensure that job runs too

Comment thread tests/CMakeLists.txt Outdated
Comment on lines 38 to 40
if (XDG_ENABLE_MOAB AND XDG_ENABLE_LIBMESH)
list(APPEND TEST_NAMES test_mesh_library_cross_check)
endif()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This currently doesn't resolve scenarios where mfem is disabled, since the cross checks include xdg_mfem instatiation. I'm not sure what the best way to fix this is now that we have three backends rather than two.

The only way I can see to do it is at runtime check which backends are enabled and add them to a list of XDG instances to create. I implemented something similar for the ray_tracing_cross_check_tests with cuBQL here - https://github.com/Waqar-ukaea/xdg/blob/b857939d316fdb9ea005eedb49af9bac3e04356f/tests/test_ray_tracer_cross_check.cpp.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I am going to put a hotfix in here for now, and set it so that the cross checks only run when all three backends are enabled. I'll fix that one before taking it out of draft.

Comment on lines +138 to +154
auto xdg_moab = XDG::create(MeshLibrary::MOAB);
xdg_moab->mesh_manager()->load_file("jezebel.h5m");
xdg_moab->mesh_manager()->init();
xdg_moab->mesh_manager()->parse_metadata();
xdg_moab->prepare_raytracer();

auto xdg_libmesh = XDG::create(MeshLibrary::LIBMESH);
xdg_libmesh->mesh_manager()->load_file("jezebel.exo");
xdg_libmesh->mesh_manager()->init();
xdg_libmesh->mesh_manager()->parse_metadata();
xdg_libmesh->prepare_raytracer();

auto xdg_mfem = XDG::create(MeshLibrary::MFEM);
xdg_mfem->mesh_manager()->load_file("jezebel.exo");
xdg_mfem->mesh_manager()->init();
xdg_mfem->mesh_manager()->parse_metadata();
xdg_mfem->prepare_raytracer();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have another comment talking about this. But my idea is to do something like - https://github.com/Waqar-ukaea/xdg/blob/b857939d316fdb9ea005eedb49af9bac3e04356f/tests/test_ray_tracer_cross_check.cpp

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.

3 participants