From a28ee6edaa2319ec20c50e43339e6d4de50ebcd8 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 24 Mar 2010 00:41:34 +0000 Subject: [PATCH] moving ULg/UCL copyrighted code out of main source tree: step 2 (more work on CMakeLists) --- Common/CMakeLists.txt | 2 +- Fltk/CMakeLists.txt | 2 +- Geo/CMakeLists.txt | 2 +- Graphics/CMakeLists.txt | 2 +- Mesh/CMakeLists.txt | 2 +- Numeric/CMakeLists.txt | 2 +- Parser/CMakeLists.txt | 2 +- Plugin/CMakeLists.txt | 2 +- Post/CMakeLists.txt | 2 +- Qt/CMakeLists.txt | 2 +- Solver/CMakeLists.txt | 2 +- contrib/ANN/CMakeLists.txt | 2 +- contrib/Chaco/CMakeLists.txt | 2 +- contrib/DiscreteIntegration/CMakeLists.txt | 2 +- contrib/Fl_Tree/CMakeLists.txt | 2 +- contrib/MathEx/CMakeLists.txt | 2 +- contrib/Metis/CMakeLists.txt | 2 +- contrib/NativeFileChooser/CMakeLists.txt | 2 +- contrib/Netgen/CMakeLists.txt | 2 +- contrib/Tetgen/CMakeLists.txt | 2 +- contrib/TetgenNew/CMakeLists.txt | 2 +- contrib/kbipack/CMakeLists.txt | 2 +- doc/texinfo/gmsh.texi | 7 ++++-- utils/api_demos/mainAntTweakBar.cpp | 8 +++---- utils/api_demos/mainCartesian.cpp | 28 +++++++++++----------- utils/api_demos/mainElasticity.cpp | 8 +++---- utils/api_demos/mainGlut.cpp | 8 +++---- utils/api_demos/mainHomology.cpp | 11 ++++----- utils/api_demos/mainLevelset.cpp | 20 ++++++++-------- utils/api_demos/mainOcc.cpp | 8 +++---- utils/api_demos/mainPost.cpp | 12 +++++----- utils/api_demos/mainSimple.cpp | 6 ++--- 32 files changed, 81 insertions(+), 79 deletions(-) diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt index 5ce071fdc2..9133094fb1 100644 --- a/Common/CMakeLists.txt +++ b/Common/CMakeLists.txt @@ -26,5 +26,5 @@ set(SRC Bindings.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Common *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Common "${SRC};${HDR}") diff --git a/Fltk/CMakeLists.txt b/Fltk/CMakeLists.txt index 35d616bee9..9a75c0fb02 100644 --- a/Fltk/CMakeLists.txt +++ b/Fltk/CMakeLists.txt @@ -27,5 +27,5 @@ set(SRC partitionDialog.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Fltk *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Fltk "${SRC};${HDR}") diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt index f8b178b70e..93e60452af 100644 --- a/Geo/CMakeLists.txt +++ b/Geo/CMakeLists.txt @@ -35,5 +35,5 @@ set(SRC Cell.cpp CellComplex.cpp ChainComplex.cpp Homology.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Geo *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Geo "${SRC};${HDR}") diff --git a/Graphics/CMakeLists.txt b/Graphics/CMakeLists.txt index dda9f609f9..2f2d72cd37 100644 --- a/Graphics/CMakeLists.txt +++ b/Graphics/CMakeLists.txt @@ -22,5 +22,5 @@ set(SRC gl2yuv.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Graphics *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Graphics "${SRC};${HDR}") diff --git a/Mesh/CMakeLists.txt b/Mesh/CMakeLists.txt index 5339539821..faa3cdb9f8 100644 --- a/Mesh/CMakeLists.txt +++ b/Mesh/CMakeLists.txt @@ -33,5 +33,5 @@ set(SRC multiscalePartition.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Mesh *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Mesh "${SRC};${HDR}") diff --git a/Numeric/CMakeLists.txt b/Numeric/CMakeLists.txt index 77f7f0bc4d..68dc509f6b 100644 --- a/Numeric/CMakeLists.txt +++ b/Numeric/CMakeLists.txt @@ -21,5 +21,5 @@ set(SRC cartesian.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Numeric *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Numeric "${SRC};${HDR}") diff --git a/Parser/CMakeLists.txt b/Parser/CMakeLists.txt index fee863d6ab..2a1bb4d92b 100644 --- a/Parser/CMakeLists.txt +++ b/Parser/CMakeLists.txt @@ -9,5 +9,5 @@ set(SRC FunctionManager.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Parser *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Parser "${SRC};${HDR}") diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt index 55637ba2fb..bd3c5e2622 100644 --- a/Plugin/CMakeLists.txt +++ b/Plugin/CMakeLists.txt @@ -26,5 +26,5 @@ set(SRC Distance.cpp ExtractEdges.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Plugin *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Plugin "${SRC};${HDR}") diff --git a/Post/CMakeLists.txt b/Post/CMakeLists.txt index eaf012a378..6942bee19d 100644 --- a/Post/CMakeLists.txt +++ b/Post/CMakeLists.txt @@ -14,5 +14,5 @@ set(SRC ColorTable.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Post *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Post "${SRC};${HDR}") diff --git a/Qt/CMakeLists.txt b/Qt/CMakeLists.txt index b52cb8a99a..8be7adfeb9 100644 --- a/Qt/CMakeLists.txt +++ b/Qt/CMakeLists.txt @@ -14,7 +14,7 @@ set(MOC_HDR graphicWindow.h ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Qt *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Qt "${SRC};${HDR}") foreach(FILE ${MOC_HDR}) diff --git a/Solver/CMakeLists.txt b/Solver/CMakeLists.txt index 52d251eee9..7d71f39788 100644 --- a/Solver/CMakeLists.txt +++ b/Solver/CMakeLists.txt @@ -35,5 +35,5 @@ set(SRC dgMesh2MeshProjection.cpp ) -file(GLOB HDR RELATIVE ${CMAKE_SOURCE_DIR}/Solver *.h) +file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(Solver "${SRC};${HDR}") diff --git a/contrib/ANN/CMakeLists.txt b/contrib/ANN/CMakeLists.txt index 6685b1c4fd..ee78b5e7ae 100644 --- a/contrib/ANN/CMakeLists.txt +++ b/contrib/ANN/CMakeLists.txt @@ -20,5 +20,5 @@ set(SRC src/perf.cpp ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/ANN *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/ANN "${SRC};${HDR}") diff --git a/contrib/Chaco/CMakeLists.txt b/contrib/Chaco/CMakeLists.txt index 0b10d68dcf..61fbf58ddf 100644 --- a/contrib/Chaco/CMakeLists.txt +++ b/contrib/Chaco/CMakeLists.txt @@ -88,5 +88,5 @@ set(SRC util/vecscale.c ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/Chaco *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/Chaco "${SRC};${HDR}") diff --git a/contrib/DiscreteIntegration/CMakeLists.txt b/contrib/DiscreteIntegration/CMakeLists.txt index d968c6a5c0..a26faa2c7a 100644 --- a/contrib/DiscreteIntegration/CMakeLists.txt +++ b/contrib/DiscreteIntegration/CMakeLists.txt @@ -9,5 +9,5 @@ set(SRC recurCut.cpp ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/DiscreteIntegration *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/DiscreteIntegration "${SRC};${HDR}") diff --git a/contrib/Fl_Tree/CMakeLists.txt b/contrib/Fl_Tree/CMakeLists.txt index 9186125b92..a4d3c14786 100644 --- a/contrib/Fl_Tree/CMakeLists.txt +++ b/contrib/Fl_Tree/CMakeLists.txt @@ -10,5 +10,5 @@ set(SRC Fl_Tree_Prefs.cxx ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/Fl_Tree *.H) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.H) append_gmsh_src(contrib/Fl_Tree "${SRC};${HDR}") diff --git a/contrib/MathEx/CMakeLists.txt b/contrib/MathEx/CMakeLists.txt index 376ffcec60..f77f774b4b 100644 --- a/contrib/MathEx/CMakeLists.txt +++ b/contrib/MathEx/CMakeLists.txt @@ -7,5 +7,5 @@ set(SRC mathex.cpp ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/MathEx *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/MathEx "${SRC};${HDR}") diff --git a/contrib/Metis/CMakeLists.txt b/contrib/Metis/CMakeLists.txt index a23404903f..0440704545 100644 --- a/contrib/Metis/CMakeLists.txt +++ b/contrib/Metis/CMakeLists.txt @@ -58,5 +58,5 @@ set(SRC stat.c ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/Metis *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/Metis "${SRC};${HDR}") diff --git a/contrib/NativeFileChooser/CMakeLists.txt b/contrib/NativeFileChooser/CMakeLists.txt index 26bdee5597..86a1d6e07a 100644 --- a/contrib/NativeFileChooser/CMakeLists.txt +++ b/contrib/NativeFileChooser/CMakeLists.txt @@ -7,5 +7,5 @@ set(SRC Fl_Native_File_Chooser.cxx ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/NativeFileChooser *.H) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.H) append_gmsh_src(contrib/NativeFileChooser "${SRC};${HDR}") diff --git a/contrib/Netgen/CMakeLists.txt b/contrib/Netgen/CMakeLists.txt index 8c6c7b38d9..966eff799e 100644 --- a/contrib/Netgen/CMakeLists.txt +++ b/contrib/Netgen/CMakeLists.txt @@ -38,5 +38,5 @@ set(SRC ${opt}/bfgs.cpp ${opt}/linsearch.cpp ${opt}/linopt.cpp ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/Netgen *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/Netgen "${SRC};${HDR}") diff --git a/contrib/Tetgen/CMakeLists.txt b/contrib/Tetgen/CMakeLists.txt index 9e24e34c93..52a24fba3f 100644 --- a/contrib/Tetgen/CMakeLists.txt +++ b/contrib/Tetgen/CMakeLists.txt @@ -8,5 +8,5 @@ set(SRC predicates.cxx ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/Tetgen *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/Tetgen "${SRC};${HDR}") diff --git a/contrib/TetgenNew/CMakeLists.txt b/contrib/TetgenNew/CMakeLists.txt index 52b9c194e8..1293041291 100644 --- a/contrib/TetgenNew/CMakeLists.txt +++ b/contrib/TetgenNew/CMakeLists.txt @@ -19,5 +19,5 @@ set(SRC surface.cxx ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/TetgenNew *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/TetgenNew "${SRC};${HDR}") diff --git a/contrib/kbipack/CMakeLists.txt b/contrib/kbipack/CMakeLists.txt index 253ced8236..523dc33ff7 100644 --- a/contrib/kbipack/CMakeLists.txt +++ b/contrib/kbipack/CMakeLists.txt @@ -11,5 +11,5 @@ set(SRC mpz.cpp ) -file(GLOB_RECURSE HDR RELATIVE ${CMAKE_SOURCE_DIR}/contrib/kbipack *.h) +file(GLOB_RECURSE HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(contrib/kbipack "${SRC};${HDR}") diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 09ff8d8df8..21a83edd26 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -846,8 +846,10 @@ Set geometrical tolerance @ftable @code @item -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit +@item -refine +Perform uniform mesh refinement by subdivision, then exit @item -part int -Partition the mesh after batch mesh generation. +Partition the mesh after batch mesh generation @item -saveall Save all elements (discard physical group definitions) @item -o file @@ -3674,7 +3676,8 @@ element. By default, the first @var{tag} is the number of the physical entity to which the element belongs; the second is the number of the elementary geometrical entity to which the element belongs; the third is the number of mesh partitions to which the element belongs, followed by -the partition ids. A zero tag is equivalent to no tag. +the partition ids (negative partition ids indicate ghost cells). A zero +tag is equivalent to no tag. @item @var{node-number-list} is the list of the node numbers of the @var{n}-th element. The ordering of diff --git a/utils/api_demos/mainAntTweakBar.cpp b/utils/api_demos/mainAntTweakBar.cpp index 0e6a7ed6c0..299c777018 100644 --- a/utils/api_demos/mainAntTweakBar.cpp +++ b/utils/api_demos/mainAntTweakBar.cpp @@ -9,10 +9,10 @@ # include <GL/glut.h> #endif #include <AntTweakBar.h> -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> -#include <gmsh/drawContext.h> +#include "Gmsh.h" +#include "GModel.h" +#include "MElement.h" +#include "drawContext.h" static drawContext *ctx = 0; static mousePosition clickPos, prevPos; diff --git a/utils/api_demos/mainCartesian.cpp b/utils/api_demos/mainCartesian.cpp index be30ed48a5..ed1057e39e 100644 --- a/utils/api_demos/mainCartesian.cpp +++ b/utils/api_demos/mainCartesian.cpp @@ -1,13 +1,13 @@ -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MVertex.h> -#include <gmsh/cartesian.h> -#include <gmsh/MTriangle.h> -#include <gmsh/SOrientedBoundingBox.h> -#include <gmsh/Numeric.h> - -void insertBoxes ( double x, double y, double z, double EP, cartesianBox<double> &box){ - +#include "Gmsh.h" +#include "GModel.h" +#include "MVertex.h" +#include "cartesian.h" +#include "MTriangle.h" +#include "SOrientedBoundingBox.h" +#include "Numeric.h" + +void insertBoxes ( double x, double y, double z, double EP, cartesianBox<double> &box) +{ int id1 = box.index_of_element(x-EP,y-EP,z-EP); int id2 = box.index_of_element(x+EP,y+EP,z+EP); int i1,j1,k1; @@ -25,7 +25,8 @@ void insertBoxes ( double x, double y, double z, double EP, cartesianBox<double> } } -void test(){ +void test() +{ printf("enter z coordinate : "); double x,y,z=-1; scanf ("%lf",&z); @@ -49,11 +50,10 @@ void test(){ } fprintf(f,"};\n"); fclose(f); - } -int main (int argc,char *argv[]){ - +int main (int argc,char *argv[]) +{ // test(); // return 1; diff --git a/utils/api_demos/mainElasticity.cpp b/utils/api_demos/mainElasticity.cpp index 82b9655502..89ce6923b5 100644 --- a/utils/api_demos/mainElasticity.cpp +++ b/utils/api_demos/mainElasticity.cpp @@ -1,7 +1,7 @@ -#include <gmsh/Gmsh.h> -#include <gmsh/elasticitySolver.h> -#include <gmsh/PView.h> -#include <gmsh/PViewData.h> +#include "Gmsh.h" +#include "elasticitySolver.h" +#include "PView.h" +#include "PViewData.h" int main (int argc, char* argv[]){ diff --git a/utils/api_demos/mainGlut.cpp b/utils/api_demos/mainGlut.cpp index 8fcaa5bc37..67cb5f177d 100644 --- a/utils/api_demos/mainGlut.cpp +++ b/utils/api_demos/mainGlut.cpp @@ -7,10 +7,10 @@ #else # include <GL/glut.h> #endif -#include <Gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> -#include <Gmsh/drawContext.h> +#include "Gmsh.h" +#include "GModel.h" +#include "MElement.h" +#include "drawContext.h" drawContext *ctx = 0; diff --git a/utils/api_demos/mainHomology.cpp b/utils/api_demos/mainHomology.cpp index 00d7639c5c..201ca5a194 100644 --- a/utils/api_demos/mainHomology.cpp +++ b/utils/api_demos/mainHomology.cpp @@ -8,12 +8,11 @@ #include <stdio.h> #include <sstream> -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> -#include <gmsh/CellComplex.h> -//#include <gmsh/ChainComplex.h> -#include <gmsh/Homology.h> +#include "Gmsh.h" +#include "GModel.h" +#include "MElement.h" +#include "CellComplex.h" +#include "Homology.h" int main(int argc, char **argv) { diff --git a/utils/api_demos/mainLevelset.cpp b/utils/api_demos/mainLevelset.cpp index d37f3a0dd8..d6ca525fa3 100644 --- a/utils/api_demos/mainLevelset.cpp +++ b/utils/api_demos/mainLevelset.cpp @@ -1,18 +1,18 @@ -#include "../../contrib/DiscreteIntegration/Integration3D.h" -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> -#include <gmsh/MHexahedron.h> -#include <gmsh/MTetrahedron.h> -#include <gmsh/MQuadrangle.h> -#include <gmsh/MTriangle.h> -#include <gmsh/MLine.h> -#include "../../contrib/DiscreteIntegration/DILevelset.h" #include <time.h> #include <iostream> #include <queue> #include <limits> +#include "Gmsh.h" +#include "GModel.h" +#include "MElement.h" +#include "MHexahedron.h" +#include "MTetrahedron.h" +#include "MQuadrangle.h" +#include "MTriangle.h" +#include "MLine.h" +#include "Integration3D.h" +#include "DILevelset.h" #define PI 3.14159265 diff --git a/utils/api_demos/mainOcc.cpp b/utils/api_demos/mainOcc.cpp index 0f3459305a..e55e6c56ab 100644 --- a/utils/api_demos/mainOcc.cpp +++ b/utils/api_demos/mainOcc.cpp @@ -13,10 +13,10 @@ // -lTKMath -lTKernel -lm #include <stdio.h> -#include <gmsh/Gmsh.h> -#include <gmsh/GmshConfig.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> +#include "Gmsh.h" +#include "GmshConfig.h" +#include "GModel.h" +#include "MElement.h" #if !defined(HAVE_NO_OCC_CONFIG_H) #include "config.h" diff --git a/utils/api_demos/mainPost.cpp b/utils/api_demos/mainPost.cpp index 207b27c749..30ea994456 100644 --- a/utils/api_demos/mainPost.cpp +++ b/utils/api_demos/mainPost.cpp @@ -1,9 +1,9 @@ -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MVertex.h> -#include <gmsh/PView.h> -#include <gmsh/PViewData.h> -#include <gmsh/PluginManager.h> +#include "Gmsh.h" +#include "GModel.h" +#include "MVertex.h" +#include "PView.h" +#include "PViewData.h" +#include "PluginManager.h" int main(int argc, char **argv) { diff --git a/utils/api_demos/mainSimple.cpp b/utils/api_demos/mainSimple.cpp index bbeae79942..806daa8b4f 100644 --- a/utils/api_demos/mainSimple.cpp +++ b/utils/api_demos/mainSimple.cpp @@ -1,7 +1,7 @@ #include <stdio.h> -#include <gmsh/Gmsh.h> -#include <gmsh/GModel.h> -#include <gmsh/MElement.h> +#include "Gmsh.h" +#include "GModel.h" +#include "MElement.h" int main(int argc, char **argv) { -- GitLab