www.mooseframework.org
DiracKernelInfo.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef DIRACKERNELINFO_H
16 #define DIRACKERNELINFO_H
17 
18 #include "Moose.h"
19 
20 // libMesh
21 #include "libmesh/point.h"
22 
23 #include <set>
24 #include <map>
25 #include <memory>
26 
27 // Forward declarations
28 class MooseMesh;
29 
30 namespace libMesh
31 {
32 class Elem;
33 class PointLocatorBase;
34 }
35 
43 {
44 public:
46  virtual ~DiracKernelInfo();
47 
48 public:
54  void addPoint(const Elem * elem, Point p);
55 
59  void clearPoints();
60 
64  bool hasPoint(const Elem * elem, Point p);
65 
69  std::set<const Elem *> & getElements() { return _elements; }
70 
71  typedef std::map<const Elem *, std::pair<std::vector<Point>, std::vector<unsigned int>>>
73 
77  MultiPointMap & getPoints() { return _points; }
78 
83  void updatePointLocator(const MooseMesh & mesh);
84 
89  const Elem * findPoint(Point p, const MooseMesh & mesh);
90 
91 protected:
95  bool pointsFuzzyEqual(const Point &, const Point &);
96 
98  std::set<const Elem *> _elements;
99 
102 
107  std::unique_ptr<PointLocatorBase> _point_locator;
108 
111 };
112 
113 #endif // DIRACKERNELINFO_H
The DiracKernelInfo object is a place where all the Dirac points added by different DiracKernels are ...
std::set< const Elem * > _elements
The list of elements that need distributions.
MultiPointMap _points
The list of physical xyz Points that need to be evaluated in each element.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
std::unique_ptr< PointLocatorBase > _point_locator
The DiracKernelInfo object manages a PointLocator object which is used by all DiracKernels to find Po...
const Real _point_equal_distance_sq
threshold distance squared below which two points are considered identical
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.
std::map< const Elem *, std::pair< std::vector< Point >, std::vector< unsigned int > > > MultiPointMap