https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Marker.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#include "MooseObject.h"
13#include "BlockRestrictable.h"
14#include "SetupInterface.h"
17#include "UserObjectInterface.h"
18#include "Restartable.h"
21#include "OutputInterface.h"
22
23// Forward declarations
24class MooseMesh;
25class SubProblem;
26class FEProblemBase;
27class SystemBase;
28class Assembly;
29template <typename>
30class MooseVariableFE;
33class Adaptivity;
34
35namespace libMesh
36{
37class ErrorVector;
38}
40
41class Marker : public MooseObject,
42 public BlockRestrictable,
43 public SetupInterface,
47 public Restartable,
50 public OutputInterface
51{
52public:
54
56 virtual ~Marker() {}
57
66
72 static MooseEnum markerStates();
73
75 virtual void computeMarker();
76
77 bool isActive() const;
78
82 virtual void markerSetup();
83
84 virtual const std::set<std::string> & getRequestedItems() override;
85
86 virtual const std::set<std::string> & getSuppliedItems() override;
87
88protected:
90
98 ErrorVector & getErrorVector(std::string indicator);
99
108 const MooseArray<Real> & getMarkerValue(std::string name);
109
114
116
118
122 const Elem * const & _current_elem;
123
126
128 std::set<std::string> _depend;
129 std::set<std::string> _supplied;
130};
MooseVariableFE< Real > MooseVariable
Definition Marker.h:31
MooseVariableFE< VectorValue< Real > > VectorMooseVariable
Definition Marker.h:32
unsigned int THREAD_ID
Definition MooseTypes.h:237
Takes care of everything related to mesh adaptivity.
Definition Adaptivity.h:64
Keeps track of stuff related to assembling.
Definition Assembly.h:110
An interface that restricts an object to subdomains via the 'blocks' input parameter.
Interface for sorting dependent vectors of objects.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
bool isActive() const
Definition Marker.C:90
virtual ~Marker()
Definition Marker.h:56
virtual MarkerValue computeElementMarker()=0
SystemBase & _sys
Definition Marker.h:113
static InputParameters validParams()
Definition Marker.C:19
std::set< std::string > _supplied
Definition Marker.h:129
const Elem *const & _current_elem
Pointer to the current element being considered in the marker element-based loop.
Definition Marker.h:122
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
Definition Marker.C:101
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
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
Definition Marker.h:60
@ REFINE
Definition Marker.h:64
@ DO_NOTHING
Definition Marker.h:63
@ COARSEN
Definition Marker.h:62
@ DONT_MARK
Definition Marker.h:61
MooseVariable & _field_var
Reference to this marker as a variable.
Definition Marker.h:120
THREAD_ID _tid
Definition Marker.h:115
MooseMesh & _mesh
Reference to the mesh, obtained from the subproblem.
Definition Marker.h:125
std::set< std::string > _depend
Depend Markers.
Definition Marker.h:128
const MooseArray< Real > & getMarkerValue(std::string name)
This is used to get the values of other Markers.
Definition Marker.C:83
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
Definition Marker.C:107
static MooseEnum markerStates()
Helper function for getting the valid refinement flag states a marker can use as a MooseEnum.
Definition Marker.C:62
Assembly & _assembly
Definition Marker.h:117
virtual void computeMarker()
Computes and sets the value of the refinement flag.
Definition Marker.C:70
SubProblem & _subproblem
Definition Marker.h:110
virtual void markerSetup()
Is called before any element looping is started so any "global" computation can be done.
Definition Marker.C:96
FEProblemBase & _fe_problem
Definition Marker.h:111
Adaptivity & _adaptivity
Definition Marker.h:112
Interface for notifications that the mesh has changed.
forward declarations
Definition MooseArray.h:18
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Class for stuff related to variables.
A class to provide an common interface to objects requiring "outputs" option.
Interface class for classes which interact with Postprocessors.
A class for creating restricted objects.
Definition Restartable.h:29
Generic class for solving transient nonlinear problems.
Definition SubProblem.h:79
Base class for a system (of equations)
Definition SystemBase.h:87
Interface for objects that need to use UserObjects.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...