- edited description
CSGCGALMeshGenerator2D generates bad mesh
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)
-
reporter -
Try setting in your
bashrc
/bash_profile
fileexport LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
It solved the problem in my case, so give a try...
-
reporter This did not work.
-
This is probably a duplicate of
#224( https://bitbucket.org/fenics-project/dolfin/issue/224/cgal-produces-degenerate-cells ) which has been fixed in 1.4.I don't know of any fix except patching dolfin/generation/CSGCGALMeshgenerator2D.cpp. If you are building Dolfin from source, you could try to backport the fix by replacing that file with the version from 1.4.
-
- changed status to wontfix
CGAL-based mesh generation is being moved into mshr.
- Log in to comment