https://mooseframework.inl.gov
RestartableDataReporter.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 "GeneralReporter.h"
13 
18 {
19 public:
22 
23  virtual void initialize() override {}
24  virtual void finalize() override {}
25  virtual void execute() override;
26 
34  struct Value
35  {
38  };
39 
40 protected:
46  const std::vector<std::string> _include;
48  const std::vector<std::string> _exclude;
50  std::map<std::string, RestartableDataReporter::Value> & _values;
53 
54 private:
57 };
58 
59 void to_json(nlohmann::json & json, const RestartableDataReporter::Value & value);
RestartableDataReporter(const InputParameters &parameters)
Reporter object that has a single execution of the "execute" method for for each execute flag...
RestartableDataValue::StoreJSONParams getDataParams() const
Internal method for setting _data_params.
const RestartableDataMap & _data_map
The map of data that we&#39;re going to output.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const bool _allow_unimplemented
Whether or not to error on the output of types with unimplemented output methods. ...
Reports restartable data and restartable meta data.
const std::vector< std::string > _include
The include patterns to match.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
const RestartableDataValue::StoreJSONParams _data_params
The parameters to pass to the output of a single value.
const RestartableDataValue * value
Storage for restartable data that is ordered based on insertion order.
virtual void execute() override
Execute method.
virtual void finalize() override
Finalize.
Helper struct for storing a single piece of restartable data.
void to_json(nlohmann::json &json, const RestartableDataReporter::Value &value)
Struct that represents parameters for how to store the JSON value via store.
static InputParameters validParams()
RestartableDataValue::StoreJSONParams params
const InputParameters & parameters() const
Get the parameters of the object.
std::map< std::string, RestartableDataReporter::Value > & _values
The values we are to output.
const std::vector< std::string > _exclude
The exclude patterns to match.
Abstract definition of a RestartableData value.