www.mooseframework.org
Marker.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "MooseObject.h"
13 #include "BlockRestrictable.h"
14 #include "SetupInterface.h"
17 #include "UserObjectInterface.h"
18 #include "Restartable.h"
19 #include "PostprocessorInterface.h"
20 #include "MeshChangedInterface.h"
21 #include "OutputInterface.h"
22 
23 // Forward declarations
24 class MooseMesh;
25 class SubProblem;
26 class FEProblemBase;
27 class SystemBase;
28 class Assembly;
29 template <typename>
33 class Marker;
34 class Adaptivity;
35 
36 template <>
38 
39 class Marker : public MooseObject,
40  public BlockRestrictable,
41  public SetupInterface,
44  public UserObjectInterface,
45  public Restartable,
47  public MeshChangedInterface,
48  public OutputInterface
49 {
50 public:
52  virtual ~Marker() {}
53 
56  {
57  DONT_MARK = -1,
61  };
62 
68  static MooseEnum markerStates();
69 
70  virtual void computeMarker();
71 
72  bool isActive() const;
73 
77  virtual void markerSetup();
78 
79  virtual const std::set<std::string> & getRequestedItems() override;
80 
81  virtual const std::set<std::string> & getSuppliedItems() override;
82 
83 protected:
84  virtual MarkerValue computeElementMarker() = 0;
85 
93  ErrorVector & getErrorVector(std::string indicator);
94 
103  const MooseArray<Real> & getMarkerValue(std::string name);
104 
109 
111 
113 
115  const Elem * const & _current_elem;
116 
118 
120  std::set<std::string> _depend;
121  std::set<std::string> _supplied;
122 };
123 
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
Definition: Marker.C:101
SystemBase & _sys
Definition: Marker.h:108
THREAD_ID _tid
Definition: Marker.h:110
Assembly & _assembly
Definition: Marker.h:112
InputParameters validParams< Marker >()
Definition: Marker.C:20
A class for creating restricted objects.
Definition: Restartable.h:29
Keeps track of stuff related to assembling.
Definition: Assembly.h:62
Class for stuff related to variables.
Definition: Adaptivity.h:29
SubProblem & _subproblem
Definition: Marker.h:105
FEProblemBase & _fe_problem
Definition: Marker.h:106
Definition: Marker.h:39
A class to provide an common interface to objects requiring "outputs" option.
const Elem *const & _current_elem
Definition: Marker.h:115
virtual ~Marker()
Definition: Marker.h:52
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:96
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
Definition: Marker.h:55
std::set< std::string > _supplied
Definition: Marker.h:121
Base class for a system (of equations)
Definition: SystemBase.h:92
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Adaptivity & _adaptivity
Definition: Marker.h:107
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
Definition: Marker.C:107
MooseVariableFE< VectorValue< Real > > VectorMooseVariable
Definition: Marker.h:32
MooseVariableFE< Real > MooseVariable
Definition: Marker.h:30
MooseMesh & _mesh
Definition: Marker.h:117
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:42
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
ErrorVector & getErrorVector(std::string indicator)
Get an ErrorVector that will be filled up with values corresponding to the indicator passed in...
Definition: Marker.C:77
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
static MooseEnum markerStates()
Helper function for getting the valid refinement flag states a marker can use as a MooseEnum...
Definition: Marker.C:62
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
Interface for objects that need to use UserObjects.
std::set< std::string > _depend
Depend Markers.
Definition: Marker.h:120
virtual MarkerValue computeElementMarker()=0
MooseVariable & _field_var
Definition: Marker.h:114
Marker(const InputParameters &parameters)
Definition: Marker.C:35
bool isActive() const
Definition: Marker.C:90
Takes care of everything related to mesh adaptivity.
Definition: Adaptivity.h:46
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:59
const MooseArray< Real > & getMarkerValue(std::string name)
This is used to get the values of other Markers.
Definition: Marker.C:83
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
Interface for sorting dependent vectors of objects.
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:59
virtual void computeMarker()
Definition: Marker.C:70
Interface class for classes which interact with Postprocessors.
unsigned int THREAD_ID
Definition: MooseTypes.h:161