www.mooseframework.org
MeshGeneratorMesh.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "MeshGeneratorMesh.h"
11 
12 #include "MeshGeneratorSystem.h"
13 
14 #include "libmesh/face_quad4.h"
15 #include "libmesh/face_tri3.h"
16 
18 
21 {
23  params.set<bool>("_mesh_generator_mesh") = true;
24 
25  params.addParam<std::string>("final_generator",
26  "The name of the mesh generator output to use for the final Mesh");
28  "Set to make all dependencies of this mesh generator run in data "
29  "driven mode, where a mesh is not generated");
30 
31  params.addClassDescription("Mesh generated using mesh generators");
32  return params;
33 }
34 
36 
37 std::unique_ptr<MooseMesh>
39 {
40  return std::make_unique<MeshGeneratorMesh>(*this);
41 }
42 
43 void
45 {
46  if (!hasMeshBase())
47  mooseError("The mesh base has not been set");
48 }
static InputParameters validParams()
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:78
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual std::unique_ptr< MooseMesh > safeClone() const override
A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
virtual void buildMesh() override
Must be overridden by child classes.
MeshGeneratorMesh(const InputParameters &parameters)
registerMooseObject("MooseApp", MeshGeneratorMesh)
Mesh generated from parameters.
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition: MooseMesh.h:1082
static const std::string data_driven_generator_param
The name of the string parameter that sets the data driven generator.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
static InputParameters validParams()