96 _vector_tag_to_object_warehouse(_num_threads),
97 _vector_tags_to_object_warehouse(_num_threads),
98 _matrix_tag_to_object_warehouse(_num_threads),
99 _matrix_tags_to_object_warehouse(_num_threads)
103 template <
typename T>
109 for (
auto & it : _vector_tag_to_object_warehouse[tid])
110 it.second.updateActive(tid);
112 for (
auto & it : _vector_tags_to_object_warehouse[tid])
113 it.second.updateActive(tid);
115 for (
auto & it : _matrix_tag_to_object_warehouse[tid])
116 it.second.updateActive(tid);
118 for (
auto & it : _matrix_tags_to_object_warehouse[tid])
119 it.second.updateActive(tid);
122 template <
typename T>
126 auto & vector_tag_to_object_warehouse = _vector_tag_to_object_warehouse[tid];
128 const auto & house_end = vector_tag_to_object_warehouse.end();
129 const auto & tag_warehouse = vector_tag_to_object_warehouse.find(tag_id);
131 if (tag_warehouse != house_end)
132 return tag_warehouse->second;
134 vector_tag_to_object_warehouse[tag_id];
138 for (
auto &
object : objects)
140 auto & tags =
object->getVectorTags({});
141 for (
auto & tag : tags)
146 vector_tag_to_object_warehouse[tag_id].addObject(
object, tid);
152 return vector_tag_to_object_warehouse[tag_id];
155 template <
typename T>
159 auto & matrix_tag_to_object_warehouse = _matrix_tag_to_object_warehouse[tid];
161 const auto & house_end = matrix_tag_to_object_warehouse.end();
162 const auto & tag_warehouse = matrix_tag_to_object_warehouse.find(tag_id);
164 if (tag_warehouse != house_end)
165 return tag_warehouse->second;
167 matrix_tag_to_object_warehouse[tag_id];
171 for (
auto &
object : objects)
173 auto & tags =
object->getMatrixTags({});
174 for (
auto & tag : tags)
179 matrix_tag_to_object_warehouse[tag_id].addObject(
object, tid);
186 return matrix_tag_to_object_warehouse[tag_id];
189 template <
typename T>
196 template <
typename T>
202 auto & vector_tags_to_object_warehouse = _vector_tags_to_object_warehouse[tid];
204 const auto & house_end = vector_tags_to_object_warehouse.end();
205 const auto & tags_warehouse = vector_tags_to_object_warehouse.find(v_tags);
207 if (tags_warehouse != house_end)
208 return tags_warehouse->second;
210 vector_tags_to_object_warehouse[v_tags];
214 for (
auto &
object : objects)
216 auto & tags =
object->getVectorTags({});
217 const auto & tags_end = tags.end();
218 for (
auto & v_tag : v_tags)
220 const auto & tag_found = tags.find(v_tag);
222 if (tag_found != tags_end)
225 vector_tags_to_object_warehouse[v_tags].addObject(
object, tid);
232 return vector_tags_to_object_warehouse[v_tags];
235 template <
typename T>
240 auto & matrix_tags_to_object_warehouse = _matrix_tags_to_object_warehouse[tid];
242 const auto & house_end = matrix_tags_to_object_warehouse.end();
243 const auto & tags_warehouse = matrix_tags_to_object_warehouse.find(m_tags);
245 if (tags_warehouse != house_end)
246 return tags_warehouse->second;
248 matrix_tags_to_object_warehouse[m_tags];
251 for (
auto &
object : objects)
253 auto & tags =
object->getMatrixTags({});
254 const auto & tags_end = tags.end();
255 for (
auto & m_tag : m_tags)
257 const auto & tag_found = tags.find(m_tag);
259 if (tag_found != tags_end)
262 matrix_tags_to_object_warehouse[m_tags].addObject(
object, tid);
269 return matrix_tags_to_object_warehouse[m_tags];
std::vector< std::map< std::set< TagID >, MooseObjectWarehouse< T > > > _vector_tags_to_object_warehouse
std::set<TagID> based storage. Map from a std::set of tags to a moose object warehouse for vector tag...
A storage container for MooseObjects that inherit from SetupInterface.
MooseObjectWarehouse< T > & getVectorTagsObjectWarehouse(const std::set< TagID > &tags, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object at least has one of the given vector ta...
MooseObjectTagWarehouse(bool threaded=true)
Constructor.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
const std::vector< std::shared_ptr< T > > & getObjects(THREAD_ID tid=0) const
Retrieve complete vector to the all/block/boundary restricted objects for a given thread...
std::vector< std::map< std::set< TagID >, MooseObjectWarehouse< T > > > _matrix_tags_to_object_warehouse
std::set<TagID> based storage. Map from a std::set of tags to moose object warehouse for matrix tags...
std::vector< std::map< TagID, MooseObjectWarehouse< T > > > _matrix_tag_to_object_warehouse
Tag based storage. Map fro a tag to moose object warehouse for matrix tags.
MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given matrix tag...
A storage container for MooseObjects that inherit from SetupInterface.
MooseObjectWarehouse< T > & getMatrixTagsObjectWarehouse(const std::set< TagID > &tags, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has one of the given matrix tags...
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
std::vector< std::map< TagID, MooseObjectWarehouse< T > > > _vector_tag_to_object_warehouse
Tag based storage. Map from a tag to a moose object warehouse for vector tags.
MooseObjectWarehouse< T > & getVectorTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given vector tag...
const THREAD_ID _num_threads