CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] CGAL location

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2017, 02:21
Default CGAL location
  #1
New Member
 
Join Date: Nov 2013
Posts: 13
Rep Power: 13
macelee is on a distinguished road
While compiling OpenFOAM I ran into this error:

Code:
-L/lib64 -L/lib64 -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/boost-system/lib -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/CGAL-4.10/lib -lCGAL -lmpfr -lmeshTools -ledgeMesh -lfileFormats -ltriSurface -ldynamicMesh -lsurfMesh -lsampling -lsnappyHexMesh  -o /lustre/home/user/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/lib/libconformalVoronoiMesh.so
/usr/bin/ld: cannot find -lCGAL
CGAL appears to be compiled properly at an early time, but it was located at:
Code:
.../platforms/linux64Gcc/CGAL-4.10/lib64  # Note lib64 instead of lib
Of course I can fix this problem manually quite easily. But I am working on a script to install OpenFOAM automatically. So where is the best place to fix this problem?
macelee is offline   Reply With Quote

Old   July 15, 2017, 03:29
Default
  #2
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
this answer can be easily given by wyldcat.....he is second to none...d best
saddy is offline   Reply With Quote

Old   June 21, 2018, 05:57
Default issue
  #3
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Macelee, Have you found a better way to resolve it?



regards,


Nish




Quote:
Originally Posted by macelee View Post
While compiling OpenFOAM I ran into this error:

Code:
-L/lib64 -L/lib64 -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/boost-system/lib -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/CGAL-4.10/lib -lCGAL -lmpfr -lmeshTools -ledgeMesh -lfileFormats -ltriSurface -ldynamicMesh -lsurfMesh -lsampling -lsnappyHexMesh  -o /lustre/home/user/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/lib/libconformalVoronoiMesh.so
/usr/bin/ld: cannot find -lCGAL
CGAL appears to be compiled properly at an early time, but it was located at:
Code:
 .../platforms/linux64Gcc/CGAL-4.10/lib64  # Note lib64 instead of lib
Of course I can fix this problem manually quite easily. But I am working on a script to install OpenFOAM automatically. So where is the best place to fix this problem?
__________________
Thanks and regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   June 27, 2018, 22:41
Default
  #4
Member
 
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15
fertinaz is on a distinguished road
See file:
Code:
OpenFOAM/OpenFOAM-5.0/etc/config.sh/CGAL
There you will find the definition thirdPartyPath which points to the installation directory of the third party packages:
Code:
thirdPartyPath=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
This path is pointing to linux64Gcc if you're using Gcc compiler.

In the same file you will also see:
Code:
    export CGAL_ARCH_PATH=$thirdPartyPath/$cgal_version
    if [ -d "$CGAL_ARCH_PATH" ]
    then
        _foamAddLib $CGAL_ARCH_PATH/lib
    fi
So if you're using CGAL-4.10, CGAL_ARCH_PATH becomes linux64Gcc/CGAL-4.10. And lib under this path is added to the list of libs inside the if condition.

You can modify here using sed if you want to automate it in a build script. For instance:
Code:
sed 's,_foamAddLib $CGAL_ARCH_PATH\/lib,_foamAddLib $CGAL_ARCH_PATH\/lib64' $WM_PROJECT_DIR/etc/config.sh/CGAL
fertinaz is offline   Reply With Quote

Old   July 5, 2018, 09:09
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by fertinaz View Post
You can modify here using sed if you want to automate it in a build script. For instance:
Code:
sed 's,_foamAddLib $CGAL_ARCH_PATH\/lib,_foamAddLib $CGAL_ARCH_PATH\/lib64' $WM_PROJECT_DIR/etc/config.sh/CGAL
The problem when setting libraries is that you have a few ways that could be correct (or wrong). Treat either lib/ or lib64/ or both, or only include what is actually on disk.
Sometime you only want to add a library path if it really exists, sometimes it doesn't exists until the ThirdParty build is through.

For OpenFOAM-v1806, this problem is handled with some additional logic, bundled as a _foamAddLibAuto function.


If you want to auto explore lib/ and lib64/ but only use it if it exists:
Code:
    _foamAddLibAuto $CGAL_ARCH_PATH
If you want to do the same, but provide a fallback value if nothing has been compiled yet:
Code:
    _foamAddLibAuto $CGAL_ARCH_PATH   lib$WM_COMPILER_LIB_ARCH
This particular fallback should generally be OK when used with the ThirdParty makeCGAL, since it now explicitly uses the same thing:
Code:
    -DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH
olesen is offline   Reply With Quote

Old   November 18, 2021, 19:53
Default Delaunay triangulation 3D with CGAL
  #6
New Member
 
Maxim Panchuk
Join Date: Nov 2021
Posts: 1
Rep Power: 0
Ree.Nine is on a distinguished road
I am trying to use CGAL to do some Delaunay triangulation. I used one of the CGAL samples to compute a triangulation which includes a height field attribute.

The problem I have having is that I have no idea how to get the resulting triangulation. I figured out how to get the face_iterator, but I don't know what to do from there. What I'm hoping to get is an index into the point array for each of the 3 points on each triangle.

Im just wanna get smth like: Triang: triangle1 = (1,2,3) triangle2 = (3,4,1) where numbers its a vertices HELP PLEASE!!!

This is my code:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Random.h>
#include <CGAL/Triangulation_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>


#include <vector>
#include <cassert>
#include <iostream>
#include <fstream>

using namespace std;

typedef CGAL::Exact_predicates_inexact_constructions_kerne l K;
typedef CGAL:elaunay_triangulation_3<K, CGAL::Fast_location> Delaunay;
typedef Delaunay::Point Point;
typedef Delaunay::Vertex_handle Vertex_handle;
typedef Delaunay::Cell_handle Cell_handle;
typedef Delaunay::All_cells_iterator Cells_iterator;
typedef Delaunay::Vertex Vertex;

typedef CGAL::Triangulation_vertex_base_with_info_3<unsign ed, K> Vb;
typedef CGAL:elaunay_triangulation_cell_base_3<K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;

typedef Delaunay::Finite_vertices_iterator Finite_vertices_iterator;
typedef Delaunay::Finite_edges_iterator Finite_edges_iterator;
typedef Delaunay::Finite_facets_iterator Finite_facets_iterator;
typedef Delaunay::Finite_cells_iterator Finite_cells_iterator;
typedef Delaunay::Simplex Simplex;
typedef Delaunay::Locate_type Locate_type;




int main()
{
// generating points on a grid.
std::vector<Point> P;

for (int z = 0; z < 3; z++)
for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++)
P.push_back(Point(x, y, z));

// building their Delaunay triangulation.
Delaunay T(P.begin(), P.end());
//assert(T.number_of_vertices() == 8000);

for (?????????)
{
????????????????????????
}

std:fstream oFileT("output", std::ios:ut);
// writing file output;
oFileT << T;
cout << T.is_valid() << endl;
return 0;
}
```
Ree.Nine is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 00:21.