Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] 3D Mesh+intersections+Eigen
- Date: Wed, 01 Aug 2012 15:37:43 +0200
- Organization: GeometryFactory
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
>
>
> 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).
> 2) It is possible to accelerate intersection procedure.
What is the set of lines that you use?
> 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?
--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/
- Re: [cgal-discuss] 3D Mesh+intersections+Eigen, Laurent Rineau (CGAL/GeometryFactory), 08/01/2012
- <Possible follow-up(s)>
- Re: [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 08/03/2012
- Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen, Laurent Rineau (CGAL/GeometryFactory), 08/03/2012
- Re: [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 08/03/2012
- Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 08/03/2012
- Re: Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen, Laurent Rineau (CGAL/GeometryFactory), 08/03/2012
- Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 08/03/2012
- Re: Re: Re: [cgal-discuss] 3D Mesh+intersections+Eigen, cecilia, 08/03/2012
Archive powered by MHonArc 2.6.18.