- inputsThe input MeshGenerators. This can either be N generators or 1 generator. If only 1 is given then 'positions' must also be given.
C++ Type:std::vector
Description:The input MeshGenerators. This can either be N generators or 1 generator. If only 1 is given then 'positions' must also be given.
CombinerGenerator
Combine multiple meshes (or copies of one mesh) together into one (disjoint) mesh. Can optionally translate those meshes before combining them.
Description
The CombinerGenerator
allows the user to combine the outputs of multiple MeshGenerator
s into a single mesh. This is somewhat similar to StitchedMesh with the difference being that CombinerGenerator
makes no attempt to "heal" / "join" the mesh like StitchedMesh. There CombinerGenerator
is more suited to creation of disjoint meshes (where the individual pieces are not directly tied together).
Usages
There are three main ways to use the CombinerGenerator
:
1. Combine Multiple MeshGenerator
s
The most straightforwad thing to do is simply to combine the output of multiple MeshGenerator
s together into a single mesh. For example:
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
xmin = 2
xmax = 3
ymin = 2
ymax = 3
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
xmin = 3.5
xmax = 5
ymin = 3
ymax = 4
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input.i)Will generate a mesh that looks like:

2. Combine Multiple MeshGenerator
s AND Translate Them
It is also possible to translate (move) the input MeshGenerator
s as they are combined. This is done using the positions
option which takes triplets of floating point numbers that are interpreted as displacement vectors for moving each of the input meshes.
If you specify positions
then the number of positions
must match the number of inputs
, unless only one input is specified (more on that in a moment).
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate.i)Will generate a mesh that looks like:

3. Copy a Single Input Multiple Times With Translations
The final option is to provide exactly one inputs
but specify multiple positions
. This will cause the single input to be copied multiple times withthe position of each copy specified by the positions
parameter. For example
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_generator.i)Will generate a mesh that looks like:

Input Parameters
- positionsThe (optional) position of each given mesh. If N 'inputs' were given then this must either be left blank or N positions must be given. If 1 input was given then this MUST be provided.
C++ Type:std::vector
Description:The (optional) position of each given mesh. If N 'inputs' were given then this must either be left blank or N positions must be given. If 1 input was given then this MUST be provided.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- test/tests/meshgenerators/combiner_generator/combiner_multi_input.i
- test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate.i
- test/tests/meshgenerators/combiner_generator/combiner_generator.i