56 template <
typename Derived>
59 ::Kokkos::abort(
"Default execute() should never be called. Make sure you properly redefined "
60 "this method in your class without typos.");
67 template <
typename Derived>
70 return &UserObject::execute<Derived>;
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.
virtual void compute()=0
Compute this user object.
UserObject(const InputParameters ¶ms)
KOKKOS_FUNCTION void execute(Datum &) const
Default method to prevent compile errors even when this method was not defined in the derived class.
static InputParameters validParams()
UserObject(const UserObject &object)
Copy constructor for parallel dispatch.
static auto defaultExecute()
Function used to check if users have overriden the hook method.
virtual ThreadID numUserObjectThreads() const =0
Get the number of threads.
virtual void subdomainSetup() override final
Gets called when the subdomain changes (i.e.
std::unique_ptr< DispatcherBase > _user_object_dispatcher
Kokkos functor dispatcher.
virtual bool needThreadedCopy() const override final
Whether or not a threaded copy of this object is needed when obtaining it in another object,...
virtual void computeUserObject()
Dispatch parallel operation.
MOOSE_KOKKOS_INDEX_TYPE ThreadID