https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMRefinementMarker.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#ifdef MOOSE_MFEM_ENABLED
11#pragma once
12
13#include "MFEMObject.h"
14#include "MFEMIndicator.h"
15
21{
22public:
24
26
27 virtual ~MFEMRefinementMarker() = default;
28
30 bool pRefine();
31
33 bool hRefine();
34
35protected:
37 std::unique_ptr<mfem::ThresholdRefiner> _threshold_refiner;
38
40 const std::string & _estimator_name;
41
43 const mfem::real_t _error_threshold;
44
47
49 const unsigned _max_h_level;
50
52 const unsigned _max_p_level;
53
55 unsigned _h_ref_counter{0};
56
58 unsigned _p_ref_counter{0};
59
61 const MFEMIndicator * _estimator{nullptr};
62};
63
64#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
Class to construct threshold refiner.
const unsigned _max_p_level
The max no. of times h-refinement can be performed.
std::unique_ptr< mfem::ThresholdRefiner > _threshold_refiner
Unique pointer to underlying mfem::ThresholdRefiner object.
const std::string & _estimator_name
The estimator/indicator's name.
virtual ~MFEMRefinementMarker()=default
unsigned _p_ref_counter
The no. of times p-refinement has been performed.
const unsigned _max_h_level
The max no. of times h-refinement can be performed.
bool hRefine()
Applies h-refinement wherever the refiner sees fit.
const MFEMIndicator * _estimator
Pointer to the estimator/indicator.
const mfem::real_t _error_threshold
The error threshold determining which elements to refine.
static InputParameters validParams()
bool _rebalance
Whether to rebalance the mesh after h-refinement.
bool pRefine()
Applies p-refinement wherever the refiner sees fit.
unsigned _h_ref_counter
The no. of times h-refinement has been performed.