Line data Source code
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 "GeneralReporter.h" 13 : #include "ExtraIDIntegralVectorPostprocessor.h" 14 : 15 : class ExtraIDIntegralReporter : public GeneralReporter 16 : { 17 : public: 18 : static InputParameters validParams(); 19 : ExtraIDIntegralReporter(const InputParameters & parameters); 20 30 : virtual void initialize() override {} 21 30 : virtual void finalize() override {} 22 30 : virtual void execute() override {} 23 : 24 : struct ExtraIDData 25 : { 26 : dof_id_type num_names; 27 : std::vector<ExtraElementIDName> names; 28 : std::vector<std::vector<dof_id_type>> unique_ids; 29 : 30 : std::vector<VariableName> variables; 31 : std::vector<VectorPostprocessorValue *> integrals; 32 : }; 33 : 34 : private: 35 : ExtraIDData & _extra_id_data; 36 : const ExtraIDIntegralVectorPostprocessor * _vpp_object; 37 : }; 38 : 39 : void to_json(nlohmann::json & json, const ExtraIDIntegralReporter::ExtraIDData & extra_id_data); 40 : void dataStore(std::ostream &, ExtraIDIntegralReporter::ExtraIDData &, void *); 41 : void dataLoad(std::istream &, ExtraIDIntegralReporter::ExtraIDData &, void *);