www.mooseframework.org
UserObjectInterface.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 "UserObjectInterface.h"
18 #include "InputParameters.h"
19 
21  : _uoi_params(moose_object->parameters()),
22  _uoi_feproblem(*_uoi_params.get<FEProblemBase *>("_fe_problem_base")),
23  _uoi_tid(_uoi_params.have_parameter<THREAD_ID>("_tid") ? _uoi_params.get<THREAD_ID>("_tid") : 0)
24 {
25 }
26 
27 const UserObject &
28 UserObjectInterface::getUserObjectBase(const std::string & name)
29 {
30  return _uoi_feproblem.getUserObjectBase(_uoi_params.get<UserObjectName>(name));
31 }
32 
33 const UserObject &
35 {
36  return _uoi_feproblem.getUserObjectBase(name);
37 }
38 
39 bool
41 {
42  return dynamic_cast<const DiscreteElementUserObject *>(&uo) != NULL;
43 }
bool isDiscreteUserObject(const UserObject &uo) const
Check if the user object is a DiscreteElementUserObject.
const InputParameters & _uoi_params
Parameters of the object with this interface.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
const UserObject & getUserObjectBaseByName(const std::string &name)
Get an user object with a given name.
FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const UserObject & getUserObjectBase(const std::string &name)
Get an user object with a given parameter name.
const UserObject & getUserObjectBase(const std::string &name)
Get the user object by its name.
Base class for user-specific data.
Definition: UserObject.h:42
unsigned int THREAD_ID
Definition: MooseTypes.h:79
UserObjectInterface(const MooseObject *moose_object)