bugpyFormex - Bugs: bug #36636, non-Manifold nodes

 
 

bug #36636: non-Manifold nodes

Submitter:  gianluca de santis <gianlucadesi>
Submitted:  Tue 12 Jun 2012 09:10:40 AM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  In Progress
Privacy:  Public Assigned to:  bverheg
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 11 Sep 2012 01:14:12 PM UTC, comment #12: 

the attached file

nonManifold3.py

joins Tomas's and Benedict's functions using the rings. It seems accurate and fast.

TODO: extend it to nonManifolEdges and nonManifoldEdgeNodes

(file #26534)

gianluca de santis <gianlucadesi>
Group Member
Tue 28 Aug 2012 02:24:35 PM UTC, comment #11: 

The current solution Mesh.nonManifoldNodes() fails if the non-manifold-node is located in the same mesh part. See attached example:

nonManifold2.py

The previous function posted by Benedict, even if slower, does not fail.

Also, the Mesh.nonManifoldNodes() changes the property numbers.




(file #26436)

gianluca de santis <gianlucadesi>
Group Member
Sun 26 Aug 2012 08:22:45 AM UTC, comment #10: 

In revision 2421 we now have Mesh.nonManifoldNodes, Mesh.nonManifoldEdges and Mesh.nonManifoldEdgeNodes.

And added an example (NonManifold) as demo and for testing.

Consider this closed, unless some difficulties appear.

Benedict Verhegghe <bverheg>
Group administrator
Sat 25 Aug 2012 08:30:18 PM UTC, comment #9: 

Mesh.nonManifoldNodes is available in Revision 2419. I leave this bug open until nonManifoldEdges is added.

Benedict Verhegghe <bverheg>
Group administrator
Sat 25 Aug 2012 07:44:05 PM UTC, comment #8: 

I had a look at this, and came up with a first solution, following the algorithm in comment #6. I give it in attached file (nonManifold1.py) as an illustration of how to 'pyformexize' and 'numpy-ize' your code ;) It is (only slighly) faster than the original posted by Gianluca.

But then I had a second look, and realized that the non-manifold nodes are a feature of a grade(dimensionality) 2 Mesh only, and occurs where parts are connected by a node but do not share an edge. Using a splitByConnection over edge-adjacency made it easy to find the common nodes between any parts. This is many orders faster than the solution above. I will check it in shortly.

A related function nonManifoldEdges (only for grad-3 meshes) can also be created. And maybe nonManifoldNodes should get an option to also add the nodes of the nonManifoldEdges?


(file #26424)

Benedict Verhegghe <bverheg>
Group administrator
Fri 24 Aug 2012 12:19:44 PM UTC, comment #7: 

This function tries to do too much on its own and it uses techniques that will explode on large data sets.

It should use already available functions for connectivity (possibly propose additional/better ones when needed).
And lists should be avoided at all times.

The _doc_ mentions rings without explaining the concept.
If it is useful, we should probably create 'ring' functions?
(Or do we already have some?)

Benedict Verhegghe <bverheg>
Group administrator
Fri 24 Aug 2012 11:49:52 AM UTC, comment #6: 

I have attached a file
nonmanifoldnodes-submit.py
which contains a function proposed by Tomas Praet.

It works fine on all test cases:
please run it and visualize the results.

In my opinion it
should be added to mesh.py as a mesh method.



(file #26422)

gianluca de santis <gianlucadesi>
Group Member
Fri 24 Aug 2012 09:48:53 AM UTC, comment #5: 

Is this issue still of interest? If so, please indicate if the proposed solution would be helpful. Otherwise, just close the bug as fixed.

Benedict Verhegghe <bverheg>
Group administrator
Wed 27 Jun 2012 06:30:49 PM UTC, comment #4: 

Do you want to detect where elements have exactly one common node?
Or where elements have any number of common nodes, but no common edges?

We could add an option to adjacency() to also return the node numbers by which the adjacency occurs. Then each of the above questions could be handled.

Benedict Verhegghe <bverheg>
Group administrator
Wed 13 Jun 2012 04:04:14 PM UTC, comment #3: 

I did not explain the problem in the right way. Sorry!

I show the problem in the attached images. I would like to detect the black node in both cases.

Gianluca


gianluca de santis <gianlucadesi>
Group Member
Tue 12 Jun 2012 03:42:19 PM UTC, comment #2: 

This functionality has been added in revision 2337.
Create the adjacency tables for different levels, and then take the difference. Example for a Mesh M with dimensionality 3:


adj = [ M.adjacency(i) for i in range(3) ]
from connectivity import adjacencyDiff
# elements sharing a node but no edge:
print adjacencyDiff(adj[0],adj[1])
# elements sharing a node but no face:
print adjacencyDiff(adj[0],adj[2])



Benedict Verhegghe <bverheg>
Group administrator
Tue 12 Jun 2012 09:49:27 AM UTC, comment #1: 

First create intermediate levels with Connectivity.insertLevel. Then use Connectivity.adjacency to find the elements adjacent by face, edge, and node. Finally, take elements adjacent by node but not by edge, and elements adjacent by edge but not by face.

This should be implemented in a general fashion in the Connectivity class.

Benedict Verhegghe <bverheg>
Group administrator
Tue 12 Jun 2012 09:10:40 AM UTC, original submission:  

I would like to detect non-Manifold entities in a Hex mesh:

-non Manifold nodes: nodes that connect 2 elements without being part of a common edge (or face)

-non Manifold edges: edges that connect 2 elements without being part of a common face

Gianluca

gianluca de santis <gianlucadesi>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #26534:  nonManifold3.py added by gianlucadesi (6KiB - text/x-python)
file #26436:  nonManifold2.py added by gianlucadesi (3KiB - text/x-python)
file #26424:  nonManifold1.py added by bverheg (747B - text/x-python)
file #26018:  nm1.png added by gianlucadesi (4KiB - image/png)
file #26019:  nm2.png added by gianlucadesi (1KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bverheg (Posted a comment)
  • -email is unavailable- added by gianlucadesi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 15 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-11 gianlucadesi Open/ClosedClosed Open
    2012-09-11 gianlucadesi Attached File- Added nonManifold3.py, #26534
    2012-08-28 gianlucadesi Attached File- Added nonManifold2.py, #26436
        StatusFixed In Progress
    2012-08-26 bverheg StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2012-08-25 bverheg Attached File- Added nonManifold1.py, #26424
    2012-08-24 gianlucadesi Attached File- Added nonmanifoldnodes-submit.py, #26422
    2012-06-13 gianlucadesi Attached File- Added nm1.png, #26018
        Attached File- Added nm2.png, #26019
        StatusFixed In Progress
    2012-06-12 bverheg StatusNone Fixed
        Assigned toNone bverheg
    2012-06-12 bverheg CategoryPlugins None
        Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code