www.mooseframework.org
Public Member Functions | List of all members
LevelSetProblem Class Reference

Problem that defines a custom call to MultiAppTransfers to allow for adaptivity to be transferred from master to sub-application. More...

#include <LevelSetProblem.h>

Inheritance diagram for LevelSetProblem:
[legend]

Public Member Functions

 LevelSetProblem (const InputParameters &parameters)
 
virtual void adaptMesh () override
 

Detailed Description

Problem that defines a custom call to MultiAppTransfers to allow for adaptivity to be transferred from master to sub-application.

Definition at line 19 of file LevelSetProblem.h.

Constructor & Destructor Documentation

LevelSetProblem::LevelSetProblem ( const InputParameters &  parameters)

Definition at line 22 of file LevelSetProblem.C.

22 : FEProblem(parameters) {}

Member Function Documentation

void LevelSetProblem::adaptMesh ( )
overridevirtual

Definition at line 25 of file LevelSetProblem.C.

26 {
27  if (!_adaptivity.isAdaptivityDue())
28  return;
29 
30  unsigned int cycles_per_step = _adaptivity.getCyclesPerStep();
31  _cycles_completed = 0;
32  for (unsigned int i = 0; i < cycles_per_step; ++i)
33  {
34 
35  execMultiAppTransfers(EXEC_CUSTOM, MultiAppTransfer::TO_MULTIAPP);
36 
37  _console << "Adaptivity step " << i + 1 << " of " << cycles_per_step << '\n';
38  // Markers were already computed once by Executioner
39  if (_adaptivity.getRecomputeMarkersFlag() && i > 0)
40  computeMarkers();
41  if (_adaptivity.adaptMesh())
42  {
43  meshChanged();
44  _cycles_completed++;
45  }
46  else
47  {
48  _console << "Mesh unchanged, skipping remaining steps..." << std::endl;
49  return;
50  }
51 
52  // Show adaptivity progress
53  _console << std::flush;
54  }
55 }

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