[MOAB-dev] Boundary nodes and faces
Iulian Grindeanu
iulian at mcs.anl.gov
Thu Aug 15 09:15:46 CDT 2013
----- Original Message -----
| This was actually simpler than I thought. Couple of lines solved the
| issue:
| skinner.find_skin(fileset, elocal, false, bndyfaces, bndyelems);
| pcomm->filter_pstatus(bndyfaces,PSTATUS_NOT_OWNED,PSTATUS_NOT);
| mbiface->get_connectivity(bndyfaces, bndyvtx, false);
| I thought that the bndyelems range would contain all the element
| handles that contain the face after the find_skin call. But this is
| not the case.
I think this is not correct;
You are using your fork, I assume, that accepts the fileset as input;
there are bndyfaces and bndyelems returned; bndyelems is for "reversed entities"
If you passed that as NULL (default) all entities are returned in bndyfaces; if it is not null, the forward and reverse entities are returned separately.
(forward and reverse with respect to the adjacent entity in elocal range)
Still, you are filtering out non-owned entities; you should remove shared entities;
If in 3d, you do not have to worry about multishared, usually you cannot have faces that are "multishared", for a correct mesh.
It is possible that a face is owned, but shared, it will be then in the interior of domain (between parts, but not on the true boundary)
do this:
rval = pcomm->get_shared_entities(-1, shared_ents);// will return all shared entities, including edges, vertices, but you do not care
result = subtract(bndyfaces, shared_ents) ; // the result will be just faces that are on true boundary
> My next related question (but not about the skinner though) is whether I can do the reverse lookup of the element to which a face belongs to ?
You can do adjacency call, toward dimension 3 (from 2); you will get adjacent element;
get_adjacencies(const EntityHandle *from_entities,
const int num_entities,
const int to_dimension,
const bool create_if_missing,
Range &adj_entities,
const int operation_type = Interface::INTERSECT) = 0;
if on true boundary, you will have exactly one element adjacent to a face:
get_adjacencies(&face,
1,
3,
false,
elemRange);
elemRange will have one element
| On Wed, Aug 14, 2013 at 10:01 PM, Vijay S. Mahadevan <
| vijay.m at gmail.com > wrote:
| | Tim, Iulian,
|
| | Thanks for the pointers. I think going from the highest-dimension
| | down and removing shared entities from the list makes sense. I have
| | a partial implementation that already does this and will check
| | whether this algorithm yields what I need.
|
| | I was originally thinking that Skinner:: find_geometric_skin would
| | give me the boundary vertices but doing it by the process of
| | elimination might be the right way since there is no reliance on
| | GEOM_DIMENSION tag being explicitly defined.
|
| | Shall update soon.
|
| | Vijay
|
| | On Wed, Aug 14, 2013 at 9:50 PM, Tim Tautges < tautges at mcs.anl.gov
| | >
| | wrote:
|
| | | Note, I've added this to the MOAB faq, http://trac.mcs.anl.gov/
| | | projects/ITAPS/wiki/ ParallelGeomSkin .
| |
|
| | | - tim
| |
|
| | | On 08/14/2013 09:31 PM, Tim Tautges wrote:
| |
|
| | | | This is tricky. As you say, if you get the local skin, that'll
| | | | include interior entities shared with/ghosted from other
| | |
| |
|
| | | | procs. If you get the skin and remove the shared entities,
| | | | that'll
| | | | remove the vertices that are on the geometric skin
| | |
| |
|
| | | | but also shared with other procs. The right way to do this is:
| | |
| |
|
| | | | - get the highest-dimensional entities on the skin (1d if in
| | | | 2d,
| | | | 2d
| | | | if in 3d)
| | |
| |
|
| | | | - remove any shared entities from that range (because if it's
| | | | shared,
| | | | then by definition there will be d+1 - dimensional
| | |
| |
|
| | | | entities on the other proc)
| | |
| |
|
| | | | - if you're in 3d and you also want skin edges, get the edges
| | | | adj
| | | | to
| | | | the entities in the range (remember the UNION arg
| | |
| |
|
| | | | on get_adjacencies), put in tmp range, then do the same for
| | | | vertices,
| | | | also put in tmp range
| | |
| |
|
| | | | - merge the tmp range with the original range
| | |
| |
|
| | | | Like I said, tricky, but welcome to parallel mesh.
| | |
| |
|
| | | --
| |
|
| | | ============================== ==============================
| | | ====
| |
|
| | | "You will keep in perfect peace him whose mind is
| |
|
| | | steadfast, because he trusts in you." Isaiah 26:3
| |
|
| | | Tim Tautges Argonne National Laboratory
| |
|
| | | ( tautges at mcs.anl.gov ) (telecommuting from UW-Madison)
| |
|
| | | phone (gvoice): (608) 354-1459 1500 Engineering Dr.
| |
|
| | | fax: (608) 263-4499 Madison, WI 53706
| |
|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20130815/0d3475a5/attachment.html>
More information about the moab-dev
mailing list