www.mooseframework.org
LineValueSampler.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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
14 
16 {
17 public:
19 
21 
30  static void generatePointsAndIDs(const Point & start_point,
31  const Point & end_point,
32  unsigned int num_points,
33  std::vector<Point> & points,
34  std::vector<Real> & ids);
35 
41  virtual Real spatialValue(const Point & p) const override { return getValue(p); }
42 
47  Real getValue(const Point & p) const;
48 
49 protected:
50  const Point _start_point;
51  const Point _end_point;
52 
53  unsigned int & _num_points;
54 
57 
60 
63 
64 private:
66 };
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
Base class for sampling variable(s) at points.
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:192
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...
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.