Skip to content

Commit

Permalink
Merge pull request idaholab#29597 from miaoyinb/combinerFix
Browse files Browse the repository at this point in the history
Fix the Positioning Bug of CombinerGenerator
  • Loading branch information
GiudGiud authored Dec 22, 2024
2 parents 5b1df2e + 842fa6b commit 90a2914
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you specify `positions` then the number of `positions` must match the number

Will generate a mesh that looks like:

!media media/meshgenerators/combiner_multi_translate.png style=width:75%;
!media framework/meshgenerators/combiner_multi_translate.png style=width:75%;

Alternatively, the same displacement vectors can be supplied in a file with the `positions_file` option. The above mesh can equivalently be generated with the following.

Expand Down
7 changes: 7 additions & 0 deletions framework/src/meshgenerators/CombinerGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ CombinerGenerator::generate()
if (!mesh)
paramError("inputs", _input_names[0], " is not a valid unstructured mesh");

// Move the first input mesh if applicable
if (_positions.size())
{
MeshTools::Modification::translate(
*mesh, _positions[0](0), _positions[0](1), _positions[0](2));
}

// Read in all of the other meshes
for (MooseIndex(_meshes) i = 1; i < _meshes.size(); ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion large_media
Binary file not shown.
Binary file not shown.

0 comments on commit 90a2914

Please sign in to comment.