[SCM] Gmsh packaging. Gmsh is an automatic 3D finite element mesh generator. branch, master, updated. debian/2.5.1_beta2_svn11604_dfsg-4-4-gaf28db8

Anton Gladky gladky.anton at gmail.com
Mon Apr 9 14:54:43 UTC 2012


The following commit has been merged in the master branch:
commit 8a3ae338652cdcd9e2fa7daeb88c670ad07c8b04
Merge: 194ca02ade8078230c6c16f177e96b3aea9aa028 e864801c240feea5d85dce6072a9841941b0e19e
Author: Anton Gladky <gladky.anton at gmail.com>
Date:   Mon Apr 9 16:53:19 2012 +0200

    Merge tag 'upstream/2.5.1_beta2_svn11845_dfsg'
    
    Upstream version 2.5.1~beta2~svn11845~dfsg

diff --combined CMakeLists.txt
index 570439e,ff57b14..12de19e
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -19,8 -19,9 +19,9 @@@ project(gmsh CXX C
  # this variable controls the default value of the "ENABLE_XXX" options which are
  # normally set to ON (useful if you want to configure a minimal version of Gmsh:
  # e.g. "cmake -DDEFAULT=0 -DENABLE_POST=1 -DENABLE_PARSER=1")
- set(DEFAULT ON CACHE INTERNAL "Default value for options")
+ set(DEFAULT ON CACHE INTERNAL "Default value for enabled-by-default options")
  
+ option(ENABLE_3M "Enable 3M" OFF)
  option(ENABLE_ACIS "Enable ACIS geometrical models" ${DEFAULT})
  option(ENABLE_ANN "Enable ANN to compute Approximate Nearest Neighbors" ${DEFAULT})
  option(ENABLE_APP_BUNDLE "Create .app bundle on Mac when installing" ${DEFAULT})
@@@ -61,7 -62,7 +62,7 @@@ option(ENABLE_SLEPC "Enable SLEPc eigen
  option(ENABLE_SOLVER "Enable solver components" ${DEFAULT})
  option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ${DEFAULT})
  option(ENABLE_TETGEN "Enable Tetgen mesh generator" ${DEFAULT})
- option(ENABLE_TETGEN_NEW "Enable experimental version of Tetgen" OFF)
+ option(ENABLE_TETGEN_OLD "Use old version of Tetgen" OFF)
  option(ENABLE_VORO3D "Enable Voro3D" ${DEFAULT})
  option(ENABLE_WRAP_JAVA "Build Java wrappers" OFF)
  option(ENABLE_WRAP_PYTHON "Build Python wrappers" ${DEFAULT})
@@@ -93,14 -94,15 +94,15 @@@ set(GMSH_AP
      Geo/discreteFace.h Geo/discreteRegion.h Geo/SPoint2.h Geo/SPoint3.h
      Geo/SVector3.h Geo/STensor3.h Geo/SBoundingBox3d.h Geo/Pair.h Geo/Range.h 
      Geo/SOrientedBoundingBox.h Geo/CellComplex.h Geo/ChainComplex.h Geo/Cell.h
-     Geo/Homology.h Geo/partitionEdge.h Geo/CGNSOptions.h Geo/gmshLevelset.h
+     Geo/Homology.h Geo/Chain.h Geo/partitionEdge.h Geo/CGNSOptions.h Geo/gmshLevelset.h
    Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h Mesh/meshPartition.h
-     Mesh/meshGFaceDelaunayInsertion.h Mesh/simple3D.h Mesh/meshPartitionOptions.h Mesh/Voronoi3D.h Mesh/Levy3D.h Mesh/periodical.h
+     Mesh/meshGFaceDelaunayInsertion.h Mesh/simple3D.h Mesh/meshPartitionOptions.h 
+     Mesh/Voronoi3D.h Mesh/Levy3D.h Mesh/periodical.h
    Numeric/mathEvaluator.h
    Solver/dofManager.h Solver/femTerm.h Solver/laplaceTerm.h Solver/elasticityTerm.h
      Solver/crossConfTerm.h Solver/orthogonalTerm.h
      Solver/linearSystem.h Solver/linearSystemGMM.h Solver/linearSystemCSR.h 
-     Solver/linearSystemFull.h Solver/elasticitySolver.h
+     Solver/linearSystemFull.h Solver/elasticitySolver.h Solver/sparsityPattern.h 
    Post/PView.h Post/PViewData.h Plugin/PluginManager.h Post/OctreePost.h
    Graphics/drawContext.h
    contrib/kbipack/gmp_normal_form.h contrib/kbipack/gmp_matrix.h 
@@@ -141,6 -143,7 +143,7 @@@ endif(APPLE
  include(CheckTypeSize)
  include(CheckFunctionExists)
  include(CheckIncludeFile)
+ include(CheckCXXCompilerFlag)
  
  if(MSVC)
    # remove annoying warning about bool/int cast performance
@@@ -454,6 -457,12 +457,12 @@@ if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPH
      set_config_option(HAVE_MPEG_ENCODE "Mpeg")
    endif(ENABLE_MPEG_ENCODE)
  
+   if(ENABLE_3M AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/3M)
+     add_subdirectory(contrib/3M)
+     include_directories(contrib/3M)
+     set_config_option(HAVE_3M "3M")
+   endif(ENABLE_3M AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/3M)
+ 
    if(ENABLE_OSMESA)
      find_library(OSMESA_LIB OSMesa)
      if(OSMESA_LIB)
@@@ -594,17 -603,15 +603,15 @@@ if(HAVE_MESH
      set_config_option(HAVE_MMG3D "Mmg3d")
    endif(ENABLE_MMG3D)
  
-   if(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/TetgenNew/tetgen.h)
-     add_subdirectory(contrib/TetgenNew)
-     include_directories(contrib/TetgenNew)
-     set_config_option(HAVE_TETGEN "Tetgen(New)")
+   if(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.5/tetgen.h)
+     add_subdirectory(contrib/Tetgen1.5)
+     include_directories(contrib/Tetgen1.5)
+     set_config_option(HAVE_TETGEN "Tetgen(1.5)")
      add_definitions(-DTETLIBRARY)
-     message("WARNING: You are including an experimental version of Tetgen "
-             "that is KNOWN TO BE BUGGY on 64 bits archs and on WIN32/MSVC.")
-   elseif(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen/tetgen.h)
-     add_subdirectory(contrib/Tetgen)
-     include_directories(contrib/Tetgen)
-     set_config_option(HAVE_TETGEN "Tetgen")
+   elseif(ENABLE_TETGEN_OLD AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.4/tetgen.h)
+     add_subdirectory(contrib/Tetgen1.4)
+     include_directories(contrib/Tetgen1.4)
+     set_config_option(HAVE_TETGEN "Tetgen(1.4)")
      add_definitions(-DTETLIBRARY)
    elseif(ENABLE_TETGEN)
      find_library(TETGEN_LIB tet PATH_SUFFIXES lib)
@@@ -614,7 -621,7 +621,7 @@@
        list(APPEND EXTERNAL_INCLUDES ${TETGEN_INC})
        set_config_option(HAVE_TETGEN "Tetgen")
      endif(TETGEN_LIB AND TETGEN_INC)
-   endif(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/TetgenNew/tetgen.h)
+   endif(ENABLE_TETGEN AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/Tetgen1.5/tetgen.h)
    if(HAVE_TETGEN)
      message("WARNING: By including Tetgen you have to comply with Tetgen's "
              "special licensing requirements stated in contrib/Tetgen/LICENSE.")
@@@ -797,6 -804,15 +804,6 @@@ if(HAVE_SOLVER
  endif(HAVE_SOLVER)
  
  if(ENABLE_OCC)
 -  if(WIN32 OR CYGWIN)
 -    if(HAVE_64BIT_SIZE_T)
 -      set(OCC_SYS_NAME win64)
 -    else(HAVE_64BIT_SIZE_T)
 -      set(OCC_SYS_NAME win32)
 -    endif(HAVE_64BIT_SIZE_T)
 -  else(WIN32 OR CYGWIN)
 -    set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
 -  endif(WIN32 OR CYGWIN)
    set(OCC_LIBS_REQUIRED
        # subset of DataExchange
        TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase
@@@ -807,30 -823,6 +814,30 @@@
        TKBRep TKGeomBase TKG3d TKG2d
        # FoundationClasses
        TKAdvTools TKMath TKernel)
 +  # First try to detect OpenCascade Community Edition, based on CMake
 +  find_package(OCE QUIET COMPONENTS ${OCC_LIBS_REQUIRED})
 +  if(OCE_ALL_FOUND)
 +    list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS_REQUIRED})
 +    list(APPEND EXTERNAL_INCLUDES ${OCE_INCLUDE_DIRS})
 +    set_config_option(HAVE_OCC "OpenCascade(OCE)")
 +    add_definitions(-DHAVE_NO_OCC_CONFIG_H)
 +    if(HAVE_64BIT_SIZE_T)
 +      add_definitions(-D_OCC64)
 +    endif(HAVE_64BIT_SIZE_T)
 +    if(CYGWIN)
 +      list(APPEND EXTERNAL_LIBRARIES "winspool")
 +    elseif(MSVC)
 +      add_definitions(-DWNT)
 +    endif(CYGWIN)
 +  else(OCE_ALL_FOUND)
 +    if(OCE_FOUND)
 +      message(STATUS "Found OCE version ${OCE_VERSION}, but those libraries are missing: " ${OCE_MISSING_TOOLKITS})
 +    endif(OCE_FOUND)
 +    if(WIN32 OR CYGWIN)
 +      set(OCC_SYS_NAME win32)
 +    else(WIN32 OR CYGWIN)
 +      set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME})
 +    endif(WIN32 OR CYGWIN)
    list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED)
    set(OCC_LIBS)
    foreach(OCC ${OCC_LIBS_REQUIRED})
@@@ -867,7 -859,6 +874,7 @@@
        endif(NOT OCC_CONFIG_H)
      endif(OCC_INC)
    endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
 +  endif(OCE_ALL_FOUND)
    if(HAVE_OCC AND ENABLE_SALOME)
      add_subdirectory(contrib/Salome)
      include_directories(contrib/Salome)
@@@ -925,13 -916,6 +932,6 @@@ if(DLFCN_H
    list(APPEND EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS})
  endif(DLFCN_H)
  
- if(UNIX)
-   # do not optimize some files on Unix
-   file(GLOB_RECURSE NON_OPTIMIZED_SRC Common/GmshPredicates.cpp Mesh/BDS.cpp
-        Parser/Gmsh.tab.cpp contrib/Tetgen*/*.cxx)
-   set_source_files_properties(${NON_OPTIMIZED_SRC} COMPILE_FLAGS "-O0")
- endif(UNIX)
- 
  if(MSVC)
    add_definitions(-D_USE_MATH_DEFINES -DNOMINMAX 
                    -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)
@@@ -942,6 -926,13 +942,13 @@@ if(WIN32 OR CYGWIN
    list(APPEND EXTERNAL_LIBRARIES wsock32 ws2_32)
  endif(WIN32 OR CYGWIN)
  
+ check_cxx_compiler_flag("-O0" NOOPT)
+ if(NOOPT)
+   file(GLOB_RECURSE NON_OPTIMIZED_SRC Numeric/robustPredicates.cpp Mesh/BDS.cpp
+        Parser/Gmsh.tab.cpp contrib/Tetgen*/*.cxx)
+   set_source_files_properties(${NON_OPTIMIZED_SRC} COMPILE_FLAGS "-O0")
+ endif(NOOPT)
+ 
  list(SORT CONFIG_OPTIONS)
  set(GMSH_CONFIG_OPTIONS "")
  foreach(OPT ${CONFIG_OPTIONS})
@@@ -1015,7 -1006,7 +1022,7 @@@ endforeach(DIR
  # want to build the lib we need to recompile everything (the first
  # time--it's a separate target)
  add_library(lib STATIC EXCLUDE_FROM_ALL ${GMSH_SRC})
 -set_target_properties(lib PROPERTIES OUTPUT_NAME Gmsh)
 +set_target_properties(lib PROPERTIES OUTPUT_NAME gmsh)
  if(MSVC)
    set_target_properties(lib PROPERTIES DEBUG_POSTFIX d) 
    if(ENABLE_MSVC_STATIC_RUNTIME)
@@@ -1025,7 -1016,7 +1032,7 @@@ endif(MSVC
  
  # shared library target: we don't build it by default either
  add_library(shared SHARED EXCLUDE_FROM_ALL ${GMSH_SRC})
 -set_target_properties(shared PROPERTIES OUTPUT_NAME Gmsh)
 +set_target_properties(shared PROPERTIES OUTPUT_NAME gmsh1)
  if(HAVE_LAPACK AND LAPACK_FLAGS)
    set_target_properties(shared PROPERTIES LINK_FLAGS ${LAPACK_FLAGS})
  endif(HAVE_LAPACK AND LAPACK_FLAGS)
@@@ -1033,7 -1024,7 +1040,7 @@@ if(MSVC AND ENABLE_MSVC_STATIC_RUNTIME
    message("WARNING: By enabling ENABLE_MSVC_STATIC_RUNTIME, shared library wont link. "
            "Change in msvc /MT flag to /MD in the shared project properties")
  endif(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)		  
 -target_link_libraries(shared ${LINK_LIBRARIES})
 +target_link_libraries(shared ${LINK_LIBRARIES} -shared -lgl2ps -lGL -lglut)
  
  # binary targets
  if(HAVE_FLTK)
@@@ -1048,7 -1039,7 +1055,7 @@@ else(HAVE_FLTK
    add_executable(gmsh_dynamic EXCLUDE_FROM_ALL Common/Main.cpp)
    target_link_libraries(gmsh_dynamic shared)
  endif(HAVE_FLTK)
 -target_link_libraries(gmsh ${LINK_LIBRARIES})
 +target_link_libraries(gmsh ${LINK_LIBRARIES} -lgl2ps -lGL -lglut)
  
  # increase stack to 16Mb on Windows to avoid overflows in recursive
  # tet classification for large 3D Delaunay grids + force static
@@@ -1069,6 -1060,12 +1076,12 @@@ elseif(MSVC
    set_target_properties(gmsh PROPERTIES LINK_FLAGS "/STACK:16777216")
  endif(WIN32 AND NOT MSVC OR CYGWIN)
  
+ # force full warnings to encourage everybody to write clean(er) code
+ check_cxx_compiler_flag("-Wall" WALL)
+ if(WALL)
+   set_target_properties(gmsh lib shared PROPERTIES COMPILE_FLAGS "-Wall")
+ endif(WALL)
+ 
  find_program(BISON bison)
  find_program(FLEX flex)
  if(BISON AND FLEX)
@@@ -1090,7 -1087,7 +1103,7 @@@ if(UNIX
  endif(UNIX)
  
  set(WELCOME_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/WELCOME.txt)
 -set(LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/LICENSE.txt)
 +#set(LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/LICENSE.txt)
  set(CREDITS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/CREDITS.txt)
  file(GLOB TUTORIAL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tutorial/?*.*)
  file(GLOB DEMO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/demos/?*.*)
@@@ -1185,7 -1182,7 +1198,7 @@@ endif(TEXI2PDF
  if(MAKEINFO AND TEXI2PDF)
    add_custom_target(doc COMMAND ${CMAKE_COMMAND} -E tar zcf 
                      ${CMAKE_CURRENT_BINARY_DIR}/gmsh-${GMSH_VERSION}-doc.tgz
 -                    doc/CREDITS.txt doc/LICENSE.txt doc/VERSIONS.txt
 +                    doc/CREDITS.txt doc/VERSIONS.txt
                      doc/gmsh.1 doc/texinfo/gmsh.html doc/texinfo/gmsh.info 
                      doc/texinfo/gmsh.pdf doc/texinfo/gmsh.txt
                      COMMAND ${CMAKE_COMMAND} -E remove ${TEX_OBJ}
@@@ -1244,7 -1241,7 +1257,7 @@@ set(CPACK_SOURCE_GENERATOR TGZ
  set(CPACK_SOURCE_IGNORE_FILES "${CMAKE_CURRENT_BINARY_DIR}" "/CVS/" "/.svn" "~$" 
      "DS_Store$" "GmshConfig.h$" "GmshVersion.h$" "/benchmarks/" "/tmp/" 
      "/bin/" "/lib/" "/nightly/" "GPATH" "GRTAGS" "GSYMS" "GTAGS" "/HTML/" 
-     "/projects/" "/TetgenNew/") #"/Tetgen.*/.*(cxx|h)")
+     "/projects/")
  
  if(UNIX)
    # make sure we remove previous installs before doing the next one
diff --combined doc/texinfo/gmsh.texi
index 3939391,86018f0..3000d9c
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@@ -1398,7 -1398,7 +1398,7 @@@ contain floating point formatting chara
  etc.). The eigth case permits to use the value of a @var{char-option} as
  a @var{char-expression}. The ninth case gets the value of an environment
  variable from the operating system. The last case in the definition
 -allows to ask the user for a value interactively. The various
 +allows one to ask the user for a value interactively. The various
  @w{@var{char-option}s} are listed in @ref{Options}.
  
  Character expressions are mostly used to specify non-numeric options and
@@@ -2525,6 -2525,7 +2525,7 @@@ Show the entities listed in @var{expres
  Show the entity @var{char-expression}, if @code{General.VisibilityMode} is
  set to @code{0} or @code{1} (@var{char-expression} can for example be
  @code{"*"}).
+ 
  @end ftable
  
  @c -------------------------------------------------------------------------
@@@ -2921,7 -2922,7 +2922,7 @@@ above
  @item Extrude @{ Surface @{ @var{expression-list} @}; @var{layers} < Using Index[@var{expr}]; > < Using View[@var{expr}]; > @}
  Extrudes a boundary layer from the specified surfaces. If no view is
  specified, the boundary layer is created using gouraud-shaped (smoothed)
 -normal field. Specifying a boundary layer index allows to extrude
 +normal field. Specifying a boundary layer index allows one to extrude
  several independent boundary layers (with independent normal smoothing).
  
  @item Transfinite Line @{ @var{expression-list} @} | "*" = @var{expression} < Using Progression | Bump @var{expression} >;
@@@ -3023,6 -3024,20 +3024,20 @@@ Shows the mesh of the entity @var{char-
  Sets number of elliptic smoothing steps for the surfaces listed in
  @var{expression-list} (smoothing only applies to transfinite meshes at
  the moment).
+ 
+ @item Homology @{ @{ @var{expression-list} @}, @{ @var{expression-list} @} @};
+ Compute a basis representation for homology spaces after a mesh has
+ been generated. The first @var{expression-list} is a list of physical
+ groups that constitute the computation domain. The second
+ @var{expression-list} is a list of physical groups that constitute the
+ relative subdomain of relative homology computation; if empty,
+ absolute homology is computed. Resulting basis representation chains
+ are stored as physical groups in the mesh.
+ 
+ @item Cohomology @{ @{ @var{expression-list} @}, @{ @var{expression-list} @} @};
+ Similar to command @code{Homology}, but computes a basis representation
+ for cohomology spaces instead.
+ 
  @end ftable
  
  @c -------------------------------------------------------------------------
diff --combined utils/api_demos/mainElasticity.cpp
index 7268ca2,68236fc..3dacc53
--- a/utils/api_demos/mainElasticity.cpp
+++ b/utils/api_demos/mainElasticity.cpp
@@@ -3,7 -3,6 +3,7 @@@
  #include "elasticitySolver.h"
  #include "PView.h"
  #include "PViewData.h"
 +#include <cstring>
  
  void Info (int i, char* c){
    printf("%d %s\n",i,c);
@@@ -74,7 -73,7 +74,7 @@@ void GetSetFixations (elasticitySolver 
  }
  */
  
- void WhatToDoNow(int argc, char *argv[], int &solve, std::string &modelName)
+ void WhatToDoNow(int argc, char *argv[], int &solve, std::string &fileName)
  {
    int i =  1;
    solve = 1;
@@@ -124,7 -123,8 +124,8 @@@
        }
      }
      else {
-       modelName = std::string(argv[i]);
+       std::string modelName = std::string(argv[i]);
+       fileName=modelName.substr(0,modelName.find_last_of("."));  // remove extension
        //      if (modelName)
        //      modelName = modelName + std::string(".fuk");
        i++;

-- 
Gmsh packaging. Gmsh is an automatic 3D finite element mesh generator. 



More information about the debian-science-commits mailing list