www.mooseframework.org
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
GeometricSearchData Class Reference

#include <GeometricSearchData.h>

Public Types

enum  GeometricSearchType {
  ALL, NEAREST_NODE, PENETRATION, QUADRATURE,
  ELEMENTPAIR
}
 Used to select groups of geometric search objects to update. More...
 

Public Member Functions

 GeometricSearchData (SubProblem &subproblem, MooseMesh &mesh)
 
virtual ~GeometricSearchData ()
 
PenetrationLocatorgetPenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order=FIRST)
 
PenetrationLocatorgetQuadraturePenetrationLocator (const BoundaryName &primary, const BoundaryName &secondary, Order order=FIRST)
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
NearestNodeLocatorgetNearestNodeLocator (const BoundaryID primary_id, const BoundaryID secondary_id)
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryName &primary, const BoundaryName &secondary)
 
NearestNodeLocatorgetQuadratureNearestNodeLocator (const BoundaryID primary_id, const BoundaryID secondary_id)
 
const std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > & getPenetrationLocators () const
 
void addElementPairLocator (BoundaryID interface_id, std::shared_ptr< ElementPairLocator > epl)
 
void update (GeometricSearchType type=ALL)
 Update all of the search objects. More...
 
void reinit ()
 Completely redo all geometric search objects. More...
 
void clearNearestNodeLocators ()
 Clear out the Penetration Locators so they will redo the search. More...
 
Real maxPatchPercentage ()
 Maximum percentage through the search patch that any NearestNodeLocator had to look. More...
 
void updateGhostedElems ()
 Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch update strategy. More...
 

Public Attributes

SubProblem_subproblem
 
MooseMesh_mesh
 
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
 
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
 
std::map< BoundaryID, std::shared_ptr< ElementPairLocator > > _element_pair_locators
 

Protected Attributes

std::set< BoundaryID_quadrature_boundaries
 These are real boundaries that have quadrature nodes on them. More...
 
std::map< BoundaryID, BoundaryID_secondary_to_qsecondary
 A mapping of the real boundary id to the secondary boundary ids. More...
 

Private Member Functions

void generateQuadratureNodes (const BoundaryID secondary_id, const BoundaryID qsecondary_id, bool reiniting=false)
 Add Quadrature Nodes to the Mesh in support of Quadrature based penetration location and nearest node searching. More...
 
void updateQuadratureNodes (const BoundaryID secondary_id)
 Update the positions of the quadrature nodes. More...
 
void reinitQuadratureNodes (const BoundaryID secondary_id)
 Completely redo quadrature nodes. More...
 

Private Attributes

bool _first
 Denotes whether this is the first time the geometric search objects have been updated. More...
 

Detailed Description

Definition at line 28 of file GeometricSearchData.h.

Member Enumeration Documentation

◆ GeometricSearchType

Used to select groups of geometric search objects to update.

Enumerator
ALL 
NEAREST_NODE 
PENETRATION 
QUADRATURE 
ELEMENTPAIR 

Definition at line 32 of file GeometricSearchData.h.

Constructor & Destructor Documentation

◆ GeometricSearchData()

GeometricSearchData::GeometricSearchData ( SubProblem subproblem,
MooseMesh mesh 
)

Definition at line 23 of file GeometricSearchData.C.

24  : _subproblem(subproblem), _mesh(mesh), _first(true)
25 {
26  // do a check on the boundary IDs to see if any conflict will rise from computing QP node set IDs
27  const auto & nodeset_ids = _mesh.meshNodesetIds();
28  for (const auto id : nodeset_ids)
29  if (nodeset_ids.find(-id - 1) != nodeset_ids.end())
30  mooseError("Your mesh contains nodesets with negative IDs that interfere with QP nodeset IDs "
31  "potentially generated by the GeometricSearch system.");
32 }
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition: MooseMesh.C:2940
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:299
bool _first
Denotes whether this is the first time the geometric search objects have been updated.

