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