The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are collected. More...
#include <DiracKernelInfo.h>
Public Types | |
typedef std::map< const Elem *, std::pair< std::vector< Point >, std::vector< unsigned int > > > | MultiPointMap |
Public Member Functions | |
DiracKernelInfo () | |
virtual | ~DiracKernelInfo () |
void | addPoint (const Elem *elem, const Point &p) |
Adds a point source. More... | |
void | clearPoints () |
Remove all of the current points and elements. More... | |
bool | hasPoint (const Elem *elem, const Point &p) |
Return true if we have Point 'p' in Element 'elem'. More... | |
std::set< const Elem * > & | getElements () |
Returns a writeable reference to the _elements container. More... | |
MultiPointMap & | getPoints () |
Returns a writeable reference to the _points container. More... | |
void | updatePointLocator (const MooseMesh &mesh) |
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels. More... | |
const Elem * | findPoint (const Point &p, const MooseMesh &mesh, const std::set< SubdomainID > &blocks) |
Used by client DiracKernel classes to determine the Elem in which the Point p resides. More... | |
Protected Member Functions | |
bool | pointsFuzzyEqual (const Point &, const Point &) |
Check if two points are equal with respect to a tolerance. More... | |
Protected Attributes | |
std::set< const Elem * > | _elements |
The list of elements that need distributions. More... | |
MultiPointMap | _points |
The list of physical xyz Points that need to be evaluated in each element. More... | |
std::unique_ptr< PointLocatorBase > | _point_locator |
The DiracKernelInfo object manages a PointLocator object which is used by all DiracKernels to find Points. More... | |
const Real | _point_equal_distance_sq |
threshold distance squared below which two points are considered identical More... | |
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are collected.
It is used, for example, by the FEProblemBase class to determine if finite element data needs to be recomputed on a given element.
Definition at line 35 of file DiracKernelInfo.h.
typedef std::map<const Elem *, std::pair<std::vector<Point>, std::vector<unsigned int> > > DiracKernelInfo::MultiPointMap |
Definition at line 65 of file DiracKernelInfo.h.
DiracKernelInfo::DiracKernelInfo | ( | ) |
Definition at line 19 of file DiracKernelInfo.C.
|
virtual |
Definition at line 24 of file DiracKernelInfo.C.
void DiracKernelInfo::addPoint | ( | const Elem * | elem, |
const Point & | p | ||
) |
Adds a point source.
elem | Pointer to the geometric element in which the point is located |
p | The (x,y,z) location of the Dirac point |
Definition at line 27 of file DiracKernelInfo.C.
Referenced by DiracKernelBase::addPoint().
void DiracKernelInfo::clearPoints | ( | ) |
Remove all of the current points and elements.
Definition at line 51 of file DiracKernelInfo.C.
Referenced by DisplacedProblem::clearDiracInfo(), FEProblemBase::clearDiracInfo(), and DiracKernelBase::clearPoints().
const Elem * DiracKernelInfo::findPoint | ( | const Point & | p, |
const MooseMesh & | mesh, | ||
const std::set< SubdomainID > & | blocks | ||
) |
Used by client DiracKernel classes to determine the Elem in which the Point p resides.
Uses the PointLocator owned by this object.
Definition at line 111 of file DiracKernelInfo.C.
Referenced by DiracKernelBase::addPoint(), and DiracKernelBase::addPointWithValidId().
|
inline |
Returns a writeable reference to the _elements container.
Definition at line 62 of file DiracKernelInfo.h.
Referenced by DisplacedProblem::getDiracElements(), FEProblemBase::getDiracElements(), and DiracKernelBase::hasPointsOnElem().
|
inline |
Returns a writeable reference to the _points container.
Definition at line 70 of file DiracKernelInfo.h.
Referenced by DisplacedProblem::reinitDirac(), and FEProblemBase::reinitDirac().
bool DiracKernelInfo::hasPoint | ( | const Elem * | elem, |
const Point & | p | ||
) |
Return true if we have Point 'p' in Element 'elem'.
Definition at line 58 of file DiracKernelInfo.C.
Referenced by DiracKernelBase::isActiveAtPoint().
|
protected |
Check if two points are equal with respect to a tolerance.
Definition at line 151 of file DiracKernelInfo.C.
Referenced by addPoint(), and hasPoint().
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels.
Definition at line 71 of file DiracKernelInfo.C.
Referenced by FEProblemBase::meshChangedHelper(), and DisplacedProblem::updateMesh().
|
protected |
The list of elements that need distributions.
Definition at line 92 of file DiracKernelInfo.h.
Referenced by addPoint(), clearPoints(), getElements(), and updatePointLocator().
|
protected |
threshold distance squared below which two points are considered identical
Definition at line 104 of file DiracKernelInfo.h.
Referenced by pointsFuzzyEqual().
|
protected |
The DiracKernelInfo object manages a PointLocator object which is used by all DiracKernels to find Points.
It needs to be centrally managed and it also needs to be rebuilt in FEProblemBase::meshChanged() to work with Mesh adaptivity.
Definition at line 101 of file DiracKernelInfo.h.
Referenced by findPoint(), and updatePointLocator().
|
protected |
The list of physical xyz Points that need to be evaluated in each element.
Definition at line 95 of file DiracKernelInfo.h.
Referenced by addPoint(), clearPoints(), getPoints(), and hasPoint().