15 #include "libmesh/parallel_object.h"    16 #include "libmesh/mesh_base.h"    63                         const std::string & name,
    85   [[nodiscard]] std::unique_ptr<libMesh::MeshBase> &
   120   [[nodiscard]] std::unique_ptr<libMesh::MeshBase> 
getSavedMesh(
const std::string & name);
   207                          std::unique_ptr<CSG::CSGBase> & csg_base);
   226   std::vector<std::pair<std::string, MeshGeneratorName>>
   228                                     const bool allow_empty = 
false) 
const;
 std::string name(const ElemQuality q)
std::unique_ptr< CSG::CSGBase > & getCSGBaseGeneratorOutput(const MeshGeneratorName &name)
Returns the output CSGBase object associated with a particular mesh generator name. 
std::string _final_generator_name
The final mesh generator name to use. 
MeshGeneratorSystem(MooseApp &app)
void setVerbose(const bool verbose)
Set the verbose flag. 
std::shared_ptr< MeshGenerator > createMeshGenerator(const std::string &name)
Internal method for actually constructing a mesh generator after it has been declared externally in a...
std::unique_ptr< libMesh::MeshBase > & getMeshGeneratorOutput(const MeshGeneratorName &name)
Get a reference to a pointer that will be the output of the MeshGenerator named name. 
void setCSGOnly()
Set whether mesh generator system is running in CSG-only mode to true. 
std::map< std::string, std::unique_ptr< libMesh::MeshBase > > _save_in_meshes
Holds the map of save in mesh -> name. 
bool hasDataDrivenAllowed() const
MeshGeneratorName getFinalMeshGeneratorName() const
Get the name of the final mesh generator. 
std::unique_ptr< libMesh::MeshBase > getSavedMesh(const std::string &name)
Get the saved mesh by name. 
std::vector< std::string > getMeshGeneratorNames() const
Get names of all mesh generators Note: This function should be called after all mesh generators are a...
Base class for MOOSE-based applications. 
void executeMeshGenerators()
Execute and clear the Mesh Generators data structure. 
std::optional< std::string > _data_driven_generator_name
The name of the data driven generator, if any. 
bool hasBreakMeshByBlockGenerator() const
bool _verbose
Whether to print the names of the mesh generators being executed or not. 
void addMeshGenerator(const std::string &type, const std::string &name, const InputParameters ¶ms)
Add a mesh generator that will act on the meshes in the system. 
const MeshGenerator & appendMeshGenerator(const std::string &type, const std::string &name, InputParameters params)
Append a mesh generator that will act on the current final mesh generator in the system. 
MooseApp & _app
The MooseApp that owns this system. 
void createAddedMeshGenerators()
Creates (constructs) all of the MeshGenerators that have been declared using addMeshGenerator(). 
bool getCSGOnly() const
Get whether mesh generator system is running in CSG-only mode. 
bool _csg_only
Whether mesh generator system is running in CSG-only mode. 
void saveOutputCSGBase(const MeshGeneratorName generator_name, std::unique_ptr< CSG::CSGBase > &csg_base)
Saves the CSGBase object to the global map storage, _csg_base_output, for a particular mesh generator...
std::map< std::string, std::list< std::unique_ptr< libMesh::MeshBase > > > _mesh_generator_outputs
Holds the output for each mesh generator - including duplicates needed downstream. 
Interface for objects interacting with the PerfGraph. 
std::vector< std::string > getSavedMeshNames() const
Get all user-defined saved meshes except main and main_displaced. 
static std::string mainMeshGeneratorName()
The name reserved for the "main" mesh generator which is the one used for the numerical solver downst...
std::map< std::string, std::shared_ptr< MeshGenerator > > _mesh_generators
Owning storage for mesh generators, map of name -> MeshGenerator. 
Mesh generated from parameters. 
std::map< std::string, std::unique_ptr< CSG::CSGBase > > _csg_base_output
Holds the output CSGBase object for each mesh generator. 
void createMeshGeneratorOrder()
Order all of the _mesh_generators into _ordered_mesh_generators for later execution in executeMeshGen...
static const std::string data_driven_generator_param
The name of the string parameter that sets the data driven generator. 
bool hasMeshGenerator(const MeshGeneratorName &name) const
void dataDrivenError(const MeshGenerator &generator, const std::string &message) const
Reports an error with the context of the data driven parameter, coming from the generator generator w...
const MeshGenerator & getMeshGenerator(const std::string &name) const
System that manages MeshGenerators. 
bool appendingMeshGenerators() const
Whether or not mesh generators are currently being appended (append_mesh_generator task) ...
static const std::string allow_data_driven_param
The name of the boolean parameter on the MooseApp that will enable data driven generation. 
const std::string & getDataDrivenGeneratorName() const
MeshGenerator & getMeshGeneratorInternal(const std::string &name)
Get a MeshGenerator with the name name. 
bool _has_bmbb
Whether any of the mesh generators are a BreakMeshByBlockGenerator. 
MeshGenerators are objects that can modify or add to an existing mesh. 
CSGBase creates an internal representation of a Constructive Solid Geometry (CSG) model...
std::unordered_map< std::string, std::pair< std::string, InputParameters > > _mesh_generator_params
The MeshGenerators declared using addMeshGenerator(), cleared after createMeshGenerators() Key is the...
bool hasMeshGeneratorParams(const MeshGeneratorName &name) const
Whether or not we know about the parameters for a MeshGenerator with the given name. 
std::vector< std::pair< std::string, MeshGeneratorName > > getMeshGeneratorParamDependencies(const InputParameters ¶ms, const bool allow_empty=false) const
Gets the MeshGeneratorNames that are referenced in an object's parameters. 
const std::vector< std::vector< MeshGenerator * > > & getOrderedMeshGenerators() const
std::vector< std::vector< MeshGenerator * > > _ordered_mesh_generators
Holds the ordered mesh generators from createMeshGeneratorOrder() until they are executed in executeM...