https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
17registerMooseAction("MooseApp", PartitionerAction, "add_partitioner");
18
21{
23 params.addClassDescription("Add a Partitioner object to the simulation.");
24 return params;
25}
26
28
29void
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}
registerMooseAction("MooseApp", PartitionerAction, "add_partitioner")
std::shared_ptr< MooseMesh > & _mesh
Definition Action.h:174
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:142
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
const std::string & _name
The name of this class.
Definition MooseBase.h:381
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
InputParameters _moose_object_pars
The parameters for the object to be created.
static InputParameters validParams()
std::string _type
The Object type that is being created.
Base class for MOOSE partitioner.
Factory & _factory
The Factory associated with the MooseApp.
PartitionerAction(const InputParameters &params)
static InputParameters validParams()
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.