www.mooseframework.org
PointSamplerBase.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 POINTSAMPLERBASE_H
16 #define POINTSAMPLERBASE_H
17 
18 // MOOSE includes
21 #include "SamplerBase.h"
22 
23 // Forward Declarations
24 class PointSamplerBase;
25 
26 template <>
28 
31  protected SamplerBase
32 {
33 public:
35 
36  virtual ~PointSamplerBase() {}
37 
38  virtual void initialize();
39  virtual void execute();
40  virtual void finalize();
41 
42 protected:
51  const Elem * getLocalElemContainingPoint(const Point & p);
52 
55 
57  std::vector<Point> _points;
58 
60  std::vector<Real> _ids;
61 
63  std::vector<std::vector<Real>> _point_values;
64 
66  std::vector<short> _found_points;
67 
68  unsigned int _qp;
69 
70  std::unique_ptr<PointLocatorBase> _pl;
71 };
72 
73 #endif
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition: SamplerBase.h:46
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
virtual void initialize()
Initialize the datastructures.
unsigned int _qp
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< Point > _points
The points to evaluate at.
virtual void finalize()
Finalize.
std::vector< std::vector< Real > > _point_values
Vector of values per point.
const Elem * getLocalElemContainingPoint(const Point &p)
Find the local element that contains the point.
std::vector< short > _found_points
Whether or not the Point was found on this processor (short because bool and char don&#39;t work with MPI...
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
virtual ~PointSamplerBase()
virtual void execute()
Execute method.
PointSamplerBase(const InputParameters &parameters)
InputParameters validParams< PointSamplerBase >()
Intermediate base class that ties together all the interfaces for getting MooseVariables with the Moo...
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
std::unique_ptr< PointLocatorBase > _pl
MooseMesh & _mesh
The Mesh we&#39;re using.