12#include "arcane/mesh/DualUniqueIdMng.h"
13#include "arcane/mesh/GraphDoFs.h"
15#include "arcane/utils/ArgumentException.h"
17#include "arcane/IMesh.h"
18#include "arcane/IItemConnectivity.h"
19#include "arcane/IIncrementalItemConnectivity.h"
20#include "arcane/MathUtils.h"
22#include "arcane/mesh/ConnectivityNewWithDependenciesTypes.h"
32GraphIncrementalConnectivity::
33GraphIncrementalConnectivity(
GraphDoFs* graph)
34: m_dualnode_family(graph->dualNodeFamily())
35, m_link_family(graph->linkFamily())
36, m_dualnode_connectivity(graph->m_dualnodes_incremental_connectivity)
37, m_link_connectivity(graph->m_links_incremental_connectivity)
38, m_dualitem_connectivities(graph->m_incremental_connectivities)
39, m_dualnode_to_connectivity_index(graph->m_dual_node_to_connectivity_index)
47GraphDoFs(IMesh* mesh, String particle_family_name)
48: TraceAccessor(mesh->traceMng())
51, m_connectivity_mng(m_dof_mng.connectivityMng())
52, m_dual_node_family(m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName(), true))
53, m_link_family(m_dof_mng.getFamily(GraphDoFs::linkFamilyName(), true))
54, m_update_sync_info(false)
55, m_particle_family_name(particle_family_name)
62 if (m_graph_allocated)
65 auto connectivity_index = 0;
66 m_connectivity_indexes_per_type.resize(NB_BASIC_ITEM_TYPE, -1);
67 m_connectivity_indexes_per_type[IT_DualNode] = connectivity_index++;
68 m_connectivity_indexes_per_type[IT_DualEdge] = connectivity_index++;
69 m_connectivity_indexes_per_type[IT_DualFace] = connectivity_index++;
70 m_connectivity_indexes_per_type[IT_DualCell] = connectivity_index++;
71 m_connectivity_indexes_per_type[IT_DualParticle] = connectivity_index++;
73 m_item_family_network = m_mesh->itemFamilyNetwork();
74 if (m_item_family_network ==
nullptr)
75 ARCANE_FATAL(
"ARCANE_GRAPH_CONNECTIVITY_POLICY need to be activated");
77 m_graph_id = m_item_family_network->registerConnectedGraph(
this);
79 m_dualnodes_incremental_connectivity =
80 new IncrementalItemConnectivity(dualNodeFamily(),
82 mesh::connectivityName(dualNodeFamily(), linkFamily()));
84 m_connectivity_mng->registerConnectivity(m_dualnodes_incremental_connectivity);
86 if (m_item_family_network)
87 m_item_family_network->addRelation(dualNodeFamily(), linkFamily(), m_dualnodes_incremental_connectivity);
89 m_links_incremental_connectivity =
90 new IncrementalItemConnectivity(linkFamily(),
92 mesh::connectivityName(linkFamily(), dualNodeFamily()));
93 m_connectivity_mng->registerConnectivity(m_links_incremental_connectivity);
95 if (m_item_family_network)
97 m_item_family_network->addDependency(linkFamily(), dualNodeFamily(), m_links_incremental_connectivity,
false);
99 m_incremental_connectivities.resize(NB_DUAL_ITEM_TYPE,
nullptr);
100 std::array<int, NB_DUAL_ITEM_TYPE> dual_node_kinds = { IT_DualCell, IT_DualFace, IT_DualEdge, IT_DualNode, IT_DualParticle };
101 for (
auto dual_node_kind : dual_node_kinds) {
102 IItemFamily* dual_item_family = _dualItemFamily(dualItemKind(dual_node_kind));
103 if (dual_item_family) {
104 auto dof2dual_incremental_connectivity =
105 new IncrementalItemConnectivity(dualNodeFamily(),
107 mesh::connectivityName(dualNodeFamily(), dual_item_family));
109 m_connectivity_mng->registerConnectivity(dof2dual_incremental_connectivity);
110 m_incremental_connectivities[_connectivityIndex(dual_node_kind)] = dof2dual_incremental_connectivity;
111 if (m_item_family_network)
112 m_item_family_network->addDependency(dualNodeFamily(), dual_item_family, dof2dual_incremental_connectivity,
false);
115 m_graph_connectivity.reset(
new GraphIncrementalConnectivity(dualNodeFamily(),
117 m_dualnodes_incremental_connectivity,
118 m_links_incremental_connectivity,
119 m_incremental_connectivities,
120 m_dual_node_to_connectivity_index));
122 for (
auto& obs : m_connectivity_observer)
124 obs->notifyUpdateConnectivity();
126 m_update_sync_info =
false;
127 m_graph_allocated =
true;
135 Integer nb_dual_nodes_per_link,
140 if (!m_graph_allocated)
143 IDoFFamily* link_family = m_dof_mng.getFamily(GraphDoFs::linkFamilyName());
144 IDoFFamily* dual_node_family = m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName());
149 connected_dual_node_uids.
reserve(nb_link * nb_dual_nodes_per_link);
150 for (
auto links_infos_index = 0; links_infos_index < links_infos.
size();) {
151 auto link_uid = links_infos[links_infos_index++];
152 link_uids.
add(link_uid);
154 links_infos.
subConstView(links_infos_index, nb_dual_nodes_per_link));
155 links_infos_index += nb_dual_nodes_per_link;
159 link_family->
addDoFs(link_uids, link_lids);
164 Int32UniqueArray connected_dual_nodes_lids(nb_link * nb_dual_nodes_per_link);
166 connected_dual_nodes_lids.
view(), connected_dual_node_uids.
constView(),
true);
170 m_links_incremental_connectivity->notifySourceItemAdded(
ItemLocalId(*inewlink));
171 for (
auto lid : connected_dual_nodes_lids.
subConstView(link_index, nb_dual_nodes_per_link)) {
175 link_index += nb_dual_nodes_per_link;
177 m_connectivity_mng->setUpToDate(m_links_incremental_connectivity);
178 m_connectivity_mng->setUpToDate(m_dualnodes_incremental_connectivity);
180 m_update_sync_info =
false;
187addDualNodes(
Integer graph_nb_dual_node,
193 if (!m_graph_allocated)
199 dual_node_uids.
reserve(graph_nb_dual_node);
200 dual_item_uids.
reserve(graph_nb_dual_node);
201 for (
auto infos_index = 0; infos_index < dual_nodes_infos.
size();) {
202 dual_node_uids.
add(dual_nodes_infos[infos_index++]);
203 dual_item_uids.
add(dual_nodes_infos[infos_index++]);
207 auto* dual_node_family = m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName());
208 dual_node_family->addDoFs(dual_node_uids, dual_node_lids);
209 dual_node_family->endUpdate();
211 IItemFamily* dual_item_family = _dualItemFamily(dualItemKind(dual_node_kind));
213 auto incremental_dual_item_connectivity = m_incremental_connectivities[_connectivityIndex(dual_node_kind)];
214 if (incremental_dual_item_connectivity ==
nullptr) {
215 incremental_dual_item_connectivity =
218 mesh::connectivityName(dualNodeFamily(), dual_item_family));
220 m_connectivity_mng->registerConnectivity(incremental_dual_item_connectivity);
221 m_incremental_connectivities[_connectivityIndex(dual_node_kind)] = incremental_dual_item_connectivity;
222 if (m_item_family_network)
223 m_item_family_network->addDependency(dualNodeFamily(), dual_item_family, incremental_dual_item_connectivity,
false);
228 ENUMERATE_DOF (idual_node, dual_node_family->itemFamily()->view(dual_node_lids)) {
229 incremental_dual_item_connectivity->notifySourceItemAdded(
ItemLocalId(*idual_node));
230 incremental_dual_item_connectivity->addConnectedItem(
ItemLocalId(*idual_node),
ItemLocalId(dual_item_lids[idual_node.index()]));
232 m_connectivity_mng->setUpToDate(incremental_dual_item_connectivity);
234 m_update_sync_info =
false;
239addDualNodes(
Integer graph_nb_dual_node,
244 if (!m_graph_allocated)
248 bool is_parallel = m_mesh->parallelMng()->isParallel();
249 Integer domain_rank = m_mesh->parallelMng()->commRank();
251 std::map<Int64, std::pair<Int64UniqueArray, Int64UniqueArray>> dual_info_per_kind;
252 for (
auto infos_index = 0; infos_index < dual_nodes_infos.
size();) {
253 Int64 dual_node_kind = dual_nodes_infos[infos_index++];
254 auto&
info = dual_info_per_kind[dual_node_kind];
255 auto& dual_node_uids =
info.first;
256 auto& dual_item_uids =
info.second;
257 if (dual_node_uids.size() == 0) {
258 dual_node_uids.reserve(graph_nb_dual_node);
259 dual_item_uids.reserve(graph_nb_dual_node);
261 dual_node_uids.add(dual_nodes_infos[infos_index++]);
262 dual_item_uids.add(dual_nodes_infos[infos_index++]);
265 for (
Integer index = 0; index < NB_DUAL_ITEM_TYPE; ++index) {
266 Integer dual_node_kind = m_dualnode_kinds[index];
267 auto&
info = dual_info_per_kind[dual_node_kind];
268 auto& dual_node_uids =
info.first;
269 auto& dual_item_uids =
info.second;
271 auto* dual_node_family = m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName());
274 IItemFamily* dual_item_family = _dualItemFamily(dualItemKind(dual_node_kind));
275 if (dual_item_family) {
278 auto dual_item_view = dual_item_family->
view(dual_item_lids);
284 for (
auto const& item : dual_item_view)
285 if (item.owner() == domain_rank)
287 local_dual_node_lids.
resize(local_size);
288 local_dual_node_uids.
reserve(local_size);
290 Integer ghost_size = dual_node_uids.size() - local_size;
294 ghost_dual_node_lids.
resize(ghost_size);
295 ghost_dual_node_uids.
reserve(ghost_size);
296 ghost_dual_node_owner.
reserve(ghost_size);
299 for (
auto const& item : dual_item_view) {
300 if (item.owner() == domain_rank) {
301 local_dual_node_uids.
add(dual_node_uids[icount]);
304 ghost_dual_node_uids.
add(dual_node_uids[icount]);
305 ghost_dual_node_owner.
add(item.owner());
310 dual_node_family->addDoFs(local_dual_node_uids, local_dual_node_lids);
311 dual_node_family->addGhostDoFs(ghost_dual_node_uids, ghost_dual_node_lids, ghost_dual_node_owner);
312 dual_node_family->endUpdate();
317 for (
auto const& item : dual_item_view) {
318 if (item.owner() == domain_rank)
319 dual_node_lids[icount] = local_dual_node_lids[local_icount++];
321 dual_node_lids[icount] = ghost_dual_node_lids[ghost_icount++];
327 dual_node_family->addDoFs(dual_node_uids, dual_node_lids);
328 dual_node_family->endUpdate();
331 IItemFamily* dual_item_family = _dualItemFamily(dualItemKind(dual_node_kind));
332 if (dual_item_family) {
334 auto incremental_dual_item_connectivity = m_incremental_connectivities[index];
335 if (incremental_dual_item_connectivity ==
nullptr) {
336 incremental_dual_item_connectivity =
339 mesh::connectivityName(dualNodeFamily(), dual_item_family));
341 m_connectivity_mng->registerConnectivity(incremental_dual_item_connectivity);
342 m_incremental_connectivities[index] = incremental_dual_item_connectivity;
343 if (m_item_family_network)
344 m_item_family_network->addDependency(dualNodeFamily(), dual_item_family, incremental_dual_item_connectivity,
false);
349 ENUMERATE_DOF (idual_node, dual_node_family->itemFamily()->view(dual_node_lids)) {
350 incremental_dual_item_connectivity->notifySourceItemAdded(
ItemLocalId(*idual_node));
351 incremental_dual_item_connectivity->addConnectedItem(
ItemLocalId(*idual_node),
ItemLocalId(dual_item_lids[idual_node.index()]));
356 m_connectivity_mng->setUpToDate(incremental_dual_item_connectivity);
360 m_update_sync_info =
false;
371 m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName())->removeDoFs(dual_node_local_ids);
372 if (dual_node_local_ids.
size() > 0)
373 m_update_sync_info =
false;
384 m_dof_mng.getFamily(GraphDoFs::linkFamilyName())->removeDoFs(link_local_ids);
385 if (link_local_ids.
size() > 0)
386 m_update_sync_info =
false;
392 std::set<Int32> cell_to_remove_set;
393 std::set<Int32> node_to_remove_set;
394 std::set<Int32> face_to_remove_set;
395 auto cell_family = m_mesh->cellFamily();
398 cell_to_remove_set.insert(icell->localId());
399 for (
auto face : icell->faces()) {
400 if (face.itemBase().isSuppressed())
401 face_to_remove_set.insert(face.localId());
403 for (
auto node : icell->nodes()) {
404 if (node.itemBase().isSuppressed())
405 node_to_remove_set.insert(node.localId());
409 std::set<Int32> link_to_remove_set;
412 for (
auto ilink : linkFamily()->itemsInternal()) {
413 if (ilink->isSuppressed())
416 bool to_remove =
false;
418 auto dual_item = m_graph_connectivity->dualItem(*idual_node);
419 switch (dual_item.kind()) {
421 if (cell_to_remove_set.find(dual_item->localId()) != cell_to_remove_set.end())
425 if (face_to_remove_set.find(dual_item->localId()) != face_to_remove_set.end())
429 if (node_to_remove_set.find(dual_item->localId()) != node_to_remove_set.end())
433 if (dual_item.itemBase().isSuppressed())
441 link_to_remove_set.insert(link_lid);
443 m_dualnodes_incremental_connectivity->removeConnectedItem(
ItemLocalId(idual_node->localId()), link_lid);
447 m_detached_link_lids.resize(link_to_remove_set.size());
448 std::copy(std::begin(link_to_remove_set), std::end(link_to_remove_set), std::begin(m_detached_link_lids));
452 m_detached_link_lids.clear();
455 auto incremental_dof2cell_connectivity = m_incremental_connectivities[m_connectivity_indexes_per_type[IT_DualCell]];
456 auto incremental_dof2face_connectivity = m_incremental_connectivities[m_connectivity_indexes_per_type[IT_DualFace]];
457 auto incremental_dof2node_connectivity = m_incremental_connectivities[m_connectivity_indexes_per_type[IT_DualNode]];
458 auto incremental_dof2part_connectivity = m_incremental_connectivities[m_connectivity_indexes_per_type[IT_DualParticle]];
465 for (
auto idualnode : dualNodeFamily()->itemsInternal()) {
466 if (idualnode->isSuppressed())
470 auto dual_item = m_graph_connectivity->dualItem(
DoF(idualnode));
471 switch (dual_item.kind()) {
473 if (cell_to_remove_set.find(dual_item.localId()) != cell_to_remove_set.end()) {
474 incremental_dof2cell_connectivity->replaceConnectedItem(dualnode_lid, 0,
ItemLocalId(-1));
475 m_detached_dualnode_lids.add(dualnode_lid);
480 if (face_to_remove_set.find(dual_item.localId()) != face_to_remove_set.end()) {
481 incremental_dof2face_connectivity->replaceConnectedItem(dualnode_lid, 0,
ItemLocalId(-1));
482 m_detached_dualnode_lids.add(dualnode_lid);
487 if (node_to_remove_set.find(dual_item.localId()) != node_to_remove_set.end()) {
488 incremental_dof2node_connectivity->replaceConnectedItem(dualnode_lid, 0,
ItemLocalId(-1));
489 m_detached_dualnode_lids.add(dualnode_lid);
494 if (dual_item.itemBase().isSuppressed()) {
495 incremental_dof2part_connectivity->replaceConnectedItem(dualnode_lid, 0,
ItemLocalId(-1));
496 m_detached_dualnode_lids.add(dualnode_lid);
504 m_detached_dualnode_lids.clear();
506 m_update_sync_info =
false;
514 if (!m_graph_allocated)
517 for (
Integer index = 0; index < NB_DUAL_ITEM_TYPE; ++index) {
518 Integer dual_node_kind = m_dualnode_kinds[index];
519 auto dof2dual_incremental_connectivity = m_incremental_connectivities[_connectivityIndex(dual_node_kind)];
521 if (dof2dual_incremental_connectivity && !m_connectivity_mng->isUpToDate(dof2dual_incremental_connectivity))
522 m_update_sync_info =
false;
524 if (!m_connectivity_mng->isUpToDate(m_dualnodes_incremental_connectivity))
525 m_update_sync_info =
false;
527 if (!m_connectivity_mng->isUpToDate(m_links_incremental_connectivity))
528 m_update_sync_info =
false;
531 Integer sync_info = (m_update_sync_info ? 0 : 1);
533 m_update_sync_info = sync_info == 0;
535 return m_update_sync_info;
541 if (!m_graph_allocated)
544 auto dualnode_family = dualNodeFamily();
545 auto link_family = linkFamily();
547 DualUniqueIdMng dual_uid_mng(traceMng());
548 for (Integer index = 0; index < NB_DUAL_ITEM_TYPE; ++index) {
549 Integer dual_node_kind = m_dualnode_kinds[index];
551 IItemFamily* dual_item_family = _dualItemFamily(dual_item_kind);
553 if (dual_item_family ==
nullptr || dual_item_family->nbItem() == 0)
556 auto dof2dual_incremental_connectivity = m_incremental_connectivities[_connectivityIndex(dual_node_kind)];
557 if (dof2dual_incremental_connectivity && !m_connectivity_mng->isUpToDate(dof2dual_incremental_connectivity)) {
560 Int32ArrayView source_family_added_items_lids;
561 Int32ArrayView source_family_removed_items_lids;
562 m_connectivity_mng->getSourceFamilyModifiedItems(dof2dual_incremental_connectivity, source_family_added_items_lids, source_family_removed_items_lids);
564 info() <<
" NUMBER OF REMOVE ITEMS : " << source_family_removed_items_lids.
size();
565 info() <<
" NUMBER OF ADDED ITEMS : " << source_family_added_items_lids.size();
566 Int64UniqueArray dual_item_uids;
567 dual_item_uids.
reserve(source_family_added_items_lids.size());
568 IntegerUniqueArray dual_node_lids;
569 dual_node_lids.
reserve(source_family_added_items_lids.size());
571 ItemVector source_family_added_items(dualnode_family, source_family_added_items_lids);
573 auto value = dual_uid_mng.uniqueIdOfDualItem(*idof);
574 if (std::get<0>(value) == dual_item_kind) {
575 dual_node_lids.add(idof->localId());
576 dual_item_uids.add(std::get<1>(value));
581 dual_item_family->itemsUniqueIdToLocalId(dual_item_lids, dual_item_uids);
583 ENUMERATE_DOF (idual_node, dualnode_family->view(dual_node_lids)) {
584 dof2dual_incremental_connectivity->notifySourceItemAdded(ItemLocalId(*idual_node));
585 dof2dual_incremental_connectivity->addConnectedItem(ItemLocalId(*idual_node), ItemLocalId(dual_item_lids[idual_node.index()]));
603 m_connectivity_mng->setUpToDate(dof2dual_incremental_connectivity);
607 if (!m_connectivity_mng->isUpToDate(m_links_incremental_connectivity)) {
613 m_connectivity_mng->getSourceFamilyModifiedItems(m_links_incremental_connectivity, source_family_added_items_lids, source_family_removed_items_lids);
615 info() <<
" NUMBER OF REMOVE ITEMS : " << source_family_removed_items_lids.
size();
616 info() <<
" NUMBER OF ADDED ITEMS : " << source_family_added_items_lids.size();
617 ItemVector source_family_added_items(link_family, source_family_added_items_lids);
620 link_uids.
reserve(source_family_added_items_lids.size());
622 dualnode_uids.
reserve(2 * source_family_added_items_lids.size());
624 link_uids.add(ilink->uniqueId());
625 auto value = dual_uid_mng.uniqueIdOfPairOfDualItems(*ilink);
626 eItemKind dualitem_kind_1 = std::get<0>(value.first);
627 Int64 dualitem_uid_1 = std::get<1>(value.first);
628 Int64 dof_uid_1 = dual_uid_mng.uniqueIdOf(dualitem_kind_1, dualitem_uid_1);
629 dualnode_uids.add(dof_uid_1);
631 eItemKind dualitem_kind_2 = std::get<0>(value.second);
632 Int64 dualitem_uid_2 = std::get<1>(value.second);
633 Int64 dof_uid_2 = dual_uid_mng.uniqueIdOf(dualitem_kind_2, dualitem_uid_2);
634 dualnode_uids.add(dof_uid_2);
641 Integer nb_dual_nodes_per_link = 2;
644 dualnode_family->itemsUniqueIdToLocalId(connected_dual_nodes_lids.view(), dualnode_uids);
648 m_links_incremental_connectivity->notifySourceItemAdded(ItemLocalId(*inewlink));
649 for (
auto lid : connected_dual_nodes_lids.subConstView(link_index, nb_dual_nodes_per_link)) {
650 m_links_incremental_connectivity->addConnectedItem(ItemLocalId(*inewlink), ItemLocalId(lid));
651 m_dualnodes_incremental_connectivity->addConnectedItem(ItemLocalId(lid), ItemLocalId(*inewlink));
653 link_index += nb_dual_nodes_per_link;
657 m_connectivity_mng->setUpToDate(m_links_incremental_connectivity);
658 m_connectivity_mng->setUpToDate(m_dualnodes_incremental_connectivity);
661 dualnode_family->computeSynchronizeInfos();
662 link_family->computeSynchronizeInfos();
663 m_update_sync_info =
true;
665 updateAfterMeshChanged();
667 auto* x =
new GraphIncrementalConnectivity(dualNodeFamily(),
669 m_dualnodes_incremental_connectivity,
670 m_links_incremental_connectivity,
671 m_incremental_connectivities,
672 m_dual_node_to_connectivity_index);
673 m_graph_connectivity.reset(x);
675 for (
auto& obs : m_connectivity_observer) {
677 obs->notifyUpdateConnectivity();
680 for (
auto& obs : m_graph_observer) {
693updateAfterMeshChanged()
695 if (!m_graph_allocated)
698 auto* dual_node_family = m_dof_mng.getFamily(GraphDoFs::dualNodeFamilyName());
699 m_dual_node_to_connectivity_index.resize(dual_node_family->itemFamily(), -1);
701 for (Integer index = 0; index < m_incremental_connectivities.size(); ++index) {
702 auto connectivity = m_incremental_connectivities[index];
703 if (connectivity && (connectivity->maxNbConnectedItem() > 0)) {
704 ConnectivityItemVector accessor(connectivity);
705 if (accessor.connectedItems(*idof).size() > 0) {
706 m_dual_node_to_connectivity_index[*idof] = index;
718printDualNodes()
const
721 info() <<
"DualNode : lid = " << idualnode->localId();
722 info() <<
" uid = " << idualnode->uniqueId();
723 info() <<
" owner = " << idualnode->owner();
724 auto dual_item = m_graph_connectivity->dualItem(*idualnode);
725 info() <<
" DualItem : lid = " << dual_item.localId();
726 info() <<
" uid = " << dual_item.uniqueId();
727 info() <<
" kind = " << dual_item.kind();
728 info() <<
" owner = " << dual_item.owner();
729 auto links = m_graph_connectivity->links(*idualnode);
730 for (
auto const& link : links) {
731 info() <<
" Connected link : lid = " << link.localId();
732 info() <<
" uid = " << link.uniqueId();
733 info() <<
" owner = " << link.owner();
745 info() <<
"Link : LID = " << ilink.localId();
746 info() <<
" UID = " << ilink->uniqueId();
747 info() <<
" OWNER = " << ilink->owner();
748 ENUMERATE_DOF (idual_node, m_graph_connectivity->dualNodes(*ilink)) {
749 info() <<
" Dof : index = " << idual_node.index();
750 info() <<
" Dof : LID = " << idual_node->localId();
751 info() <<
" UID = " << idual_node->uniqueId();
752 info() <<
" OWNER = " << idual_node->owner();
753 auto dual_item = m_graph_connectivity->dualItem(*idual_node);
754 info() <<
" dual item UID = " << dual_item.uniqueId();
755 info() <<
" KIND = " << dual_item.kind();
756 info() <<
" OWNER = " << dual_item.owner();
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Integer size() const
Nombre d'éléments du vecteur.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
ConstArrayView< T > constView() const
Vue constante sur ce tableau.
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
void reserve(Int64 new_capacity)
Réserve le mémoire pour new_capacity éléments.
ConstArrayView< T > subConstView(Int64 abegin, Int32 asize) const
Sous-vue à partir de l'élément abegin et contenant asize éléments.
void addRange(ConstReferenceType val, Int64 n)
Ajoute n élément de valeur val à la fin du tableau.
ArrayView< T > view() const
Vue mutable sur ce tableau.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Gère la récupération des informations de connectivité.
ItemVectorView connectedItems(ItemLocalId item)
Retourne les entités connectées à item.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
constexpr ConstArrayView< T > subConstView(Integer abegin, Integer asize) const noexcept
Sous-vue (constante) à partir de l'élément abegin et contenant asize éléments.
Interface d'une famille de DoF.
virtual DoFVectorView addDoFs(Int64ConstArrayView dof_uids, Int32ArrayView dof_lids)=0
En entree les uids des dofs et on recupere leurs lids.
virtual void endUpdate()=0
Interface d'une famille d'entités.
virtual ItemVectorView view(Int32ConstArrayView local_ids)=0
Vue sur les entités.
virtual void itemsUniqueIdToLocalId(Int32ArrayView local_ids, Int64ConstArrayView unique_ids, bool do_fatal=true) const =0
Converti un tableau de numéros uniques en numéros locaux.
Index d'un Item dans une variable.
TraceMessage info() const
Flot pour un message d'information.
ITraceMng * traceMng() const
Gestionnaire de trace.
Positionne une classe de message.
void removeLinks(Int32ConstArrayView link_local_ids) override
Suppression de liaisons duaux dans le graphe.
void removeDualNodes(Int32ConstArrayView dual_node_local_ids) override
Suppression de noeuds duaux dans le graphe.
Connectivité incrémentale item->item[].
ItemVectorViewT< Cell > CellVectorView
Vue sur un vecteur de mailles.
@ ReduceSum
Somme des valeurs.
UniqueArray< Int64 > Int64UniqueArray
Tableau dynamique à une dimension d'entiers 64 bits.
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
SharedArray< Int32 > Int32SharedArray
Tableau dynamique à une dimension d'entiers 32 bits.
UniqueArray< Int32 > Int32UniqueArray
Tableau dynamique à une dimension d'entiers 32 bits.
ArrayView< Int32 > Int32ArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
eItemKind
Genre d'entité de maillage.
@ IK_Particle
Entité de maillage de genre particule.
@ IK_Node
Entité de maillage de genre noeud.
@ IK_Cell
Entité de maillage de genre maille.
@ IK_Face
Entité de maillage de genre face.