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 "libmesh/face_quad4.h"
13 #include "libmesh/face_tri3.h"
14 
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");
27  return params;
28 }
29 
31 {
32  if (isParamValid("final_generator"))
33  _app.setFinalMeshGeneratorName(getParam<std::string>("final_generator"));
34 }
35 
36 std::unique_ptr<MooseMesh>
38 {
39  return libmesh_make_unique<MeshGeneratorMesh>(*this);
40 }
41 
42 void
44 {
45  if (!hasMeshBase())
47 }
MooseApp::setFinalMeshGeneratorName
void setFinalMeshGeneratorName(const std::string &generator_name)
Set final mesh generator name.
Definition: MooseApp.C:1688
MooseObject::isParamValid
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:100
MeshGeneratorMesh
Mesh generated from parameters.
Definition: MeshGeneratorMesh.h:23
InputParameters::addParam
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.
Definition: InputParameters.h:1198
MooseApp::getMeshGeneratorMesh
std::unique_ptr< MeshBase > getMeshGeneratorMesh(bool check_unique=true)
Get the generated mesh generated by executeMeshGenerators();.
Definition: MooseApp.C:1700
registerMooseObject
registerMooseObject("MooseApp", MeshGeneratorMesh)
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
InputParameters::set
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: InputParameters.h:987
MeshGeneratorMesh.h
MeshGeneratorMesh::MeshGeneratorMesh
MeshGeneratorMesh(const InputParameters &parameters)
Definition: MeshGeneratorMesh.C:30
MeshGeneratorMesh::buildMesh
virtual void buildMesh() override
Must be overridden by child classes.
Definition: MeshGeneratorMesh.C:43
MeshGeneratorMesh::safeClone
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.
Definition: MeshGeneratorMesh.C:37
MooseMesh::hasMeshBase
bool hasMeshBase() const
Whether mesh base object was constructed or not.
Definition: MooseMesh.h:887
MeshGeneratorMesh::validParams
static InputParameters validParams()
Definition: MeshGeneratorMesh.C:20
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
MooseMesh::_mesh
std::unique_ptr< libMesh::MeshBase > _mesh
Pointer to underlying libMesh mesh object.
Definition: MooseMesh.h:908
MooseObject::_app
MooseApp & _app
The MooseApp this object is associated with.
Definition: MooseObject.h:172
MooseMesh::validParams
static InputParameters validParams()
Typical "Moose-style" constructor and copy constructor.
Definition: MooseMesh.C:65
defineLegacyParams
defineLegacyParams(MeshGeneratorMesh)