forked from idaholab/moose
/
IntegralReportingIDVPP.h
48 lines (42 loc) · 1.63 KB
/
IntegralReportingIDVPP.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
//* 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 "ElementVariableVectorPostprocessor.h"
#include <ostream>
/**
* This IntegralReportingIDVPP source code is to integrate variables based on reporting IDs
*/
class IntegralReportingIDVPP : public ElementVariableVectorPostprocessor
{
public:
static InputParameters validParams();
IntegralReportingIDVPP(const InputParameters & parameters);
virtual void initialize() override;
virtual void execute() override;
virtual void finalize() override;
virtual void threadJoin(const UserObject & uo) override;
protected:
/// Number of variables to be integrated on pins
const unsigned int _nvar;
/// Reporting IDs in use
const std::vector<ExtraElementIDName> _reporting_id;
/// Number of reporting IDs in use
const unsigned int _n_reporting_id;
// Map of element ids to parsed vpp ids
std::map<dof_id_type, dof_id_type> _unique_vpp_ids;
/// Vectors holding reporting IDs
std::vector<VectorPostprocessorValue *> _var_reporting_ids;
/// Coupled MOOSE variables to be integrated
std::vector<const MooseVariable *> _vars;
/// Quadrature point values of coupled MOOSE variables
std::vector<const VariableValue *> _var_values;
/// Vectors holding variable integrals over reporting IDs
std::vector<VectorPostprocessorValue *> _var_integrals;
};