◆ ~GeometricSearchData()

GeometricSearchData::~GeometricSearchData ( )
virtual

Definition at line 34 of file GeometricSearchData.C.

35 {
36  for (auto & it : _penetration_locators)
37  delete it.second;
38 
39  for (auto & it : _nearest_node_locators)
40  delete it.second;
41 }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators

Member Function Documentation

◆ addElementPairLocator()

void GeometricSearchData::addElementPairLocator ( BoundaryID  interface_id,
std::shared_ptr< ElementPairLocator epl 
)

Definition at line 308 of file GeometricSearchData.C.

310 {
311  _element_pair_locators[interface_id] = epl;
312 }
std::map< BoundaryID, std::shared_ptr< ElementPairLocator > > _element_pair_locators

◆ clearNearestNodeLocators()

void GeometricSearchData::clearNearestNodeLocators ( )

Clear out the Penetration Locators so they will redo the search.

Definition at line 124 of file GeometricSearchData.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

125 {
126  for (const auto & nnl_it : _nearest_node_locators)
127  {
128  NearestNodeLocator * nnl = nnl_it.second;
129  nnl->reinit();
130  }
131 }
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
void reinit()
Completely redo the search from scratch.
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators

◆ generateQuadratureNodes()

void GeometricSearchData::generateQuadratureNodes ( const BoundaryID  secondary_id,
const BoundaryID  qsecondary_id,
bool  reiniting = false 
)
private

Add Quadrature Nodes to the Mesh in support of Quadrature based penetration location and nearest node searching.

Parameters
secondary_idThe actual secondary_id (the one in the mesh)
qsecondary_idThe "fictitious" secondary_id that is going to be used for this quadrature nodeset
reinitingWhether we are reinitializing, e.g. whether we need to re-generate q-nodes

Definition at line 269 of file GeometricSearchData.C.

Referenced by reinitQuadratureNodes(), and update().

272 {
273  // Have we already generated quadrature nodes for this boundary id?
274  if (_quadrature_boundaries.find(secondary_id) != _quadrature_boundaries.end())
275  {
276  if (!reiniting)
277  return;
278  }
279  else
280  _quadrature_boundaries.insert(secondary_id);
281 
282  const MooseArray<Point> & points_face = _subproblem.assembly(0, 0).qPointsFace();
283 
285  for (const auto & belem : range)
286  {
287  const Elem * elem = belem->_elem;
288  const auto side = belem->_side;
289  const auto boundary_id = belem->_bnd_id;
290 
291  if (elem->processor_id() == _subproblem.processor_id())
292  {
293  if (boundary_id == (BoundaryID)secondary_id)
294  {
295  // All we should need to do here is reinit the underlying libMesh::FE object because that
296  // will get us the correct points for the current element and side
298  _subproblem.assembly(0, 0).reinit(elem, side);
299 
300  for (const auto qp : index_range(points_face))
301  _mesh.addQuadratureNode(elem, side, qp, qsecondary_id, points_face[qp]);
302  }
303  }
304  }
305 }
Node * addQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
Adds a fictitious "QuadratureNode".
Definition: MooseMesh.C:1393
std::set< BoundaryID > _quadrature_boundaries
These are real boundaries that have quadrature nodes on them.
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:2027
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid)=0
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
boundary_id_type BoundaryID
const MooseArray< Point > & qPointsFace() const
Returns the reference to the current quadrature being used.
Definition: Assembly.h:298
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1106
processor_id_type processor_id() const
auto index_range(const T &sizable)

◆ getNearestNodeLocator() [1/2]

NearestNodeLocator & GeometricSearchData::getNearestNodeLocator ( const BoundaryName &  primary,
const BoundaryName &  secondary 
)

Definition at line 213 of file GeometricSearchData.C.

