Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] 3D Mesh+intersections+Eigen
  • Date: Fri, 3 Aug 2012 14:03:25 +0200
  • Importance: Normal

Hi,
thank you for your reply!

> So, I'm wondering whether:
> 1) The allocation error is connected with a size-limit for Eigen
matrixes.
> std::bad_alloc is the exception that is thrown when a 'new' operator cannot
> allocate the requested memory. It means that, with the number you gave
us,
> the
> Eigen matrix is probably too big to fit in your memory. If you compile your
> program in 32 bits, it can also mean that you may have enough memory,
but
> the
> requested memory does not fit in the memory space that a process can use in
> 32 bits (that is less than 4Go).

A memory problem was also my guess. Anyway I was surprised as I run the
huge case (Number of verticesDT 2971971 Number of cellsC3T3 18586265) on a
machine with 20Go of memory.
Do you have any suggestions?


> 2) It is possible to accelerate intersection procedure.
> What is the set of lines that you use?

I build a vector of directions corresponding to the direction of the
segments connecting the center of a sphere with points uniformly
distributed on its surface. Then I build a set of lines with these
directions and crossing each vertex using an exact kernel to build
intersections (the Exact_predicates_inexact_constructions_kernel used to
generate the mesh gave me inexact results for intersections).

> 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).
Which version of Mac OS was it? And which version of the compiler?

The MAC version was 10.6.8 and the compiler version g++-4.2.1.




> --
> Laurent Rineau, PhD
> R&D Engineer at GeometryFactory
http://www.geometryfactory.com/
> Release Manager of the CGAL Project http://www.cgal.org/
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
> Le mardi 31 juillet 2012 15:42:38
>
> a écrit : 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







Archive powered by MHonArc 2.6.18.

Top of Page