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;
120 const std::vector<T *> & objs,
121 const std::set<std::string> & ic_deps)
144 std::map<T *, std::set<int>> pre_aux_dependencies;
145 std::map<T *, std::set<int>> post_aux_dependencies;
151 std::map<T *, bool> is_pre_ic;
153 for (
const auto obj : objs)
154 is_pre_ic[obj] =
false;
159 for (
const auto obj : objs)
161 if (depend_objects_aux.count(obj->name()) > 0)
163 pre_aux_dependencies[obj].insert(flag);
165 is_pre_ic.at(obj) =
true;
171 post_aux_dependencies[obj].insert(flag);
175 for (
const auto obj : objs)
177 if (ic_deps.count(obj->name()) > 0 ||
178 (obj->isParamValid(
"force_preic") && obj->template getParam<bool>(
"force_preic")))
181 is_pre_ic.at(obj) =
true;
184 if ((obj->isParamValid(
"force_preaux") && obj->template getParam<bool>(
"force_preaux")))
186 post_aux_dependencies[obj].clear();
188 pre_aux_dependencies[obj].insert(flag);
190 else if (obj->isParamValid(
"force_postaux") && obj->template getParam<bool>(
"force_postaux"))
192 pre_aux_dependencies[obj].clear();
194 post_aux_dependencies[obj].insert(flag);
203 if (!is_pre_ic.at(obj))
208 for (
auto & item : pre_aux_dependencies)
211 for (
auto & item : post_aux_dependencies)
boundary_id_type BoundaryID
subdomain_id_type SubdomainID
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 &)
const BoundaryMaterialReinitCache & getBoundaryMaterialReinitCache(BoundaryID bnd_id, SubdomainID subdomain_id)
Return the exact face and boundary materials required while executing on this boundary.
virtual ~ComputeUserObjectsThread()
AuxiliarySystem & _aux_sys
void printVectorOrdering(std::vector< T * > uos, const std::string &name) const
Format output of vector of UOs.
std::map< std::pair< BoundaryID, SubdomainID >, BoundaryMaterialReinitCache > _boundary_material_reinit_cache
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...
std::deque< MaterialBase * > face_materials
std::deque< MaterialBase * > boundary_materials