https://mooseframework.inl.gov
ExamplePatchMeshGenerator.h
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 #pragma once
11 
12 #include "MeshGenerator.h"
13 #include "MooseEnum.h"
14 
15 /*
16  * Mesh generator to generate 2D or 3D mesh patches
17  */
19 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27 protected:
28  /*
29  * Make quad4 elements from nodes
30  * @param mesh A reference to the mesh object
31  * @param nodes A reference to the vector containing the nodes
32  */
33  void makeQuad4Elems(MeshBase & mesh, const std::vector<Node *> & nodes);
34  /*
35  * Make quad8 elements from nodes
36  * @param mesh A reference to the mesh object
37  * @param nodes A reference to the vector containing the nodes
38  */
39  void makeQuad8Elems(MeshBase & mesh, const std::vector<Node *> & nodes);
40  /*
41  * Make Hex8 elements from nodes
42  * @param mesh A reference to the mesh object
43  * @param nodes A reference to the vector containing the nodes
44  */
45  void makeHex8Elems(MeshBase & mesh, const std::vector<Node *> & nodes);
46  /*
47  * Make hex20 elements from nodes
48  * @param mesh A reference to the mesh object
49  * @param nodes A reference to the vector containing the nodes
50  */
51  void makeHex20Elems(MeshBase & mesh, const std::vector<Node *> & nodes);
52 
61 };
const Real _xoffset
Offsets in the x, y, and z directions of the origin node (default location: (0,0,0)) ...
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
void makeQuad8Elems(MeshBase &mesh, const std::vector< Node *> &nodes)
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void makeQuad4Elems(MeshBase &mesh, const std::vector< Node *> &nodes)
MooseEnum _elem_type
The element type used.
MooseEnum _dim
The dimension of the mesh.
Real _xlength
Edge length of the domain in the x, y, and z directions.
void makeHex20Elems(MeshBase &mesh, const std::vector< Node *> &nodes)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
ExamplePatchMeshGenerator(const InputParameters &parameters)
void makeHex8Elems(MeshBase &mesh, const std::vector< Node *> &nodes)
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:32