Referenced by GeometricSearchInterface::getNearestNodeLocator(), getPenetrationLocator(), and getQuadratureNearestNodeLocator().

215 {
216  const auto primary_id = _mesh.getBoundaryID(primary);
217  const auto secondary_id = _mesh.getBoundaryID(secondary);
218 
219  _subproblem.addGhostedBoundary(primary_id);
220  _subproblem.addGhostedBoundary(secondary_id);
221 
222  return getNearestNodeLocator(primary_id, secondary_id);
223 }
NearestNodeLocator & getNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1475

◆ getNearestNodeLocator() [2/2]

NearestNodeLocator & GeometricSearchData::getNearestNodeLocator ( const BoundaryID  primary_id,
const BoundaryID  secondary_id 
)

Definition at line 226 of file GeometricSearchData.C.

228 {
229  NearestNodeLocator * nnl =
230  _nearest_node_locators[std::pair<BoundaryID, BoundaryID>(primary_id, secondary_id)];
231 
232  _subproblem.addGhostedBoundary(primary_id);
233  _subproblem.addGhostedBoundary(secondary_id);
234 
235  if (!nnl)
236  {
237  nnl = new NearestNodeLocator(_subproblem, _mesh, primary_id, secondary_id);
238  _nearest_node_locators[std::pair<BoundaryID, BoundaryID>(primary_id, secondary_id)] = nnl;
239  }
240 
241  return *nnl;
242 }
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.

◆ getPenetrationLocator()

PenetrationLocator & GeometricSearchData::getPenetrationLocator ( const BoundaryName &  primary,
const BoundaryName &  secondary,
Order  order = FIRST 
)

Definition at line 150 of file GeometricSearchData.C.

Referenced by DMSetUp_Moose_Pre(), and GeometricSearchInterface::getPenetrationLocator().

153 {
154  auto primary_id = _mesh.getBoundaryID(primary);
155  auto secondary_id = _mesh.getBoundaryID(secondary);
156 
157  _subproblem.addGhostedBoundary(primary_id);
158  _subproblem.addGhostedBoundary(secondary_id);
159 
160  PenetrationLocator * pl =
161  _penetration_locators[std::pair<BoundaryID, BoundaryID>(primary_id, secondary_id)];
162 
163  if (!pl)
164  {
166  *this,
167  _mesh,
168  primary_id,
169  secondary_id,
170  order,
171  getNearestNodeLocator(primary_id, secondary_id));
172  _penetration_locators[std::pair<BoundaryID, BoundaryID>(primary_id, secondary_id)] = pl;
173  }
174 
175  return *pl;
176 }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
NearestNodeLocator & getNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1475

◆ getPenetrationLocators()

const std::map<std::pair<BoundaryID, BoundaryID>, PenetrationLocator *>& GeometricSearchData::getPenetrationLocators ( ) const
inline

Definition at line 62 of file GeometricSearchData.h.

63  {
64  return _penetration_locators;
65  }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators

◆ getQuadratureNearestNodeLocator() [1/2]

NearestNodeLocator & GeometricSearchData::getQuadratureNearestNodeLocator ( const BoundaryName &  primary,
const BoundaryName &  secondary 
)

Definition at line 245 of file GeometricSearchData.C.

Referenced by GeometricSearchInterface::getQuadratureNearestNodeLocator(), and getQuadraturePenetrationLocator().

247 {
248  const auto primary_id = _mesh.getBoundaryID(primary);
249  const auto secondary_id = _mesh.getBoundaryID(secondary);
250 
251  _subproblem.addGhostedBoundary(primary_id);
252  _subproblem.addGhostedBoundary(secondary_id);
253 
254  return getQuadratureNearestNodeLocator(primary_id, secondary_id);
255 }
NearestNodeLocator & getQuadratureNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1475

◆ getQuadratureNearestNodeLocator() [2/2]

