Skip to content

Refactor pcms#316

Open
Sichao25 wants to merge 79 commits intoSCOREC:developfrom
Sichao25:evaluation-library
Open

Refactor pcms#316
Sichao25 wants to merge 79 commits intoSCOREC:developfrom
Sichao25:evaluation-library

Conversation

@Sichao25
Copy link
Copy Markdown
Contributor

Refactor the entire source code and API so the implementation better matches the underlying concepts, with improved abstraction and encapsulation. Major changes include:

  • Evaluations are now handled by the evaluator instead of the field.
  • Fields and field layouts are created through the function space.
  • Interpolators are introduced to handle field transfer.
  • The previous coupler2/field2 are used to replace the deprecated coupler/field.
  • An omega_h field adaptor is added as an alternative to the meshfield field adaptor.

This change makes the ownership model more clear. Since UniformGrid is a
small POD type this seems sensible.
This is one proposed avenue to remove the field creation from the
layout.
PCMS follows the language standard requirements of Kokkos. The
assumption is that standard that is required by Kokkos will be well
supported across the DOE systems.
This Commit addresses three issues:
1. Add Omega_h adapter that handles order 0 and order 1 without
   MeshFields
2. Gate all calls (CMakeLists.txt, headers, etc.) to MeshFields
3. Add CI test that builds with -DPCMS_ENABLE_MESHFIELDS=OFF
This commit adds a -DPCMS_ENABLE_PETSC=OFF compilation to the CI
This commit removes the create_field.h header and makes use of the
Lagrange field factory for the uniform grid evaluations and mask
creation.
This removes the Serialize/Deserialize from the fields and for now, uses
a default implementation that works of GetDOFHolder and SetDOFHolder
from the field definitions. In the future, we could implement optimized
version of the serialization through derived class that is specific to
each field type. This split is required to move towards separate
evaluation and coupling libraries in PCMS.
This commit creates a field exchange planner which constructs
permutations / works with the layout. A classification API is added to
the layout as well. This allows us to define a generic Exchange plan
that works with any field that implement it.
This commit applies the reorganization of PCMS into specific libraries
related to field operations (particularly, evaluation) and
communication/coordination operations in the coupler library. The old
adapters that mix field and coupling operations are now located inside
the coupler library. The field library does not require linking against
redev.
This commit implements the new style of evaluation that we are testing
with PCMS. To ensure that things are working as expected, we pass the
old field evaluation routines through the new ones. This ensures that
all tests are passing as expected and avoids copy-pasting the
underlying field logic.
This commit adds an XGC adapter class that utilizes the new interface
design. Once we update the C interface to use this design, we will be
able to remove the old XGC adapter.
This maintains similar ergonomics to the previous version. This is
needed to avoid making the CAPI somewhat unpleasant.
The old version of PCMS communicators had one layout per field. We need
to match that, and the participates logic for xgc tests to work.
@Sichao25 Sichao25 force-pushed the evaluation-library branch from 62142e1 to 9987eb7 Compare April 27, 2026 20:40
@Sichao25 Sichao25 requested a review from jacobmerson April 27, 2026 22:52
@Sichao25 Sichao25 marked this pull request as ready for review April 27, 2026 22:52
@Sichao25
Copy link
Copy Markdown
Contributor Author

@jacobmerson Just let you know that this is ready for review.

@jacobmerson
Copy link
Copy Markdown
Collaborator

Thanks.

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