why nonuniform mesh produced

26 views
Skip to first unread message

Hathaway K

unread,
Mar 19, 2023, 10:46:22 AM3/19/23
to iso2mesh-users
ee9ceb5adfd2fa3cd99f6687f6be24a.pnghi,all, 
 I used surf2mesh, and my mesh result is nonuniform like the fig above, does this happen often?  I've tried to change the parameter like keepratio and maxvol, the result has not changed, I have no idea why this happens,  could you please tell me why or something I can refer to?

thanks 

Qianqian Fang

unread,
Mar 19, 2023, 6:07:15 PM3/19/23
to iso2mes...@googlegroups.com, Hathaway K
the non-uniformity of the output mesh comes from your input surface. if your input surface has small features, such as small gaps or sharp turns, surf2mesh/tetgen will need to refine the mesh near those small features in order to satisfy the default mesh quality requirement.

if you need help to further understand this, please share data and script (if the data is bigger than 1 MB, please do not attach the data file directly, instead, use an external link such as a dropbox, google drive or one-drive link).


On 3/19/23 10:46, Hathaway K wrote:
hi,all, 
 I used surf2mesh, and my mesh result is nonuniform like the fig above, does this happen often?  I've tried to change the parameter like keepratio and maxvol, the result has not changed, I have no idea why this happens,  could you please tell me why or something I can refer to?

thanks 
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/2d629bee-9883-449b-ad7b-a666583f0bbdn%40googlegroups.com.


Hathaway K

unread,
Mar 19, 2023, 11:08:25 PM3/19/23
to iso2mesh-users

Professor, thank you for your kind reply, I attach the relevant documents below. By the way, the data is abtained from a 3D object, which is generated by ratation.

Qianqian Fang

unread,
Mar 19, 2023, 11:31:20 PM3/19/23
to iso2mes...@googlegroups.com, Hathaway K

did you read my last reply? have you checked your input surface?

Hathaway K

unread,
Mar 20, 2023, 2:17:02 AM3/20/23
to iso2mesh-users
943d1d9c70970416393c599cae5d9ac.png
I checked input, I can plot it .I don't know how to distinguish whether it's right or wrong, it looks fine from the picture..

Hathaway K

unread,
Mar 21, 2023, 9:50:24 AM3/21/23
to iso2mesh-users
Thank you for your patience, Professor Fang,  and sorry for my careless. I've realized  I made a mistake, then I changed my input file OFF-formatted, and I got a nice mesh.
48784b27537c84b75aab02e3a7c9988.png
Next step, I used mmclab to run simulation, but I got an erro "Unrecognized function or variable' mmcraytrace'”.
Also, when I run the demo ”demo_mmclab_slit.m", erro""Unrecognized function or variable' mmcsrcdomain'" occurred.
I've set MCX /MCXLAB/MMC/MMCLAB in MATLAB path, I'm wondering if you would have an idea about what's causing those erro or there's something incorrect about the mesh.
I attached my new script file.
Any help provided would be greatly appreciated.

Qianqian Fang

unread,
Mar 21, 2023, 5:12:56 PM3/21/23
to iso2mes...@googlegroups.com, Hathaway K

On 3/21/23 09:50, Hathaway K wrote:
Thank you for your patience, Professor Fang,  and sorry for my careless. I've realized  I made a mistake, then I changed my input file OFF-formatted, and I got a nice mesh.

Next step, I used mmclab to run simulation, but I got an erro "Unrecognized function or variable' mmcraytrace'”.
Also, when I run the demo ”demo_mmclab_slit.m", erro""Unrecognized function or variable' mmcsrcdomain'" occurred.
I've set MCX /MCXLAB/MMC/MMCLAB in MATLAB path, I'm wondering if you would have an idea about what's causing those erro or there's something incorrect about the mesh.


these missing functions are located under mmc/matlab folder, you need to add path accordingly. see

https://github.com/fangq/mmc/blob/master/matlab/mmcraytrace.m
https://github.com/fangq/mmc/blob/master/matlab/mmcsrcdomain.m



Hathaway K

unread,
Mar 21, 2023, 11:08:19 PM3/21/23
to iso2mesh-users
Thank you very much, Professor Fang, I solved the erro report, but another situation occurred, my programs ran for more than 5 minutes and I stopped it. What can make the program run faster? Or is there something I set incorrect caused that?
This is where it got stuck, see file
f6583efc10b3082b90ea123f03e65d3.png
Please tell me why it happens and how it can be fixed. 
Best regards.
Reply all
Reply to author
Forward
0 new messages