Arcane  4.2.2.0
User documentation
Loading...
Searching...
No Matches
IItemFamily.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IItemFamily.h (C) 2000-2025 */
9/* */
10/* Interface of an entity family. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IITEMFAMILY_H
13#define ARCANE_CORE_IITEMFAMILY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31/*!
32 * \ingroup Mesh
33 * \brief Interface of an entity family.
34 *
35 * An entity family manages all entities of the same kind (Item::kind())
36 * and is attached to a mesh (IMesh).
37 *
38 * For any mesh, there is exactly one family of
39 * nodes (Node), edges (Edge), faces (Face), and cells (Cell).
40 * These entities are called base mesh entities and the
41 * associated families are the base mesh families.
42 *
43 * Depending on the implementation, there may also be families
44 * of particles (Particle), dual nodes (DualNode), or links (Link).
45 * Depending on the requested connectivity, a family may not have elements.
46 * For example, by default in 3D, edges (Edge) are not created.
47 *
48 * Each entity in the family has a local identifier within the
49 * family, given by Item::localId(). When a family evolves, this identifier
50 * may be modified. The Item::localId() of entities in a family are not
51 * necessarily contiguous. The maxLocalId() method allows knowing
52 * the maximum of these values. Compaction ensures
53 * that the localId() are renumbered from 0 to (nbItem()-1). For base mesh entities,
54 * compaction is automatic if the mesh has the property \a "sort" set to true. For others,
55 * you must call compactItems().
56 *
57 * By default, a family has a conversion table from
58 * uniqueId() to localId(). This table must exist to allow the following operations:
59 * - the uniqueId() is guaranteed to be unique within the subdomain and must
60 * be so by construction across all subdomains.
61 * - calling the itemsUniqueIdToLocalId() methods.
62 * - the family entities can be present in multiple
63 * subdomains.
64 * - performing synchronizations.
65 * - having partial variables on this family
66 *
67 * It is possible to enable or disable this conversion table
68 * via the setHasUniqueIdMap() method only if no entity
69 * has been created. This operation is not possible on
70 * node, edge, face, and cell families.
71
72 * When a family is modified by adding or removing entities, the
73 * variables and groups relying on this family are no longer usable
74 * until endUpdate() is called. For optimization reasons, it is possible to perform
75 * updates of certain variables or groups via
76 * partialEndUpdateVariable() or partialEndUpdateGroup(). ATTENTION, an call
77 * to one of these 3 update methods invalidates the entity instances (Item).
78 * To retain a reference to an entity, you must either use a group (ItemGroup)
79 * or keep its unique number and use itemsUniqueIdToLocalId().
80 *
81 * The page \ref arcanedoc_core_types_item_family provides a detailed
82 * description of this class.
83 */
84class ARCANE_CORE_EXPORT IItemFamily
85{
86 friend mesh::DynamicMesh;
87 friend mesh::ItemFamily;
88
89 public:
90
91 virtual ~IItemFamily() {} //<! Frees resources
92
93 public:
94
95 virtual void build() = 0;
96
97 public:
98
99 //! Family name
100 virtual String name() const = 0;
101
102 //! Full family name (with the mesh's name)
103 virtual String fullName() const = 0;
104
105 //! Entity kind
106 virtual eItemKind itemKind() const = 0;
107
108 //! Number of entities
109 virtual Integer nbItem() const = 0;
110
111 /*!
112 * Size required to dimension variables on these entities.
113 *
114 * This is the maximum of the Item::localId() of the entities in
115 * this family plus 1.
116 */
117 virtual Int32 maxLocalId() const = 0;
118
119 public:
120
121 // TODO: to be removed. Use itemInfoListView instead
122 //! Internal array of entities
123 virtual ItemInternalArrayView itemsInternal() = 0;
124
125 public:
126
127 //! View on the entity information list
129
130 /*!
131 * \brief IItemFamily parent
132 *
133 * Resulting from sub-mesh nesting
134 * \return nullptr if there is no parent family
135 */
136 virtual IItemFamily* parentFamily() const = 0;
137
138 /*!
139 * \internal
140 * \brief Positions the parent IItemFamily.
141 *
142 * To be used before build() for dynamically constructed sub-meshes
143 * (i.e., not from a restart).
144 *
145 * TODO: To be put in the internal API
146 */
147 virtual void setParentFamily(IItemFamily* parent) = 0;
148
149 //! Gives the nesting depth of the current mesh
150 virtual Integer parentFamilyDepth() const = 0;
151
152 /*!
153 * \internal
154 * \brief Adds a family as a dependency
155 *
156 * Operation symmetric to setParentFamily
157 *
158 * TODO: To be put in the internal API
159 */
160 virtual void addChildFamily(IItemFamily* family) = 0;
161
162 //! Child families of this family
164
165 /*!
166 * \brief Variable containing the number of the new subdomain
167 * owning the entity.
168 *
169 * This variable is only used for mesh partitioning.
170 */
172
173 //! Check the validity of internal structures (internal)
174 virtual void checkValid() = 0;
175
176 /*!
177 * \brief Verification of the validity of internal structures concerning
178 * connectivity.
179 */
180 virtual void checkValidConnectivity() = 0;
181
182 /*!
183 * \brief Checks that the \a unique_ids are truly unique
184 * for all subdomains.
185 *
186 * This method DOES NOT check that the \a unique_ids are identical
187 * to those of entities already created. It only checks the set of
188 * \a unique_ids passed as arguments by all subdomains.
189 *
190 * This operation is collective and must be called by all subdomains.
191 */
192 virtual void checkUniqueIds(Int64ConstArrayView unique_ids) = 0;
193
194 public:
195
196 /*!
197 * \brief View on the entities.
198 *
199 * Returns a view on the entities with local numbers \a local_ids.
200 * \warning This view is only valid as long as the family does not evolve.
201 * In particular, adding, removing, or compacting invalidates the view.
202 * If you want to keep a list even after modification, you must
203 * use groups (ItemGroup).
204 */
206
207 /*!
208 * \brief View on all entities in the family.
209 */
210 virtual ItemVectorView view() = 0;
211
212 /*!
213 * \brief Removes entities.
214 *
215 * Uses the graph (Families, Connectivities) ItemFamilyNetwork
216 *
217 * TODO: To be put in the internal API
218 */
219 virtual void removeItems2(mesh::ItemDataList& item_data_list) = 0;
220
221 /*!
222 * \internal
223 * \brief Removes entities and updates connectivities.
224 *
225 * Does not delete any potential orphaned sub-items.
226 *
227 * Context of use with a family graph. Orphaned sub-items
228 * must also be marked NeedRemove.
229 * Therefore, there is no need to manage them in parent families.
230 *
231 * TODO: To be put in the internal API
232 */
233 virtual void removeNeedRemoveMarkedItems() = 0;
234
235 /*!
236 * \brief Unique ID entity \a unique_id.
237 *
238 * If no entity with this \a unique_id is found, returns \a nullptr.
239 *
240 * \pre hasUniqueIdMap()
241 */
242 ARCANE_DEPRECATED_REASON("Use MeshUtils::findOneItem() instead")
243 virtual ItemInternal* findOneItem(Int64 unique_id) = 0;
244
245 /*! \brief Notifies the end of modification of the entity list.
246 *
247 * This method must be called after modifying the entity list (after adding or removing). It updates the groups
248 * and resizes the variables on this family.
249 */
250 virtual void endUpdate() = 0;
251
252 /*!
253 * \brief Partial update.
254 *
255 * Updates the internal structures after a family modification.
256 * This is an optimized version of endUpdate() when you want
257 * to perform multiple mesh modifications. This method DOES NOT update
258 * the groups or variables associated with this family. Only the
259 * allItems() group is available. It is possible to update
260 * a group via partialEndUpdateGroup() and a variable via partialEndUpdateVariable().
261 *
262 * This method is reserved for experienced users. For others,
263 * it is better to use endUpdate().
264 */
265 virtual void partialEndUpdate() = 0;
266
267 /*!
268 * \brief Updates a group.
269 *
270 * Updates the \a group after a family modification.
271 * The update consists of removing entities from the group that were
272 * possibly destroyed during the modification.
273 *
274 * \sa partialEndUpdate().
275 */
276 virtual void partialEndUpdateGroup(const ItemGroup& group) = 0;
277
278 /*!
279 * \brief Updates a variable.
280 *
281 * Updates the \a variable after a family modification.
282 * The update consists of resizing the variable after a possible
283 * addition of entities.
284 *
285 * \sa partialEndUpdate().
286 */
287 virtual void partialEndUpdateVariable(IVariable* variable) = 0;
288
289 //! Notifies that the entities specific to the family's subdomain have been modified
290 virtual void notifyItemsOwnerChanged() = 0;
291
292 //! Notifies that the unique IDs of the entities have been modified
293 virtual void notifyItemsUniqueIdChanged() = 0;
294
295 public:
296
297 //! Information on local connectivity within the subdomain for this family
299
300 //! Information on global connectivity across all subdomains.
302
303 public:
304
305 /*!
306 * \brief Indicates whether the family has a conversion table
307 * from uniqueId to localId.
308 *
309 * The conversion table allows using the methods
310 * itemsUniqueIdToLocalId() or findOneItem().
311 *
312 * This method can only be called when there are no
313 * entities in the family.
314 *
315 * The node, edge, face, and cell families of the mesh
316 * must have a conversion table.
317 */
318 virtual void setHasUniqueIdMap(bool v) = 0;
319
320 //! Indicates if the family has a uniqueId to localId conversion table.
321 virtual bool hasUniqueIdMap() const = 0;
322
323 public:
324
325 /*!
326 * \brief Converts an array of unique numbers to local numbers.
327 *
328 * This operation takes as input the \a unique_ids array containing the
329 * unique numbers of entities of type \a item_kind and returns in
330 * \a local_ids the corresponding local number for this subdomain.
331 *
332 * The complexity of this operation depends on the implementation.
333 * The default implementation uses a hash table. The average complexity
334 * is therefore constant.
335 *
336 * If \a do_fatal is true, a fatal error is generated if an entity is not
337 * found, otherwise the not found element has the value NULL_ITEM_ID.
338 *
339 * \pre hasUniqueIdMap()
340 */
342 Int64ConstArrayView unique_ids,
343 bool do_fatal = true) const = 0;
344
345 /*!
346 * \brief Converts an array of unique numbers to local numbers.
347 *
348 * This operation takes as input the \a unique_ids array containing the
349 * unique numbers of entities of type \a item_kind and returns in
350 * \a local_ids the corresponding local number for this subdomain.
351 *
352 * The complexity of this operation depends on the implementation.
353 * The default implementation uses a hash table. The average complexity
354 * is therefore constant.
355 *
356 * If \a do_fatal is true, a fatal error is generated if an entity is not
357 * found, otherwise the not found element has the value NULL_ITEM_ID.
358 */
360 ConstArrayView<ItemUniqueId> unique_ids,
361 bool do_fatal = true) const = 0;
362
363 public:
364
365 /*!
366 * \brief Positions the entity sorting function.
367 *
368 * The default method is to sort entities by ascending uniqueId().
369 * If \a sort_function is null, the default method will be used.
370 * Otherwise, \a sort_function replaces the previous function, which is destroyed
371 * (via delete).
372 * Sorting is performed via the call to compactItems().
373 * \sa itemSortFunction()
374 */
375 virtual void setItemSortFunction(IItemInternalSortFunction* sort_function) = 0;
376
377 /*!
378 * \brief Entity sorting function.
379 *
380 * The instance of this class remains the owner of the returned object,
381 * which must not be destroyed or modified.
382 * \sa setItemSortFunction()
383 */
385
386 public:
387
388 //! Associated sub-domain
389 ARCCORE_DEPRECATED_2020("Do not use this method. Try to get 'ISubDomain' from another way")
390 virtual ISubDomain* subDomain() const = 0;
391
392 //! Associated trace manager
393 virtual ITraceMng* traceMng() const = 0;
394
395 //! Associated mesh
396 virtual IMesh* mesh() const = 0;
397
398 //! Associated parallelism manager
399 virtual IParallelMng* parallelMng() const = 0;
400
401 public:
402
403 //! Group of all entities
404 virtual ItemGroup allItems() const = 0;
405
406 //! Collection of groups in this family
407 virtual ItemGroupCollection groups() const = 0;
408
409 public:
410
411 //! @name operations on groups
412 //@{
413 /*!
414 \brief Searches for a group.
415 \param name name of the group to search for
416 \return the group named \a name or a null group if none exists.
417 */
418 virtual ItemGroup findGroup(const String& name) const = 0;
419
420 /*!
421 * \brief Searches for a group
422 *
423 * \param name name of the group to search for
424 *
425 * \return the found group or a null group if no group with the name
426 * \a name and type \a type exists and if \a create_if_needed is false.
427 * If \a create_if_needed is true, an empty group named \a name is created and returned.
428 */
429 virtual ItemGroup findGroup(const String& name, bool create_if_needed) = 0;
430
431 /*!
432 * \brief Creates an entity group named \a name containing the entities \a local_ids.
433 *
434 * \param name name of the group
435 * \param local_ids list of localId() of the entities composing the group.
436 * \param do_override if true and a group of the same name already exists,
437 * its elements are replaced by those given in \a local_ids. If false,
438 * an exception is raised.
439 * \return the created group
440 */
441 virtual ItemGroup createGroup(const String& name, Int32ConstArrayView local_ids, bool do_override = false) = 0;
442
443 /*!
444 * \brief Creates an entity group named \a name
445 *
446 * The group must not already exist, otherwise an exception is raised.
447 *
448 * \param name name of the group
449 * \return the created group
450 */
451 virtual ItemGroup createGroup(const String& name) = 0;
452
453 /*!
454 * \brief Deletes all groups in this family.
455 */
456 virtual void destroyGroups() = 0;
457
458 /*!
459 * \internal
460 * For Internal Use Only
461 */
462 virtual ItemGroup createGroup(const String& name, const ItemGroup& parent, bool do_override = false) = 0;
463
464 //@}
465
466 /*!
467 * \brief Searches for the variable name \a name associated with this family.
468 *
469 * If no variable with the name \a name exists, and if \a throw_exception is
470 * false, returns 0; otherwise, it throws an exception.
471 */
472 virtual IVariable* findVariable(const String& name, bool throw_exception = false) = 0;
473
474 /*!
475 * \brief Adds the list of variables used by this family to the \a collection.
476 */
477 virtual void usedVariables(VariableCollection collection) = 0;
478
479 public:
480
481 //! Prepares data for dumping
482 virtual void prepareForDump() = 0;
483
484 //! Reads data from a dump
485 virtual void readFromDump() = 0;
486
487 /**
488 * Copies the values of entities numbered @a source into entities
489 * numbered @a destination
490 *
491 * @param source list of @b source localIds
492 * @param destination list of @b destination localIds
493 */
494 virtual void copyItemsValues(Int32ConstArrayView source, Int32ConstArrayView destination) = 0;
495
496 /**
497 * Copies the mean values of entities numbered
498 * @a first_source and @a second_source into entities numbered
499 * @a destination
500 *
501 * @param first_source list of @b localIds of the 1st source
502 * @param second_source list of @b localIds of the 2nd source
503 * @param destination list of @b destination localIds
504 */
505 virtual void copyItemsMeanValues(Int32ConstArrayView first_source,
506 Int32ConstArrayView second_source,
507 Int32ConstArrayView destination) = 0;
508
509 /*!
510 * \brief Deletes all entities in the family.
511 * \warning be careful not to destroy entities that are used in
512 * by another family. In general, it is safer to use IMesh::clearItems()
513 * if you want to delete all elements of the mesh.
514 */
515 virtual void clearItems() = 0;
516
517 //! Compresses the entities.
518 virtual void compactItems(bool do_sort) = 0;
519
520 public:
521
522 /*!
523 * \brief Constructs the structures necessary for synchronization.
524 *
525 * This operation must be performed every time the entities
526 * of the mesh change ownership (for example, during a load balancing).
527
528 This operation is collective.
529 */
530 virtual void computeSynchronizeInfos() = 0;
531
532 //! List of communicating sub-domains for the entities.
533 virtual void getCommunicatingSubDomains(Int32Array& sub_domains) const = 0;
534
535 //! @name variable synchronization operations
536 //@{
537
538 //! Synchronizer on all entities of the family
540
541 /*!
542 * \brief Synchronizes the variables \a variables.
543 *
544 * The variables \a variables must all come from
545 * this family and must not be partial.
546 */
547 virtual void synchronize(VariableCollection variables) = 0;
548
549 // TODO: make pure virtual (December 2024)
550 /*!
551 * \brief Synchronizes the variables \a variables on a list of entities.
552 *
553 * The variables \a variables must all come from
554 * this family and must not be partial.
555 *
556 * Only the entities listed in \a local_ids will be synchronized. Note:
557 * an entity present in this list on one sub-domain must be present
558 * in this list for any other sub-domain that possesses this entity.
559 */
560 virtual void synchronize(VariableCollection variables, Int32ConstArrayView local_ids);
561 //@}
562
563 /*!
564 * \brief Applies a reduction operation from ghost items.
565 *
566 * This operation is the inverse of synchronization.
567 *
568 * The sub-domain retrieves the values of variable \a v on the entities
569 * it shares with other sub-domains, and the reduction operation
570 * \a operation is applied to this variable.
571 */
572 virtual void reduceFromGhostItems(IVariable* v, IDataOperation* operation) = 0;
573 /*!
574 * \brief Applies a reduction operation from ghost items.
575 *
576 * This operation is the inverse of synchronization.
577 *
578 * The sub-domain retrieves the values of variable \a v on the entities
579 * it shares with other sub-domains, and the reduction operation
580 * \a operation is applied to this variable.
581 */
582 virtual void reduceFromGhostItems(IVariable* v, Parallel::eReduceType operation) = 0;
583
584 //! Searches for an adjacency list.
585 ARCANE_DEPRECATED_REASON("Y2024: use findAdjacency() instead")
587 const ItemGroup& sub_group,
588 eItemKind link_kind,
589 Integer nb_layer) = 0;
590 /*!
591 * \brief Searches for an adjacency list.
592 *
593 * Searches for the list of entities of type \a sub_kind, linked by
594 * the entity type \a link_kind of group \a group,
595 * over a number of layers \a nb_layer.
596 *
597 * If \a group and \a sub_group are of the same kind, an entity is always
598 * in its adjacency list, as the first element.
599 *
600 * If the list does not exist, it is created.
601 *
602 * \note currently only one layer is allowed.
603 */
604 virtual ItemPairGroup findAdjacencyItems(const ItemGroup& group,
605 const ItemGroup& sub_group,
606 eItemKind link_kind,
607 Integer nb_layer);
608
609 /*!
610 * \brief Returns the interface of the particle family for this family.
611 *
612 * The IParticleFamily interface only exists if this family is
613 * a particle family (itemKind()==IK_Particle). For other family kinds,
614 * 0 is returned.
615 */
617
618 /*!
619 * \brief Returns the interface of the particle family for this family.
620 *
621 * The IParticleFamily interface only exists if this family is
622 * a particle family (itemKind()==IK_Particle). For other family kinds, 0 is returned.
623 */
624 virtual IDoFFamily* toDoFFamily() { return nullptr; }
625
626 /*!
627 * \internal
628 * \brief Removes the entities given by \a local_ids.
629 *
630 * For internal use only. If you want to delete entities
631 * from the mesh, you must go through IMeshModifier via the call to IMesh::modifier().
632 */
633 virtual void internalRemoveItems(Int32ConstArrayView local_ids, bool keep_ghost = false) = 0;
634
635 /*!
636 * \name Register/Delete a connectivity manager.
637 *
638 * Allows propagating family changes to "external" connectivities
639 * in which it is involved.
640 * These "external" connectivities are currently those
641 * using degrees of freedom.
642 *
643 * \note These methods are internal to %Arcane.
644 */
645 //@{
646 virtual void addSourceConnectivity(IItemConnectivity* connectivity) = 0;
647 virtual void addTargetConnectivity(IItemConnectivity* connectivity) = 0;
648 virtual void removeSourceConnectivity(IItemConnectivity* connectivity) = 0;
649 virtual void removeTargetConnectivity(IItemConnectivity* connectivity) = 0;
650 virtual void setConnectivityMng(IItemConnectivityMng* connectivity_mng) = 0;
651 //@}
652
653 /*!
654 * \brief Allocates ghost entities.
655 *
656 * After calling this operation, you must call endUpdate() to
657 * notify the instance that the modifications are finished. It is possible
658 * to chain several allocations before calling
659 * endUpdate().
660 *
661 * The \a unique_ids are those of items present on another
662 * sub-domain, whose number is in the owners array (of the same
663 * size as the unique_ids array). \a items must have the same
664 * number of elements as \a unique_ids and will be filled back
665 * with the local numbers of the created entities.
666 */
667 virtual void addGhostItems(Int64ConstArrayView unique_ids, Int32ArrayView items,
668 Int32ConstArrayView owners) = 0;
669
670 public:
671
672 //! Interface of behaviors/policies associated with this family.
674
675 //! Properties associated with this family.
676 virtual Properties* properties() = 0;
677
678 public:
679
680 //! Event for entity addition and deletion
682
683 public:
684
685 /*!
686 * \brief Changes the unique number of the entity.
687 *
688 * \warning This method is experimental.
689 * \warning Modifying an entity's uniqueId can cause inconsistencies
690 * in the mesh and numbering. It is preferable to only call this method
691 * on entities that are not associated with others (for example, nodes that
692 * have just been created).
693 */
694 virtual void experimentalChangeUniqueId(ItemLocalId local_id, ItemUniqueId unique_id) = 0;
695
696 public:
697
698 /*!
699 * \brief Resizes the variables of this family.
700 *
701 * This method is internal to Arcane.
702 */
703 virtual void resizeVariables(bool force_resize) = 0;
704
705 public:
706
707 //! Topology modifier interface.
709
710 public:
711
712 //! Internal Arcane API
713 virtual IItemFamilyInternal* _internalApi() = 0;
714};
715
716/*---------------------------------------------------------------------------*/
717/*---------------------------------------------------------------------------*/
718
719} // End namespace Arcane
720
721/*---------------------------------------------------------------------------*/
722/*---------------------------------------------------------------------------*/
723
724#endif
Declarations of Arcane's general types.
Declarations of types on entities.
File containing declarations concerning the message passing model.
Constant view of an array of type T.
Class managing observers associated with an event.
Interface of a DoF family.
Definition IDoFFamily.h:34
Interface for connectivity information by entity type.
Interface to manage connectivity.
Interface for entity family policies.
Interface for modifying the topology of entities within a family.
Interface of an entity family.
Definition IItemFamily.h:85
virtual void partialEndUpdate()=0
Partial update.
virtual void usedVariables(VariableCollection collection)=0
Adds the list of variables used by this family to the collection.
virtual IItemConnectivityInfo * localConnectivityInfos() const =0
Information on local connectivity within the subdomain for this family.
virtual ISubDomain * subDomain() const =0
Associated sub-domain.
virtual ItemGroup findGroup(const String &name) const =0
Searches for a group.
virtual IVariableSynchronizer * allItemsSynchronizer()=0
Synchronizer on all entities of the family.
virtual Integer parentFamilyDepth() const =0
Gives the nesting depth of the current mesh.
virtual EventObservableView< const ItemFamilyItemListChangedEventArgs & > itemListChangedEvent()=0
Event for entity addition and deletion.
virtual IParticleFamily * toParticleFamily()=0
Returns the interface of the particle family for this family.
virtual void notifyItemsUniqueIdChanged()=0
Notifies that the unique IDs of the entities have been modified.
virtual IItemFamilyTopologyModifier * _topologyModifier()=0
Topology modifier interface.
virtual void checkUniqueIds(Int64ConstArrayView unique_ids)=0
Checks that the unique_ids are truly unique for all subdomains.
virtual IItemFamilyPolicyMng * policyMng()=0
Interface of behaviors/policies associated with this family.
virtual void readFromDump()=0
Reads data from a dump.
virtual ItemGroupCollection groups() const =0
Collection of groups in this family.
virtual ItemGroup allItems() const =0
Group of all entities.
virtual void setHasUniqueIdMap(bool v)=0
Indicates whether the family has a conversion table from uniqueId to localId.
virtual void copyItemsValues(Int32ConstArrayView source, Int32ConstArrayView destination)=0
virtual void partialEndUpdateVariable(IVariable *variable)=0
Updates a variable.
virtual ItemInternal * findOneItem(Int64 unique_id)=0
Unique ID entity unique_id.
virtual ItemInternalArrayView itemsInternal()=0
Internal array of entities.
virtual void prepareForDump()=0
Prepares data for dumping.
virtual void synchronize(VariableCollection variables)=0
Synchronizes the variables variables.
virtual ItemGroup createGroup(const String &name, Int32ConstArrayView local_ids, bool do_override=false)=0
Creates an entity group named name containing the entities local_ids.
virtual Int32 maxLocalId() const =0
virtual void computeSynchronizeInfos()=0
Constructs the structures necessary for synchronization.
virtual IItemConnectivityInfo * globalConnectivityInfos() const =0
Information on global connectivity across all subdomains.
virtual void clearItems()=0
Deletes all entities in the family.
virtual void checkValid()=0
Check the validity of internal structures (internal).
virtual bool hasUniqueIdMap() const =0
Indicates if the family has a uniqueId to localId conversion table.
virtual IParallelMng * parallelMng() const =0
Associated parallelism manager.
virtual IItemFamilyCollection childFamilies()=0
Child families of this family.
virtual ItemPairGroup findAdjencyItems(const ItemGroup &group, const ItemGroup &sub_group, eItemKind link_kind, Integer nb_layer)=0
Searches for an adjacency list.
virtual String name() const =0
Family name.
virtual ItemInfoListView itemInfoListView()=0
View on the entity information list.
virtual IItemFamily * parentFamily() const =0
IItemFamily parent.
virtual IItemInternalSortFunction * itemSortFunction() const =0
Entity sorting function.
virtual eItemKind itemKind() const =0
Entity kind.
virtual void checkValidConnectivity()=0
Verification of the validity of internal structures concerning connectivity.
virtual void copyItemsMeanValues(Int32ConstArrayView first_source, Int32ConstArrayView second_source, Int32ConstArrayView destination)=0
virtual IVariable * findVariable(const String &name, bool throw_exception=false)=0
Searches for the variable name name associated with this family.
virtual ItemPairGroup findAdjacencyItems(const ItemGroup &group, const ItemGroup &sub_group, eItemKind link_kind, Integer nb_layer)
Searches for an adjacency list.
virtual ITraceMng * traceMng() const =0
Associated trace manager.
virtual String fullName() const =0
Full family name (with the mesh's name).
virtual void compactItems(bool do_sort)=0
Compresses the entities.
virtual IMesh * mesh() const =0
Associated mesh.
virtual void notifyItemsOwnerChanged()=0
Notifies that the entities specific to the family's subdomain have been modified.
virtual ItemVectorView view(Int32ConstArrayView local_ids)=0
View on the entities.
virtual IItemFamilyInternal * _internalApi()=0
Internal Arcane API.
virtual void itemsUniqueIdToLocalId(Int32ArrayView local_ids, Int64ConstArrayView unique_ids, bool do_fatal=true) const =0
Converts an array of unique numbers to local numbers.
virtual void removeItems2(mesh::ItemDataList &item_data_list)=0
Removes entities.
virtual IDoFFamily * toDoFFamily()
Returns the interface of the particle family for this family.
virtual void reduceFromGhostItems(IVariable *v, IDataOperation *operation)=0
Applies a reduction operation from ghost items.
virtual void resizeVariables(bool force_resize)=0
Resizes the variables of this family.
virtual Properties * properties()=0
Properties associated with this family.
virtual void experimentalChangeUniqueId(ItemLocalId local_id, ItemUniqueId unique_id)=0
Changes the unique number of the entity.
virtual Integer nbItem() const =0
Number of entities.
virtual VariableItemInt32 & itemsNewOwner()=0
Variable containing the number of the new subdomain owning the entity.
virtual void getCommunicatingSubDomains(Int32Array &sub_domains) const =0
List of communicating sub-domains for the entities.
virtual void partialEndUpdateGroup(const ItemGroup &group)=0
Updates a group.
virtual void addGhostItems(Int64ConstArrayView unique_ids, Int32ArrayView items, Int32ConstArrayView owners)=0
Allocates ghost entities.
virtual void setItemSortFunction(IItemInternalSortFunction *sort_function)=0
Positions the entity sorting function.
virtual void destroyGroups()=0
Deletes all groups in this family.
virtual void endUpdate()=0
Notifies the end of modification of the entity list.
virtual ItemVectorView view()=0
View on all entities in the family.
Interface of an entity sorting function.
Interface of the parallelism manager for a subdomain.
Interface of a particle family.
Interface of the subdomain manager.
Definition ISubDomain.h:78
Interface of a variable synchronization service.
Interface of a variable.
Definition IVariable.h:40
Mesh entity group.
Definition ItemGroup.h:51
View of a list to obtain information about entities.
Index of an Item in a variable.
Definition ItemLocalId.h:42
Table of entity lists.
Unique identifier of an entity.
View on a vector of entities.
List of properties.
Definition Properties.h:65
ItemVariableScalarRefT< Int32 > VariableItemInt32
32-bit integer type quantity
eReduceType
Supported reduction types.
Concurrency implementation.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Collection< ItemGroup > ItemGroupCollection
Collection of mesh item groups.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:476
Collection< IItemFamily * > IItemFamilyCollection
Collection of item families.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:474
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:447
eItemKind
Mesh entity type.
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.
Definition UtilsTypes.h:121
std::int32_t Int32
Signed integer type of 32 bits.