https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MeshGeneratorMesh.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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#include "MooseApp.h"
14
15#include "libmesh/face_quad4.h"
16#include "libmesh/face_tri3.h"
17
19
22{
24 params.set<bool>("_mesh_generator_mesh") = true;
25
26 params.addParam<std::string>("final_generator",
27 "The name of the mesh generator output to use for the final Mesh");
29 "Set to make all dependencies of this mesh generator run in data "
30 "driven mode, where a mesh is not generated");
31
32 params.addClassDescription("Mesh generated using mesh generators");
33 return params;
34}
35
37
38std::unique_ptr<MooseMesh>
40{
41 return _app.getFactory().copyConstruct(*this);
42}
43
44void
46{
47 if (!hasMeshBase())
48 mooseError("The mesh base has not been set");
49}
registerMooseObject("MooseApp", MeshGeneratorMesh)
std::unique_ptr< T > copyConstruct(const T &object)
Copy constructs the object object.
Definition Factory.h:358
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Mesh generated from parameters.
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.
MeshGeneratorMesh(const InputParameters &parameters)
virtual void buildMesh() override
Must be overridden by child classes.
static InputParameters validParams()
static const std::string data_driven_generator_param
The name of the string parameter that sets the data driven generator.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
Definition MooseApp.h:407
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
static InputParameters validParams()
Typical "Moose-style" constructor and copy constructor.
Definition MooseMesh.C:83
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition MooseMesh.h:1246
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375