https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
16#include "SamplerBase.h"
17
22{
23public:
25
27
28 virtual ~PointSamplerBase() {}
29
30 virtual void initialize();
31 virtual void finalize();
32
33protected:
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};
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Base class for sampling objects (variables, functors etc) at points.
std::vector< Point > _points
The points to evaluate at.
const Elem * getLocalElemContainingPoint(const Point &p)
Find the local element that contains the point.
std::vector< std::vector< Real > > _point_values
Vector of values per point.
const Real & _pp_value
Postprocessor multiplying the variables.
std::vector< short > _found_points
Whether or not the Point was found on this processor (short because bool and char don't work with MPI...
MooseMesh & _mesh
The Mesh we're using.
virtual ~PointSamplerBase()
static InputParameters validParams()
std::unique_ptr< libMesh::PointLocatorBase > _pl
Point locator.
virtual void finalize()
Finalize.
bool _discontinuous_at_faces
Whether values are requested for objects that are discontinuous on faces.
virtual void initialize()
Called before execute() is ever called so that data can be cleared.
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
const bool _warn_discontinuous_face_values
Whether to return a warning if a discontinuous variable is sampled on a face.
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition SamplerBase.h:38