forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SidesetInfoVectorPostprocessor.h
68 lines (54 loc) · 1.89 KB
/
SidesetInfoVectorPostprocessor.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
61
62
63
64
65
66
67
68
//* 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 "SideVectorPostprocessor.h"
// Forward Declarations
class SidesetInfoVectorPostprocessor;
template <>
InputParameters validParams<SidesetInfoVectorPostprocessor>();
class SidesetInfoVectorPostprocessor : public SideVectorPostprocessor
{
public:
SidesetInfoVectorPostprocessor(const InputParameters & parameters);
virtual void initialize() override;
virtual void execute() override;
virtual void finalize() override;
virtual void threadJoin(const UserObject & y) override;
struct BoundaryData
{
BoundaryData()
: area(0),
centroid(Point()),
min(Point(std::numeric_limits<Real>::max(),
std::numeric_limits<Real>::max(),
std::numeric_limits<Real>::max())),
max(Point(std::numeric_limits<Real>::lowest(),
std::numeric_limits<Real>::lowest(),
std::numeric_limits<Real>::lowest()))
{
}
Real area;
Point centroid;
Point min;
Point max;
};
protected:
/// a helper function for retrieving data from _boundary_info
Real dataHelper(BoundaryID bid, std::string mdat_tpe) const;
/// the type of meta data that is written to file
MultiMooseEnum _meta_data_types;
/// the type of meta data that is written to file
std::vector<std::string> _vpp_entry_names;
/// the sideset id
VectorPostprocessorValue & _sideset_ids;
/// the vpp data is stored here
std::vector<VectorPostprocessorValue *> _meta_data;
/// all data available through the meta_data_types is always accumulated
std::map<BoundaryID, BoundaryData> _boundary_data;
};