157 typedef std::map<const Elem *, std::vector<std::pair<Point, unsigned>>>
reverse_cache_t;
166 void updateCaches(
const Elem * old_elem,
const Elem * new_elem, Point p,
unsigned id);
const QBase *const & _qrule
Quadrature rule.
const bool _allow_moving_sources
Whether Dirac sources can move during the simulation.
bool hasPointsOnElem(const Elem *elem)
Whether or not this DiracKernel has something to distribute on this element.
const PointNotFoundBehavior _point_not_found_behavior
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are ...
const MooseArray< Point > & _q_point
Quadrature points.
const unsigned int invalid_uint
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()...
virtual void meshChanged() override
Clear point cache when the mesh changes, so that element coarsening, element deletion, and distributed mesh repartitioning don't leave this with an invalid cache.
void clearPoints()
Remove all of the current points and elements.
DiracKernelInfo & _dirac_kernel_info
Place for storing Point/Elem information shared across all DiracKernel objects.
point_cache_t _point_cache
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint)
Add the physical x,y,z point located in the element "elem" to the list of points this DiracKernel wil...
unsigned currentPointCachedID()
Returns the user-assigned ID of the current Dirac point if it exits, and libMesh::invalid_uint otherw...
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*...
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
This gets called by computeOffDiagJacobian() at each quadrature point.
DiracKernelBase(const InputParameters ¶meters)
const MooseArray< Real > & _JxW
Transformed Jacobian weights.
static InputParameters validParams()
bool isActiveAtPoint(const Elem *elem, const Point &p)
Whether or not this DiracKernel has something to distribute at this Point.
const MooseArray< Point > & _physical_point
Physical points.
DiracKernelInfo _local_dirac_kernel_info
Place for storing Point/Elem information only for this DiracKernel.
const Elem *const & _current_elem
reverse_cache_t _reverse_point_cache
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This is the common base class for objects that give residual contributions.
An interface for accessing Materials.
const Moose::CoordinateSystemType & _coord_sys
Coordinate system.
unsigned int _qp
Quadrature point index.
void clearPointsCaches()
Clear the cache of points because the points may have moved.
An interface that restricts an object to subdomains via the 'blocks' input parameter.
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...
virtual void addPoints()=0
This is where the DiracKernel should call addPoint() for each point it needs to have a value distribu...
const InputParameters & parameters() const
Get the parameters of the object.
const bool _drop_duplicate_points
drop duplicate points or consider them in residual and Jacobian
unsigned int _i
i-th, j-th index for enumerating shape and test functions
virtual void computeOffDiagJacobian(unsigned int jvar) override=0
Computes the off-diagonal Jacobian for variable jvar.
DiracKernelBase is the base class for all DiracKernel type classes.
const Elem * addPointWithValidId(Point p, unsigned id)
A helper function for addPoint(Point, id) for when id != invalid_uint.
Point _current_point
The current point.