https://mooseframework.inl.gov
SidesetInfoVectorPostprocessor.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
18 {
19 public:
21 
23 
24  virtual void initialize() override;
25  virtual void execute() override;
26  virtual void finalize() override;
27  virtual void meshChanged() override { initialize(); }
28 
29  virtual void threadJoin(const UserObject & y) override;
30 
31  struct BoundaryData
32  {
34  : area(0),
35  centroid(Point()),
36  min(Point(std::numeric_limits<Real>::max(),
37  std::numeric_limits<Real>::max(),
38  std::numeric_limits<Real>::max())),
39  max(Point(std::numeric_limits<Real>::lowest(),
40  std::numeric_limits<Real>::lowest(),
41  std::numeric_limits<Real>::lowest()))
42  {
43  }
45  Point centroid;
46  Point min;
47  Point max;
48  };
49 
50 protected:
52  Real dataHelper(BoundaryID bid, std::string mdat_tpe) const;
53 
56 
58  std::vector<std::string> _vpp_entry_names;
59 
62 
64  std::vector<VectorPostprocessorValue *> _meta_data;
65 
67  std::map<BoundaryID, BoundaryData> _boundary_data;
68 };
std::vector< VectorPostprocessorValue * > _meta_data
the vpp data is stored here
virtual void execute() override
Execute method.
VectorPostprocessorValue & _sideset_ids
the sideset id
Computes and outputs information (area, centroid, bounding box) about sidesets.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::map< BoundaryID, BoundaryData > _boundary_data
all data available through the meta_data_types is always accumulated
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::vector< std::string > _vpp_entry_names
the type of meta data that is written to file
SidesetInfoVectorPostprocessor(const InputParameters &parameters)
MultiMooseEnum _meta_data_types
the type of meta data that is written to file
virtual void meshChanged() override
Called on this object when the mesh changes.
boundary_id_type BoundaryID
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:203
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void finalize() override
Finalize.
Real dataHelper(BoundaryID bid, std::string mdat_tpe) const
a helper function for retrieving data from _boundary_info
const InputParameters & parameters() const
Get the parameters of the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
virtual void threadJoin(const UserObject &y) override
Must override.
Base class for user-specific data.
Definition: UserObject.h:40