https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AddFieldSplitAction.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 "AddFieldSplitAction.h"
12#include "FEProblem.h"
13#include "NonlinearSystemBase.h"
14
15registerMooseAction("MooseApp", AddFieldSplitAction, "add_field_split");
16
19{
21 params.addClassDescription("Add a Split object to the simulation.");
22 params.addParam<std::string>("type", "Split", "Classname of the split object");
23 params.addParam<std::vector<NonlinearVariableName>>("vars", "variables for this field");
25 "petsc_options", Moose::PetscSupport::getCommonPetscFlags(), "Singleton PETSc options");
26 params.addParam<MultiMooseEnum>("petsc_options_iname",
28 "Names of PETSc name/value pairs");
29 params.addParam<std::vector<std::string>>(
30 "petsc_options_value",
31 "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\"");
32 params.addParam<NonlinearSystemName>(
33 "nl_sys", "nl0", "The nonlinear system that this split belongs to");
34 return params;
35}
36
40
41void
43{
44 _problem->getNonlinearSystemBase(_problem->nlSysNum(getParam<NonlinearSystemName>("nl_sys")))
45 .addSplit(_type, _name, _moose_object_pars);
46}
registerMooseAction("MooseApp", AddFieldSplitAction, "add_field_split")
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition Action.h:178
AddFieldSplitAction(const InputParameters &params)
void act()
Method to add objects to the simulation or perform other setup tasks.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
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.
const std::string & _name
The name of this class.
Definition MooseBase.h:381
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.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
MultiMooseEnum getCommonPetscFlags()
A helper function to produce a MultiMooseEnum with commonly used PETSc single options (flags)
MultiMooseEnum getCommonPetscKeys()
A helper function to produce a MultiMooseEnum with commonly used PETSc iname options (keys in key-val...