www.mooseframework.org
LineFunctionSampler.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 LINEFUNCTIONSAMPLER_H
16 #define LINEFUNCTIONSAMPLER_H
17 
19 #include "SamplerBase.h"
20 
21 // Forward Declarations
22 class Function;
24 
25 template <>
27 
29 {
30 public:
32 
33  virtual void initialize() override;
34  virtual void execute() override;
35  virtual void finalize() override;
36 
37  // Let the SamplerBase version of threadJoin() take part in the
38  // overload resolution process, otherwise we get warnings about
39  // overloaded virtual functions and "hiding" in debug mode.
41 
42 protected:
44  Point _start_point;
45 
47  Point _end_point;
48 
50  unsigned int _num_points;
51 
53  const std::vector<FunctionName> & _function_names;
54 
56  unsigned int _num_funcs;
57 
59  std::vector<Function *> _functions;
60 
62  std::vector<Real> _values;
63 
65  std::vector<Point> _points;
66 
68  std::vector<Real> _ids;
69 };
70 
71 #endif
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition: SamplerBase.h:46
Base class for function objects.
Definition: Function.h:46
InputParameters validParams< LineFunctionSampler >()
Point _start_point
Beginning of the line.
LineFunctionSampler(const InputParameters &parameters)
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...
virtual void finalize() override
Finalize.
std::vector< Point > _points
The points to evaluate at.
virtual void threadJoin(const SamplerBase &y)
Join the values.
Definition: SamplerBase.C:141
Point _end_point
End of the line.
virtual void execute() override
Execute method.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
unsigned int _num_funcs
Number of Functions we&#39;re sampling.
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
std::vector< Function * > _functions
Pointers to the Functions.
const std::vector< FunctionName > & _function_names
Names of the Functions.
unsigned int _num_points
Number of points along the line.
virtual void initialize() override
Initialize the datastructures.
std::vector< Real > _values
So we don&#39;t have to create and destroy this vector over and over again.