www.mooseframework.org
AddFieldSplitAction.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 "AddFieldSplitAction.h"
17 #include "FEProblem.h"
18 #include "NonlinearSystemBase.h"
19 
20 template <>
23 {
25  params.addParam<std::string>("type", "Split", "Classname of the split object");
26  params.addParam<std::vector<NonlinearVariableName>>("vars", "variables for this field");
27  params.addParam<MultiMooseEnum>(
28  "petsc_options", Moose::PetscSupport::getCommonPetscFlags(), "Singleton PETSc options");
29  params.addParam<MultiMooseEnum>("petsc_options_iname",
31  "Names of PETSc name/value pairs");
32  params.addParam<std::vector<std::string>>(
33  "petsc_options_value",
34  "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\"");
35  return params;
36 }
37 
39 
40 void
42 {
43  _moose_object_pars.set<FEProblemBase *>("_fe_problem_base") = _problem.get();
44  _problem->getNonlinearSystemBase().addSplit(_type, _name, _moose_object_pars);
45 }
MultiMooseEnum getCommonPetscKeys()
A helper function to produce a MultiMooseEnum with commonly used PETSc iname options (keys in key-val...
Definition: PetscSupport.C:797
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
AddFieldSplitAction(InputParameters params)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::string _name
The name of the action.
Definition: Action.h:92
MultiMooseEnum getCommonPetscFlags()
A helper function to produce a MultiMooseEnum with commonly used PETSc single options (flags) ...
Definition: PetscSupport.C:785
InputParameters validParams< MooseObjectAction >()
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:131
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
InputParameters validParams< AddFieldSplitAction >()