Skip to content

Parsed displacement meshmodifier#7

Open
miaoyinb wants to merge 17 commits into
nextfrom
parsed-displacement-meshmodifier
Open

Parsed displacement meshmodifier#7
miaoyinb wants to merge 17 commits into
nextfrom
parsed-displacement-meshmodifier

Conversation

@miaoyinb

Copy link
Copy Markdown
Owner

Local

miaoyinb and others added 17 commits June 15, 2026 22:45
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guard against coupled variables with no DOF at a moved node, avoid
needless string copies, and document the evaluation frame.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a no-op prepareSnap() hook to MoveNodesToGeometryModifierBase (called
collectively at the start of snapNodes) and override it to gather each
coupled-variable system solution onto all ranks, so nodal values can be read
at any node during parallel execution.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…edExpression

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Expression tests

Drop the ParsedAux 'px' probe from time.i and coupled.i. Since Exodus stores a
single node-coordinate array (written at the first output and not refreshed
without meshChanged), output only at FINAL so that single coordinate set
captures the displaced node positions at the checked timestep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The block path of snapNodes() iterated all active nodes and called
getNodeBlockIds() on each, which errors ("Unable to find node N in any block
list") on a DistributedMesh for semilocal nodes absent from the node-to-block
map. Iterate the selected subdomains' elements (local + ghosted) and snap their
nodes instead, which is distributed-safe and moves ghosted node copies
consistently. Add distributed-mesh regression tests for MoveNodesByParsedExpression.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After snapping, a node shared between partitions can be moved on the rank holding
the selected block/boundary element but left unmoved on another rank that only
holds the node through a non-selected element, leaving ranks disagreeing on the
geometry. Use libMesh::SyncNodalPositions to copy each node's position from its
owning rank to all copies (skipped on a ReplicatedMesh). Add a multi-block
distributed regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ByParsedExpression

Optionally output (each only when its parameter is supplied):
- original node coordinates -> nodal <prefix>_coord_x/_y/_z
- node displacements        -> nodal <prefix>_disp_x/_y/_z
- per-element density adjustment factor (original volume / current volume,
  coordinate-aware via Assembly::elementVolume) -> elemental MONOMIAL CONSTANT

The aux variables are auto-created by a companion action
(MoveNodesByParsedExpressionAuxAction) attached to the UserObjects syntax at the
add_aux_variable task. A new postSnap() hook on MoveNodesToGeometryModifierBase
lets the modifier write the values after the move and position sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove MoveNodesByParsedExpressionAuxAction and its UserObjects/* syntax
registration (too invasive a framework change). The output aux variables named by
original_coordinate_prefix, displacement_prefix, and density_factor_variable must
now be created by the user; the modifier validates their existence (with a helpful
error), nodal/elemental type, and writes them. Tests declare the variables.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace original_coordinate_prefix/displacement_prefix (single string, derived
names) with original_coordinate_variables/displacement_variables, each a list of
exactly three nodal aux variable names (x, y, z). Validate the list has three
entries and that each variable exists and is nodal. Add count-check and
missing-variable regression tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fied

If neither 'block' nor 'boundary' is given, snapNodes() now operates on every
block in the mesh (previously it was a no-op). Add an all-blocks regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The all-blocks default now applies only when the user sets neither 'block' nor
'boundary'. Explicitly providing either parameter (even an empty list) is the
user's choice and is respected, so an empty restriction moves no nodes. Replace
the all_blocks test with a no-block input and add a block_empty_noop test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant