https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Adaptivity Class Reference

Takes care of everything related to mesh adaptivity. More...

#include <Adaptivity.h>

Inheritance diagram for Adaptivity:
[legend]

Public Member Functions

 Adaptivity (FEProblemBase &fe_problem)
 
virtual ~Adaptivity ()
 
void init (const unsigned int steps, const unsigned int initial_steps, const AdaptivityType adaptivity_type)
 Initialize and turn on adaptivity for the simulation.
 
template<typename T >
void setParam (const std::string &param_name, const T &param_value)
 Set adaptivity parameter.
 
void setErrorEstimator (const MooseEnum &error_estimator_name)
 Set the error estimator.
 
void setErrorNorm (libMesh::SystemNorm &sys_norm)
 Set the error norm (FIXME: improve description)
 
void setPrintMeshChanged (bool state=true)
 
unsigned int getInitialSteps () const
 Pull out the number of initial steps previously set by calling init()
 
unsigned int getSteps () const
 Pull out the number of steps previously set by calling init()
 
unsigned int getCyclesPerStep () const
 Pull out the number of cycles_per_step previously set through the AdaptivityAction.
 
void setCyclesPerStep (const unsigned int &num)
 Set the number of cycles_per_step.
 
bool getRecomputeMarkersFlag () const
 Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.
 
void setRecomputeMarkersFlag (const bool flag)
 Set the flag to recompute markers during adaptivity cycles.
 
bool adaptMesh (std::string marker_name=std::string())
 Adapts the mesh based on the error estimator used.
 
bool initialAdaptMesh ()
 Used during initial adaptivity.
 
void uniformRefineWithProjection ()
 Performs uniform refinement on the meshes in the current object.
 
void setAdaptivityOn (bool state)
 Allow adaptivity to be toggled programatically.
 
bool isOn ()
 Is adaptivity on?
 
bool isInitialized ()
 Returns whether or not Adaptivity::init() has ran.
 
void setTimeActive (Real start_time, Real stop_time)
 Sets the time when the adaptivity is active.
 
void setUseNewSystem ()
 Tells this object we're using the "new" adaptivity system.
 
void setMarkerVariableName (std::string marker_field)
 Sets the name of the field variable to actually use to flag elements for refinement / coarsening.
 
void setInitialMarkerVariableName (std::string marker_field)
 Sets the name of the field variable to actually use to flag elements for initial refinement / coarsening.
 
void setMaxHLevel (unsigned int level)
 Set the maximum refinement level (for the new Adaptivity system).
 
unsigned int getMaxHLevel ()
 Return the maximum h-level.
 
void setInterval (unsigned int interval)
 Set the interval (number of timesteps) between refinement steps.
 
libMesh::ErrorVectorgetErrorVector (const std::string &indicator_field)
 Get an ErrorVector that will be filled up with values corresponding to the indicator field name passed in.
 
void updateErrorVectors ()
 Update the ErrorVectors that have been requested through calls to getErrorVector().
 
bool isAdaptivityDue ()
 Query if an adaptivity step should be performed at the current time / time step.
 
PerfGraphperfGraph ()
 Get the PerfGraph.
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static void uniformRefine (MooseMesh *mesh, unsigned int level=libMesh::invalid_uint)
 Performs uniform refinement of the passed Mesh object.
 
static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects.
 

Protected Member Functions

PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 Call to register a named section for timing.
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 Call to register a named section for timing.
 
std::string timedSectionName (const std::string &section_name) const
 

Protected Attributes

FEProblemBase_fe_problem
 
MooseMesh_mesh
 
bool _mesh_refinement_on
 on/off flag reporting if the adaptivity is being used
 
bool _initialized
 on/off flag reporting if the adaptivity system has been initialized
 
std::unique_ptr< libMesh::MeshRefinement_mesh_refinement
 A mesh refinement object to be used either with initial refinement or with Adaptivity.
 
std::unique_ptr< libMesh::ErrorEstimator_error_estimator
 Error estimator to be used by the apps.
 
std::unique_ptr< libMesh::ErrorVector_error
 Error vector for use with the error estimator.
 
std::shared_ptr< DisplacedProblem_displaced_problem
 
std::unique_ptr< libMesh::MeshRefinement_displaced_mesh_refinement
 A mesh refinement object for displaced mesh.
 
unsigned int _initial_steps
 the number of adaptivity steps to do at the beginning of simulation
 
unsigned int _steps
 steps of adaptivity to perform
 
bool _print_mesh_changed
 True if we want to print out info when mesh has changed.
 
Real & _t
 Time.
 
int_step
 Time Step.
 
unsigned int _interval
 intreval between adaptivity runs
 
Real _start_time
 When adaptivity start.
 
Real _stop_time
 When adaptivity stops.
 
unsigned int _cycles_per_step
 The number of adaptivity cycles per step.
 
bool _use_new_system
 Whether or not to use the "new" adaptivity system.
 
std::string _marker_variable_name
 Name of the marker variable if using the new adaptivity system.
 
AdaptivityType _adaptivity_type
 Type of mesh adaptivity.
 
std::string _initial_marker_variable_name
 Name of the initial marker variable if using the new adaptivity system.
 
unsigned int _max_h_level
 The maximum number of refinement levels.
 
bool _recompute_markers_during_cycles
 Whether or not to recompute markers during adaptivity cycles.
 
std::unique_ptr< libMesh::SiblingCoupling_sibling_coupling
 Sibling coupling object for HP adaptivity for evaluating data on elements' siblings in HPCoarsenTest.
 
std::unique_ptr< libMesh::HPCoarsenTest_hp_coarsen_test
 Object for HP adaptivity.
 
std::map< std::string, std::unique_ptr< libMesh::ErrorVector > > _indicator_field_to_error_vector
 Stores pointers to ErrorVectors associated with indicator field names.
 
MooseApp_pg_moose_app
 The MooseApp that owns the PerfGraph.
 
const std::string _prefix
 A prefix to use for all sections.
 
const Parallel::Communicator_communicator
 

Detailed Description

Takes care of everything related to mesh adaptivity.

Definition at line 61 of file Adaptivity.h.

Constructor & Destructor Documentation

◆ Adaptivity()

Adaptivity::Adaptivity ( FEProblemBase fe_problem)

Definition at line 33 of file Adaptivity.C.

34 : ConsoleStreamInterface(fe_problem.getMooseApp()),
35 PerfGraphInterface(fe_problem.getMooseApp().perfGraph(), "Adaptivity"),
36 ParallelObject(fe_problem.getMooseApp()),
37 _fe_problem(fe_problem),
40 _initialized(false),
42 _steps(0),
46 _interval(1),
47 _start_time(-std::numeric_limits<Real>::max()),
48 _stop_time(std::numeric_limits<Real>::max()),
50 _use_new_system(false),
52 _max_h_level(0),
54{
55}
unsigned int _initial_steps
the number of adaptivity steps to do at the beginning of simulation
Definition Adaptivity.h:291
FEProblemBase & _fe_problem
Definition Adaptivity.h:271
MooseMesh & _mesh
Definition Adaptivity.h:272
bool _recompute_markers_during_cycles
Whether or not to recompute markers during adaptivity cycles.
Definition Adaptivity.h:327
Real _start_time
When adaptivity start.
Definition Adaptivity.h:305
Real & _t
Time.
Definition Adaptivity.h:299
bool _mesh_refinement_on
on/off flag reporting if the adaptivity is being used
Definition Adaptivity.h:275
Real _stop_time
When adaptivity stops.
Definition Adaptivity.h:307
unsigned int _max_h_level
The maximum number of refinement levels.
Definition Adaptivity.h:324
int & _step
Time Step.
Definition Adaptivity.h:301
bool _use_new_system
Whether or not to use the "new" adaptivity system.
Definition Adaptivity.h:312
AdaptivityType _adaptivity_type
Type of mesh adaptivity.
Definition Adaptivity.h:318
unsigned int _cycles_per_step
The number of adaptivity cycles per step.
Definition Adaptivity.h:309
bool _initialized
on/off flag reporting if the adaptivity system has been initialized
Definition Adaptivity.h:277
unsigned int _steps
steps of adaptivity to perform
Definition Adaptivity.h:293
bool _print_mesh_changed
True if we want to print out info when mesh has changed.
Definition Adaptivity.h:296
unsigned int _interval
intreval between adaptivity runs
Definition Adaptivity.h:303
An inteface for the _console for outputting to the Console object.
virtual MooseMesh & mesh() override
virtual Real & time() const
virtual int & timeStep() const
PerfGraph & perfGraph()
Get the PerfGraph for this app.
Definition MooseApp.h:179
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition MooseBase.h:87
Interface for objects interacting with the PerfGraph.

◆ ~Adaptivity()

Adaptivity::~Adaptivity ( )
virtual

Definition at line 57 of file Adaptivity.C.

57{}

Member Function Documentation

◆ adaptMesh()

bool Adaptivity::adaptMesh ( std::string  marker_name = std::string())

Adapts the mesh based on the error estimator used.

This method calls DisplacedProblem::undisplaceMesh, so it is necessary to update the displaced problem's mesh (undoing the undisplacement) before any objects relying on the displaced mesh are executed. However, projection of the displacement variables is required before doing so; therefore, the DisplacedProblem::updateMesh call needs to happen outside of this method.

See also
FEProblemBase::adaptMesh and FEProblemMase::meshChangedHelper.
Returns
a boolean that indicates whether the mesh was changed

Definition at line 145 of file Adaptivity.C.

146{
147 TIME_SECTION("adaptMesh", 3, "Adapting Mesh");
148
149 // If the marker name is supplied, use it. Otherwise, use the one in _marker_variable_name
150 if (marker_name.empty())
151 marker_name = _marker_variable_name;
152
153 bool mesh_changed = false;
154
155 // If mesh adaptivity is carried out in a distributed (scalable) way
156 bool distributed_adaptivity = false;
157
158 if (_use_new_system)
159 {
160 if (!marker_name.empty()) // Only flag if a marker variable name has been set
161 {
162 _mesh_refinement->clean_refinement_flags();
163
164 std::vector<Number> serialized_solution;
165
166 auto distributed_mesh = dynamic_cast<DistributedMesh *>(&_fe_problem.mesh().getMesh());
167
168 // Element range
169 std::unique_ptr<ConstElemRange> all_elems;
170 // If the mesh is distributed and we do not do "gather to zero" or "allgather".
171 // Then it is safe to not serialize solution.
172 // Some output idiom (Exodus) will do "gather to zero". That being said,
173 // if you have exodus output on, mesh adaptivty is not scalable.
174 if (distributed_mesh && !distributed_mesh->is_serial_on_zero())
175 {
176 // We update here to make sure local solution is up-to-date
178 distributed_adaptivity = true;
179
180 // We can not assume that geometric and algebraic ghosting functors cover
181 // the same set of elements/nodes. That being said, in general,
182 // we would expect G(e) > A(e). Here G(e) is the set of elements reserved
183 // by the geometric ghosting functors, and A(e) corresponds to
184 // the one covered by the algebraic ghosting functors.
185 // Therefore, we have to work only on local elements instead of
186 // ghosted + local elements. The ghosted solution might not be enough
187 // for ghosted+local elements. But it is always sufficient for local elements.
188 // After we set markers for all local elements, we will do a global
189 // communication to sync markers for ghosted elements from their owners.
190 all_elems = std::make_unique<ConstElemRange>(
191 _fe_problem.mesh().getMesh().active_local_elements_begin(),
192 _fe_problem.mesh().getMesh().active_local_elements_end());
193 }
194 else // This is not scalable but it might be useful for small-size problems
195 {
197 _fe_problem.getAuxiliarySystem().solution().localize(serialized_solution);
198 distributed_adaptivity = false;
199
200 // For a replicated mesh or a serialized distributed mesh, the solution
201 // is serialized to everyone. Then we update markers for all active elements.
202 // In this case, we can avoid a global communication to update mesh.
203 // I do not know if it is a good idea, but it the old code behavior.
204 // We might not care about much since a replicated mesh
205 // or a serialized distributed mesh is not scalable anyway.
206 all_elems =
207 std::make_unique<ConstElemRange>(_fe_problem.mesh().getMesh().active_elements_begin(),
208 _fe_problem.mesh().getMesh().active_elements_end());
209 }
210
212 _fe_problem, serialized_solution, _max_h_level, marker_name, !distributed_adaptivity);
213 Threads::parallel_reduce(*all_elems, fet);
215 }
216 }
217 else
218 {
220 mooseError("The old adaptivity system based on libMesh error estimators does not currently "
221 "support multiple solver systems because we currently only use the zeroth solver "
222 "system solution for estimating errors");
223
224 // Compute the error for each active element
225 _error_estimator->estimate_error(_fe_problem.getSolverSystem(/*nl_sys=*/0).system(), *_error);
226
227 // Flag elements to be refined and coarsened
228 _mesh_refinement->flag_elements_by_error_fraction(*_error);
229 }
230
231 // Moving some of h flagged elements to p flagged based on the
232 // local smoothness and prior h & p error estimates
234 {
235 _hp_coarsen_test = std::make_unique<HPCoarsenTest>();
236 _hp_coarsen_test->select_refinement(_fe_problem.getSolverSystem(/*nl_sys=*/0).system());
237 }
238
239 // If the DisplacedProblem is active, undisplace the DisplacedMesh
240 // in preparation for refinement. We can't safely refine the
241 // DisplacedMesh directly, since the Hilbert keys computed on the
242 // inconsistenly-displaced Mesh are different on different
243 // processors, leading to inconsistent Hilbert keys. We must do
244 // this before the undisplaced Mesh is refined, so that the
245 // element and node numbering is still consistent.
247 _displaced_problem->undisplaceMesh();
248
249 // If markers are added to only local elements,
250 // we sync them here.
251 if (distributed_adaptivity)
252 _mesh_refinement->make_flags_parallel_consistent();
253
254 // Sync flags from the reference mesh
256 for (auto * const displaced_elem :
257 _displaced_problem->mesh().getMesh().active_element_ptr_range())
258 {
259 const auto * const reference_elem = _fe_problem.mesh().elemPtr(displaced_elem->id());
260 displaced_elem->set_refinement_flag(reference_elem->refinement_flag());
261 displaced_elem->set_p_refinement_flag(reference_elem->p_refinement_flag());
262 }
263
265 _mesh_refinement->switch_h_to_p_refinement();
266
267 // Perform refinement and coarsening
268 mesh_changed = _mesh_refinement->refine_and_coarsen_elements();
269
270 if (_displaced_problem && mesh_changed)
271 {
273 _displaced_mesh_refinement->switch_h_to_p_refinement();
274
275#ifndef NDEBUG
276 bool displaced_mesh_changed =
277#endif
278 _displaced_mesh_refinement->refine_and_coarsen_elements();
279
280 // Since the undisplaced mesh changed, the displaced mesh better have changed!
281 mooseAssert(displaced_mesh_changed, "Undisplaced mesh changed, but displaced mesh did not!");
282 }
283
284 if (mesh_changed && _print_mesh_changed)
285 {
286 _console << "\nMesh Changed:\n";
288 _console << std::flush;
289 }
290
291 return mesh_changed;
292}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
std::string _marker_variable_name
Name of the marker variable if using the new adaptivity system.
Definition Adaptivity.h:315
std::unique_ptr< libMesh::ErrorVector > _error
Error vector for use with the error estimator.
Definition Adaptivity.h:283
std::unique_ptr< libMesh::MeshRefinement > _displaced_mesh_refinement
A mesh refinement object for displaced mesh.
Definition Adaptivity.h:288
std::unique_ptr< libMesh::ErrorEstimator > _error_estimator
Error estimator to be used by the apps.
Definition Adaptivity.h:281
std::unique_ptr< libMesh::MeshRefinement > _mesh_refinement
A mesh refinement object to be used either with initial refinement or with Adaptivity.
Definition Adaptivity.h:279
std::shared_ptr< DisplacedProblem > _displaced_problem
Definition Adaptivity.h:285
std::unique_ptr< libMesh::HPCoarsenTest > _hp_coarsen_test
Object for HP adaptivity.
Definition Adaptivity.h:334
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
AuxiliarySystem & getAuxiliarySystem()
virtual std::size_t numSolverSystems() const override
SolverSystem & getSolverSystem(unsigned int sys_num)
Get non-constant reference to a solver system.
void printInfo(std::ostream &os=libMesh::out, const unsigned int verbosity=0) const
Calls print_info() on the underlying Mesh.
Definition MooseMesh.C:3563
virtual Elem * elemPtr(const dof_id_type i)
Definition MooseMesh.C:3214
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition MooseMesh.C:3549
NumericVector< Number > & solution()
Definition SystemBase.h:203
void update()
Update the system (doing libMesh magic)
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
void set_refinement_flag(const RefinementState rflag)
virtual void close()=0
virtual void localize(std::vector< T > &v_local) const=0
MeshBase & mesh
void parallel_reduce(const Range &range, Body &body, unsigned int n_threads=libMesh::n_threads())

Referenced by FEProblemBase::adaptMesh(), and initialAdaptMesh().

◆ getCyclesPerStep()

unsigned int Adaptivity::getCyclesPerStep ( ) const
inline

Pull out the number of cycles_per_step previously set through the AdaptivityAction.

Returns
the number of cycles per step

Definition at line 126 of file Adaptivity.h.

126{ return _cycles_per_step; }

Referenced by FEProblemBase::adaptMesh().

◆ getErrorVector()

ErrorVector & Adaptivity::getErrorVector ( const std::string &  indicator_field)

Get an ErrorVector that will be filled up with values corresponding to the indicator field name passed in.

Note that this returns a reference... and the return value should be stored as a reference!

Parameters
indicator_fieldThe name of the field to get an ErrorVector for.

Definition at line 390 of file Adaptivity.C.

391{
392 // Insert or retrieve error vector
393 auto insert_pair = moose_try_emplace(
394 _indicator_field_to_error_vector, indicator_field, std::make_unique<ErrorVector>());
395 return *insert_pair.first->second;
396}
std::pair< typename M::iterator, bool > moose_try_emplace(M &m, const typename M::key_type &k, Args &&... args)
Function to mirror the behavior of the C++17 std::map::try_emplace() method (no hint).
Definition Moose.h:103
std::map< std::string, std::unique_ptr< libMesh::ErrorVector > > _indicator_field_to_error_vector
Stores pointers to ErrorVectors associated with indicator field names.
Definition Adaptivity.h:337

Referenced by Marker::getErrorVector().

◆ getInitialSteps()

unsigned int Adaptivity::getInitialSteps ( ) const
inline

Pull out the number of initial steps previously set by calling init()

Returns
the number of initial steps

Definition at line 112 of file Adaptivity.h.

112{ return _initial_steps; }

Referenced by FEProblemBase::hasInitialAdaptivity(), and FEProblemBase::initialAdaptMesh().

◆ getMaxHLevel()

unsigned int Adaptivity::getMaxHLevel ( )
inline

Return the maximum h-level.

Definition at line 243 of file Adaptivity.h.

243{ return _max_h_level; }

◆ getRecomputeMarkersFlag()

bool Adaptivity::getRecomputeMarkersFlag ( ) const
inline

Pull out the _recompute_markers_during_cycles flag previously set through the AdaptivityAction.

Returns
the flag to recompute markers during adaptivity cycles

Definition at line 139 of file Adaptivity.h.

Referenced by FEProblemBase::adaptMesh().

◆ getSteps()

unsigned int Adaptivity::getSteps ( ) const
inline

Pull out the number of steps previously set by calling init()

Returns
the number of steps

Definition at line 119 of file Adaptivity.h.

119{ return _steps; }

Referenced by Eigenvalue::execute(), and SteadyBase::execute().

◆ init()

void Adaptivity::init ( const unsigned int  steps,
const unsigned int  initial_steps,
const AdaptivityType  adaptivity_type 
)

Initialize and turn on adaptivity for the simulation.

initial_steps specifies the number of adaptivity cycles to perform before the simulation starts and steps indicates the number of adaptivity cycles to run during a steady (not transient) solve. steps is not used for transient or eigen solves. p_refinement indicates whether the refinement will be p-refinement or h-refinement.

Definition at line 60 of file Adaptivity.C.

63{
64 // Get the pointer to the DisplacedProblem, this cannot be done at construction because
65 // DisplacedProblem
66 // does not exist at that point.
68
69 _mesh_refinement = std::make_unique<MeshRefinement>(_mesh);
70 _error = std::make_unique<ErrorVector>();
71
73 es.parameters.set<bool>("adaptivity") = true;
74
75 _initial_steps = initial_steps;
76 _steps = steps;
77
78 _adaptivity_type = adaptivity_type;
79
81
84
86 {
88 mooseError("HP adaptivity doesn't support multiple solver systems because currently only the "
89 "zeroth solver system solution is analyzed for determining whether to toggle "
90 "h-refinement flags to p-refinement flags");
91
92 _sibling_coupling = std::make_unique<SiblingCoupling>();
95 }
96
97 _mesh_refinement->set_periodic_boundaries_ptr(
99
101 {
102 EquationSystems & displaced_es = _displaced_problem->es();
103 displaced_es.parameters.set<bool>("adaptivity") = true;
104
106 _displaced_mesh_refinement = std::make_unique<MeshRefinement>(_displaced_problem->mesh());
107
108 // The periodic boundaries pointer allows the MeshRefinement
109 // object to determine elements which are "topological" neighbors,
110 // i.e. neighbors across periodic boundaries, for the purposes of
111 // refinement.
112 _displaced_mesh_refinement->set_periodic_boundaries_ptr(
114
115 // TODO: This is currently an empty function on the DisplacedProblem... could it be removed?
116 _displaced_problem->initAdaptivity();
117 }
118
119 // indicate the Adaptivity system has been initialized
120 _initialized = true;
121}
std::unique_ptr< libMesh::SiblingCoupling > _sibling_coupling
Sibling coupling object for HP adaptivity for evaluating data on elements' siblings in HPCoarsenTest.
Definition Adaptivity.h:331
virtual libMesh::EquationSystems & es() override
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
void doingPRefinement(bool doing_p_refinement)
Indicate whether the kind of adaptivity we're doing includes p-refinement.
Definition MooseMesh.h:1504
virtual libMesh::DofMap & dofMap()
Gets writeable reference to the dof map.
PeriodicBoundaries * get_periodic_boundaries()
void add_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor, bool to_mesh=true)
T & set(const std::string &)
const DofMap & get_dof_map() const

Referenced by AdaptivityAction::act(), and SetAdaptivityOptionsAction::act().

◆ initialAdaptMesh()

bool Adaptivity::initialAdaptMesh ( )

Used during initial adaptivity.

Returns
a boolean that indicates whether the mesh was changed

Definition at line 295 of file Adaptivity.C.

296{
298}
bool adaptMesh(std::string marker_name=std::string())
Adapts the mesh based on the error estimator used.
Definition Adaptivity.C:145
std::string _initial_marker_variable_name
Name of the initial marker variable if using the new adaptivity system.
Definition Adaptivity.h:321

Referenced by FEProblemBase::initialAdaptMesh().

◆ isAdaptivityDue()

bool Adaptivity::isAdaptivityDue ( )

Query if an adaptivity step should be performed at the current time / time step.

Definition at line 420 of file Adaptivity.C.

421{
422 return _mesh_refinement_on && (_start_time <= _t && _t < _stop_time) && _step % _interval == 0;
423}

Referenced by FEProblemBase::adaptMesh().

◆ isInitialized()

bool Adaptivity::isInitialized ( )
inline

Returns whether or not Adaptivity::init() has ran.

Can be used to indicate if mesh adaptivity is available.

Returns
true if the Adaptivity system is ready to be used, otherwise false

Definition at line 201 of file Adaptivity.h.

201{ return _initialized; }

◆ isOn()

bool Adaptivity::isOn ( )
inline

Is adaptivity on?

Returns
true if mesh adaptivity is on, otherwise false

Definition at line 193 of file Adaptivity.h.

193{ return _mesh_refinement_on; }

Referenced by FEProblemBase::addAnyRedistributers(), and FEProblemBase::checkProblemIntegrity().

◆ perfGraph()

PerfGraph & PerfGraphInterface::perfGraph ( )
inherited

Get the PerfGraph.

Definition at line 86 of file PerfGraphInterface.C.

87{
88 return _pg_moose_app.perfGraph();
89}
MooseApp & _pg_moose_app
The MooseApp that owns the PerfGraph.

Referenced by CommonOutputAction::act(), PerfGraphData::finalize(), PerfGraphReporter::finalize(), and PerfGraphOutput::output().

◆ registerTimedSection() [1/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 61 of file PerfGraphInterface.C.

63{
64 const auto timed_section_name = timedSectionName(section_name);
65 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
66 return moose::internal::getPerfGraphRegistry().registerSection(timed_section_name, level);
67 else
68 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
69}
std::string timedSectionName(const std::string &section_name) const
PerfID sectionID(const std::string &section_name) const
Given a name return the PerfID @section_name The name of the section.
PerfID registerSection(const std::string &section_name, const unsigned int level)
Call to register a named section for timing.
PerfGraphRegistry & getPerfGraphRegistry()
Get the global PerfGraphRegistry singleton.

◆ registerTimedSection() [2/2]

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level,
const std::string &  live_message,
const bool  print_dots = true 
) const
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
live_messageThe message to be printed to the screen during execution
print_dotsWhether or not progress dots should be printed for this section
Returns
The ID of the section - use when starting timing

Definition at line 72 of file PerfGraphInterface.C.

76{
77 const auto timed_section_name = timedSectionName(section_name);
78 if (!moose::internal::getPerfGraphRegistry().sectionExists(timed_section_name))
80 timedSectionName(section_name), level, live_message, print_dots);
81 else
82 return moose::internal::getPerfGraphRegistry().sectionID(timed_section_name);
83}

◆ setAdaptivityOn()

void Adaptivity::setAdaptivityOn ( bool  state)

Allow adaptivity to be toggled programatically.

Parameters
stateThe adaptivity state (on/off).

Definition at line 355 of file Adaptivity.C.

356{
357 // check if Adaptivity has been initialized before turning on
358 if (state == true && !_initialized)
359 mooseError("Mesh adaptivity system not available");
360
361 _mesh_refinement_on = state;
362}

◆ setCyclesPerStep()

void Adaptivity::setCyclesPerStep ( const unsigned int num)
inline

Set the number of cycles_per_step.

Parameters
numThe number of cycles per step to execute

Definition at line 132 of file Adaptivity.h.

132{ _cycles_per_step = num; }

Referenced by SetAdaptivityOptionsAction::act().

◆ setErrorEstimator()

void Adaptivity::setErrorEstimator ( const MooseEnum error_estimator_name)

Set the error estimator.

Parameters
error_estimator_namethe name of the error estimator (currently: Laplacian, Kelly, and PatchRecovery)

Definition at line 124 of file Adaptivity.C.

125{
126 if (error_estimator_name == "KellyErrorEstimator")
127 _error_estimator = std::make_unique<KellyErrorEstimator>();
128 else if (error_estimator_name == "LaplacianErrorEstimator")
129 _error_estimator = std::make_unique<LaplacianErrorEstimator>();
130 else if (error_estimator_name == "PatchRecoveryErrorEstimator")
131 _error_estimator = std::make_unique<PatchRecoveryErrorEstimator>();
132 else
133 mooseError(std::string("Unknown error_estimator selection: ") +
134 std::string(error_estimator_name));
135}

Referenced by AdaptivityAction::act().

◆ setErrorNorm()

void Adaptivity::setErrorNorm ( libMesh::SystemNorm sys_norm)

Set the error norm (FIXME: improve description)

Definition at line 138 of file Adaptivity.C.

139{
140 mooseAssert(_error_estimator, "error_estimator not initialized. Did you call init_adaptivity()?");
141 _error_estimator->error_norm = sys_norm;
142}

Referenced by AdaptivityAction::act().

◆ setInitialMarkerVariableName()

void Adaptivity::setInitialMarkerVariableName ( std::string  marker_field)

Sets the name of the field variable to actually use to flag elements for initial refinement / coarsening.

This must be a CONSTANT, MONOMIAL Auxiliary Variable Name that contains values corresponding to libMesh::Elem::RefinementState.

Parameters
marker_fieldThe name of the field to use for refinement / coarsening.

Definition at line 384 of file Adaptivity.C.

385{
386 _initial_marker_variable_name = marker_field;
387}

Referenced by SetAdaptivityOptionsAction::act().

◆ setInterval()

void Adaptivity::setInterval ( unsigned int  interval)
inline

Set the interval (number of timesteps) between refinement steps.

Definition at line 248 of file Adaptivity.h.

248{ _interval = interval; }

Referenced by AdaptivityAction::act(), and SetAdaptivityOptionsAction::act().

◆ setMarkerVariableName()

void Adaptivity::setMarkerVariableName ( std::string  marker_field)

Sets the name of the field variable to actually use to flag elements for refinement / coarsening.

This must be a CONSTANT, MONOMIAL Auxiliary Variable Name that contains values corresponding to libMesh::Elem::RefinementState.

Parameters
marker_fieldThe name of the field to use for refinement / coarsening.

Definition at line 378 of file Adaptivity.C.

379{
380 _marker_variable_name = marker_field;
381}

Referenced by SetAdaptivityOptionsAction::act().

◆ setMaxHLevel()

void Adaptivity::setMaxHLevel ( unsigned int  level)
inline

Set the maximum refinement level (for the new Adaptivity system).

Definition at line 238 of file Adaptivity.h.

238{ _max_h_level = level; }

Referenced by SetAdaptivityOptionsAction::act().

◆ setParam()

template<typename T >
void Adaptivity::setParam ( const std::string &  param_name,
const T &  param_value 
)

Set adaptivity parameter.

Parameters
param_namethe name of the parameter
param_valuethe value of parameter

Definition at line 342 of file Adaptivity.h.

343{
344 if (param_name == "refine fraction")
345 {
346 _mesh_refinement->refine_fraction() = param_value;
348 _displaced_mesh_refinement->refine_fraction() = param_value;
349 }
350 else if (param_name == "coarsen fraction")
351 {
352 _mesh_refinement->coarsen_fraction() = param_value;
354 _displaced_mesh_refinement->coarsen_fraction() = param_value;
355 }
356 else if (param_name == "max h-level")
357 {
358 _mesh_refinement->max_h_level() = param_value;
360 _displaced_mesh_refinement->max_h_level() = param_value;
361 }
362 else if (param_name == "cycles_per_step")
363 _cycles_per_step = param_value;
364 else if (param_name == "recompute_markers_during_cycles")
366 else
367 mooseError("Invalid Param in adaptivity object");
368}

Referenced by AdaptivityAction::act().

◆ setPrintMeshChanged()

void Adaptivity::setPrintMeshChanged ( bool  state = true)
inline

Definition at line 105 of file Adaptivity.h.

105{ _print_mesh_changed = state; }

Referenced by AdaptivityAction::act().

◆ setRecomputeMarkersFlag()

void Adaptivity::setRecomputeMarkersFlag ( const bool  flag)
inline

Set the flag to recompute markers during adaptivity cycles.

Parameters
flagThe flag to recompute markers

Definition at line 145 of file Adaptivity.h.

Referenced by SetAdaptivityOptionsAction::act().

◆ setTimeActive()

void Adaptivity::setTimeActive ( Real  start_time,
Real  stop_time 
)

Sets the time when the adaptivity is active.

Parameters
start_timeThe time when adaptivity starts
stop_timeThe time when adaptivity stops

Definition at line 365 of file Adaptivity.C.

366{
367 _start_time = start_time;
368 _stop_time = stop_time;
369}

Referenced by AdaptivityAction::act(), and SetAdaptivityOptionsAction::act().

◆ setUseNewSystem()

void Adaptivity::setUseNewSystem ( )

Tells this object we're using the "new" adaptivity system.

Definition at line 372 of file Adaptivity.C.

373{
374 _use_new_system = true;
375}

Referenced by SetAdaptivityOptionsAction::act().

◆ timedSectionName()

std::string PerfGraphInterface::timedSectionName ( const std::string &  section_name) const
protectedinherited
Returns
The name of the timed section with the name section_name.

Optionally adds a prefix if one is defined.

Definition at line 55 of file PerfGraphInterface.C.

56{
57 return _prefix.empty() ? "" : (_prefix + "::") + section_name;
58}
const std::string _prefix
A prefix to use for all sections.

Referenced by PerfGraphInterface::registerTimedSection(), and PerfGraphInterface::registerTimedSection().

◆ uniformRefine()

void Adaptivity::uniformRefine ( MooseMesh mesh,
unsigned int  level = libMesh::invalid_uint 
)
static

Performs uniform refinement of the passed Mesh object.

The number of levels of refinement performed is stored in the MooseMesh object. No solution projection is performed in this version.

Definition at line 301 of file Adaptivity.C.

302{
303 mooseAssert(mesh, "Mesh pointer must not be NULL");
304
305 // NOTE: we are using a separate object here, since adaptivity may not be on, but we need to be
306 // able to do refinements
307 MeshRefinement mesh_refinement(*mesh);
308 if (level == libMesh::invalid_uint)
309 level = mesh->uniformRefineLevel();
310
311 // Skip deletion and repartition will make uniform refinements run more
312 // efficiently, but at the same time, there might be extra ghosting elements.
313 // The number of layers of additional ghosting elements depends on the number
314 // of uniform refinement levels. This should happen only when you have a "fine enough"
315 // coarse mesh and want to refine the mesh by a few levels. Otherwise, it might
316 // introduce an unbalanced workload and too large ghosting domain.
317 if (mesh->skipDeletionRepartitionAfterRefine())
318 {
319 mesh->getMesh().skip_partitioning(true);
320 mesh->getMesh().allow_remote_element_removal(false);
321 mesh->needsRemoteElemDeletion(false);
322 }
323
324 mesh_refinement.uniformly_refine(level);
325}
void allow_remote_element_removal(bool allow)
void skip_partitioning(bool skip)
const unsigned int invalid_uint

Referenced by SetupMeshCompleteAction::act(), and FEProblemBase::uniformRefine().

◆ uniformRefineWithProjection()

void Adaptivity::uniformRefineWithProjection ( )

Performs uniform refinement on the meshes in the current object.

Projections are performed of the solution vectors.

Definition at line 328 of file Adaptivity.C.

329{
330 TIME_SECTION("uniformRefineWithProjection", 2, "Uniformly Refining and Reprojecting");
331
332 // NOTE: we are using a separate object here, since adaptivity may not be on, but we need to be
333 // able to do refinements
334 MeshRefinement mesh_refinement(_mesh);
335 unsigned int level = _mesh.uniformRefineLevel();
336 MeshRefinement displaced_mesh_refinement(_displaced_problem ? _displaced_problem->mesh() : _mesh);
337
338 // we have to go step by step so EquationSystems::reinit() won't freak out
339 for (unsigned int i = 0; i < level; i++)
340 {
341 // See comment above about why refining the displaced mesh is potentially unsafe.
343 _displaced_problem->undisplaceMesh();
344
345 mesh_refinement.uniformly_refine(1);
346
348 displaced_mesh_refinement.uniformly_refine(1);
350 /*intermediate_step=*/false, /*contract_mesh=*/true, /*clean_refinement_flags=*/true);
351 }
352}
virtual void meshChanged(bool intermediate_change, bool contract_mesh, bool clean_refinement_flags)
Update data after a mesh change.
unsigned int uniformRefineLevel() const
Returns the level of uniform refinement requested (zero if AMR is disabled).
Definition MooseMesh.C:3317
void uniformly_refine(unsigned int n=1)

◆ updateErrorVectors()

void Adaptivity::updateErrorVectors ( )

Update the ErrorVectors that have been requested through calls to getErrorVector().

Definition at line 399 of file Adaptivity.C.

