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;
113 const std::vector<UserObject *> & interface_objs);
146 const std::vector<T *> & objs,
147 const std::set<std::string> & ic_deps)
170 std::map<T *, std::set<int>> pre_aux_dependencies;
171 std::map<T *, std::set<int>> post_aux_dependencies;
177 std::map<T *, bool> is_pre_ic;
179 for (
const auto obj : objs)
180 is_pre_ic[obj] =
false;
185 for (
const auto obj : objs)
187 if (depend_objects_aux.count(obj->name()) > 0)
189 pre_aux_dependencies[obj].insert(flag);
191 is_pre_ic.at(obj) =
true;
197 post_aux_dependencies[obj].insert(flag);
201 for (
const auto obj : objs)
203 if (ic_deps.count(obj->name()) > 0 ||
204 (obj->isParamValid(
"force_preic") && obj->template getParam<bool>(
"force_preic")))
207 is_pre_ic.at(obj) =
true;
210 if ((obj->isParamValid(
"force_preaux") && obj->template getParam<bool>(
"force_preaux")))
212 post_aux_dependencies[obj].clear();
214 pre_aux_dependencies[obj].insert(flag);
216 else if (obj->isParamValid(
"force_postaux") && obj->template getParam<bool>(
"force_postaux"))
218 pre_aux_dependencies[obj].clear();
220 post_aux_dependencies[obj].insert(flag);
229 if (!is_pre_ic.at(obj))
234 for (
auto & item : pre_aux_dependencies)
237 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
const InterfaceMaterialReinitCache & getInterfaceMaterialReinitCache(BoundaryID bnd_id, SubdomainID subdomain_id, SubdomainID neighbor_subdomain_id, const std::vector< UserObject * > &interface_objs)
Return the face, boundary, and neighbor materials required while executing on this interface.
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
const InternalSideMaterialReinitCache & getInternalSideMaterialReinitCache(SubdomainID subdomain_id, SubdomainID neighbor_subdomain_id)
Return the face and neighbor materials required while executing on this internal side.
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
std::map< std::pair< SubdomainID, SubdomainID >, InternalSideMaterialReinitCache > _internal_side_material_reinit_cache
TheWarehouse::QueryCache< AttribThread, AttribSubdomains, AttribInterfaces > _query_subdomain
void querySubdomain(Interfaces iface, std::vector< T > &results)
std::vector< DomainUserObject * > _domain_objs
std::map< std::tuple< BoundaryID, SubdomainID, SubdomainID >, InterfaceMaterialReinitCache > _interface_material_reinit_cache
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
std::deque< MaterialBase * > neighbor_materials
std::deque< MaterialBase * > face_materials
std::deque< MaterialBase * > boundary_materials
std::deque< MaterialBase * > face_materials
std::deque< MaterialBase * > neighbor_materials