Skip to content

Reduce redundant mesh re-preparation in mesh generators #32398

@roystgnr

Description

@roystgnr

Motivation

Right now, a MOOSE mesh generator that invalidates any cache (e.g. by adding a boundary id to an element without updating the collective boundary id sets for the mesh) typically marks the entire mesh as unprepared, which forces the regeneration of every cache (e.g. repartitioning, recalculating neighbor links, and other expensive operations). In some cases this may be a significant performance hit.

Design

As of the last libMesh submodule update, it's now possible to mark a mesh as only being partially unprepared, and then to only do the necessary subset of preparation work later. We should start using those APIs.

Impact

No impact for mesh generators which have complete test coverage - the MeshGeneratorSystem already calls a libMesh check to verify preparation status validity of every generator, and in libMesh/libmesh#4411 this check is being updated to handle partial-preparation status cases as well.

If we were to change mesh generators without first adding proper test coverage, there is a risk of not marking a mesh as unprepared in some way in which it is actually unprepared; if the unprepared cached/derived data is then used later in the simulation it may give incorrect results.

Metadata

Metadata

Assignees

Labels

T: taskAn enhancement to the software.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions