https://mooseframework.inl.gov
FVInitialConditionBase.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 "FunctionInterface.h"
15 #include "UserObjectInterface.h"
16 #include "PostprocessorInterface.h"
17 #include "Restartable.h"
18 #include "BlockRestrictable.h"
20 #include "MooseTypes.h"
21 #include "NonADFunctorInterface.h"
22 
23 class SystemBase;
25 namespace libMesh
26 {
27 class Point;
28 }
29 
35  public BlockRestrictable,
36  public FunctionInterface,
37  public Restartable,
40 {
41 public:
48 
49  virtual ~FVInitialConditionBase();
50 
52 
56  virtual MooseVariableFieldBase & variable() = 0;
57 
62  virtual void computeElement(const ElemInfo & elem_info) = 0;
63 
70  virtual void initialSetup() {}
71 
72  virtual const std::set<std::string> & getRequestedItems() override { return _depend_vars; }
73 
74  virtual const std::set<std::string> & getSuppliedItems() override { return _supplied_vars; }
75 
76 protected:
79 
80 private:
82  std::set<std::string> _depend_vars;
84  std::set<std::string> _supplied_vars;
85 };
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
virtual MooseVariableFieldBase & variable()=0
retrieves the MOOSE variable that this initial condition acts upon
A class for creating restricted objects.
Definition: Restartable.h:28
FVInitialConditionBase(const InputParameters &parameters)
Constructor.
SystemBase & _sys
The system object.
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class provides an interface for common operations on field variables of both FE and FV types wit...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
Definition: SystemBase.h:84
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
InitialConditionInterface serves as the abstract class for InitialConditions, FVInitialConditions, and ScalarInitialConditions.
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
virtual void computeElement(const ElemInfo &elem_info)=0
Workhorse method for computing the initial conditions for block-restricted initial conditions...
static InputParameters validParams()
An interface that restricts an object to subdomains via the &#39;blocks&#39; input parameter.
Interface for sorting dependent vectors of objects.
const InputParameters & parameters() const
Get the parameters of the object.
Class used for caching additional information for elements such as the volume and centroid...
Definition: ElemInfo.h:25
std::set< std::string > _supplied_vars
Supplied variables.
Interface for objects that need to use functions.
std::set< std::string > _depend_vars
Dependent variables.