www.mooseframework.org
LayeredBase.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 LAYEREDBASE_H
16 #define LAYEREDBASE_H
17 
18 // MOOSE includes
19 #include "Moose.h"
20 #include "MooseEnum.h"
21 
22 // Forward Declarations
23 class InputParameters;
24 class LayeredBase;
25 class SubProblem;
26 class UserObject;
27 
28 namespace libMesh
29 {
30 class Point;
31 }
32 
33 template <typename T>
35 
36 template <>
38 
45 {
46 public:
47  LayeredBase(const InputParameters & parameters);
48 
54  virtual Real integralValue(Point p) const;
55 
61  virtual Real getLayerValue(unsigned int layer) const;
62 
68  virtual unsigned int getLayer(Point p) const;
69 
70  virtual void initialize();
71  virtual void finalize();
72  virtual void threadJoin(const UserObject & y);
73 
74 protected:
80  void setLayerValue(unsigned int layer, Real value);
81 
85  bool layerHasValue(unsigned int layer) const { return _layer_has_value[layer]; }
86 
88  std::string _layered_base_name;
89 
92 
95 
97  unsigned int _direction;
98 
101 
103  unsigned int _num_layers;
104 
106  std::vector<Real> _layer_bounds;
107 
109  unsigned int _sample_type;
110 
112  unsigned int _average_radius;
113 
116 
117 private:
119  std::vector<Real> _layer_values;
120 
122  std::vector<bool> _layer_has_value;
123 
126 
129 };
130 
131 #endif
std::string _layered_base_name
Name of this object.
Definition: LayeredBase.h:88
SubProblem & _layered_base_subproblem
Subproblem for the child object.
Definition: LayeredBase.h:125
bool layerHasValue(unsigned int layer) const
Whether or not a layer has a value.
Definition: LayeredBase.h:85
bool _interval_based
Whether or not this object is based on equally spaced intervals or "bounds".
Definition: LayeredBase.h:100
bool _cumulative
Whether the values are cumulative over the layers.
Definition: LayeredBase.h:128
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
const InputParameters & _layered_base_params
Params for this object.
Definition: LayeredBase.h:91
unsigned int _direction
The component direction the layers are going in. We cache this for speed (so we&#39;re not always going t...
Definition: LayeredBase.h:97
std::vector< Real > _layer_values
Value of the integral for each layer.
Definition: LayeredBase.h:119
unsigned int _average_radius
How many layers both above and below the found layer will be used in the average. ...
Definition: LayeredBase.h:112
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
unsigned int _num_layers
Number of layers to split the mesh into.
Definition: LayeredBase.h:103
std::vector< Real > _layer_bounds
The boundaries of the layers.
Definition: LayeredBase.h:106
InputParameters validParams()
InputParameters validParams< LayeredBase >()
Definition: LayeredBase.C:28
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
This UserObject computes volume integrals of a variable storing partial sums for the specified number...
Definition: LayeredBase.h:44
Real _direction_min
Definition: LayeredBase.h:114
unsigned int _sample_type
How to sample the values.
Definition: LayeredBase.h:109
Real _direction_max
Definition: LayeredBase.h:115
Base class for user-specific data.
Definition: UserObject.h:42
std::vector< bool > _layer_has_value
Whether or not each layer has had any value summed into it.
Definition: LayeredBase.h:122
MooseEnum _direction_enum
The MooseEnum direction the layers are going in.
Definition: LayeredBase.h:94