www.mooseframework.org
UniformMarker.C
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 #include "UniformMarker.h"
11 
13 
14 template <>
17 {
19  MooseEnum marker_states = Marker::markerStates();
20 
21  params.addRequiredParam<MooseEnum>("mark", marker_states, "How to mark elements.");
22  params.addClassDescription("Uniformly mark all elements for refinement or coarsening.");
23  return params;
24 }
25 
27  : Marker(parameters), _mark((MarkerValue)(int)parameters.get<MooseEnum>("mark"))
28 {
29 }
30 
33 {
34  return _mark;
35 }
InputParameters validParams< Marker >()
Definition: Marker.C:20
InputParameters validParams< UniformMarker >()
Definition: UniformMarker.C:16
MarkerValue _mark
Definition: UniformMarker.h:27
Definition: Marker.h:39
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
Definition: Marker.h:55
UniformMarker(const InputParameters &parameters)
Definition: UniformMarker.C:26
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
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
registerMooseObject("MooseApp", UniformMarker)
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
virtual MarkerValue computeElementMarker() override
Definition: UniformMarker.C:32