SINTEF / Splipy

Spline modelling made easy.
GNU General Public License v3.0
100 stars 18 forks source link

Fix topology for self-connecting models #138

Closed TheBB closed 3 years ago

VikingScientist commented 3 years ago

I might misunderstand what this PR is supposed to do, but if seem to fail in the case below with a self-connecting torus. The torus is in fact self-connecting on two separate slices.

from splipy import SplineModel                                                 
from splipy.SplineModel import IFEMWriter                                      
from splipy import volume_factory                                              

torus = volume_factory.torus()                                                 
model = SplineModel(3,3)                                                       
model.add(torus)                                                               
writer = IFEMWriter(model)                                                     
for connection in writer.connections():                                        
    print(connection)                                                          

which pproduces no connections

TheBB commented 3 years ago

The torus is periodic, right? It's known that SplineModel does not (yet) support periodic topologies. This PR is for patches with incident interfaces (poor man's periodicity).

VikingScientist commented 3 years ago

Inserting

torus = torus.split(torus.knots(1)[0], direction='v')                             
torus = torus.split(torus.knots(2)[0], direction='w')

gives the following error

OrientationError: Candidate nodes found but no orientation matched. This probably indicates an erroneous topology. If you are sure this is not the case (that twin patches exist), use raise_on_twins=False. This happened while trying to connect patches at indexes 0 and 0.