Skip to content

Commit

Permalink
Add documentation for loading split meshes with FileMeshGenerator refs
Browse files Browse the repository at this point in the history
  • Loading branch information
GiudGiud committed May 11, 2022
1 parent 8512c26 commit f919dab
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
35 changes: 33 additions & 2 deletions framework/doc/content/source/meshgenerators/FileMeshGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,47 @@ supports reading and writing a large number of formats and could be extended to
| .vtk, .pvtu | Visualization Toolkit |
| .cpr | Checkpoint file |

## Extra element integer

When reading a mesh file in Sandia's ExodusII format, users can use parameter `exodus_extra_element_integers` to load elemental variables for setting extra element integers of the mesh.
The names of the extra element integers will be the same as the names of the
element variables in the mesh file. This generator can also be used for
element variables in the mesh file.

## Exodus restart

This generator can also be used for
restarting variables from the Exodus file format. In order to indicate that the
mesh file can be used to restart variables, simply set the parameter
`use_for_exodus_restart = true`. The `initial_from_file_var` parameter must also
be set in the variables sub-block as described in [MooseVariableBase.md#restart]
in order to perform variable restart.

## Further FileMeshGenerator Documentation
Additional documentation about restarting from Exodus may be found in the [restart-recovery page](restart_recover.md optional=True).

## Loading a split mesh

[Mesh splits](syntax/Mesh/splitting.md) usually do not require a `FileMeshGenerator`, they can be performed and loaded from the command line. The only use case for loading a split mesh using a `FileMeshGenerator` is to perform additional mesh generation on the split. For example, a 2D split mesh can be pre-split before extrusion to avoid ever having to load the full 3D mesh in serial.

To load a split mesh using the `FileMeshGenerator`, split your mesh as usual using the command line:

```
- mpirun -n 4 <executable> -i <input_file> --split-mesh 16 --split-file mesh_splitted
```

then load it with the `FileMeshGenerator` input parameter by using distributed meshes with the command line option:

```
- mpirun -n 4 <executable> -i <input_file> --distributed-mesh
```

Input file:

```
[fmg]
type = FileMeshGenerator
file = 'mesh_splitted.cpr'
[]
```

!syntax parameters /Mesh/FileMeshGenerator

Expand Down
6 changes: 4 additions & 2 deletions framework/doc/content/syntax/Mesh/splitting.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Mesh Splitting

MOOSE provides the ability to pre-split a mesh into several chunks for use with
Expand Down Expand Up @@ -72,4 +71,7 @@ $ mpiexec -n 42 moose-app-opt -i your_input.i --use-split --split-file foo.cpr
```

!alert note
The mesh splitter commands do not work with DistributedMesh. You must only split with a ReplicatedMesh.
The mesh splitter commands do not work with DistributedMesh. You must only split with a ReplicatedMesh.

!alert warning
Using `--use-split` skips the `[Mesh]` block of the input file. Split mesh may be loaded using a [FileMeshGenerator.md] if further mesh generation is to be performed on the split mesh.

0 comments on commit f919dab

Please sign in to comment.