https://mooseframework.inl.gov
MappingReporter.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 // MOOSE includes
13 #include "StochasticReporter.h"
15 #include "MappingInterface.h"
16 #include "UserObjectInterface.h"
17 
22 {
23 public:
26 
27  virtual void initialize() override {}
28  void initialSetup() override;
29  virtual void execute() override;
30  virtual void finalize() override {}
31 
32 protected:
35 
37  void mapVariableData();
38 
42 
45  Sampler * const _sampler;
46 
48  const UserObjectName & _mapping_name;
51 
53  const std::vector<VariableName> & _variable_names;
54 
57  std::vector<std::vector<std::vector<Real>> *> _vector_real_values_parallel_storage;
58  std::vector<std::vector<Real> *> _vector_real_values;
60 };
Sampler *const _sampler
We only need the sampler to check which coefficients would go to which processor in case a ParallelSo...
virtual void execute() override
VariableMappingBase * _mapping
Link to the mapping object, we need this to be a pointer due to the fact that we can only fetch this ...
A tool to reduce solution fields to coordinates in the latent space.
const InputParameters & parameters() const
const std::vector< VariableName > & _variable_names
The variables we would like to map.
MappingReporter(const InputParameters &parameters)
const UserObjectName & _mapping_name
The name of the mapping object we would like to use.
const ParallelSolutionStorage *const _parallel_storage
If we already have solution fields stored from previous runs, we can use their ParallelStorageObject ...
void mapParallelStorageData()
Map the available data in a parallel storage into the latent space.
virtual void initialize() override
An interface class that helps getting access to Mapping objects.
static InputParameters validParams()
virtual void finalize() override
This is an abstract base class for objects that provide mapping between a full-order and a latent spa...
std::vector< std::vector< Real > * > _vector_real_values
std::vector< std::vector< std::vector< Real > > * > _vector_real_values_parallel_storage
void mapVariableData()
Map the available data in variables into the latent space.
void initialSetup() override
A Reporter which stores serialized solution fields for given variables in a distributed fashion...