www.mooseframework.org
ScalarInitialCondition.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseObject.h"
13 #include "ScalarCoupleable.h"
14 #include "FunctionInterface.h"
15 #include "UserObjectInterface.h"
17 
18 class FeProblem;
19 class SystemBase;
20 class Assembly;
22 
23 namespace libMesh
24 {
25 template <typename T>
26 class DenseVector;
27 }
28 
33  public ScalarCoupleable,
34  public FunctionInterface,
35  public UserObjectInterface,
37 {
38 public:
45 
46  virtual ~ScalarInitialCondition();
47 
49 
51 
55  virtual void compute(DenseVector<Number> & vals);
56 
62  virtual Real value() = 0;
63 
70  virtual void initialSetup() {}
71 
72  virtual const std::set<std::string> & getRequestedItems();
73 
74  virtual const std::set<std::string> & getSuppliedItems();
75 
76 protected:
80 
82  Real & _t;
83 
86 
89 
90  unsigned int _i;
91 
92  std::set<std::string> _depend_vars;
93  std::set<std::string> _supplied_vars;
94 };
virtual const std::set< std::string > & getSuppliedItems()
Return a set containing the names of items owned by the object.
Keeps track of stuff related to assembling.
Definition: Assembly.h:93
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:85
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::set< std::string > _depend_vars
virtual Real value()=0
The value of the variable.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:33
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
Interface for objects that need to use UserObjects.
InitialConditions are objects that set the initial value of variables.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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.
ScalarInitialCondition(const InputParameters &parameters)
Constructor.
const InputParameters & parameters() const
Get the parameters of the object.
virtual const std::set< std::string > & getRequestedItems()
Return a set containing the names of items requested by the object.
std::set< std::string > _supplied_vars
virtual void compute(DenseVector< Number > &vals)
Compute the initial condition.
Interface for objects that need to use functions.
Assembly & _assembly
The finite element/volume assembly object.
unsigned int THREAD_ID
Definition: MooseTypes.h:198