Line data Source code
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 : 15 : registerMooseAction("MooseApp", AddFieldSplitAction, "add_field_split"); 16 : 17 : InputParameters 18 579 : AddFieldSplitAction::validParams() 19 : { 20 579 : InputParameters params = MooseObjectAction::validParams(); 21 579 : params.addClassDescription("Add a Split object to the simulation."); 22 579 : params.addParam<std::string>("type", "Split", "Classname of the split object"); 23 579 : params.addParam<std::vector<NonlinearVariableName>>("vars", "variables for this field"); 24 1737 : params.addParam<MultiMooseEnum>( 25 1158 : "petsc_options", Moose::PetscSupport::getCommonPetscFlags(), "Singleton PETSc options"); 26 1737 : params.addParam<MultiMooseEnum>("petsc_options_iname", 27 1158 : Moose::PetscSupport::getCommonPetscKeys(), 28 : "Names of PETSc name/value pairs"); 29 579 : params.addParam<std::vector<std::string>>( 30 : "petsc_options_value", 31 : "Values of PETSc name/value pairs (must correspond with \"petsc_options_iname\""); 32 579 : params.addParam<NonlinearSystemName>( 33 : "nl_sys", "nl0", "The nonlinear system that this split belongs to"); 34 579 : return params; 35 0 : } 36 : 37 376 : AddFieldSplitAction::AddFieldSplitAction(const InputParameters & params) : MooseObjectAction(params) 38 : { 39 376 : } 40 : 41 : void 42 376 : AddFieldSplitAction::act() 43 : { 44 752 : _problem->getNonlinearSystemBase(_problem->nlSysNum(getParam<NonlinearSystemName>("nl_sys"))) 45 376 : .addSplit(_type, _name, _moose_object_pars); 46 376 : }