94 _num_threads(num_threads),
95 _vector_tag_to_object_warehouse(_num_threads),
96 _vector_tags_to_object_warehouse(_num_threads),
97 _matrix_tag_to_object_warehouse(_num_threads),
98 _matrix_tags_to_object_warehouse(_num_threads)
108 for (
auto & it : _vector_tag_to_object_warehouse[tid])
109 it.second.updateActive(tid);
111 for (
auto & it : _vector_tags_to_object_warehouse[tid])
112 it.second.updateActive(tid);
114 for (
auto & it : _matrix_tag_to_object_warehouse[tid])
115 it.second.updateActive(tid);
117 for (
auto & it : _matrix_tags_to_object_warehouse[tid])
118 it.second.updateActive(tid);
125 auto & vector_tag_to_object_warehouse = _vector_tag_to_object_warehouse[tid];
127 const auto & house_end = vector_tag_to_object_warehouse.end();
128 const auto & tag_warehouse = vector_tag_to_object_warehouse.find(tag_id);
130 if (tag_warehouse != house_end)
131 return tag_warehouse->second;
133 vector_tag_to_object_warehouse[tag_id];
137 for (
auto &
object : objects)
139 auto & tags =
object->getVectorTags({});
140 for (
auto & tag : tags)
145 vector_tag_to_object_warehouse[tag_id].addObject(
object, tid);
151 return vector_tag_to_object_warehouse[tag_id];
158 auto & matrix_tag_to_object_warehouse = _matrix_tag_to_object_warehouse[tid];
160 const auto & house_end = matrix_tag_to_object_warehouse.end();
161 const auto & tag_warehouse = matrix_tag_to_object_warehouse.find(tag_id);
163 if (tag_warehouse != house_end)
164 return tag_warehouse->second;
166 matrix_tag_to_object_warehouse[tag_id];
170 for (
auto &
object : objects)
172 auto & tags =
object->getMatrixTags({});
173 for (
auto & tag : tags)
178 matrix_tag_to_object_warehouse[tag_id].addObject(
object, tid);
185 return matrix_tag_to_object_warehouse[tag_id];
201 auto & vector_tags_to_object_warehouse = _vector_tags_to_object_warehouse[tid];
203 const auto & house_end = vector_tags_to_object_warehouse.end();
204 const auto & tags_warehouse = vector_tags_to_object_warehouse.find(v_tags);
206 if (tags_warehouse != house_end)
207 return tags_warehouse->second;
209 vector_tags_to_object_warehouse[v_tags];
213 for (
auto &
object : objects)
215 auto & tags =
object->getVectorTags({});
216 const auto & tags_end = tags.end();
217 for (
auto & v_tag : v_tags)
219 const auto & tag_found = tags.find(v_tag);
221 if (tag_found != tags_end)
224 vector_tags_to_object_warehouse[v_tags].addObject(
object, tid);
231 return vector_tags_to_object_warehouse[v_tags];
239 auto & matrix_tags_to_object_warehouse = _matrix_tags_to_object_warehouse[tid];
241 const auto & house_end = matrix_tags_to_object_warehouse.end();
242 const auto & tags_warehouse = matrix_tags_to_object_warehouse.find(m_tags);
244 if (tags_warehouse != house_end)
245 return tags_warehouse->second;
247 matrix_tags_to_object_warehouse[m_tags];
250 for (
auto &
object : objects)
252 auto & tags =
object->getMatrixTags({});
253 const auto & tags_end = tags.end();
254 for (
auto & m_tag : m_tags)
256 const auto & tag_found = tags.find(m_tag);
258 if (tag_found != tags_end)
261 matrix_tags_to_object_warehouse[m_tags].addObject(
object, tid);
268 return matrix_tags_to_object_warehouse[m_tags];
A storage container for MooseObjects that inherit from SetupInterface.
MooseObjectWarehouse< T > & getVectorTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given vector tag.
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< 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 > > > _vector_tag_to_object_warehouse
Tag based storage. Map from a tag to a moose object warehouse for vector tags.
const MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid) const
const version of the above
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...
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...
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.
MooseObjectTagWarehouse(THREAD_ID num_threads=libMesh::n_threads())
Constructor.
const THREAD_ID _num_threads
MooseObjectWarehouse< T > & getMatrixTagObjectWarehouse(TagID tag_id, THREAD_ID tid)
Retrieve a moose object warehouse in which every moose object has the given matrix tag.
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.
A storage container for MooseObjects that inherit from SetupInterface.
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.