Skip to content

Cleanup mesh intersection#281

Open
jacobmerson wants to merge 58 commits intoSCOREC:developfrom
jacobmerson:cleanup-mesh-intersection
Open

Cleanup mesh intersection#281
jacobmerson wants to merge 58 commits intoSCOREC:developfrom
jacobmerson:cleanup-mesh-intersection

Conversation

@jacobmerson
Copy link
Collaborator

This PR is an extension of #209. I refactored Abhiyan's code to get it closer to a state that we can merge.

@abhiyan123 if you would rather merge this and work off of your PR. I'm fine with that, I just want to get the first pass at mesh_intersections in quickly.

@jacobmerson
Copy link
Collaborator Author

jacobmerson commented Mar 9, 2026

@Sichao25 you may want to wait until @abhiyan123 indicates if he will merge these changes back to #209 or not to do the review. Once he indicates his preference I'd like to move quickly to get this finalized.

There is still a lot of cleanup that could and maybe should be done to better decouple components. My strategy was to try to at least:

  1. move all non-templated functions out of headers
  2. factor out complex code that was repeated multiple times

The error handling bits of this are still a mess, but the PR is already big enough as is. We will have to take a pass at resolving the error handling mismatch when we fix the exceptions in the rest of the library. For the petsc errors, we can utilze the macro/exception type I previously implemented for MuMFiM.

It looks like using PkgConfig for the petsc configuration broke the CI build...In my personal builds I've had better luck with the PkgConfig based targets, but we'll need to double check if there is an easy way to fix the CI for this.

@jacobmerson
Copy link
Collaborator Author

The issue with the PkgConfig based petsc installation here is that the Petsc target only seems to behave nicely when petsc is build in shared library mode.

jacobmerson and others added 28 commits March 12, 2026 06:47
We create a library that performs localization tasks. At the moment, we only have one strategy, i.e., use a unform grid for localization. However, we anticipate adding additional backends for AroborX (SCOREC#245), adjacency based, KD-Tree, etc. This library split helps to organize the code, move things out of pcms::core which initally had everything, and clarify dependencies.
This commit does two things:
1. Renames the interpolator library to "transfer" which is meant to be more general to account for both interpolation and projection methods.
2. Flattens the mesh intersection sublibrary into the transfer library. Various field transfer methods are anticipated to have shared code. E.g., the stochastic method with variance reduction will make use of interpolation capabilities.
This updates the petsc configuration to work with both static and shared
builds.
It is standard practice to put non-templated code into .cpp files. This has multiple benefits, including reducing compile times and less leackage of private libraries into the public interfaces.
…gles of polytopes for the user to perform operations
ADJ_SEARCH -> PCMS_TRANSFER_ADJ_SEARCH. By prepending with the project name, we make it less likely that there will be naming collisions with other projects.

also map include guards INTERPOLATOR -> TRANSFER
perfstubs has a buffer overflow that is showing up as stalled tests in
some cases. See: SCOREC#284 for progress
on resolving this.
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