- Refer to the doc page "Parametrized Function for 2-D Geometry Creation". At the top of the page, there is a table that defines rules your function handle must follow.
- In the row for 1 input argument, pay attention to items 3 and 4 in the return value column. When left and right regions are switched by mistake, MATLAB will throw the error message as i your question. From my experience this is the most popular mistake.
- If the asbove does not help, please consider providing a simplified example of your code.
pde geometryFromEdges using geometry function no longer works in R2019b
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have been a PDE toolbox user of R2017a and generate geometries using geometry functions in geometryFromEdges (e.g. geometryFromEdges(model,@myGeomFun)). Upon upgrading to R2019b, code that worked well in R2017a now errors in R2019b at the generateMesh function with: Meshing failed due to invalid geometry. Each face must have a unique face ID.
My question is similar to https://www.mathworks.com/matlabcentral/answers/434745-error-meshing-2d-geometry-in-matlab-r2018a. However, that answer did not address the fundamental question, but rather provided a work-around for that specific case (when the 2nd argument is a decomposed geometry matrix generated with decsg). I am encountering the same error, but when using a geometry function. So, I cannot follow the suggestion in that answer.
When I pdegplot(model,'EdgeLabels','on','FaceLabels','on') in 2019b, all looks well with the faces labeled as normal: F1, F2, ...
In the documetation for using geometry functions, I do not see a way to explicitly alter or specify the inherent face labeling if I wanted to (and pdegplot indicates each face does have a unique ID). As far as I can tell, the face IDs are internally generated within the PDE toolbox by prepending a "F" to the region label (subdomain number). All works well in 2017b and the 2019b pdegplot shows properly constructed regions with unique face IDs, so why isn't the 2019b version of generateMesh happy?
My geometry functions are pretty complex using globals from a variety of other lengthy functions. So, I'm not inclined to try to paste it all in as sample code. I could try to fabricate a simpler case as an example if I must, but I'm hoping someone can simply provide a little insight as to the fundamental nature of the problem just based on the general description. I feel like I am missing something obvious, but keep coming up empty.
Thanks.
2 comentarios
Konstantin Kovalev
el 4 de Nov. de 2019
Hello Jeff,
Taking a look at a simplified case that results in the same error would be great. If you think you are missing something obvious, I would suggest the following:
Thanks,
Konstantin
Respuestas (0)
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!