https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
20public:
22
24
25 std::unique_ptr<MeshBase> generate() override;
26
27protected:
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};
void makeHex20Elems(MeshBase &mesh, const std::vector< Node * > &nodes)
const Real _xoffset
Offsets in the x, y, and z directions of the origin node (default location: (0,0,0))
MooseEnum _dim
The dimension of the mesh.
Real _xlength
Edge length of the domain in the x, y, and z directions.
MooseEnum _elem_type
The element type used.
void makeHex8Elems(MeshBase &mesh, const std::vector< Node * > &nodes)
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
static InputParameters validParams()
void makeQuad4Elems(MeshBase &mesh, const std::vector< Node * > &nodes)
void makeQuad8Elems(MeshBase &mesh, const std::vector< Node * > &nodes)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
MeshBase & mesh