www.mooseframework.org
PartitionerAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // MOOSE includes
11 #include "PartitionerAction.h"
12 #include "MoosePartitioner.h"
13 #include "FEProblem.h"
14 #include "MooseEnum.h"
15 #include "MooseMesh.h"
16 
17 registerMooseAction("MooseApp", PartitionerAction, "add_partitioner");
18 
19 template <>
22 {
24  return params;
25 }
26 
28 
29 void
31 {
32  _mesh->setIsCustomPartitionerRequested(true);
33  _moose_object_pars.set<MooseMesh *>("mesh") = _mesh.get();
34  std::shared_ptr<MoosePartitioner> mp =
36  _mesh->setCustomPartitioner(mp.get());
37 }
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:87
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:186
std::string _name
The name of the action.
Definition: Action.h:177
registerMooseAction("MooseApp", PartitionerAction, "add_partitioner")
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:212
std::string _type
The Object type that is being created.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
InputParameters _moose_object_pars
The parameters for the object to be created.
Base class for MOOSE partitioner.
InputParameters validParams< PartitionerAction >()