https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AverageSectionValueSampler.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#include "libmesh/communicator.h"
14
16{
17public:
19
21
22 virtual void initialSetup() override;
23 virtual void meshChanged() override;
24 virtual void initialize() override;
25 virtual void execute() override;
26 virtual void finalize() override;
27
28protected:
30 const std::shared_ptr<MooseMesh> & _mesh;
31
33 std::vector<VariableName> _variables;
34
36 std::vector<unsigned int> _var_numbers;
37
39 std::vector<VectorPostprocessorValue *> _output_vector;
40
41 // Block ids over which this postprocessor does the computation
42 std::vector<SubdomainID> _block_ids;
43
45 const Point _direction;
46
48 const Point _reference_point;
49
51 std::vector<Real> _positions;
52
55
57 RealVectorValue _symmetry_plane;
58
61
63 const Real _tolerance;
64
67 std::vector<unsigned int> _number_of_nodes;
68
71
74
77
78private:
85 Real axialPosition(const Node & node) const;
86
92};
void automaticallyLocatePositions()
Automatically identify all axial positions of nodes within the component and store their unique value...
const Real _cross_section_maximum_radius
Tolerance to disambiguate cross section locations in different components within the same block.
std::vector< unsigned int > _var_numbers
Indices of the variables in their systems.
const std::shared_ptr< MooseMesh > & _mesh
Reference to the mesh.
const Point _reference_point
Starting or reference point of the structural component to locate nodes on the cross section.
const Point _direction
Axis direction of the structural component.
const Real _tolerance
Tolerance to identify nodes on the user-prescribed cross section.
std::vector< SubdomainID > _block_ids
RealVectorValue _symmetry_plane
Vector normal to a symmetry plane, optionally defined if the section has a symmetry plane.
Real axialPosition(const Node &node) const
Determine axial distance of the point from the component's reference point.
std::vector< VectorPostprocessorValue * > _output_vector
Vector of outputs, where each entry is the vector of average values for single variable at the select...
const bool _have_symmetry_plane
Whether a symmetry plane has been defined by the user.
std::vector< Real > _positions
Axial positions along the component at which average values are computed.
std::vector< unsigned int > _number_of_nodes
Number of nodes for computing output (local and global).
std::vector< VariableName > _variables
Variables to output.
const bool _require_equal_node_counts
Whether to require the number of nodes at each axial location to be equal.
static InputParameters validParams()
const bool _automatically_locate_positions
Whether to automatically locate positions along section for averaging field values.
bool _need_mesh_initializations
Whether node locations need to be identified and nodes at positions need to be counted.
const InputParameters & parameters() const