www.mooseframework.org
SideSetsGeneratorBase.h
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 #pragma once
11 
12 #include "MeshGenerator.h"
13 
14 // Forward declarations
16 
17 // libMesh forward declarations
18 namespace libMesh
19 {
20 class QGauss;
21 class Elem;
22 template <typename>
23 class FEGenericBase;
24 typedef FEGenericBase<Real> FEBase;
25 }
26 
27 template <>
29 
31 {
32 public:
34  virtual ~SideSetsGeneratorBase(); // dtor required for unique_ptr with forward declarations
35 
36 protected:
42  void setup(MeshBase & mesh);
43 
48  void finalize();
49 
54  void flood(const Elem * elem, Point normal, boundary_id_type side_id, MeshBase & mesh);
55 
56  boundary_id_type getNextBoundaryID() const;
57 
58  Real _variance;
60 
61  std::unique_ptr<FEBase> _fe_face;
62  std::unique_ptr<QGauss> _qface;
63  std::map<boundary_id_type, std::set<const Elem *>> _visited;
64 };
65 
SideSetsGeneratorBase(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::unique_ptr< QGauss > _qface
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
std::unique_ptr< FEBase > _fe_face
void flood(const Elem *elem, Point normal, boundary_id_type side_id, MeshBase &mesh)
This method implements a recursive flood routine to paint a sideset of mesh to neighboring faces give...
void finalize()
This method finalizes the object, setting names back in the boundary_info object and releasing memory...
InputParameters validParams< SideSetsGeneratorBase >()
FEGenericBase< Real > FEBase
Definition: Assembly.h:34
boundary_id_type getNextBoundaryID() const
std::map< boundary_id_type, std::set< const Elem * > > _visited
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:30
void setup(MeshBase &mesh)
This method is used to construct the FE object so we can compute normals of faces.