NearestNodeLocator & GeometricSearchData::getQuadratureNearestNodeLocator ( const BoundaryID  primary_id,
const BoundaryID  secondary_id 
)

Definition at line 258 of file GeometricSearchData.C.

260 {
261  // Generate a new boundary id (we use the negative numbers and subtract 1 to disambiguate id=0)
262  const auto qsecondary_id = -secondary_id - 1;
263 
264  _secondary_to_qsecondary[secondary_id] = qsecondary_id;
265  return getNearestNodeLocator(primary_id, qsecondary_id);
266 }
NearestNodeLocator & getNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
std::map< BoundaryID, BoundaryID > _secondary_to_qsecondary
A mapping of the real boundary id to the secondary boundary ids.

◆ getQuadraturePenetrationLocator()

PenetrationLocator & GeometricSearchData::getQuadraturePenetrationLocator ( const BoundaryName &  primary,
const BoundaryName &  secondary,
Order  order = FIRST 
)

Definition at line 179 of file GeometricSearchData.C.

Referenced by GeometricSearchInterface::getQuadraturePenetrationLocator().

182 {
183  const auto primary_id = _mesh.getBoundaryID(primary);
184  const auto secondary_id = _mesh.getBoundaryID(secondary);
185 
186  _subproblem.addGhostedBoundary(primary_id);
187  _subproblem.addGhostedBoundary(secondary_id);
188 
189  // Generate a new boundary id (we use the negative numbers and subtract 1 to disambiguate id=0)
190  const auto qsecondary_id = -secondary_id - 1;
191 
192  _secondary_to_qsecondary[secondary_id] = qsecondary_id;
193 
194  PenetrationLocator * pl =
195  _penetration_locators[std::pair<BoundaryID, BoundaryID>(primary_id, qsecondary_id)];
196 
197  if (!pl)
198  {
200  *this,
201  _mesh,
202  primary_id,
203  qsecondary_id,
204  order,
205  getQuadratureNearestNodeLocator(primary_id, secondary_id));
206  _penetration_locators[std::pair<BoundaryID, BoundaryID>(primary_id, qsecondary_id)] = pl;
207  }
208 
209  return *pl;
210 }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
std::map< BoundaryID, BoundaryID > _secondary_to_qsecondary
A mapping of the real boundary id to the secondary boundary ids.
NearestNodeLocator & getQuadratureNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
Definition: MooseMesh.C:1475

◆ maxPatchPercentage()

Real GeometricSearchData::maxPatchPercentage ( )

Maximum percentage through the search patch that any NearestNodeLocator had to look.

As this goes towards 1.0 it's indicative of needing to rebuild the patches.

Definition at line 134 of file GeometricSearchData.C.

135 {
136  Real max = 0.0;
137 
138  for (const auto & nnl_it : _nearest_node_locators)
139  {
140  NearestNodeLocator * nnl = nnl_it.second;
141 
142  if (nnl->_max_patch_percentage > max)
143  max = nnl->_max_patch_percentage;
144  }
145 
146  return max;
147 }
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
auto max(const L &left, const R &right)
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ reinit()

void GeometricSearchData::reinit ( )

Completely redo all geometric search objects.

This should be called when the mesh is adapted.

Definition at line 97 of file GeometricSearchData.C.

Referenced by FEProblemBase::meshChangedHelper(), and DisplacedProblem::updateMesh().

