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 
16 {
18  MooseEnum marker_states = Marker::markerStates();
19 
20  params.addRequiredParam<MooseEnum>("mark", marker_states, "How to mark elements.");
21  params.addClassDescription("Uniformly mark all elements for refinement or coarsening.");
22  return params;
23 }
24 
26  : Marker(parameters), _mark((MarkerValue)(int)parameters.get<MooseEnum>("mark"))
27 {
28 }
29 
32 {
33  return _mark;
34 }
MarkerValue _mark
Definition: UniformMarker.h:24
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1147
Definition: Marker.h:35
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:53
UniformMarker(const InputParameters &parameters)
Definition: UniformMarker.C:25
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...
static InputParameters validParams()
Definition: Marker.C:19
virtual MarkerValue computeElementMarker() override
Definition: UniformMarker.C:31
void ErrorVector unsigned int
static InputParameters validParams()
Definition: UniformMarker.C:15