www.mooseframework.org
GeneralUserObject.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 #include "GeneralUserObject.h"
16 
17 template <>
20 {
23  return params;
24 }
25 
27  : UserObject(parameters),
29  TransientInterface(this),
31  UserObjectInterface(this),
34 {
35  _supplied_vars.insert(name());
36 }
37 
38 const std::set<std::string> &
40 {
41  return _depend_vars;
42 }
43 
44 const std::set<std::string> &
46 {
47  return _supplied_vars;
48 }
49 
50 const PostprocessorValue &
52 {
53  _depend_vars.insert(_pars.get<PostprocessorName>(name));
55 }
56 
57 const PostprocessorValue &
59 {
60  _depend_vars.insert(name);
62 }
63 
66  const std::string & vector_name)
67 {
68  _depend_vars.insert(_pars.get<VectorPostprocessorName>(name));
70 }
71 
74  const std::string & vector_name)
75 {
76  _depend_vars.insert(name);
78 }
79 
80 void
82 {
83  mooseError("GeneralUserObjects do not execute using threads, this function does nothing and "
84  "should not be used.");
85 }
86 
87 void
89 {
90  mooseError("GeneralUserObjects do not execute subdomainSetup method, this function does nothing "
91  "and should not be used.");
92 }
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
InputParameters validParams< MaterialPropertyInterface >()
const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name)
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name)
Retrieve the value of the Postprocessor.
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name)
Retrieve the value of the VectorPostprocessor.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< GeneralUserObject >()
virtual const VectorPostprocessorValue & getVectorPostprocessorValueByName(const VectorPostprocessorName &name, const std::string &vector_name) override
Retrieve the value of the VectorPostprocessor.
const PostprocessorValue & getPostprocessorValue(const std::string &name)
Retrieve the value of a Postprocessor or one of it&#39;s old or older values.
std::set< std::string > _depend_vars
virtual void threadJoin(const UserObject &) final
This method is not used and should not be used in a custom GeneralUserObject.
Interface for objects that needs transient capabilities.
InputParameters validParams< UserObject >()
Definition: UserObject.C:23
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
Interface for objects that need to use UserObjects.
virtual const PostprocessorValue & getPostprocessorValue(const std::string &name)
Store dependency among same object types for proper execution order.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
Definition: MooseObject.h:111
std::set< std::string > _supplied_vars
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:74
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name) override
Retrieve the value of a VectorPostprocessor.
virtual void subdomainSetup() final
Gets called when the subdomain changes (i.e.
An interface for accessing Materials.
virtual const VectorPostprocessorValue & getVectorPostprocessorValue(const std::string &name, const std::string &vector_name)
Retrieve the value of a VectorPostprocessor.
GeneralUserObject(const InputParameters &parameters)
Interface for sorting dependent vectors of objects.
void mooseError(Args &&...args) const
Definition: MooseObject.h:80
const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
Base class for user-specific data.
Definition: UserObject.h:42
Interface class for classes which interact with Postprocessors.