https://mooseframework.inl.gov
BoundaryPreservedMarker.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 "Marker.h"
13 
14 /*
15  Do not coarsen any element touching a given boundary in order to preserve the boundary
16  libMesh will delete all boundaries for the elements to be coarsened.
17 */
19 {
20 public:
23 
24 protected:
25  virtual MarkerValue computeElementMarker() override;
26 
27  // Check whether or not to coarsen the current element
28  // It is fine to coarsen the current element if it does not touch the given boundary
29  // Otherwise return false
30  bool preserveBoundary(const Elem * const & _current_elem);
31 
32  // Boundary to be preserved during coarsening (AMR)
34 
35  MarkerName _marker_name;
36 
38 };
static InputParameters validParams()
Definition: Marker.h:41
const Elem *const & _current_elem
Pointer to the current element being considered in the marker element-based loop. ...
Definition: Marker.h:122
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:59
bool preserveBoundary(const Elem *const &_current_elem)
boundary_id_type BoundaryID
const VariableValue * _marker
forward declarations
virtual MarkerValue computeElementMarker() override
const InputParameters & parameters() const
Get the parameters of the object.
BoundaryPreservedMarker(const InputParameters &parameters)