98 {
100  // Update the position of quadrature nodes first
101  for (const auto & qbnd : _quadrature_boundaries)
102  reinitQuadratureNodes(qbnd);
103 
104  for (const auto & nnl_it : _nearest_node_locators)
105  {
106  NearestNodeLocator * nnl = nnl_it.second;
107  nnl->reinit();
108  }
109 
110  for (const auto & pl_it : _penetration_locators)
111  {
112  PenetrationLocator * pl = pl_it.second;
113  pl->reinit();
114  }
115 
116  for (const auto & epl_it : _element_pair_locators)
117  {
118  ElementPairLocator & epl = *(epl_it.second);
119  epl.reinit();
120  }
121 }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
virtual void reinit()
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
std::set< BoundaryID > _quadrature_boundaries
These are real boundaries that have quadrature nodes on them.
void reinit()
Completely redo the search from scratch.
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1463
void reinitQuadratureNodes(const BoundaryID secondary_id)
Completely redo quadrature nodes.
This is the ElementPairLocator class.
std::map< BoundaryID, std::shared_ptr< ElementPairLocator > > _element_pair_locators
void reinit()
Completely redo the search from scratch.

◆ reinitQuadratureNodes()

void GeometricSearchData::reinitQuadratureNodes ( const BoundaryID  secondary_id)
private

Completely redo quadrature nodes.

Definition at line 343 of file GeometricSearchData.C.

Referenced by reinit().

344 {
345  // Regenerate the quadrature nodes
346  for (const auto & it : _secondary_to_qsecondary)
347  generateQuadratureNodes(it.first, it.second, /*reiniting=*/true);
348 }
std::map< BoundaryID, BoundaryID > _secondary_to_qsecondary
A mapping of the real boundary id to the secondary boundary ids.
void generateQuadratureNodes(const BoundaryID secondary_id, const BoundaryID qsecondary_id, bool reiniting=false)
Add Quadrature Nodes to the Mesh in support of Quadrature based penetration location and nearest node...

◆ update()

void GeometricSearchData::update ( GeometricSearchType  type = ALL)

Update all of the search objects.

Definition at line 44 of file GeometricSearchData.C.

Referenced by DisplacedProblem::updateGeomSearch(), FEProblemBase::updateGeomSearch(), and DisplacedProblem::updateMesh().

45 {
46  if (type == ALL || type == QUADRATURE || type == NEAREST_NODE)
47  {
48  if (_first) // Only do this once
49  {
50  _first = false;
51 
52  for (const auto & it : _secondary_to_qsecondary)
53  generateQuadratureNodes(it.first, it.second);
54 
55  // reinit on displaced mesh before update
56  for (const auto & epl_it : _element_pair_locators)
57  {
58  ElementPairLocator & epl = *(epl_it.second);
59  epl.reinit();
60  }
61  }
62 
63  // Update the position of quadrature nodes first
64  for (const auto & qbnd : _quadrature_boundaries)
66  }
67 
68  if (type == ALL || type == NEAREST_NODE)
69  {
70  for (const auto & nnl_it : _nearest_node_locators)
71  {
72  NearestNodeLocator * nnl = nnl_it.second;
73  nnl->findNodes();
74  }
75  }
76 
77  if (type == ALL || type == PENETRATION)
78  {
79  for (const auto & pl_it : _penetration_locators)
80  {
81  PenetrationLocator * pl = pl_it.second;
82  pl->detectPenetration();
83  }
84  }
85 
86  if (type == ALL || type == PENETRATION)
87  {
88  for (auto & elem_pair_locator_pair : _element_pair_locators)
89  {
90  ElementPairLocator & epl = (*elem_pair_locator_pair.second);
91  epl.update();
92  }
93  }
94 }
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
void findNodes()
This is the main method that is going to start the search.
virtual void reinit()
virtual void update()
bool _first
Denotes whether this is the first time the geometric search objects have been updated.
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
std::set< BoundaryID > _quadrature_boundaries
These are real boundaries that have quadrature nodes on them.
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
std::map< BoundaryID, BoundaryID > _secondary_to_qsecondary
A mapping of the real boundary id to the secondary boundary ids.
This is the ElementPairLocator class.
std::map< BoundaryID, std::shared_ptr< ElementPairLocator > > _element_pair_locators
void updateQuadratureNodes(const BoundaryID secondary_id)
Update the positions of the quadrature nodes.
void generateQuadratureNodes(const BoundaryID secondary_id, const BoundaryID qsecondary_id, bool reiniting=false)
Add Quadrature Nodes to the Mesh in support of Quadrature based penetration location and nearest node...

