forked from idaholab/moose
/
SpatialUserObjectVectorPostprocessor.h
60 lines (48 loc) · 1.68 KB
/
SpatialUserObjectVectorPostprocessor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "GeneralVectorPostprocessor.h"
class SpatialUserObjectVectorPostprocessor;
template <>
InputParameters validParams<SpatialUserObjectVectorPostprocessor>();
/**
* SpatialUserObjectVectorPostprocessor is a type of VectorPostprocessor that outputs the
* values of a spatial user object as a vector in the order of the provided points.
*/
class SpatialUserObjectVectorPostprocessor : public GeneralVectorPostprocessor
{
public:
static InputParameters validParams();
/**
* Class constructor
* @param parameters The input parameters
*/
SpatialUserObjectVectorPostprocessor(const InputParameters & parameters);
/**
* Initialize, clears the postprocessor vector
*/
virtual void initialize() override;
/**
* Populates the postprocessor vector of values with the userobject evaluations in space
*/
virtual void execute() override;
/**
* Read the points at which to evaluate from a vector ('points'), a file ('points_file'),
* or neither (which will read from the user object directly if it satisfies the
* spatialPoints interface)
*/
void fillPoints();
protected:
/// The VectorPostprocessorValue object where the results are stored
VectorPostprocessorValue & _uo_vec;
/// Userobject to evaluate spatially
const UserObject & _uo;
/// Points at which to evaluate the user object
std::vector<Point> _points;
};