27 "auto_preconditioning",
29 "When true and a [Preconditioning] block does not exist, the application will attempt to use "
30 "the correct preconditioning given the Executioner settings.");
35 :
MooseObjectAction(params), _auto_preconditioning(getParam<bool>(
"auto_preconditioning"))
42 std::shared_ptr<EigenProblem> eigen_problem = std::dynamic_pointer_cast<EigenProblem>(
_problem);
47 std::shared_ptr<Executioner> executioner =
50 if ((eigen_problem !=
nullptr) != executioner->hasSolveObject<
EigenProblemSolve>())
51 mooseError(
"Executioner is not consistent with each other; EigenExecutioner needs an "
52 "EigenProblem, and Steady and Transient need a FEProblem");
68 if (((solve_type.
find(
"NEWTON") != solve_type.
items().end()) && (solve_type ==
"NEWTON")) ||
69 ((solve_type.
find(
"LINEAR") != solve_type.
items().end()) && (solve_type ==
"LINEAR")))
70 for (
const auto & nl_sys_name :
_problem->getNonlinearSystemNames())
74 params.
set<std::string>(
"type") =
"SMP";
81 "SetupPreconditionerAction",
83 std::vector<std::string>({
"_moose_auto",
static_cast<std::string
>(nl_sys_name)}),
88 std::shared_ptr<MooseObjectAction> moa_ptr = std::static_pointer_cast<MooseObjectAction>(ptr);
90 mo_params.
set<
bool>(
"full") =
true;
91 mo_params.
set<NonlinearSystemName>(
"nl_sys") = nl_sys_name;
registerMooseAction("MooseApp", CreateExecutionerAction, "setup_executioner")
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters ¶meters)
InputParameters getValidParams(const std::string &name)
bool hasActions(const std::string &task) const
Check if Actions associated with passed in task exist.
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
void associateWithParameter(const std::string ¶m_name, InputParameters ¶ms) const
Associates the object's parameters params with the input location from this Action's parameter with t...
MooseApp & _app
The MOOSE application this is associated with.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
const bool _auto_preconditioning
CreateExecutionerAction(const InputParameters ¶ms)
static InputParameters validParams()
virtual void setupAutoPreconditioning()
EigenProblemSolve is used to solve an eigenvalue problem interfacing SLEPc.
Problem for solving eigenvalue problems.
Executioners are objects that do the actual work of solving your problem.
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
void setExecutioner(std::shared_ptr< Executioner > &&executioner)
Set the Executioner for this App.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
std::set< MooseEnumItem >::const_iterator find(const MooseEnumItem &other) const
Locate an item.
const std::set< MooseEnumItem > & items() const
Return the complete set of available flags.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
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.
ActionFactory & _action_factory
Builds Actions.
Factory & _factory
The Factory associated with the MooseApp.
Generic class for solving transient nonlinear problems.