program abort: refinement and optimization processes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

program abort: refinement and optimization processes

IBTAlex
Dear CGAL professionals,

for use at university I have written a program that creates 3d meshes from raw lattice files using the cgal library.
Now some errors occur that I do not really understand - maybe you can help me?

What does not seem to work is following: The Program stops during any optimization process if I used the refinement function.
A mesh that is generated and afterwards refined, causes a crash/abort during lloyd/perturbation optimization (which is explicitly called after the meshing/refining process)
.
Lloyd optimization leads to a simple "Abort" while perturbation with a time of 180s and a sliver bound of 30 ended in this error message:

"terminate called after throwing an instance of 'CGAL::Assertion_exception'
  what():  CGAL ERROR: assertion violation!
Expr: !slivers.empty()
File: /opt/local/include/CGAL/Mesh_3/Sliver_perturber.h
Line: 477
Abort"

Can you help with this?
Best regards

Alex
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

IBTAlex
Nobody any idea?
I need help here! I just cannot find the solution to this error: Mesh refinement and afterwards optimization with lloyd or perturbation does lead to an abort of the program. Non-refined meshes work totally well.

Thank you for any advice!


Am 27.10.2010 um 12:29 schrieb Alexander Lühmann:

> Dear CGAL professionals,
>
> for use at university I have written a program that creates 3d meshes from raw lattice files using the cgal library.
> Now some errors occur that I do not really understand - maybe you can help me?
>
> What does not seem to work is following: The Program stops during any optimization process if I used the refinement function.
> A mesh that is generated and afterwards refined, causes a crash/abort during lloyd/perturbation optimization (which is explicitly called after the meshing/refining process)
> .
> Lloyd optimization leads to a simple "Abort" while perturbation with a time of 180s and a sliver bound of 30 ended in this error message:
>
> "terminate called after throwing an instance of 'CGAL::Assertion_exception'
>  what():  CGAL ERROR: assertion violation!
> Expr: !slivers.empty()
> File: /opt/local/include/CGAL/Mesh_3/Sliver_perturber.h
> Line: 477
> Abort"
>
> Can you help with this?
> Best regards
>
> Alex
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

Laurent Rineau (GeometryFactory)
Le lundi 01 novembre 2010 16:26:08, Alexander Lühmann a écrit :
> Nobody any idea?
> I need help here! I just cannot find the solution to this error: Mesh
> refinement and afterwards optimization with lloyd or perturbation does
> lead to an abort of the program. Non-refined meshes work totally well.

Can you post a small, but self contained, cpp file that triggers that issue?
That will help a volunteer on that list to understand what could have
happened.

--
Laurent Rineau, PhD
Release Manager of the CGAL Project       http://www.cgal.org/
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

Pierre Alliez-2
In reply to this post by IBTAlex
dear Alex,

do you apply sliver exudation after refinement and before optimization?
you should exude only as last step.

pierre

Pierre Alliez
INRIA Sophia Antipolis - Mediterranee
Project-team GEOMETRICA
http://www-sop.inria.fr/members/Pierre.Alliez/
Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95


Le 01/11/2010 16:26, Alexander Lühmann a écrit :

> Nobody any idea?
> I need help here! I just cannot find the solution to this error: Mesh refinement and afterwards optimization with lloyd or perturbation does lead to an abort of the program. Non-refined meshes work totally well.
>
> Thank you for any advice!
>
>
> Am 27.10.2010 um 12:29 schrieb Alexander Lühmann:
>
>> Dear CGAL professionals,
>>
>> for use at university I have written a program that creates 3d meshes from raw lattice files using the cgal library.
>> Now some errors occur that I do not really understand - maybe you can help me?
>>
>> What does not seem to work is following: The Program stops during any optimization process if I used the refinement function.
>> A mesh that is generated and afterwards refined, causes a crash/abort during lloyd/perturbation optimization (which is explicitly called after the meshing/refining process)
>> .
>> Lloyd optimization leads to a simple "Abort" while perturbation with a time of 180s and a sliver bound of 30 ended in this error message:
>>
>> "terminate called after throwing an instance of 'CGAL::Assertion_exception'
>>   what():  CGAL ERROR: assertion violation!
>> Expr: !slivers.empty()
>> File: /opt/local/include/CGAL/Mesh_3/Sliver_perturber.h
>> Line: 477
>> Abort"
>>
>> Can you help with this?
>> Best regards
>>
>> Alex
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://lists-sop.inria.fr/wws/info/cgal-discuss
>>
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

