Skip to content

Refactor the internal DMPlex creation routines to support only a kinetic mesh formed of triangular cells. Fix #45 - #48

Merged
mrhardman merged 4 commits into
VANTAGE-Reactions-Coupling/dmplex-featuresfrom
VANTAGE-Reactions-Coupling/dmplex-features-tri-only-mesh
Sep 30, 2026
Merged

mrhardman merged 4 commits into
VANTAGE-Reactions-Coupling/dmplex-featuresfrom
VANTAGE-Reactions-Coupling/dmplex-features-tri-only-mesh

Conversation

@mrhardman

@mrhardman mrhardman commented Sep 29, 2026 •

Copy link
Copy Markdown

Refactor the internal DMPlex creation routines to support only a kinetic mesh formed of triangular cells. This simplifies the VantageDataTransfer class implementation, and addresses the bug described in #45.

Purpose

This PR implements the triangular cell DMPlex as the only supported DMPlex mesh for VANTAGE. This is a simplification over the implementation currently in #44, where both a quad mesh (internally generated) and a triangular mesh (externally supplied) are supported.

Change Summary

  • The internally generated DMPlex uses triangular cells.
  • The internally generated DMPlex is fully internally generated (use_cxx_ivertex=false functionality is removed).
  • Checks are made when loading data from the BOUT++ mesh file with bout_mesh->get().
  • Fix made in VantageDataTransfer::transfer_vector_to_kinetic_mesh to ensure data is transferred to the output vector.
  • Check existence and dimensions of particle properties.
  • Formatting applied.

Validation

The existing automatic tests were run in serial, jobs were run in parallel to check mass conservation.

AI Assistance

A LLM was consulted in designing these changes. No agentic LLM was used.

Documentation

No documentation besides comments.

Review Notes

@will-saunders-ukaea please comment on whether or not this addresses #45. A separate PR will separate the MPI decomposition #47.

…tic mesh formed of triangular cells. This simplifies the VantageDataTransfer class implementation.
@mrhardman mrhardman self-assigned this Sep 29, 2026
@mrhardman mrhardman added bug Something isn't working enhancement New feature or request labels Sep 29, 2026
Comment thread include/vantage_dmplex.hxx Outdated
Comment thread include/vantage_dmplex.hxx
@mrhardman
mrhardman merged commit 2cc27c6 into VANTAGE-Reactions-Coupling/dmplex-features Sep 30, 2026
5 of 6 checks passed
@mrhardman
mrhardman deleted the VANTAGE-Reactions-Coupling/dmplex-features-tri-only-mesh branch September 30, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use PetscInterface::DMPlexMeshCouplerDG0 to couple the BOUT++ grid to the kinetic mesh in all cases

2 participants