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

Copies the refinement marker from the master to the sub-application. More...

#include <LevelSetMeshRefinementTransfer.h>

Inheritance diagram for LevelSetMeshRefinementTransfer:
[legend]

Public Member Functions

 LevelSetMeshRefinementTransfer (const InputParameters &parameters)
 
virtual void initialSetup () override
 
virtual void execute () override
 

Detailed Description

Copies the refinement marker from the master to the sub-application.

Definition at line 22 of file LevelSetMeshRefinementTransfer.h.

Constructor & Destructor Documentation

LevelSetMeshRefinementTransfer::LevelSetMeshRefinementTransfer ( const InputParameters &  parameters)

Definition at line 34 of file LevelSetMeshRefinementTransfer.C.

35  : MultiAppCopyTransfer(parameters)
36 {
37 }

Member Function Documentation

void LevelSetMeshRefinementTransfer::execute ( )
overridevirtual

Definition at line 60 of file LevelSetMeshRefinementTransfer.C.

61 {
62  MultiAppCopyTransfer::execute();
63 
64  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
65  if (_multi_app->hasLocalApp(i))
66  {
67  FEProblemBase & to_problem = _multi_app->appProblemBase(i);
68  Adaptivity & adapt = to_problem.adaptivity();
69  adapt.setAdaptivityOn(true);
70  to_problem.adaptMesh();
71  adapt.setAdaptivityOn(false);
72  }
73 }
void LevelSetMeshRefinementTransfer::initialSetup ( )
overridevirtual

Definition at line 40 of file LevelSetMeshRefinementTransfer.C.

41 {
42  FEProblemBase & from_problem = _multi_app->problemBase();
43  for (unsigned int i = 0; i < _multi_app->numGlobalApps(); i++)
44  if (_multi_app->hasLocalApp(i))
45  {
46  FEProblemBase & to_problem = _multi_app->appProblemBase(i);
47  MooseVariable & to_var = to_problem.getVariable(0, _to_var_name);
48  Adaptivity & adapt = to_problem.adaptivity();
49 
50  adapt.setMarkerVariableName(to_var.name());
51  adapt.setCyclesPerStep(1);
52  adapt.init(0, 0);
53  adapt.setUseNewSystem();
54  adapt.setMaxHLevel(from_problem.adaptivity().getMaxHLevel());
55  adapt.setAdaptivityOn(false);
56  }
57 }

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