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, Point p) |
Adds a point source. More... | |
void | clearPoints () |
Remove all of the current points and elements. More... | |
bool | hasPoint (const Elem *elem, 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 (Point p, const MooseMesh &mesh) |
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, |
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 DiracKernel::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 DiracKernel::clearPoints().
const Elem * DiracKernelInfo::findPoint | ( | Point | p, |
const MooseMesh & | mesh | ||
) |
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 DiracKernel::addPoint(), and DiracKernel::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 DiracKernel::hasPointsOnElem().
|
inline |
Returns a writeable reference to the _points container.
Definition at line 70 of file DiracKernelInfo.h.
Referenced by DiracKernel::computeJacobian(), DiracKernel::computeOffDiagJacobian(), DiracKernel::computeResidual(), DisplacedProblem::reinitDirac(), and FEProblemBase::reinitDirac().
bool DiracKernelInfo::hasPoint | ( | const Elem * | elem, |
Point | p | ||
) |
Return true if we have Point 'p' in Element 'elem'.
Definition at line 58 of file DiracKernelInfo.C.
Referenced by DiracKernel::isActiveAtPoint().
|
protected |
Check if two points are equal with respect to a tolerance.
Definition at line 149 of file DiracKernelInfo.C.
Referenced by addPoint(), and hasPoint().
void DiracKernelInfo::updatePointLocator | ( | const MooseMesh & | mesh | ) |
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels.
Definition at line 71 of file DiracKernelInfo.C.
Referenced by DisplacedProblem::meshChanged(), FEProblemBase::meshChangedHelper(), and DisplacedProblem::updateMesh().
|
protected |
The list of elements that need distributions.
Definition at line 91 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 103 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 100 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 94 of file DiracKernelInfo.h.
Referenced by addPoint(), clearPoints(), getPoints(), and hasPoint().