Mesh densities in surf2mesh

181 views
Skip to first unread message

Hernan Tupungato

unread,
Apr 20, 2016, 8:34:38 AM4/20/16
to iso2mesh-users
Dear Qianqian,

I am having trouble in specifying different mesh densities to different layers of the same domain. I am aiming to generate a three layered spherical domain with arbitrary mesh densities in each of them. To do so I build three concatenated spherical shells and use surf2mesh. Although I am inserting arbitrary mesh densities in the max_vol entry (just changing the max_vol scalar with a row vector [max_vol_1, max_vol_2, max_vol_3]), I am not getting to the desired result. 

Would you be able to provide a sample code using the new mesh density functionality in surf2mesh so I can "play" with it?

Would you think in an easier way to construct such multi-layered spherical domain? 

Thanks in advance,

Kind regards,

Hernan

Qianqian Fang

unread,
Apr 24, 2016, 11:12:57 AM4/24/16
to iso2mes...@googlegroups.com
hi Hernan

sorry for the delay. have been busy near the end of the semester.

yes, you can specify the desired density using surf2mesh.

this is done by adding a 4th column to the region seeds (regions).

here is an example

[no1,fc1]=meshasphere([0 0 0],10,2);
[no2,fc2]=meshasphere([0 0 0],20,4);
[no3,fc3]=meshasphere([0 0 0],40,4);
[no,fc]=mergemesh(no1,fc1,no2,fc2,no3,fc3);

% define seeds for each region bounded by closed surfaces

seeds=[0 0 0; 15 0 0; 25 0 0];   

seeds(:,4)=[10 1 20]';   % set desired max tet size for each region


[node,elem]=surf2mesh(no,fc,[],[],1,100,seeds);

plotmesh(node,elem,'x>0')
the output mesh plot is attached.

hope this helps.

Qianqian


Thanks in advance,

Kind regards,

Hernan
--
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 post to this group, send email to iso2mes...@googlegroups.com.
Visit this group at https://groups.google.com/group/iso2mesh-users.
For more options, visit https://groups.google.com/d/optout.

mesh_shells.png

Hernan Tupungato

unread,
Apr 24, 2016, 1:56:11 PM4/24/16
to iso2mesh-users
Dear Qianqian,

Thanks a lot for your reply! I really appreciate it. 

BTW, let me congratulate you for writing ISO2Mesh, it is a great toolbox.

Kind regards,

Hernan

Qianqian Fang

unread,
Apr 24, 2016, 7:43:11 PM4/24/16
to iso2mes...@googlegroups.com
On 4/24/2016 1:56 PM, Hernan Tupungato wrote:
Dear Qianqian,

Thanks a lot for your reply! I really appreciate it.

you are welcome. I am glad it works



BTW, let me congratulate you for writing ISO2Mesh, it is a great toolbox.

can't take all the credits. iso2mesh uses a number of open-source
meshing utilities in the backend, notably, tetgen by Hang Si and
a bunch of tools from the CGAL team (http://cgal.org).

feel free to email if you have any further questions.

Qianqian
Reply all
Reply to author
Forward
0 new messages