https://mooseframework.inl.gov
PointSamplerBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 // MOOSE includes
15 #include "MooseVariableInterface.h"
16 #include "SamplerBase.h"
17 
22 {
23 public:
25 
27 
28  virtual ~PointSamplerBase() {}
29 
30  virtual void initialize();
31  virtual void finalize();
32 
33 protected:
42  const Elem * getLocalElemContainingPoint(const Point & p);
43 
46 
48  std::vector<Point> _points;
49 
51  std::vector<Real> _ids;
52 
54  std::vector<std::vector<Real>> _point_values;
55 
57  std::vector<short> _found_points;
58 
60  std::unique_ptr<libMesh::PointLocatorBase> _pl;
61 
63  const Real & _pp_value;
64 
67 
70 };
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition: SamplerBase.h:37
std::unique_ptr< libMesh::PointLocatorBase > _pl
Point locator.
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
virtual void initialize()
Initialize the datastructures.
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 bool _warn_discontinuous_face_values
Whether to return a warning if a discontinuous variable is sampled on a face.
static InputParameters validParams()
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:88
virtual ~PointSamplerBase()
const Real & _pp_value
Postprocessor multiplying the variables.
bool _discontinuous_at_faces
Whether values are requested for objects that are discontinuous on faces.
Base class for sampling objects (variables, functors etc) at points.
PointSamplerBase(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseMesh & _mesh
The Mesh we&#39;re using.