IBTAlex
In reply to this post by Laurent Rineau (GeometryFactory)
A file containing all vital functions of the program is attached.
To give some more information about the aim that might have lead to the problem:
Since CGAL does not include a function to refine only certain areas of a mesh instead of the whole mesh we wrote a  function that uses CGALs' "refinement" differently as can be seen in the attached file in the main function in the if cause if(shallRefine).
The Aim is to create a mesh (in our case a thorax) and have parts of it (in this case the heart) meshed in higher resolution.

Maybe our false use of CGALs refine option causes an inconsistency in the mesh that shows up when further optimization is called.
To investigate if the mesh is consistent we created some simple lattices to "see" (with medit) if the meshing is done propper. The meshes look great. To see whether the borderzone-tetrahedrons do overlap or not and if they are real neighbours we compared vertix coordinates and found that each border-tetrahedron of the heart did share at least one vertex with a border-tetrahedron at the thorax side. Another image is attached.

The attached c++ file does include main functions of the program we wrote. Probably most important for anybody to find any causes of the described error (the process stops with an error when the refined meshes are starting to be optimized with any optimization process) are the functions "RefineMesh(..)", "optimize_refined_mesh(..)" as well as the if cause "if(shallRefine).."  in the main loop.


Thank you so much for any help on this problem!

Best regards

Alexander von Lühmann
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss






Am 01.11.2010 um 20:46 schrieb Laurent Rineau (GeometryFactory):

> Le lundi 01 novembre 2010 16:26:08, Alexander Lühmann a écrit :
>> Nobody any idea?
>> I need help here! I just cannot find the solution to this error: Mesh
>> refinement and afterwards optimization with lloyd or perturbation does
>> lead to an abort of the program. Non-refined meshes work totally well.
>
> Can you post a small, but self contained, cpp file that triggers that issue?
> That will help a volunteer on that list to understand what could have
> happened.
>
> --
> Laurent Rineau, PhD
> Release Manager of the CGAL Project       http://www.cgal.org/
> R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>


