[Stk] entity sharing info

Aleksandr Ovcharenko shurik at scorec.rpi.edu
Tue Jan 17 23:07:12 PST 2012


Hello,

I have a piece of the following code with STK where I try to get
sharing information of the entity:

  std::vector<stk::mesh::Entity*>::const_iterator BdryEntIt;

  int iBdrySize = stkBulkData->entity_comm().size();
  int iEntWithSharedInfo = 0;

  for (BdryEntIt = stkBulkData->entity_comm().begin(); BdryEntIt !=
stkBulkData->entity_comm().end(); ++BdryEntIt)
  {
    stkBdryEnt = *BdryEntIt;
    stkEntKey = stkBdryEnt->key();
    ...

    stk::mesh::PairIterEntityComm stkEntCB;
    stkEntCB = stkBdryEnt->sharing();

    if (!stkEntCB.empty())
      iEntWithSharedInfo++;
}

In this example, iBdrySize returns the number of entities with sharing
information. However, traversing those entities I try to get shared
entity parts by calling stkEntCB = stkBdryEnt->sharing(), and if there
is any information for the parts where a specific entity is shared, I
count iEntWithSharedInfo. At the end, it turns out that (for
simplicity I am considering just part 0) iEntWithSharedInfo = 436,
whereas iBdrySize = 5667. The further program execution confirms that
the majority of part boundary information is missing. What could be
possibly wrong in the code I am writing? If the code is correct, is
there a possibility that the part boundary information is synced
incorrectly somewhere?

Thank you,

 Alex



More information about the Stk mailing list