CSGCGALMeshGenerator2D generates bad mesh

Issue #330 wontfix
Felix Ospald created an issue

C++ Example to reproduce:

#include <dolfin.h>

int main()
{
        dolfin::Mesh mesh;
        dolfin::Circle primitive(0, 0, 1, 4);
        dolfin::CSGCGALMeshGenerator2D meshgen(primitive);
        meshgen.generate(mesh);
        std::cout << mesh.hmin() << " " << mesh.hmax() << " " << mesh.rmin() << " " << mesh.rmax() << std::endl;
        return 0;
}

prints: 0.0184443 inf 0 0.00873079

for 1.4.0 and 1.2.0: 0.0184443 0.0349987 0.00356169 0.00873079

Consequently assembling a matrix contains inf, nan, values... This happens also for other mesh resolutions.

Is there a simple fix for this?help I could not find out where the problem is. I also compiled 1.3 with the same CGAL version as 1.4, but it did not fix the problem. I'd like to use 1.3. since 1.4 requires a lot of changes to my code.

Comments (5)

  1. Tianyi Li

    Try setting in your bashrc/bash_profile file

    export LC_ALL=en_US.UTF-8  
    export LANG=en_US.UTF-8
    

    It solved the problem in my case, so give a try...

  2. Log in to comment