cgal_refinemet_troubleshooting.cpp (7K) Download Attachment
refined mesh example.tiff (126K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

Laurent Rineau (GeometryFactory)
On Wednesday 03 November 2010 12:32:26 Alexander Lühmann wrote:

> A file containing all vital functions of the program is attached.
> To give some more information about the aim that might have lead to the
> problem: Since CGAL does not include a function to refine only certain
> areas of a mesh instead of the whole mesh we wrote a  function that uses
> CGALs' "refinement" differently as can be seen in the attached file in the
> main function in the if cause if(shallRefine). The Aim is to create a mesh
> (in our case a thorax) and have parts of it (in this case the heart)
> meshed in higher resolution.
>
> Maybe our false use of CGALs refine option causes an inconsistency in the
> mesh that shows up when further optimization is called. To investigate if
> the mesh is consistent we created some simple lattices to "see" (with
> medit) if the meshing is done propper. The meshes look great. To see
> whether the borderzone-tetrahedrons do overlap or not and if they are real
> neighbours we compared vertix coordinates and found that each
> border-tetrahedron of the heart did share at least one vertex with a
> border-tetrahedron at the thorax side. Another image is attached.
>
> The attached c++ file does include main functions of the program we wrote.
> Probably most important for anybody to find any causes of the described
> error (the process stops with an error when the refined meshes are
> starting to be optimized with any optimization process) are the functions
> "RefineMesh(..)", "optimize_refined_mesh(..)" as well as the if cause
> "if(shallRefine).."  in the main loop.

Your use the CGAL 3D mesh generator is not common. It is rather difficult to
understand why exactly that special use of the function lead to crashes. Would
it be hard to have a self contained cpp file and data set that shows the
errors?

An other way, complying with the documentation of the package, would be to
have only one single domain, that is the union of the two, and have sets of
criteria that depend on the sub-domains.

--
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://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

IBTAlex
Can you specify or give an example how to create the subdomains / which criteria could be put to a set that only apply to a certain area of the domain (and thereby create a subdomain)?
Maybe that solution works for us. that would make it easier than finding the cause for the crash. otherwise i will try and create a standalone cpp fileset that shows the error. at the moment the problem is that we need use some libraries that i cannot include to the set.

best regards

Alexander von Lühmann


 

>
> Your use the CGAL 3D mesh generator is not common. It is rather difficult to
> understand why exactly that special use of the function lead to crashes. Would
> it be hard to have a self contained cpp file and data set that shows the
> errors?
>
> An other way, complying with the documentation of the package, would be to
> have only one single domain, that is the union of the two, and have sets of
> criteria that depend on the sub-domains.
>
> --
> 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://lists-sop.inria.fr/wws/info/cgal-discuss
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

IBTAlex
Sorry to re-ask but I really need a solution for my problem:
How do I create sets of criteria for only a certain area of a domain?

>>
>> Your use the CGAL 3D mesh generator is not common. It is rather difficult to
>> understand why exactly that special use of the function lead to crashes. Would
>> it be hard to have a self contained cpp file and data set that shows the
>> errors?
>>
>> An other way, complying with the documentation of the package, would be to
>> have only one single domain, that is the union of the two, and have sets of
>> criteria that depend on the sub-domains.
>>
>> --
>> Laurent Rineau, PhD
>> R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
>> Release Manager of the CGAL Project       http://www.cgal.org/



This really could be a solution.
Best regards

Alex





Am 08.11.2010 um 12:31 schrieb Alexander Lühmann:

> Can you specify or give an example how to create the subdomains / which criteria could be put to a set that only apply to a certain area of the domain (and thereby create a subdomain)?
> Maybe that solution works for us. that would make it easier than finding the cause for the crash. otherwise i will try and create a standalone cpp fileset that shows the error. at the moment the problem is that we need use some libraries that i cannot include to the set.
>
> best regards
>
> Alexander von Lühmann
>
>
>
>
>>
>> Your use the CGAL 3D mesh generator is not common. It is rather difficult to
>> understand why exactly that special use of the function lead to crashes. Would
>> it be hard to have a self contained cpp file and data set that shows the
>> errors?
>>
>> An other way, complying with the documentation of the package, would be to
>> have only one single domain, that is the union of the two, and have sets of
>> criteria that depend on the sub-domains.
>>
>> --
>> 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://lists-sop.inria.fr/wws/info/cgal-discuss
>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

Laurent Rineau (GeometryFactory)
On Wednesday 17 November 2010 10:21:17 Alexander Lühmann wrote:
> Sorry to re-ask but I really need a solution for my problem:
> How do I create sets of criteria for only a certain area of a domain?

You are right to re-ask. We should have given you answers faster.

What you want to do is doable with Mesh_3 from CGAL-3.7: the concept
MeshCellCriteria_3 is documented, and you can reimplement one model of this
concept yourself, reusing some parts of of the class template
CGAL::Mesh_cell_criteria_3. However, even if that is doable, that is quite
tricky.

The class CGAL::Mesh_criteria_3 that will be in CGAL-3.8 will have options
that ease the definition of per-domain sizes. For the moment, the
corresponding code is not integrated in our development branch, and we cannot
give it to you before this work is done. Can you wait until the end of the
year? Maybe we could send you pre-release pieces of code as a Xmas gift!

--
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://lists-sop.inria.fr/wws/info/cgal-discuss

Reply | Threaded
Open this post in threaded view
|

Re: program abort: refinement and optimization processes

IBTAlex
Thank you very much!
I think we will wait until the end of the year - and would certainly heartily welcome your Xmas gift!

Best regards

Alexander von Lühmann


Am 17.11.2010 um 11:17 schrieb Laurent Rineau (GeometryFactory):

> On Wednesday 17 November 2010 10:21:17 Alexander Lühmann wrote:
>> Sorry to re-ask but I really need a solution for my problem:
>> How do I create sets of criteria for only a certain area of a domain?
>
> You are right to re-ask. We should have given you answers faster.
>
> What you want to do is doable with Mesh_3 from CGAL-3.7: the concept
> MeshCellCriteria_3 is documented, and you can reimplement one model of this
> concept yourself, reusing some parts of of the class template
> CGAL::Mesh_cell_criteria_3. However, even if that is doable, that is quite
> tricky.
>
> The class CGAL::Mesh_criteria_3 that will be in CGAL-3.8 will have options
> that ease the definition of per-domain sizes. For the moment, the
> corresponding code is not integrated in our development branch, and we cannot
> give it to you before this work is done. Can you wait until the end of the
> year? Maybe we could send you pre-release pieces of code as a Xmas gift!
>
> --
> 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://lists-sop.inria.fr/wws/info/cgal-discuss
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss