https://mooseframework.inl.gov
Loading...
Searching...
No Matches
InitialConditionBase.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 "Coupleable.h"
15#include "FunctionInterface.h"
16#include "UserObjectInterface.h"
18#include "Restartable.h"
19#include "BlockRestrictable.h"
23#include "MooseTypes.h"
24#include "ElementIDInterface.h"
25
26class SystemBase;
28namespace libMesh
29{
30class Point;
31}
32
41 public BlockRestrictable,
42 public Coupleable,
44 public FunctionInterface,
49 public Restartable,
51{
52public:
59
60 virtual ~InitialConditionBase();
61
63
68
72 const std::set<UserObjectName> & getDependObjects() const { return _depend_uo; }
73
77 virtual void compute() = 0;
82 virtual void computeNodal(const Point & p) = 0;
83
90 virtual void initialSetup() {}
91
92 virtual const std::set<std::string> & getRequestedItems() override;
93
94 virtual const std::set<std::string> & getSuppliedItems() override;
95
96protected:
99
102
103private:
104 void addUserObjectDependencyHelper(const UserObjectBase & uo) const override final;
105 void addPostprocessorDependencyHelper(const PostprocessorName & name) const override final;
106
108 std::set<std::string> _depend_vars;
110 std::set<std::string> _supplied_vars;
111
113 mutable std::set<UserObjectName> _depend_uo;
114};
An interface that restricts an object to subdomains via the 'blocks' input parameter.
/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary...
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
Interface for sorting dependent vectors of objects.
Interface for objects that need to use functions.
InitialConditionBase serves as the abstract base class for InitialConditions and VectorInitialConditi...
virtual const std::set< std::string > & getRequestedItems() override
Return a set containing the names of items requested by the object.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job.
const std::set< UserObjectName > & getDependObjects() const
getter method for dependent user objects
void addPostprocessorDependencyHelper(const PostprocessorName &name) const override final
Helper for deriving classes to override to add dependencies when a Postprocessor is requested.
virtual MooseVariableFEBase & variable()=0
retrieves the MOOSE variable that this initial condition acts upon
std::set< UserObjectName > _depend_uo
Depend UserObjects. Mutable so that the getters can be const and still add dependencies.
virtual const std::set< std::string > & getSuppliedItems() override
Return a set containing the names of items owned by the object.
void addUserObjectDependencyHelper(const UserObjectBase &uo) const override final
Helper for deriving classes to override to add dependencies when a UserObject is requested.
const bool _ignore_uo_dependency
If set, UOs retrieved by this IC will not be executed before this IC.
std::set< std::string > _depend_vars
Dependent variables.
SystemBase & _sys
The system object.
std::set< std::string > _supplied_vars
Supplied variables.
virtual void computeNodal(const Point &p)=0
Workhorse method for projecting the initial conditions for boundary restricted initial conditions.
static InputParameters validParams()
virtual void compute()=0
Workhorse method for projecting the initial conditions for block initial conditions.
InitialConditionInterface serves as the abstract class for InitialConditions, FVInitialConditions,...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
An interface for accessing Materials.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
This class provides an interface for common operations on field variables of both FE and FV types wit...
Interface class for classes which interact with Postprocessors.
A class for creating restricted objects.
Definition Restartable.h:29
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...