20 "markers",
"A list of marker names to combine into a single marker.");
22 "considering the maximum value of the listed markers (i.e., "
23 "refinement takes precedent).");
29 _names(getParam<
std::vector<MarkerName>>(
"markers")),
30 _block_restriction_mismatch(false)
32 for (
const auto & marker_name :
_names)
35 std::string other_block_restricted =
"";
36 for (
const auto & marker_name :
_names)
42 if (
blockIDs() != var_ptr->blockIDs())
43 other_block_restricted += (other_block_restricted ==
"" ?
"" :
", ") + marker_name;
46 if (other_block_restricted !=
"")
51 "Combo marker and markers '" + other_block_restricted +
52 "' do not share the same block restrictions. Markers outside their block restriction "
66 marker_value = std::max(marker_value,
static_cast<MarkerValue>((*var)[0]));
68 for (
const auto i : index_range(
_markers))
registerMooseObject("MooseApp", ComboMarker)
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,...
Combines multiple marker fields.
virtual MarkerValue computeElementMarker() override
bool _block_restriction_mismatch
Boolean to keep track of whether any marker does not have the same block restriction.
static InputParameters validParams()
ComboMarker(const InputParameters ¶meters)
std::vector< const VariableValue * > _markers
Pointers to the markers contributing to the Combo marker.
const std::vector< MarkerName > & _names
Names of the markers contributing to the combo.
std::vector< const MooseVariableFieldBase * > _marker_variables
Pointers to the variables for the markers.
static InputParameters validParams()
const Elem *const & _current_elem
Pointer to the current element being considered in the marker element-based loop.
MarkerValue
This mirrors the main refinement flag values in libMesh in Elem::RefinementState but adds "dont_mark"...
const MooseArray< Real > & getMarkerValue(std::string name)
This is used to get the values of other Markers.
void paramInfo(const std::string ¶m, Args... args) const
Emits an informational message prefixed with the file and line number of the given param (from the in...
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...