This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Installation of CGAL on Mac

0 votes

Hi,

I need to use functions as PolyhedralMeshGenerator and I read that I need to use CGAL.

So I installed it on my Mac (10.10 Yosemite) but i receive the error message:

Traceback (most recent call last):
  File "mesh.py", line 22, in <module>
    PolygonalMeshGenerator.generate(mesh, domain_vertices, 0.25);
NameError: name 'PolygonalMeshGenerator' is not defined

What have I to do for running this function ?
I have Dolfin 1.5.

Thanks,
Valentina

asked May 13, 2015 by ValeS FEniCS Novice (330 points)

1 Answer

+1 vote

CGAL support was removed in DOLFIN 1.5 and mesh generation was moved to mshr, which should be part of your FEniCS installation.

answered May 19, 2015 by johannr FEniCS Expert (17,350 points)

Thank you!

Can you explain me how to use mshr ?

I try with

from mshr import *

but I don't know how use function as Circle, PolyhedralMeshGenerator, etc.

You can find more info about mshr in the link in the answer. See for instance the documentation and the demo directory in the source code.

Ok, thank you!

But I didn't find a way to create a 3D mesh ( not only a mesh of the 3D surface, but a mesh of the whole solid, also the interior). Now, I try with

CSGCGALMeshGenerator3D()

of mshr, but I received some error messages.

Have you looked at this demo? If this does not help you, please open a new question and tell us exactly what you want to do.

Yes i had looked and I understand that CSGCGALMeshGenerator3D() is not the function that I need. Sorry but i misunderstood its use.

I need to solve a system of PDE on a 3D domain but I need to see the solution also in the domain, not only on the surface. So I'd like to have a grid also in the inside of my domain.

I hope to have been clearer than before.

it's possible only with FEniCS?

I'm not sure and not many people will see your question in the comments, so please make a new question.

Ok, thank you for the attention. I will make a new question.

...