forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PartitionerAction.C
39 lines (34 loc) · 1.47 KB
/
PartitionerAction.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#include "PartitionerAction.h"
#include "FEProblem.h"
#include "MooseEnum.h"
#include "MoosePartitioner.h"
template<>
InputParameters validParams<PartitionerAction>()
{
InputParameters params = validParams<MooseObjectAction>();
return params;
}
PartitionerAction::PartitionerAction(InputParameters params) :
MooseObjectAction(params)
{
}
void
PartitionerAction::act()
{
_mesh->setIsCustomPartitionerRequested(true);
MooseSharedPointer<MoosePartitioner> mp = MooseSharedNamespace::static_pointer_cast<MoosePartitioner>(_factory.create(_type, _name, _moose_object_pars));
_mesh->setCustomPartitioner(mp.get());
}