I am running COMSOL w/ Matlab for an optimization of a geometry and need to be able to know the number of domains formed by 4 curves.
The problem is stated as:
I need an algorithm to determine how many domains I have. I have 4 sides that always touch, 3 are fixed and I am varying 1 of them. 2 sides are straight lines and the other 2 are large waves which when all 4 connected, form 1 domain. The problem is, sometimes my program changes this one side such that 1) it crosses over itself making more than 1 domain and 2) sometimes its amplitude is large enough it intersects another side.
I have been suggested to check path connectedness. Does anyone know if an algorithm has been posted for this?
or
Does anyone know of a better algorithm?
I am using Matlab's optimation algorithm for this and need to input a constraint from generating parameter spaces with more than 1 domain.
Thank you!
The problem is stated as:
I need an algorithm to determine how many domains I have. I have 4 sides that always touch, 3 are fixed and I am varying 1 of them. 2 sides are straight lines and the other 2 are large waves which when all 4 connected, form 1 domain. The problem is, sometimes my program changes this one side such that 1) it crosses over itself making more than 1 domain and 2) sometimes its amplitude is large enough it intersects another side.
I have been suggested to check path connectedness. Does anyone know if an algorithm has been posted for this?
or
Does anyone know of a better algorithm?
I am using Matlab's optimation algorithm for this and need to input a constraint from generating parameter spaces with more than 1 domain.
Thank you!