https://mooseframework.inl.gov
ElementGenerator.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 
18 {
19 public:
21 
23 
24  std::unique_ptr<MeshBase> generate() override;
25 
27  std::unique_ptr<Elem> getElemType(const std::string & type);
28 
29 protected:
31  std::unique_ptr<MeshBase> & _input;
32 
34  const std::vector<Point> & _nodal_positions;
35 
37  const std::vector<std::vector<dof_id_type>> _element_connectivity;
38 
41 };
std::unique_ptr< Elem > getElemType(const std::string &type)
Creates the base element of the given type.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
std::unique_ptr< MeshBase > & _input
Mesh that possibly comes from another generator.
const std::vector< Point > & _nodal_positions
The nodal positions.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseEnum & _elem_type
The type of element to build.
ElementGenerator(const InputParameters &parameters)
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
Generates individual elements given a list of nodal positions.
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:93
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:54
static InputParameters validParams()
const std::vector< std::vector< dof_id_type > > _element_connectivity
The connectivity of the elements to the nodes.
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:33