www.mooseframework.org
GeometricSearchData.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef GEOMETRICSEARCHDATA_H
16 #define GEOMETRICSEARCHDATA_H
17 
18 #include "MooseTypes.h"
19 
20 
21 #include <map>
22 
23 // Forward Declarations
24 class MooseMesh;
25 class SubProblem;
26 class PenetrationLocator;
27 class NearestNodeLocator;
28 class ElementPairLocator;
29 
31 {
32 public:
35  {
36  ALL,
42  };
43 
44  GeometricSearchData(SubProblem & subproblem, MooseMesh & mesh);
45  virtual ~GeometricSearchData();
46 
47  PenetrationLocator & getPenetrationLocator(const BoundaryName & master,
48  const BoundaryName & slave,
49  Order order = FIRST);
50  PenetrationLocator & getQuadraturePenetrationLocator(const BoundaryName & master,
51  const BoundaryName & slave,
52  Order order = FIRST);
53  PenetrationLocator & getMortarPenetrationLocator(const BoundaryName & master,
54  const BoundaryName & slave,
55  Moose::ConstraintType side_type,
56  Order order = FIRST);
57 
58  NearestNodeLocator & getNearestNodeLocator(const BoundaryName & master,
59  const BoundaryName & slave);
60  NearestNodeLocator & getNearestNodeLocator(const unsigned int master_id,
61  const unsigned int slave_id);
62 
63  NearestNodeLocator & getQuadratureNearestNodeLocator(const BoundaryName & master,
64  const BoundaryName & slave);
65  NearestNodeLocator & getQuadratureNearestNodeLocator(const unsigned int master_id,
66  const unsigned int slave_id);
67 
68  NearestNodeLocator & getMortarNearestNodeLocator(const BoundaryName & domain,
69  const BoundaryName & slave,
70  Moose::ConstraintType side_type);
71  NearestNodeLocator & getMortarNearestNodeLocator(const unsigned int master_id,
72  const unsigned int slave_id,
73  Moose::ConstraintType side_type);
74 
75  void addElementPairLocator(const unsigned int & interface_id,
76  std::shared_ptr<ElementPairLocator> epl);
77 
82 
86  void reinit();
87 
92 
98  Real maxPatchPercentage();
99 
100  // protected:
103  std::map<std::pair<unsigned int, unsigned int>, PenetrationLocator *> _penetration_locators;
104  std::map<std::pair<unsigned int, unsigned int>, NearestNodeLocator *> _nearest_node_locators;
105  std::map<unsigned int, std::shared_ptr<ElementPairLocator>> _element_pair_locators;
106 
107 protected:
109  std::set<unsigned int> _quadrature_boundaries;
110 
112  std::map<unsigned int, unsigned int> _slave_to_qslave;
113 
115  std::set<std::pair<unsigned int, unsigned int>> _mortar_boundaries;
116 
118  std::map<unsigned int, unsigned int> _boundary_to_mortarboundary;
119 
120 private:
128  void generateQuadratureNodes(unsigned int slave_id, unsigned int qslave_id);
129 
138  void generateMortarNodes(unsigned int master_id, unsigned int slave_id, unsigned int qslave_id);
139 
143  void updateQuadratureNodes(unsigned int slave_id);
144 
148  void reinitQuadratureNodes(unsigned int slave_id);
149 
153  bool _first;
154 
158  void updateMortarNodes();
159 
163  void reinitMortarNodes();
164 };
165 
166 #endif // GEOMETRICSEARCHDATA_H
std::set< unsigned int > _quadrature_boundaries
These are real boundaries that have quadrature nodes on them.
ConstraintType
Definition: MooseTypes.h:198
bool _first
Denotes whether this is the first time the geometric search objects have been updated.
PenetrationLocator & getQuadraturePenetrationLocator(const BoundaryName &master, const BoundaryName &slave, Order order=FIRST)
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
PenetrationLocator & getPenetrationLocator(const BoundaryName &master, const BoundaryName &slave, Order order=FIRST)
void addElementPairLocator(const unsigned int &interface_id, std::shared_ptr< ElementPairLocator > epl)
void updateMortarNodes()
Update the positions of the quadrature nodes for mortar interfaces.
void updateQuadratureNodes(unsigned int slave_id)
Update the positions of the quadrature nodes.
std::map< unsigned int, unsigned int > _slave_to_qslave
A mapping of the real boundary id to the slave boundary ids.
NearestNodeLocator & getMortarNearestNodeLocator(const BoundaryName &domain, const BoundaryName &slave, Moose::ConstraintType side_type)
NearestNodeLocator & getNearestNodeLocator(const BoundaryName &master, const BoundaryName &slave)
Real maxPatchPercentage()
Maximum percentage through the search patch that any NearestNodeLocator had to look.
NearestNodeLocator & getQuadratureNearestNodeLocator(const BoundaryName &master, const BoundaryName &slave)
void reinitQuadratureNodes(unsigned int slave_id)
Completely redo quadrature nodes.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
std::map< unsigned int, std::shared_ptr< ElementPairLocator > > _element_pair_locators
void reinit()
Completely redo all geometric search objects.
This is the ElementPairLocator class.
void reinitMortarNodes()
Completely redo quadrature nodes for mortar interfaces.
GeometricSearchType
Used to select groups of geometric search objects to update.
std::map< std::pair< unsigned int, unsigned int >, PenetrationLocator * > _penetration_locators
std::map< unsigned int, unsigned int > _boundary_to_mortarboundary
A mapping of the real boundary id to the slave boundary ids for mortar spaces.
MatType type
std::set< std::pair< unsigned int, unsigned int > > _mortar_boundaries
These are real boundaries that have quadrature nodes on them.
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
std::map< std::pair< unsigned int, unsigned int >, NearestNodeLocator * > _nearest_node_locators
void update(GeometricSearchType type=ALL)
Update all of the search objects.
void generateMortarNodes(unsigned int master_id, unsigned int slave_id, unsigned int qslave_id)
Add Quadrature Nodes to the Mesh in support of mortar based penetration location and nearest node sea...
PenetrationLocator & getMortarPenetrationLocator(const BoundaryName &master, const BoundaryName &slave, Moose::ConstraintType side_type, Order order=FIRST)
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
void generateQuadratureNodes(unsigned int slave_id, unsigned int qslave_id)
Add Quadrature Nodes to the Mesh in support of Quadrature based penetration location and nearest node...
GeometricSearchData(SubProblem &subproblem, MooseMesh &mesh)