19 #include "libmesh/elem.h" 20 #include "libmesh/node.h" 21 #include "libmesh/int_range.h" 24 : _subproblem(subproblem), _mesh(
mesh), _first(true)
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.");
151 const BoundaryName & secondary,
180 const BoundaryName & secondary,
190 const auto qsecondary_id = -secondary_id - 1;
214 const BoundaryName & secondary)
246 const BoundaryName & secondary)
262 const auto qsecondary_id = -secondary_id - 1;
285 for (
const auto & belem : range)
287 const Elem * elem = belem->_elem;
288 const auto side = belem->_side;
289 const auto boundary_id = belem->_bnd_id;
309 std::shared_ptr<ElementPairLocator> epl)
320 for (
const auto & belem : range)
322 const Elem * elem = belem->_elem;
323 const auto side = belem->_side;
324 const auto boundary_id = belem->_bnd_id;
Real _max_patch_percentage
Node * addQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp, BoundaryID bid, const Point &point)
Adds a fictitious "QuadratureNode".
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
std::map< std::pair< BoundaryID, BoundaryID >, PenetrationLocator * > _penetration_locators
void findNodes()
This is the main method that is going to start the search.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
bool _first
Denotes whether this is the first time the geometric search objects have been updated.
NearestNodeLocator & getNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
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.
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > ConstBndElemRange
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid)=0
void reinit()
Completely redo the search from scratch.
virtual ~GeometricSearchData()
void reinit(const Elem *elem)
Reinitialize objects (JxW, q_points, ...) for an elements.
auto max(const L &left, const R &right)
void updateGhostedElems()
Updates the list of ghosted elements at the start of each time step for the nonlinear iteration patch...
Real maxPatchPercentage()
Maximum percentage through the search patch that any NearestNodeLocator had to look.
PenetrationLocator & getPenetrationLocator(const BoundaryName &primary, const BoundaryName &secondary, Order order=FIRST)
std::map< std::pair< BoundaryID, BoundaryID >, NearestNodeLocator * > _nearest_node_locators
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
void reinitQuadratureNodes(const BoundaryID secondary_id)
Completely redo quadrature nodes.
void addElementPairLocator(BoundaryID interface_id, std::shared_ptr< ElementPairLocator > epl)
std::map< BoundaryID, BoundaryID > _secondary_to_qsecondary
A mapping of the real boundary id to the secondary boundary ids.
boundary_id_type BoundaryID
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
PenetrationLocator & getQuadraturePenetrationLocator(const BoundaryName &primary, const BoundaryName &secondary, Order order=FIRST)
NearestNodeLocator & getQuadratureNearestNodeLocator(const BoundaryName &primary, const BoundaryName &secondary)
void reinit()
Completely redo all geometric search objects.
void updateGhostedElems()
Updates the ghosted elements at the start of the time step for iterion patch update strategy...
This is the ElementPairLocator class.
std::map< BoundaryID, std::shared_ptr< ElementPairLocator > > _element_pair_locators
GeometricSearchType
Used to select groups of geometric search objects to update.
Node * getQuadratureNode(const Elem *elem, const unsigned short int side, const unsigned int qp)
Get a specified quadrature node.
void updateQuadratureNodes(const BoundaryID secondary_id)
Update the positions of the quadrature nodes.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Generic class for solving transient nonlinear problems.
virtual void addGhostedBoundary(BoundaryID boundary_id)=0
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
const MooseArray< Point > & qPointsFace() const
Returns the reference to the current quadrature being used.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
void update(GeometricSearchType type=ALL)
Update all of the search objects.
StoredRange< MooseMesh::const_bnd_elem_iterator, const BndElement * > * getBoundaryElementRange()
void reinit()
Completely redo the search from scratch.
processor_id_type processor_id() const
void clearNearestNodeLocators()
Clear out the Penetration Locators so they will redo the search.
auto index_range(const T &sizable)
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const
Get the associated BoundaryID for the boundary name.
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...
GeometricSearchData(SubProblem &subproblem, MooseMesh &mesh)