https://mooseframework.inl.gov
Loading...
Searching...
No Matches
include
vectorpostprocessors
ExtraIDIntegralVectorPostprocessor.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
12
#include "
ElementVariableVectorPostprocessor.h
"
13
#include "
SpatialUserObjectFunctor.h
"
14
19
class
ExtraIDIntegralVectorPostprocessor
20
:
public
SpatialUserObjectFunctor
<ElementVariableVectorPostprocessor>
21
{
22
public
:
23
static
InputParameters
validParams
();
24
ExtraIDIntegralVectorPostprocessor
(
const
InputParameters
&
parameters
);
25
26
virtual
void
initialize
()
override
;
27
virtual
void
execute
()
override
;
28
virtual
void
finalize
()
override
;
29
virtual
void
threadJoin
(
const
UserObject
& uo)
override
;
31
const
std::vector<VectorPostprocessorValue *> &
getUniqueExtraIds
()
const
{
return
_extra_ids
; };
33
const
std::vector<VectorPostprocessorValue *> &
getIntegrals
()
const
{
return
_integrals
; };
34
35
using
SpatialUserObjectFunctor
<
ElementVariableVectorPostprocessor
>
::evaluate
;
36
38
virtual
Real
evaluate
(
const
ElemArg
& elem,
const
Moose::StateArg
& state)
const override
;
40
virtual
Real
evaluate
(
const
ElemQpArg
& qp,
const
Moose::StateArg
& state)
const override
;
41
42
protected
:
44
Real
elementValue
(
const
Elem * elem)
const
;
46
const
bool
_average
;
48
const
unsigned
int
_nvar
;
50
const
unsigned
int
_nprop
;
52
const
std::vector<MaterialPropertyName>
_prop_names
;
54
const
std::vector<ExtraElementIDName>
_extra_id
;
56
const
unsigned
int
_n_extra_id
;
57
// Map of element ids to parsed vpp ids
58
std::unordered_map<dof_id_type, dof_id_type>
_unique_vpp_ids
;
60
std::vector<VectorPostprocessorValue *>
_extra_ids
;
62
std::vector<const MooseVariable *>
_vars
;
64
std::vector<const VariableValue *>
_var_values
;
66
std::vector<const MaterialProperty<Real> *>
_props
;
68
std::vector<VectorPostprocessorValue *>
_integrals
;
70
std::vector<Real>
_volumes
;
72
unsigned
int
_spatial_evaluation_index
;
73
};
ElementVariableVectorPostprocessor.h
SpatialUserObjectFunctor.h
ElementVariableVectorPostprocessor
Base class VectorPostprocessors operating on elemental variables.
Definition
ElementVariableVectorPostprocessor.h:18
ExtraIDIntegralVectorPostprocessor
This ExtraIDIntegralVectorPostprocessor source code is to integrate variables based on parsed extra I...
Definition
ExtraIDIntegralVectorPostprocessor.h:21
ExtraIDIntegralVectorPostprocessor::_extra_ids
std::vector< VectorPostprocessorValue * > _extra_ids
Vectors holding extra IDs.
Definition
ExtraIDIntegralVectorPostprocessor.h:60
ExtraIDIntegralVectorPostprocessor::execute
virtual void execute() override
Execute method.
Definition
ExtraIDIntegralVectorPostprocessor.C:129
ExtraIDIntegralVectorPostprocessor::validParams
static InputParameters validParams()
Definition
ExtraIDIntegralVectorPostprocessor.C:20
ExtraIDIntegralVectorPostprocessor::_volumes
std::vector< Real > _volumes
Vector holding the volume of extra IDs.
Definition
ExtraIDIntegralVectorPostprocessor.h:70
ExtraIDIntegralVectorPostprocessor::_unique_vpp_ids
std::unordered_map< dof_id_type, dof_id_type > _unique_vpp_ids
Definition
ExtraIDIntegralVectorPostprocessor.h:58
ExtraIDIntegralVectorPostprocessor::_nvar
const unsigned int _nvar
Number of variables to be integrated.
Definition
ExtraIDIntegralVectorPostprocessor.h:48
ExtraIDIntegralVectorPostprocessor::_average
const bool _average
whether or not to compute volume average
Definition
ExtraIDIntegralVectorPostprocessor.h:46
ExtraIDIntegralVectorPostprocessor::_nprop
const unsigned int _nprop
Number of material properties to be integrated.
Definition
ExtraIDIntegralVectorPostprocessor.h:50
ExtraIDIntegralVectorPostprocessor::elementValue
Real elementValue(const Elem *elem) const
Get the value for an element based on the element extra element id.
Definition
ExtraIDIntegralVectorPostprocessor.C:196
ExtraIDIntegralVectorPostprocessor::getIntegrals
const std::vector< VectorPostprocessorValue * > & getIntegrals() const
Return Integral values.
Definition
ExtraIDIntegralVectorPostprocessor.h:33
ExtraIDIntegralVectorPostprocessor::_spatial_evaluation_index
unsigned int _spatial_evaluation_index
The index to the values that is used in 'evaluate' function.
Definition
ExtraIDIntegralVectorPostprocessor.h:72
ExtraIDIntegralVectorPostprocessor::evaluate
virtual Real evaluate(const ElemArg &elem, const Moose::StateArg &state) const override
Get values for an element based on the element extra element id.
ExtraIDIntegralVectorPostprocessor::_vars
std::vector< const MooseVariable * > _vars
Coupled MOOSE variables to be integrated.
Definition
ExtraIDIntegralVectorPostprocessor.h:62
ExtraIDIntegralVectorPostprocessor::finalize
virtual void finalize() override
Finalize.
Definition
ExtraIDIntegralVectorPostprocessor.C:150
ExtraIDIntegralVectorPostprocessor::_props
std::vector< const MaterialProperty< Real > * > _props
Material properties to be integrated.
Definition
ExtraIDIntegralVectorPostprocessor.h:66
ExtraIDIntegralVectorPostprocessor::threadJoin
virtual void threadJoin(const UserObject &uo) override
Must override.
Definition
ExtraIDIntegralVectorPostprocessor.C:166
ExtraIDIntegralVectorPostprocessor::getUniqueExtraIds
const std::vector< VectorPostprocessorValue * > & getUniqueExtraIds() const
Return extra ID list.
Definition
ExtraIDIntegralVectorPostprocessor.h:31
ExtraIDIntegralVectorPostprocessor::_var_values
std::vector< const VariableValue * > _var_values
Quadrature point values of coupled MOOSE variables.
Definition
ExtraIDIntegralVectorPostprocessor.h:64
ExtraIDIntegralVectorPostprocessor::_extra_id
const std::vector< ExtraElementIDName > _extra_id
Extra IDs in use.
Definition
ExtraIDIntegralVectorPostprocessor.h:54
ExtraIDIntegralVectorPostprocessor::initialize
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition
ExtraIDIntegralVectorPostprocessor.C:119
ExtraIDIntegralVectorPostprocessor::_prop_names
const std::vector< MaterialPropertyName > _prop_names
Name of material properties.
Definition
ExtraIDIntegralVectorPostprocessor.h:52
ExtraIDIntegralVectorPostprocessor::evaluate
virtual Real evaluate(const ElemQpArg &qp, const Moose::StateArg &state) const override
Get values for an element on qps based on the element extra element id.
ExtraIDIntegralVectorPostprocessor::_n_extra_id
const unsigned int _n_extra_id
Number of extra IDs in use.
Definition
ExtraIDIntegralVectorPostprocessor.h:56
ExtraIDIntegralVectorPostprocessor::_integrals
std::vector< VectorPostprocessorValue * > _integrals
Vectors holding integrals over extra IDs.
Definition
ExtraIDIntegralVectorPostprocessor.h:68
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition
InputParameters.h:68
MooseBase::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition
MooseBase.h:131
SpatialUserObjectFunctor
Base class for creating a user object with the SpatialUserObject and Moose::Functor APIs.
Definition
SpatialUserObjectFunctor.h:21
UserObject
Base class for user-specific data.
Definition
UserObject.h:20
Moose::ElemArg
A structure that is used to evaluate Moose functors logically at an element/cell center.
Definition
MooseFunctorArguments.h:29
Moose::ElemQpArg
Argument for requesting functor evaluation at a quadrature point location in an element.
Definition
MooseFunctorArguments.h:284
Moose::StateArg
State argument for evaluating functors.
Definition
MooseFunctorArguments.h:122
Generated on Fri Aug 21 2026 13:33:52 for https://mooseframework.inl.gov by
1.9.8