https://mooseframework.inl.gov
Loading...
Searching...
No Matches
IndicatorMarker.C
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#include "IndicatorMarker.h"
11#include "SubProblem.h"
13
16{
18 params.addRequiredParam<IndicatorName>("indicator",
19 "The name of the Indicator that this Marker uses.");
20 return params;
21}
22
24 : Marker(parameters), _error_vector(getErrorVector(parameters.get<IndicatorName>("indicator")))
25{
26 if (!_subproblem.getVariable(0, getParam<IndicatorName>("indicator")).hasBlocks(blockIDs()))
27 mooseWarning("The block restriction of the marker is larger than the block restriction of its "
28 "indicator. Blocks on which the indicator is not active will not be marked, and "
29 "therefore will not be refined or coarsened");
30}
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted,...
IndicatorMarker(const InputParameters &parameters)
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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 InputParameters validParams()
Definition Marker.C:19
SubProblem & _subproblem
Definition Marker.h:110
void mooseWarning(Args &&... args) const
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const =0
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...