www.mooseframework.org
ScalarInitialCondition.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 SCALARINITIALCONDITION_H
16 #define SCALARINITIALCONDITION_H
17 
18 #include "MooseObject.h"
19 #include "ScalarCoupleable.h"
20 #include "FunctionInterface.h"
22 
23 // forward declarations
25 class FeProblem;
26 class SystemBase;
27 class Assembly;
29 
30 namespace libMesh
31 {
32 template <typename T>
33 class DenseVector;
34 }
35 
36 template <>
38 
43  public ScalarCoupleable,
44  public FunctionInterface,
46 {
47 public:
53  ScalarInitialCondition(const InputParameters & parameters);
54 
55  virtual ~ScalarInitialCondition();
56 
57  MooseVariableScalar & variable() { return _var; }
58 
62  virtual void compute(DenseVector<Number> & vals);
63 
69  virtual Real value() = 0;
70 
71  virtual const std::set<std::string> & getRequestedItems();
72 
73  virtual const std::set<std::string> & getSuppliedItems();
74 
75 protected:
79 
82  Real & _t;
83 
86 
87  unsigned int _i;
88 
89  std::set<std::string> _depend_vars;
90  std::set<std::string> _supplied_vars;
91 };
92 
93 #endif // SCALARINITIALCONDITION_H
Keeps track of stuff related to assembling.
Definition: Assembly.h:63
MooseVariableScalar & variable()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
Definition: SystemBase.h:91
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::set< std::string > _depend_vars
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
InitialConditions are objects that set the initial value of variables.
InputParameters validParams< ScalarInitialCondition >()
Class for scalar variables (they are different).
MooseVariableScalar & _var
Scalar variable this initial condition works on.
Interface for sorting dependent vectors of objects.
Interface for objects that needs scalar coupling capabilities.
std::set< std::string > _supplied_vars
Interface for objects that need to use functions.
unsigned int THREAD_ID
Definition: MooseTypes.h:79