www.mooseframework.org
PartitionerAction.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 // MOOSE includes
16 #include "PartitionerAction.h"
17 #include "MoosePartitioner.h"
18 #include "FEProblem.h"
19 #include "MooseEnum.h"
20 #include "MooseMesh.h"
21 
22 template <>
25 {
27  return params;
28 }
29 
31 
32 void
34 {
35  _mesh->setIsCustomPartitionerRequested(true);
36  _moose_object_pars.set<MooseMesh *>("mesh") = _mesh.get();
37  std::shared_ptr<MoosePartitioner> mp =
39  _mesh->setCustomPartitioner(mp.get());
40  if (_displaced_mesh)
41  {
42  _displaced_mesh->setIsCustomPartitionerRequested(true);
43  _displaced_mesh->setCustomPartitioner(mp.get());
44  }
45 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:46
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
PartitionerAction(InputParameters params)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Factory & _factory
The Factory associated with the MooseApp.
Definition: Action.h:101
std::string _name
The name of the action.
Definition: Action.h:92
std::shared_ptr< MooseMesh > & _displaced_mesh
Definition: Action.h:128
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
InputParameters validParams< MooseObjectAction >()
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:127
std::string _type
The Object type that is being created.
virtual void act() override
InputParameters _moose_object_pars
The parameters for the object to be created.
Base class for MOOSE partitioner.
InputParameters validParams< PartitionerAction >()