https://mooseframework.inl.gov
PartitionerAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
21 {
23  params.addClassDescription("Add a Partitioner object to the simulation.");
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 }
const std::string & _name
The name of this class.
Definition: MooseBase.h:359
static InputParameters validParams()
Factory & _factory
The Factory associated with the MooseApp.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
Definition: Factory.C:111
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
registerMooseAction("MooseApp", PartitionerAction, "add_partitioner")
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
static InputParameters validParams()
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:167
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.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
PartitionerAction(const InputParameters &params)