45 void addObject(std::shared_ptr<T>
object,
THREAD_ID tid = 0,
bool recurse =
true)
override;
60 typename std::map<ExecFlagType, MooseObjectWarehouse<T>>::const_iterator
begin()
const 64 typename std::map<ExecFlagType, MooseObjectWarehouse<T>>::const_iterator
end()
const 99 typename std::map<ExecFlagType, MooseObjectWarehouse<T>>::iterator
104 template <
typename T>
110 for (
const auto & flag : flags.
items())
114 template <
typename T>
119 template <
typename T>
124 const auto iter = _execute_objects.find(exec_flag);
126 if (iter == _execute_objects.end())
127 mooseError(
"Unable to locate the desired execute flag (",
129 "), the supplied execution flag was likely " 135 template <
typename T>
140 const auto iter = _execute_objects.find(exec_flag);
142 if (iter == _execute_objects.end())
143 mooseError(
"Unable to locate the desired execute flag (",
145 "), the supplied execution flag was likely " 151 template <
typename T>
159 for (
auto & object_pair : _execute_objects)
160 object_pair.second.updateActive(tid);
163 template <
typename T>
169 if (iter != _execute_objects.end())
170 iter->second.jacobianSetup(tid);
173 template <
typename T>
178 const auto iter = _execute_objects.find(
EXEC_LINEAR);
179 if (iter != _execute_objects.end())
180 iter->second.residualSetup(tid);
183 template <
typename T>
200 template <
typename T>
210 if (
const auto ptr = std::dynamic_pointer_cast<SetupInterface>(
object))
211 for (
const auto & flag : ptr->getExecuteOnEnum())
212 _execute_objects[flag].addObject(
object, tid);
216 ") must inherit from SetupInterface to be added to the ExecuteMooseObjectWarehouse " 220 template <
typename T>
225 for (
auto & object_pair : _execute_objects)
226 object_pair.second.sort(tid);
void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
A MultiMooseEnum object to hold "execute_on" flags.
void sort(THREAD_ID tid=0)
Performs a sort using the DependencyResolver.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void updateActive(THREAD_ID tid=0) override
Updates the active objects storage.
A storage container for MooseObjects that inherit from SetupInterface.
const MooseObjectWarehouse< T > & operator[](ExecFlagType exec_flag) const
Retrieve shared pointers for the given thread and execution type for all/active objects.
void setup(const ExecFlagType &exec_flag, THREAD_ID tid=0) const
A class for storing MooseObjects based on execution flag.
bool hasExecType(const ExecFlagType &exec_flag)
std::map< ExecFlagType, MooseObjectWarehouse< T > > _execute_objects
const std::set< ExecFlagType > & items() const
Reference the all the available items.
std::map< ExecFlagType, MooseObjectWarehouse< T > >::const_iterator begin() const
Provide access to begin/end iterators of the underlying map of execution flags.
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_LINEAR
std::map< ExecFlagType, MooseObjectWarehouse< T > >::iterator getStorageHelper(std::map< ExecFlagType, MooseObjectWarehouse< T >> &objects, ExecFlagType exec_flag) const
A helper method for extracting objects from the various storage containers.
std::map< ExecFlagType, MooseObjectWarehouse< T > >::const_iterator end() const
void jacobianSetup(THREAD_ID tid=0) const override
Convenience methods for calling object setup methods.
const ExecFlagType EXEC_NONLINEAR
ExecuteMooseObjectWarehouse(const ExecFlagEnum &flags, bool threaded=true)
Constructor.
Class for containing MooseEnum item information.
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
virtual ~ExecuteMooseObjectWarehouse()
const ExecFlagType EXEC_SUBDOMAIN
virtual void addObject(std::shared_ptr< T > object, THREAD_ID tid=0, bool recurse=true) override
Adds an object to the storage structure.
void residualSetup(THREAD_ID tid=0) const override
const ExecFlagType EXEC_INITIAL