www.mooseframework.org
GeneralUserObject.h
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 #ifndef GENERALUSEROBJECT_H
16 #define GENERALUSEROBJECT_H
17 
18 // MOOSE includes
19 #include "UserObject.h"
21 #include "TransientInterface.h"
23 #include "UserObjectInterface.h"
24 #include "PostprocessorInterface.h"
26 
27 // Forward Declarations
28 class GeneralUserObject;
29 
30 template <>
32 
33 /* This class is here to combine the Postprocessor interface and the
34  * base class Postprocessor object along with adding MooseObject to the inheritance tree*/
37  public TransientInterface,
39  public UserObjectInterface,
40  protected PostprocessorInterface,
42 {
43 public:
45 
46  const std::set<std::string> & getRequestedItems() override;
47 
48  const std::set<std::string> & getSuppliedItems() override;
49 
51 
54  virtual void threadJoin(const UserObject &) final;
55  virtual void subdomainSetup() final;
57 
59 
62  virtual const PostprocessorValue & getPostprocessorValue(const std::string & name);
63  virtual const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName & name);
64 
65  virtual const VectorPostprocessorValue &
66  getVectorPostprocessorValue(const std::string & name, const std::string & vector_name) override;
67  virtual const VectorPostprocessorValue &
68  getVectorPostprocessorValueByName(const VectorPostprocessorName & name,
69  const std::string & vector_name) override;
71 
72 protected:
73  std::set<std::string> _depend_vars;
74  std::set<std::string> _supplied_vars;
75 };
76 
77 #endif
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
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)
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.
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.
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.
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.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
GeneralUserObject(const InputParameters &parameters)
Interface for sorting dependent vectors of objects.
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.