153 typedef std::map<const Elem *, std::vector<std::pair<Point, unsigned>>>
reverse_cache_t;
162 void updateCaches(
const Elem * old_elem,
const Elem * new_elem, Point p,
unsigned id);
An interface that restricts an object to subdomains via the 'blocks' input parameter.
DiracKernelBase is the base class for all DiracKernel type classes.
unsigned int _i
i-th, j-th index for enumerating shape and test functions
const bool _allow_moving_sources
Whether Dirac sources can move during the simulation.
const Elem * addPointWithValidId(Point p, unsigned id, Real value)
A helper function for addPoint(Point, id) for when id != invalid_uint.
const Elem *const & _current_elem
Current element.
std::map< const Elem *, std::vector< std::pair< Point, unsigned > > > reverse_cache_t
Map from Elem* to a list of (Dirac point, id) pairs which can be used in a user's computeQpResidual()...
unsigned int _qp
Quadrature point index.
reverse_cache_t _reverse_point_cache
virtual void addPoints()=0
This is where the DiracKernel should call addPoint() for each point it needs to have a value distribu...
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint, Real value=1.0)
Add the physical x,y,z point located in the element "elem" to the list of points this DiracKernel wil...
const Moose::CoordinateSystemType & _coord_sys
Coordinate system.
DiracKernelInfo & _dirac_kernel_info
Place for storing Point/Elem information shared across all DiracKernel objects.
const MooseArray< Real > & _JxW
Transformed Jacobian weights.
const DiracKernelInfo::PointNotFoundBehavior _point_not_found_behavior
What to do if the point is not found. See DiracKernelInfo for definition.
const MooseArray< Point > & _q_point
Quadrature points.
bool hasPointsOnElem(const Elem *elem)
Whether or not this DiracKernel has something to distribute on this element.
point_cache_t _point_cache
std::map< unsigned, std::pair< const Elem *, Point > > point_cache_t
Data structure for caching user-defined IDs which can be mapped to specific std::pair<const Elem*,...
void clearPoints()
Remove all of the current points and elements.
bool isActiveAtPoint(const Elem *elem, const Point &p)
Whether or not this DiracKernel has something to distribute at this Point.
void clearPointsCaches()
Clear the cache of points because the points may have moved.
const QBase *const & _qrule
Quadrature rule.
const MooseArray< Point > & _physical_point
Physical points.
virtual void computeOffDiagJacobian(unsigned int jvar) override=0
Computes the off-diagonal Jacobian for variable jvar.
const bool _drop_duplicate_points
drop duplicate points or consider them in residual and Jacobian
Point _current_point
The current point.
DiracKernelInfo _local_dirac_kernel_info
Place for storing Point/Elem information only for this DiracKernel.
static InputParameters validParams()
virtual void meshChanged() override
Clear point cache when the mesh changes, so that element coarsening, element deletion,...
void updateCaches(const Elem *old_elem, const Elem *new_elem, Point p, unsigned id)
This function is used internally when the Elem for a locally-cached point needs to be updated.
unsigned currentPointCachedID()
Returns the user-assigned ID of the current Dirac point if it exits, and libMesh::invalid_uint otherw...
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are ...
An interface for accessing Materials.
const InputParameters & parameters() const
Get the parameters of the object.
This is the common base class for objects that give residual contributions.
const unsigned int invalid_uint