Hello,
I'm running a COMSOL simulation through Matlab where a script solves randomly generated geometries repeatedly to obtain statistics. One step is meshing the geometry. This meshing step normally takes around 20-30 seconds, or a minute in some cases. However I've noticed that certain geometries can take up towards 2-4 hours to mesh. I would much rather abandon this geometry and create a new one.
Is there any way for me to define a criteria to make COMSOL, through Matlab livelink, cancel the mesh generation in case it has taken too long? This is a significant flaw in my code right now since even if I run the script overnight, one or two of these problematic meshes is enough to ruin my statistics.