https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ScalarInitialCondition.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
13#include "MooseObject.h"
14#include "ScalarCoupleable.h"
15#include "FunctionInterface.h"
16#include "UserObjectInterface.h"
18
19class FeProblem;
20class SystemBase;
21class Assembly;
23
24namespace libMesh
25{
26template <typename T>
27class DenseVector;
28}
29
35 public ScalarCoupleable,
36 public FunctionInterface,
39{
40public:
47
49
51
53
57 virtual void compute(DenseVector<Number> & vals);
58
64 virtual Real value() = 0;
65
72 virtual void initialSetup() {}
73
74 virtual const std::set<std::string> & getRequestedItems();
75
76 virtual const std::set<std::string> & getSuppliedItems();
77
78protected:
82
84 Real & _t;
85
88
91
92 unsigned int _i;
93
94 std::set<std::string> _depend_vars;
95 std::set<std::string> _supplied_vars;
96};
unsigned int THREAD_ID
Definition MooseTypes.h:237
Keeps track of stuff related to assembling.
Definition Assembly.h:110
Interface for sorting dependent vectors of objects.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Interface for objects that need to use functions.
InitialConditionInterface serves as the abstract class for InitialConditions, FVInitialConditions,...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Class for scalar variables (they are different).
Interface for objects that needs scalar coupling capabilities.
InitialConditions are objects that set the initial value of variables.
std::set< std::string > _depend_vars
virtual const std::set< std::string > & getRequestedItems()
Return a set containing the names of items requested by the object.
virtual Real value()=0
The value of the variable.
static InputParameters validParams()
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job.
virtual const std::set< std::string > & getSuppliedItems()
Return a set containing the names of items owned by the object.
virtual void compute(DenseVector< Number > &vals)
Compute the initial condition.
std::set< std::string > _supplied_vars
MooseVariableScalar & _var
Scalar variable this initial condition works on.
MooseVariableScalar & variable()
Assembly & _assembly
The finite element/volume assembly object.
Base class for a system (of equations)
Definition SystemBase.h:87
Interface for objects that need to use UserObjects.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...