choosing the best mesh format

Asked by Simon Fowler

I am trying to determine which mesh format is best for importing into FEniCS. Since my geometry is fairly complicated, I am generating a 3D stl file using Autocad, and importing it into Netgen to create the mesh file. However there many possible options for exporting the mesh file format, and I am unsure which formats will work the best with FEniCS. Are there some formats that will work better than others?

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
Last query:
Last reply:
Revision history for this message
Best Anders Logg (logg) said :
#1

On Fri, Jan 18, 2013 at 05:05:58PM -0000, Simon Fowler wrote:
> New question #219553 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/219553
>
> I am trying to determine which mesh format is best for importing
> into FEniCS. Since my geometry is fairly complicated, I am
> generating a 3D stl file using Autocad, and importing it into Netgen
> to create the mesh file. However there many possible options for
> exporting the mesh file format, and I am unsure which formats will
> work the best with FEniCS. Are there some formats that will work
> better than others?

The latest DOLFIN can build meshes directly from .off files if you can
generate those.

Depending on which Netgen version you have, there might actually be an
option to export to DOLFIN XML. If not, export to Diffpack format and
then use dolfin-convert to convert to DOLFIN XML.

--
Anders

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#2

Be aware that the bc exported from netgen to dolfin might not work anymore

On Saturday, 19 January 2013, Anders Logg wrote:

> Question #219553 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/219553
>
> Status: Open => Answered
>
> Anders Logg proposed the following answer:
> On Fri, Jan 18, 2013 at 05:05:58PM -0000, Simon Fowler wrote:
> > New question #219553 on FEniCS Project:
> > https://answers.launchpad.net/fenics/+question/219553
> >
> > I am trying to determine which mesh format is best for importing
> > into FEniCS. Since my geometry is fairly complicated, I am
> > generating a 3D stl file using Autocad, and importing it into Netgen
> > to create the mesh file. However there many possible options for
> > exporting the mesh file format, and I am unsure which formats will
> > work the best with FEniCS. Are there some formats that will work
> > better than others?
>
> The latest DOLFIN can build meshes directly from .off files if you can
> generate those.
>
> Depending on which Netgen version you have, there might actually be an
> option to export to DOLFIN XML. If not, export to Diffpack format and
> then use dolfin-convert to convert to DOLFIN XML.
>
> --
> Anders
>
> --
> You received this question notification because you are a member of
> FEniCS Team, which is an answer contact for FEniCS Project.
>

Revision history for this message
Simon Fowler (simonf-3) said :
#3

Thank you very much for your responses. I really appreciate the help.

I am currently using Netgen 5.0, which doesn't have the option for exporting to DOFLIN XML, though it does export to Diffpack. However, the program crashes immediately when I try to run the export operation. Considering this, and the comment that the boundary conditions may not export correctly, it seems like there may be a better option than using Netgen. Is there a mesh generator that would be more appropriate for this than Netgen? From what I can tell, my best options for exporting from AutoCAD are either .dwg, .stl, or .igs; I don't believe .off is an option.

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#4

On 22 January 2013 18:31, Simon Fowler <<email address hidden>
> wrote:

> Question #219553 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/219553
>
> Status: Answered => Open
>
> Simon Fowler is still having a problem:
> Thank you very much for your responses. I really appreciate the help.
>
> I am currently using Netgen 5.0, which doesn't have the option for
> exporting to DOFLIN XML, though it does export to Diffpack. However, the
> program crashes immediately when I try to run the export operation.
> Considering this, and the comment that the boundary conditions may not
> export correctly, it seems like there may be a better option than using
> Netgen. Is there a mesh generator that would be more appropriate for
> this than Netgen? From what I can tell, my best options for exporting
> from AutoCAD are either .dwg, .stl, or .igs; I don't believe .off is an
> option.
>
>
VMTK (which I have used a lot for blood vessels), GMSH, and MeshLab support
STL. Once you have a tetmesh it should ok to convert it to dolfin format,
although you
probably will need to set boundary indicators afterwards. Only VMTK sets BC
indicators
properly in DOLFIN, as far as I know. However, VMTK is a tool mostly for
vessel-like structures.

Kent

> --
> You received this question notification because you are a member of
> FEniCS Team, which is an answer contact for FEniCS Project.
>

Revision history for this message
Simon Fowler (simonf-3) said :
#5

Thanks Anders Logg, that solved my question.