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 void initialSetup();
31
33 bool pRefine();
34
36 bool hRefine();
37
38protected:
40 std::unique_ptr<mfem::ThresholdRefiner> _threshold_refiner;
41
43 const std::string & _estimator_name;
44
46 const mfem::real_t _error_threshold;
47
50
52 const unsigned _max_h_level;
53
55 const unsigned _max_p_level;
56
58 unsigned _h_ref_counter{0};
59
61 unsigned _p_ref_counter{0};
62
64 const MFEMIndicator * _estimator{nullptr};
65};
66
67#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()
void initialSetup()
Constructs associated mfem::ThresholdRefiner once mfem::ErrorEstimator is guaranteed to exist.
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.