17#include "libmesh/elem_range.h"
46 virtual void onElement(
const Elem * elem)
override;
50 const Elem * lower_d_elem =
nullptr)
override;
51 virtual void onInternalSide(
const Elem * elem,
unsigned int side)
override;
52 virtual void onExternalSide(
const Elem * elem,
unsigned int side)
override;
54 virtual void post()
override;
104 const std::vector<T *> & objs,
105 const std::set<std::string> & ic_deps)
128 std::map<T *, std::set<int>> pre_aux_dependencies;
129 std::map<T *, std::set<int>> post_aux_dependencies;
135 std::map<T *, bool> is_pre_ic;
137 for (
const auto obj : objs)
138 is_pre_ic[obj] =
false;
143 for (
const auto obj : objs)
145 if (depend_objects_aux.count(obj->name()) > 0)
147 pre_aux_dependencies[obj].insert(flag);
149 is_pre_ic.at(obj) =
true;
155 post_aux_dependencies[obj].insert(flag);
159 for (
const auto obj : objs)
161 if (ic_deps.count(obj->name()) > 0 ||
162 (obj->isParamValid(
"force_preic") && obj->template getParam<bool>(
"force_preic")))
165 is_pre_ic.at(obj) =
true;
168 if ((obj->isParamValid(
"force_preaux") && obj->template getParam<bool>(
"force_preaux")))
170 post_aux_dependencies[obj].clear();
172 pre_aux_dependencies[obj].insert(flag);
174 else if (obj->isParamValid(
"force_postaux") && obj->template getParam<bool>(
"force_postaux"))
176 pre_aux_dependencies[obj].clear();
178 post_aux_dependencies[obj].insert(flag);
187 if (!is_pre_ic.at(obj))
192 for (
auto & item : pre_aux_dependencies)
195 for (
auto & item : post_aux_dependencies)
boundary_id_type BoundaryID
void groupUserObjects(TheWarehouse &w, AuxiliarySystem &aux, const ExecFlagEnum &execute_flags, const std::vector< T * > &objs, const std::set< std::string > &ic_deps)
const ExecFlagType EXEC_INITIAL
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
TODO: delete this later - it is a temporary hack for dealing with inter-system dependencies.
A system that holds auxiliary variables.
std::set< std::string > getDependObjects(ExecFlagType type)
Get a list of dependent UserObjects for this exec type.
Class for threaded computation of UserObjects.
std::vector< DomainUserObject * > _all_domain_objs
std::vector< ElementUserObject * > _element_objs
virtual void post() override
Called after the element range loop.
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
const TheWarehouse::Query _query
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing interface assembling.
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
Called when doing boundary assembling.
TheWarehouse::QueryCache< AttribThread, AttribBoundaries, AttribInterfaces > _query_boundary
void printBlockExecutionInformation() const override
Print information about the loop, mostly order of execution of particular objects.
std::vector< InterfaceUserObject * > _interface_user_objects
void queryBoundary(Interfaces iface, BoundaryID bnd, std::vector< T > &results)
void printGeneralExecutionInformation() const override
Print general information about the loop, like the ordering of class of objects.
void join(const ComputeUserObjectsThread &)
virtual ~ComputeUserObjectsThread()
AuxiliarySystem & _aux_sys
void printVectorOrdering(std::vector< T * > uos, const std::string &name) const
Format output of vector of UOs.
virtual void onExternalSide(const Elem *elem, unsigned int side) override
Called when iterating over external sides (no side neighbor)
std::vector< ShapeElementUserObject * > _shape_element_objs
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces > _query_subdomain
void querySubdomain(Interfaces iface, std::vector< T > &results)
std::vector< DomainUserObject * > _domain_objs
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
std::vector< InternalSideUserObject * > _internal_side_objs
This user object allows related evaluations on elements, boundaries, internal sides,...
A MultiMooseEnum object to hold "execute_on" flags.
const std::set< ExecFlagType > & items() const
Reference the all the available items.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Base class for implementing interface user objects.
Base class for user objects executed on all element sides internal to one or more blocks,...
Class for containing MooseEnum item information.
ElementUserObject class in which the _phi and _grad_phi shape function data is available and correctl...
QueryCache is a convenient way to construct and pass around (possible partially constructed) warehous...
std::vector< T * > & queryInto(std::vector< T * > &results, Args &&... args)
queryInto executes the query and stores the results in the given vector.
TheWarehouse is a container for MooseObjects that allows querying/filtering over various customizeabl...
void update(MooseObject *obj)
update updates the metadata/attribute-info stored for the given object obj that must already exists i...
SubdomainID _subdomain
The subdomain for the current element.
Base class for assembly-like calculations.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...