www.mooseframework.org
OversampleOutput.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef OVERSAMPLEOUTPUT_H
16 #define OVERSAMPLEOUTPUT_H
17 
18 // MOOSE includes
19 #include "AdvancedOutput.h"
20 
21 // Forward declerations
22 class OversampleOutput;
23 class MooseMesh;
24 
25 // libMesh forward declarations
26 namespace libMesh
27 {
28 template <typename T>
29 class NumericVector;
30 class MeshFunction;
31 }
32 
33 template <>
35 
52 {
53 public:
61  OversampleOutput(const InputParameters & parameters);
62 
69  virtual ~OversampleOutput();
70 
74  virtual void meshChanged() override;
75 
76  virtual void outputStep(const ExecFlagType & type) override;
77 
78 protected:
82  virtual void updateOversample();
83 
88 
90  const unsigned int _refinements;
91 
94 
97 
98 private:
105  void initOversample();
106 
112  void cloneMesh();
113 
119  std::vector<std::vector<std::unique_ptr<MeshFunction>>> _mesh_functions;
120 
122  Point _position;
123 
126 
127  std::unique_ptr<EquationSystems> _oversample_es;
128  std::unique_ptr<MooseMesh> _cloned_mesh_ptr;
129 
131  /* Each of the MeshFunctions keeps a reference to this vector, the vector is updated for the
132  * current system
133  * and variable before the MeshFunction is applied. This allows for the same MeshFunction object
134  * to be
135  * re-used, unless the mesh has changed due to adaptivity */
136  std::unique_ptr<NumericVector<Number>> _serialized_solution;
137 };
138 
139 #endif // OVERSAMPLEOUTPUT_H
bool _oversample_mesh_changed
A flag indicating that the mesh has changed and the oversampled mesh needs to be re-initialized.
Based class for providing re-positioning and oversampling support to output objects.
MooseMesh * _mesh_ptr
A convenience pointer to the current mesh (reference or displaced depending on "use_displaced") ...
std::vector< std::vector< std::unique_ptr< MeshFunction > > > _mesh_functions
A vector of pointers to the mesh functions This is only populated when the oversample() function is c...
Point _position
When oversampling, the output is shift by this amount.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< OversampleOutput >()
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::unique_ptr< EquationSystems > _oversample_es
std::unique_ptr< NumericVector< Number > > _serialized_solution
Oversample solution vector.
bool _oversample
Flag indicating that oversampling is enabled.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
Based class for output objects.
MatType type
const unsigned int _refinements
The number of oversampling refinements.
ExecFlagType
Execution flags - when is the object executed/evaluated.
Definition: MooseTypes.h:90
std::unique_ptr< MooseMesh > _cloned_mesh_ptr
bool _change_position
Flag for re-positioning.