Hi Johannes,
I am having the same issue, and "from mshr import *" does not seem to work.

Traceback (most recent call last):
  File "cylinder_demo3D.py", line 40, in __init__
    mesh=dolfin.Mesh(cylinder, 32)
  File "/usr/lib/python2.7/dist-packages/dolfin/mesh/meshes.py", line 66, in 
__init__
    cpp.Mesh.__cppinit__(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin/cpp/mesh.py", line 1592, in 
__init__
    _mesh.Mesh_swiginit(self,_mesh.new_Mesh(*args))
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     [email protected]
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to create mesh from CSG geometry.
*** Reason:  Mesh generation not available. Dolfin has been compiled without 
CGAL..
*** Where:   This error was encountered inside CSGMeshGenerator.cpp.
*** Process: unknown
*** 
*** DOLFIN version: 1.4.0
*** Git changeset:  unknown
*** -------------------------------------------------------------------------


I have a CSG object defined as:
        pt1 = dolfin.Point(MAX_X_DIM, 0, 0)
        pt2 = dolfin.Point(MIN_X_DIM, 0, 0)
        cylinder = dolfin.Cylinder(pt1, pt2, 1.0)

Please let me know if there is anything I can do to fix this.


On Nov 9, 2014, at 11:55 PM, Johannes Ring <[email protected]> wrote:

> We recently switched to the new mshr package [1] in the FEniCS PPA. In
> teori, it should be enough to add the following line to your script:
> 
>  from mshr import *
> 
> Let us know how that works for you.
> 
> Johannes
> 
> [1] https://bitbucket.org/benjamik/mshr/wiki/Home
> 
> On Sun, Nov 9, 2014 at 3:16 AM, simone <[email protected]> wrote:
>> Good evening,
>> i've checked the forum and searched on google in order to fix my problem,
>> but i cannot find a solution.
>> I work on Ubuntu 14.04 LTS, and until yesterday an error occurs in compiling
>> my code. (The same code runned without any error two days ago on the same
>> pc, and i think not to have done anything strange before problems begin)
>> 
>> if i write this to lines in my code:
>> geom=Rectangle(0.,0.,16.0,11.0)
>> mesh=Mesh(geom,50)
>> 
>> i receive this error message:
>> 
>> Traceback (most recent call last):
>>  File "Problema_differenziale.py", line 17, in <module>
>>    mesh=Mesh(geom,50)
>>  File "/usr/lib/python2.7/dist-packages/dolfin/mesh/meshes.py", line 66, in
>> __init__
>>    cpp.Mesh.__cppinit__(self, *args, **kwargs)
>>  File "/usr/lib/python2.7/dist-packages/dolfin/cpp/mesh.py", line 1592, in
>> __init__
>>    _mesh.Mesh_swiginit(self,_mesh.new_Mesh(*args))
>> RuntimeError:
>> 
>> ***
>> -------------------------------------------------------------------------
>> *** DOLFIN encountered an error. If you are not able to resolve this issue
>> *** using the information listed below, you can ask for help at
>> ***
>> ***     [email protected]
>> ***
>> *** Remember to include the error message listed below and, if possible,
>> *** include a *minimal* running example to reproduce the error.
>> ***
>> ***
>> -------------------------------------------------------------------------
>> *** Error:   Unable to create mesh from CSG geometry.
>> *** Reason:  Mesh generation not available. Dolfin has been compiled without
>> CGAL..
>> *** Where:   This error was encountered inside CSGMeshGenerator.cpp.
>> *** Process: unknown
>> ***
>> *** DOLFIN version: 1.4.0
>> *** Git changeset:  unknown
>> ***
>> -------------------------------------------------------------------------
>> 
>> i've tried without success the commands:
>> 
>> sudo apt-get autoremove fenics
>> sudo add-apt-repository --remove ppa:fenics-packages/fenics
>> sudo add-apt-repository ppa:fenics-packages/fenics
>> sudo apt-get update
>> sudo apt-get install fenics
>> sudo apt-get dist-upgrade
>> 
>> 
>> if i replace those two lines with
>> mesh=RectangleMesh(0., 0., Base, Altezza,100,60)
>> the program works
>> 
>> please can you help to find a solution? I really don't know what to do
>> Thank you for support
>> Regards
>> 
>> 
>> 
>> _______________________________________________
>> fenics-support mailing list
>> [email protected]
>> http://fenicsproject.org/mailman/listinfo/fenics-support
> _______________________________________________
> fenics-support mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics-support

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to