www.mooseframework.org
LineFunctionSampler.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 
13 #include "SamplerBase.h"
14 
15 // Forward Declarations
16 class Function;
18 {
19 public:
21 
23 
24  virtual void initialize() override;
25  virtual void execute() override;
26  virtual void finalize() override;
27 
28 protected:
30  Point _start_point;
31 
33  Point _end_point;
34 
36  unsigned int _num_points;
37 
39  const std::vector<FunctionName> & _function_names;
40 
42  unsigned int _num_funcs;
43 
45  std::vector<const Function *> _functions;
46 
48  std::vector<Real> _values;
49 
51  std::vector<Point> _points;
52 
54  std::vector<Real> _ids;
55 };
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
Definition: SamplerBase.h:36
Base class for function objects.
Definition: Function.h:37
std::vector< const Function * > _functions
Pointers to the Functions.
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.
Point _end_point
End of the line.
virtual void execute() override
Execute method.
unsigned int _num_funcs
Number of Functions we&#39;re sampling.
const InputParameters & parameters() const
Get the parameters of the object.
std::vector< Real > _ids
The ID to use for each point (yes, this is Real on purpose)
const std::vector< FunctionName > & _function_names
Names of the Functions.
static InputParameters validParams()
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.