35 addEntry(
const VariableName & vname,
unsigned int global_i,
const DenseVector<Real> & solution);
40 std::unordered_map<unsigned int, std::vector<DenseVector<Real>>> &
44 const std::unordered_map<unsigned int, std::vector<DenseVector<Real>>> &
45 getStorage(
const VariableName & variable)
const;
49 std::map<VariableName, std::unordered_map<unsigned int, std::vector<DenseVector<Real>>>> &
61 bool hasGlobalSample(
unsigned int global_sample_i,
const VariableName & variable)
const;
69 const std::vector<DenseVector<Real>> &
getGlobalSample(
unsigned int global_sample_i,
70 const VariableName & variable)
const;
87 std::map<VariableName, std::unordered_map<unsigned int, std::vector<DenseVector<Real>>>> &
96 nlohmann::json & json,
97 const std::map<VariableName, std::unordered_map<
unsigned int, std::vector<DenseVector<Real>>>> &
void to_json(nlohmann::json &json, const std::map< VariableName, std::unordered_map< unsigned int, std::vector< DenseVector< Real >>>> &solution_storage)
const std::vector< VariableName > & _variable_names
The names of the variables whose serialized solution this object is supposed to receive.
void addEntry(const VariableName &vname, unsigned int global_i, const DenseVector< Real > &solution)
Add a new solution entry to the container.
virtual void execute() override
unsigned int totalNumberOfStoredSolutions(const VariableName &vname) const
Return the number of total stored solutions for a given variable.
std::map< VariableName, std::unordered_map< unsigned int, std::vector< DenseVector< Real > > > > & getStorage() const
Get the whole solution container.
ParallelSolutionStorage(const InputParameters ¶meters)
bool hasGlobalSample(unsigned int global_sample_i, const VariableName &variable) const
Determine if we have the solution vector with a given global sample index for a given variable...
virtual void initialize() override
virtual void finalize() override
const std::vector< DenseVector< Real > > & getGlobalSample(unsigned int global_sample_i, const VariableName &variable) const
Get the serialized solution field which is associated with a given global sample index and variable...
const InputParameters & parameters() const
const std::vector< VariableName > & variableNames() const
Get the variable names which we can receive.
std::map< VariableName, std::unordered_map< unsigned int, std::vector< DenseVector< Real > > > > & _distributed_solutions
The container of the solutions.
virtual void initialSetup() override
static InputParameters validParams()
A Reporter which stores serialized solution fields for given variables in a distributed fashion...