◆ updateGhostedElems()

void GeometricSearchData::updateGhostedElems ( )

Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch update strategy.

Definition at line 351 of file GeometricSearchData.C.

Referenced by FEProblemBase::possiblyRebuildGeomSearchPatches().

352 {
353  for (const auto & nnl_it : _nearest_node_locators)
354  {
355  NearestNodeLocator * nnl = nnl_it.second;
356  nnl->updateGhostedElems();
357  }
358 }
Finds the nearest node to each node in boundary1 to each node in boundary2 and the other way around...
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
void updateGhostedElems()
Updates the ghosted elements at the start of the time step for iterion patch update strategy...

◆ updateQuadratureNodes()

void GeometricSearchData::updateQuadratureNodes ( const BoundaryID  secondary_id)
private

Update the positions of the quadrature nodes.

Definition at line 315 of file GeometricSearchData.C.

Referenced by update().

316 {
317  const MooseArray<Point> & points_face = _subproblem.assembly(0, 0).qPointsFace();
318 
320  for (const auto & belem : range)
321  {
322  const Elem * elem = belem->_elem;
323  const auto side = belem->_side;
324  const auto boundary_id = belem->_bnd_id;
325 
326  if (elem->processor_id() == _subproblem.processor_id())
327  {
328  if (boundary_id == (BoundaryID)secondary_id)
329  {
330  // All we should need to do here is reinit the underlying libMesh::FE object because that
331  // will get us the correct points for the current element and side
333  _subproblem.assembly(0, 0).reinit(elem, side);
334 
335  for (const auto qp : index_range(points_face))
336  (*_mesh.getQuadratureNode(elem, side, qp)) = points_face[qp];
337  }
338  }
339  }
340 }
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
Definition: MooseMesh.h:2027
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid)=0
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
Definition: Assembly.C:1811
boundary_id_type BoundaryID
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
Definition: MooseMesh.C:1445
const MooseArray< Point > & qPointsFace() const
Returns the reference to the current quadrature being used.
Definition: Assembly.h:298
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
Definition: MooseMesh.C:1106
processor_id_type processor_id() const
auto index_range(const T &sizable)

Member Data Documentation

◆ _element_pair_locators

std::map<BoundaryID, std::shared_ptr<ElementPairLocator> > GeometricSearchData::_element_pair_locators

◆ _first

bool GeometricSearchData::_first
private

Denotes whether this is the first time the geometric search objects have been updated.

Definition at line 138 of file GeometricSearchData.h.

Referenced by update().

◆ _mesh

MooseMesh& GeometricSearchData::_mesh

◆ _nearest_node_locators

std::map<std::pair<BoundaryID, BoundaryID>, NearestNodeLocator *> GeometricSearchData::_nearest_node_locators

◆ _penetration_locators

std::map<std::pair<BoundaryID, BoundaryID>, PenetrationLocator *> GeometricSearchData::_penetration_locators

◆ _quadrature_boundaries

std::set<BoundaryID> GeometricSearchData::_quadrature_boundaries
protected

These are real boundaries that have quadrature nodes on them.

Definition at line 106 of file GeometricSearchData.h.

Referenced by generateQuadratureNodes(), reinit(), and update().

◆ _secondary_to_qsecondary

std::map<BoundaryID, BoundaryID> GeometricSearchData::_secondary_to_qsecondary
protected

A mapping of the real boundary id to the secondary boundary ids.

Definition at line 109 of file GeometricSearchData.h.

Referenced by getQuadratureNearestNodeLocator(), getQuadraturePenetrationLocator(), reinitQuadratureNodes(), and update().

◆ _subproblem

SubProblem& GeometricSearchData::_subproblem

The documentation for this class was generated from the following files: