www.mooseframework.org
Marker.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 MARKER_H
16 #define MARKER_H
17 
18 #include "MooseObject.h"
19 #include "BlockRestrictable.h"
20 #include "SetupInterface.h"
23 #include "UserObjectInterface.h"
24 #include "Restartable.h"
25 #include "PostprocessorInterface.h"
26 #include "MeshChangedInterface.h"
27 #include "OutputInterface.h"
28 
29 // Forward declarations
30 class MooseMesh;
31 class SubProblem;
32 class FEProblemBase;
33 class SystemBase;
34 class Assembly;
35 class MooseVariable;
36 class Marker;
37 class Adaptivity;
38 
39 template <>
41 
42 class Marker : public MooseObject,
43  public BlockRestrictable,
44  public SetupInterface,
47  public UserObjectInterface,
48  public Restartable,
50  public MeshChangedInterface,
51  public OutputInterface
52 {
53 public:
55  virtual ~Marker() {}
56 
59  {
60  DONT_MARK = -1,
64  };
65 
71  static MooseEnum markerStates();
72 
73  virtual void computeMarker();
74 
75  bool isActive() const;
76 
80  virtual void markerSetup();
81 
82  virtual const std::set<std::string> & getRequestedItems() override;
83 
84  virtual const std::set<std::string> & getSuppliedItems() override;
85 
86 protected:
87  virtual MarkerValue computeElementMarker() = 0;
88 
96  ErrorVector & getErrorVector(std::string indicator);
97 
106  const VariableValue & getMarkerValue(std::string name);
107 
112 
114 
116 
118  const Elem *& _current_elem;
119 
121 
123  std::set<std::string> _depend;
124  std::set<std::string> _supplied;
125 };
126 
127 #endif /* MARKER_H */
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
Definition: Marker.C:111
SystemBase & _sys
Definition: Marker.h:111
THREAD_ID _tid
Definition: Marker.h:113
Assembly & _assembly
Definition: Marker.h:115
InputParameters validParams< Marker >()
Definition: Marker.C:25
A class for creating restricted objects.
Definition: Restartable.h:31
Keeps track of stuff related to assembling.
Definition: Assembly.h:63
Class for stuff related to variables.
Definition: MooseVariable.h:43
SubProblem & _subproblem
Definition: Marker.h:108
FEProblemBase & _fe_problem
Definition: Marker.h:109
Definition: Marker.h:42
A class to provide an common interface to objects requiring "outputs" option.
virtual ~Marker()
Definition: Marker.h:55
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void markerSetup()
Is called before any element looping is started so any "global" computation can be done...
Definition: Marker.C:106
bool isActive() const
Definition: Marker.C:100
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
Definition: Marker.h:58
std::set< std::string > _supplied
Definition: Marker.h:124
Base class for a system (of equations)
Definition: SystemBase.h:91
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Adaptivity & _adaptivity
Definition: Marker.h:110
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
Definition: Marker.C:117
MooseMesh & _mesh
Definition: Marker.h:120
Interface for notifications that the mesh has changed.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
ErrorVector & getErrorVector(std::string indicator)
Get an ErrorVector that will be filled up with values corresponding to the indicator passed in...
Definition: Marker.C:87
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
const Elem *& _current_elem
Definition: Marker.h:118
static MooseEnum markerStates()
Helper function for getting the valid refinement flag states a marker can use as a MooseEnum...
Definition: Marker.C:72
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
Interface for objects that need to use UserObjects.
std::set< std::string > _depend
Depend Markers.
Definition: Marker.h:123
virtual MarkerValue computeElementMarker()=0
MooseVariable & _field_var
Definition: Marker.h:117
Marker(const InputParameters &parameters)
Definition: Marker.C:45
Takes care of everything related to mesh adaptivity.
Definition: Adaptivity.h:48
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:53
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
Interface for sorting dependent vectors of objects.
virtual void computeMarker()
Definition: Marker.C:80
Interface class for classes which interact with Postprocessors.
const VariableValue & getMarkerValue(std::string name)
This is used to get the values of other Markers.
Definition: Marker.C:93
unsigned int THREAD_ID
Definition: MooseTypes.h:79