https://mooseframework.inl.gov
LineValueSampler.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 
16 class LineValueSampler : public SpatialUserObjectFunctor<PointVariableSamplerBase>
17 {
18 public:
20 
22 
31  static void generatePointsAndIDs(const Point & start_point,
32  const Point & end_point,
33  unsigned int num_points,
34  std::vector<Point> & points,
35  std::vector<Real> & ids);
36 
42  virtual Real spatialValue(const Point & p) const override { return getValue(p); }
43 
48  Real getValue(const Point & p) const;
49 
50 protected:
51  const Point _start_point;
52  const Point _end_point;
53 
54  unsigned int & _num_points;
55 
58 
61 
64 
65 private:
67 };
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real getValue(const Point &p) const
Gets the value of the variable at a point p.
const Point _end_point
const Real _line_vector_norm
Length of line segment.
static InputParameters validParams()
LineValueSampler(const InputParameters &parameters)
unsigned int & _num_points
const VectorPostprocessorValue & _vpp_value
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:203
const Point _start_point
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const RealVectorValue _line_vector
Vector connecting the start and end points of the line segment.
static void generatePointsAndIDs(const Point &start_point, const Point &end_point, unsigned int num_points, std::vector< Point > &points, std::vector< Real > &ids)
Helper function to generate the list of points along a line and a unique ID for each point...
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs...
const InputParameters & parameters() const
Get the parameters of the object.
const RealVectorValue _zero
Zero vector.
virtual Real spatialValue(const Point &p) const override
Gets the value of the variable at a point p.