Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Extract mesh connectivity info

Please login with a confirmed email address before reporting spam

Hi everyone

I'm trying to find a way to extract the connectivity info of the mesh.

Right now I have written a function in matlab that generate that info for me but it is very slow, because my models have large number of elements. Also I need to do this iteratively so I have to do it many times. Note also that the script is still slow even if I use a mex version of it.

Any thoughts? Can comsol extract that?

Thank you

2 Replies Last Post Jun 28, 2013, 12:42 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Aug 17, 2011, 4:27 a.m. EDT
Hi

these are typically the info you need to extract a COMSOL model to import it into "standard" FEM tools such as "A..." or "N...", I tried quite some time before I gave up that idea, although I'm still missing a easy way to export at least 80% of my model into "A" and "N" for my external customers (the same to be able to translate the other way).
Today from my knowledge there is no efficient model data exchange possibility, this is a"problem" for those of us dealing with larger companies that only accept "a" or "N" compatible models

--
Good luck
Ivar
Hi these are typically the info you need to extract a COMSOL model to import it into "standard" FEM tools such as "A..." or "N...", I tried quite some time before I gave up that idea, although I'm still missing a easy way to export at least 80% of my model into "A" and "N" for my external customers (the same to be able to translate the other way). Today from my knowledge there is no efficient model data exchange possibility, this is a"problem" for those of us dealing with larger companies that only accept "a" or "N" compatible models -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 28, 2013, 12:42 p.m. EDT
There are stored in the .meshtxt file which is an mesh export option.
I need to post process my results in MATLAB then use TECPLOT to visualize the final results, so I export .meshtxt file and read the elements connectivity from there, It is usually a really big txt file so it is easy to search "Qua" or "Tri" or "Tet" or "Prism" for the element type and the list of connectivity will be there.
Remember the connectivity array starts from "0" for some languages you have to boos it up by 1 to make it compilable! BTW The connectivity array for Quadrilateral elements are skewed you need to fix it yourself.

Cheers
There are stored in the .meshtxt file which is an mesh export option. I need to post process my results in MATLAB then use TECPLOT to visualize the final results, so I export .meshtxt file and read the elements connectivity from there, It is usually a really big txt file so it is easy to search "Qua" or "Tri" or "Tet" or "Prism" for the element type and the list of connectivity will be there. Remember the connectivity array starts from "0" for some languages you have to boos it up by 1 to make it compilable! BTW The connectivity array for Quadrilateral elements are skewed you need to fix it yourself. Cheers

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.