www.mooseframework.org
SetupPreconditionerAction.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
17 #include "Factory.h"
18 #include "PetscSupport.h"
19 #include "MoosePreconditioner.h"
20 #include "FEProblem.h"
22 #include "NonlinearSystemBase.h"
23 
24 unsigned int SetupPreconditionerAction::_count = 0;
25 
26 template <>
29 {
31 
32  return params;
33 }
34 
36  : MooseObjectAction(params)
37 {
38 }
39 
40 void
42 {
43  if (_problem.get() != NULL)
44  {
45  // build the preconditioner
46  _moose_object_pars.set<FEProblemBase *>("_fe_problem_base") = _problem.get();
47  std::shared_ptr<MoosePreconditioner> pc =
49 
50  _problem->getNonlinearSystemBase().setPreconditioner(pc);
51 
56 #if LIBMESH_HAVE_PETSC
58 #endif
59  }
60 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:46
void storePetscOptions(FEProblemBase &fe_problem, const InputParameters &params)
Stores the PETSc options supplied from the InputParameters with MOOSE.
Definition: PetscSupport.C:598
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
InputParameters validParams< SetupPreconditionerAction >()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Factory & _factory
The Factory associated with the MooseApp.
Definition: Action.h:101
static PetscErrorCode Vec Mat Mat pc
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Base class for MOOSE preconditioners.
std::string _name
The name of the action.
Definition: Action.h:92
SetupPreconditionerAction(InputParameters params)
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