Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] 3D Mesh+intersections+Eigen

Subject: CGAL users discussion list

List archive

[cgal-discuss] 3D Mesh+intersections+Eigen


Chronological Thread 
  • From:
  • To:
  • Subject: [cgal-discuss] 3D Mesh+intersections+Eigen
  • Date: Tue, 31 Jul 2012 15:42:38 +0200
  • Importance: Normal

Hi,
I mesh a sphere. Then I consider a set of lines crossing each mesh vertex
and I look for the
intersections between each line and the triangle of each incident cell
opposite to
the vertex (CGAL::Object ob=CGAL::intersection(line_vertex,triangle). I
use intersection points and vertexes (coordinates) to fill a coefficient
matrix of size (Number of vertexes X Number of lines). Here Number of
lines=40. Finally I need to solve a linear system involving this matrix.
As I have to solve large systems I use an Eigen matrix and the Eigen
solver BiCGSTAB.
In order to improve the precision of the solution of the linear system I
reduce the facet_size and cell_size parameters inside the function make
mesh (I estimate these parameters represent the mesh resolution).
For facet_size=cell_size= 0.2
(facet_distance=0.15,facet_angle=30,cell_radius_edge=4.) the generated
mesh is composed by about 500 vertexes and 2200 cells. The code run in
about 5 minutes.

For facet_size=cell_size= facet_distance=0.1
(facet_angle=30,cell_radius_edge=4.) there are about 3500 vertexes and
18000 cells. The code run in some hours. The solution of the linear system
takes the most part of the execution time and about the 90% of CPU is used
at this stage.

For facet_size=cell_size=
facet_distance=0.05(facet_angle=30,cell_radius_edge=4.) there are about
25586 vertexes. The code run in about two days. In this case also the
intersection
calculations are time consuming.

Finally for facet_size=cell_size=
facet_distance=0.01(facet_angle=30,cell_radius_edge=4.) I get the
following error:
Number of verticesDT 2971971
Number of cellsC3T3 18586265
terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted


So, I'm wondering whether:

1) The allocation error is connected with a size-limit for Eigen matrixes.
2) It is possible to accelerate intersection procedure.

Thanks in advance for any suggestions!

P.S : I installed and linked Eigen library into a linux machine as I had
some problems in doing it in MAC environment (as un example, the example
Eigen_parameterization.cpp provided by CGAL gives a Segmentation fault).



  • [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 07/31/2012

Archive powered by MHonArc 2.6.18.

Top of Page