#include <arcane/mesh/ParticleFamily.h>
Public Member Functions | |
| ParticleFamily (IMesh *mesh, const String &name) | |
| virtual void | build () override |
| void | setEnableGhostItems (bool value) override |
| Sets the flag to manage ghost particles for the family. | |
| bool | getEnableGhostItems () const override |
| Retrieves the flag to manage ghost particles for the family. | |
| String | name () const override |
| Family name. | |
| String | fullName () const override |
| Full family name (with the mesh's name). | |
| Integer | nbItem () const override |
| Number of entities. | |
| ItemGroup | allItems () const override |
| Group of all entities. | |
| ParticleVectorView | addParticles (Int64ConstArrayView unique_ids, Int32ArrayView items) override |
| Allocates particles. | |
| ParticleVectorView | addParticles2 (Int64ConstArrayView unique_ids, Int32ConstArrayView owners, Int32ArrayView items) override |
| ParticleVectorView | addParticles (Int64ConstArrayView unique_ids, Int32ConstArrayView cells_local_id, Int32ArrayView items_local_id) override |
| Allocates particles in cells. | |
| void | removeParticles (Int32ConstArrayView items_local_id) override |
| void | addItems (Int64ConstArrayView unique_ids, Int32ConstArrayView owners, Int32ArrayView items) |
| void | internalRemoveItems (Int32ConstArrayView local_ids, bool keep_ghost) override |
| Removes the entities given by local_ids. | |
| void | exchangeParticles () override |
| Exchanging entities. | |
| void | setParticleCell (Particle particle, Cell new_cell) override |
| Moves the particle particle into the cell new_cell. | |
| void | setParticlesCell (ParticleVectorView particles, CellVectorView new_cells) override |
| Moves the list of particles particles into the new cells new_cells. | |
| void | endUpdate () override |
| Notifies the end of modification of the entity list. | |
| void | preAllocate (Integer nb_item) |
| void | prepareForDump () override |
| Prepares data for dumping. | |
| void | readFromDump () override |
| Reads data from a dump. | |
| void | setHasUniqueIdMap (bool v) override |
| Indicates whether the family has a conversion table from uniqueId to localId. | |
| bool | hasUniqueIdMap () const override |
| Indicates if the family has a uniqueId to localId conversion table. | |
| void | computeSynchronizeInfos () override |
| Constructs the structures necessary for synchronization. | |
| IItemFamily * | itemFamily () override |
| Interface on the family. | |
| IParticleFamily * | toParticleFamily () override |
| Returns the interface of the particle family for this family. | |
| void | checkValidConnectivity () override |
| Verification of the validity of internal structures concerning connectivity. | |
| void | removeNeedRemoveMarkedItems () override |
| Removes entities and updates connectivities. | |
| Public Member Functions inherited from Arcane::mesh::ItemFamily | |
| ItemFamily (IMesh *mesh, eItemKind ik, const String &name) | |
| eItemKind | itemKind () const override |
| Entity kind. | |
| Int32 | maxLocalId () const override |
| ItemInternalList | itemsInternal () override |
| Internal array of entities. | |
| ItemInfoListView | itemInfoListView () override |
| View on the entity information list. | |
| VariableItemInt32 & | itemsNewOwner () override |
| Variable containing the number of the new subdomain owning the entity. | |
| IItemFamily * | parentFamily () const override |
| IItemFamily parent. | |
| void | setParentFamily (IItemFamily *parent) override |
| Positions the parent IItemFamily. | |
| Integer | parentFamilyDepth () const override |
| Gives the nesting depth of the current mesh. | |
| void | addChildFamily (IItemFamily *family) override |
| Adds a family as a dependency. | |
| IItemFamilyCollection | childFamilies () override |
| Child families of this family. | |
| void | checkValid () override |
| Check the validity of internal structures (internal). | |
| void | checkUniqueIds (Int64ConstArrayView unique_ids) override |
| Checks that the unique_ids are truly unique for all subdomains. | |
| ItemInternalMap & | itemsMap () |
| void | partialEndUpdate () override |
| Partial update. | |
| void | partialEndUpdateGroup (const ItemGroup &group) override |
| Updates a group. | |
| void | partialEndUpdateVariable (IVariable *variable) override |
| Updates a variable. | |
| void | itemsUniqueIdToLocalId (ArrayView< Int64 > ids, bool do_fatal=true) const |
| void | itemsUniqueIdToLocalId (Int32ArrayView local_ids, Int64ConstArrayView unique_ids, bool do_fatal) const override |
| Converts an array of unique numbers to local numbers. | |
| void | itemsUniqueIdToLocalId (Int32ArrayView local_ids, ConstArrayView< ItemUniqueId > unique_ids, bool do_fatal) const override |
| Converts an array of unique numbers to local numbers. | |
| ISubDomain * | subDomain () const override |
| Associated sub-domain. | |
| ITraceMng * | traceMng () const override |
| Associated trace manager. | |
| IMesh * | mesh () const override |
| Associated mesh. | |
| IParallelMng * | parallelMng () const override |
| Associated parallelism manager. | |
| IItemConnectivityInfo * | localConnectivityInfos () const override |
| Information on local connectivity within the subdomain for this family. | |
| IItemConnectivityInfo * | globalConnectivityInfos () const override |
| Information on global connectivity across all subdomains. | |
| void | removeItems2 (ItemDataList &item_data_list) override |
| Removes entities. | |
| ItemVectorView | view (Int32ConstArrayView local_ids) override |
| View on the entities. | |
| ItemVectorView | view () override |
| View on all entities in the family. | |
| ItemInternal * | findOneItem (Int64 uid) override |
| Unique ID entity unique_id. | |
| void | notifyItemsOwnerChanged () override |
| Notifies that the entities specific to the family's subdomain have been modified. | |
| ItemGroup | findGroup (const String &name) const override |
| Searches for a group. | |
| ItemGroup | findGroup (const String &name, bool create_if_needed) override |
| Searches for a group. | |
| ItemGroup | createGroup (const String &name, Int32ConstArrayView elements, bool do_override=false) override |
| Creates an entity group named name containing the entities local_ids. | |
| ItemGroup | createGroup (const String &name) override |
| Creates an entity group named name. | |
| ItemGroup | createGroup (const String &name, const ItemGroup &parent, bool do_override=false) override |
| ItemGroupCollection | groups () const override |
| Collection of groups in this family. | |
| void | notifyItemsUniqueIdChanged () override |
| Notifies that the unique IDs of the entities have been modified. | |
| void | destroyGroups () override |
| Deletes all groups in this family. | |
| IVariable * | findVariable (const String &name, bool throw_exception) override |
| Searches for the variable name name associated with this family. | |
| void | usedVariables (VariableCollection collection) override |
| Adds the list of variables used by this family to the collection. | |
| void | copyItemsValues (Int32ConstArrayView source, Int32ConstArrayView destination) override |
| void | copyItemsMeanValues (Int32ConstArrayView first_source, Int32ConstArrayView second_source, Int32ConstArrayView destination) override |
| void | compactItems (bool do_sort) override |
| Compresses the entities. | |
| void | clearItems () override |
| Deletes all entities in the family. | |
| Int64ArrayView * | uniqueIds () |
| ItemSharedInfo * | commonItemSharedInfo () |
| const DynamicMeshKindInfos & | infos () const |
| void | getCommunicatingSubDomains (Int32Array &sub_domains) const override |
| List of communicating sub-domains for the entities. | |
| void | synchronize (VariableCollection variables) override |
| Synchronizes the variables variables. | |
| void | synchronize (VariableCollection variables, Int32ConstArrayView local_ids) override |
| Synchronizes the variables variables on a list of entities. | |
| IVariableSynchronizer * | allItemsSynchronizer () override |
| Synchronizer on all entities of the family. | |
| void | reduceFromGhostItems (IVariable *v, IDataOperation *operation) override |
| Applies a reduction operation from ghost items. | |
| void | reduceFromGhostItems (IVariable *v, Parallel::eReduceType operation) override |
| Applies a reduction operation from ghost items. | |
| ItemPairGroup | findAdjencyItems (const ItemGroup &group, const ItemGroup &sub_group, eItemKind link_kind, Integer layer) override |
| Searches for an adjacency list. | |
| ItemPairGroup | findAdjacencyItems (const ItemGroup &group, const ItemGroup &sub_group, eItemKind link_kind, Integer layer) override |
| Searches for an adjacency list. | |
| void | setItemSortFunction (IItemInternalSortFunction *sort_function) override |
| Positions the entity sorting function. | |
| IItemInternalSortFunction * | itemSortFunction () const override |
| Entity sorting function. | |
| void | addSourceConnectivity (IItemConnectivity *connectivity) override |
| void | addTargetConnectivity (IItemConnectivity *connectivity) override |
| void | removeSourceConnectivity (IItemConnectivity *connectivity) override |
| void | removeTargetConnectivity (IItemConnectivity *connectivity) override |
| void | setConnectivityMng (IItemConnectivityMng *connectivity_mng) override |
| void | addGhostItems (Int64ConstArrayView unique_ids, Int32ArrayView items, Int32ConstArrayView owners) override |
| Allocates ghost entities. | |
| EventObservableView< const ItemFamilyItemListChangedEventArgs & > | itemListChangedEvent () override |
| Event for entity addition and deletion. | |
| void | experimentalChangeUniqueId (ItemLocalId local_id, ItemUniqueId unique_id) override |
| Changes the unique number of the entity. | |
| IItemFamilyPolicyMng * | policyMng () override |
| Interface of behaviors/policies associated with this family. | |
| Properties * | properties () override |
| Properties associated with this family. | |
| IItemFamilyInternal * | _internalApi () override |
| Internal Arcane API. | |
| virtual void | setPolicyMng (IItemFamilyPolicyMng *policy_mng) |
| void | beginCompactItems (ItemFamilyCompactInfos &compact_infos) |
| void | compactVariablesAndGroups (const ItemFamilyCompactInfos &compact_infos) |
| Compresses the variables and groups. | |
| void | finishCompactItems (ItemFamilyCompactInfos &compact_infos) |
| void | removeItem (Item item) |
| ItemInternalConnectivityList * | itemInternalConnectivityList () |
| Accessor for connectivities via Item and ItemInternal. | |
| IItemFamilyTopologyModifier * | _topologyModifier () override |
| Topology modifier interface. | |
| void | resizeVariables (bool force_resize) override |
| Resizes the variables of this family. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
| Public Member Functions inherited from Arcane::IItemFamily | |
| virtual IDoFFamily * | toDoFFamily () |
| Returns the interface of the particle family for this family. | |
Static Public Member Functions | |
| static String const | defaultFamilyName () |
Private Types | |
| typedef ItemConnectivitySelectorT< CellInternalConnectivityIndex, OneItemIncrementalItemConnectivity > | CellConnectivity |
| typedef ItemFamily | BaseClass |
Private Member Functions | |
| ItemInternal * | _allocParticle (Int64 uid, bool &need_alloc) |
| ItemInternal * | _findOrAllocParticle (Int64 uid, bool &is_alloc) |
| void | _printInfos (Integer nb_added) |
| void | _setSharedInfo () |
| void | _setCell (ItemLocalId particle, ItemLocalId cell) |
| void | _initializeNewlyAllocatedParticle (ItemInternal *particle, Int64 uid) |
| Positions the connectivity info for a particle that has just been allocated in memory. | |
| void | _addItems (Int64ConstArrayView unique_ids, Int32ArrayView items) |
Private Attributes | |
| ItemTypeInfo * | m_particle_type_info |
| ItemSharedInfoWithType * | m_particle_shared_info |
| Int32 | m_sub_domain_id |
| bool | m_enable_ghost_items |
| CellConnectivity * | m_cell_connectivity |
Particle family.
Definition at line 39 of file ParticleFamily.h.
|
private |
Definition at line 46 of file ParticleFamily.h.
|
private |
Definition at line 45 of file ParticleFamily.h.
Definition at line 39 of file ParticleFamily.cc.
|
virtual |
Definition at line 53 of file ParticleFamily.cc.
|
private |
Definition at line 212 of file ParticleFamily.cc.
|
inlineprivate |
Definition at line 111 of file ParticleFamily.cc.
|
inlineprivate |
Definition at line 129 of file ParticleFamily.cc.
|
inlineprivate |
Positions the connectivity info for a particle that has just been allocated in memory.
Definition at line 101 of file ParticleFamily.cc.
|
private |
Definition at line 281 of file ParticleFamily.cc.
|
inlineprivate |
Definition at line 163 of file ParticleFamily.cc.
|
private |
Definition at line 407 of file ParticleFamily.cc.
| void Arcane::mesh::ParticleFamily::addItems | ( | Int64ConstArrayView | unique_ids, |
| Int32ConstArrayView | owners, | ||
| Int32ArrayView | items ) |
Definition at line 234 of file ParticleFamily.cc.
|
overridevirtual |
Allocates particles.
Allocates particles whose uniqueId() are given by the array unique_ids.
After calling this operation, you must call endUpdate() to notify the instance that modifications are finished. It is possible to chain several allocations before calling endUpdate(). Note that the returned view may be invalidated after calling endUpdate() if compression is active. items_local_id must have the same number of elements as unique_ids.
Implements Arcane::IParticleFamily.
Definition at line 141 of file ParticleFamily.cc.
References Arcane::mesh::ItemFamily::view().
|
overridevirtual |
Allocates particles in cells.
This method is similar to addParticles() but allows specifying directly the cells in which the particles will be created.
Implements Arcane::IParticleFamily.
Definition at line 172 of file ParticleFamily.cc.
References Arcane::ArrayView< T >::size(), and Arcane::mesh::ItemFamily::view().
|
overridevirtual |
Implements Arcane::IParticleFamily.
Definition at line 151 of file ParticleFamily.cc.
|
inlineoverridevirtual |
Group of all entities.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 75 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::allItems().
|
overridevirtual |
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 61 of file ParticleFamily.cc.
|
overridevirtual |
Verification of the validity of internal structures concerning connectivity.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 416 of file ParticleFamily.cc.
References Arcane::mesh::ItemFamily::checkValidConnectivity().
|
inlineoverridevirtual |
Constructs the structures necessary for synchronization.
This operation must be performed every time the entities of the mesh change ownership (for example, during a load balancing).
This operation is collective.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 114 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::computeSynchronizeInfos().
|
inlinestatic |
Definition at line 50 of file ParticleFamily.h.
|
inlineoverridevirtual |
Notifies the end of modification of the entity list.
This method must be called after modifying the entity list (after adding or removing). It updates the groups and resizes the variables on this family.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 96 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::endUpdate().
Referenced by exchangeParticles().
|
overridevirtual |
Exchanging entities.
This method is only supported for particle families. For mesh elements such as nodes, faces, or cells, you must use IMesh::exchangeItems().
The new owners of the entities are given by itemsNewOwner().
This operation is blocking and collective.
Implements Arcane::IParticleFamily.
Definition at line 262 of file ParticleFamily.cc.
References Arcane::mesh::ItemsExchangeInfo2::computeExchangeInfos(), Arcane::mesh::ItemsExchangeInfo2::computeExchangeItems(), endUpdate(), Arcane::mesh::ItemFamily::notifyItemsOwnerChanged(), Arcane::mesh::ItemsExchangeInfo2::prepareToSend(), Arcane::mesh::ItemsExchangeInfo2::processExchange(), Arcane::mesh::ItemsExchangeInfo2::readAndAllocItems(), Arcane::mesh::ItemsExchangeInfo2::readGroups(), Arcane::mesh::ItemsExchangeInfo2::readVariables(), and Arcane::mesh::ItemsExchangeInfo2::removeSentItems().
|
inlineoverridevirtual |
Full family name (with the mesh's name).
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 73 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::fullName().
|
inlineoverridevirtual |
Retrieves the flag to manage ghost particles for the family.
Implements Arcane::IParticleFamily.
Definition at line 66 of file ParticleFamily.h.
Referenced by Arcane::mesh::DynamicMeshIncrementalBuilder::removeNeedRemoveMarkedItems(), and removeNeedRemoveMarkedItems().
|
overridevirtual |
Indicates if the family has a uniqueId to localId conversion table.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 398 of file ParticleFamily.cc.
|
overridevirtual |
Removes the entities given by local_ids.
For internal use only. If you want to delete entities from the mesh, you must go through IMeshModifier via the call to IMesh::modifier().
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 290 of file ParticleFamily.cc.
References Arcane::ConnectivityItemVector::connectedItems(), ENUMERATE_ITEM, Arcane::Legacy, Arcane::mesh::ItemFamily::mesh(), and Arcane::ConstArrayView< T >::size().
|
inlineoverridevirtual |
Interface on the family.
Implements Arcane::IParticleFamily.
Definition at line 119 of file ParticleFamily.h.
|
inlineoverridevirtual |
Family name.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 72 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::name().
Referenced by prepareForDump(), and removeNeedRemoveMarkedItems().
|
inlineoverridevirtual |
Number of entities.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 74 of file ParticleFamily.h.
References Arcane::mesh::ItemFamily::nbItem().
Referenced by prepareForDump().
| void Arcane::mesh::ParticleFamily::preAllocate | ( | Integer | nb_item | ) |
Definition at line 376 of file ParticleFamily.cc.
|
overridevirtual |
Prepares data for dumping.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 353 of file ParticleFamily.cc.
References Arcane::TraceAccessor::info(), name(), nbItem(), and Arcane::mesh::ItemFamily::prepareForDump().
|
overridevirtual |
Reads data from a dump.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 365 of file ParticleFamily.cc.
References Arcane::mesh::ItemFamily::readFromDump().
|
overridevirtual |
Removes entities and updates connectivities.
Does not delete any potential orphaned sub-items.
Context of use with a family graph. Orphaned sub-items must also be marked NeedRemove. Therefore, there is no need to manage them in parent families.
TODO: To be put in the internal API
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 425 of file ParticleFamily.cc.
References Arcane::Array< T >::add(), Arcane::mesh::ItemInternalMap::eachItem(), Arcane::ItemBase::flags(), getEnableGhostItems(), Arcane::ItemFlags::II_NeedRemove, Arcane::TraceAccessor::info(), Arcane::Item::itemBase(), Arcane::Item::localId(), Arcane::Item::mutableItemBase(), name(), Arcane::Array< T >::reserve(), Arcane::MutableItemBase::setFlags(), and Arcane::AbstractArray< T >::size().
|
overridevirtual |
Implements Arcane::IParticleFamily.
Definition at line 344 of file ParticleFamily.cc.
|
inlineoverridevirtual |
Sets the flag to manage ghost particles for the family.
Implements Arcane::IParticleFamily.
Definition at line 62 of file ParticleFamily.h.
|
overridevirtual |
Indicates whether the family has a conversion table from uniqueId to localId.
The conversion table allows using the methods itemsUniqueIdToLocalId() or findOneItem().
This method can only be called when there are no entities in the family.
The node, edge, face, and cell families of the mesh must have a conversion table.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 388 of file ParticleFamily.cc.
|
overridevirtual |
Moves the particle particle into the cell new_cell.
Implements Arcane::IParticleFamily.
Definition at line 189 of file ParticleFamily.cc.
|
overridevirtual |
Moves the list of particles particles into the new cells new_cells.
Implements Arcane::IParticleFamily.
Definition at line 199 of file ParticleFamily.cc.
References Arcane::ItemVectorView::localIds(), and Arcane::ConstArrayView< T >::size().
|
inlineoverridevirtual |
Returns the interface of the particle family for this family.
The IParticleFamily interface only exists if this family is a particle family (itemKind()==IK_Particle). For other family kinds, 0 is returned.
Reimplemented from Arcane::mesh::ItemFamily.
Definition at line 120 of file ParticleFamily.h.
|
private |
Definition at line 131 of file ParticleFamily.h.
|
private |
Definition at line 130 of file ParticleFamily.h.
|
private |
Definition at line 128 of file ParticleFamily.h.
|
private |
Definition at line 127 of file ParticleFamily.h.
|
private |
Definition at line 129 of file ParticleFamily.h.