400{
401 TIME_SECTION("updateErrorVectors", 5, "Updating Error Vectors");
402
403 // Resize all of the ErrorVectors in case the mesh has changed
404 for (const auto & it : _indicator_field_to_error_vector)
405 {
406 ErrorVector & vec = *(it.second);
407 vec.assign(_mesh.getMesh().max_elem_id(), 0);
408 }
409
410 // Fill the vectors with the local contributions
413
414 // Now sum across all processors
415 for (const auto & it : _indicator_field_to_error_vector)
416 _fe_problem.comm().sum((std::vector<float> &)*(it.second));
417}
const libMesh::ConstElemRange * getActiveLocalElementRange()
Return pointers to range objects for various types of ranges (local nodes, boundary elems,...
Definition MooseMesh.C:1242
virtual dof_id_type max_elem_id() const=0
const Parallel::Communicator & comm() const

Referenced by FEProblemBase::computeMarkers().

◆ validParams()

InputParameters PerfGraphInterface::validParams ( )
staticinherited

Definition at line 16 of file PerfGraphInterface.C.

17{
19 return params;
20}
InputParameters emptyInputParameters()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.

Referenced by Convergence::validParams().

Member Data Documentation

◆ _adaptivity_type

AdaptivityType Adaptivity::_adaptivity_type
protected

Type of mesh adaptivity.

Definition at line 318 of file Adaptivity.h.

Referenced by adaptMesh(), and init().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MaterialOutputAction::act(), MeshOnlyAction::act(), SetupDebugAction::act(), FEProblemBase::adaptMesh(), adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), DefaultSteadyStateConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), MeshDiagnosticsGenerator::checkPolygons(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkResidualConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeLinearSystemTags(), LinearSystem::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), TimeStepper::constrainStep(), IterationAdaptiveDT::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), Eigenvalue::execute(), SteadyBase::execute(), MFEMSteady::execute(), MessageFromInput::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), SidesetAroundSubdomainUpdater::finalize(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), SurfaceSubdomainsDelaunayRemesher::General2DDelaunay(), CoarsenBlockGenerator::generate(), OrientSurfaceMeshGenerator::generate(), PolyLineMeshFollowingNodeSetGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), SubProblem::initialSetup(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), SurfaceDelaunayGeneratorBase::meshNormalDeviation2D(), MooseBase::mooseDeprecated(), MooseBase::mooseDeprecatedNoTrace(), MooseBase::mooseInfo(), MooseBase::mooseWarning(), MooseBase::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), Console::output(), DOFMapOutput::output(), MaterialPropertyDebugOutput::output(), PerfGraphOutput::output(), ReporterDebugOutput::output(), SolutionInvalidityOutput::output(), VariableResidualNormsDebugOutput::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), WebServerControl::outputMessage(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionGroups(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), BlockRestrictionDebugOutput::printBoundaryRestrictionGroups(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), PicardSolve::printFixedPointConvergenceHistory(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), LinearSystem::solve(), NonlinearSystem::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), ExplicitTVDRK2::solve(), ImplicitMidpoint::solve(), LStableDirk2::solve(), LStableDirk3::solve(), LStableDirk4::solve(), EigenProblem::solve(), FixedPointSolve::solveStep(), TransientMultiApp::solveStep(), MeshRepairGenerator::splitNonConvexPolygons(), PerfGraphLivePrint::start(), WebServerControl::startServer(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), MFEMTransient::takeStep(), TerminateChainControl::terminate(), SubProblem::timestepSetup(), FEProblemBase::updateMeshXFEM(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _cycles_per_step

unsigned int Adaptivity::_cycles_per_step
protected

The number of adaptivity cycles per step.

Definition at line 309 of file Adaptivity.h.

Referenced by getCyclesPerStep(), setCyclesPerStep(), and setParam().

◆ _displaced_mesh_refinement

std::unique_ptr<libMesh::MeshRefinement> Adaptivity::_displaced_mesh_refinement
protected

A mesh refinement object for displaced mesh.

Definition at line 288 of file Adaptivity.h.

Referenced by adaptMesh(), init(), and setParam().

◆ _displaced_problem

std::shared_ptr<DisplacedProblem> Adaptivity::_displaced_problem
protected

Definition at line 285 of file Adaptivity.h.

Referenced by adaptMesh(), init(), and uniformRefineWithProjection().

◆ _error

std::unique_ptr<libMesh::ErrorVector> Adaptivity::_error
protected

Error vector for use with the error estimator.

Definition at line 283 of file Adaptivity.h.

Referenced by adaptMesh(), and init().

◆ _error_estimator

std::unique_ptr<libMesh::ErrorEstimator> Adaptivity::_error_estimator
protected

Error estimator to be used by the apps.

Definition at line 281 of file Adaptivity.h.

Referenced by adaptMesh(), setErrorEstimator(), and setErrorNorm().

◆ _fe_problem

FEProblemBase& Adaptivity::_fe_problem
protected

Definition at line 271 of file Adaptivity.h.

Referenced by adaptMesh(), init(), uniformRefineWithProjection(), and updateErrorVectors().

◆ _hp_coarsen_test

std::unique_ptr<libMesh::HPCoarsenTest> Adaptivity::_hp_coarsen_test
protected

Object for HP adaptivity.

Definition at line 334 of file Adaptivity.h.

Referenced by adaptMesh().

◆ _indicator_field_to_error_vector

std::map<std::string, std::unique_ptr<libMesh::ErrorVector> > Adaptivity::_indicator_field_to_error_vector
protected

Stores pointers to ErrorVectors associated with indicator field names.

Definition at line 337 of file Adaptivity.h.

Referenced by getErrorVector(), and updateErrorVectors().

◆ _initial_marker_variable_name

std::string Adaptivity::_initial_marker_variable_name
protected

Name of the initial marker variable if using the new adaptivity system.

Definition at line 321 of file Adaptivity.h.

Referenced by initialAdaptMesh(), and setInitialMarkerVariableName().

◆ _initial_steps

unsigned int Adaptivity::_initial_steps
protected

the number of adaptivity steps to do at the beginning of simulation

Definition at line 291 of file Adaptivity.h.

Referenced by getInitialSteps(), and init().

◆ _initialized

bool Adaptivity::_initialized
protected

on/off flag reporting if the adaptivity system has been initialized

Definition at line 277 of file Adaptivity.h.

Referenced by init(), isInitialized(), and setAdaptivityOn().

◆ _interval

unsigned int Adaptivity::_interval
protected

intreval between adaptivity runs

Definition at line 303 of file Adaptivity.h.

Referenced by isAdaptivityDue(), and setInterval().

◆ _marker_variable_name

std::string Adaptivity::_marker_variable_name
protected

Name of the marker variable if using the new adaptivity system.

Definition at line 315 of file Adaptivity.h.

Referenced by adaptMesh(), and setMarkerVariableName().

◆ _max_h_level

unsigned int Adaptivity::_max_h_level
protected

The maximum number of refinement levels.

Definition at line 324 of file Adaptivity.h.

Referenced by adaptMesh(), getMaxHLevel(), and setMaxHLevel().

◆ _mesh

MooseMesh& Adaptivity::_mesh
protected

Definition at line 272 of file Adaptivity.h.

Referenced by adaptMesh(), init(), uniformRefineWithProjection(), and updateErrorVectors().

◆ _mesh_refinement

std::unique_ptr<libMesh::MeshRefinement> Adaptivity::_mesh_refinement
protected

A mesh refinement object to be used either with initial refinement or with Adaptivity.

Definition at line 279 of file Adaptivity.h.

Referenced by adaptMesh(), init(), and setParam().

◆ _mesh_refinement_on

bool Adaptivity::_mesh_refinement_on
protected

on/off flag reporting if the adaptivity is being used

Definition at line 275 of file Adaptivity.h.

Referenced by init(), isAdaptivityDue(), isOn(), and setAdaptivityOn().

◆ _pg_moose_app

MooseApp& PerfGraphInterface::_pg_moose_app
protectedinherited

The MooseApp that owns the PerfGraph.

Definition at line 135 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::perfGraph().

◆ _prefix

const std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 138 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::timedSectionName().

◆ _print_mesh_changed

bool Adaptivity::_print_mesh_changed
protected

True if we want to print out info when mesh has changed.

Definition at line 296 of file Adaptivity.h.

Referenced by adaptMesh(), and setPrintMeshChanged().

◆ _recompute_markers_during_cycles

bool Adaptivity::_recompute_markers_during_cycles
protected

Whether or not to recompute markers during adaptivity cycles.

Definition at line 327 of file Adaptivity.h.

Referenced by getRecomputeMarkersFlag(), setParam(), and setRecomputeMarkersFlag().

◆ _sibling_coupling

std::unique_ptr<libMesh::SiblingCoupling> Adaptivity::_sibling_coupling
protected

Sibling coupling object for HP adaptivity for evaluating data on elements' siblings in HPCoarsenTest.

Definition at line 331 of file Adaptivity.h.

Referenced by init().

◆ _start_time

Real Adaptivity::_start_time
protected

When adaptivity start.

Definition at line 305 of file Adaptivity.h.

Referenced by isAdaptivityDue(), and setTimeActive().

◆ _step

int& Adaptivity::_step
protected

Time Step.

Definition at line 301 of file Adaptivity.h.

Referenced by isAdaptivityDue().

◆ _steps

unsigned int Adaptivity::_steps
protected

steps of adaptivity to perform

Definition at line 293 of file Adaptivity.h.

Referenced by getSteps(), and init().

◆ _stop_time

Real Adaptivity::_stop_time
protected

When adaptivity stops.

Definition at line 307 of file Adaptivity.h.

Referenced by isAdaptivityDue(), and setTimeActive().

◆ _t

Real& Adaptivity::_t
protected

Time.

Definition at line 299 of file Adaptivity.h.

Referenced by isAdaptivityDue().

◆ _use_new_system

bool Adaptivity::_use_new_system
protected

Whether or not to use the "new" adaptivity system.

Definition at line 312 of file Adaptivity.h.

Referenced by adaptMesh(), and setUseNewSystem().


The documentation for this class was generated from the following files: