diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..a6560e3da62ec3a8d29eadd9709fb69b6d7c0de9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,768 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +cmake_minimum_required(VERSION 2.6 FATAL_ERROR) + +# if CMAKE_BUILD_TYPE is specified use it; otherwise set the default +# build type to "RelWithDebInfo" ("-O2 -g" with gcc) prior to calling +# project() +if(DEFINED CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") +else(DEFINED CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type") +endif(DEFINED CMAKE_BUILD_TYPE) + +project(gmsh CXX C) + +option(ENABLE_ANN "Enable ANN to compute Approximate Nearest Neighbors" ON) +option(ENABLE_BLAS_LAPACK "Use BLAS/Lapack for basic linear algebra" ON) +option(ENABLE_CGNS "Enable CGNS mesh export" OFF) +option(ENABLE_CHACO "Enable Chaco mesh partitioner" ON) +option(ENABLE_DINTEGRATION "Enable discrete integration and levelsets" ON) +option(ENABLE_FLTK "Build FLTK GUI" ON) +option(ENABLE_FOURIER_MODEL "Enable Fourier geometrical models" OFF) +option(ENABLE_GMM "Enable GMM linear algebra solvers" ON) +option(ENABLE_GRAPHICS "Compile-in OpenGL graphics even if there is no GUI" OFF) +option(ENABLE_KBIPACK "Enable Kbipack for homology solver" ON) +option(ENABLE_MATH_EVAL "Enable MathEval expression parser" ON) +option(ENABLE_MED "Enable MED mesh and post-processing file formats" ON) +option(ENABLE_METIS "Enable Metis mesh partitioner" ON) +option(ENABLE_NATIVE_FILE_CHOOSER "Enable native file chooser in GUI" ON) +option(ENABLE_NETGEN "Enable Netgen mesh generator" ON) +option(ENABLE_OCC "Enable OpenCASCADE geometrical models" ON) +option(ENABLE_OSMESA "Use OSMesa for offscreen rendering" OFF) +option(ENABLE_PARSER "Build the GEO file parser" ON) +option(ENABLE_POST "Build the post-processing module" ON) +option(ENABLE_QT "Build QT GUI" OFF) +option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ON) +option(ENABLE_TETGEN "Enable Tetgen mesh generator" ON) +option(ENABLE_TETGEN_NEW "Enable experimental version of Tetgen" OFF) +option(ENABLE_TREE_BROWSER "Enable FLTK tree browser widget" ON) + +set(GMSH_MAJOR_VERSION 2) +set(GMSH_MINOR_VERSION 4) +set(GMSH_PATCH_VERSION 0) +set(GMSH_EXTRA_VERSION "" CACHE STRING "Gmsh extra version string") + +set(GMSH_VERSION "${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}") +set(GMSH_VERSION "${GMSH_VERSION}.${GMSH_PATCH_VERSION}${GMSH_EXTRA_VERSION}") +set(GMSH_SHORT_LICENSE "GNU General Public License") + +set(GMSH_API + ${CMAKE_BINARY_DIR}/Common/GmshConfig.h + ${CMAKE_BINARY_DIR}/Common/GmshVersion.h + Common/Gmsh.h Common/GmshDefines.h Common/GmshMessage.h Common/VertexArray.h + Numeric/Gauss.h Numeric/FunctionSpace.h Numeric/GmshMatrix.h + Numeric/gmshAssembler.h Numeric/gmshTermOfFormulation.h + Numeric/gmshLaplace.h Numeric/gmshElasticity.h Numeric/gmshLinearSystem.h + Numeric/gmshLinearSystemGmm.h Numeric/gmshLinearSystemFull.h + Numeric/gmshFunction.h + Geo/GModel.h Geo/GEntity.h Geo/GPoint.h Geo/GVertex.h Geo/GEdge.h + Geo/GFace.h Geo/GRegion.h Geo/GEdgeLoop.h Geo/GEdgeCompound.h + Geo/GFaceCompound.h Geo/GRegionCompound.h Geo/MVertex.h Geo/MEdge.h + Geo/MFace.h Geo/MElement.h Geo/MPoint.h Geo/MLine.h Geo/MTriangle.h + Geo/MQuadrangle.h Geo/MTetrahedron.h Geo/MHexahedron.h Geo/MPrism.h + Geo/MPyramid.h Geo/MElementCut.h Geo/discreteVertex.h Geo/discreteEdge.h + Geo/discreteFace.h Geo/discreteRegion.h Geo/SPoint2.h Geo/SPoint3.h + Geo/SVector3.h Geo/SBoundingBox3d.h Geo/Pair.h Geo/Range.h + Geo/SOrientedBoundingBox.h Geo/CellComplex.h Geo/ChainComplex.h + Post/PView.h Post/PViewData.h Plugin/PluginManager.h + Graphics/drawContext.h + contrib/kbipack/gmp_normal_form.h contrib/kbipack/gmp_matrix.h + contrib/kbipack/gmp_blas.h) + +execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE + OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND hostname OUTPUT_VARIABLE HOSTNAME + OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND whoami OUTPUT_VARIABLE PACKAGER + OUTPUT_STRIP_TRAILING_WHITESPACE) + +if(NOT DATE) + set(DATE "unknown") +endif(NOT DATE) +set(GMSH_DATE "${DATE}") + +if(NOT HOSTNAME) + set(HOSTNAME "unknown") +endif(NOT HOSTNAME) +set(GMSH_HOST "${HOSTNAME}") + +if(NOT PACKAGER) + set(PACKAGER "unknown") +endif(NOT PACKAGER) +set(GMSH_PACKAGER "${PACKAGER}") + +if(APPLE) + set(GMSH_OS "MacOSX") +elseif(CYGWIN) + set(GMSH_OS "Windows") +else(APPLE) + set(GMSH_OS "${CMAKE_SYSTEM_NAME}") +endif(APPLE) + +if(MSVC) + # remove really annoying (and stupid, and wrong) warning about + # bool/int cast performance in Visual C++ + set(GMSH_CONFIG_PRAGMAS "#pragma warning(disable:4800)") +endif(MSVC) + +macro(append_gmsh_src DIRECTORY_NAME SRC_FILES) + foreach(FILE ${SRC_FILES}) + list(APPEND LIST ${DIRECTORY_NAME}/${FILE}) + endforeach(FILE) + set(GMSH_SRC ${GMSH_SRC};${LIST} PARENT_SCOPE) +endmacro(append_gmsh_src) + +if(ENABLE_BLAS_LAPACK) + if(WIN32) + # on Windows first try to get the libs in CMAKE_PREFIX without + # further checks (useful for Visual C++ users who don't have a + # Fortran compiler, and who can just download our precompiled + # "gmsh-dep" package) + find_library(EASY_LAPACK lapack ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH) + find_library(EASY_BLAS blas ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH) + find_library(EASY_G2C g2c ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH) + find_library(EASY_GCC gcc ${CMAKE_PREFIX_PATH}/lib NO_DEFAULT_PATH) + if(EASY_LAPACK AND EASY_BLAS AND EASY_G2C AND EASY_GCC) + set(LAPACK_LIBRARIES ${EASY_LAPACK} ${EASY_BLAS} ${EASY_G2C} ${EASY_GCC}) + set(HAVE_BLAS TRUE) + set(HAVE_LAPACK TRUE) + list(APPEND CONFIG_OPTIONS "RefBlas" "RefLapack") + endif(EASY_LAPACK AND EASY_BLAS AND EASY_G2C AND EASY_GCC) + endif(WIN32) + if(NOT HAVE_BLAS OR NOT HAVE_LAPACK) + enable_language(Fortran) + find_package(BLAS) + if(BLAS_FOUND) + set(HAVE_BLAS TRUE) + list(APPEND CONFIG_OPTIONS "Blas") + find_package(LAPACK) + if(LAPACK_FOUND) + set(HAVE_LAPACK TRUE) + list(APPEND CONFIG_OPTIONS "Lapack") + else(LAPACK_FOUND) + set(LAPACK_LIBRARIES ${BLAS_LIBRARIES}) + endif(LAPACK_FOUND) + if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND NOT APPLE) + if(CMAKE_Fortran_COMPILER MATCHES "gfortran") + list(APPEND LAPACK_LIBRARIES gfortran) + elseif(CMAKE_Fortran_COMPILER MATCHES "f95") + list(APPEND LAPACK_LIBRARIES gfortran) + elseif(CMAKE_Fortran_COMPILER MATCHES "g77") + list(APPEND LAPACK_LIBRARIES g2c) + endif(CMAKE_Fortran_COMPILER MATCHES "gfortran") + endif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU" AND NOT APPLE) + endif(BLAS_FOUND) + endif(NOT HAVE_BLAS OR NOT HAVE_LAPACK) +endif(ENABLE_BLAS_LAPACK) + +add_subdirectory(Common) +add_subdirectory(Numeric) +add_subdirectory(Geo) +add_subdirectory(Mesh) + +if(ENABLE_POST) + add_subdirectory(Post) + add_subdirectory(Plugin) +else(ENABLE_POST) + set(HAVE_NO_POST TRUE) + list(APPEND CONFIG_OPTIONS "NoPost") +endif(ENABLE_POST) + +if(ENABLE_PARSER) + add_subdirectory(Parser) +else(ENABLE_PARSER) + set(HAVE_NO_PARSER TRUE) + list(APPEND CONFIG_OPTIONS "NoParser") +endif(ENABLE_PARSER) + +if(ENABLE_FLTK) + set(FLTK_SKIP_FORMS TRUE) + set(FLTK_SKIP_FLUID TRUE) + find_package(FLTK) + if(FLTK_FOUND) + set(HAVE_FLTK TRUE) + list(APPEND CONFIG_OPTIONS "Fltk") + list(APPEND EXTERNAL_INCLUDES ${FLTK_INCLUDE_DIR}) + add_subdirectory(Fltk) + if(ENABLE_NATIVE_FILE_CHOOSER) + add_subdirectory(contrib/NativeFileChooser) + set(HAVE_NATIVE_FILE_CHOOSER TRUE) + list(APPEND CONFIG_OPTIONS "NativeFileChooser") + add_definitions(-DFLTK1) + endif(ENABLE_NATIVE_FILE_CHOOSER) + if(ENABLE_TREE_BROWSER) + add_subdirectory(contrib/TreeBrowser) + set(HAVE_TREE_BROWSER TRUE) + list(APPEND CONFIG_OPTIONS "TreeBrowser") + endif(ENABLE_TREE_BROWSER) + endif(FLTK_FOUND) +elseif(ENABLE_QT) + find_package(Qt4) + set(QT_USE_QTOPENGL TRUE) + include(${QT_USE_FILE}) + if(QT_FOUND) + set(HAVE_QT TRUE) + list(APPEND CONFIG_OPTIONS "Qt") + list(APPEND EXTERNAL_INCLUDES ${QT_INCLUDE_DIR}) + add_subdirectory(Qt) + endif(QT_FOUND) +endif(ENABLE_FLTK) + +if(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS) + # get jpeg lib (if we have fltk first try to get the local jpeg lib) + if(HAVE_FLTK) + find_library(FLTK_JPEG fltk_jpeg) + if(NOT FLTK_JPEG) + find_library(FLTK_JPEG fltkjpeg) + endif(NOT FLTK_JPEG) + if(FLTK_JPEG) + set(HAVE_LIBJPEG TRUE) + list(APPEND CONFIG_OPTIONS "FltkJpeg") + list(APPEND EXTERNAL_LIBRARIES ${FLTK_JPEG}) + foreach(DIR ${FLTK_INCLUDE_DIR}) + list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/jpeg) + endforeach(DIR) + endif(FLTK_JPEG) + endif(HAVE_FLTK) + if(NOT FLTK_JPEG) + find_package(JPEG) + if(JPEG_FOUND) + set(HAVE_LIBJPEG TRUE) + list(APPEND CONFIG_OPTIONS "Jpeg") + list(APPEND EXTERNAL_LIBRARIES ${JPEG_LIBRARIES}) + list(APPEND EXTERNAL_INCLUDES ${JPEG_INCLUDE_DIR}) + endif(JPEG_FOUND) + endif(NOT FLTK_JPEG) + # get zlib (if we have fltk first try to get the local zlib) + if(HAVE_FLTK) + find_library(FLTK_Z fltk_z) + if(NOT FLTK_Z) + find_library(FLTK_Z fltkz) + endif(NOT FLTK_Z) + if(FLTK_Z) + set(HAVE_LIBZ TRUE) + list(APPEND CONFIG_OPTIONS "FltkZlib") + list(APPEND EXTERNAL_LIBRARIES ${FLTK_Z}) + foreach(DIR ${FLTK_INCLUDE_DIR}) + list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/zlib) + endforeach(DIR) + endif(FLTK_Z) + endif(HAVE_FLTK) + if(NOT FLTK_Z) + find_package(ZLIB) + if(ZLIB_FOUND) + set(HAVE_LIBZ TRUE) + list(APPEND CONFIG_OPTIONS "Zlib") + list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES}) + list(APPEND EXTERNAL_INCLUDES ${ZLIB_INCLUDE_DIR}) + endif(ZLIB_FOUND) + endif(NOT FLTK_Z) + # get png lib (if we have fltk first try to get the local png lib) + if(HAVE_LIBZ) + if(HAVE_FLTK) + find_library(FLTK_PNG fltk_png) + if(NOT FLTK_PNG) + find_library(FLTK_PNG fltkpng) + endif(NOT FLTK_PNG) + if(FLTK_PNG) + set(HAVE_LIBPNG TRUE) + list(APPEND CONFIG_OPTIONS "FltkPng") + list(APPEND EXTERNAL_LIBRARIES ${FLTK_PNG}) + foreach(DIR ${FLTK_INCLUDE_DIR}) + list(APPEND EXTERNAL_INCLUDES ${DIR}/FL/images ${DIR}/png) + endforeach(DIR) + endif(FLTK_PNG) + endif(HAVE_FLTK) + if(NOT FLTK_PNG) + find_package(PNG) + if(PNG_FOUND) + set(HAVE_LIBPNG TRUE) + list(APPEND CONFIG_OPTIONS "Png") + list(APPEND EXTERNAL_LIBRARIES ${PNG_LIBRARIES}) + list(APPEND EXTERNAL_INCLUDES ${PNG_INCLUDE_DIR}) + endif(PNG_FOUND) + endif(NOT FLTK_PNG) + endif(HAVE_LIBZ) + find_package(OpenGL REQUIRED) + add_subdirectory(Graphics) +endif(HAVE_FLTK OR HAVE_QT OR ENABLE_GRAPHICS) + +if(ENABLE_ANN) + add_subdirectory(contrib/ANN) + set(HAVE_ANN TRUE) + list(APPEND CONFIG_OPTIONS "Ann") +endif(ENABLE_ANN) + +if(ENABLE_CHACO) + add_subdirectory(contrib/Chaco) + set(HAVE_CHACO TRUE) + list(APPEND CONFIG_OPTIONS "Chaco") +endif(ENABLE_CHACO) + +if(ENABLE_DINTEGRATION) + add_subdirectory(contrib/DiscreteIntegration) + set(HAVE_DINTEGRATION TRUE) + list(APPEND CONFIG_OPTIONS "DIntegration") +endif(ENABLE_DINTEGRATION) + +if(ENABLE_GMM) + set(HAVE_GMM TRUE) + list(APPEND CONFIG_OPTIONS "Gmm") +endif(ENABLE_GMM) + +if(ENABLE_KBIPACK) + find_library(GMP_LIB gmp) + if(GMP_LIB) + add_subdirectory(contrib/kbipack) + set(HAVE_KBIPACK TRUE) + list(APPEND CONFIG_OPTIONS "Kbipack") + list(APPEND EXTERNAL_LIBRARIES ${GMP_LIB}) + endif(GMP_LIB) +endif(ENABLE_KBIPACK) + +if(ENABLE_MATH_EVAL) + add_subdirectory(contrib/MathEval) + set(HAVE_MATH_EVAL TRUE) + list(APPEND CONFIG_OPTIONS "MathEval") +endif(ENABLE_MATH_EVAL) + +if(ENABLE_METIS) + add_subdirectory(contrib/Metis) + set(HAVE_METIS TRUE) + list(APPEND CONFIG_OPTIONS "Metis") + message("WARNING: By including Metis you have to comply with Metis' " + "special licensing requirements stated in contrib/Metis/README.") +endif(ENABLE_METIS) + +if(ENABLE_NETGEN) + add_subdirectory(contrib/Netgen) + set(HAVE_NETGEN TRUE) + list(APPEND CONFIG_OPTIONS "Netgen") + add_definitions(-DNO_PARALLEL_THREADS) +endif(ENABLE_NETGEN) + +if(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_SOURCE_DIR}/contrib/TetgenNew/tetgen.h) + add_subdirectory(contrib/TetgenNew) + set(HAVE_TETGEN TRUE) + list(APPEND CONFIG_OPTIONS "TetgenNew") + 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_SOURCE_DIR}/contrib/Tetgen/tetgen.h) + add_subdirectory(contrib/Tetgen) + set(HAVE_TETGEN TRUE) + list(APPEND CONFIG_OPTIONS "Tetgen") + add_definitions(-DTETLIBRARY) + message("WARNING: By including Tetgen you have to comply with Tetgen's " + "special licensing requirements stated in contrib/Tetgen/LICENSE.") +endif(ENABLE_TETGEN_NEW AND EXISTS ${CMAKE_SOURCE_DIR}/contrib/TetgenNew/tetgen.h) + +if(ENABLE_FOURIER_MODEL) + find_library(FFTW3_LIB fftw3) + if(FFTW3_LIB) + find_library(FOURIER_MODEL_LIB FourierModel) + if(FOURIER_MODEL_LIB) + set(HAVE_FOURIER_MODEL TRUE) + list(APPEND CONFIG_OPTIONS "FourierModel") + list(APPEND EXTERNAL_LIBRARIES ${FOURIER_MODEL_LIB} ${FFTW3_LIB}) + endif(FOURIER_MODEL_LIB) + endif(FFTW3_LIB) +endif(ENABLE_FOURIER_MODEL) + +if(ENABLE_MED OR ENABLE_CGNS) + find_library(HDF5_LIB hdf5) + if(HDF5_LIB) + if(ENABLE_MED) + find_library(MED_LIB med) + if(MED_LIB) + set(HAVE_MED TRUE) + list(APPEND CONFIG_OPTIONS "Med") + list(APPEND EXTERNAL_LIBRARIES ${MED_LIB}) + endif(MED_LIB) + endif(ENABLE_MED) + if(ENABLE_CGNS) + find_library(CGNS_LIB cgns) + if(CGNS_LIB) + set(HAVE_LIBCGNS TRUE) + list(APPEND CONFIG_OPTIONS "Cgns") + list(APPEND EXTERNAL_LIBRARIES ${CGNS_LIB}) + endif(CGNS_LIB) + endif(ENABLE_CGNS) + if(MED_LIB OR CGNS_LIB) + list(APPEND EXTERNAL_LIBRARIES ${HDF5_LIB}) + find_library(SZ_LIB szlib) + if(SZ_LIB) + list(APPEND EXTERNAL_LIBRARIES ${SZ_LIB}) + endif(SZ_LIB) + if(NOT HAVE_LIBZ) # necessary for non-GUI builds + find_package(ZLIB) + if(ZLIB_FOUND) + set(HAVE_LIBZ TRUE) + list(APPEND CONFIG_OPTIONS "Zlib") + list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES}) + endif(ZLIB_FOUND) + endif(NOT HAVE_LIBZ) + endif(MED_LIB OR CGNS_LIB) + endif(HDF5_LIB) +endif(ENABLE_MED OR ENABLE_CGNS) + +if(ENABLE_TAUCS) + find_library(TAUCS_LIB taucs) + if(TAUCS_LIB) + set(HAVE_TAUCS TRUE) + list(APPEND CONFIG_OPTIONS "Taucs") + list(APPEND EXTERNAL_LIBRARIES ${TAUCS_LIB}) + endif(TAUCS_LIB) +endif(ENABLE_TAUCS) + +if(ENABLE_OCC) + if(WIN32) + set(OCC_SYS_NAME win32) + else(WIN32) + set(OCC_SYS_NAME ${CMAKE_SYSTEM_NAME}) + endif(WIN32) + set(OCC_LIBS_REQUIRED + # subset of DataExchange + TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase + # ModelingAlgorithms + TKOffset TKFeat TKFillet TKBool TKShHealing TKMesh TKHLR TKBO TKPrim + TKTopAlgo TKGeomAlgo + # ModelingData + TKBRep TKGeomBase TKG3d TKG2d + # FoundationClasses + TKAdvTools TKMath TKernel) + list(LENGTH OCC_LIBS_REQUIRED NUM_OCC_LIBS_REQUIRED) + set(OCC_LIBS) + foreach(OCC ${OCC_LIBS_REQUIRED}) + find_library(OCC_LIB ${OCC} PATHS ENV CASROOT PATH_SUFFIXES lib + ${OCC_SYS_NAME}/lib) + if(OCC_LIB) + list(APPEND OCC_LIBS ${OCC_LIB}) + endif(OCC_LIB) + unset(OCC_LIB CACHE) + endforeach(OCC) + list(LENGTH OCC_LIBS NUM_OCC_LIBS) + if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED) + find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc + include opencascade) + if(OCC_INC) + set(HAVE_OCC TRUE) + list(APPEND CONFIG_OPTIONS "OpenCascade") + list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS}) + list(APPEND EXTERNAL_INCLUDES ${OCC_INC}) + if(CYGWIN) + list(APPEND EXTERNAL_LIBRARIES "winspool") + elseif(MSVC) + add_definitions(-DHAVE_NO_OCC_CONFIG_H -DWNT) + endif(CYGWIN) + endif(OCC_INC) + endif(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED) +endif(ENABLE_OCC) + +if(ENABLE_OSMESA) + find_library(OSMESA_LIB OSMesa) + if(OSMESA_LIB) + set(HAVE_OSMESA TRUE) + list(APPEND CONFIG_OPTIONS "OSMesa") + list(APPEND EXTERNAL_LIBRARIES ${OSMESA_LIB}) + endif(OSMESA_LIB) +endif(ENABLE_OSMESA) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(HAVE_64BIT_SIZE_T TRUE) + list(APPEND CONFIG_OPTIONS "Have64BitSizeT") + if(HAVE_OCC) + add_definitions(-D_OCC64) + endif(HAVE_OCC) +endif(CMAKE_SIZEOF_VOID_P EQUAL 8) + +set(HAVE_NO_DLL TRUE) +list(APPEND CONFIG_OPTIONS "NoDll") + +include(CheckFunctionExists) +check_function_exists(vsnprintf HAVE_VSNPRINTF) +if(NOT HAVE_VSNPRINTF) + set(HAVE_NO_VSNPRINTF TRUE) + list(APPEND CONFIG_OPTIONS "NoVsnprintf") +endif(NOT HAVE_VSNPRINTF) + +include(CheckIncludeFile) +check_include_file(sys/socket.h HAVE_SYS_SOCKET_H) +if(HAVE_SYS_SOCKET_H) + set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) +endif(HAVE_SYS_SOCKET_H) +include(CheckTypeSize) +check_type_size(socklen_t SOCKLEN_T_SIZE) +if(NOT SOCKLEN_T_SIZE) + set(HAVE_NO_SOCKLEN_T TRUE) + list(APPEND CONFIG_OPTIONS "NoSocklenT") +endif(NOT SOCKLEN_T_SIZE) +set(CMAKE_EXTRA_INCLUDE_FILES) + +if(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) + set(GMSH_SRC ${GMSH_SRC};Fltk/Win32Icon.rc) +endif(MSVC) + +list(SORT CONFIG_OPTIONS) +set(GMSH_CONFIG_OPTIONS "") +foreach(OPT ${CONFIG_OPTIONS}) + set(GMSH_CONFIG_OPTIONS "${GMSH_CONFIG_OPTIONS} ${OPT}") +endforeach(OPT) + +configure_file(${CMAKE_SOURCE_DIR}/Common/GmshConfig.h.in + ${CMAKE_BINARY_DIR}/Common/GmshConfig.h) +configure_file(${CMAKE_SOURCE_DIR}/Common/GmshVersion.h.in + ${CMAKE_BINARY_DIR}/Common/GmshVersion.h) + +# process cmake environment variables so we can append them to the -I +# include commands. This is not recommended (we should only use the +# cache variables) but it is very convenient: otherwise we have to +# remember providing the -D... options to cmake for each new build. +set(ENV_CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) +set(ENV_CMAKE_INCLUDE_PATH $ENV{CMAKE_INCLUDE_PATH}) +if(UNIX) + if(ENV_CMAKE_PREFIX_PATH) + string(REPLACE ":" ";" ENV_CMAKE_PREFIX_PATH ${ENV_CMAKE_PREFIX_PATH}) + endif(ENV_CMAKE_PREFIX_PATH) + if(ENV_CMAKE_INCLUDE_PATH) + string(REPLACE ":" ";" ENV_CMAKE_INCLUDE_PATH ${ENV_CMAKE_INCLUDE_PATH}) + endif(ENV_CMAKE_INCLUDE_PATH) +endif(UNIX) +list(APPEND EXTERNAL_INCLUDES ${CMAKE_INCLUDE_PATH} ${ENV_CMAKE_INCLUDE_PATH}) +list(APPEND EXTERNAL_INCLUDES ${CMAKE_PREFIX_PATH} ${ENV_CMAKE_PREFIX_PATH}) +foreach(DIR ${CMAKE_PREFIX_PATH} ${ENV_CMAKE_PREFIX_PATH}) + list(APPEND EXTERNAL_INCLUDES ${DIR}/include) +endforeach(DIR) + +if(EXTERNAL_INCLUDES) + list(REMOVE_DUPLICATES EXTERNAL_INCLUDES) +endif(EXTERNAL_INCLUDES) + +# we could specify include dirs more selectively, but this is simpler +include_directories(Common Fltk Geo Graphics Mesh Numeric Parser Plugin + Post Qt contrib/ANN/include contrib/Chaco/main contrib/DiscreteIntegration + contrib/MathEval contrib/Metis contrib/NativeFileChooser + contrib/Netgen contrib/Netgen/libsrc/include contrib/Netgen/libsrc/interface + contrib/Tetgen contrib/TreeBrowser contrib/gmm contrib/kbipack + ${EXTERNAL_INCLUDES} ${CMAKE_BINARY_DIR}/Common) + +# we don't build the lib by default (we could then create the gmsh +# target by linking with it) because doing so slows down the +# compile/link development a lot: running ranlib+ar on a large static +# lib every time we recompile is frustratingly slow. Instead, we build +# the gmsh target directly from the object files. This is much faster +# but has one side effect: when we actually 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) +if(HAVE_FLTK) + add_executable(gmsh WIN32 Fltk/Main.cpp ${GMSH_SRC}) + target_link_libraries(gmsh ${FLTK_LIBRARIES} ${EXTERNAL_LIBRARIES} + ${OPENGL_LIBRARIES} ${LAPACK_LIBRARIES}) +elseif(HAVE_QT) + qt4_wrap_cpp(GMSH_MOC_SRC ${GMSH_MOC_HDR}) + add_executable(gmsh WIN32 Qt/Main.cpp ${GMSH_SRC} ${GMSH_MOC_SRC}) + target_link_libraries(gmsh ${QT_LIBRARIES} ${EXTERNAL_LIBRARIES} + ${OPENGL_LIBRARIES} ${LAPACK_LIBRARIES}) +else(HAVE_FLTK) + add_executable(gmsh Common/Main.cpp ${GMSH_SRC}) + target_link_libraries(gmsh ${EXTERNAL_LIBRARIES} ${LAPACK_LIBRARIES}) +endif(HAVE_FLTK) + +# increase stack to 16Mb on Windows to avoid overflows in recursive +# tet classification for large 3D Delaunay grids +if(CYGWIN) + set_target_properties(gmsh PROPERTIES LINK_FLAGS + "-Wl,--stack,16777216 ${CMAKE_SOURCE_DIR}/Fltk/Win32Icon.res -mwindows") +elseif(MSVC) + set_target_properties(gmsh PROPERTIES LINK_FLAGS "/STACK:16777216") +endif(CYGWIN) + +find_program(BISON bison) +find_program(FLEX flex) +if(BISON AND FLEX) + add_custom_target(parser + COMMAND ${BISON} -p gmsh_yy --output Gmsh.tab.cpp -d Gmsh.y + COMMAND ${FLEX} -P gmsh_yy -o Gmsh.yy.cpp Gmsh.l + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Parser) +endif(BISON AND FLEX) + +if(UNIX) + add_custom_target(purge COMMAND ${CMAKE_SOURCE_DIR}/utils/misc/purge.sh + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +endif(UNIX) + +set(WELCOME_FILE ${CMAKE_SOURCE_DIR}/doc/WELCOME.txt) +set(LICENSE_FILE ${CMAKE_SOURCE_DIR}/doc/LICENSE.txt) +set(CREDITS_FILE ${CMAKE_SOURCE_DIR}/doc/CREDITS.txt) +file(GLOB TUTORIAL_FILES ${CMAKE_SOURCE_DIR}/tutorial/*.*) +file(GLOB DEMO_FILES ${CMAKE_SOURCE_DIR}/demos/*.*) +set(TEX_DIR ${CMAKE_SOURCE_DIR}/doc/texinfo) +file(GLOB TEX_SRC ${TEX_DIR}/*.texi) +set(TEX_OBJ ${TEX_DIR}/gmsh.aux ${TEX_DIR}/gmsh.cp ${TEX_DIR}/gmsh.cps + ${TEX_DIR}/gmsh.fn ${TEX_DIR}/gmsh.html ${TEX_DIR}/gmsh.info ${TEX_DIR}/gmsh.ky + ${TEX_DIR}/gmsh.log ${TEX_DIR}/gmsh.pdf ${TEX_DIR}/gmsh.pg ${TEX_DIR}/gmsh.toc + ${TEX_DIR}/gmsh.tp ${TEX_DIR}/gmsh.tps ${TEX_DIR}/gmsh.txt ${TEX_DIR}/gmsh.vr) + +macro(unix2dos VARNAME) + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/unix2dos) + set(UNIX2DOS_FILES) + foreach(FILE ${${VARNAME}}) + file(READ ${FILE} F0) + string(REGEX REPLACE "\n" "\r\n" F1 "${F0}") + get_filename_component(N ${FILE} NAME) + file(WRITE ${CMAKE_BINARY_DIR}/unix2dos/${N} "${F1}") + list(APPEND UNIX2DOS_FILES ${CMAKE_BINARY_DIR}/unix2dos/${N}) + endforeach(FILE) + set(${VARNAME} ${UNIX2DOS_FILES}) +endmacro(unix2dos) + +if(WIN32) + set(GMSH_BIN .) + set(GMSH_DOC .) + unix2dos(GMSH_API) + unix2dos(WELCOME_FILE) + unix2dos(LICENSE_FILE) + unix2dos(CREDITS_FILE) + unix2dos(TUTORIAL_FILES) + unix2dos(DEMO_FILES) +else(WIN32) + set(GMSH_BIN bin) + set(GMSH_DOC share/doc/gmsh) +endif(WIN32) + +# mark targets as optional so we can install them separately if needed +# (e.g. "make lib" followed by "make install/fast") +install(TARGETS gmsh RUNTIME DESTINATION ${GMSH_BIN} OPTIONAL) +install(TARGETS lib ARCHIVE DESTINATION lib OPTIONAL) +install(FILES ${GMSH_API} DESTINATION include/gmsh) +install(FILES ${WELCOME_FILE} DESTINATION ${GMSH_DOC} RENAME README.txt) +install(FILES ${LICENSE_FILE} DESTINATION ${GMSH_DOC}) +install(FILES ${CREDITS_FILE} DESTINATION ${GMSH_DOC}) +install(FILES ${TUTORIAL_FILES} DESTINATION ${GMSH_DOC}/tutorial) +install(FILES ${DEMO_FILES} DESTINATION ${GMSH_DOC}/demos) +if(UNIX AND NOT CYGWIN) + install(FILES ${CMAKE_SOURCE_DIR}/doc/gmsh.1 DESTINATION share/man/man1) +endif(UNIX AND NOT CYGWIN) + +find_program(MAKEINFO makeinfo) +if(MAKEINFO) + add_custom_command(OUTPUT ${TEX_DIR}/gmsh.info DEPENDS ${TEX_SRC} + COMMAND ${MAKEINFO} --split-size 1000000 + ARGS ${TEX_DIR}/gmsh.texi WORKING_DIRECTORY ${TEX_DIR}) + add_custom_target(info DEPENDS ${TEX_DIR}/gmsh.info) + add_custom_command(OUTPUT ${TEX_DIR}/gmsh.txt DEPENDS ${TEX_SRC} + COMMAND ${MAKEINFO} --plaintext -o gmsh.txt + ARGS ${TEX_DIR}/gmsh.texi WORKING_DIRECTORY ${TEX_DIR}) + add_custom_target(txt DEPENDS ${TEX_DIR}/gmsh.txt) + add_custom_command(OUTPUT ${TEX_DIR}/gmsh.html DEPENDS ${TEX_SRC} + COMMAND ${MAKEINFO} --html --no-split + ARGS ${TEX_DIR}/gmsh.texi WORKING_DIRECTORY ${TEX_DIR}) + add_custom_target(html DEPENDS ${TEX_DIR}/gmsh.html) + install(FILES ${TEX_DIR}/gmsh.html DESTINATION ${GMSH_DOC} OPTIONAL) +endif(MAKEINFO) + +find_program(TEXI2PDF texi2pdf) +if(TEXI2PDF) + add_custom_command(OUTPUT ${TEX_DIR}/gmsh.pdf DEPENDS ${TEX_SRC} + COMMAND ${TEXI2PDF} ARGS ${TEX_DIR}/gmsh.texi + WORKING_DIRECTORY ${TEX_DIR}) + add_custom_target(pdf DEPENDS ${TEX_DIR}/gmsh.pdf) + install(FILES ${TEX_DIR}/gmsh.pdf DESTINATION ${GMSH_DOC} OPTIONAL) +endif(TEXI2PDF) + +if(MAKEINFO AND TEXI2PDF) + add_custom_target(doc COMMAND ${CMAKE_COMMAND} -E tar zcf + ${CMAKE_BINARY_DIR}/gmsh-${GMSH_VERSION}-doc.tgz + FAQ.txt CREDITS.txt VERSIONS.txt gmsh.1 + texinfo/gmsh.info texinfo/gmsh.txt texinfo/gmsh.html + texinfo/gmsh.pdf DEPENDS ${TEX_DIR}/gmsh.info + ${TEX_DIR}/gmsh.txt ${TEX_DIR}/gmsh.html ${TEX_DIR}/gmsh.pdf + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doc) +endif(MAKEINFO AND TEXI2PDF) + +if(MAKEINFO OR TEXI2PDF) + add_custom_target(clean_doc COMMAND ${CMAKE_COMMAND} -E remove ${TEX_OBJ}) +endif(MAKEINFO OR TEXI2PDF) + +set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine and Jean-Francois Remacle") +set(CPACK_PACKAGE_VERSION_MAJOR ${GMSH_MAJOR_VERSION}) +set(CPACK_PACKAGE_VERSION_MINOR ${GMSH_MINOR_VERSION}) +set(CPACK_PACKAGE_VERSION_PATCH ${GMSH_PATCH_VERSION}) +set(CPACK_PACKAGE_DESCRIPTION_FILE ${WELCOME_FILE}) +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "3D finite element mesh generator with built-in CAD engine and post-processor") +set(CPACK_PACKAGE_FILE_NAME gmsh-${GMSH_VERSION}-${GMSH_OS}) +set(CPACK_PACKAGE_INSTALL_DIRECTORY "Gmsh") +set(CPACK_RESOURCE_FILE_LICENSE ${LICENSE_FILE}) +set(CPACK_RESOURCE_FILE_README ${WELCOME_FILE}) +set(CPACK_RESOURCE_FILE_WELCOME ${WELCOME_FILE}) +set(CPACK_PACKAGE_EXECUTABLE "gmsh;Gmsh") +set(CPACK_STRIP_FILES TRUE) + +set(CPACK_SOURCE_PACKAGE_FILE_NAME gmsh-${GMSH_VERSION}-source) +set(CPACK_SOURCE_GENERATOR TGZ) +set(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/.svn" "~$" "DS_Store$" + "GmshConfig.h$" "GmshVersion.h$" "/benchmarks/" "/tmp/" "/bin/" "/lib/" + "/nightly/") # "/Tetgen.*/.*(cxx|h)") + +# make sure we remove previous installs before doing the next one +# (make package; make package_source can lead to huge file lists +# getting generated due to the Applications symlink in the bundle) +set(CPACK_INSTALL_COMMANDS + "${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/_CPack_Packages") + +if(APPLE) + set(CPACK_GENERATOR Bundle) + set(CPACK_BUNDLE_NAME Gmsh) + set(CPACK_BUNDLE_PLIST ${CMAKE_SOURCE_DIR}/utils/misc/Info.plist) + set(CPACK_BUNDLE_ICON ${CMAKE_SOURCE_DIR}/Fltk/MacIcons.icns) + set(CPACK_BUNDLE_STARTUP_COMMAND ${CMAKE_SOURCE_DIR}/utils/misc/gmsh_bundle.sh) + install(FILES ${CMAKE_SOURCE_DIR}/Fltk/MacIconsGeo.icns DESTINATION . + RENAME GmshGeo.icns) + install(FILES ${CMAKE_SOURCE_DIR}/Fltk/MacIconsMsh.icns DESTINATION . + RENAME GmshMsh.icns) + install(FILES ${CMAKE_SOURCE_DIR}/Fltk/MacIconsPos.icns DESTINATION . + RENAME GmshPos.icns) + set(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/Fltk/MacIcons.icns) +elseif(WIN32) + set(CPACK_GENERATOR ZIP) +else(APPLE) + set(CPACK_GENERATOR TGZ) +endif(APPLE) + +include(CPack) + +message("") +message("Gmsh has been configured for ${GMSH_OS} with the " + "following options:" ${GMSH_CONFIG_OPTIONS}) +message("") +message("C compiler: " ${CMAKE_C_COMPILER}) +message("C++ compiler: " ${CMAKE_CXX_COMPILER}) +if(NOT CMAKE_BUILD_TYPE) + message("C compiler flags: " ${CMAKE_C_FLAGS}) + message("C++ compiler flags: " ${CMAKE_CXX_FLAGS}) +else(NOT CMAKE_BUILD_TYPE) + message("Build type: " ${CMAKE_BUILD_TYPE}) +endif(NOT CMAKE_BUILD_TYPE) +message("Install prefix: " ${CMAKE_INSTALL_PREFIX}) +message("") +message("Run 'ccmake ${CMAKE_SOURCE_DIR}' to fine-tune the configuration.") +message("") + +mark_as_advanced(BISON EASY_BLAS EASY_G2C EASY_GCC EASY_LAPACK ENABLE_GRAPHICS + FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO MED_LIB + OCC_INC SZ_LIB TAUCS_LIB TEXI2PDF) diff --git a/Common/CMakeLists.txt b/Common/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..232e364d82600ec535e7b236aded95074e5dda05 --- /dev/null +++ b/Common/CMakeLists.txt @@ -0,0 +1,26 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Gmsh.cpp + GmshMessage.cpp + GmshDaemon.cpp + Context.cpp + Options.cpp + CommandLine.cpp + OS.cpp + OpenFile.cpp + CreateFile.cpp + VertexArray.cpp + SmoothData.cpp + Octree.cpp + OctreeInternals.cpp + StringUtils.cpp + ListUtils.cpp + TreeUtils.cpp avl.cpp + MallocUtils.cpp +) + +append_gmsh_src(Common "${SRC}") diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 9c52ec88eac9e4789ab628c23c8c3fa5123e12bb..9a9ce301010e430fcc35a3c952eee640958e43d8 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -138,7 +138,7 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->solver.socketName = argv[i++]; else - Msg::Fatal("Missing string"); + Msg::Fatal("Missing string"); CTX::instance()->batch = -3; } else if(!strcmp(argv[i] + 1, "")) { @@ -176,7 +176,7 @@ void GetOptions(int argc, char *argv[]) opt_mesh_partition_num(0, GMSH_SET, atoi(argv[i++])); } else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "new")) { CTX::instance()->files.push_back("-new"); @@ -228,42 +228,42 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) ParseString(argv[i++]); else - Msg::Fatal("Missing string"); + Msg::Fatal("Missing string"); } else if(!strcmp(argv[i] + 1, "option")) { i++; if(argv[i]) ParseFile(argv[i++], true); else - Msg::Fatal("Missing file name"); + Msg::Fatal("Missing file name"); } else if(!strcmp(argv[i] + 1, "o")) { i++; if(argv[i]) CTX::instance()->outputFileName = argv[i++]; else - Msg::Fatal("Missing file name"); + Msg::Fatal("Missing file name"); } else if(!strcmp(argv[i] + 1, "bgm")) { i++; if(argv[i]) - CTX::instance()->bgmFileName = argv[i++]; - else - Msg::Fatal("Missing file name"); + CTX::instance()->bgmFileName = argv[i++]; + else + Msg::Fatal("Missing file name"); } else if(!strcmp(argv[i] + 1, "nw")) { i++; if(argv[i]) CTX::instance()->numWindows = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "nt")) { i++; if(argv[i]) CTX::instance()->numTiles = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "convert")) { i++; @@ -287,69 +287,69 @@ void GetOptions(int argc, char *argv[]) } i++; } - Msg::Exit(0); + Msg::Exit(0); } else if(!strcmp(argv[i] + 1, "tol")) { i++; if(argv[i]) CTX::instance()->geom.tolerance = atof(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "match")) { - i++; - if(argv[1]) - CTX::instance()->geom.matchGeomAndMesh = atoi(argv[i++]); - else - Msg::Fatal("Missing number"); + i++; + if(argv[1]) + CTX::instance()->geom.matchGeomAndMesh = atoi(argv[i++]); + else + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "scale")) { i++; if(argv[i]) CTX::instance()->geom.scalingFactor = atof(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "meshscale")) { i++; if(argv[i]) CTX::instance()->mesh.scalingFactor = atof(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "rand")) { i++; if(argv[i]) CTX::instance()->mesh.randFactor = atof(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "clscale")) { i++; if(argv[i]) { CTX::instance()->mesh.lcFactor = atof(argv[i++]); if(CTX::instance()->mesh.lcFactor <= 0.0) - Msg::Fatal("Characteristic length factor must be > 0"); + Msg::Fatal("Characteristic length factor must be > 0"); } else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "clmin")) { i++; if(argv[i]) { CTX::instance()->mesh.lcMin = atof(argv[i++]); if(CTX::instance()->mesh.lcMin <= 0.0) - Msg::Fatal("Minimum length size must be > 0"); + Msg::Fatal("Minimum length size must be > 0"); } else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "clmax")) { i++; if(argv[i]) { CTX::instance()->mesh.lcMax = atof(argv[i++]); if(CTX::instance()->mesh.lcMax <= 0.0) - Msg::Fatal("Maximum length size must be > 0"); + Msg::Fatal("Maximum length size must be > 0"); } else Msg::Fatal("Missing number"); @@ -359,7 +359,7 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) { CTX::instance()->mesh.toleranceEdgeLength = atof(argv[i++]); if(CTX::instance()->mesh.toleranceEdgeLength <= 0.0) - Msg::Fatal("Tolerance for model edge length must be > 0 (here %g)", + Msg::Fatal("Tolerance for model edge length must be > 0 (here %g)", CTX::instance()->mesh.toleranceEdgeLength); } else @@ -370,20 +370,20 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) { CTX::instance()->mesh.lcIntegrationPrecision = atof(argv[i++]); if(CTX::instance()->mesh.lcIntegrationPrecision <= 0.0) - Msg::Fatal("Integration accuracy must be > 0"); + Msg::Fatal("Integration accuracy must be > 0"); } else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "swapangle")) { i++; if(argv[i]) { CTX::instance()->mesh.allowSwapEdgeAngle = atof(argv[i++]); if(CTX::instance()->mesh.allowSwapEdgeAngle <= 0.0) - Msg::Fatal("Treshold angle for edge swap must be > 0"); + Msg::Fatal("Treshold angle for edge swap must be > 0"); } else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "clcurv")) { CTX::instance()->mesh.lcFromCurvature = 1; @@ -394,21 +394,21 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->mesh.nbSmoothing = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "order") || !strcmp(argv[i] + 1, "degree")) { i++; if(argv[i]) opt_mesh_order(0, GMSH_SET, atof(argv[i++])); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "numsubedges")) { i++; if(argv[i]) opt_mesh_num_sub_edges(0, GMSH_SET, atof(argv[i++])); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "statreport")) { i++; @@ -416,7 +416,7 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->meshStatReportFileName = argv[i++]; else - Msg::Fatal("Missing argument"); + Msg::Fatal("Missing argument"); } else if(!strcmp(argv[i] + 1, "append_statreport")) { i++; @@ -424,7 +424,7 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->meshStatReportFileName = argv[i++]; else - Msg::Fatal("Missing argument"); + Msg::Fatal("Missing argument"); } else if(!strcmp(argv[i] + 1, "optimize_hom")) { i++; @@ -462,11 +462,11 @@ void GetOptions(int argc, char *argv[]) else if(!strcmp(argv[i], "med")) CTX::instance()->mesh.format = FORMAT_MED; else - Msg::Fatal("Unknown mesh format"); + Msg::Fatal("Unknown mesh format"); i++; } else - Msg::Fatal("Missing format"); + Msg::Fatal("Missing format"); } else if(!strcmp(argv[i] + 1, "bin")) { i++; @@ -492,11 +492,11 @@ void GetOptions(int argc, char *argv[]) else if(!strncmp(argv[i], "front3d", 7) || !strncmp(argv[i], "netgen", 6)) CTX::instance()->mesh.algo3d = ALGO_3D_FRONTAL; else - Msg::Fatal("Unknown mesh algorithm"); + Msg::Fatal("Unknown mesh algorithm"); i++; } else - Msg::Fatal("Missing algorithm"); + Msg::Fatal("Missing algorithm"); } else if(!strcmp(argv[i] + 1, "listen")) { CTX::instance()->solver.listen = 1; @@ -504,7 +504,7 @@ void GetOptions(int argc, char *argv[]) } else if(!strcmp(argv[i] + 1, "version") || !strcmp(argv[i] + 1, "-version")) { fprintf(stderr, "%s\n", GMSH_VERSION); - Msg::Exit(0); + Msg::Exit(0); } else if(!strcmp(argv[i] + 1, "info") || !strcmp(argv[i] + 1, "-info")) { fprintf(stderr, "Version : %s\n", GMSH_VERSION); @@ -522,20 +522,20 @@ void GetOptions(int argc, char *argv[]) fprintf(stderr, "Packager : %s\n", GMSH_PACKAGER); fprintf(stderr, "Web site : http://www.geuz.org/gmsh/\n"); fprintf(stderr, "Mailing list : gmsh@geuz.org\n"); - Msg::Exit(0); + Msg::Exit(0); } else if(!strcmp(argv[i] + 1, "help") || !strcmp(argv[i] + 1, "-help")) { fprintf(stderr, "Gmsh, a 3D mesh generator with pre- and post-processing facilities\n"); fprintf(stderr, "Copyright (C) 1997-2009 Christophe Geuzaine and Jean-Francois Remacle\n"); PrintUsage(argv[0]); - Msg::Exit(0); + Msg::Exit(0); } else if(!strcmp(argv[i] + 1, "v")) { i++; if(argv[i]) - Msg::SetVerbosity(atoi(argv[i++])); + Msg::SetVerbosity(atoi(argv[i++])); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } #if defined(HAVE_FLTK) else if(!strcmp(argv[i] + 1, "term")) { @@ -559,7 +559,7 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->post.link = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "smoothview")) { CTX::instance()->post.smooth = 1; @@ -578,28 +578,28 @@ void GetOptions(int argc, char *argv[]) if(argv[i]) CTX::instance()->fontSize = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "deltafontsize")) { i++; if(argv[i]) CTX::instance()->deltaFontSize = atoi(argv[i++]); else - Msg::Fatal("Missing number"); + Msg::Fatal("Missing number"); } else if(!strcmp(argv[i] + 1, "theme") || !strcmp(argv[i] + 1, "scheme")) { i++; if(argv[i]) CTX::instance()->guiTheme = argv[i++]; else - Msg::Fatal("Missing argument"); + Msg::Fatal("Missing argument"); } else if(!strcmp(argv[i] + 1, "display")) { i++; if(argv[i]) CTX::instance()->display = argv[i++]; else - Msg::Fatal("Missing argument"); + Msg::Fatal("Missing argument"); } #endif #if defined(__APPLE__) @@ -611,9 +611,9 @@ void GetOptions(int argc, char *argv[]) } #endif else { - Msg::Error("Unknown option '%s'", argv[i]); + Msg::Error("Unknown option '%s'", argv[i]); PrintUsage(argv[0]); - Msg::Exit(1); + Msg::Exit(1); } } diff --git a/Common/Context.h b/Common/Context.h index c432b714dc7bbd296aacf09a3d5587ca3dad0f36..f1853d00eabe62025226c77cc8c37a462d9ee748 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -180,6 +180,7 @@ class CTX { int smoothInternalEdges, minCircPoints, minCurvPoints; int saveAll, saveGroupsOfNodes, binary, bdfFieldFormat, saveParametric; int smoothNormals, reverseAllNormals, zoneDefinition, clip; + int saveElementTagType; } mesh; // FIXME: putting these in the mesh struct (where they belong) causes // an LNK1179 error ("duplicate COMDAT") with MSVC... diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp index 55bca74e0258e41a4ce32627a2f9e5d25960e978..e9fa934ab730e7fc67632b1b43e7ffac0da85a1d 100644 --- a/Common/CreateFile.cpp +++ b/Common/CreateFile.cpp @@ -13,7 +13,7 @@ #if defined(HAVE_FLTK) #include <FL/gl.h> -#include "GUI.h" +#include "FlGui.h" #include "graphicWindow.h" #include "gl2ps.h" #include "gl2gif.h" @@ -95,18 +95,18 @@ static PixelBuffer *GetCompositePixelBuffer(GLenum format, GLenum type) { PixelBuffer *buffer; if(!CTX::instance()->print.compositeWindows){ - GLint width = GUI::instance()->getCurrentOpenglWindow()->w(); - GLint height = GUI::instance()->getCurrentOpenglWindow()->h(); + GLint width = FlGui::instance()->getCurrentOpenglWindow()->w(); + GLint height = FlGui::instance()->getCurrentOpenglWindow()->h(); buffer = new PixelBuffer(width, height, format, type); buffer->fill(CTX::instance()->batch); } else{ - graphicWindow *g = GUI::instance()->graph[0]; - for(unsigned int i = 1; i < GUI::instance()->graph.size(); i++){ - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++){ - if(GUI::instance()->graph[i]->gl[j] == - GUI::instance()->getCurrentOpenglWindow()){ - g = GUI::instance()->graph[i]; + graphicWindow *g = FlGui::instance()->graph[0]; + for(unsigned int i = 1; i < FlGui::instance()->graph.size(); i++){ + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++){ + if(FlGui::instance()->graph[i]->gl[j] == + FlGui::instance()->getCurrentOpenglWindow()){ + g = FlGui::instance()->graph[i]; break; } } @@ -189,12 +189,14 @@ void CreateOutputFile(std::string fileName, int format) case FORMAT_MESH: GModel::current()->writeMESH - (fileName, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor); + (fileName, CTX::instance()->mesh.saveElementTagType, + CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor); break; case FORMAT_BDF: GModel::current()->writeBDF - (fileName, CTX::instance()->mesh.bdfFieldFormat, CTX::instance()->mesh.saveAll, + (fileName, CTX::instance()->mesh.bdfFieldFormat, + CTX::instance()->mesh.saveElementTagType, CTX::instance()->mesh.saveAll, CTX::instance()->mesh.scalingFactor); break; @@ -240,7 +242,7 @@ void CreateOutputFile(std::string fileName, int format) case FORMAT_JPEG: case FORMAT_PNG: { - if(!GUI::available()) break; + if(!FlGui::available()) break; FILE *fp = fopen(fileName.c_str(), "wb"); if(!fp){ @@ -285,7 +287,7 @@ void CreateOutputFile(std::string fileName, int format) case FORMAT_PDF: case FORMAT_SVG: { - if(!GUI::available()) break; + if(!FlGui::available()) break; FILE *fp = fopen(fileName.c_str(), "wb"); if(!fp){ @@ -293,8 +295,8 @@ void CreateOutputFile(std::string fileName, int format) break; } std::string base = SplitFileName(fileName)[1]; - GLint width = GUI::instance()->getCurrentOpenglWindow()->w(); - GLint height = GUI::instance()->getCurrentOpenglWindow()->h(); + GLint width = FlGui::instance()->getCurrentOpenglWindow()->w(); + GLint height = FlGui::instance()->getCurrentOpenglWindow()->h(); GLint viewport[4] = {0, 0, width, height}; int old_gradient = CTX::instance()->bgGradient; @@ -359,7 +361,7 @@ void CreateOutputFile(std::string fileName, int format) case FORMAT_TEX: { - if(!GUI::available()) break; + if(!FlGui::available()) break; FILE *fp = fopen(fileName.c_str(), "w"); if(!fp){ @@ -367,8 +369,8 @@ void CreateOutputFile(std::string fileName, int format) break; } std::string base = SplitFileName(fileName)[1]; - GLint width = GUI::instance()->getCurrentOpenglWindow()->w(); - GLint height = GUI::instance()->getCurrentOpenglWindow()->h(); + GLint width = FlGui::instance()->getCurrentOpenglWindow()->w(); + GLint height = FlGui::instance()->getCurrentOpenglWindow()->h(); GLint viewport[4] = {0, 0, width, height}; GLint buffsize = 0; int res = GL2PS_OVERFLOW; diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 3989d0ed075d4db0c5c4ec9e55b2baffd8fbc966..82e0f103dfb943b692d21fd8628ebd18e1df3f1a 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -61,7 +61,8 @@ StringXString GeneralOptions_String[] = { "Option file created with `Tools->Options->Save'; automatically read on startup" }, { 0, "SessionFileName" , opt_general_session_filename , ".gmshrc" , - "Option file into which session specific information is saved; automatically read on startup" }, + "Option file into which session specific information is saved; automatically " + "read on startup" }, { F|O, "TextEditor" , opt_general_editor , #if defined(WIN32) @@ -463,9 +464,11 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "BackgroundGradient" , opt_general_background_gradient , 1. , "Draw background gradient (0=none, 1=vertical, 2=horizontal, 3=radial)" }, { F|O, "BackgroundImagePositionX" , opt_general_background_image_position0 , 1.e5 , - "X position (in pixels) of background image (< 0: measure from right edge; >= 1e5: centered)" }, + "X position (in pixels) of background image (< 0: measure from right edge; " + ">= 1e5: centered)" }, { F|O, "BackgroundImagePositionY" , opt_general_background_image_position1 , 1.e5 , - "Y position (in pixels) of background image (< 0: measure from bottom edge; >= 1e5: centered)" }, + "Y position (in pixels) of background image (< 0: measure from bottom edge; " + ">= 1e5: centered)" }, { F, "Clip0A" , opt_general_clip0a , 1.0 , "First coefficient in equation for clipping plane 0 (`A' in `AX+BY+CZ+D=0')" }, @@ -516,15 +519,19 @@ StringXNumber GeneralOptions_Number[] = { { F, "Clip5D" , opt_general_clip5d , 0.0 , "Fourth coefficient in equation for clipping plane 5" }, { F, "ClipFactor" , opt_general_clip_factor , 5.0 , - "Near and far clipping plane distance factor (decrease value for better z-buffer resolution)" }, - { F|O, "ClipOnlyDrawIntersectingVolume" , opt_general_clip_only_draw_intersecting_volume , 0. , + "Near and far clipping plane distance factor (decrease value for better " + "z-buffer resolution)" }, + { F|O, "ClipOnlyDrawIntersectingVolume" , + opt_general_clip_only_draw_intersecting_volume , 0. , "Only draw layer of elements that intersect the clipping plane" }, { F|O, "ClipOnlyVolume" , opt_general_clip_only_volume , 0. , "Only clip volume elements" }, { F|S, "ClipPositionX" , opt_general_clip_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the clipping planes window" }, + "Horizontal position (in pixels) of the upper left corner of the clipping " + "planes window" }, { F|S, "ClipPositionY" , opt_general_clip_position1 , 150. , - "Vertical position (in pixels) of the upper left corner of the clipping planes window" }, + "Vertical position (in pixels) of the upper left corner of the clipping " + "planes window" }, { F|O, "ClipWholeElements" , opt_general_clip_whole_elements , 0. , "Clip whole elements" }, @@ -533,17 +540,21 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "ConfirmOverwrite" , opt_general_confirm_overwrite, 1. , "Ask confirmation before overwriting files?" }, { F|S, "ContextPositionX" , opt_general_context_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the contextual windows" }, + "Horizontal position (in pixels) of the upper left corner of the contextual " + "windows" }, { F|S, "ContextPositionY" , opt_general_context_position1 , 150. , - "Vertical position (in pixels) of the upper left corner of the contextual windows" }, + "Vertical position (in pixels) of the upper left corner of the contextual " + "windows" }, { F|O, "DoubleBuffer" , opt_general_double_buffer , 1. , - "Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)" }, + "Use a double buffered graphic window (on Unix, should be set to 0 when " + "working on a remote host without GLX)" }, { F|O, "DrawBoundingBoxes" , opt_general_draw_bounding_box, 0. , "Draw bounding boxes" }, { F|O, "ExpertMode" , opt_general_expert_mode, 0. , - "Enable expert mode (to disable all the messages meant for inexperienced users)" }, + "Enable expert mode (to disable all the messages meant for inexperienced " + "users)" }, { F|O, "FastRedraw" , opt_general_fast_redraw, 0. , "Draw simplified model while rotating, panning and zooming" }, @@ -556,9 +567,11 @@ StringXNumber GeneralOptions_Number[] = { { F|S, "FieldWidth" , opt_general_field_size0 , 300. , "Width (in pixels) of the field window" }, { F|S, "FileChooserPositionX" , opt_general_file_chooser_position0 , 200. , - "Horizontal position (in pixels) of the upper left corner of the file chooser windows" }, + "Horizontal position (in pixels) of the upper left corner of the file chooser " + "windows" }, { F|S, "FileChooserPositionY" , opt_general_file_chooser_position1 , 200. , - "Vertical position (in pixels) of the upper left corner of the file chooser windows" }, + "Vertical position (in pixels) of the upper left corner of the file chooser " + "windows" }, { F|O, "FontSize" , opt_general_fontsize , -1. , "Size of the font in the user interface (-1=automatic)" }, @@ -567,14 +580,17 @@ StringXNumber GeneralOptions_Number[] = { { F|S, "GraphicsHeight" , opt_general_graphics_size1 , 600. , "Height (in pixels) of the graphic window" }, { F|S, "GraphicsPositionX" , opt_general_graphics_position0 , 50. , - "Horizontal position (in pixels) of the upper left corner of the graphic window" }, + "Horizontal position (in pixels) of the upper left corner of the graphic " + "window" }, { F|S, "GraphicsPositionY" , opt_general_graphics_position1 , 50. , - "Vertical position (in pixels) of the upper left corner of the graphic window" }, + "Vertical position (in pixels) of the upper left corner of the graphic " + "window" }, { F|S, "GraphicsWidth" , opt_general_graphics_size0 , 600. , "Width (in pixels) of the graphic window" }, { F|O, "InitialModule", opt_general_initial_context, 0. , - "Module launched on startup (0=automatic, 1=geometry, 2=mesh, 3=solver, 4=post-processing) " }, + "Module launched on startup (0=automatic, 1=geometry, 2=mesh, 3=solver, " + "4=post-processing) " }, { F|O, "Light0" , opt_general_light0 , 1. , "Enable light source 0" }, @@ -585,7 +601,8 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light0Z" , opt_general_light02 , 1.0 , "Z position of light source 0" }, { F|O, "Light0W" , opt_general_light03 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 0 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 0 (W=0 means " + "infinitely far source)" }, { F|O, "Light1" , opt_general_light1 , 0., "Enable light source 1" }, { F|O, "Light1X" , opt_general_light10 , 0.5 , @@ -595,7 +612,8 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light1Z" , opt_general_light12 , 1.0 , "Z position of light source 1" }, { F|O, "Light1W" , opt_general_light13 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 1 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 1 (W=0 means infinitely " + "far source)" }, { F|O, "Light2" , opt_general_light2 , 0., "Enable light source 2" }, { F|O, "Light2X" , opt_general_light20 , 0.5 , @@ -605,7 +623,8 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light2Z" , opt_general_light22 , 1.0 , "Z position of light source 2" }, { F|O, "Light2W" , opt_general_light23 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 2 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 2 (W=0 means infinitely " + "far source)" }, { F|O, "Light3" , opt_general_light3 , 0., "Enable light source 3" }, { F|O, "Light3X" , opt_general_light30 , 0.5 , @@ -615,7 +634,8 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light3Z" , opt_general_light32 , 1.0 , "Z position of light source 3" }, { F|O, "Light3W" , opt_general_light33 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 3 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 3 (W=0 means infinitely " + "far source)" }, { F|O, "Light4" , opt_general_light4 , 0., "Enable light source 4" }, { F|O, "Light4X" , opt_general_light40 , 0.5 , @@ -625,7 +645,8 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light4Z" , opt_general_light42 , 1.0 , "Z position of light source 4" }, { F|O, "Light4W" , opt_general_light43 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 4 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 4 (W=0 means infinitely " + "far source)" }, { F|O, "Light5" , opt_general_light5 , 0., "Enable light source 5" }, { F|O, "Light5X" , opt_general_light50 , 0.5 , @@ -635,14 +656,17 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Light5Z" , opt_general_light52 , 1.0 , "Z position of light source 5" }, { F|O, "Light5W" , opt_general_light53 , 0.0 , - "Divisor of the X, Y and Z coordinates of light source 5 (W=0 means infinitely far source)" }, + "Divisor of the X, Y and Z coordinates of light source 5 (W=0 means infinitely " + "far source)" }, { F|O, "LineWidth" , opt_general_line_width , 1.0 , "Display width of lines (in pixels)" }, { F|S, "ManipulatorPositionX" , opt_general_manip_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the manipulator window" }, + "Horizontal position (in pixels) of the upper left corner of the manipulator " + "window" }, { F|S, "ManipulatorPositionY" , opt_general_manip_position1 , 150. , - "Vertical position (in pixels) of the upper left corner of the manipulator window" }, + "Vertical position (in pixels) of the upper left corner of the manipulator " + "window" }, { F, "MaxX" , opt_general_xmax , 0. , "Maximum model coordinate along the X-axis (read-only)" }, { F, "MaxY" , opt_general_ymax , 0. , @@ -656,9 +680,11 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "MessageAutoScroll" , opt_general_message_auto_scroll , 1. , "Automatically scroll message window" }, { F|S, "MessagePositionX" , opt_general_message_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the message window" }, + "Horizontal position (in pixels) of the upper left corner of the message " + "window" }, { F|S, "MessagePositionY" , opt_general_message_position1 , 490. , - "Vertical position (in pixels) of the upper left corner of the message window" }, + "Vertical position (in pixels) of the upper left corner of the message " + "window" }, { F|S, "MessageHeight" , opt_general_message_size1 , 300. , "Height (in pixels) of the message window" }, { F|S, "MessageWidth" , opt_general_message_size0 , 400. , @@ -675,19 +701,23 @@ StringXNumber GeneralOptions_Number[] = { "Enable mouse selection" }, { F|S, "NonModalWindows" , opt_general_non_modal_windows , 1. , - "Force all control windows to be on top of the graphic window (\"non-modal\")" }, + "Force all control windows to be on top of the graphic window " + "(\"non-modal\")" }, { F|O, "NoPopup" , opt_general_nopopup , 0. , - "Disable interactive dialog windows in scripts (and use default values instead)" }, + "Disable interactive dialog windows in scripts (and use default values " + "instead)" }, { F|S, "OptionsPositionX" , opt_general_option_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the option window" }, + "Horizontal position (in pixels) of the upper left corner of the option " + "window" }, { F|S, "OptionsPositionY" , opt_general_option_position1 , 150. , "Vertical position (in pixels) of the upper left corner of the option window" }, { F|O, "Orthographic" , opt_general_orthographic , 1. , "Orthographic projection mode (0=perspective projection)" }, { F|S, "PluginPositionX" , opt_general_plugin_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the plugin window" }, + "Horizontal position (in pixels) of the upper left corner of the plugin " + "window" }, { F|S, "PluginPositionY" , opt_general_plugin_position1 , 550. , "Vertical position (in pixels) of the upper left corner of the plugin window" }, { F|S, "PluginHeight" , opt_general_plugin_size1 , 300. , @@ -718,7 +748,8 @@ StringXNumber GeneralOptions_Number[] = { { F, "RotationZ" , opt_general_rotation2 , 0.0 , "Third Euler angle (used if Trackball=0)" }, { F|O, "RotationCenterGravity" , opt_general_rotation_center_cg , 1. , - "Rotate around the (pseudo) center of mass instead of (RotationCenterX, RotationCenterY, RotationCenterZ)" }, + "Rotate around the (pseudo) center of mass instead of (RotationCenterX, " + "RotationCenterY, RotationCenterZ)" }, { F, "RotationCenterX" , opt_general_rotation_center0 , 0.0 , "X coordinate of the center of rotation" }, { F, "RotationCenterY" , opt_general_rotation_center1 , 0.0 , @@ -727,9 +758,11 @@ StringXNumber GeneralOptions_Number[] = { "Z coordinate of the center of rotation" }, { F|S, "SaveOptions" , opt_general_options_save, 0. , - "Automatically save current options in General.OptionsFileName each time you quit Gmsh?" }, + "Automatically save current options in General.OptionsFileName each time " + "you quit Gmsh?" }, { F|S, "SaveSession" , opt_general_session_save, 1. , - "Automatically save session specific information in General.SessionFileName each time you quit Gmsh?" }, + "Automatically save session specific information in General.SessionFileName " + "each time you quit Gmsh?" }, { F, "ScaleX" , opt_general_scale0 , 1.0 , "X-axis scale factor" }, { F, "ScaleY" , opt_general_scale1 , 1.0 , @@ -743,19 +776,24 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "SmallAxes" , opt_general_small_axes , 1. , "Display the small axes" }, { F|O, "SmallAxesPositionX" , opt_general_small_axes_position0 , -60. , - "X position (in pixels) of small axes (< 0: measure from right edge; >= 1e5: centered)" }, + "X position (in pixels) of small axes (< 0: measure from right edge; >= 1e5:" + " centered)" }, { F|O, "SmallAxesPositionY" , opt_general_small_axes_position1 , -40. , - "Y position (in pixels) of small axes (< 0: measure from bottom edge; >= 1e5: centered)" }, + "Y position (in pixels) of small axes (< 0: measure from bottom edge; >= 1e5:" + " centered)" }, { F|O, "SmallAxesSize" , opt_general_small_axes_size , 30. , "Size (in pixels) of small axes" }, { F|S, "SolverPositionX" , opt_general_solver_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the solver windows" }, + "Horizontal position (in pixels) of the upper left corner of the solver " + "windows" }, { F|S, "SolverPositionY" , opt_general_solver_position1 , 150. , "Vertical position (in pixels) of the upper left corner of the solver windows" }, { F|S, "StatisticsPositionX" , opt_general_statistics_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the statistic window" }, + "Horizontal position (in pixels) of the upper left corner of the statistic " + "window" }, { F|S, "StatisticsPositionY" , opt_general_statistics_position1 , 150. , - "Vertical position (in pixels) of the upper left corner of the statistic window" }, + "Vertical position (in pixels) of the upper left corner of the statistic" + " window" }, { F|S, "SystemMenuBar" , opt_general_system_menu_bar , 1. , "Use the system menu bar on Mac OS X?" }, @@ -785,9 +823,11 @@ StringXNumber GeneralOptions_Number[] = { { F|O, "Verbosity" , opt_general_verbosity , 4. , "Level of information printed during processing (0=no information)" }, { F|S, "VisibilityPositionX" , opt_general_visibility_position0 , 650. , - "Horizontal position (in pixels) of the upper left corner of the visibility window" }, + "Horizontal position (in pixels) of the upper left corner of the visibility " + "window" }, { F|S, "VisibilityPositionY" , opt_general_visibility_position1 , 150. , - "Vertical position (in pixels) of the upper left corner of the visibility window" }, + "Vertical position (in pixels) of the upper left corner of the visibility " + "window" }, { F|O, "ZoomFactor" , opt_general_zoom_factor , 4.0 , "Middle mouse button zoom acceleration factor" }, @@ -805,7 +845,8 @@ StringXNumber GeometryOptions_Number[] = { "Copy meshing method when duplicating geometrical entities?" }, { F|O, "ExactExtrusion" , opt_geometry_exact_extrusion, 1. , - "Use exact extrusion formula in interpolations (set to 0 to allow geometrical transformations of extruded entities)" }, + "Use exact extrusion formula in interpolations (set to 0 to allow " + "geometrical transformations of extruded entities)" }, { F|O, "ExtrudeReturnLateralEntities" , opt_geometry_extrude_return_lateral, 1. , "Add lateral entities in lists returned by extrusion commands?" }, { F|O, "ExtrudeSplinePoints" , opt_geometry_extrude_spline_points, 5. , @@ -825,7 +866,8 @@ StringXNumber GeometryOptions_Number[] = { { F|O, "LineSelectWidth" , opt_geometry_line_sel_width , 2. , "Display width of selected lines (in pixels)" }, { F|O, "LineType" , opt_geometry_line_type , 0. , - "Display lines as solid color segments (0), 3D cylinders (1) or tapered cylinders (2)" }, + "Display lines as solid color segments (0), 3D cylinders (1) or tapered " + "cylinders (2)" }, { F|O, "LineWidth" , opt_geometry_line_width , 2. , "Display width of lines (in pixels)" }, @@ -854,7 +896,8 @@ StringXNumber GeometryOptions_Number[] = { { F|O, "OldCircle" , opt_geometry_old_circle , 0. , "Use old circle description (compatibility option for old Gmsh geometries)" }, { F|O, "OldNewReg" , opt_geometry_old_newreg , 1. , - "Use old newreg definition for geometrical transformations (compatibility option for old Gmsh geometries)" }, + "Use old newreg definition for geometrical transformations (compatibility " + "option for old Gmsh geometries)" }, { F|O, "Points" , opt_geometry_points , 1. , "Display geometry points?" }, @@ -928,7 +971,8 @@ StringXNumber MeshOptions_Number[] = { { F|O, "AngleSmoothNormals" , opt_mesh_angle_smooth_normals , 30.0 , "Threshold angle below which normals are not smoothed" }, { F|O, "AllowSwapAngle" , opt_mesh_allow_swap_edge_angle , 10.0 , - "Treshold angle (in degrees) between faces normals under which we allow an edge swap" }, + "Treshold angle (in degrees) between faces normals under which we allow " + "an edge swap" }, { F|O, "BdfFieldFormat" , opt_mesh_bdf_field_format , 1. , "Field format for Nastran BDF files (0=free, 1=small, 2=large)" }, @@ -936,13 +980,17 @@ StringXNumber MeshOptions_Number[] = { "Write mesh files in binary format (if possible)" }, { F|O, "ChacoArchitecture" , opt_mesh_partition_chaco_architecture, 1. , - "(Adv. Chaco): Parallel architecture topology (0=hypercube, 1-3=mesh dimensions)" }, + "(Adv. Chaco): Parallel architecture topology (0=hypercube, 1-3=mesh " + "dimensions)" }, { F|O, "ChacoEigensolver" , opt_mesh_partition_chaco_eigensolver, 1. , - "(Adv. Chaco): Type of eigensolver for a spectral algorithm (0=Lanczos, 1=Multilevel RQI/Symmlq)" }, + "(Adv. Chaco): Type of eigensolver for a spectral algorithm (0=Lanczos, " + "1=Multilevel RQI/Symmlq)" }, { F|O, "ChacoEigTol" , opt_mesh_partition_chaco_eigtol, 1.E-3 , - "(Adv. Chaco): Tolerance of the eigensolver for spectral or multilevel-KL algorithms" }, + "(Adv. Chaco): Tolerance of the eigensolver for spectral or multilevel-KL " + "algorithms" }, { F|O, "ChacoGlobalMethod" , opt_mesh_partition_chaco_global_method, 1. , - "Chaco partitioning algorithm (1=Multilevel-KL, 2=Spectral, 4=Linear, 5=Random, 6=Scattered)" }, + "Chaco partitioning algorithm (1=Multilevel-KL, 2=Spectral, 4=Linear, " + "5=Random, 6=Scattered)" }, { F|O, "ChacoHypercubeDim" , opt_mesh_partition_chaco_ndims_tot, 2. , "(Adv. Chaco): Dimensional partitioning for a hypercube topology" }, { F|O, "ChacoLocalMethod" , opt_mesh_partition_chaco_local_method, 1. , @@ -958,16 +1006,21 @@ StringXNumber MeshOptions_Number[] = { { F|O, "ChacoSeed" , opt_mesh_partition_chaco_seed, 7654321. , "(Adv. Chaco): Seed for random number generator" }, { F|O, "ChacoVMax" , opt_mesh_partition_chaco_vmax, 250. , - "(Adv. Chaco): Maximum vertices in a coarse graph (for multilevel-KL algorithm and Multilevel RQI/Symmlq eigensolver)" }, - { F|O, "ChacoParamINTERNAL_VERTICES" , opt_mesh_partition_chaco_internal_vertices, 0. , + "(Adv. Chaco): Maximum vertices in a coarse graph (for multilevel-KL " + "algorithm and Multilevel RQI/Symmlq eigensolver)" }, + { F|O, "ChacoParamINTERNAL_VERTICES" , + opt_mesh_partition_chaco_internal_vertices, 0. , "(Adv. Chaco): Parameter INTERNAL_VERTICES" }, { F|O, "ChacoParamREFINE_MAP" , opt_mesh_partition_chaco_refine_map, 1. , "(Adv. Chaco): Parameter REFINE_MAP" }, - { F|O, "ChacoParamREFINE_PARTITION" , opt_mesh_partition_chaco_refine_partition, 0. , + { F|O, "ChacoParamREFINE_PARTITION" , + opt_mesh_partition_chaco_refine_partition, 0. , "(Adv. Chaco): Parameter REFINE_PARTITION" }, - { F|O, "ChacoParamTERMINAL_PROPOGATION" , opt_mesh_partition_chaco_terminal_propogation, 0. , + { F|O, "ChacoParamTERMINAL_PROPOGATION" , + opt_mesh_partition_chaco_terminal_propogation, 0. , "(Adv. Chaco): Parameter TERMINAL_PROPOGATION" }, - { F|O, "CharacteristicLengthExtendFromBoundary" , opt_mesh_lc_extend_from_boundary, 1. , + { F|O, "CharacteristicLengthExtendFromBoundary" , + opt_mesh_lc_extend_from_boundary, 1. , "Extend characteristic lengths from the boundaries inside the surface/volume" }, { F|O, "CharacteristicLengthFactor" , opt_mesh_lc_factor , 1.0 , "Factor applied to all characteristic lengths" }, @@ -982,7 +1035,8 @@ StringXNumber MeshOptions_Number[] = { { F, "Clip" , opt_mesh_clip , 0., "Enable clipping planes? (Plane[i]=2^i, i=0,...,5)" }, { F|O, "ColorCarousel" , opt_mesh_color_carousel , 1. , - "Mesh coloring (0=by element type, 1=by elementary entity, 2=by physical entity, 3=by partition)" }, + "Mesh coloring (0=by element type, 1=by elementary entity, 2=by physical " + "entity, 3=by partition)" }, { F, "CpuTime" , opt_mesh_cpu_time , 0. , "CPU time (in seconds) for the generation of the current mesh (read-only)" }, @@ -991,13 +1045,15 @@ StringXNumber MeshOptions_Number[] = { { F|O, "Dual" , opt_mesh_dual , 0. , "Display the dual mesh obtained by barycentric subdivision" }, - { F|O, "ElementOrder" , opt_mesh_order , 1. , // "Order" is a reserved token in the parser + { F|O, "ElementOrder" , opt_mesh_order , 1. , + // "Order" is a reserved token in the parser "Element order (1=linear elements, N (<6) = elements of higher order)" }, { F|O, "Explode" , opt_mesh_explode , 1.0 , "Element shrinking factor (between 0 and 1)" }, { F|O, "Format" , opt_mesh_format , FORMAT_MSH , - "Mesh output format (1=msh, 2=unv, 19=vrml, 27=stl, 30=mesh, 31=bdf, 32=cgns, 33=med)" }, + "Mesh output format (1=msh, 2=unv, 19=vrml, 27=stl, 30=mesh, 31=bdf, " + "32=cgns, 33=med)" }, { F|O, "Hexahedra" , opt_mesh_hexahedra , 1. , "Display mesh hexahedra?" }, @@ -1005,7 +1061,8 @@ StringXNumber MeshOptions_Number[] = { { F|O, "LabelsFrequency" , opt_mesh_label_frequency , 100. , "Labels display frequency?" }, { F|O, "LabelType" , opt_mesh_label_type , 0. , - "Type of element label (0=element number, 1=elementary entity number, 2=physical entity number, 3=partition number, 4=coordinates)" }, + "Type of element label (0=element number, 1=elementary entity number, " + "2=physical entity number, 3=partition number, 4=coordinates)" }, { F|O, "LcIntegrationPrecision" , opt_mesh_lc_integration_precision, 1.e-9 , "Accuracy of evaluation of the LC field for 1D mesh generation" }, { F|O, "Light" , opt_mesh_light , 1. , @@ -1026,9 +1083,11 @@ StringXNumber MeshOptions_Number[] = { { F|O, "MetisAlgorithm" , opt_mesh_partition_metis_algorithm, 1. , "METIS partitioning algorithm (1=Recursive, 2=K-way)" }, { F|O, "MetisEdgeMatching" , opt_mesh_partition_metis_edge_matching, 3. , - "(Adv. METIS): Determines the matching type (1=Random, 2=Heavy-Edge, 3=Sorted Heavy-Edge)" }, + "(Adv. METIS): Determines the matching type (1=Random, 2=Heavy-Edge, " + "3=Sorted Heavy-Edge)" }, { F|O, "MetisRefinementAlgorithm" , opt_mesh_partition_metis_refine_algorithm, 3. , - "(Adv. METIS): Algorithm for k-way refinement (1=Random, 2=Greedy, 3=Random with minimized connectivity)" }, + "(Adv. METIS): Algorithm for k-way refinement (1=Random, 2=Greedy, " + "3=Random with minimized connectivity)" }, { F|O, "MinimumCirclePoints" , opt_mesh_min_circ_points, 7. , "Minimum number of points used to mesh a circle" }, { F|O, "MinimumCurvePoints" , opt_mesh_min_curv_points, 3. , @@ -1060,7 +1119,8 @@ StringXNumber MeshOptions_Number[] = { { F|O, "Optimize" , opt_mesh_optimize , 0. , "Optimize the mesh to improve the quality of tetrahedral elements" }, { F|O, "OptimizeNetgen" , opt_mesh_optimize_netgen , 0. , - "Optimize the mesh using Netgen to improve the quality of tetrahedral elements" }, + "Optimize the mesh using Netgen to improve the quality of tetrahedral " + "elements" }, { F|O, "Partitioner" , opt_mesh_partition_partitioner, 2. , "Partitioner software (1=Chacho, 2=METIS)" }, @@ -1084,14 +1144,16 @@ StringXNumber MeshOptions_Number[] = { { F|O, "QualitySup" , opt_mesh_quality_sup , 0.0 , "Only display elements whose quality measure is smaller than QualitySup" }, { F|O, "QualityType" , opt_mesh_quality_type , 2. , - "Type of quality measure (0=gamma~vol/sum_face/max_edge, 1=eta~vol^(2/3)/sum_edge^2, 2=rho~min_edge/max_edge)" }, + "Type of quality measure (0=gamma~vol/sum_face/max_edge, " + "1=eta~vol^(2/3)/sum_edge^2, 2=rho~min_edge/max_edge)" }, { F|O, "RadiusInf" , opt_mesh_radius_inf , 0.0 , "Only display elements whose longest edge is greater than RadiusInf" }, { F|O, "RadiusSup" , opt_mesh_radius_sup , 0.0 , "Only display elements whose longest edge is smaller than RadiusSup" }, { F|O, "RandomFactor" , opt_mesh_rand_factor , 1.e-9 , - "Random factor used in the 2D meshing algorithm (should be increased if RandomFactor * size(triangle)/size(model) approaches machine accuracy)" }, + "Random factor used in the 2D meshing algorithm (should be increased if " + "RandomFactor * size(triangle)/size(model) approaches machine accuracy)" }, { F|O, "RefineSteps" , opt_mesh_refine_steps , 10 , "Number of refinement steps in the MeshAdapt-based 2D algorithms" }, { F|O, "ReverseAllNormals" , opt_mesh_reverse_all_normals , 0. , @@ -1099,10 +1161,14 @@ StringXNumber MeshOptions_Number[] = { { F, "SaveAll" , opt_mesh_save_all , 0. , "Ignore Physical definitions and save all elements" }, - { F, "SaveParametric" , opt_mesh_save_parametric , 0. , + { F|O, "SaveElementTagType" , opt_mesh_save_element_tag_type , 1. , + "Type of the element tag saved in mesh formats that don't support saving " + "physical or partition ids (1=elementary, 2=physical, 3=partition)" }, + { F|O, "SaveParametric" , opt_mesh_save_parametric , 0. , "Save parametric coordinates of nodes" }, - { F, "SaveGroupsOfNodes" , opt_mesh_save_groups_of_nodes , 0. , - "Save groups of nodes for each physical line and surface (UNV mesh format only)" }, + { F|O, "SaveGroupsOfNodes" , opt_mesh_save_groups_of_nodes , 0. , + "Save groups of nodes for each physical line and surface (UNV mesh " + "format only)" }, { F|O, "ScalingFactor" , opt_mesh_scaling_factor , 1.0 , "Global scaling factor applied to the saved mesh" }, { F|O, "SecondOrderExperimental" , opt_mesh_second_order_experimental , 0. , @@ -1131,7 +1197,8 @@ StringXNumber MeshOptions_Number[] = { { F|O, "Tetrahedra" , opt_mesh_tetrahedra , 1. , "Display mesh tetrahedra?" }, { F|O, "ToleranceEdgeLength" , opt_mesh_tolerance_edge_length, 0.0, - "Skip a model edge in mesh generation if its length is less than user's defined tolerance" }, + "Skip a model edge in mesh generation if its length is less than user's " + "defined tolerance" }, { F|O, "Triangles" , opt_mesh_triangles , 1. , "Display mesh triangles?" }, @@ -1207,13 +1274,15 @@ StringXNumber PostProcessingOptions_Number[] = { "Remove original views after a Combine operation" }, { F|O, "Format" , opt_post_file_format , 0. , - "Default file format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=text, 5=mesh)" }, + "Default file format for post-processing views (0=ASCII view, 1=binary " + "view, 2=parsed view, 3=STL triangulation, 4=text, 5=mesh)" }, { F|O, "HorizontalScales" , opt_post_horizontal_scales , 1. , "Display value scales horizontally" }, { F|O, "Link" , opt_post_link , 0. , - "Link post-processing views (0=none, 1/2=changes in visible/all, 3/4=everything in visible/all)" }, + "Link post-processing views (0=none, 1/2=changes in visible/all, " + "3/4=everything in visible/all)" }, { F, "NbViews" , opt_post_nb_views , 0. , "Current number of views merged (read-only)" }, @@ -1264,7 +1333,8 @@ StringXNumber ViewOptions_Number[] = { "Number of tics on the Z-axis" }, { F|O, "Boundary" , opt_view_boundary , 0. , - "Draw the `N minus b'-dimensional boundary of the element (N=element dimension, b=option value)" }, + "Draw the `N minus b'-dimensional boundary of the element (N=element " + "dimension, b=option value)" }, { F|O, "CenterGlyphs" , opt_view_center_glyphs , 0, "Center glyphs (arrows, numbers, etc.)" }, @@ -1392,11 +1462,14 @@ StringXNumber ViewOptions_Number[] = { { F|O, "PointSize" , opt_view_point_size , 3. , "Display size of points (in pixels)" }, { F|O, "PointType" , opt_view_point_type , 0. , - "Display points as solid color dots (0), 3D spheres (1), scaled dots (2) or scaled spheres (3)" }, + "Display points as solid color dots (0), 3D spheres (1), scaled dots " + "(2) or scaled spheres (3)" }, { F|O, "PositionX" , opt_view_position0 , 100. , - "X position (in pixels) of the scale or 2D plot (< 0: measure from right edge; >= 1e5: centered)" }, + "X position (in pixels) of the scale or 2D plot (< 0: measure from right " + "edge; >= 1e5: centered)" }, { F|O, "PositionY" , opt_view_position1 , 50. , - "Y position (in pixels) of the scale or 2D plot (< 0: measure from bottom edge; >= 1e5: centered)" }, + "Y position (in pixels) of the scale or 2D plot (< 0: measure from bottom " + "edge; >= 1e5: centered)" }, { F, "RaiseX" , opt_view_raise0 , 0. , "Elevation of the view along X-axis (in model coordinates)" }, @@ -1416,7 +1489,8 @@ StringXNumber ViewOptions_Number[] = { { F|O, "ShowScale" , opt_view_show_scale , 1. , "Show value scale?" }, { F|O, "ShowTime" , opt_view_show_time , 1. , - "Time display mode (0=hidden, 1=value if multi-step, 2=value always, 3=step if multi-step, 4=step always)" }, + "Time display mode (0=hidden, 1=value if multi-step, 2=value always, " + "3=step if multi-step, 4=step always)" }, { F|O, "SmoothNormals" , opt_view_smooth_normals , 0. , "Smooth the normals?" }, { F|O, "Stipple" , opt_view_use_stipple , 0. , @@ -1455,7 +1529,8 @@ StringXNumber ViewOptions_Number[] = { "Use generalized raise?" }, { F|O, "VectorType" , opt_view_vector_type , 4 , - "Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, 5=displacement, 6=comet)" }, + "Vector display type (1=segment, 2=arrow, 3=pyramid, 4=3D arrow, " + "5=displacement, 6=comet)" }, { F, "Visible" , opt_view_visible , 1. , "Is the view visible?" }, @@ -1484,7 +1559,8 @@ StringXNumber PrintOptions_Number[] = { { F|O, "EpsPS3Shading" , opt_print_eps_ps3shading , 0. , "Enable PostScript Level 3 shading" }, { F|O, "EpsQuality" , opt_print_eps_quality , 1. , - "PostScript/PDF quality (0=bitmap, 1=vector (simple sort), 2=vector (accurate sort), 3=vector (unsorted)" }, + "PostScript/PDF quality (0=bitmap, 1=vector (simple sort), 2=vector " + "(accurate sort), 3=vector (unsorted)" }, { F|O, "Format" , opt_print_format , FORMAT_AUTO , "File format (10=automatic)" }, @@ -1506,17 +1582,22 @@ StringXNumber PrintOptions_Number[] = { "JPEG smoothing (between 0 and 100)" }, { F|O, "PostElementary" , opt_print_pos_elementary , 1. , - "Save elementary region tags in mesh statistics exported as post-processing views" }, + "Save elementary region tags in mesh statistics exported as " + "post-processing views" }, { F|O, "PostElement" , opt_print_pos_element , 0. , "Save element numbers in mesh statistics exported as post-processing views" }, { F|O, "PostGamma" , opt_print_pos_gamma , 0. , - "Save Gamma quality measure in mesh statistics exported as post-processing views" }, + "Save Gamma quality measure in mesh statistics exported as " + "post-processing views" }, { F|O, "PostEta" , opt_print_pos_eta , 0. , - "Save Eta quality measure in mesh statistics exported as post-processing views" }, + "Save Eta quality measure in mesh statistics exported as " + "post-processing views" }, { F|O, "PostRho" , opt_print_pos_rho , 0. , - "Save Rho quality measure in mesh statistics exported as post-processing views" }, + "Save Rho quality measure in mesh statistics exported as " + "post-processing views" }, { F|O, "PostDisto" , opt_print_pos_disto , 0. , - "Save Disto quality measure in mesh statistics exported as post-processing views" }, + "Save Disto quality measure in mesh statistics exported as " + "post-processing views" }, { F|O, "TexAsEquation" , opt_print_tex_as_equation , 0. , "Print all TeX strings as equations" }, @@ -1662,26 +1743,46 @@ StringXColor MeshOptions_Color[] = { { F|O, "Normals" , opt_mesh_color_normals , {255, 0, 0, 255}, {255, 0, 0, 255}, {0, 0, 0, 255}, "Normal mesh vector color" }, - { F|O, "Zero" , opt_mesh_color_0 , COL0, COL0, COLW, "Color 0 in color carousel" }, - { F|O, "One" , opt_mesh_color_1 , COL1, COL1, COLW, "Color 1 in color carousel" }, - { F|O, "Two" , opt_mesh_color_2 , COL2, COL2, COLW, "Color 2 in color carousel" }, - { F|O, "Three" , opt_mesh_color_3 , COL3, COL3, COLW, "Color 3 in color carousel" }, - { F|O, "Four" , opt_mesh_color_4 , COL4, COL4, COLW, "Color 4 in color carousel" }, - { F|O, "Five" , opt_mesh_color_5 , COL5, COL5, COLW, "Color 5 in color carousel" }, - { F|O, "Six" , opt_mesh_color_6 , COL6, COL6, COLW, "Color 6 in color carousel" }, - { F|O, "Seven" , opt_mesh_color_7 , COL7, COL7, COLW, "Color 7 in color carousel" }, - { F|O, "Eight" , opt_mesh_color_8 , COL8, COL8, COLW, "Color 8 in color carousel" }, - { F|O, "Nine" , opt_mesh_color_9 , COL9, COL9, COLW, "Color 9 in color carousel" }, - { F|O, "Ten" , opt_mesh_color_10, COL10, COL10, COLW, "Color 10 in color carousel" }, - { F|O, "Eleven" , opt_mesh_color_11, COL11, COL11, COLW, "Color 11 in color carousel" }, - { F|O, "Twelve" , opt_mesh_color_12, COL12, COL12, COLW, "Color 12 in color carousel" }, - { F|O, "Thirteen" , opt_mesh_color_13, COL13, COL13, COLW, "Color 13 in color carousel" }, - { F|O, "Fourteen" , opt_mesh_color_14, COL14, COL14, COLW, "Color 14 in color carousel" }, - { F|O, "Fifteen" , opt_mesh_color_15, COL15, COL15, COLW, "Color 15 in color carousel" }, - { F|O, "Sixteen" , opt_mesh_color_16, COL16, COL16, COLW, "Color 16 in color carousel" }, - { F|O, "Seventeen", opt_mesh_color_17, COL17, COL17, COLW, "Color 17 in color carousel" }, - { F|O, "Eighteen" , opt_mesh_color_18, COL18, COL18, COLW, "Color 18 in color carousel" }, - { F|O, "Nineteen" , opt_mesh_color_19, COL19, COL19, COLW, "Color 19 in color carousel" }, + { F|O, "Zero" , opt_mesh_color_0 , COL0, COL0, COLW, + "Color 0 in color carousel" }, + { F|O, "One" , opt_mesh_color_1 , COL1, COL1, COLW, + "Color 1 in color carousel" }, + { F|O, "Two" , opt_mesh_color_2 , COL2, COL2, COLW, + "Color 2 in color carousel" }, + { F|O, "Three" , opt_mesh_color_3 , COL3, COL3, COLW, + "Color 3 in color carousel" }, + { F|O, "Four" , opt_mesh_color_4 , COL4, COL4, COLW, + "Color 4 in color carousel" }, + { F|O, "Five" , opt_mesh_color_5 , COL5, COL5, COLW, + "Color 5 in color carousel" }, + { F|O, "Six" , opt_mesh_color_6 , COL6, COL6, COLW, + "Color 6 in color carousel" }, + { F|O, "Seven" , opt_mesh_color_7 , COL7, COL7, COLW, + "Color 7 in color carousel" }, + { F|O, "Eight" , opt_mesh_color_8 , COL8, COL8, COLW, + "Color 8 in color carousel" }, + { F|O, "Nine" , opt_mesh_color_9 , COL9, COL9, COLW, + "Color 9 in color carousel" }, + { F|O, "Ten" , opt_mesh_color_10, COL10, COL10, COLW, + "Color 10 in color carousel" }, + { F|O, "Eleven" , opt_mesh_color_11, COL11, COL11, COLW, + "Color 11 in color carousel" }, + { F|O, "Twelve" , opt_mesh_color_12, COL12, COL12, COLW, + "Color 12 in color carousel" }, + { F|O, "Thirteen" , opt_mesh_color_13, COL13, COL13, COLW, + "Color 13 in color carousel" }, + { F|O, "Fourteen" , opt_mesh_color_14, COL14, COL14, COLW, + "Color 14 in color carousel" }, + { F|O, "Fifteen" , opt_mesh_color_15, COL15, COL15, COLW, + "Color 15 in color carousel" }, + { F|O, "Sixteen" , opt_mesh_color_16, COL16, COL16, COLW, + "Color 16 in color carousel" }, + { F|O, "Seventeen", opt_mesh_color_17, COL17, COL17, COLW, + "Color 17 in color carousel" }, + { F|O, "Eighteen" , opt_mesh_color_18, COL18, COL18, COLW, + "Color 18 in color carousel" }, + { F|O, "Nineteen" , opt_mesh_color_19, COL19, COL19, COLW, + "Color 19 in color carousel" }, { 0, 0 , 0 , {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0} , 0 } } ; diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in index 9b5d159d24361cf98f8bf903ba2111050bb9116f..a925fc3ee12a24df236e42e0175b561465bce6b7 100644 --- a/Common/GmshConfig.h.in +++ b/Common/GmshConfig.h.in @@ -6,38 +6,41 @@ #ifndef _GMSH_CONFIG_H_ #define _GMSH_CONFIG_H_ -#undef HAVE_64BIT_SIZE_T -#undef HAVE_ANN -#undef HAVE_BLAS -#undef HAVE_CHACO -#undef HAVE_DINTEGRATION -#undef HAVE_FLTK -#undef HAVE_FOURIER_MODEL -#undef HAVE_GMM -#undef HAVE_KBIPACK -#undef HAVE_LAPACK -#undef HAVE_LIBCGNS -#undef HAVE_LIBJPEG -#undef HAVE_LIBPNG -#undef HAVE_LIBZ -#undef HAVE_MATH_EVAL -#undef HAVE_MED -#undef HAVE_METIS -#undef HAVE_MPI -#undef HAVE_NATIVE_FILE_CHOOSER -#undef HAVE_NETGEN -#undef HAVE_NO_DLL -#undef HAVE_NO_PARSER -#undef HAVE_NO_POST -#undef HAVE_NO_SOCKLEN_T -#undef HAVE_NO_VSNPRINTF -#undef HAVE_OCC -#undef HAVE_OCC_MESH_CONSTRAINTS -#undef HAVE_OSMESA -#undef HAVE_TAUCS -#undef HAVE_TETGEN -#undef HAVE_TREE_BROWSER +#cmakedefine HAVE_64BIT_SIZE_T +#cmakedefine HAVE_ANN +#cmakedefine HAVE_BLAS +#cmakedefine HAVE_CHACO +#cmakedefine HAVE_DINTEGRATION +#cmakedefine HAVE_FLTK +#cmakedefine HAVE_FOURIER_MODEL +#cmakedefine HAVE_GMM +#cmakedefine HAVE_KBIPACK +#cmakedefine HAVE_LAPACK +#cmakedefine HAVE_LIBCGNS +#cmakedefine HAVE_LIBJPEG +#cmakedefine HAVE_LIBPNG +#cmakedefine HAVE_LIBZ +#cmakedefine HAVE_MATH_EVAL +#cmakedefine HAVE_MED +#cmakedefine HAVE_METIS +#cmakedefine HAVE_MPI +#cmakedefine HAVE_NATIVE_FILE_CHOOSER +#cmakedefine HAVE_NETGEN +#cmakedefine HAVE_NO_DLL +#cmakedefine HAVE_NO_PARSER +#cmakedefine HAVE_NO_POST +#cmakedefine HAVE_NO_SOCKLEN_T +#cmakedefine HAVE_NO_VSNPRINTF +#cmakedefine HAVE_OCC +#cmakedefine HAVE_OCC_MESH_CONSTRAINTS +#cmakedefine HAVE_OSMESA +#cmakedefine HAVE_QT +#cmakedefine HAVE_TAUCS +#cmakedefine HAVE_TETGEN +#cmakedefine HAVE_TREE_BROWSER -#define GMSH_CONFIG_OPTIONS "" +#define GMSH_CONFIG_OPTIONS "${GMSH_CONFIG_OPTIONS}" + +${GMSH_CONFIG_PRAGMAS} #endif diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp index fa07153937ad393d7f4377211e11be57e540e883..471b79f63b79f2f274f89a73f865d38b9a1cdb6a 100644 --- a/Common/GmshMessage.cpp +++ b/Common/GmshMessage.cpp @@ -20,7 +20,7 @@ #if defined(HAVE_FLTK) #include <FL/fl_ask.H> -#include "GUI.h" +#include "FlGui.h" #include "messageWindow.h" #include "extraDialogs.h" #endif @@ -91,7 +91,7 @@ void Msg::Exit(int level) #if defined(HAVE_FLTK) // if we exit cleanly (level==0) and we are in full GUI mode, save // the persistent info to disk - if(GUI::available() && !_commRank) { + if(FlGui::available() && !_commRank) { if(CTX::instance()->sessionSave) PrintOptions(0, GMSH_SESSIONRC, 0, 0, (CTX::instance()->homeDir + CTX::instance()->sessionFileName).c_str()); @@ -120,12 +120,12 @@ void Msg::Fatal(const char *fmt, ...) if(_callback) (*_callback)("Fatal", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->check(); + if(FlGui::available()){ + FlGui::instance()->check(); std::string tmp = std::string("@C1@.") + "Fatal : " + str; - GUI::instance()->messages->add(tmp.c_str()); - GUI::instance()->messages->show(); - GUI::instance()->messages->save + FlGui::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->show(); + FlGui::instance()->messages->save ((CTX::instance()->homeDir + CTX::instance()->errorFileName).c_str()); fl_alert("A fatal error has occurred which will force Gmsh to abort.\n" "The error messages have been saved in the following file:\n\n%s", @@ -160,11 +160,11 @@ void Msg::Error(const char *fmt, ...) if(_callback) (*_callback)("Error", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->check(); + if(FlGui::available()){ + FlGui::instance()->check(); std::string tmp = std::string("@C1@.") + "Error : " + str; - GUI::instance()->messages->add(tmp.c_str()); - GUI::instance()->messages->show(); + FlGui::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->show(); } #endif @@ -192,10 +192,10 @@ void Msg::Warning(const char *fmt, ...) if(_callback) (*_callback)("Warning", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->check(); + if(FlGui::available()){ + FlGui::instance()->check(); std::string tmp = std::string("@C1@.") + "Warning : " + str; - GUI::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->add(tmp.c_str()); } #endif @@ -218,10 +218,10 @@ void Msg::Info(const char *fmt, ...) if(_callback) (*_callback)("Info", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->check(); + if(FlGui::available()){ + FlGui::instance()->check(); std::string tmp = std::string("Info : ") + str; - GUI::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->add(tmp.c_str()); } #endif @@ -257,16 +257,16 @@ void Msg::Direct(int level, const char *fmt, ...) if(_callback) (*_callback)("Direct", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->check(); + if(FlGui::available()){ + FlGui::instance()->check(); std::string tmp; if(level < 3) tmp = std::string("@C1@.") + str; else tmp = std::string("@C4@.") + str; - GUI::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->add(tmp.c_str()); if(level == 1) - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } #endif @@ -290,13 +290,13 @@ void Msg::StatusBar(int num, bool log, const char *fmt, ...) if(_callback && log) (*_callback)("Info", str); #if defined(HAVE_FLTK) - if(GUI::available()){ - if(log) GUI::instance()->check(); + if(FlGui::available()){ + if(log) FlGui::instance()->check(); if(!log || num != 2 || _verbosity > 3) - GUI::instance()->setStatus(str, num - 1); + FlGui::instance()->setStatus(str, num - 1); if(log){ std::string tmp = std::string("Info : ") + str; - GUI::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->add(tmp.c_str()); } } #endif @@ -320,9 +320,9 @@ void Msg::Debug(const char *fmt, ...) if(_callback) (*_callback)("Debug", str); #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ std::string tmp = std::string("Debug : ") + str; - GUI::instance()->messages->add(tmp.c_str()); + FlGui::instance()->messages->add(tmp.c_str()); } #endif @@ -355,9 +355,9 @@ void Msg::ProgressMeter(int n, int N, const char *fmt, ...) strcat(str, str2); #if defined(HAVE_FLTK) - if(GUI::available()){ - if(_verbosity > 3) GUI::instance()->setStatus(str, 1); - GUI::instance()->check(); + if(FlGui::available()){ + if(_verbosity > 3) FlGui::instance()->setStatus(str, 1); + FlGui::instance()->check(); } #endif if(CTX::instance()->terminal){ @@ -371,8 +371,8 @@ void Msg::ProgressMeter(int n, int N, const char *fmt, ...) if(n > N - 1){ #if defined(HAVE_FLTK) - if(GUI::available()){ - if(_verbosity > 3) GUI::instance()->setStatus("", 1); + if(FlGui::available()){ + if(_verbosity > 3) FlGui::instance()->setStatus("", 1); } #endif if(CTX::instance()->terminal){ @@ -417,16 +417,16 @@ void Msg::PrintErrorCounter(const char *title) sprintf(err, "%5d error%s", _errorCount, _errorCount == 1 ? "" : "s"); #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ std::string red("@C1@."); - GUI::instance()->messages->add((red + prefix + line).c_str()); - GUI::instance()->messages->add((red + prefix + title).c_str()); - GUI::instance()->messages->add((red + prefix + warn).c_str()); - GUI::instance()->messages->add((red + prefix + err).c_str()); - GUI::instance()->messages->add((red + prefix + help).c_str()); - GUI::instance()->messages->add((red + prefix + line).c_str()); + FlGui::instance()->messages->add((red + prefix + line).c_str()); + FlGui::instance()->messages->add((red + prefix + title).c_str()); + FlGui::instance()->messages->add((red + prefix + warn).c_str()); + FlGui::instance()->messages->add((red + prefix + err).c_str()); + FlGui::instance()->messages->add((red + prefix + help).c_str()); + FlGui::instance()->messages->add((red + prefix + line).c_str()); if(_errorCount){ - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); fl_beep(); } } @@ -434,9 +434,9 @@ void Msg::PrintErrorCounter(const char *title) if(CTX::instance()->terminal){ fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n", (prefix + line).c_str(), - (prefix + title).c_str(), (prefix + warn).c_str(), - (prefix + err).c_str(), (prefix + help).c_str(), - (prefix + line).c_str()); + (prefix + title).c_str(), (prefix + warn).c_str(), + (prefix + err).c_str(), (prefix + help).c_str(), + (prefix + line).c_str()); fflush(stderr); } } @@ -448,7 +448,7 @@ double Msg::GetValue(const char *text, double defaultval) if(CTX::instance()->noPopup || _callback) return defaultval; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ char defaultstr[256]; sprintf(defaultstr, "%.16g", defaultval); const char *ret = fl_input(text, defaultstr); @@ -469,14 +469,14 @@ double Msg::GetValue(const char *text, double defaultval) } bool Msg::GetBinaryAnswer(const char *question, const char *yes, - const char *no, bool defaultval) + const char *no, bool defaultval) { // if a callback is given let's assume we don't want to be bothered // with interactive stuff if(CTX::instance()->noPopup || _callback) return defaultval; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(fl_choice(question, no, yes, NULL)) return true; else @@ -486,7 +486,7 @@ bool Msg::GetBinaryAnswer(const char *question, const char *yes, while(1){ printf("%s\n\n[%s] or [%s]? (default=%s) ", question, yes, no, - defaultval ? yes : no); + defaultval ? yes : no); char str[256]; char *ret = fgets(str, sizeof(str), stdin); if(!ret || !strlen(str) || !strcmp(str, "\n")) diff --git a/Common/GmshMessage.h b/Common/GmshMessage.h index ded152993aec26e44ec1a2e0998a7785741ee835..b6f475a39b0381e269fc006fd1f1ba8f2b709f62 100644 --- a/Common/GmshMessage.h +++ b/Common/GmshMessage.h @@ -71,7 +71,7 @@ class Msg { static void PrintErrorCounter(const char *title); static double GetValue(const char *text, double defaultval); static bool GetBinaryAnswer(const char *question, const char *yes, - const char *no, bool defaultval=true); + const char *no, bool defaultval=true); }; #endif diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h index 4513b11e1081c1324518ac3277b950729f7522a9..6eb55f0d45225934382f9e9c87025b0c88cb7ba8 100644 --- a/Common/GmshSocket.h +++ b/Common/GmshSocket.h @@ -198,16 +198,16 @@ class GmshClient : public GmshSocket { // UNIX socket (testing ":" is not enough with Windows paths) _sock = socket(PF_UNIX, SOCK_STREAM, 0); if(_sock < 0) - return -1; // Error: Couldn't create socket + return -1; // Error: Couldn't create socket // try to connect socket to given name struct sockaddr_un addr_un; memset((char *) &addr_un, 0, sizeof(addr_un)); addr_un.sun_family = AF_UNIX; strcpy(addr_un.sun_path, sockname); for(int tries = 0; tries < 5; tries++) { - if(connect(_sock, (struct sockaddr *)&addr_un, sizeof(addr_un)) >= 0) - return _sock; - _Sleep(100); + if(connect(_sock, (struct sockaddr *)&addr_un, sizeof(addr_un)) >= 0) + return _sock; + _Sleep(100); } #else return -1; // Unix sockets are not available on Windows @@ -217,19 +217,19 @@ class GmshClient : public GmshSocket { // TCP/IP socket _sock = socket(AF_INET, SOCK_STREAM, 0); if(_sock < 0) - return -1; // Error: Couldn't create socket + return -1; // Error: Couldn't create socket // try to connect socket to host:port const char *port = strstr(sockname, ":"); int portno = atoi(port + 1); int remotelen = strlen(sockname) - strlen(port); char remote[256]; if(remotelen > 0) - strncpy(remote, sockname, remotelen); + strncpy(remote, sockname, remotelen); remote[remotelen] = '\0'; struct hostent *server; if(!(server = gethostbyname(remote))){ CloseSocket(_sock); - return -3; // Error: No such host + return -3; // Error: No such host } struct sockaddr_in addr_in; memset((char *) &addr_in, 0, sizeof(addr_in)); @@ -237,9 +237,9 @@ class GmshClient : public GmshSocket { memcpy((char *)&addr_in.sin_addr.s_addr, (char *)server->h_addr, server->h_length); addr_in.sin_port = htons(portno); for(int tries = 0; tries < 5; tries++) { - if(connect(_sock, (struct sockaddr *)&addr_in, sizeof(addr_in)) >= 0) - return _sock; - _Sleep(100); + if(connect(_sock, (struct sockaddr *)&addr_in, sizeof(addr_in)) >= 0) + return _sock; + _Sleep(100); } } CloseSocket(_sock); diff --git a/Common/GmshVersion.h.in b/Common/GmshVersion.h.in new file mode 100644 index 0000000000000000000000000000000000000000..b9436f611ce5f00049e95188c5403ce1c4e73f42 --- /dev/null +++ b/Common/GmshVersion.h.in @@ -0,0 +1,20 @@ +// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#ifndef _GMSH_VERSION_H_ +#define _GMSH_VERSION_H_ + +#define GMSH_MAJOR_VERSION ${GMSH_MAJOR_VERSION} +#define GMSH_MINOR_VERSION ${GMSH_MINOR_VERSION} +#define GMSH_PATCH_VERSION ${GMSH_PATCH_VERSION} +#define GMSH_EXTRA_VERSION "${GMSH_EXTRA_VERSION}" +#define GMSH_VERSION "${GMSH_VERSION}" +#define GMSH_DATE "${GMSH_DATE}" +#define GMSH_HOST "${GMSH_HOST}" +#define GMSH_PACKAGER "${GMSH_PACKAGER}" +#define GMSH_OS "${GMSH_OS}" +#define GMSH_SHORT_LICENSE "${GMSH_SHORT_LICENSE}" + +#endif diff --git a/Common/Main.cpp b/Common/Main.cpp index 0c2ee20df3be48f1d286fbf741cfd51d5f5d5d4a..56a8e0803fa8072346195b1369f9a250a01f6345 100644 --- a/Common/Main.cpp +++ b/Common/Main.cpp @@ -12,15 +12,15 @@ int main(int argc, char *argv[]) { + CTX::instance()->terminal = CTX::instance()->noPopup = 1; + if(argc < 2){ - CTX::instance()->terminal = 1; PrintUsage(argv[0]); exit(0); } new GModel(); GmshInitialize(argc, argv); - CTX::instance()->terminal = CTX::instance()->noPopup = 1; GmshBatch(); GmshFinalize(); diff --git a/Common/Makefile b/Common/Makefile deleted file mode 100644 index c3ae321d7346e01c9bb789602d1fdc158715e67b..0000000000000000000000000000000000000000 --- a/Common/Makefile +++ /dev/null @@ -1,179 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshCommon${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/ANN/include - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Gmsh.cpp\ - GmshMessage.cpp\ - GmshDaemon.cpp\ - Context.cpp\ - Options.cpp\ - CommandLine.cpp\ - OS.cpp\ - OpenFile.cpp\ - CreateFile.cpp\ - VertexArray.cpp\ - SmoothData.cpp\ - Octree.cpp OctreeInternals.cpp\ - StringUtils.cpp\ - ListUtils.cpp\ - TreeUtils.cpp avl.cpp\ - MallocUtils.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} Main${OBJEXT} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Gmsh${OBJEXT}: Gmsh.cpp GmshConfig.h GmshDefines.h ../Numeric/GmshPredicates.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h GmshMessage.h OpenFile.h \ - CreateFile.h Options.h ../Post/ColorTable.h CommandLine.h OS.h \ - ../Mesh/Generator.h ../Mesh/Field.h ../Common/GmshConfig.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshMessage.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Post/PView.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Mesh/meshPartition.h GmshDaemon.h \ - ../Plugin/PluginManager.h -GmshMessage${OBJEXT}: GmshMessage.cpp GmshConfig.h GmshMessage.h Gmsh.h \ - Options.h ../Post/ColorTable.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h OS.h ../Fltk/GUI.h \ - ../Fltk/messageWindow.h ../Fltk/extraDialogs.h -GmshDaemon${OBJEXT}: GmshDaemon.cpp GmshMessage.h OS.h GmshSocket.h GmshConfig.h -Context${OBJEXT}: Context.cpp GmshConfig.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -Options${OBJEXT}: Options.cpp GmshConfig.h GmshDefines.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h GmshMessage.h ../Fltk/Draw.h \ - ../Mesh/Generator.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h Options.h ../Post/ColorTable.h \ - DefaultOptions.h ../Mesh/Field.h ../Common/GmshConfig.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshMessage.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Post/PView.h ../Mesh/BackgroundMesh.h ../Post/PViewOptions.h \ - ../Post/ColorTable.h ../Post/PViewData.h ../Post/adaptiveData.h \ - ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Fltk/GUI.h \ - ../Fltk/Solvers.h ../Fltk/menuWindow.h ../Fltk/popupButton.h \ - ../Fltk/graphicWindow.h ../Fltk/openglWindow.h \ - ../Graphics/drawContext.h ../Fltk/optionWindow.h \ - ../Fltk/spherePositionWidget.h ../Fltk/colorbarWindow.h \ - ../Fltk/solverWindow.h ../Fltk/manipWindow.h ../Fltk/messageWindow.h \ - ../Fltk/contextWindow.h ../Fltk/clippingWindow.h -CommandLine${OBJEXT}: CommandLine.cpp GmshConfig.h GmshDefines.h GmshVersion.h \ - GmshMessage.h OpenFile.h CommandLine.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h Options.h ../Post/ColorTable.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h CreateFile.h OS.h \ - ../Post/PView.h -OS${OBJEXT}: OS.cpp GmshMessage.h -OpenFile${OBJEXT}: OpenFile.cpp GmshConfig.h GmshMessage.h ../Geo/Geo.h \ - ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ - ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ - ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Mesh/HighOrder.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SVector3.h \ - Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - OpenFile.h CommandLine.h ../Graphics/ReadImg.h OS.h StringUtils.h \ - ../Geo/GeomMeshMatcher.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/Pair.h \ - ../Parser/Parser.h ../Post/PView.h ../Post/PViewData.h ../Fltk/GUI.h \ - ../Fltk/Draw.h -CreateFile${OBJEXT}: CreateFile.cpp GmshConfig.h GmshMessage.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h GmshDefines.h StringUtils.h Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h Options.h \ - ../Post/ColorTable.h ../Fltk/GUI.h ../Fltk/graphicWindow.h \ - ../Fltk/openglWindow.h ../Graphics/drawContext.h ../Graphics/gl2ps.h \ - ../Common/GmshConfig.h ../Graphics/gl2gif.h ../Graphics/PixelBuffer.h \ - ../Common/GmshMessage.h ../Fltk/Draw.h ../Graphics/gl2jpeg.h \ - ../Graphics/PixelBuffer.h ../Graphics/gl2png.h \ - ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \ - ../Graphics/PixelBuffer.h ../Graphics/gl2yuv.h \ - ../Graphics/PixelBuffer.h -VertexArray${OBJEXT}: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h -SmoothData${OBJEXT}: SmoothData.cpp SmoothData.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h -Octree${OBJEXT}: Octree.cpp Octree.h OctreeInternals.h -OctreeInternals${OBJEXT}: OctreeInternals.cpp GmshMessage.h OctreeInternals.h -StringUtils${OBJEXT}: StringUtils.cpp StringUtils.h GmshMessage.h -ListUtils${OBJEXT}: ListUtils.cpp MallocUtils.h ListUtils.h TreeUtils.h avl.h \ - GmshMessage.h -TreeUtils${OBJEXT}: TreeUtils.cpp MallocUtils.h TreeUtils.h avl.h ListUtils.h -avl${OBJEXT}: avl.cpp avl.h MallocUtils.h -MallocUtils${OBJEXT}: MallocUtils.cpp MallocUtils.h GmshMessage.h diff --git a/Common/OS.cpp b/Common/OS.cpp index c0855f3596a9857893f92a5db49143961a33db6a..708a9ac8819481880f484796f85c333305c978ab 100644 --- a/Common/OS.cpp +++ b/Common/OS.cpp @@ -174,16 +174,3 @@ int SystemCall(std::string command) #endif } -//HACK: allow the use of mixed debug/non-debug code with MSVC -#if (defined (_MSC_VER) && defined (_DEBUG)) -extern "C" { - _CRTIMP void __cdecl _invalid_parameter_noinfo(void) { } -} -#endif - -//HACK: fix undefined hypot with MSVC -#if defined (_MSC_VER) -extern "C" { - double hypot(double x, double y){ return _hypot(x, y); } -} -#endif diff --git a/Common/Octree.h b/Common/Octree.h index 4cb836d94a16d1b0f85390256997e9d73ac798c4..370223802e0e9cff0ec251ffef37ae75944c5541 100644 --- a/Common/Octree.h +++ b/Common/Octree.h @@ -12,14 +12,14 @@ Octree* Octree_Create(int maxElements, // max. num of elts allowed in an octant double *origin, // smallest x,y, z of model's bounding box double *size, // size in x, y, z of model bounding box - void (*BB)(void *, double*, double*), - void (*Centroid)(void *, double *), - int (*InEle)(void *, double *)); + void (*BB)(void *, double*, double*), + void (*Centroid)(void *, double *), + int (*InEle)(void *, double *)); -void Octree_Delete(Octree *); -void Octree_Insert(void *, Octree *); -void Octree_Arrange(Octree *); -void * Octree_Search(double *, Octree *); -void Octree_SearchAll(double *, Octree *, std::list<void *> *); +void Octree_Delete(Octree *); +void Octree_Insert(void *, Octree *); +void Octree_Arrange(Octree *); +void *Octree_Search(double *, Octree *); +void Octree_SearchAll(double *, Octree *, std::list<void *> *); #endif diff --git a/Common/OctreeInternals.h b/Common/OctreeInternals.h index 1c95dbf00035c35efd84fc9bdbedb5db0d590f3b..11fb7d3bce433fac8dee76f835591b993e5db2df 100644 --- a/Common/OctreeInternals.h +++ b/Common/OctreeInternals.h @@ -74,8 +74,8 @@ void *searchElement(octantBucket *buckets, double *pt, InEleFunction xyzInElement); int xyzInElementBB(double *xyz, void *region, BBFunction BBElement); void insertOneBB(void *, double *, double *, octantBucket *); -void *searchAllElements(octantBucket *_buckets_head, double *_pt, globalInfo *_globalPara, - BBFunction BBElement, InEleFunction xyzInElement, - std::list<void *> *_elements); +void *searchAllElements(octantBucket *_buckets_head, double *_pt, + globalInfo *_globalPara, BBFunction BBElement, + InEleFunction xyzInElement, std::list<void *> *_elements); #endif diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 96f604fe280a2273b08115004eefda79846e1f4d..7e353766ebb752608ee4c23bb80330b8c3553a4a 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -10,7 +10,7 @@ #include "GModel.h" #include "Numeric.h" #include "HighOrder.h" - + #include "Context.h" #include "OpenFile.h" #include "CommandLine.h" @@ -30,7 +30,7 @@ #if defined(HAVE_FLTK) #include <FL/fl_ask.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #endif @@ -190,8 +190,8 @@ int ParseFile(std::string fileName, bool close, bool warnIfMissing) gmsh_yyviewindex = old_yyviewindex; #if defined(HAVE_FLTK) && !defined(HAVE_NO_POST) - if(GUI::available() && numViewsBefore != (int)PView::list.size()) - GUI::instance()->updateViews(); + if(FlGui::available() && numViewsBefore != (int)PView::list.size()) + FlGui::instance()->updateViews(); #endif return 1; @@ -223,8 +223,8 @@ int MergeFile(std::string fileName, bool warnIfMissing) SetProjectName(fileName); #if defined(HAVE_FLTK) - if(GUI::available()) - GUI::instance()->setGraphicTitle(GModel::current()->getFileName()); + if(FlGui::available()) + FlGui::instance()->setGraphicTitle(GModel::current()->getFileName()); #endif // added 'b' for pure Windows programs, since some of these files @@ -246,7 +246,7 @@ int MergeFile(std::string fileName, bool warnIfMissing) std::string noExt = split[0] + split[1], ext = split[2]; #if defined(HAVE_FLTK) - if(GUI::available()) { + if(FlGui::available()) { if(ext == ".gz") { // the real solution would be to rewrite all our I/O functions in // terms of gzFile, but until then, this is better than nothing @@ -295,7 +295,7 @@ int MergeFile(std::string fileName, bool warnIfMissing) status = GModel::current()->readMESH(fileName); } else if(ext == ".med" || ext == ".MED" || ext == ".mmed" || ext == ".MMED" || - ext == ".rmed" || ext == ".RMED"){ + ext == ".rmed" || ext == ".RMED"){ status = GModel::readMED(fileName); #if !defined(HAVE_NO_POST) if(status > 1) status = PView::readMED(fileName); @@ -340,9 +340,9 @@ int MergeFile(std::string fileName, bool warnIfMissing) GModel* tmp_model = new GModel(); tmp_model->readMSH(fileName); //tmp_model->scaleMesh(1000); - int match_status = GeomMeshMatcher::instance()->match(GModel::current(), tmp_model); + int match_status = GeomMeshMatcher::instance()->match(GModel::current(), tmp_model); if (match_status) - fileName = "out.msh"; + fileName = "out.msh"; delete tmp_model; } // MATCHER END @@ -373,8 +373,8 @@ int MergeFile(std::string fileName, bool warnIfMissing) CTX::instance()->mesh.changed = ENT_ALL; #if defined(HAVE_FLTK) && !defined(HAVE_NO_POST) - if(GUI::available() && numViewsBefore != (int)PView::list.size()) - GUI::instance()->updateViews(); + if(FlGui::available() && numViewsBefore != (int)PView::list.size()) + FlGui::instance()->updateViews(); #endif if(!status) Msg::Error("Error loading '%s'", fileName.c_str()); @@ -396,11 +396,11 @@ void ClearProject() new GModel(); SetProjectName(CTX::instance()->defaultFileName); #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->setGraphicTitle(GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); - GUI::instance()->updateViews(); - GUI::instance()->updateFields(); + if(FlGui::available()){ + FlGui::instance()->setGraphicTitle(GModel::current()->getFileName()); + FlGui::instance()->resetVisibility(); + FlGui::instance()->updateViews(); + FlGui::instance()->updateFields(); GModel::current()->setSelection(0); } #endif @@ -448,10 +448,10 @@ void OpenProject(std::string fileName) CTX::instance()->lock = 0; #if defined(HAVE_FLTK) - if(GUI::available()){ - GUI::instance()->resetVisibility(); - GUI::instance()->updateViews(); - GUI::instance()->updateFields(); + if(FlGui::available()){ + FlGui::instance()->resetVisibility(); + FlGui::instance()->updateViews(); + FlGui::instance()->updateFields(); GModel::current()->setSelection(0); } #endif @@ -461,7 +461,7 @@ void OpenProjectMacFinder(const char *fileName) { #if defined(HAVE_FLTK) static int first = 1; - if(first || !GUI::available()){ + if(first || !FlGui::available()){ // just copy the filename: it will be opened when the GUI is ready // in main() GModel::current()->setFileName(fileName); diff --git a/Common/Options.cpp b/Common/Options.cpp index e55a2a16ba31fcc664aef2f861d60b8d8095eec9..040a7225ea0ef57136b40414f7c7cae92ee21ebb 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -28,7 +28,7 @@ #if defined(HAVE_FLTK) #include <FL/Fl_Tooltip.H> -#include "GUI.h" +#include "FlGui.h" #include "Solvers.h" #include "menuWindow.h" #include "graphicWindow.h" @@ -43,7 +43,7 @@ // General routines for string options bool StringOption(int action, const char *category, int num, - const char *name, std::string &val) + const char *name, std::string &val) { StringXString *s = 0; if(!strcmp(category, "General")) @@ -156,7 +156,7 @@ static void PrintStringOptionsDoc(StringXString s[], const char *prefix, FILE *f // General routines for numeric options bool NumberOption(int action, const char *category, int num, - const char *name, double &val) + const char *name, double &val) { StringXNumber *s = 0; if(!strcmp(category, "General")) @@ -242,7 +242,7 @@ static void PrintNumberOptionsDoc(StringXNumber s[], const char *prefix, FILE * // General routines for color options bool ColorOption(int action, const char *category, int num, - const char *name, unsigned int &val) + const char *name, unsigned int &val) { StringXColor *s = 0; if(!strcmp(category, "General")) @@ -538,8 +538,8 @@ static void Sanitize_String_Texi(std::string &s) void PrintOptions(int num, int level, int diff, int help, const char *filename) { #if defined(HAVE_FLTK) - if(GUI::available()) - GUI::instance()->storeCurrentWindowsInfo(); + if(FlGui::available()) + FlGui::instance()->storeCurrentWindowsInfo(); #endif FILE *file; @@ -810,7 +810,7 @@ void PrintOptionsDoc() fprintf(file, "Options:@*\n"); fprintf(file, "@table @code\n"); for(std::map<std::string, FieldOption*>::iterator it2 = f->options.begin(); - it2 != f->options.end(); it2++){ + it2 != f->options.end(); it2++){ fprintf(file, "@item %s\n", it2->first.c_str()); std::string val; it2->second->getTextRepresentation(val); @@ -850,8 +850,8 @@ std::string opt_general_axes_label0(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesLabel[0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[6]->value (CTX::instance()->axesLabel[0].c_str()); #endif return CTX::instance()->axesLabel[0]; @@ -862,8 +862,8 @@ std::string opt_general_axes_label1(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesLabel[1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[7]->value (CTX::instance()->axesLabel[1].c_str()); #endif return CTX::instance()->axesLabel[1]; @@ -874,8 +874,8 @@ std::string opt_general_axes_label2(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesLabel[2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[8]->value (CTX::instance()->axesLabel[2].c_str()); #endif return CTX::instance()->axesLabel[2]; @@ -886,8 +886,8 @@ std::string opt_general_axes_format0(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesFormat[0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[3]->value (CTX::instance()->axesFormat[0].c_str()); #endif return CTX::instance()->axesFormat[0]; @@ -898,8 +898,8 @@ std::string opt_general_axes_format1(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesFormat[1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[4]->value (CTX::instance()->axesFormat[1].c_str()); #endif return CTX::instance()->axesFormat[1]; @@ -910,8 +910,8 @@ std::string opt_general_axes_format2(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->axesFormat[2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[5]->value (CTX::instance()->axesFormat[2].c_str()); #endif return CTX::instance()->axesFormat[2]; @@ -941,8 +941,8 @@ std::string opt_general_default_filename(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->defaultFileName = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[0]->value (CTX::instance()->defaultFileName.c_str()); #endif return CTX::instance()->defaultFileName; @@ -981,8 +981,8 @@ std::string opt_general_editor(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->editor = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[1]->value (CTX::instance()->editor.c_str()); #endif return CTX::instance()->editor; @@ -993,8 +993,8 @@ std::string opt_general_web_browser(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->webBrowser = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.input[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.input[2]->value (CTX::instance()->webBrowser.c_str()); #endif return CTX::instance()->webBrowser; @@ -1017,8 +1017,8 @@ std::string opt_general_graphics_font(OPT_ARGS_STR) CTX::instance()->glFont = GetFontName(index); CTX::instance()->glFontEnum = GetFontEnum(index); } - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.choice[1]->value(index); + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.choice[1]->value(index); } #endif return CTX::instance()->glFont; @@ -1029,8 +1029,8 @@ std::string opt_solver_socket_name(OPT_ARGS_STR) if(action & GMSH_SET) CTX::instance()->solver.socketName = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->solver.input[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->solver.input[0]->value (CTX::instance()->solver.socketName.c_str()); #endif return CTX::instance()->solver.socketName; @@ -1041,8 +1041,8 @@ std::string opt_solver_name(OPT_ARGS_STR) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].name = val; - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->solver[num]->win->label(SINFO[num].name.c_str()); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->solver[num]->win->label(SINFO[num].name.c_str()); return SINFO[num].name; #else return "undefined"; @@ -1079,8 +1079,8 @@ std::string opt_solver_executable(OPT_ARGS_STR) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].executable_name = val; - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->solver[num]->input[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->solver[num]->input[2]->value (SINFO[num].executable_name.c_str()); return SINFO[num].executable_name; #else @@ -1226,8 +1226,8 @@ std::string opt_solver_mesh_command(OPT_ARGS_STR) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].mesh_command = val; - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->solver[num]->input[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->solver[num]->input[1]->value (SINFO[num].mesh_name.c_str()); return SINFO[num].mesh_command; #else @@ -1911,8 +1911,8 @@ std::string opt_solver_fifth_button_command4(OPT_ARGS_STR) #if defined(HAVE_FLTK) int _gui_action_valid(int action, int num) { - if(!GUI::available()) return 0; - return (action & GMSH_GUI) && (num == GUI::instance()->options->view.index); + if(!FlGui::available()) return 0; + return (action & GMSH_GUI) && (num == FlGui::instance()->options->view.index); } #endif @@ -1925,14 +1925,14 @@ std::string opt_view_name(OPT_ARGS_STR) data->setName(val); #if defined(HAVE_FLTK) // change name in GUI for the view and its aliases - if(GUI::available()){ + if(FlGui::available()){ for(int i = 0; i < (int)PView::list.size(); i++){ if((i == num || PView::list[i]->getAliasOf() == view->getNum() || PView::list[i]->getNum() == view->getAliasOf()) && - i < (int)GUI::instance()->menu->toggle.size()) { - GUI::instance()->menu->toggle[i]->copy_label(data->getName().c_str()); - GUI::instance()->menu->toggle[i]->redraw(); + i < (int)FlGui::instance()->menu->toggle.size()) { + FlGui::instance()->menu->toggle[i]->copy_label(data->getName().c_str()); + FlGui::instance()->menu->toggle[i]->redraw(); } } } @@ -1940,7 +1940,7 @@ std::string opt_view_name(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.input[0]->value(data->getName().c_str()); + FlGui::instance()->options->view.input[0]->value(data->getName().c_str()); } #endif return data->getName().c_str(); @@ -1958,7 +1958,7 @@ std::string opt_view_format(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[1]->value(opt->format.c_str()); + FlGui::instance()->options->view.input[1]->value(opt->format.c_str()); #endif return opt->format; #else @@ -1986,7 +1986,7 @@ std::string opt_view_axes_label0(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[10]->value(opt->axesLabel[0].c_str()); + FlGui::instance()->options->view.input[10]->value(opt->axesLabel[0].c_str()); #endif return opt->axesLabel[0]; #else @@ -2003,7 +2003,7 @@ std::string opt_view_axes_label1(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[11]->value(opt->axesLabel[1].c_str()); + FlGui::instance()->options->view.input[11]->value(opt->axesLabel[1].c_str()); #endif return opt->axesLabel[1]; #else @@ -2020,7 +2020,7 @@ std::string opt_view_axes_label2(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[12]->value(opt->axesLabel[2].c_str()); + FlGui::instance()->options->view.input[12]->value(opt->axesLabel[2].c_str()); #endif return opt->axesLabel[2]; #else @@ -2037,7 +2037,7 @@ std::string opt_view_axes_format0(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[7]->value(opt->axesFormat[0].c_str()); + FlGui::instance()->options->view.input[7]->value(opt->axesFormat[0].c_str()); #endif return opt->axesFormat[0]; #else @@ -2054,7 +2054,7 @@ std::string opt_view_axes_format1(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[8]->value(opt->axesFormat[1].c_str()); + FlGui::instance()->options->view.input[8]->value(opt->axesFormat[1].c_str()); #endif return opt->axesFormat[1]; #else @@ -2071,7 +2071,7 @@ std::string opt_view_axes_format2(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[9]->value(opt->axesFormat[2].c_str()); + FlGui::instance()->options->view.input[9]->value(opt->axesFormat[2].c_str()); #endif return opt->axesFormat[2]; #else @@ -2089,7 +2089,7 @@ std::string opt_view_gen_raise0(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[4]->value(opt->genRaiseX.c_str()); + FlGui::instance()->options->view.input[4]->value(opt->genRaiseX.c_str()); #endif return opt->genRaiseX; #else @@ -2107,7 +2107,7 @@ std::string opt_view_gen_raise1(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[5]->value(opt->genRaiseY.c_str()); + FlGui::instance()->options->view.input[5]->value(opt->genRaiseY.c_str()); #endif return opt->genRaiseY; #else @@ -2125,7 +2125,7 @@ std::string opt_view_gen_raise2(OPT_ARGS_STR) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.input[6]->value(opt->genRaiseZ.c_str()); + FlGui::instance()->options->view.input[6]->value(opt->genRaiseZ.c_str()); #endif return opt->genRaiseZ; #else @@ -2330,8 +2330,8 @@ double opt_general_graphics_fontsize(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->glFontSize = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[12]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[12]->value (CTX::instance()->glFontSize); #endif return CTX::instance()->glFontSize; @@ -2342,8 +2342,8 @@ double opt_general_polygon_offset_always(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->polygonOffsetAlways = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[4]->value (CTX::instance()->polygonOffsetAlways); #endif return CTX::instance()->polygonOffsetAlways; @@ -2354,8 +2354,8 @@ double opt_general_polygon_offset_factor(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->polygonOffsetFactor = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[15]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[15]->value (CTX::instance()->polygonOffsetFactor); #endif return CTX::instance()->polygonOffsetFactor; @@ -2366,8 +2366,8 @@ double opt_general_polygon_offset_units(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->polygonOffsetUnits = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[16]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[16]->value (CTX::instance()->polygonOffsetUnits); #endif return CTX::instance()->polygonOffsetUnits; @@ -2392,14 +2392,14 @@ double opt_general_graphics_size0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->glSize[0] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET){ - GUI::instance()->graph[0]->win->size + FlGui::instance()->graph[0]->win->size (CTX::instance()->glSize[0], - GUI::instance()->graph[0]->win->h()); + FlGui::instance()->graph[0]->win->h()); // workaround resizing bug on Mac - GUI::instance()->graph[0]->win->size_range - (GUI::instance()->graph[0]->minWidth, GUI::instance()->graph[0]->minHeight); + FlGui::instance()->graph[0]->win->size_range + (FlGui::instance()->graph[0]->minWidth, FlGui::instance()->graph[0]->minHeight); } } #endif @@ -2411,14 +2411,14 @@ double opt_general_graphics_size1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->glSize[1] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET){ - GUI::instance()->graph[0]->win->size - (GUI::instance()->graph[0]->win->w(), - GUI::instance()->graph[0]->bottom->h() + CTX::instance()->glSize[1]); + FlGui::instance()->graph[0]->win->size + (FlGui::instance()->graph[0]->win->w(), + FlGui::instance()->graph[0]->bottom->h() + CTX::instance()->glSize[1]); // workaround resizing bug on Mac - GUI::instance()->graph[0]->win->size_range - (GUI::instance()->graph[0]->minWidth, GUI::instance()->graph[0]->minHeight); + FlGui::instance()->graph[0]->win->size_range + (FlGui::instance()->graph[0]->minWidth, FlGui::instance()->graph[0]->minHeight); } } #endif @@ -2521,8 +2521,8 @@ double opt_general_message_auto_scroll(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->msgAutoScroll = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->messages->butt->value(CTX::instance()->msgAutoScroll); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->messages->butt->value(CTX::instance()->msgAutoScroll); #endif return CTX::instance()->msgAutoScroll; } @@ -2658,8 +2658,8 @@ double opt_general_session_save(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->sessionSave = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[8]->value (CTX::instance()->sessionSave); #endif return CTX::instance()->sessionSave; @@ -2670,8 +2670,8 @@ double opt_general_options_save(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->optionsSave = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[9]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[9]->value (CTX::instance()->optionsSave); #endif return CTX::instance()->optionsSave; @@ -2682,8 +2682,8 @@ double opt_general_confirm_overwrite(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->confirmOverwrite = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[14]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[14]->value (CTX::instance()->confirmOverwrite); #endif return CTX::instance()->confirmOverwrite; @@ -2694,10 +2694,10 @@ double opt_general_rotation0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpRotation[0] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[0] = val; - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[0]; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[0] = val; + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[0]; } #endif return CTX::instance()->tmpRotation[0]; @@ -2708,10 +2708,10 @@ double opt_general_rotation1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpRotation[1] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[1] = val; - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[1]; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[1] = val; + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[1]; } #endif return CTX::instance()->tmpRotation[1]; @@ -2722,10 +2722,10 @@ double opt_general_rotation2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpRotation[2] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[2] = val; - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->r[2]; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[2] = val; + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->r[2]; } #endif return CTX::instance()->tmpRotation[2]; @@ -2736,8 +2736,8 @@ double opt_general_rotation_center0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->rotationCenter[0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[8]->value (CTX::instance()->rotationCenter[0]); #endif return CTX::instance()->rotationCenter[0]; @@ -2748,8 +2748,8 @@ double opt_general_rotation_center1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->rotationCenter[1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[9]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[9]->value (CTX::instance()->rotationCenter[1]); #endif return CTX::instance()->rotationCenter[1]; @@ -2760,8 +2760,8 @@ double opt_general_rotation_center2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->rotationCenter[2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[10]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[10]->value (CTX::instance()->rotationCenter[2]); #endif return CTX::instance()->rotationCenter[2]; @@ -2772,12 +2772,12 @@ double opt_general_quaternion0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpQuaternion[0] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[0] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[0] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[0]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[0]; } #endif return CTX::instance()->tmpQuaternion[0]; @@ -2788,12 +2788,12 @@ double opt_general_quaternion1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpQuaternion[1] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[1] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[1] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[1]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[1]; } #endif return CTX::instance()->tmpQuaternion[1]; @@ -2804,12 +2804,12 @@ double opt_general_quaternion2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpQuaternion[2] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[2] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[2] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[2]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[2]; } #endif return CTX::instance()->tmpQuaternion[2]; @@ -2820,12 +2820,12 @@ double opt_general_quaternion3(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpQuaternion[3] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[3] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[3] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[3]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->quaternion[3]; } #endif return CTX::instance()->tmpQuaternion[3]; @@ -2836,12 +2836,12 @@ double opt_general_translation0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpTranslation[0] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[0] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[0] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[0]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[0]; } #endif return CTX::instance()->tmpTranslation[0]; @@ -2852,12 +2852,12 @@ double opt_general_translation1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpTranslation[1] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[1] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[1] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[1]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[1]; } #endif return CTX::instance()->tmpTranslation[1]; @@ -2868,12 +2868,12 @@ double opt_general_translation2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpTranslation[2] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[2] = val; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[2] = val; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->t[2]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->t[2]; } #endif return CTX::instance()->tmpTranslation[2]; @@ -2884,12 +2884,12 @@ double opt_general_scale0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpScale[0] = val ? val : 1.0; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[0] = val ? val : 1.0; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[0] = val ? val : 1.0; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[0]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[0]; } #endif return CTX::instance()->tmpScale[0]; @@ -2900,12 +2900,12 @@ double opt_general_scale1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpScale[1] = val ? val : 1.0; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[1] = val ? val : 1.0; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[1] = val ? val : 1.0; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[1]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[1]; } #endif return CTX::instance()->tmpScale[1]; @@ -2916,12 +2916,12 @@ double opt_general_scale2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->tmpScale[2] = val ? val : 1.0; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_SET) - GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[2] = val ? val : 1.0; + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[2] = val ? val : 1.0; if(action & GMSH_GUI) - GUI::instance()->manip->update(); - return GUI::instance()->graph[0]->gl[0]->getDrawContext()->s[2]; + FlGui::instance()->manip->update(); + return FlGui::instance()->graph[0]->gl[0]->getDrawContext()->s[2]; } #endif return CTX::instance()->tmpScale[2]; @@ -2937,8 +2937,8 @@ double opt_general_clip_factor(OPT_ARGS_NUM) CTX::instance()->clipFactor = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[14]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[14]->value (CTX::instance()->clipFactor); #endif return CTX::instance()->clipFactor; @@ -2949,8 +2949,8 @@ double opt_general_point_size(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->pointSize = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[6]->value (CTX::instance()->pointSize); #endif return CTX::instance()->pointSize; @@ -2961,8 +2961,8 @@ double opt_general_line_width(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->lineWidth = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[7]->value (CTX::instance()->lineWidth); #endif return CTX::instance()->lineWidth; @@ -2973,8 +2973,8 @@ double opt_general_shine(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->shine = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[1]->value (CTX::instance()->shine); #endif return CTX::instance()->shine; @@ -2985,8 +2985,8 @@ double opt_general_shine_exponent(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->shineExponent = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[0]->value (CTX::instance()->shineExponent); #endif return CTX::instance()->shineExponent; @@ -2998,8 +2998,8 @@ double opt_general_verbosity(OPT_ARGS_NUM) Msg::SetVerbosity((int)val); } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[5]->value (Msg::GetVerbosity()); #endif return Msg::GetVerbosity(); @@ -3024,8 +3024,8 @@ double opt_general_terminal(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->terminal = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[7]->value (CTX::instance()->terminal); #endif return CTX::instance()->terminal; @@ -3043,8 +3043,8 @@ double opt_general_tooltips(OPT_ARGS_NUM) #endif } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[13]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[13]->value (CTX::instance()->tooltips); #endif return CTX::instance()->tooltips; @@ -3055,15 +3055,15 @@ double opt_general_orthographic(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->ortho = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { + if(FlGui::available() && (action & GMSH_GUI)) { if(CTX::instance()->ortho){ - GUI::instance()->options->general.choice[2]->value(0); - if(GUI::available()) + FlGui::instance()->options->general.choice[2]->value(0); + if(FlGui::available()) Msg::StatusBar(2, false, "Orthographic projection"); } else{ - GUI::instance()->options->general.choice[2]->value(1); - if(GUI::available()) + FlGui::instance()->options->general.choice[2]->value(1); + if(FlGui::available()) Msg::StatusBar(2, false, "Perspective projection"); } } @@ -3076,21 +3076,21 @@ double opt_general_mouse_selection(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mouseSelection = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { + if(FlGui::available() && (action & GMSH_GUI)) { if(CTX::instance()->mouseSelection){ - if(GUI::available()) + if(FlGui::available()) Msg::StatusBar(2, false, "Mouse selection ON"); - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->butt[9]->color(FL_BACKGROUND_COLOR); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->butt[9]->color(FL_BACKGROUND_COLOR); } else{ - if(GUI::available()) + if(FlGui::available()) Msg::StatusBar(2, false, "Mouse selection OFF"); - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->butt[9]->color(FL_RED); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->butt[9]->color(FL_RED); } - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->butt[9]->redraw(); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->butt[9]->redraw(); } #endif return CTX::instance()->mouseSelection; @@ -3101,8 +3101,8 @@ double opt_general_mouse_hover_meshes(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mouseHoverMeshes = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[11]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[11]->value (CTX::instance()->mouseHoverMeshes); #endif return CTX::instance()->mouseHoverMeshes; @@ -3113,10 +3113,10 @@ double opt_general_fast_redraw(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->fastRedraw = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.butt[2]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.butt[2]->value (CTX::instance()->fastRedraw); - GUI::instance()->options->activate("fast_redraw"); + FlGui::instance()->options->activate("fast_redraw"); } #endif return CTX::instance()->fastRedraw; @@ -3127,8 +3127,8 @@ double opt_general_draw_bounding_box(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->drawBBox = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[6]->value (CTX::instance()->drawBBox); #endif return CTX::instance()->drawBBox; @@ -3178,10 +3178,10 @@ double opt_general_axes(OPT_ARGS_NUM) CTX::instance()->axes = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.choice[4]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.choice[4]->value (CTX::instance()->axes); - GUI::instance()->options->activate("general_axes"); + FlGui::instance()->options->activate("general_axes"); } #endif return CTX::instance()->axes; @@ -3193,8 +3193,8 @@ double opt_general_axes_mikado(OPT_ARGS_NUM) CTX::instance()->axesMikado = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[16]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[16]->value (CTX::instance()->axesMikado); #endif return CTX::instance()->axesMikado; @@ -3205,10 +3205,10 @@ double opt_general_axes_auto_position(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesAutoPosition = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.butt[0]->value (CTX::instance()->axesAutoPosition); - GUI::instance()->options->activate("general_axes_auto"); + FlGui::instance()->options->activate("general_axes_auto"); } #endif return CTX::instance()->axesAutoPosition; @@ -3219,8 +3219,8 @@ double opt_general_axes_tics0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesTics[0] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[17]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[17]->value (CTX::instance()->axesTics[0]); #endif return CTX::instance()->axesTics[0]; @@ -3231,8 +3231,8 @@ double opt_general_axes_tics1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesTics[1] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[18]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[18]->value (CTX::instance()->axesTics[1]); #endif return CTX::instance()->axesTics[1]; @@ -3243,8 +3243,8 @@ double opt_general_axes_tics2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesTics[2] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[19]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[19]->value (CTX::instance()->axesTics[2]); #endif return CTX::instance()->axesTics[2]; @@ -3255,8 +3255,8 @@ double opt_general_axes_xmin(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[20]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[20]->value (CTX::instance()->axesPosition[0]); #endif return CTX::instance()->axesPosition[0]; @@ -3267,8 +3267,8 @@ double opt_general_axes_xmax(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[23]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[23]->value (CTX::instance()->axesPosition[1]); #endif return CTX::instance()->axesPosition[1]; @@ -3279,8 +3279,8 @@ double opt_general_axes_ymin(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[21]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[21]->value (CTX::instance()->axesPosition[2]); #endif return CTX::instance()->axesPosition[2]; @@ -3291,8 +3291,8 @@ double opt_general_axes_ymax(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[24]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[24]->value (CTX::instance()->axesPosition[3]); #endif return CTX::instance()->axesPosition[3]; @@ -3303,8 +3303,8 @@ double opt_general_axes_zmin(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[4] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[22]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[22]->value (CTX::instance()->axesPosition[4]); #endif return CTX::instance()->axesPosition[4]; @@ -3315,8 +3315,8 @@ double opt_general_axes_zmax(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->axesPosition[5] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[25]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[25]->value (CTX::instance()->axesPosition[5]); #endif return CTX::instance()->axesPosition[5]; @@ -3327,10 +3327,10 @@ double opt_general_small_axes(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->smallAxes = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.butt[1]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.butt[1]->value (CTX::instance()->smallAxes); - GUI::instance()->options->activate("general_small_axes"); + FlGui::instance()->options->activate("general_small_axes"); } #endif return CTX::instance()->smallAxes; @@ -3341,8 +3341,8 @@ double opt_general_small_axes_position0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->smallAxesPos[0] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[26]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[26]->value (CTX::instance()->smallAxesPos[0]); #endif return CTX::instance()->smallAxesPos[0]; @@ -3353,8 +3353,8 @@ double opt_general_small_axes_position1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->smallAxesPos[1] = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[27]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[27]->value (CTX::instance()->smallAxesPos[1]); #endif return CTX::instance()->smallAxesPos[1]; @@ -3372,10 +3372,10 @@ double opt_general_quadric_subdivisions(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->quadricSubdivisions = (int)val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_GUI) - GUI::instance()->options->general.value[11]->value - (CTX::instance()->quadricSubdivisions); + FlGui::instance()->options->general.value[11]->value + (CTX::instance()->quadricSubdivisions); } #endif return CTX::instance()->quadricSubdivisions; @@ -3386,18 +3386,18 @@ double opt_general_double_buffer(OPT_ARGS_NUM) if(action & GMSH_SET) { CTX::instance()->db = (int)val; #if defined(HAVE_FLTK) - if(GUI::available()) { + if(FlGui::available()) { int mode = FL_RGB | FL_DEPTH | (CTX::instance()->db ? FL_DOUBLE : FL_SINGLE); if(CTX::instance()->antialiasing) mode |= FL_MULTISAMPLE; - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++) - GUI::instance()->graph[i]->gl[j]->mode(mode); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++) + FlGui::instance()->graph[i]->gl[j]->mode(mode); } #endif } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[3]->value (CTX::instance()->db); #endif return CTX::instance()->db; @@ -3408,18 +3408,18 @@ double opt_general_antialiasing(OPT_ARGS_NUM) if(action & GMSH_SET) { CTX::instance()->antialiasing = (int)val; #if defined(HAVE_FLTK) - if(GUI::available()) { + if(FlGui::available()) { int mode = FL_RGB | FL_DEPTH | (CTX::instance()->db ? FL_DOUBLE : FL_SINGLE); if(CTX::instance()->antialiasing) mode |= FL_MULTISAMPLE; - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++) - GUI::instance()->graph[i]->gl[j]->mode(mode); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++) + FlGui::instance()->graph[i]->gl[j]->mode(mode); } #endif } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[12]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[12]->value (CTX::instance()->antialiasing); #endif return CTX::instance()->antialiasing; @@ -3440,8 +3440,8 @@ double opt_general_vector_type(OPT_ARGS_NUM) CTX::instance()->vectorType = 1; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.choice[0]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.choice[0]->value (CTX::instance()->vectorType - 1); } #endif @@ -3515,8 +3515,8 @@ double opt_general_color_scheme(OPT_ARGS_NUM) #endif } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.choice[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.choice[3]->value (CTX::instance()->colorScheme); #endif return CTX::instance()->colorScheme; @@ -3530,8 +3530,8 @@ double opt_general_background_gradient(OPT_ARGS_NUM) CTX::instance()->bgGradient = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.choice[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.choice[5]->value (CTX::instance()->bgGradient); #endif return CTX::instance()->bgGradient; @@ -3556,8 +3556,8 @@ double opt_general_trackball(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->useTrackball = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[5]->value (CTX::instance()->useTrackball); #endif return CTX::instance()->useTrackball; @@ -3568,10 +3568,10 @@ double opt_general_rotation_center_cg(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->rotationCenterCg = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.butt[15]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.butt[15]->value (CTX::instance()->rotationCenterCg); - GUI::instance()->options->activate("rotation_center"); + FlGui::instance()->options->activate("rotation_center"); } #endif return CTX::instance()->rotationCenterCg; @@ -3589,8 +3589,8 @@ double opt_general_expert_mode(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->expertMode = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.butt[10]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.butt[10]->value (CTX::instance()->expertMode); #endif return CTX::instance()->expertMode; @@ -3601,8 +3601,8 @@ double opt_general_clip0a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[0][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[0][0]; } @@ -3612,8 +3612,8 @@ double opt_general_clip0b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[0][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[0][1]; } @@ -3623,8 +3623,8 @@ double opt_general_clip0c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[0][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[0][2]; } @@ -3634,8 +3634,8 @@ double opt_general_clip0d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[0][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[0][3]; } @@ -3645,8 +3645,8 @@ double opt_general_clip1a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[1][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[1][0]; } @@ -3656,8 +3656,8 @@ double opt_general_clip1b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[1][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[1][1]; } @@ -3667,8 +3667,8 @@ double opt_general_clip1c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[1][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[1][2]; } @@ -3678,8 +3678,8 @@ double opt_general_clip1d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[1][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[1][3]; } @@ -3689,8 +3689,8 @@ double opt_general_clip2a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[2][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[2][0]; } @@ -3700,8 +3700,8 @@ double opt_general_clip2b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[2][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[2][1]; } @@ -3711,8 +3711,8 @@ double opt_general_clip2c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[2][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[2][2]; } @@ -3722,8 +3722,8 @@ double opt_general_clip2d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[2][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[2][3]; } @@ -3733,8 +3733,8 @@ double opt_general_clip3a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[3][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[3][0]; } @@ -3744,8 +3744,8 @@ double opt_general_clip3b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[3][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[3][1]; } @@ -3755,8 +3755,8 @@ double opt_general_clip3c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[3][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[3][2]; } @@ -3766,8 +3766,8 @@ double opt_general_clip3d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[3][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[3][3]; } @@ -3777,8 +3777,8 @@ double opt_general_clip4a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[4][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[4][0]; } @@ -3788,8 +3788,8 @@ double opt_general_clip4b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[4][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[4][1]; } @@ -3799,8 +3799,8 @@ double opt_general_clip4c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[4][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[4][2]; } @@ -3810,8 +3810,8 @@ double opt_general_clip4d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[4][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[4][3]; } @@ -3821,8 +3821,8 @@ double opt_general_clip5a(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[5][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[5][0]; } @@ -3832,8 +3832,8 @@ double opt_general_clip5b(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[5][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[5][1]; } @@ -3843,8 +3843,8 @@ double opt_general_clip5c(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[5][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[5][2]; } @@ -3854,8 +3854,8 @@ double opt_general_clip5d(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipPlane[5][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->clipPlane[5][3]; } @@ -3865,10 +3865,10 @@ double opt_general_clip_whole_elements(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipWholeElements = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->clipping->butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->clipping->butt[0]->value (CTX::instance()->clipWholeElements); - GUI::instance()->options->activate("clip_whole_elements"); + FlGui::instance()->options->activate("clip_whole_elements"); } #endif return CTX::instance()->clipWholeElements; @@ -3879,8 +3879,8 @@ double opt_general_clip_only_draw_intersecting_volume(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipOnlyDrawIntersectingVolume = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->butt[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->butt[1]->value (CTX::instance()->clipOnlyDrawIntersectingVolume); #endif return CTX::instance()->clipOnlyDrawIntersectingVolume; @@ -3891,8 +3891,8 @@ double opt_general_clip_only_volume(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->clipOnlyVolume = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->butt[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->butt[2]->value (CTX::instance()->clipOnlyVolume); #endif return CTX::instance()->clipOnlyVolume; @@ -3910,10 +3910,10 @@ double opt_general_light00(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->lightPosition[0][0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.value[2]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.value[2]->value (CTX::instance()->lightPosition[0][0]); - GUI::instance()->options->general.sphere->setValue + FlGui::instance()->options->general.sphere->setValue (CTX::instance()->lightPosition[0][0], CTX::instance()->lightPosition[0][1], CTX::instance()->lightPosition[0][2]); @@ -3927,10 +3927,10 @@ double opt_general_light01(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->lightPosition[0][1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.value[3]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.value[3]->value (CTX::instance()->lightPosition[0][1]); - GUI::instance()->options->general.sphere->setValue + FlGui::instance()->options->general.sphere->setValue (CTX::instance()->lightPosition[0][0], CTX::instance()->lightPosition[0][1], CTX::instance()->lightPosition[0][2]); @@ -3944,10 +3944,10 @@ double opt_general_light02(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->lightPosition[0][2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->general.value[4]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->general.value[4]->value (CTX::instance()->lightPosition[0][2]); - GUI::instance()->options->general.sphere->setValue + FlGui::instance()->options->general.sphere->setValue (CTX::instance()->lightPosition[0][0], CTX::instance()->lightPosition[0][1], CTX::instance()->lightPosition[0][2]); @@ -3961,8 +3961,8 @@ double opt_general_light03(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->lightPosition[0][3] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->general.value[13]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->general.value[13]->value (CTX::instance()->lightPosition[0][3]); #endif return CTX::instance()->lightPosition[0][3]; @@ -4152,24 +4152,24 @@ double opt_geometry_transform(OPT_ARGS_NUM) CTX::instance()->geom.useTransform = 0; } #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_GUI) - GUI::instance()->options->geo.choice[3]->value - (CTX::instance()->geom.useTransform); + FlGui::instance()->options->geo.choice[3]->value + (CTX::instance()->geom.useTransform); if(action & GMSH_SET){ if(CTX::instance()->geom.useTransform == 1){ drawTransform *tr = new drawTransformScaled (CTX::instance()->geom.transform, CTX::instance()->geom.offset); - GUI::instance()->graph[0]->gl[0]->getDrawContext()->setTransform(tr); + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->setTransform(tr); } else{ - drawTransform *tr = GUI::instance()->graph[0]->gl[0]-> + drawTransform *tr = FlGui::instance()->graph[0]->gl[0]-> getDrawContext()->getTransform(); - GUI::instance()->graph[0]->gl[0]->getDrawContext()->setTransform(0); + FlGui::instance()->graph[0]->gl[0]->getDrawContext()->setTransform(0); if(tr) delete tr; } } - GUI::instance()->options->activate("geo_transform"); + FlGui::instance()->options->activate("geo_transform"); } #endif return CTX::instance()->geom.useTransform; @@ -4180,12 +4180,12 @@ static double _opt_geometry_transform(OPT_ARGS_NUM, int ii, int jj, int nn) if(action & GMSH_SET) CTX::instance()->geom.transform[ii][jj] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_GUI) - GUI::instance()->options->geo.value[nn]->value - (CTX::instance()->geom.transform[ii][jj]); + FlGui::instance()->options->geo.value[nn]->value + (CTX::instance()->geom.transform[ii][jj]); if(action & GMSH_SET){ - drawTransform *tr = GUI::instance()->graph[0]->gl[0]-> + drawTransform *tr = FlGui::instance()->graph[0]->gl[0]-> getDrawContext()->getTransform(); if(tr) tr->setMatrix(CTX::instance()->geom.transform, CTX::instance()->geom.offset); @@ -4245,12 +4245,12 @@ static double _opt_geometry_offset(OPT_ARGS_NUM, int ii, int nn) if(action & GMSH_SET) CTX::instance()->geom.offset[ii] = val; #if defined(HAVE_FLTK) - if(GUI::available()){ + if(FlGui::available()){ if(action & GMSH_GUI) - GUI::instance()->options->geo.value[nn]->value - (CTX::instance()->geom.offset[ii]); + FlGui::instance()->options->geo.value[nn]->value + (CTX::instance()->geom.offset[ii]); if(action & GMSH_SET){ - drawTransform *tr = GUI::instance()->graph[0]->gl[0]-> + drawTransform *tr = FlGui::instance()->graph[0]->gl[0]-> getDrawContext()->getTransform(); if(tr) tr->setMatrix(CTX::instance()->geom.transform, CTX::instance()->geom.offset); @@ -4280,8 +4280,8 @@ double opt_geometry_auto_coherence(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.autoCoherence = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[8]->value (CTX::instance()->geom.autoCoherence); #endif return CTX::instance()->geom.autoCoherence; @@ -4292,8 +4292,8 @@ double opt_geometry_highlight_orphans(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.highlightOrphans = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[10]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[10]->value (CTX::instance()->geom.highlightOrphans); #endif return CTX::instance()->geom.highlightOrphans; @@ -4304,8 +4304,8 @@ double opt_geometry_tolerance(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.tolerance = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[2]->value (CTX::instance()->geom.tolerance); #endif return CTX::instance()->geom.tolerance; @@ -4316,8 +4316,8 @@ double opt_geometry_normals(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.normals = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[0]->value (CTX::instance()->geom.normals); #endif return CTX::instance()->geom.normals; @@ -4328,8 +4328,8 @@ double opt_geometry_tangents(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.tangents = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[1]->value (CTX::instance()->geom.tangents); #endif return CTX::instance()->geom.tangents; @@ -4340,8 +4340,8 @@ double opt_geometry_points(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.points = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[0]->value (CTX::instance()->geom.points); #endif return CTX::instance()->geom.points; @@ -4352,8 +4352,8 @@ double opt_geometry_lines(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.lines = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[1]->value (CTX::instance()->geom.lines); #endif return CTX::instance()->geom.lines; @@ -4364,8 +4364,8 @@ double opt_geometry_surfaces(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.surfaces = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[2]->value (CTX::instance()->geom.surfaces); #endif return CTX::instance()->geom.surfaces; @@ -4376,8 +4376,8 @@ double opt_geometry_volumes(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.volumes = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[3]->value (CTX::instance()->geom.volumes); #endif return CTX::instance()->geom.volumes; @@ -4388,8 +4388,8 @@ double opt_geometry_points_num(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.pointsNum = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[4]->value (CTX::instance()->geom.pointsNum); #endif return CTX::instance()->geom.pointsNum; @@ -4400,8 +4400,8 @@ double opt_geometry_lines_num(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.linesNum = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[5]->value (CTX::instance()->geom.linesNum); #endif return CTX::instance()->geom.linesNum; @@ -4412,8 +4412,8 @@ double opt_geometry_surfaces_num(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.surfacesNum = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[6]->value (CTX::instance()->geom.surfacesNum); #endif return CTX::instance()->geom.surfacesNum; @@ -4424,8 +4424,8 @@ double opt_geometry_volumes_num(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.volumesNum = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[7]->value (CTX::instance()->geom.volumesNum); #endif return CTX::instance()->geom.volumesNum; @@ -4436,8 +4436,8 @@ double opt_geometry_point_size(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.pointSize = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[3]->value (CTX::instance()->geom.pointSize); #endif return CTX::instance()->geom.pointSize; @@ -4448,8 +4448,8 @@ double opt_geometry_point_sel_size(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.selectedPointSize = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[5]->value (CTX::instance()->geom.selectedPointSize); #endif return CTX::instance()->geom.selectedPointSize; @@ -4461,8 +4461,8 @@ double opt_geometry_point_type(OPT_ARGS_NUM) CTX::instance()->geom.pointType = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.choice[0]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.choice[0]->value (CTX::instance()->geom.pointType); } #endif @@ -4474,8 +4474,8 @@ double opt_geometry_line_width(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.lineWidth = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[4]->value (CTX::instance()->geom.lineWidth); #endif return CTX::instance()->geom.lineWidth; @@ -4486,8 +4486,8 @@ double opt_geometry_line_sel_width(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.selectedLineWidth = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.value[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.value[6]->value (CTX::instance()->geom.selectedLineWidth); #endif return CTX::instance()->geom.selectedLineWidth; @@ -4499,8 +4499,8 @@ double opt_geometry_line_type(OPT_ARGS_NUM) CTX::instance()->geom.lineType = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.choice[1]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.choice[1]->value (CTX::instance()->geom.lineType); } #endif @@ -4516,8 +4516,8 @@ double opt_geometry_surface_type(OPT_ARGS_NUM) CTX::instance()->geom.surfaceType = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.choice[2]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.choice[2]->value (CTX::instance()->geom.surfaceType); } #endif @@ -4529,8 +4529,8 @@ double opt_geometry_light(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.light = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.butt[9]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.butt[9]->value (CTX::instance()->geom.light); } #endif @@ -4542,8 +4542,8 @@ double opt_geometry_light_two_side(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.lightTwoSide = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->geo.butt[14]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->geo.butt[14]->value (CTX::instance()->geom.lightTwoSide); #endif return CTX::instance()->geom.lightTwoSide; @@ -4554,8 +4554,8 @@ double opt_geometry_occ_fix_small_edges(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.occFixSmallEdges = val ? 1 : 0; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.butt[11]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.butt[11]->value (CTX::instance()->geom.occFixSmallEdges); } #endif @@ -4567,8 +4567,8 @@ double opt_geometry_occ_fix_small_faces(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.occFixSmallFaces = val ? 1 : 0; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.butt[12]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.butt[12]->value (CTX::instance()->geom.occFixSmallFaces); } #endif @@ -4580,8 +4580,8 @@ double opt_geometry_occ_sew_faces(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.occSewFaces = val ? 1 : 0; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.butt[13]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.butt[13]->value (CTX::instance()->geom.occSewFaces); } #endif @@ -4593,8 +4593,8 @@ double opt_geometry_occ_connect_faces(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.occConnectFaces = val ? 1 : 0; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->geo.butt[15]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->geo.butt[15]->value (CTX::instance()->geom.occConnectFaces); } #endif @@ -4648,8 +4648,8 @@ double opt_geometry_snap0(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.snap[0] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->geoContext->value[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->geoContext->value[0]->value (CTX::instance()->geom.snap[0]); #endif return CTX::instance()->geom.snap[0]; @@ -4660,8 +4660,8 @@ double opt_geometry_snap1(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.snap[1] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->geoContext->value[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->geoContext->value[1]->value (CTX::instance()->geom.snap[1]); #endif return CTX::instance()->geom.snap[1]; @@ -4672,8 +4672,8 @@ double opt_geometry_snap2(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.snap[2] = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->geoContext->value[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->geoContext->value[2]->value (CTX::instance()->geom.snap[2]); #endif return CTX::instance()->geom.snap[2]; @@ -4684,8 +4684,8 @@ double opt_geometry_clip(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->geom.clip = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->geom.clip; } @@ -4716,8 +4716,8 @@ double opt_mesh_optimize(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.optimize = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[2]->value (CTX::instance()->mesh.optimize); #endif return CTX::instance()->mesh.optimize; @@ -4728,8 +4728,8 @@ double opt_mesh_optimize_netgen(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.optimizeNetgen = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[24]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[24]->value (CTX::instance()->mesh.optimizeNetgen); #endif return CTX::instance()->mesh.optimizeNetgen; @@ -4748,8 +4748,8 @@ double opt_mesh_normals(OPT_ARGS_NUM) CTX::instance()->mesh.normals = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[8]->value (CTX::instance()->mesh.normals); #endif return CTX::instance()->mesh.normals; @@ -4768,8 +4768,8 @@ double opt_mesh_tangents(OPT_ARGS_NUM) CTX::instance()->mesh.tangents = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[13]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[13]->value (CTX::instance()->mesh.tangents); #endif return CTX::instance()->mesh.tangents; @@ -4783,8 +4783,8 @@ double opt_mesh_explode(OPT_ARGS_NUM) CTX::instance()->mesh.explode = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[9]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[9]->value (CTX::instance()->mesh.explode); #endif return CTX::instance()->mesh.explode; @@ -4804,8 +4804,8 @@ double opt_mesh_lc_factor(OPT_ARGS_NUM) CTX::instance()->mesh.lcFactor = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[2]->value (CTX::instance()->mesh.lcFactor); #endif return CTX::instance()->mesh.lcFactor; @@ -4816,8 +4816,8 @@ double opt_mesh_lc_min(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lcMin = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[25]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[25]->value (CTX::instance()->mesh.lcMin); #endif return CTX::instance()->mesh.lcMin; @@ -4828,8 +4828,8 @@ double opt_mesh_lc_max(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lcMax = val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[26]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[26]->value (CTX::instance()->mesh.lcMax); #endif return CTX::instance()->mesh.lcMax; @@ -4847,8 +4847,8 @@ double opt_mesh_lc_from_curvature(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lcFromCurvature = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[1]->value (CTX::instance()->mesh.lcFromCurvature ? 1 : 0); #endif return CTX::instance()->mesh.lcFromCurvature; @@ -4859,8 +4859,8 @@ double opt_mesh_lc_from_points(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lcFromPoints = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[5]->value (CTX::instance()->mesh.lcFromPoints ? 1 : 0); #endif return CTX::instance()->mesh.lcFromPoints; @@ -4871,8 +4871,8 @@ double opt_mesh_lc_extend_from_boundary(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lcExtendFromBoundary = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[16]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[16]->value (CTX::instance()->mesh.lcExtendFromBoundary ? 1 : 0); #endif return CTX::instance()->mesh.lcExtendFromBoundary; @@ -4902,8 +4902,8 @@ double opt_mesh_quality_type(OPT_ARGS_NUM) CTX::instance()->mesh.qualityType = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->mesh.choice[6]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->mesh.choice[6]->value (CTX::instance()->mesh.qualityType); } #endif @@ -4918,8 +4918,8 @@ double opt_mesh_quality_inf(OPT_ARGS_NUM) CTX::instance()->mesh.qualityInf = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[4]->value (CTX::instance()->mesh.qualityInf); #endif return CTX::instance()->mesh.qualityInf; @@ -4933,8 +4933,8 @@ double opt_mesh_quality_sup(OPT_ARGS_NUM) CTX::instance()->mesh.qualitySup = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[5]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[5]->value (CTX::instance()->mesh.qualitySup); #endif return CTX::instance()->mesh.qualitySup; @@ -4948,8 +4948,8 @@ double opt_mesh_radius_inf(OPT_ARGS_NUM) CTX::instance()->mesh.radiusInf = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[6]->value (CTX::instance()->mesh.radiusInf); #endif return CTX::instance()->mesh.radiusInf; @@ -4963,8 +4963,8 @@ double opt_mesh_radius_sup(OPT_ARGS_NUM) CTX::instance()->mesh.radiusSup = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[7]->value (CTX::instance()->mesh.radiusSup); #endif return CTX::instance()->mesh.radiusSup; @@ -4978,8 +4978,8 @@ double opt_mesh_label_type(OPT_ARGS_NUM) CTX::instance()->mesh.labelType = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->mesh.choice[7]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->mesh.choice[7]->value (CTX::instance()->mesh.labelType); } #endif @@ -4992,8 +4992,8 @@ double opt_mesh_points(OPT_ARGS_NUM) CTX::instance()->mesh.points = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[6]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[6]->value (CTX::instance()->mesh.points); #endif return CTX::instance()->mesh.points; @@ -5007,8 +5007,8 @@ double opt_mesh_lines(OPT_ARGS_NUM) CTX::instance()->mesh.lines = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[7]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[7]->value (CTX::instance()->mesh.lines); #endif return CTX::instance()->mesh.lines; @@ -5022,11 +5022,11 @@ double opt_mesh_triangles(OPT_ARGS_NUM) CTX::instance()->mesh.triangles = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.triangles) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[0].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[0].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[0].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[0].clear(); } #endif return CTX::instance()->mesh.triangles; @@ -5040,11 +5040,11 @@ double opt_mesh_quadrangles(OPT_ARGS_NUM) CTX::instance()->mesh.quadrangles = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.quadrangles) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[1].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[1].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[1].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[1].clear(); } #endif return CTX::instance()->mesh.quadrangles; @@ -5058,11 +5058,11 @@ double opt_mesh_tetrahedra(OPT_ARGS_NUM) CTX::instance()->mesh.tetrahedra = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.tetrahedra) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[2].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[2].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[2].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[2].clear(); } #endif return CTX::instance()->mesh.tetrahedra; @@ -5076,11 +5076,11 @@ double opt_mesh_hexahedra(OPT_ARGS_NUM) CTX::instance()->mesh.hexahedra = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.hexahedra) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[3].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[3].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[3].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[3].clear(); } #endif return CTX::instance()->mesh.hexahedra; @@ -5094,11 +5094,11 @@ double opt_mesh_prisms(OPT_ARGS_NUM) CTX::instance()->mesh.prisms = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.prisms) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[4].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[4].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[4].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[4].clear(); } #endif return CTX::instance()->mesh.prisms; @@ -5112,11 +5112,11 @@ double opt_mesh_pyramids(OPT_ARGS_NUM) CTX::instance()->mesh.pyramids = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(CTX::instance()->mesh.pyramids) - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[5].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[5].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->mesh.menu->menu())[5].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->mesh.menu->menu())[5].clear(); } #endif return CTX::instance()->mesh.pyramids; @@ -5130,8 +5130,8 @@ double opt_mesh_surfaces_edges(OPT_ARGS_NUM) CTX::instance()->mesh.surfacesEdges = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[8]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[8]->value (CTX::instance()->mesh.surfacesEdges); #endif return CTX::instance()->mesh.surfacesEdges; @@ -5145,8 +5145,8 @@ double opt_mesh_surfaces_faces(OPT_ARGS_NUM) CTX::instance()->mesh.surfacesFaces = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[9]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[9]->value (CTX::instance()->mesh.surfacesFaces); #endif return CTX::instance()->mesh.surfacesFaces; @@ -5160,8 +5160,8 @@ double opt_mesh_volumes_edges(OPT_ARGS_NUM) CTX::instance()->mesh.volumesEdges = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[10]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[10]->value (CTX::instance()->mesh.volumesEdges); #endif return CTX::instance()->mesh.volumesEdges; @@ -5175,8 +5175,8 @@ double opt_mesh_volumes_faces(OPT_ARGS_NUM) CTX::instance()->mesh.volumesFaces = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[11]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[11]->value (CTX::instance()->mesh.volumesFaces); #endif return CTX::instance()->mesh.volumesFaces; @@ -5188,8 +5188,8 @@ double opt_mesh_points_num(OPT_ARGS_NUM) CTX::instance()->mesh.pointsNum = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[12]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[12]->value (CTX::instance()->mesh.pointsNum); #endif return CTX::instance()->mesh.pointsNum; @@ -5201,8 +5201,8 @@ double opt_mesh_lines_num(OPT_ARGS_NUM) CTX::instance()->mesh.linesNum = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[13]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[13]->value (CTX::instance()->mesh.linesNum); #endif return CTX::instance()->mesh.linesNum; @@ -5214,8 +5214,8 @@ double opt_mesh_surfaces_num(OPT_ARGS_NUM) CTX::instance()->mesh.surfacesNum = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[14]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[14]->value (CTX::instance()->mesh.surfacesNum); #endif return CTX::instance()->mesh.surfacesNum; @@ -5227,8 +5227,8 @@ double opt_mesh_volumes_num(OPT_ARGS_NUM) CTX::instance()->mesh.volumesNum = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[15]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[15]->value (CTX::instance()->mesh.volumesNum); #endif return CTX::instance()->mesh.volumesNum; @@ -5240,8 +5240,8 @@ double opt_mesh_point_size(OPT_ARGS_NUM) CTX::instance()->mesh.pointSize = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[10]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[10]->value (CTX::instance()->mesh.pointSize); #endif return CTX::instance()->mesh.pointSize; @@ -5253,8 +5253,8 @@ double opt_mesh_point_type(OPT_ARGS_NUM) CTX::instance()->mesh.pointType = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->mesh.choice[0]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->mesh.choice[0]->value (CTX::instance()->mesh.pointType ? 1 : 0); } #endif @@ -5267,8 +5267,8 @@ double opt_mesh_line_width(OPT_ARGS_NUM) CTX::instance()->mesh.lineWidth = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[11]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[11]->value (CTX::instance()->mesh.lineWidth); #endif return CTX::instance()->mesh.lineWidth; @@ -5280,8 +5280,8 @@ double opt_mesh_label_frequency(OPT_ARGS_NUM) CTX::instance()->mesh.labelFrequency = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[12]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[12]->value (CTX::instance()->mesh.labelFrequency); #endif return CTX::instance()->mesh.labelFrequency; @@ -5295,8 +5295,8 @@ double opt_mesh_reverse_all_normals(OPT_ARGS_NUM) CTX::instance()->mesh.reverseAllNormals = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[0]->value (CTX::instance()->mesh.reverseAllNormals); #endif return CTX::instance()->mesh.reverseAllNormals; @@ -5310,8 +5310,8 @@ double opt_mesh_smooth_normals(OPT_ARGS_NUM) CTX::instance()->mesh.smoothNormals = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[19]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[19]->value (CTX::instance()->mesh.smoothNormals); #endif return CTX::instance()->mesh.smoothNormals; @@ -5325,8 +5325,8 @@ double opt_mesh_angle_smooth_normals(OPT_ARGS_NUM) CTX::instance()->mesh.angleSmoothNormals = val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[18]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[18]->value (CTX::instance()->mesh.angleSmoothNormals); #endif return CTX::instance()->mesh.angleSmoothNormals; @@ -5337,10 +5337,10 @@ double opt_mesh_light(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.light = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->mesh.butt[17]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->mesh.butt[17]->value (CTX::instance()->mesh.light); - GUI::instance()->options->activate("mesh_light"); + FlGui::instance()->options->activate("mesh_light"); } #endif return CTX::instance()->mesh.light; @@ -5351,8 +5351,8 @@ double opt_mesh_light_lines(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lightLines = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[20]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[20]->value (CTX::instance()->mesh.lightLines); #endif return CTX::instance()->mesh.lightLines; @@ -5363,8 +5363,8 @@ double opt_mesh_light_two_side(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.lightTwoSide = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[18]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[18]->value (CTX::instance()->mesh.lightTwoSide); #endif return CTX::instance()->mesh.lightTwoSide; @@ -5407,8 +5407,8 @@ double opt_mesh_nb_smoothing(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.nbSmoothing = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[0]->value (CTX::instance()->mesh.nbSmoothing); #endif return CTX::instance()->mesh.nbSmoothing; @@ -5421,17 +5421,17 @@ double opt_mesh_algo2d(OPT_ARGS_NUM) CTX::instance()->mesh.algo2d = algo; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { + if(FlGui::available() && (action & GMSH_GUI)) { switch (CTX::instance()->mesh.algo2d) { case ALGO_2D_DELAUNAY: - GUI::instance()->options->mesh.choice[2]->value(1); + FlGui::instance()->options->mesh.choice[2]->value(1); break; case ALGO_2D_FRONTAL: - GUI::instance()->options->mesh.choice[2]->value(2); + FlGui::instance()->options->mesh.choice[2]->value(2); break; case ALGO_2D_MESHADAPT: default: - GUI::instance()->options->mesh.choice[2]->value(0); + FlGui::instance()->options->mesh.choice[2]->value(0); break; } } @@ -5448,8 +5448,8 @@ double opt_mesh_algo_subdivide(OPT_ARGS_NUM) CTX::instance()->mesh.algoSubdivide = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->mesh.choice[5]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->mesh.choice[5]->value (CTX::instance()->mesh.algoSubdivide); } #endif @@ -5463,14 +5463,14 @@ double opt_mesh_algo3d(OPT_ARGS_NUM) CTX::instance()->mesh.algo3d = algo; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { + if(FlGui::available() && (action & GMSH_GUI)) { switch (CTX::instance()->mesh.algo3d) { case ALGO_3D_FRONTAL: - GUI::instance()->options->mesh.choice[3]->value(1); + FlGui::instance()->options->mesh.choice[3]->value(1); break; case ALGO_3D_DELAUNAY: default: - GUI::instance()->options->mesh.choice[3]->value(0); + FlGui::instance()->options->mesh.choice[3]->value(0); break; } } @@ -5511,8 +5511,8 @@ double opt_mesh_order(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.order = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.value[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.value[3]->value (CTX::instance()->mesh.order); #endif return CTX::instance()->mesh.order; @@ -5523,8 +5523,8 @@ double opt_mesh_smooth_internal_edges(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.smoothInternalEdges = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[3]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[3]->value (CTX::instance()->mesh.smoothInternalEdges); #endif return CTX::instance()->mesh.smoothInternalEdges; @@ -5549,8 +5549,8 @@ double opt_mesh_second_order_incomplete(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.secondOrderIncomplete = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->mesh.butt[4]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->mesh.butt[4]->value (CTX::instance()->mesh.secondOrderIncomplete); #endif return CTX::instance()->mesh.secondOrderIncomplete; @@ -5587,6 +5587,13 @@ double opt_mesh_save_all(OPT_ARGS_NUM) return CTX::instance()->mesh.saveAll; } +double opt_mesh_save_element_tag_type(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX::instance()->mesh.saveElementTagType = (int)val; + return CTX::instance()->mesh.saveElementTagType; +} + double opt_mesh_save_parametric(OPT_ARGS_NUM) { if(action & GMSH_SET) @@ -5594,7 +5601,6 @@ double opt_mesh_save_parametric(OPT_ARGS_NUM) return CTX::instance()->mesh.saveParametric; } - double opt_mesh_save_groups_of_nodes(OPT_ARGS_NUM) { if(action & GMSH_SET) @@ -5616,8 +5622,8 @@ double opt_mesh_color_carousel(OPT_ARGS_NUM) CTX::instance()->mesh.colorCarousel = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)){ - GUI::instance()->options->mesh.choice[4]->value + if(FlGui::available() && (action & GMSH_GUI)){ + FlGui::instance()->options->mesh.choice[4]->value (CTX::instance()->mesh.colorCarousel); } #endif @@ -5916,8 +5922,8 @@ double opt_mesh_clip(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->mesh.clip = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->clipping->resetBrowser(); + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->clipping->resetBrowser(); #endif return CTX::instance()->mesh.clip; } @@ -5927,8 +5933,8 @@ double opt_solver_listen(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->solver.listen = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->solver.butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->solver.butt[0]->value (CTX::instance()->solver.listen); #endif return CTX::instance()->solver.listen; @@ -5946,11 +5952,11 @@ double opt_solver_client_server(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].client_server = (int)val; - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(SINFO[num].client_server) - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[0].set(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[0].set(); else - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[0].clear(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[0].clear(); } return SINFO[num].client_server; #else @@ -5988,11 +5994,11 @@ double opt_solver_popup_messages(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].popup_messages = (int)val; - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(SINFO[num].popup_messages) - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[1].set(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[1].set(); else - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[1].clear(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[1].clear(); } return SINFO[num].popup_messages; #else @@ -6030,11 +6036,11 @@ double opt_solver_merge_views(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(action & GMSH_SET) SINFO[num].merge_views = (int)val; - if(GUI::available() && (action & GMSH_GUI)){ + if(FlGui::available() && (action & GMSH_GUI)){ if(SINFO[num].merge_views) - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[2].set(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[2].set(); else - ((Fl_Menu_Item*)GUI::instance()->solver[num]->menu->menu())[2].clear(); + ((Fl_Menu_Item*)FlGui::instance()->solver[num]->menu->menu())[2].clear(); } return SINFO[num].merge_views; #else @@ -6072,8 +6078,8 @@ double opt_post_horizontal_scales(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->post.horizontalScales = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->post.butt[2]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->post.butt[2]->value (CTX::instance()->post.horizontalScales); #endif return CTX::instance()->post.horizontalScales; @@ -6087,8 +6093,8 @@ double opt_post_link(OPT_ARGS_NUM) CTX::instance()->post.link = 0; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) { - GUI::instance()->options->post.choice[0]->value + if(FlGui::available() && (action & GMSH_GUI)) { + FlGui::instance()->options->post.choice[0]->value (CTX::instance()->post.link); } #endif @@ -6107,8 +6113,8 @@ double opt_post_anim_delay(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->post.animDelay = (val >= 0.) ? val : 0.; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->post.value[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->post.value[0]->value (CTX::instance()->post.animDelay); #endif return CTX::instance()->post.animDelay; @@ -6119,12 +6125,12 @@ double opt_post_anim_cycle(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->post.animCycle = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->post.butt[0]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->post.butt[0]->value (CTX::instance()->post.animCycle); - if(GUI::available()) - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->checkAnimButtons(); + if(FlGui::available()) + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->checkAnimButtons(); #endif return CTX::instance()->post.animCycle; } @@ -6134,8 +6140,8 @@ double opt_post_combine_remove_orig(OPT_ARGS_NUM) if(action & GMSH_SET) CTX::instance()->post.combineRemoveOrig = (int)val; #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI)) - GUI::instance()->options->post.butt[1]->value + if(FlGui::available() && (action & GMSH_GUI)) + FlGui::instance()->options->post.butt[1]->value (CTX::instance()->post.combineRemoveOrig); #endif return CTX::instance()->post.combineRemoveOrig; @@ -6171,10 +6177,10 @@ double opt_view_nb_timestep(OPT_ARGS_NUM) if(!data) return 1; #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[50]->maximum(data->getNumTimeSteps() - 1); - if(GUI::available()) - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->checkAnimButtons(); + FlGui::instance()->options->view.value[50]->maximum(data->getNumTimeSteps() - 1); + if(FlGui::available()) + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->checkAnimButtons(); #endif return data->getNumTimeSteps(); #else @@ -6200,7 +6206,7 @@ double opt_view_timestep(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[50]->value(opt->timeStep); + FlGui::instance()->options->view.value[50]->value(opt->timeStep); #endif return opt->timeStep; #else @@ -6242,7 +6248,7 @@ double opt_view_custom_min(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[31]->value(opt->customMin); + FlGui::instance()->options->view.value[31]->value(opt->customMin); } #endif return opt->customMin; @@ -6261,7 +6267,7 @@ double opt_view_custom_max(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[32]->value(opt->customMax); + FlGui::instance()->options->view.value[32]->value(opt->customMax); #endif return opt->customMax; #else @@ -6345,7 +6351,7 @@ double opt_view_offset0(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[40]->value(opt->offset[0]); + FlGui::instance()->options->view.value[40]->value(opt->offset[0]); #endif return opt->offset[0]; #else @@ -6363,7 +6369,7 @@ double opt_view_offset1(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[41]->value(opt->offset[1]); + FlGui::instance()->options->view.value[41]->value(opt->offset[1]); #endif return opt->offset[1]; #else @@ -6381,7 +6387,7 @@ double opt_view_offset2(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[42]->value(opt->offset[2]); + FlGui::instance()->options->view.value[42]->value(opt->offset[2]); #endif return opt->offset[2]; #else @@ -6399,7 +6405,7 @@ double opt_view_raise0(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[43]->value(opt->raise[0]); + FlGui::instance()->options->view.value[43]->value(opt->raise[0]); #endif return opt->raise[0]; #else @@ -6417,7 +6423,7 @@ double opt_view_raise1(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[44]->value(opt->raise[1]); + FlGui::instance()->options->view.value[44]->value(opt->raise[1]); #endif return opt->raise[1]; #else @@ -6435,7 +6441,7 @@ double opt_view_raise2(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[45]->value(opt->raise[2]); + FlGui::instance()->options->view.value[45]->value(opt->raise[2]); #endif return opt->raise[2]; #else @@ -6453,7 +6459,7 @@ double opt_view_normal_raise(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[46]->value(opt->normalRaise); + FlGui::instance()->options->view.value[46]->value(opt->normalRaise); #endif return opt->normalRaise; #else @@ -6471,7 +6477,7 @@ double opt_view_transform00(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[51]->value(opt->transform[0][0]); + FlGui::instance()->options->view.value[51]->value(opt->transform[0][0]); #endif return opt->transform[0][0]; #else @@ -6489,7 +6495,7 @@ double opt_view_transform01(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[52]->value(opt->transform[0][1]); + FlGui::instance()->options->view.value[52]->value(opt->transform[0][1]); #endif return opt->transform[0][1]; #else @@ -6507,7 +6513,7 @@ double opt_view_transform02(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[53]->value(opt->transform[0][2]); + FlGui::instance()->options->view.value[53]->value(opt->transform[0][2]); #endif return opt->transform[0][2]; #else @@ -6525,7 +6531,7 @@ double opt_view_transform10(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[54]->value(opt->transform[1][0]); + FlGui::instance()->options->view.value[54]->value(opt->transform[1][0]); #endif return opt->transform[1][0]; #else @@ -6543,7 +6549,7 @@ double opt_view_transform11(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[55]->value(opt->transform[1][1]); + FlGui::instance()->options->view.value[55]->value(opt->transform[1][1]); #endif return opt->transform[1][1]; #else @@ -6561,7 +6567,7 @@ double opt_view_transform12(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[56]->value(opt->transform[1][2]); + FlGui::instance()->options->view.value[56]->value(opt->transform[1][2]); #endif return opt->transform[1][2]; #else @@ -6579,7 +6585,7 @@ double opt_view_transform20(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[57]->value(opt->transform[2][0]); + FlGui::instance()->options->view.value[57]->value(opt->transform[2][0]); #endif return opt->transform[2][0]; #else @@ -6597,7 +6603,7 @@ double opt_view_transform21(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[58]->value(opt->transform[2][1]); + FlGui::instance()->options->view.value[58]->value(opt->transform[2][1]); #endif return opt->transform[2][1]; #else @@ -6615,7 +6621,7 @@ double opt_view_transform22(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[59]->value(opt->transform[2][2]); + FlGui::instance()->options->view.value[59]->value(opt->transform[2][2]); #endif return opt->transform[2][2]; #else @@ -6632,7 +6638,7 @@ double opt_view_arrow_size_min(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[64]->value(opt->arrowSizeMin); + FlGui::instance()->options->view.value[64]->value(opt->arrowSizeMin); #endif return opt->arrowSizeMin; #else @@ -6649,7 +6655,7 @@ double opt_view_arrow_size_max(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[60]->value(opt->arrowSizeMax); + FlGui::instance()->options->view.value[60]->value(opt->arrowSizeMax); #endif return opt->arrowSizeMax; #else @@ -6666,7 +6672,7 @@ double opt_view_normals(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[0]->value(opt->normals); + FlGui::instance()->options->view.value[0]->value(opt->normals); #endif return opt->normals; #else @@ -6683,7 +6689,7 @@ double opt_view_tangents(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[1]->value(opt->tangents); + FlGui::instance()->options->view.value[1]->value(opt->tangents); #endif return opt->tangents; #else @@ -6701,7 +6707,7 @@ double opt_view_displacement_factor(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[63]->value(opt->displacementFactor); + FlGui::instance()->options->view.value[63]->value(opt->displacementFactor); #endif return opt->displacementFactor; #else @@ -6719,7 +6725,7 @@ double opt_view_fake_transparency(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[24]->value(opt->fakeTransparency); + FlGui::instance()->options->view.butt[24]->value(opt->fakeTransparency); #endif return opt->fakeTransparency; #else @@ -6737,7 +6743,7 @@ double opt_view_explode(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[12]->value(opt->explode); + FlGui::instance()->options->view.value[12]->value(opt->explode); #endif return opt->explode; #else @@ -6753,9 +6759,9 @@ double opt_view_visible(OPT_ARGS_NUM) opt->visible = (int)val; } #if defined(HAVE_FLTK) - if(GUI::available() && (action & GMSH_GUI) && num >= 0 && - num < (int)GUI::instance()->menu->toggle.size()) - GUI::instance()->menu->toggle[num]->value(opt->visible); + if(FlGui::available() && (action & GMSH_GUI) && num >= 0 && + num < (int)FlGui::instance()->menu->toggle.size()) + FlGui::instance()->menu->toggle[num]->value(opt->visible); #endif return opt->visible; #else @@ -6775,7 +6781,7 @@ double opt_view_intervals_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[0]->value(opt->intervalsType - 1); + FlGui::instance()->options->view.choice[0]->value(opt->intervalsType - 1); } #endif return opt->intervalsType; @@ -6794,7 +6800,7 @@ double opt_view_saturate_values(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[38]->value(opt->saturateValues); + FlGui::instance()->options->view.butt[38]->value(opt->saturateValues); } #endif return opt->saturateValues; @@ -6820,8 +6826,8 @@ double opt_view_adapt_visualization_grid(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[0]->value(opt->adaptVisualizationGrid); - GUI::instance()->options->activate("view_adaptive"); + FlGui::instance()->options->view.butt[0]->value(opt->adaptVisualizationGrid); + FlGui::instance()->options->activate("view_adaptive"); } #endif return opt->adaptVisualizationGrid; @@ -6844,7 +6850,7 @@ double opt_view_max_recursion_level(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[33]->value(opt->maxRecursionLevel); + FlGui::instance()->options->view.value[33]->value(opt->maxRecursionLevel); } #endif return opt->maxRecursionLevel; @@ -6867,7 +6873,7 @@ double opt_view_target_error(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[34]->value(opt->targetError); + FlGui::instance()->options->view.value[34]->value(opt->targetError); } #endif return opt->targetError; @@ -6888,7 +6894,7 @@ double opt_view_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[13]->value(opt->type - 1); + FlGui::instance()->options->view.choice[13]->value(opt->type - 1); } #endif return opt->type; @@ -6906,8 +6912,8 @@ double opt_view_auto_position(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[7]->value(opt->autoPosition); - GUI::instance()->options->activate("view_axes_auto_2d"); + FlGui::instance()->options->view.butt[7]->value(opt->autoPosition); + FlGui::instance()->options->activate("view_axes_auto_2d"); } #endif return opt->autoPosition; @@ -6925,7 +6931,7 @@ double opt_view_position0(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[20]->value(opt->position[0]); + FlGui::instance()->options->view.value[20]->value(opt->position[0]); #endif return opt->position[0]; #else @@ -6942,7 +6948,7 @@ double opt_view_position1(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[21]->value(opt->position[1]); + FlGui::instance()->options->view.value[21]->value(opt->position[1]); #endif return opt->position[1]; #else @@ -6959,7 +6965,7 @@ double opt_view_size0(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[22]->value(opt->size[0]); + FlGui::instance()->options->view.value[22]->value(opt->size[0]); #endif return opt->size[0]; #else @@ -6976,7 +6982,7 @@ double opt_view_size1(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[23]->value(opt->size[1]); + FlGui::instance()->options->view.value[23]->value(opt->size[1]); #endif return opt->size[1]; #else @@ -6995,8 +7001,8 @@ double opt_view_axes(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[8]->value(opt->axes); - GUI::instance()->options->activate("view_axes"); + FlGui::instance()->options->view.choice[8]->value(opt->axes); + FlGui::instance()->options->activate("view_axes"); } #endif return opt->axes; @@ -7014,7 +7020,7 @@ double opt_view_axes_mikado(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[3]->value(opt->axesMikado); + FlGui::instance()->options->view.butt[3]->value(opt->axesMikado); } #endif return opt->axesMikado; @@ -7032,8 +7038,8 @@ double opt_view_axes_auto_position(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[25]->value(opt->axesAutoPosition); - GUI::instance()->options->activate("view_axes_auto_3d"); + FlGui::instance()->options->view.butt[25]->value(opt->axesAutoPosition); + FlGui::instance()->options->activate("view_axes_auto_3d"); } #endif return opt->axesAutoPosition; @@ -7051,7 +7057,7 @@ double opt_view_axes_xmin(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[13]->value(opt->axesPosition[0]); + FlGui::instance()->options->view.value[13]->value(opt->axesPosition[0]); } #endif return opt->axesPosition[0]; @@ -7069,7 +7075,7 @@ double opt_view_axes_xmax(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[16]->value(opt->axesPosition[1]); + FlGui::instance()->options->view.value[16]->value(opt->axesPosition[1]); } #endif return opt->axesPosition[1]; @@ -7087,7 +7093,7 @@ double opt_view_axes_ymin(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[14]->value(opt->axesPosition[2]); + FlGui::instance()->options->view.value[14]->value(opt->axesPosition[2]); } #endif return opt->axesPosition[2]; @@ -7105,7 +7111,7 @@ double opt_view_axes_ymax(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[17]->value(opt->axesPosition[3]); + FlGui::instance()->options->view.value[17]->value(opt->axesPosition[3]); } #endif return opt->axesPosition[3]; @@ -7123,7 +7129,7 @@ double opt_view_axes_zmin(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[15]->value(opt->axesPosition[4]); + FlGui::instance()->options->view.value[15]->value(opt->axesPosition[4]); } #endif return opt->axesPosition[4]; @@ -7141,7 +7147,7 @@ double opt_view_axes_zmax(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[18]->value(opt->axesPosition[5]); + FlGui::instance()->options->view.value[18]->value(opt->axesPosition[5]); } #endif return opt->axesPosition[5]; @@ -7159,7 +7165,7 @@ double opt_view_axes_tics0(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[3]->value(opt->axesTics[0]); + FlGui::instance()->options->view.value[3]->value(opt->axesTics[0]); } #endif return opt->axesTics[0]; @@ -7177,7 +7183,7 @@ double opt_view_axes_tics1(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[4]->value(opt->axesTics[1]); + FlGui::instance()->options->view.value[4]->value(opt->axesTics[1]); } #endif return opt->axesTics[1]; @@ -7195,7 +7201,7 @@ double opt_view_axes_tics2(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.value[5]->value(opt->axesTics[2]); + FlGui::instance()->options->view.value[5]->value(opt->axesTics[2]); } #endif return opt->axesTics[2]; @@ -7214,7 +7220,7 @@ double opt_view_nb_iso(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[30]->value(opt->nbIso); + FlGui::instance()->options->view.value[30]->value(opt->nbIso); #endif return opt->nbIso; #else @@ -7234,7 +7240,7 @@ double opt_view_boundary(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[9]->value(opt->boundary); + FlGui::instance()->options->view.choice[9]->value(opt->boundary); } #endif return opt->boundary; @@ -7253,8 +7259,8 @@ double opt_view_light(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - GUI::instance()->options->view.butt[11]->value(opt->light); - GUI::instance()->options->activate("view_light"); + FlGui::instance()->options->view.butt[11]->value(opt->light); + FlGui::instance()->options->activate("view_light"); } #endif return opt->light; @@ -7272,7 +7278,7 @@ double opt_view_light_two_side(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[9]->value(opt->lightTwoSide); + FlGui::instance()->options->view.butt[9]->value(opt->lightTwoSide); #endif return opt->lightTwoSide; #else @@ -7289,7 +7295,7 @@ double opt_view_light_lines(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[8]->value(opt->lightLines); + FlGui::instance()->options->view.butt[8]->value(opt->lightLines); #endif return opt->lightLines; #else @@ -7307,7 +7313,7 @@ double opt_view_smooth_normals(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[12]->value(opt->smoothNormals); + FlGui::instance()->options->view.butt[12]->value(opt->smoothNormals); #endif return opt->smoothNormals; #else @@ -7325,7 +7331,7 @@ double opt_view_angle_smooth_normals(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[10]->value(opt->angleSmoothNormals); + FlGui::instance()->options->view.value[10]->value(opt->angleSmoothNormals); #endif return opt->angleSmoothNormals; #else @@ -7343,7 +7349,7 @@ double opt_view_show_element(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[10]->value(opt->showElement); + FlGui::instance()->options->view.butt[10]->value(opt->showElement); #endif return opt->showElement; #else @@ -7362,7 +7368,7 @@ double opt_view_show_time(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.choice[12]->value(opt->showTime); + FlGui::instance()->options->view.choice[12]->value(opt->showTime); #endif return opt->showTime; #else @@ -7379,7 +7385,7 @@ double opt_view_show_scale(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[4]->value(opt->showScale); + FlGui::instance()->options->view.butt[4]->value(opt->showScale); #endif return opt->showScale; #else @@ -7396,7 +7402,7 @@ double opt_view_draw_strings(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[5]->value(opt->drawStrings); + FlGui::instance()->options->view.butt[5]->value(opt->drawStrings); #endif return opt->drawStrings; #else @@ -7415,9 +7421,9 @@ double opt_view_draw_points(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawPoints) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[0].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[0].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[0].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[0].clear(); } #endif return opt->drawPoints; @@ -7437,9 +7443,9 @@ double opt_view_draw_lines(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawLines) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[1].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[1].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[1].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[1].clear(); } #endif return opt->drawLines; @@ -7459,9 +7465,9 @@ double opt_view_draw_triangles(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawTriangles) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[2].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[2].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[2].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[2].clear(); } #endif return opt->drawTriangles; @@ -7481,9 +7487,9 @@ double opt_view_draw_quadrangles(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawQuadrangles) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[3].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[3].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[3].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[3].clear(); } #endif return opt->drawQuadrangles; @@ -7503,9 +7509,9 @@ double opt_view_draw_tetrahedra(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawTetrahedra) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[4].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[4].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[4].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[4].clear(); } #endif return opt->drawTetrahedra; @@ -7525,9 +7531,9 @@ double opt_view_draw_hexahedra(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawHexahedra) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[5].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[5].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[5].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[5].clear(); } #endif return opt->drawHexahedra; @@ -7547,9 +7553,9 @@ double opt_view_draw_prisms(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawPrisms) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[6].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[6].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[6].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[6].clear(); } #endif return opt->drawPrisms; @@ -7569,9 +7575,9 @@ double opt_view_draw_pyramids(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawPyramids) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[7].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[7].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[1]->menu())[7].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[1]->menu())[7].clear(); } #endif return opt->drawPyramids; @@ -7591,9 +7597,9 @@ double opt_view_draw_scalars(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawScalars) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[0].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[0].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[0].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[0].clear(); } #endif return opt->drawScalars; @@ -7613,9 +7619,9 @@ double opt_view_draw_vectors(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawVectors) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[1].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[1].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[1].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[1].clear(); } #endif return opt->drawVectors; @@ -7635,9 +7641,9 @@ double opt_view_draw_tensors(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ if(opt->drawTensors) - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[2].set(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[2].set(); else - ((Fl_Menu_Item*)GUI::instance()->options->view.menu[0]->menu())[2].clear(); + ((Fl_Menu_Item*)FlGui::instance()->options->view.menu[0]->menu())[2].clear(); } #endif return opt->drawTensors; @@ -7656,7 +7662,7 @@ double opt_view_draw_skin_only(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.butt[2]->value(opt->drawSkinOnly); + FlGui::instance()->options->view.butt[2]->value(opt->drawSkinOnly); #endif return opt->drawSkinOnly; #else @@ -7676,7 +7682,7 @@ double opt_view_scale_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[1]->value(opt->scaleType - 1); + FlGui::instance()->options->view.choice[1]->value(opt->scaleType - 1); } #endif return opt->scaleType; @@ -7697,8 +7703,8 @@ double opt_view_range_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - GUI::instance()->options->view.choice[7]->value(opt->rangeType - 1); - GUI::instance()->options->activate("custom_range"); + FlGui::instance()->options->view.choice[7]->value(opt->rangeType - 1); + FlGui::instance()->options->activate("custom_range"); } #endif return opt->rangeType; @@ -7719,7 +7725,7 @@ double opt_view_tensor_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[4]->value(opt->tensorType - 1); + FlGui::instance()->options->view.choice[4]->value(opt->tensorType - 1); } #endif return opt->tensorType; @@ -7740,7 +7746,7 @@ double opt_view_vector_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[2]->value(opt->vectorType - 1); + FlGui::instance()->options->view.choice[2]->value(opt->vectorType - 1); } #endif return opt->vectorType; @@ -7761,7 +7767,7 @@ double opt_view_glyph_location(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[3]->value(opt->glyphLocation - 1); + FlGui::instance()->options->view.choice[3]->value(opt->glyphLocation - 1); } #endif return opt->glyphLocation; @@ -7780,7 +7786,7 @@ double opt_view_center_glyphs(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.butt[1]->value(opt->centerGlyphs); + FlGui::instance()->options->view.butt[1]->value(opt->centerGlyphs); } #endif return opt->centerGlyphs; @@ -7798,7 +7804,7 @@ double opt_view_point_size(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[61]->value(opt->pointSize); + FlGui::instance()->options->view.value[61]->value(opt->pointSize); #endif return opt->pointSize; #else @@ -7815,7 +7821,7 @@ double opt_view_line_width(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[62]->value(opt->lineWidth); + FlGui::instance()->options->view.value[62]->value(opt->lineWidth); #endif return opt->lineWidth; #else @@ -7835,7 +7841,7 @@ double opt_view_point_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[5]->value(opt->pointType); + FlGui::instance()->options->view.choice[5]->value(opt->pointType); } #endif return opt->pointType; @@ -7856,7 +7862,7 @@ double opt_view_line_type(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.choice[6]->value(opt->lineType); + FlGui::instance()->options->view.choice[6]->value(opt->lineType); } #endif return opt->lineType; @@ -7876,7 +7882,7 @@ double opt_view_colormap_alpha(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.dpar[COLORTABLE_ALPHA]; @@ -7896,7 +7902,7 @@ double opt_view_colormap_alpha_power(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.dpar[COLORTABLE_ALPHAPOW]; @@ -7916,7 +7922,7 @@ double opt_view_colormap_beta(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.dpar[COLORTABLE_BETA]; @@ -7936,7 +7942,7 @@ double opt_view_colormap_bias(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.dpar[COLORTABLE_BIAS]; @@ -7956,7 +7962,7 @@ double opt_view_colormap_curvature(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.dpar[COLORTABLE_CURVATURE]; @@ -7976,7 +7982,7 @@ double opt_view_colormap_invert(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.ipar[COLORTABLE_INVERT]; @@ -7996,7 +8002,7 @@ double opt_view_colormap_number(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.ipar[COLORTABLE_NUMBER]; @@ -8016,7 +8022,7 @@ double opt_view_colormap_rotation(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.ipar[COLORTABLE_ROTATION]; @@ -8036,7 +8042,7 @@ double opt_view_colormap_swap(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) { - GUI::instance()->options->view.colorbar->redraw(); + FlGui::instance()->options->view.colorbar->redraw(); } #endif return opt->colorTable.ipar[COLORTABLE_SWAP]; @@ -8057,10 +8063,10 @@ double opt_view_external_view(OPT_ARGS_NUM) if(_gui_action_valid(action, num)){ // warning: Fl_Choice::size() returns number of items+1 int item = opt->externalViewIndex + 1; - if(item > -1 && item < GUI::instance()->options->view.choice[10]->size()-1) - GUI::instance()->options->view.choice[10]->value(item); + if(item > -1 && item < FlGui::instance()->options->view.choice[10]->size()-1) + FlGui::instance()->options->view.choice[10]->value(item); else - GUI::instance()->options->view.choice[10]->value(0); + FlGui::instance()->options->view.choice[10]->value(0); } #endif return opt->externalViewIndex; @@ -8081,10 +8087,10 @@ double opt_view_gen_raise_view(OPT_ARGS_NUM) if(_gui_action_valid(action, num)){ // warning: Fl_Choice::size() returns number of items+1 int item = opt->viewIndexForGenRaise + 1; - if(item > -1 && item < GUI::instance()->options->view.choice[11]->size()-1) - GUI::instance()->options->view.choice[11]->value(item); + if(item > -1 && item < FlGui::instance()->options->view.choice[11]->size()-1) + FlGui::instance()->options->view.choice[11]->value(item); else - GUI::instance()->options->view.choice[11]->value(0); + FlGui::instance()->options->view.choice[11]->value(0); } #endif return opt->viewIndexForGenRaise; @@ -8103,7 +8109,7 @@ double opt_view_gen_raise_factor(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)) - GUI::instance()->options->view.value[2]->value(opt->genRaiseFactor); + FlGui::instance()->options->view.value[2]->value(opt->genRaiseFactor); #endif return opt->genRaiseFactor; #else @@ -8121,8 +8127,8 @@ double opt_view_use_gen_raise(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - GUI::instance()->options->view.butt[6]->value(opt->useGenRaise); - GUI::instance()->options->activate("view_general_transform"); + FlGui::instance()->options->view.butt[6]->value(opt->useGenRaise); + FlGui::instance()->options->activate("view_general_transform"); } #endif return opt->useGenRaise; @@ -8140,7 +8146,7 @@ double opt_view_use_stipple(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - GUI::instance()->options->view.butt[26]->value(opt->useStipple); + FlGui::instance()->options->view.butt[26]->value(opt->useStipple); } #endif return opt->useStipple; @@ -8158,7 +8164,7 @@ double opt_view_clip(OPT_ARGS_NUM) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - GUI::instance()->clipping->resetBrowser(); + FlGui::instance()->clipping->resetBrowser(); } #endif return opt->clip; @@ -8347,7 +8353,7 @@ double opt_print_composite_windows(OPT_ARGS_NUM) #if defined(HAVE_FLTK) #define CCC(col,but) \ - if(GUI::available() && (action & GMSH_GUI)){ \ + if(FlGui::available() && (action & GMSH_GUI)){ \ Fl_Color c = fl_color_cube(CTX::instance()->unpackRed(col)*FL_NUM_RED/256, \ CTX::instance()->unpackGreen(col)*FL_NUM_GREEN/256, \ CTX::instance()->unpackBlue(col)*FL_NUM_BLUE/256); \ @@ -8363,12 +8369,12 @@ unsigned int opt_general_color_background(OPT_ARGS_COL) if(action & GMSH_SET) { CTX::instance()->color.bg = val; #if defined(HAVE_FLTK) - if(GUI::available()) - GUI::instance()->options->view.colorbar->redraw(); + if(FlGui::available()) + FlGui::instance()->options->view.colorbar->redraw(); #endif } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.bg, GUI::instance()->options->general.color[0]); + CCC(CTX::instance()->color.bg, FlGui::instance()->options->general.color[0]); #endif return CTX::instance()->color.bg; } @@ -8378,7 +8384,7 @@ unsigned int opt_general_color_background_gradient(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.bgGrad = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.bgGrad, GUI::instance()->options->general.color[1]); + CCC(CTX::instance()->color.bgGrad, FlGui::instance()->options->general.color[1]); #endif return CTX::instance()->color.bgGrad; } @@ -8388,7 +8394,7 @@ unsigned int opt_general_color_foreground(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.fg = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.fg, GUI::instance()->options->general.color[2]); + CCC(CTX::instance()->color.fg, FlGui::instance()->options->general.color[2]); #endif return CTX::instance()->color.fg; } @@ -8398,7 +8404,7 @@ unsigned int opt_general_color_text(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.text = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.text, GUI::instance()->options->general.color[3]); + CCC(CTX::instance()->color.text, FlGui::instance()->options->general.color[3]); #endif return CTX::instance()->color.text; } @@ -8408,7 +8414,7 @@ unsigned int opt_general_color_axes(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.axes = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.axes, GUI::instance()->options->general.color[4]); + CCC(CTX::instance()->color.axes, FlGui::instance()->options->general.color[4]); #endif return CTX::instance()->color.axes; } @@ -8418,7 +8424,7 @@ unsigned int opt_general_color_small_axes(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.smallAxes = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.smallAxes, GUI::instance()->options->general.color[5]); + CCC(CTX::instance()->color.smallAxes, FlGui::instance()->options->general.color[5]); #endif return CTX::instance()->color.smallAxes; } @@ -8429,7 +8435,7 @@ unsigned int opt_general_color_ambient_light(OPT_ARGS_COL) for(int i = 0; i < 6; i++) CTX::instance()->color.ambientLight[i] = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.ambientLight[0], GUI::instance()->options->general.color[6]); + CCC(CTX::instance()->color.ambientLight[0], FlGui::instance()->options->general.color[6]); #endif return CTX::instance()->color.ambientLight[0]; } @@ -8440,7 +8446,7 @@ unsigned int opt_general_color_diffuse_light(OPT_ARGS_COL) for(int i = 0; i < 6; i++) CTX::instance()->color.diffuseLight[i] = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.diffuseLight[0], GUI::instance()->options->general.color[7]); + CCC(CTX::instance()->color.diffuseLight[0], FlGui::instance()->options->general.color[7]); #endif return CTX::instance()->color.diffuseLight[0]; } @@ -8451,7 +8457,7 @@ unsigned int opt_general_color_specular_light(OPT_ARGS_COL) for(int i = 0; i < 6; i++) CTX::instance()->color.specularLight[i] = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.specularLight[0], GUI::instance()->options->general.color[8]); + CCC(CTX::instance()->color.specularLight[0], FlGui::instance()->options->general.color[8]); #endif return CTX::instance()->color.specularLight[0]; } @@ -8461,7 +8467,7 @@ unsigned int opt_geometry_color_points(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.point = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.point, GUI::instance()->options->geo.color[0]); + CCC(CTX::instance()->color.geom.point, FlGui::instance()->options->geo.color[0]); #endif return CTX::instance()->color.geom.point; } @@ -8471,7 +8477,7 @@ unsigned int opt_geometry_color_lines(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.line = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.line, GUI::instance()->options->geo.color[1]); + CCC(CTX::instance()->color.geom.line, FlGui::instance()->options->geo.color[1]); #endif return CTX::instance()->color.geom.line; } @@ -8481,7 +8487,7 @@ unsigned int opt_geometry_color_surfaces(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.surface = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.surface, GUI::instance()->options->geo.color[2]); + CCC(CTX::instance()->color.geom.surface, FlGui::instance()->options->geo.color[2]); #endif return CTX::instance()->color.geom.surface; } @@ -8491,7 +8497,7 @@ unsigned int opt_geometry_color_volumes(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.volume = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.volume, GUI::instance()->options->geo.color[3]); + CCC(CTX::instance()->color.geom.volume, FlGui::instance()->options->geo.color[3]); #endif return CTX::instance()->color.geom.volume; } @@ -8501,7 +8507,7 @@ unsigned int opt_geometry_color_selection(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.selection = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.selection, GUI::instance()->options->geo.color[4]); + CCC(CTX::instance()->color.geom.selection, FlGui::instance()->options->geo.color[4]); #endif return CTX::instance()->color.geom.selection; } @@ -8512,7 +8518,7 @@ unsigned int opt_geometry_color_highlight0(OPT_ARGS_COL) CTX::instance()->color.geom.highlight[0] = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.highlight[0], GUI::instance()->options->geo.color[5]); + CCC(CTX::instance()->color.geom.highlight[0], FlGui::instance()->options->geo.color[5]); #endif return CTX::instance()->color.geom.highlight[0]; } @@ -8523,7 +8529,7 @@ unsigned int opt_geometry_color_highlight1(OPT_ARGS_COL) CTX::instance()->color.geom.highlight[1] = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.highlight[1], GUI::instance()->options->geo.color[6]); + CCC(CTX::instance()->color.geom.highlight[1], FlGui::instance()->options->geo.color[6]); #endif return CTX::instance()->color.geom.highlight[1]; } @@ -8533,7 +8539,7 @@ unsigned int opt_geometry_color_highlight2(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.highlight[2] = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.highlight[2], GUI::instance()->options->geo.color[7]); + CCC(CTX::instance()->color.geom.highlight[2], FlGui::instance()->options->geo.color[7]); #endif return CTX::instance()->color.geom.highlight[2]; } @@ -8543,7 +8549,7 @@ unsigned int opt_geometry_color_tangents(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.tangents = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.tangents, GUI::instance()->options->geo.color[8]); + CCC(CTX::instance()->color.geom.tangents, FlGui::instance()->options->geo.color[8]); #endif return CTX::instance()->color.geom.tangents; } @@ -8553,7 +8559,7 @@ unsigned int opt_geometry_color_normals(OPT_ARGS_COL) if(action & GMSH_SET) CTX::instance()->color.geom.normals = val; #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.normals, GUI::instance()->options->geo.color[9]); + CCC(CTX::instance()->color.geom.normals, FlGui::instance()->options->geo.color[9]); #endif return CTX::instance()->color.geom.normals; } @@ -8564,7 +8570,7 @@ unsigned int opt_geometry_color_projection(OPT_ARGS_COL) CTX::instance()->color.geom.projection = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.geom.projection, GUI::instance()->options->geo.color[10]); + CCC(CTX::instance()->color.geom.projection, FlGui::instance()->options->geo.color[10]); #endif return CTX::instance()->color.geom.projection; } @@ -8575,7 +8581,7 @@ unsigned int opt_mesh_color_points(OPT_ARGS_COL) CTX::instance()->color.mesh.vertex = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.vertex, GUI::instance()->options->mesh.color[0]); + CCC(CTX::instance()->color.mesh.vertex, FlGui::instance()->options->mesh.color[0]); #endif return CTX::instance()->color.mesh.vertex; } @@ -8586,7 +8592,7 @@ unsigned int opt_mesh_color_points_sup(OPT_ARGS_COL) CTX::instance()->color.mesh.vertexSup = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.vertexSup, GUI::instance()->options->mesh.color[1]); + CCC(CTX::instance()->color.mesh.vertexSup, FlGui::instance()->options->mesh.color[1]); #endif return CTX::instance()->color.mesh.vertexSup; } @@ -8602,7 +8608,7 @@ unsigned int opt_mesh_color_lines(OPT_ARGS_COL) CTX::instance()->color.mesh.line = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.line, GUI::instance()->options->mesh.color[2]); + CCC(CTX::instance()->color.mesh.line, FlGui::instance()->options->mesh.color[2]); #endif return CTX::instance()->color.mesh.line; } @@ -8618,7 +8624,7 @@ unsigned int opt_mesh_color_triangles(OPT_ARGS_COL) CTX::instance()->color.mesh.triangle = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.triangle, GUI::instance()->options->mesh.color[3]); + CCC(CTX::instance()->color.mesh.triangle, FlGui::instance()->options->mesh.color[3]); #endif return CTX::instance()->color.mesh.triangle; } @@ -8634,7 +8640,7 @@ unsigned int opt_mesh_color_quadrangles(OPT_ARGS_COL) CTX::instance()->color.mesh.quadrangle = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.quadrangle, GUI::instance()->options->mesh.color[4]); + CCC(CTX::instance()->color.mesh.quadrangle, FlGui::instance()->options->mesh.color[4]); #endif return CTX::instance()->color.mesh.quadrangle; } @@ -8650,7 +8656,7 @@ unsigned int opt_mesh_color_tetrahedra(OPT_ARGS_COL) CTX::instance()->color.mesh.tetrahedron = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.tetrahedron, GUI::instance()->options->mesh.color[5]); + CCC(CTX::instance()->color.mesh.tetrahedron, FlGui::instance()->options->mesh.color[5]); #endif return CTX::instance()->color.mesh.tetrahedron; } @@ -8667,7 +8673,7 @@ unsigned int opt_mesh_color_hexahedra(OPT_ARGS_COL) } #if defined(HAVE_FLTK) CCC(CTX::instance()->color.mesh.hexahedron, - GUI::instance()->options->mesh.color[6]); + FlGui::instance()->options->mesh.color[6]); #endif return CTX::instance()->color.mesh.hexahedron; } @@ -8683,7 +8689,7 @@ unsigned int opt_mesh_color_prisms(OPT_ARGS_COL) CTX::instance()->color.mesh.prism = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.prism, GUI::instance()->options->mesh.color[7]); + CCC(CTX::instance()->color.mesh.prism, FlGui::instance()->options->mesh.color[7]); #endif return CTX::instance()->color.mesh.prism; } @@ -8699,7 +8705,7 @@ unsigned int opt_mesh_color_pyramid(OPT_ARGS_COL) CTX::instance()->color.mesh.pyramid = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.pyramid, GUI::instance()->options->mesh.color[8]); + CCC(CTX::instance()->color.mesh.pyramid, FlGui::instance()->options->mesh.color[8]); #endif return CTX::instance()->color.mesh.pyramid; } @@ -8710,7 +8716,7 @@ unsigned int opt_mesh_color_tangents(OPT_ARGS_COL) CTX::instance()->color.mesh.tangents = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.tangents, GUI::instance()->options->mesh.color[9]); + CCC(CTX::instance()->color.mesh.tangents, FlGui::instance()->options->mesh.color[9]); #endif return CTX::instance()->color.mesh.tangents; } @@ -8721,7 +8727,7 @@ unsigned int opt_mesh_color_normals(OPT_ARGS_COL) CTX::instance()->color.mesh.normals = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.normals, GUI::instance()->options->mesh.color[10]); + CCC(CTX::instance()->color.mesh.normals, FlGui::instance()->options->mesh.color[10]); #endif return CTX::instance()->color.mesh.normals; } @@ -8737,7 +8743,7 @@ unsigned int opt_mesh_color_(int i, OPT_ARGS_COL) CTX::instance()->color.mesh.carousel[i] = val; } #if defined(HAVE_FLTK) - CCC(CTX::instance()->color.mesh.carousel[i], GUI::instance()->options->mesh.color[11+i]); + CCC(CTX::instance()->color.mesh.carousel[i], FlGui::instance()->options->mesh.color[11+i]); #endif return CTX::instance()->color.mesh.carousel[i]; } @@ -8773,7 +8779,7 @@ unsigned int opt_view_color_points(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.point, GUI::instance()->options->view.color[0]); + CCC(opt->color.point, FlGui::instance()->options->view.color[0]); } #endif return opt->color.point; @@ -8792,7 +8798,7 @@ unsigned int opt_view_color_lines(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.line, GUI::instance()->options->view.color[1]); + CCC(opt->color.line, FlGui::instance()->options->view.color[1]); } #endif return opt->color.line; @@ -8811,7 +8817,7 @@ unsigned int opt_view_color_triangles(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.triangle, GUI::instance()->options->view.color[2]); + CCC(opt->color.triangle, FlGui::instance()->options->view.color[2]); } #endif return opt->color.triangle; @@ -8830,7 +8836,7 @@ unsigned int opt_view_color_quadrangles(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.quadrangle, GUI::instance()->options->view.color[3]); + CCC(opt->color.quadrangle, FlGui::instance()->options->view.color[3]); } #endif return opt->color.quadrangle; @@ -8849,7 +8855,7 @@ unsigned int opt_view_color_tetrahedra(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.tetrahedron, GUI::instance()->options->view.color[4]); + CCC(opt->color.tetrahedron, FlGui::instance()->options->view.color[4]); } #endif return opt->color.tetrahedron; @@ -8868,7 +8874,7 @@ unsigned int opt_view_color_hexahedra(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.hexahedron, GUI::instance()->options->view.color[5]); + CCC(opt->color.hexahedron, FlGui::instance()->options->view.color[5]); } #endif return opt->color.hexahedron; @@ -8887,7 +8893,7 @@ unsigned int opt_view_color_prisms(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.prism, GUI::instance()->options->view.color[6]); + CCC(opt->color.prism, FlGui::instance()->options->view.color[6]); } #endif return opt->color.prism; @@ -8906,7 +8912,7 @@ unsigned int opt_view_color_pyramids(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.pyramid, GUI::instance()->options->view.color[7]); + CCC(opt->color.pyramid, FlGui::instance()->options->view.color[7]); } #endif return opt->color.pyramid; @@ -8925,7 +8931,7 @@ unsigned int opt_view_color_tangents(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.tangents, GUI::instance()->options->view.color[8]); + CCC(opt->color.tangents, FlGui::instance()->options->view.color[8]); } #endif return opt->color.tangents; @@ -8944,7 +8950,7 @@ unsigned int opt_view_color_normals(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.normals, GUI::instance()->options->view.color[9]); + CCC(opt->color.normals, FlGui::instance()->options->view.color[9]); } #endif return opt->color.normals; @@ -8962,7 +8968,7 @@ unsigned int opt_view_color_text2d(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.text2d, GUI::instance()->options->view.color[10]); + CCC(opt->color.text2d, FlGui::instance()->options->view.color[10]); } #endif return opt->color.text2d; @@ -8980,7 +8986,7 @@ unsigned int opt_view_color_text3d(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.text3d, GUI::instance()->options->view.color[11]); + CCC(opt->color.text3d, FlGui::instance()->options->view.color[11]); } #endif return opt->color.text3d; @@ -8998,7 +9004,7 @@ unsigned int opt_view_color_axes(OPT_ARGS_COL) } #if defined(HAVE_FLTK) if(_gui_action_valid(action, num)){ - CCC(opt->color.axes, GUI::instance()->options->view.color[12]); + CCC(opt->color.axes, FlGui::instance()->options->view.color[12]); } #endif return opt->color.axes; diff --git a/Common/Options.h b/Common/Options.h index a32bef82708d3dbd48385ceee6b733fbced5af4f..253822d2164ff1ef27887424e215f7ef0e7ca661 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -507,6 +507,7 @@ double opt_mesh_dual(OPT_ARGS_NUM); double opt_mesh_voronoi(OPT_ARGS_NUM); double opt_mesh_draw_skin_only(OPT_ARGS_NUM); double opt_mesh_save_all(OPT_ARGS_NUM); +double opt_mesh_save_element_tag_type(OPT_ARGS_NUM); double opt_mesh_save_parametric(OPT_ARGS_NUM); double opt_mesh_save_groups_of_nodes(OPT_ARGS_NUM); double opt_mesh_color_carousel(OPT_ARGS_NUM); @@ -811,11 +812,11 @@ void PrintOptions(int num, int level, int diff, int help, const char *filename); void PrintOptionsDoc(); bool StringOption(int action, const char *category, int num, - const char *name, std::string &val); + const char *name, std::string &val); bool NumberOption(int action, const char *category, int num, - const char *name, double &val); + const char *name, double &val); bool ColorOption(int action, const char *category, int num, - const char *name, unsigned int &val); + const char *name, unsigned int &val); GmshColorTable *GetColorTable(int num); diff --git a/Common/SmoothData.cpp b/Common/SmoothData.cpp index 3f36427f85315eedfd2a42cad389affb432138c6..45cc2b546d57bc68d89b2bc5b4822b9e1be7432b 100644 --- a/Common/SmoothData.cpp +++ b/Common/SmoothData.cpp @@ -121,7 +121,7 @@ bool smooth_data::exportview(std::string filename) // Normal smoother -float xyzn::eps = 1.e-6; +float xyzn::eps = 1.e-6F; float xyzn::angle(int i, char nx, char ny, char nz) { @@ -160,7 +160,7 @@ void xyzn::update(char nx, char ny, char nz, float tol) // single point... if(n[i].nb < 100){ float c1 = (float)(n[i].nb) / (float)(n[i].nb + 1); - float c2 = 1. / (float)(n[i].nb + 1); + float c2 = 1.0F / (float)(n[i].nb + 1); n[i].nx = (char)(c1 * n[i].nx + c2 * nx); n[i].ny = (char)(c1 * n[i].ny + c2 * ny); n[i].nz = (char)(c1 * n[i].nz + c2 * nz); @@ -178,30 +178,37 @@ void xyzn::update(char nx, char ny, char nz, float tol) void smooth_normals::add(double x, double y, double z, double nx, double ny, double nz) { - xyzn xyz(x, y, z); + xyzn xyz((float)x, (float)y, (float)z); std::set<xyzn, lessthanxyzn>::const_iterator it = c.find(xyz); if(it == c.end()) { - xyz.update(float2char(nx), float2char(ny), float2char(nz), tol); + xyz.update(float2char((float)nx), + float2char((float)ny), + float2char((float)nz), tol); c.insert(xyz); } else { // we can do this because we know that it will not destroy the set // ordering xyzn *p = (xyzn *) & (*it); - p->update(float2char(nx), float2char(ny), float2char(nz), tol); + p->update(float2char((float)nx), + float2char((float)ny), + float2char((float)nz), tol); } } bool smooth_normals::get(double x, double y, double z, double &nx, double &ny, double &nz) { - std::set<xyzn, lessthanxyzn>::const_iterator it = c.find(xyzn(x, y, z)); - if(it == c.end()) - return false; + std::set<xyzn, lessthanxyzn>::const_iterator it = + c.find(xyzn((float)x, (float)y, (float)z)); + + if(it == c.end()) return false; xyzn *p = (xyzn *) & (*it); for(unsigned int i = 0; i < p->n.size(); i++){ - if(fabs(p->angle(i, float2char(nx), float2char(ny), float2char(nz))) < tol) { + if(fabs(p->angle(i, float2char((float)nx), + float2char((float)ny), + float2char((float)nz))) < tol) { nx = char2float(p->n[i].nx); ny = char2float(p->n[i].ny); nz = char2float(p->n[i].nz); diff --git a/Common/SmoothData.h b/Common/SmoothData.h index fed5c63d28b578a5bdd955031c2f814e8603e5aa..77bba9454363d16ed66db5abcb8086bdb058e22f 100644 --- a/Common/SmoothData.h +++ b/Common/SmoothData.h @@ -98,7 +98,7 @@ class smooth_normals{ float tol; std::set<xyzn, lessthanxyzn> c; public: - smooth_normals(double angle) : tol(angle) {} + smooth_normals(double angle) : tol((float)angle) {} void add(double x, double y, double z, double nx, double ny, double nz); bool get(double x, double y, double z, double &nx, double &ny, double &nz); }; diff --git a/Common/VertexArray.cpp b/Common/VertexArray.cpp index d02a2df8a760dc052051f985633615f1d56b76c6..a2f4c1684ab15e63a7360e8492d0e74deebd07ec 100644 --- a/Common/VertexArray.cpp +++ b/Common/VertexArray.cpp @@ -8,8 +8,8 @@ #include "Context.h" #include "Numeric.h" -template<int N> float ElementDataLessThan<N>::tolerance = 0.; -float BarycenterLessThan::tolerance = 0.; +template<int N> float ElementDataLessThan<N>::tolerance = 0.0F; +float BarycenterLessThan::tolerance = 0.0F; VertexArray::VertexArray(int numVerticesPerElement, int numElements) : _numVerticesPerElement(numVerticesPerElement) @@ -40,7 +40,7 @@ void VertexArray::_addNormal(float nx, float ny, float nz) } void VertexArray::_addColor(unsigned char r, unsigned char g, unsigned char b, - unsigned char a) + unsigned char a) { _colors.push_back(r); _colors.push_back(g); @@ -72,14 +72,14 @@ void VertexArray::add(double *x, double *y, double *z, SVector3 *n, } void VertexArray::add(double *x, double *y, double *z, SVector3 *n, unsigned char *r, - unsigned char *g, unsigned char *b, unsigned char *a, - MElement *ele, bool unique, bool boundary) + unsigned char *g, unsigned char *b, unsigned char *a, + MElement *ele, bool unique, bool boundary) { int npe = getNumVerticesPerElement(); if(boundary && npe == 3){ ElementData<3> e(x, y, z, n, r, g, b, a, ele); - ElementDataLessThan<3>::tolerance = CTX::instance()->lc * 1.e-12; + ElementDataLessThan<3>::tolerance = (float)(CTX::instance()->lc * 1.e-12); std::set<ElementData<3>, ElementDataLessThan<3> >::iterator it = _data3.find(e); if(it == _data3.end()) _data3.insert(e); @@ -89,18 +89,18 @@ void VertexArray::add(double *x, double *y, double *z, SVector3 *n, unsigned cha } if(unique){ - Barycenter pc(0., 0., 0.); + Barycenter pc(0.0F, 0.0F, 0.0F); for(int i = 0; i < npe; i++) pc += Barycenter(x[i], y[i], z[i]); - BarycenterLessThan::tolerance = CTX::instance()->lc * 1.e-12; + BarycenterLessThan::tolerance = (float)(CTX::instance()->lc * 1.e-12); if(_barycenters.find(pc) != _barycenters.end()) return; _barycenters.insert(pc); } for(int i = 0; i < npe; i++){ - _addVertex(x[i], y[i], z[i]); - if(n) _addNormal(n[i].x(), n[i].y(), n[i].z()); + _addVertex((float)x[i], (float)y[i], (float)z[i]); + if(n) _addNormal((float)n[i].x(), (float)n[i].y(), (float)n[i].z()); if(r && g && b && a) _addColor(r[i], g[i], b[i], a[i]); _addElement(ele); } @@ -195,11 +195,11 @@ void VertexArray::sort(double x, double y, double z) for(int k = 0; k < 3; k++) sortedVertices.push_back(elements[i].v[3 * j + k]); if(elements[i].n) - for(int k = 0; k < 3; k++) + for(int k = 0; k < 3; k++) sortedNormals.push_back(elements[i].n[3 * j + k]); if(elements[i].c) - for(int k = 0; k < 4; k++) - sortedColors.push_back(elements[i].c[4 * j + k]); + for(int k = 0; k < 4; k++) + sortedColors.push_back(elements[i].c[4 * j + k]); } } diff --git a/Common/VertexArray.h b/Common/VertexArray.h index 4ebdb9c616db695a38c97d2cc35f426e477249cc..7e05c2ce02dfb3cc11cd249cd47d627e1418f291 100644 --- a/Common/VertexArray.h +++ b/Common/VertexArray.h @@ -20,16 +20,16 @@ class ElementData { MElement *_ele; public: ElementData(double *x, double *y, double *z, SVector3 *n, unsigned char *r, - unsigned char *g, unsigned char *b, unsigned char *a, MElement *ele) + unsigned char *g, unsigned char *b, unsigned char *a, MElement *ele) { for(int i = 0; i < N; i++){ - _x[i] = x[i]; - _y[i] = y[i]; - _z[i] = z[i]; + _x[i] = (float)x[i]; + _y[i] = (float)y[i]; + _z[i] = (float)z[i]; if(n){ - _nx[i] = n[i].x(); - _ny[i] = n[i].y(); - _nz[i] = n[i].z(); + _nx[i] = (float)n[i].x(); + _ny[i] = (float)n[i].y(); + _nz[i] = (float)n[i].z(); } else _nx[i] = _ny[i] = _nz[i] = 0.; @@ -91,7 +91,8 @@ class Barycenter { private: float _x, _y, _z; public: - Barycenter(double x, double y, double z) : _x(x), _y(y), _z(z){} + Barycenter(double x, double y, double z) + : _x((float)x), _y((float)y), _z((float)z){} inline float x() const { return _x; } inline float y() const { return _y; } inline float z() const { return _z; } @@ -125,7 +126,7 @@ class VertexArray{ void _addVertex(float x, float y, float z); void _addNormal(float nx, float ny, float nz); void _addColor(unsigned char r, unsigned char g, unsigned char b, - unsigned char a); + unsigned char a); void _addElement(MElement *ele); public: VertexArray(int numVerticesPerElement, int numElements); @@ -150,9 +151,9 @@ class VertexArray{ // element if another one with the same barycenter is not already // present) void add(double *x, double *y, double *z, SVector3 *n, unsigned int *col, - MElement *ele=0, bool unique=true, bool boundary=false); + MElement *ele=0, bool unique=true, bool boundary=false); void add(double *x, double *y, double *z, SVector3 *n, unsigned char *r=0, - unsigned char *g=0, unsigned char *b=0, unsigned char *a=0, + unsigned char *g=0, unsigned char *b=0, unsigned char *a=0, MElement *ele=0, bool unique=true, bool boundary=false); // finalize the arrays void finalize(); diff --git a/Fltk/CMakeLists.txt b/Fltk/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6ec4bcfadd5088370106e3fa13885a43284faa6b --- /dev/null +++ b/Fltk/CMakeLists.txt @@ -0,0 +1,32 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + FlGui.cpp + graphicWindow.cpp + openglWindow.cpp + menuWindow.cpp + optionWindow.cpp + colorbarWindow.cpp + fieldWindow.cpp + pluginWindow.cpp + statisticsWindow.cpp + visibilityWindow.cpp + clippingWindow.cpp + messageWindow.cpp + manipWindow.cpp + contextWindow.cpp + solverWindow.cpp + aboutWindow.cpp + fileDialogs.cpp + extraDialogs.cpp + projectionEditor.cpp + classificationEditor.cpp + partitionDialog.cpp + Draw.cpp + Solvers.cpp +) + +append_gmsh_src(Fltk "${SRC}") diff --git a/Fltk/Draw.cpp b/Fltk/Draw.cpp index 06c4ca36530a2d0dbbfd3d9e0ebc073e6481c5bd..62079b75dd6131a8d51915a41d4673a050f7d80d 100644 --- a/Fltk/Draw.cpp +++ b/Fltk/Draw.cpp @@ -5,7 +5,7 @@ #include <string.h> #include <FL/gl.h> -#include "GUI.h" +#include "FlGui.h" #include "graphicWindow.h" #include "optionWindow.h" #include "GmshDefines.h" @@ -17,24 +17,24 @@ void Draw() { - if(!GUI::available()) return; - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++){ - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++){ - GUI::instance()->graph[i]->gl[j]->make_current(); - GUI::instance()->graph[i]->gl[j]->redraw(); + if(!FlGui::available()) return; + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++){ + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++){ + FlGui::instance()->graph[i]->gl[j]->make_current(); + FlGui::instance()->graph[i]->gl[j]->redraw(); } } - GUI::instance()->check(); + FlGui::instance()->check(); } void DrawCurrentOpenglWindow(bool make_current) { - if(!GUI::available()) return; - openglWindow *gl = GUI::instance()->getCurrentOpenglWindow(); + if(!FlGui::available()) return; + openglWindow *gl = FlGui::instance()->getCurrentOpenglWindow(); if(make_current) gl->make_current(); gl->redraw(); glFlush(); - GUI::instance()->check(); + FlGui::instance()->check(); } void DrawPlugin(void (*draw)(void *context)) diff --git a/Fltk/GUI.cpp b/Fltk/FlGui.cpp similarity index 85% rename from Fltk/GUI.cpp rename to Fltk/FlGui.cpp index f9eba3b0ecdf4fa6364ebfbe4c037f3bbb33d08f..e88f15a72894f9fb1e00a5725c8fd2e9e80169ee 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/FlGui.cpp @@ -9,7 +9,7 @@ #include <FL/Fl_Shared_Image.H> #include <FL/Fl_File_Icon.H> #include <FL/x.H> -#include "GUI.h" +#include "FlGui.h" #include "graphicWindow.h" #include "menuWindow.h" #include "optionWindow.h" @@ -42,11 +42,11 @@ static int globalShortcut(int event) { - if(!GUI::available()) return 0; - return GUI::instance()->testGlobalShortcuts(event); + if(!FlGui::available()) return 0; + return FlGui::instance()->testGlobalShortcuts(event); } -GUI::GUI(int argc, char **argv) +FlGui::FlGui(int argc, char **argv) { // set X display if(CTX::instance()->display.size()) @@ -149,15 +149,15 @@ GUI::GUI(int argc, char **argv) graph[i]->gl[j]->redraw(); } -GUI *GUI::_instance = 0; +FlGui *FlGui::_instance = 0; -GUI *GUI::instance(int argc, char **argv) +FlGui *FlGui::instance(int argc, char **argv) { - if(!_instance) _instance = new GUI(argc, argv); + if(!_instance) _instance = new FlGui(argc, argv); return _instance; } -int GUI::testGlobalShortcuts(int event) +int FlGui::testGlobalShortcuts(int event) { // we only handle shortcuts here if(event != FL_SHORTCUT) return 0; @@ -447,8 +447,8 @@ int GUI::testGlobalShortcuts(int event) else if(Fl::test_shortcut(FL_ALT + 't')) { for(unsigned int i = 0; i < PView::list.size(); i++) if(opt_view_visible(i, GMSH_GET, 0)){ - double t = opt_view_intervals_type(i, GMSH_GET, 0) + 1; - if(t == 4) t++; // skip numeric + double t = opt_view_intervals_type(i, GMSH_GET, 0) + 1; + if(t == 4) t++; // skip numeric opt_view_intervals_type(i, GMSH_SET | GMSH_GUI, t); } status = 2; @@ -495,7 +495,7 @@ int GUI::testGlobalShortcuts(int event) return 0; } -int GUI::testArrowShortcuts() +int FlGui::testArrowShortcuts() { if(Fl::test_shortcut(FL_Left)) { status_play_manual(1, -1); @@ -516,7 +516,7 @@ int GUI::testArrowShortcuts() return 0; } -void GUI::setGraphicTitle(std::string title) +void FlGui::setGraphicTitle(std::string title) { for(unsigned int i = 0; i < graph.size(); i++){ if(!i){ @@ -530,7 +530,7 @@ void GUI::setGraphicTitle(std::string title) } } -void GUI::updateViews() +void FlGui::updateViews() { for(unsigned int i = 0; i < graph.size(); i++) graph[i]->checkAnimButtons(); @@ -543,18 +543,18 @@ void GUI::updateViews() clipping->resetBrowser(); } -void GUI::updateFields() +void FlGui::updateFields() { fields->editField(GModel::current()->getFields()->get(fields->selected_id)); } -void GUI::resetVisibility() +void FlGui::resetVisibility() { if(visibility->win->shown()) visibility_cb(NULL, NULL); } -openglWindow *GUI::getCurrentOpenglWindow() +openglWindow *FlGui::getCurrentOpenglWindow() { if(openglWindow::getLastHandled()) return openglWindow::getLastHandled(); @@ -562,7 +562,7 @@ openglWindow *GUI::getCurrentOpenglWindow() return graph[0]->gl[0]; } -void GUI::splitCurrentOpenglWindow(char how) +void FlGui::splitCurrentOpenglWindow(char how) { openglWindow *g = getCurrentOpenglWindow(); for(unsigned int i = 0; i < graph.size(); i++){ @@ -573,14 +573,14 @@ void GUI::splitCurrentOpenglWindow(char how) } } -char GUI::selectEntity(int type) +char FlGui::selectEntity(int type) { return getCurrentOpenglWindow()->selectEntity (type, selectedVertices, selectedEdges, selectedFaces, selectedRegions, selectedElements); } -void GUI::setStatus(const char *msg, int num) +void FlGui::setStatus(const char *msg, int num) { if(num == 0 || num == 1){ static char buff[2][1024]; @@ -607,7 +607,7 @@ void GUI::setStatus(const char *msg, int num) } } -void GUI::storeCurrentWindowsInfo() +void FlGui::storeCurrentWindowsInfo() { CTX::instance()->menuPosition[0] = menu->win->x(); CTX::instance()->menuPosition[1] = menu->win->y(); @@ -645,7 +645,7 @@ void GUI::storeCurrentWindowsInfo() &CTX::instance()->fileChooserPosition[1]); } -void GUI::callForSolverPlugin(int dim) +void FlGui::callForSolverPlugin(int dim) { GMSH_SolverPlugin *sp = PluginManager::instance()->findSolverPlugin(); if(sp) sp->popupPropertiesForPhysicalEntity(dim); @@ -664,75 +664,75 @@ void window_cb(Fl_Widget *w, void *data) const char *str = (const char*)data; if(!strcmp(str, "minimize")){ - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - if(GUI::instance()->graph[i]->win->shown()) - GUI::instance()->graph[i]->win->iconize(); - if(GUI::instance()->options->win->shown()) - GUI::instance()->options->win->iconize(); - if(GUI::instance()->plugins->win->shown()) - GUI::instance()->plugins->win->iconize(); - if(GUI::instance()->fields->win->shown()) - GUI::instance()->fields->win->iconize(); - if(GUI::instance()->visibility->win->shown()) - GUI::instance()->visibility->win->iconize(); - if(GUI::instance()->clipping->win->shown()) - GUI::instance()->clipping->win->iconize(); - if(GUI::instance()->manip->win->shown()) - GUI::instance()->manip->win->iconize(); - if(GUI::instance()->stats->win->shown()) - GUI::instance()->stats->win->iconize(); - if(GUI::instance()->messages->win->shown()) - GUI::instance()->messages->win->iconize(); - if(GUI::instance()->menu->win->shown()) - GUI::instance()->menu->win->iconize(); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + if(FlGui::instance()->graph[i]->win->shown()) + FlGui::instance()->graph[i]->win->iconize(); + if(FlGui::instance()->options->win->shown()) + FlGui::instance()->options->win->iconize(); + if(FlGui::instance()->plugins->win->shown()) + FlGui::instance()->plugins->win->iconize(); + if(FlGui::instance()->fields->win->shown()) + FlGui::instance()->fields->win->iconize(); + if(FlGui::instance()->visibility->win->shown()) + FlGui::instance()->visibility->win->iconize(); + if(FlGui::instance()->clipping->win->shown()) + FlGui::instance()->clipping->win->iconize(); + if(FlGui::instance()->manip->win->shown()) + FlGui::instance()->manip->win->iconize(); + if(FlGui::instance()->stats->win->shown()) + FlGui::instance()->stats->win->iconize(); + if(FlGui::instance()->messages->win->shown()) + FlGui::instance()->messages->win->iconize(); + if(FlGui::instance()->menu->win->shown()) + FlGui::instance()->menu->win->iconize(); } else if(!strcmp(str, "zoom")){ if(zoom){ - oldx = GUI::instance()->graph[0]->win->x(); - oldy = GUI::instance()->graph[0]->win->y(); - oldw = GUI::instance()->graph[0]->win->w(); - oldh = GUI::instance()->graph[0]->win->h(); - GUI::instance()->graph[0]->win->resize(Fl::x(), Fl::y(), Fl::w(), Fl::h()); - //GUI::instance()->graph[0]->win->fullscreen(); + oldx = FlGui::instance()->graph[0]->win->x(); + oldy = FlGui::instance()->graph[0]->win->y(); + oldw = FlGui::instance()->graph[0]->win->w(); + oldh = FlGui::instance()->graph[0]->win->h(); + FlGui::instance()->graph[0]->win->resize(Fl::x(), Fl::y(), Fl::w(), Fl::h()); + //FlGui::instance()->graph[0]->win->fullscreen(); zoom = 0; } else{ - GUI::instance()->graph[0]->win->resize(oldx, oldy, oldw, oldh); - //GUI::instance()->graph[0]->win->fullscreen_off(oldx, oldy, oldw, oldh); + FlGui::instance()->graph[0]->win->resize(oldx, oldy, oldw, oldh); + //FlGui::instance()->graph[0]->win->fullscreen_off(oldx, oldy, oldw, oldh); zoom = 1; } - GUI::instance()->graph[0]->win->show(); - GUI::instance()->menu->win->show(); + FlGui::instance()->graph[0]->win->show(); + FlGui::instance()->menu->win->show(); } else if(!strcmp(str, "front")){ // the order is important! - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - GUI::instance()->graph[i]->win->show(); - if(GUI::instance()->options->win->shown()) - GUI::instance()->options->win->show(); - if(GUI::instance()->plugins->win->shown()) - GUI::instance()->plugins->win->show(); - if(GUI::instance()->fields->win->shown()) - GUI::instance()->fields->win->show(); - if(GUI::instance()->geoContext->win->shown()) - GUI::instance()->geoContext->win->show(); - if(GUI::instance()->meshContext->win->shown()) - GUI::instance()->meshContext->win->show(); - for(unsigned int i = 0; i < GUI::instance()->solver.size(); i++) { - if(GUI::instance()->solver[i]->win->shown()) - GUI::instance()->solver[i]->win->show(); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + FlGui::instance()->graph[i]->win->show(); + if(FlGui::instance()->options->win->shown()) + FlGui::instance()->options->win->show(); + if(FlGui::instance()->plugins->win->shown()) + FlGui::instance()->plugins->win->show(); + if(FlGui::instance()->fields->win->shown()) + FlGui::instance()->fields->win->show(); + if(FlGui::instance()->geoContext->win->shown()) + FlGui::instance()->geoContext->win->show(); + if(FlGui::instance()->meshContext->win->shown()) + FlGui::instance()->meshContext->win->show(); + for(unsigned int i = 0; i < FlGui::instance()->solver.size(); i++) { + if(FlGui::instance()->solver[i]->win->shown()) + FlGui::instance()->solver[i]->win->show(); } - if(GUI::instance()->visibility->win->shown()) - GUI::instance()->visibility->win->show(); - if(GUI::instance()->clipping->win->shown()) - GUI::instance()->clipping->win->show(); - if(GUI::instance()->manip->win->shown()) - GUI::instance()->manip->win->show(); - if(GUI::instance()->stats->win->shown()) - GUI::instance()->stats->win->show(); - if(GUI::instance()->messages->win->shown()) - GUI::instance()->messages->win->show(); - GUI::instance()->menu->win->show(); + if(FlGui::instance()->visibility->win->shown()) + FlGui::instance()->visibility->win->show(); + if(FlGui::instance()->clipping->win->shown()) + FlGui::instance()->clipping->win->show(); + if(FlGui::instance()->manip->win->shown()) + FlGui::instance()->manip->win->show(); + if(FlGui::instance()->stats->win->shown()) + FlGui::instance()->stats->win->show(); + if(FlGui::instance()->messages->win->shown()) + FlGui::instance()->messages->win->show(); + FlGui::instance()->menu->win->show(); } } diff --git a/Fltk/GUI.h b/Fltk/FlGui.h similarity index 95% rename from Fltk/GUI.h rename to Fltk/FlGui.h index 4e06c6bcfe41930a9ded3040854d1a6442cdbaa7..b7f2bb69ff6ea976857b724b9aeec84eb39dd762 100644 --- a/Fltk/GUI.h +++ b/Fltk/FlGui.h @@ -3,8 +3,8 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. -#ifndef _GUI_H_ -#define _GUI_H_ +#ifndef _FL_GUI_H_ +#define _FL_GUI_H_ #include <string> #include <vector> @@ -40,9 +40,9 @@ class GFace; class GRegion; class MElement; -class GUI{ +class FlGui{ private: - static GUI *_instance; + static FlGui *_instance; public: std::vector<GVertex*> selectedVertices; std::vector<GEdge*> selectedEdges; @@ -65,10 +65,10 @@ class GUI{ aboutWindow *about; std::vector<solverWindow*> solver; public: - GUI(int argc, char **argv); - ~GUI(){} + FlGui(int argc, char **argv); + ~FlGui(){} // return the single static instance of the GUI - static GUI *instance(int argc=0, char **argv=0); + static FlGui *instance(int argc=0, char **argv=0); // check if the GUI is available static bool available(){ return (_instance != 0); } // run the GUI until there's no window left diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp index e18538746bd1feadaaa4b4c10bfe553b255070ab..af100ec155e5bb8a9ad1c94ec7a12f36cde63e43 100644 --- a/Fltk/Main.cpp +++ b/Fltk/Main.cpp @@ -6,7 +6,7 @@ #include <string> #include "Gmsh.h" #include "GmshMessage.h" -#include "GUI.h" +#include "FlGui.h" #include "menuWindow.h" #include "Draw.h" #include "Context.h" @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) } // Create the GUI - GUI::instance(argc, argv); + FlGui::instance(argc, argv); // Set all previously defined options in the GUI InitOptionsGUI(0); @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) Msg::Info("-------------------------------------------------------"); // Display the GUI immediately to have a quick "a la Windows" launch time - GUI::instance()->check(); + FlGui::instance()->check(); // Open project file and merge all other input files OpenProject(GModel::current()->getFileName()); @@ -85,20 +85,20 @@ int main(int argc, char *argv[]) if(CTX::instance()->post.combineTime){ PView::combine(true, 2, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); } // Init first context switch (CTX::instance()->initialContext) { - case 1: GUI::instance()->menu->setContext(menu_geometry, 0); break; - case 2: GUI::instance()->menu->setContext(menu_mesh, 0); break; - case 3: GUI::instance()->menu->setContext(menu_solver, 0); break; - case 4: GUI::instance()->menu->setContext(menu_post, 0); break; + case 1: FlGui::instance()->menu->setContext(menu_geometry, 0); break; + case 2: FlGui::instance()->menu->setContext(menu_mesh, 0); break; + case 3: FlGui::instance()->menu->setContext(menu_solver, 0); break; + case 4: FlGui::instance()->menu->setContext(menu_post, 0); break; default: // automatic if(PView::list.size()) - GUI::instance()->menu->setContext(menu_post, 0); + FlGui::instance()->menu->setContext(menu_post, 0); else - GUI::instance()->menu->setContext(menu_geometry, 0); + FlGui::instance()->menu->setContext(menu_geometry, 0); break; } @@ -118,5 +118,5 @@ int main(int argc, char *argv[]) if(CTX::instance()->solver.listen) Solver(-1, NULL); // loop - return GUI::instance()->run(); + return FlGui::instance()->run(); } diff --git a/Fltk/Makefile b/Fltk/Makefile deleted file mode 100644 index a09d0dee4c1211df5a26cb3e8fa71cc7dfeece83..0000000000000000000000000000000000000000 --- a/Fltk/Makefile +++ /dev/null @@ -1,396 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshFltk${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Graphics\ - ${DASH}I../Geo ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Numeric\ - ${DASH}I../Parser ${DASH}I../Fltk ${DASH}I../Plugin ${DASH}I../utils/solvers\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/NativeFileChooser\ - ${DASH}I../contrib/TreeBrowser - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Main.cpp \ - GUI.cpp\ - graphicWindow.cpp\ - openglWindow.cpp\ - menuWindow.cpp\ - optionWindow.cpp\ - colorbarWindow.cpp\ - fieldWindow.cpp\ - pluginWindow.cpp\ - statisticsWindow.cpp\ - visibilityWindow.cpp\ - clippingWindow.cpp\ - messageWindow.cpp\ - manipWindow.cpp\ - contextWindow.cpp\ - solverWindow.cpp\ - aboutWindow.cpp\ - fileDialogs.cpp\ - extraDialogs.cpp\ - projectionEditor.cpp\ - classificationEditor.cpp\ - partitionDialog.cpp\ - Draw.cpp\ - Solvers.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -res: - windres Win32Icon.rc -O coff Win32Icon.res - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Main${OBJEXT}: Main.cpp ../Common/Gmsh.h ../Common/GmshMessage.h GUI.h \ - menuWindow.h popupButton.h Draw.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Common/Options.h \ - ../Post/ColorTable.h ../Parser/Parser.h ../Common/OpenFile.h \ - ../Common/CommandLine.h Solvers.h ../Plugin/PluginManager.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Mesh/Field.h \ - ../Common/GmshConfig.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Numeric/GmshMatrix.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Post/PView.h ../Mesh/BackgroundMesh.h -GUI${OBJEXT}: GUI.cpp GUI.h graphicWindow.h openglWindow.h \ - ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - menuWindow.h popupButton.h optionWindow.h spherePositionWidget.h \ - colorbarWindow.h ../Post/ColorTable.h fieldWindow.h pluginWindow.h \ - statisticsWindow.h visibilityWindow.h ../Common/GmshConfig.h \ - clippingWindow.h messageWindow.h manipWindow.h contextWindow.h \ - solverWindow.h aboutWindow.h fileDialogs.h Draw.h \ - ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Post/PView.h Solvers.h ../Mesh/Field.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Plugin/Plugin.h ../Common/Options.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Plugin/PluginManager.h ../Common/OpenFile.h \ - Win32Icon.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -graphicWindow${OBJEXT}: graphicWindow.cpp GUI.h graphicWindow.h openglWindow.h \ - ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - paletteWindow.h mainWindow.h menuWindow.h popupButton.h messageWindow.h \ - manipWindow.h extraDialogs.h Draw.h ../Post/PView.h ../Post/PViewData.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Common/OS.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -openglWindow${OBJEXT}: openglWindow.cpp openglWindow.h ../Graphics/drawContext.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h graphicWindow.h manipWindow.h \ - contextWindow.h visibilityWindow.h ../Common/GmshConfig.h \ - ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - Draw.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h GUI.h \ - ../Common/VertexArray.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -menuWindow${OBJEXT}: menuWindow.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GUI.h Draw.h menuWindow.h popupButton.h \ - mainWindow.h graphicWindow.h openglWindow.h ../Graphics/drawContext.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h optionWindow.h \ - spherePositionWidget.h colorbarWindow.h ../Post/ColorTable.h \ - statisticsWindow.h messageWindow.h contextWindow.h visibilityWindow.h \ - clippingWindow.h manipWindow.h fieldWindow.h pluginWindow.h \ - solverWindow.h aboutWindow.h fileDialogs.h partitionDialog.h \ - projectionEditor.h ../Geo/fourierProjectionFace.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/Range.h classificationEditor.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Common/Options.h Solvers.h ../Common/CommandLine.h \ - ../Mesh/Generator.h ../Mesh/HighOrder.h ../Post/PView.h \ - ../Post/PViewData.h ../Post/PViewOptions.h ../Post/ColorTable.h \ - ../Mesh/Field.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/OS.h \ - ../Common/StringUtils.h ../Common/OpenFile.h ../Common/CreateFile.h \ - ../Geo/findLinks.h ../Common/ListUtils.h ../Geo/GeoStringInterface.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -optionWindow${OBJEXT}: optionWindow.cpp ../Common/GmshConfig.h \ - ../Common/GmshDefines.h ../Common/GmshMessage.h GUI.h optionWindow.h \ - spherePositionWidget.h colorbarWindow.h ../Post/ColorTable.h \ - paletteWindow.h menuWindow.h popupButton.h extraDialogs.h Draw.h \ - ../Common/Options.h Solvers.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Post/PView.h ../Post/PViewData.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h ../Common/OS.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -colorbarWindow${OBJEXT}: colorbarWindow.cpp colorbarWindow.h \ - ../Post/ColorTable.h Draw.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -fieldWindow${OBJEXT}: fieldWindow.cpp GUI.h Draw.h fieldWindow.h paletteWindow.h \ - fileDialogs.h ../Common/GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Post/PView.h ../Common/GmshMessage.h \ - ../Mesh/Field.h ../Common/GmshConfig.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Numeric/GmshMatrix.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Geo/GeoStringInterface.h \ - ../Common/ListUtils.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -pluginWindow${OBJEXT}: pluginWindow.cpp GUI.h Draw.h pluginWindow.h \ - paletteWindow.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -statisticsWindow${OBJEXT}: statisticsWindow.cpp GUI.h Draw.h statisticsWindow.h \ - paletteWindow.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Post/PView.h ../Mesh/Generator.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -visibilityWindow${OBJEXT}: visibilityWindow.cpp ../Common/GmshConfig.h GUI.h \ - Draw.h visibilityWindow.h paletteWindow.h contextWindow.h \ - graphicWindow.h openglWindow.h ../Graphics/drawContext.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshDefines.h \ - ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Post/PView.h ../Post/PViewData.h ../Geo/GeoStringInterface.h \ - ../Common/ListUtils.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Parser/Parser.h -clippingWindow${OBJEXT}: clippingWindow.cpp GUI.h Draw.h clippingWindow.h \ - paletteWindow.h ../Common/GmshDefines.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -messageWindow${OBJEXT}: messageWindow.cpp GUI.h messageWindow.h paletteWindow.h \ - fileDialogs.h ../Common/GmshMessage.h ../Common/OS.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -manipWindow${OBJEXT}: manipWindow.cpp GUI.h Draw.h manipWindow.h paletteWindow.h \ - graphicWindow.h openglWindow.h ../Graphics/drawContext.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -contextWindow${OBJEXT}: contextWindow.cpp GUI.h Draw.h contextWindow.h \ - paletteWindow.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/GeoStringInterface.h ../Common/ListUtils.h ../Common/OpenFile.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -solverWindow${OBJEXT}: solverWindow.cpp ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h GUI.h solverWindow.h paletteWindow.h \ - optionWindow.h spherePositionWidget.h colorbarWindow.h \ - ../Post/ColorTable.h messageWindow.h fileDialogs.h \ - ../Common/GmshMessage.h Solvers.h ../Common/StringUtils.h \ - ../Common/Options.h ../Common/OS.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -aboutWindow${OBJEXT}: aboutWindow.cpp GUI.h aboutWindow.h paletteWindow.h \ - ../Common/CommandLine.h ../Common/StringUtils.h ../Common/OS.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -fileDialogs${OBJEXT}: fileDialogs.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Common/GmshDefines.h GUI.h \ - ../Common/CreateFile.h ../Common/Options.h ../Post/ColorTable.h Draw.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -extraDialogs${OBJEXT}: extraDialogs.cpp GUI.h paletteWindow.h \ - ../Common/GmshDefines.h ../Common/OpenFile.h ../Common/CreateFile.h \ - ../Common/Options.h ../Post/ColorTable.h Draw.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -projectionEditor${OBJEXT}: projectionEditor.cpp ../Common/GmshConfig.h GUI.h \ - projectionEditor.h ../Geo/fourierProjectionFace.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/Range.h ../Post/ColorTable.h \ - paletteWindow.h fileDialogs.h ../Geo/GModelIO_Fourier.h ../Geo/GModel.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h Draw.h ../Common/Options.h \ - ../Common/StringUtils.h ../Geo/fourierFace.h ../Geo/GFace.h \ - ../Geo/GModel.h ../Geo/Range.h ../Geo/fourierEdge.h ../Geo/GEdge.h \ - ../Geo/GModel.h ../Geo/fourierVertex.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/MVertex.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -classificationEditor${OBJEXT}: classificationEditor.cpp GUI.h \ - classificationEditor.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Post/ColorTable.h \ - paletteWindow.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h Draw.h \ - ../Common/Options.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Mesh/meshGFaceOptimize.h ../Mesh/meshGFaceDelaunayInsertion.h \ - ../Geo/discreteEdge.h ../Geo/GModel.h ../Geo/GEdge.h \ - ../Geo/discreteVertex.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/MVertex.h ../Geo/discreteFace.h ../Geo/GModel.h ../Geo/GFace.h \ - ../Geo/discreteEdge.h ../Geo/MEdge.h -partitionDialog${OBJEXT}: partitionDialog.cpp ../Common/GmshConfig.h \ - ../Common/GmshDefines.h ../Common/GmshMessage.h GUI.h paletteWindow.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Draw.h ../Common/Options.h \ - ../Post/ColorTable.h ../Mesh/meshPartition.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -Draw${OBJEXT}: Draw.cpp GUI.h graphicWindow.h openglWindow.h \ - ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - optionWindow.h spherePositionWidget.h colorbarWindow.h \ - ../Post/ColorTable.h ../Common/GmshDefines.h ../Common/GmshMessage.h \ - Draw.h ../Common/StringUtils.h ../Graphics/gl2ps.h \ - ../Common/GmshConfig.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -Solvers${OBJEXT}: Solvers.cpp GUI.h solverWindow.h menuWindow.h popupButton.h \ - ../Common/GmshMessage.h ../Common/StringUtils.h Solvers.h \ - ../Common/GmshSocket.h ../Common/GmshConfig.h ../Common/OpenFile.h \ - ../Post/PView.h ../Geo/SPoint3.h Draw.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Common/OS.h diff --git a/Fltk/Solvers.cpp b/Fltk/Solvers.cpp index 6e9e73992a42aedd0c89050ea188871adaef9cb6..09571a8740e684f81b7a3a377830af2a22820b5b 100644 --- a/Fltk/Solvers.cpp +++ b/Fltk/Solvers.cpp @@ -5,7 +5,7 @@ #include <string.h> #include <string> -#include "GUI.h" +#include "FlGui.h" #include "solverWindow.h" #include "menuWindow.h" #include "GmshMessage.h" @@ -46,7 +46,7 @@ class myGmshServer : public GmshServer{ if(ret == 0){ // nothing available: wait at most waitint seconds, and in the // meantime respond to FLTK events - GUI::instance()->wait(waitint); + FlGui::instance()->wait(waitint); } else if(ret > 0){ // data is there @@ -159,7 +159,7 @@ int Solver(int num, const char *args) } if(num >= 0){ for(int i = 0; i < SINFO[num].nboptions; i++) - GUI::instance()->solver[num]->choice[i]->clear(); + FlGui::instance()->solver[num]->choice[i]->clear(); } return 0; } @@ -255,7 +255,7 @@ int Solver(int num, const char *args) MergeFile(message); Draw(); if(n != (int)PView::list.size()) - GUI::instance()->menu->setContext(menu_post, 0); + FlGui::instance()->menu->setContext(menu_post, 0); } break; case GmshServer::CLIENT_PARSE_STRING: @@ -281,11 +281,11 @@ int Solver(int num, const char *args) default: Msg::Warning("Unknown type of message received from %s", num >= 0 ? SINFO[num].name.c_str() : "client"); - Msg::Direct("%-8.8s: %s", num >= 0 ? SINFO[num].name.c_str() : "Client", + Msg::Direct("%-8.8s: %s", num >= 0 ? SINFO[num].name.c_str() : "Client", message); break; } - GUI::instance()->check(); + FlGui::instance()->check(); } else{ Msg::Warning("Failed to receive message body on socket: aborting"); @@ -303,10 +303,10 @@ int Solver(int num, const char *args) if(!initOption[0] || !initOption[1] || !initOption[2] || !initOption[3] || !initOption[4]){ // some options have been changed for(int i = 0; i < SINFO[num].nboptions; i++) { - GUI::instance()->solver[num]->choice[i]->clear(); + FlGui::instance()->solver[num]->choice[i]->clear(); for(unsigned int j = 0; j < SINFO[num].option[i].size(); j++) - GUI::instance()->solver[num]->choice[i]->add(SINFO[num].option[i][j].c_str()); - GUI::instance()->solver[num]->choice[i]->value(0); + FlGui::instance()->solver[num]->choice[i]->add(SINFO[num].option[i][j].c_str()); + FlGui::instance()->solver[num]->choice[i]->value(0); } } } diff --git a/Fltk/aboutWindow.cpp b/Fltk/aboutWindow.cpp index 44affa875c399e2d426d233d274c091ac2d9ae0d..52910198f44254193967edad3f6d218640de7340 100644 --- a/Fltk/aboutWindow.cpp +++ b/Fltk/aboutWindow.cpp @@ -7,7 +7,7 @@ #include <FL/Fl_Browser.H> #include <FL/Fl_Box.H> #include <FL/Fl_Button.H> -#include "GUI.h" +#include "FlGui.h" #include "aboutWindow.h" #include "paletteWindow.h" #include "CommandLine.h" @@ -40,7 +40,7 @@ aboutWindow::aboutWindow() { char buffer[1024]; int width = 28 * FL_NORMAL_SIZE; - int height = 15 * BH + BH/2; + int height = 17 * BH; win = new paletteWindow (width, height, CTX::instance()->nonModalWindows ? true : false, "About Gmsh"); diff --git a/Fltk/classificationEditor.cpp b/Fltk/classificationEditor.cpp index de28d7e67ed17547f81d6e73849ac35c9938b57e..665944519112c04af3fd580b7d6c1be62e072822 100644 --- a/Fltk/classificationEditor.cpp +++ b/Fltk/classificationEditor.cpp @@ -5,7 +5,7 @@ #include <FL/Fl_Tabs.H> #include <FL/Fl_Value_Input.H> -#include "GUI.h" +#include "FlGui.h" #include "classificationEditor.h" #include "paletteWindow.h" #include "Numeric.h" @@ -58,13 +58,13 @@ static void class_selectgface_cb(Fl_Widget *w, void *data) Draw(); Msg::StatusBar(3, false, "Select Model Face\n" - "[Press 'e' to end selection or 'q' to abort]"); + "[Press 'e' to end selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_SURFACE); + char ib = FlGui::instance()->selectEntity(ENT_SURFACE); if(ib == 'l') { - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++){ - GUI::instance()->selectedFaces[i]->setSelection(1); - temp.push_back(GUI::instance()->selectedFaces[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++){ + FlGui::instance()->selectedFaces[i]->setSelection(1); + temp.push_back(FlGui::instance()->selectedFaces[i]); } } // ok store the list of gfaces ! @@ -98,13 +98,13 @@ static void class_deleteedge_cb(Fl_Widget *w, void *data) Draw(); Msg::StatusBar(3, false, "Select Elements\n" - "[Press 'e' to end selection or 'q' to abort]"); + "[Press 'e' to end selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_ALL); + char ib = FlGui::instance()->selectEntity(ENT_ALL); if(ib == 'l') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++){ - MElement *me = GUI::instance()->selectedElements[i]; + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++){ + MElement *me = FlGui::instance()->selectedElements[i]; if(me->getType() == TYPE_LIN && me->getVisibility() != 2){ me->setVisibility(2); ele.push_back((MLine*)me); } @@ -112,8 +112,8 @@ static void class_deleteedge_cb(Fl_Widget *w, void *data) } } if(ib == 'r') { - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++) - GUI::instance()->selectedElements[i]->setVisibility(1); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++) + FlGui::instance()->selectedElements[i]->setVisibility(1); } // ok, we compute edges ! if(ib == 'e') { @@ -376,77 +376,77 @@ static void class_color_cb(Fl_Widget* w, void* data) std::list<MLine*> segments; for (unsigned int i = 0; i < ge->lines.size(); i++){ - segments.push_back(ge->lines[i]); + segments.push_back(ge->lines[i]); } //for each actual GEdge while (!segments.empty()) { - std::vector<MLine*> myLines; - std::list<MLine*>::iterator it = segments.begin(); - - MVertex *vB = (*it)->getVertex(0); - MVertex *vE = (*it)->getVertex(1); - myLines.push_back(*it); - segments.erase(it); - it++; - - //printf("***candidate mline %d %d of size %d \n", vB->getNum(), vE->getNum(), segments.size()); - - for (int i=0; i<2; i++) { - - for (std::list<MLine*>::iterator it = segments.begin() ; it != segments.end(); ++it){ - MVertex *v1 = (*it)->getVertex(0); - MVertex *v2 = (*it)->getVertex(1); - //printf("mline %d %d \n", v1->getNum(), v2->getNum()); - - std::list<MLine*>::iterator itp; - if ( v1 == vE ){ - //printf("->push back this mline \n"); - myLines.push_back(*it); - itp = it; - it++; - segments.erase(itp); - vE = v2; - i = -1; - } - else if ( v2 == vE){ - //printf("->push back this mline \n"); - myLines.push_back(*it); - itp = it; - it++; - segments.erase(itp); - vE = v1; - i=-1; - } - - if (it == segments.end()) break; - - } - - if (vB == vE) break; - - if (segments.empty()) break; - - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); - MVertex *temp = vB; - vB = vE; - vE = temp; - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); - - } - -// printf("************ CANDIDATE NEW EDGE \n"); -// for (std::vector<MLine*>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ -// MVertex *v1 = (*it)->getVertex(0); -// MVertex *v2 = (*it)->getVertex(1); -// printf("Line %d %d \n", v1->getNum(), v2->getNum()); -// } - GEdge *newGe = new discreteEdge(GModel::current(), maxEdgeNum() + 1, 0, 0); - newGe->lines.insert(newGe->lines.end(), myLines.begin(), myLines.end()); - GModel::current()->add(newGe); - printf("create new edge with tag =%d\n", maxEdgeNum()); - + std::vector<MLine*> myLines; + std::list<MLine*>::iterator it = segments.begin(); + + MVertex *vB = (*it)->getVertex(0); + MVertex *vE = (*it)->getVertex(1); + myLines.push_back(*it); + segments.erase(it); + it++; + + //printf("***candidate mline %d %d of size %d \n", vB->getNum(), vE->getNum(), segments.size()); + + for (int i=0; i<2; i++) { + + for (std::list<MLine*>::iterator it = segments.begin() ; it != segments.end(); ++it){ + MVertex *v1 = (*it)->getVertex(0); + MVertex *v2 = (*it)->getVertex(1); + //printf("mline %d %d \n", v1->getNum(), v2->getNum()); + + std::list<MLine*>::iterator itp; + if ( v1 == vE ){ + //printf("->push back this mline \n"); + myLines.push_back(*it); + itp = it; + it++; + segments.erase(itp); + vE = v2; + i = -1; + } + else if ( v2 == vE){ + //printf("->push back this mline \n"); + myLines.push_back(*it); + itp = it; + it++; + segments.erase(itp); + vE = v1; + i=-1; + } + + if (it == segments.end()) break; + + } + + if (vB == vE) break; + + if (segments.empty()) break; + + //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + MVertex *temp = vB; + vB = vE; + vE = temp; + //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + + } + +// printf("************ CANDIDATE NEW EDGE \n"); +// for (std::vector<MLine*>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ +// MVertex *v1 = (*it)->getVertex(0); +// MVertex *v2 = (*it)->getVertex(1); +// printf("Line %d %d \n", v1->getNum(), v2->getNum()); +// } + GEdge *newGe = new discreteEdge(GModel::current(), maxEdgeNum() + 1, 0, 0); + newGe->lines.insert(newGe->lines.end(), myLines.begin(), myLines.end()); + GModel::current()->add(newGe); + printf("create new edge with tag =%d\n", maxEdgeNum()); + }//end for each actual GEdge } @@ -541,13 +541,13 @@ static void class_select_cb(Fl_Widget *w, void *data) Draw(); Msg::StatusBar(3, false, "Select Elements\n" - "[Press 'e' to end selection or 'q' to abort]"); + "[Press 'e' to end selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_ALL); + char ib = FlGui::instance()->selectEntity(ENT_ALL); if(ib == 'l') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++){ - MElement *me = GUI::instance()->selectedElements[i]; + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++){ + MElement *me = FlGui::instance()->selectedElements[i]; if(me->getType() == TYPE_TRI && me->getVisibility() != 2){ me->setVisibility(2); ele.push_back((MTriangle*)me); } @@ -555,8 +555,8 @@ static void class_select_cb(Fl_Widget *w, void *data) } } if(ib == 'r') { - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++) - GUI::instance()->selectedElements[i]->setVisibility(1); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++) + FlGui::instance()->selectedElements[i]->setVisibility(1); } // ok, we compute edges ! if(ib == 'e') { diff --git a/Fltk/clippingWindow.cpp b/Fltk/clippingWindow.cpp index d097d1e426ffa866320090c30d7c36949ecc9967..ec1bd459c306dc805a3c7048ec8075d86ddae62b 100644 --- a/Fltk/clippingWindow.cpp +++ b/Fltk/clippingWindow.cpp @@ -5,7 +5,7 @@ #include <FL/Fl_Tabs.H> #include <FL/Fl_Return_Button.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "clippingWindow.h" #include "paletteWindow.h" @@ -16,24 +16,24 @@ void clip_cb(Fl_Widget *w, void *data) { - GUI::instance()->clipping->show(); + FlGui::instance()->clipping->show(); } static void clip_num_cb(Fl_Widget *w, void *data) { - GUI::instance()->clipping->resetBrowser(); + FlGui::instance()->clipping->resetBrowser(); } static void clip_update_cb(Fl_Widget *w, void *data) { - if(GUI::instance()->clipping->group[0]->visible()){ // clipping planes - int idx = GUI::instance()->clipping->choice->value(); + if(FlGui::instance()->clipping->group[0]->visible()){ // clipping planes + int idx = FlGui::instance()->clipping->choice->value(); CTX::instance()->geom.clip &= ~(1 << idx); CTX::instance()->mesh.clip &= ~(1 << idx); for(unsigned int i = 0; i < PView::list.size(); i++) PView::list[i]->getOptions()->clip &= ~(1 << idx); - for(int i = 0; i < GUI::instance()->clipping->browser->size(); i++){ - if(GUI::instance()->clipping->browser->selected(i + 1)){ + for(int i = 0; i < FlGui::instance()->clipping->browser->size(); i++){ + if(FlGui::instance()->clipping->browser->selected(i + 1)){ if(i == 0) CTX::instance()->geom.clip |= (1 << idx); else if(i == 1) @@ -43,15 +43,15 @@ static void clip_update_cb(Fl_Widget *w, void *data) } } for(int i = 0; i < 4; i++) - CTX::instance()->clipPlane[idx][i] = GUI::instance()->clipping->value[i]->value(); + CTX::instance()->clipPlane[idx][i] = FlGui::instance()->clipping->value[i]->value(); } else{ // clipping box CTX::instance()->geom.clip = 0; CTX::instance()->mesh.clip = 0; for(unsigned int i = 0; i < PView::list.size(); i++) PView::list[i]->getOptions()->clip = 0; - for(int i = 0; i < GUI::instance()->clipping->browser->size(); i++){ - if(GUI::instance()->clipping->browser->selected(i + 1)){ + for(int i = 0; i < FlGui::instance()->clipping->browser->size(); i++){ + if(FlGui::instance()->clipping->browser->selected(i + 1)){ for(int idx = 0; idx < 6; idx++){ if(i == 0) CTX::instance()->geom.clip |= (1 << idx); @@ -62,12 +62,12 @@ static void clip_update_cb(Fl_Widget *w, void *data) } } } - double c[3] = {GUI::instance()->clipping->value[4]->value(), - GUI::instance()->clipping->value[5]->value(), - GUI::instance()->clipping->value[6]->value()}; - double d[3] = {GUI::instance()->clipping->value[7]->value(), - GUI::instance()->clipping->value[8]->value(), - GUI::instance()->clipping->value[9]->value()}; + double c[3] = {FlGui::instance()->clipping->value[4]->value(), + FlGui::instance()->clipping->value[5]->value(), + FlGui::instance()->clipping->value[6]->value()}; + double d[3] = {FlGui::instance()->clipping->value[7]->value(), + FlGui::instance()->clipping->value[8]->value(), + FlGui::instance()->clipping->value[9]->value()}; // left CTX::instance()->clipPlane[0][0] = 1.; CTX::instance()->clipPlane[0][1] = 0.; @@ -102,22 +102,22 @@ static void clip_update_cb(Fl_Widget *w, void *data) if(CTX::instance()->clipWholeElements || CTX::instance()->clipWholeElements != - GUI::instance()->clipping->butt[0]->value()){ + FlGui::instance()->clipping->butt[0]->value()){ for(int clip = 0; clip < 6; clip++){ if(CTX::instance()->mesh.clip) - CTX::instance()->mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); + CTX::instance()->mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); for(unsigned int index = 0; index < PView::list.size(); index++) - if(PView::list[index]->getOptions()->clip) - PView::list[index]->setChanged(true); + if(PView::list[index]->getOptions()->clip) + PView::list[index]->setChanged(true); } } CTX::instance()->clipWholeElements = - GUI::instance()->clipping->butt[0]->value(); + FlGui::instance()->clipping->butt[0]->value(); CTX::instance()->clipOnlyDrawIntersectingVolume = - GUI::instance()->clipping->butt[1]->value(); + FlGui::instance()->clipping->butt[1]->value(); CTX::instance()->clipOnlyVolume = - GUI::instance()->clipping->butt[2]->value(); + FlGui::instance()->clipping->butt[2]->value(); int old = CTX::instance()->drawBBox; CTX::instance()->drawBBox = 1; @@ -131,8 +131,8 @@ static void clip_update_cb(Fl_Widget *w, void *data) static void clip_invert_cb(Fl_Widget *w, void *data) { for(int i = 0; i < 4; i++) - GUI::instance()->clipping->value[i]->value - (-GUI::instance()->clipping->value[i]->value()); + FlGui::instance()->clipping->value[i]->value + (-FlGui::instance()->clipping->value[i]->value()); clip_update_cb(NULL, NULL); } @@ -155,7 +155,7 @@ static void clip_reset_cb(Fl_Widget *w, void *data) PView::list[index]->setChanged(true); } - GUI::instance()->clipping->resetBrowser(); + FlGui::instance()->clipping->resetBrowser(); Draw(); } diff --git a/Fltk/contextWindow.cpp b/Fltk/contextWindow.cpp index c0a335cc1a4cacf6c8d66568c4683b6931d82bc5..dee10b2f5014d03f4ef2bf7cfec65174d8e56242 100644 --- a/Fltk/contextWindow.cpp +++ b/Fltk/contextWindow.cpp @@ -5,7 +5,7 @@ #include <FL/Fl_Tabs.H> #include <FL/Fl_Return_Button.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "contextWindow.h" #include "paletteWindow.h" @@ -16,20 +16,20 @@ static void con_geometry_define_parameter_cb(Fl_Widget *w, void *data) { - add_param(GUI::instance()->geoContext->input[0]->value(), - GUI::instance()->geoContext->input[1]->value(), + add_param(FlGui::instance()->geoContext->input[0]->value(), + FlGui::instance()->geoContext->input[1]->value(), GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); } static void con_geometry_define_point_cb(Fl_Widget *w, void *data) { add_point(GModel::current()->getFileName(), - GUI::instance()->geoContext->input[2]->value(), - GUI::instance()->geoContext->input[3]->value(), - GUI::instance()->geoContext->input[4]->value(), - GUI::instance()->geoContext->input[5]->value()); - GUI::instance()->resetVisibility(); + FlGui::instance()->geoContext->input[2]->value(), + FlGui::instance()->geoContext->input[3]->value(), + FlGui::instance()->geoContext->input[4]->value(), + FlGui::instance()->geoContext->input[5]->value()); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); SetBoundingBox(); Draw(); @@ -37,9 +37,9 @@ static void con_geometry_define_point_cb(Fl_Widget *w, void *data) static void con_geometry_snap_cb(Fl_Widget *w, void *data) { - CTX::instance()->geom.snap[0] = GUI::instance()->geoContext->value[0]->value(); - CTX::instance()->geom.snap[1] = GUI::instance()->geoContext->value[1]->value(); - CTX::instance()->geom.snap[2] = GUI::instance()->geoContext->value[2]->value(); + CTX::instance()->geom.snap[0] = FlGui::instance()->geoContext->value[0]->value(); + CTX::instance()->geom.snap[1] = FlGui::instance()->geoContext->value[1]->value(); + CTX::instance()->geom.snap[2] = FlGui::instance()->geoContext->value[2]->value(); } geometryContextWindow::geometryContextWindow(int deltaFontSize) diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp index 56af633bd0f9bbfcab988981053ce87c55d84964..84ce2a8dac21b534beb02b606c3bca6e72fd1b37 100644 --- a/Fltk/extraDialogs.cpp +++ b/Fltk/extraDialogs.cpp @@ -16,7 +16,7 @@ #include <FL/Fl_Check_Button.H> #include <FL/Fl_Hold_Browser.H> #include <FL/Fl_Box.H> -#include "GUI.h" +#include "FlGui.h" #include "paletteWindow.h" #include "GmshDefines.h" #include "OpenFile.h" @@ -150,8 +150,8 @@ static void model_switch_cb(Fl_Widget* w, void *data) } if(w->window()) w->window()->hide(); CTX::instance()->mesh.changed = ENT_ALL; - GUI::instance()->setGraphicTitle(GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); + FlGui::instance()->setGraphicTitle(GModel::current()->getFileName()); + FlGui::instance()->resetVisibility(); Draw(); } diff --git a/Fltk/fieldWindow.cpp b/Fltk/fieldWindow.cpp index 192993dd5142a0178c92a749040ef0dc58fc08ab..44e05b6244632e1fc1784125e22d1ee7f75e3bb3 100644 --- a/Fltk/fieldWindow.cpp +++ b/Fltk/fieldWindow.cpp @@ -15,7 +15,7 @@ #include <FL/Fl_Round_Button.H> #include <FL/Fl_Value_Input.H> #include <FL/fl_draw.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "fieldWindow.h" #include "paletteWindow.h" @@ -31,15 +31,15 @@ void field_cb(Fl_Widget *w, void *data) { - GUI::instance()->fields->win->show(); - GUI::instance()->fields->editField(NULL); + FlGui::instance()->fields->win->show(); + FlGui::instance()->fields->editField(NULL); } static void field_delete_cb(Fl_Widget *w, void *data) { - Field *f = (Field*)GUI::instance()->fields->editor_group->user_data(); + Field *f = (Field*)FlGui::instance()->fields->editor_group->user_data(); delete_field(f->id, GModel::current()->getFileName()); - GUI::instance()->fields->editField(NULL); + FlGui::instance()->fields->editField(NULL); } static void field_new_cb(Fl_Widget *w, void *data) @@ -48,33 +48,33 @@ static void field_new_cb(Fl_Widget *w, void *data) FieldManager *fields = GModel::current()->getFields(); int id = fields->newId(); add_field(id, mb->text(), GModel::current()->getFileName()); - GUI::instance()->fields->editField((*fields)[id]); + FlGui::instance()->fields->editField((*fields)[id]); } static void field_apply_cb(Fl_Widget *w, void *data) { - GUI::instance()->fields->saveFieldOptions(); + FlGui::instance()->fields->saveFieldOptions(); } static void field_browser_cb(Fl_Widget *w, void *data) { - int selected = GUI::instance()->fields->browser->value(); + int selected = FlGui::instance()->fields->browser->value(); if(!selected){ - GUI::instance()->fields->editField(NULL); + FlGui::instance()->fields->editField(NULL); } - Field *f = (Field*)GUI::instance()->fields->browser->data(selected); - GUI::instance()->fields->editField(f); + Field *f = (Field*)FlGui::instance()->fields->browser->data(selected); + FlGui::instance()->fields->editField(f); } static void field_put_on_view_cb(Fl_Widget *w, void *data) { Fl_Menu_Button* mb = ((Fl_Menu_Button*)w); - Field *field = (Field*)GUI::instance()->fields->editor_group->user_data(); + Field *field = (Field*)FlGui::instance()->fields->editor_group->user_data(); if(mb->value() == 0) field->putOnNewView(); else if(mb->value() - 1 < (int)PView::list.size()) field->putOnView(PView::list[mb->value() - 1]); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -306,9 +306,9 @@ void fieldWindow::loadFieldOptions() vstr.str(""); for(list_it = option->list().begin(); list_it != option->list().end(); list_it++){ - if(list_it!=option->list().begin()) - vstr << ", "; - vstr << *list_it; + if(list_it!=option->list().begin()) + vstr << ", "; + vstr << *list_it; } ((Fl_Input*)(*input))->value(vstr.str().c_str()); break; diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index d13f9655cce2a91665937c2d4ff48f34345f377f..0b148c3aea8da6747ee84879eed932e24088a914 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -21,7 +21,7 @@ #include "GmshConfig.h" #include "GmshMessage.h" #include "GmshDefines.h" -#include "GUI.h" +#include "FlGui.h" #include "CreateFile.h" #include "Options.h" #include "Draw.h" @@ -852,7 +852,7 @@ int bdf_dialog(const char *name) { struct _bdf_dialog{ Fl_Window *window; - Fl_Choice *c; + Fl_Choice *c, *d; Fl_Check_Button *b; Fl_Button *ok, *cancel; }; @@ -865,17 +865,27 @@ int bdf_dialog(const char *name) {0} }; - int BBB = BB + 9; // labels too long + static Fl_Menu_Item tagmenu[] = { + {"Elementary entity", 0, 0, 0}, + {"Physical entity", 0, 0, 0}, + {"Partition", 0, 0, 0}, + {0} + }; + + int BBB = BB + 16; // labels too long if(!dialog){ dialog = new _bdf_dialog; - int h = 3 * WB + 3 * BH, w = 2 * BBB + 3 * WB, y = WB; + int h = 3 * WB + 4 * BH, w = 2 * BBB + 3 * WB, y = WB; dialog->window = new Fl_Double_Window(w, h, "BDF Options"); dialog->window->box(GMSH_WINDOW_BOX); dialog->window->set_modal(); - dialog->c = new Fl_Choice(WB, y, BBB + BBB / 2, BH, "Format"); y += BH; + dialog->c = new Fl_Choice(WB, y, BBB + BBB / 4, BH, "Format"); y += BH; dialog->c->menu(formatmenu); dialog->c->align(FL_ALIGN_RIGHT); + dialog->d = new Fl_Choice(WB, y, BBB + BBB / 4, BH, "Element tag"); y += BH; + dialog->d->menu(tagmenu); + dialog->d->align(FL_ALIGN_RIGHT); dialog->b = new Fl_Check_Button (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b->type(FL_TOGGLE_BUTTON); @@ -886,6 +896,8 @@ int bdf_dialog(const char *name) } dialog->c->value(CTX::instance()->mesh.bdfFieldFormat); + dialog->d->value((CTX::instance()->mesh.saveElementTagType == 3) ? 2 : + (CTX::instance()->mesh.saveElementTagType == 2) ? 1 : 0); dialog->b->value(CTX::instance()->mesh.saveAll ? 1 : 0); dialog->window->show(); @@ -896,6 +908,8 @@ int bdf_dialog(const char *name) if (!o) break; if (o == dialog->ok) { opt_mesh_bdf_field_format(0, GMSH_SET | GMSH_GUI, dialog->c->value()); + opt_mesh_save_element_tag_type(0, GMSH_SET | GMSH_GUI, + dialog->d->value() + 1); opt_mesh_save_all(0, GMSH_SET | GMSH_GUI, dialog->b->value() ? 1 : 0); CreateOutputFile(name, FORMAT_BDF); dialog->window->hide(); @@ -913,11 +927,11 @@ int bdf_dialog(const char *name) // Generic mesh dialog int generic_mesh_dialog(const char *name, const char *title, int format, - bool binary_support) + bool binary_support, bool element_tag_support) { struct _generic_mesh_dialog{ Fl_Window *window; - Fl_Choice *c; + Fl_Choice *c, *d; Fl_Check_Button *b; Fl_Button *ok, *cancel; }; @@ -929,17 +943,27 @@ int generic_mesh_dialog(const char *name, const char *title, int format, {0} }; - int BBB = BB + 9; // labels too long + static Fl_Menu_Item tagmenu[] = { + {"Elementary entity", 0, 0, 0}, + {"Physical entity", 0, 0, 0}, + {"Partition", 0, 0, 0}, + {0} + }; + + int BBB = BB + 16; // labels too long if(!dialog){ dialog = new _generic_mesh_dialog; - int h = 3 * WB + 3 * BH, w = 2 * BBB + 3 * WB, y = WB; + int h = 3 * WB + 4 * BH, w = 2 * BBB + 3 * WB, y = WB; dialog->window = new Fl_Double_Window(w, h); dialog->window->box(GMSH_WINDOW_BOX); dialog->window->set_modal(); - dialog->c = new Fl_Choice(WB, y, BBB + BBB / 2, BH, "Format"); y += BH; + dialog->c = new Fl_Choice(WB, y, BBB + BBB / 4, BH, "Format"); y += BH; dialog->c->menu(formatmenu); dialog->c->align(FL_ALIGN_RIGHT); + dialog->d = new Fl_Choice(WB, y, BBB + BBB / 4, BH, "Element tag"); y += BH; + dialog->d->menu(tagmenu); + dialog->d->align(FL_ALIGN_RIGHT); dialog->b = new Fl_Check_Button (WB, y, 2 * BBB + WB, BH, "Save all (ignore physical groups)"); y += BH; dialog->b->type(FL_TOGGLE_BUTTON); @@ -955,6 +979,12 @@ int generic_mesh_dialog(const char *name, const char *title, int format, dialog->c->activate(); else dialog->c->deactivate(); + dialog->d->value((CTX::instance()->mesh.saveElementTagType == 3) ? 2 : + (CTX::instance()->mesh.saveElementTagType == 2) ? 1 : 0); + if(element_tag_support) + dialog->d->activate(); + else + dialog->d->deactivate(); dialog->b->value(CTX::instance()->mesh.saveAll ? 1 : 0); dialog->window->show(); @@ -965,6 +995,8 @@ int generic_mesh_dialog(const char *name, const char *title, int format, if (!o) break; if (o == dialog->ok) { opt_mesh_binary(0, GMSH_SET | GMSH_GUI, dialog->c->value()); + opt_mesh_save_element_tag_type(0, GMSH_SET | GMSH_GUI, + dialog->d->value() + 1); opt_mesh_save_all(0, GMSH_SET | GMSH_GUI, dialog->b->value() ? 1 : 0); CreateOutputFile(name, format); dialog->window->hide(); diff --git a/Fltk/fileDialogs.h b/Fltk/fileDialogs.h index 65fb61c74a2765426eac42115d32da2d1f36aeaf..3255d72f965bbb330c5dfaa8ffbfe156baa8cc34 100644 --- a/Fltk/fileDialogs.h +++ b/Fltk/fileDialogs.h @@ -19,7 +19,7 @@ int gif_dialog(const char *filename); int geo_dialog(const char *filename); int generic_bitmap_dialog(const char *filename, const char *title, int format); int generic_mesh_dialog(const char *filename, const char *title, int format, - bool binary_supports); + bool binary_support, bool element_tag_support); int gl2ps_dialog(const char *filename, const char *title, int format); int options_dialog(const char *filename); int pos_dialog(const char *filename); diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp index 718c969a84c95c3c86fae41eb9d7a1a0ca548352..f7f8909f1ce9ec4dfd956faa6c0242e0f4e95586 100644 --- a/Fltk/graphicWindow.cpp +++ b/Fltk/graphicWindow.cpp @@ -6,7 +6,7 @@ #include <string.h> #include <FL/fl_draw.H> #include <FL/fl_ask.H> -#include "GUI.h" +#include "FlGui.h" #include "graphicWindow.h" #include "paletteWindow.h" #include "mainWindow.h" @@ -92,11 +92,11 @@ static void gmsh_models(Fl_Color c) static graphicWindow *getGraphicWindow(Fl_Widget *w) { - if(!w || !w->parent()) return GUI::instance()->graph[0]; - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - if(GUI::instance()->graph[i]->win == w->parent()) - return GUI::instance()->graph[i]; - return GUI::instance()->graph[0]; + if(!w || !w->parent()) return FlGui::instance()->graph[0]; + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + if(FlGui::instance()->graph[i]->win == w->parent()) + return FlGui::instance()->graph[i]; + return FlGui::instance()->graph[0]; } void status_xyz1p_cb(Fl_Widget *w, void *data) @@ -107,7 +107,7 @@ void status_xyz1p_cb(Fl_Widget *w, void *data) if(w) gls = getGraphicWindow(w)->gl; else - gls.push_back(GUI::instance()->getCurrentOpenglWindow()); + gls.push_back(FlGui::instance()->getCurrentOpenglWindow()); for(unsigned int i = 0; i < gls.size(); i++){ drawContext *ctx = gls[i]->getDrawContext(); @@ -183,7 +183,7 @@ void status_xyz1p_cb(Fl_Widget *w, void *data) } } Draw(); - GUI::instance()->manip->update(); + FlGui::instance()->manip->update(); } void status_options_cb(Fl_Widget *w, void *data) @@ -194,7 +194,7 @@ void status_options_cb(Fl_Widget *w, void *data) } else if(!strcmp(str, "?")){ // display options PrintOptions(0, GMSH_FULLRC, 0, 1, NULL); - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } else if(!strcmp(str, "p")){ // toggle projection mode if(!Fl::event_state(FL_SHIFT)){ @@ -209,9 +209,9 @@ void status_options_cb(Fl_Widget *w, void *data) else if(!strcmp(str, "S")){ // mouse selection if(CTX::instance()->mouseSelection){ opt_general_mouse_selection(0, GMSH_SET | GMSH_GUI, 0); - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++) - GUI::instance()->graph[i]->gl[j]->cursor + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++) + FlGui::instance()->graph[i]->gl[j]->cursor (FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE); } else @@ -267,7 +267,7 @@ static void status_play_cb(Fl_Widget *w, void *data) anim_time = GetTimeInSeconds(); status_play_manual(!CTX::instance()->post.animCycle, 1); } - GUI::instance()->check(); + FlGui::instance()->check(); } } @@ -305,15 +305,15 @@ static void remove_graphic_window_cb(Fl_Widget *w, void *data) { std::vector<graphicWindow*> graph2; graphicWindow *deleteMe = 0; - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++){ - if(GUI::instance()->graph[i]->win == w) - deleteMe = GUI::instance()->graph[i]; + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++){ + if(FlGui::instance()->graph[i]->win == w) + deleteMe = FlGui::instance()->graph[i]; else - graph2.push_back(GUI::instance()->graph[i]); + graph2.push_back(FlGui::instance()->graph[i]); } if(deleteMe){ openglWindow::setLastHandled(0); - GUI::instance()->graph = graph2; + FlGui::instance()->graph = graph2; delete deleteMe; } } diff --git a/Fltk/manipWindow.cpp b/Fltk/manipWindow.cpp index fb03b7b477b43dbf75174c160fe111aed8b0dbfc..c87cd4f8e13fbb7c73ed068edfa65ff2d24b19b7 100644 --- a/Fltk/manipWindow.cpp +++ b/Fltk/manipWindow.cpp @@ -5,7 +5,7 @@ #include <FL/Fl_Box.H> #include <FL/Fl_Return_Button.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "manipWindow.h" #include "paletteWindow.h" @@ -15,21 +15,21 @@ void manip_cb(Fl_Widget *w, void *data) { - GUI::instance()->manip->show(); + FlGui::instance()->manip->show(); } static void manip_update_cb(Fl_Widget *w, void *data) { - drawContext *ctx = GUI::instance()->getCurrentOpenglWindow()->getDrawContext(); - ctx->r[0] = GUI::instance()->manip->value[0]->value(); - ctx->r[1] = GUI::instance()->manip->value[1]->value(); - ctx->r[2] = GUI::instance()->manip->value[2]->value(); - ctx->t[0] = GUI::instance()->manip->value[3]->value(); - ctx->t[1] = GUI::instance()->manip->value[4]->value(); - ctx->t[2] = GUI::instance()->manip->value[5]->value(); - ctx->s[0] = GUI::instance()->manip->value[6]->value(); - ctx->s[1] = GUI::instance()->manip->value[7]->value(); - ctx->s[2] = GUI::instance()->manip->value[8]->value(); + drawContext *ctx = FlGui::instance()->getCurrentOpenglWindow()->getDrawContext(); + ctx->r[0] = FlGui::instance()->manip->value[0]->value(); + ctx->r[1] = FlGui::instance()->manip->value[1]->value(); + ctx->r[2] = FlGui::instance()->manip->value[2]->value(); + ctx->t[0] = FlGui::instance()->manip->value[3]->value(); + ctx->t[1] = FlGui::instance()->manip->value[4]->value(); + ctx->t[2] = FlGui::instance()->manip->value[5]->value(); + ctx->s[0] = FlGui::instance()->manip->value[6]->value(); + ctx->s[1] = FlGui::instance()->manip->value[7]->value(); + ctx->s[2] = FlGui::instance()->manip->value[8]->value(); ctx->setQuaternionFromEulerAngles(); Draw(); } diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp index 4945a130a7586142358e174e760967f7c94c4498..e3213d00d4c7c6e9ecbc70009f9cbd1bc37442f7 100644 --- a/Fltk/menuWindow.cpp +++ b/Fltk/menuWindow.cpp @@ -10,7 +10,7 @@ #include <FL/fl_ask.H> #include "GmshConfig.h" #include "GmshMessage.h" -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "menuWindow.h" #include "mainWindow.h" @@ -124,7 +124,7 @@ static void file_open_cb(Fl_Widget *w, void *data) Draw(); } if(n != (int)PView::list.size()) - GUI::instance()->menu->setContext(menu_post, 0); + FlGui::instance()->menu->setContext(menu_post, 0); } static void file_merge_cb(Fl_Widget *w, void *data) @@ -137,7 +137,7 @@ static void file_merge_cb(Fl_Widget *w, void *data) Draw(); } if(n != (int)PView::list.size()) - GUI::instance()->menu->setContext(menu_post, 0); + FlGui::instance()->menu->setContext(menu_post, 0); } static void file_clear_cb(Fl_Widget *w, void *data) @@ -150,22 +150,22 @@ static void file_window_cb(Fl_Widget *w, void *data) { std::string str((const char*)data); if(str == "new"){ - graphicWindow *g1 = GUI::instance()->graph.back(); + graphicWindow *g1 = FlGui::instance()->graph.back(); graphicWindow *g2 = new graphicWindow(false, CTX::instance()->numTiles); - GUI::instance()->graph.push_back(g2); - GUI::instance()->setGraphicTitle(GModel::current()->getFileName()); + FlGui::instance()->graph.push_back(g2); + FlGui::instance()->setGraphicTitle(GModel::current()->getFileName()); g2->win->resize(g1->win->x() + 10, g1->win->y() + 10, g1->win->w(), g1->win->h()); g2->win->show(); } else if(str == "split_h"){ - GUI::instance()->splitCurrentOpenglWindow('h'); + FlGui::instance()->splitCurrentOpenglWindow('h'); } else if(str == "split_v"){ - GUI::instance()->splitCurrentOpenglWindow('v'); + FlGui::instance()->splitCurrentOpenglWindow('v'); } else if(str == "split_u"){ - GUI::instance()->splitCurrentOpenglWindow('u'); + FlGui::instance()->splitCurrentOpenglWindow('u'); } } @@ -176,20 +176,20 @@ static int _save_geo(const char *name){ return geo_dialog(name); } static int _save_cgns(const char *name){ return cgns_write_dialog(name); } static int _save_unv(const char *name){ return unv_dialog(name); } static int _save_vtk(const char *name){ return generic_mesh_dialog - (name, "VTK Options", FORMAT_VTK, true); } + (name, "VTK Options", FORMAT_VTK, true, false); } static int _save_diff(const char *name){ return generic_mesh_dialog - (name, "Diffpack Options", FORMAT_DIFF, true); } + (name, "Diffpack Options", FORMAT_DIFF, true, false); } static int _save_med(const char *name){ return generic_mesh_dialog - (name, "MED Options", FORMAT_MED, false); } + (name, "MED Options", FORMAT_MED, false, false); } static int _save_mesh(const char *name){ return generic_mesh_dialog - (name, "MESH Options", FORMAT_MESH, false); } + (name, "MESH Options", FORMAT_MESH, false, true); } static int _save_bdf(const char *name){ return bdf_dialog(name); } static int _save_p3d(const char *name){ return generic_mesh_dialog - (name, "P3D Options", FORMAT_P3D, false); } + (name, "P3D Options", FORMAT_P3D, false, false); } static int _save_stl(const char *name){ return generic_mesh_dialog - (name, "STL Options", FORMAT_STL, true); } + (name, "STL Options", FORMAT_STL, true, false); } static int _save_vrml(const char *name){ return generic_mesh_dialog - (name, "VRML Options", FORMAT_VRML, false); } + (name, "VRML Options", FORMAT_VRML, false, false); } static int _save_eps(const char *name){ return gl2ps_dialog (name, "EPS Options", FORMAT_EPS); } static int _save_gif(const char *name){ return gif_dialog(name); } @@ -439,7 +439,7 @@ static void help_short_cb(Fl_Widget *w, void *data) Msg::Direct(" Alt+Shift+y Set -Y view"); Msg::Direct(" Alt+Shift+z Set -Z view"); Msg::Direct(" "); - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } #undef CC @@ -469,14 +469,14 @@ static void help_mouse_cb(Fl_Widget *w, void *data) Msg::Direct(" For a 1 button mouse, Middle button = Shift+Left button, " "Right button = Alt+Left button"); Msg::Direct(" "); - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } static void help_command_line_cb(Fl_Widget *w, void *data) { Msg::Direct(" "); PrintUsage("gmsh"); - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } static void help_online_cb(Fl_Widget *w, void *data) @@ -489,47 +489,47 @@ static void help_online_cb(Fl_Widget *w, void *data) static void help_about_cb(Fl_Widget *w, void *data) { - GUI::instance()->about->win->show(); + FlGui::instance()->about->win->show(); } void mod_geometry_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_geometry, 0); + FlGui::instance()->menu->setContext(menu_geometry, 0); } void mod_mesh_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_mesh, 0); + FlGui::instance()->menu->setContext(menu_mesh, 0); } void mod_solver_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_solver, 0); + FlGui::instance()->menu->setContext(menu_solver, 0); } void mod_post_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_post, 0); + FlGui::instance()->menu->setContext(menu_post, 0); } void mod_back_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(0, -1); + FlGui::instance()->menu->setContext(0, -1); } void mod_forward_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(0, 1); + FlGui::instance()->menu->setContext(0, 1); } static void geometry_elementary_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_geometry_elementary, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary, 0); } static void geometry_physical_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_geometry_physical, 0); + FlGui::instance()->menu->setContext(menu_geometry_physical, 0); } static void geometry_edit_cb(Fl_Widget *w, void *data) @@ -551,7 +551,7 @@ void geometry_reload_cb(Fl_Widget *w, void *data) static void geometry_elementary_add_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_geometry_elementary_add, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add, 0); } static void add_new_point() @@ -559,29 +559,29 @@ static void add_new_point() opt_geometry_points(0, GMSH_SET | GMSH_GUI, 1); Draw(); - GUI::instance()->geoContext->show(1); + FlGui::instance()->geoContext->show(1); while(1) { - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++) - GUI::instance()->graph[i]->gl[j]->addPointMode = true; + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++) + FlGui::instance()->graph[i]->gl[j]->addPointMode = true; Msg::StatusBar(3, false, "Move mouse and/or enter coordinates\n" "[Press 'Shift' to hold position, 'e' to add point " "or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_NONE); + char ib = FlGui::instance()->selectEntity(ENT_NONE); if(ib == 'e'){ add_point(GModel::current()->getFileName(), - GUI::instance()->geoContext->input[2]->value(), - GUI::instance()->geoContext->input[3]->value(), - GUI::instance()->geoContext->input[4]->value(), - GUI::instance()->geoContext->input[5]->value()); - GUI::instance()->resetVisibility(); + FlGui::instance()->geoContext->input[2]->value(), + FlGui::instance()->geoContext->input[3]->value(), + FlGui::instance()->geoContext->input[4]->value(), + FlGui::instance()->geoContext->input[5]->value()); + FlGui::instance()->resetVisibility(); Draw(); } if(ib == 'q'){ - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++) - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++) - GUI::instance()->graph[i]->gl[j]->addPointMode = false; + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++) + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++) + FlGui::instance()->graph[i]->gl[j]->addPointMode = false; break; } } @@ -606,11 +606,11 @@ static void add_new_multiline(std::string type) Msg::StatusBar(3, false, "Select control points\n" "[Press 'e' to end selection, 'u' to undo last selection " "or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_POINT); + char ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'l') { - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++){ - GUI::instance()->selectedVertices[i]->setSelection(1); - p.push_back(GUI::instance()->selectedVertices[i]->tag()); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++){ + FlGui::instance()->selectedVertices[i]->setSelection(1); + p.push_back(FlGui::instance()->selectedVertices[i]->tag()); } Draw(); } @@ -619,8 +619,8 @@ static void add_new_multiline(std::string type) } if(ib == 'e') { if(p.size() >= 2) - add_multline(type, p, GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); + add_multline(type, p, GModel::current()->getFileName()); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); p.clear(); @@ -657,11 +657,11 @@ static void add_new_line() if(p.size() == 1) Msg::StatusBar(3, false, "Select end point\n" "[Press 'u' to undo last selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_POINT); + char ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'l') { - GUI::instance()->selectedVertices[0]->setSelection(1); + FlGui::instance()->selectedVertices[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedVertices[0]->tag()); + p.push_back(FlGui::instance()->selectedVertices[0]->tag()); } if(ib == 'r') { Msg::Warning("Entity de-selection not supported yet during line creation"); @@ -681,7 +681,7 @@ static void add_new_line() } if(p.size() == 2) { add_multline("Line", p, GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); p.clear(); @@ -708,11 +708,11 @@ static void add_new_circle() if(p.size() == 2) Msg::StatusBar(3, false, "Select end point\n" "[Press 'u' to undo last selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_POINT); + char ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'l') { - GUI::instance()->selectedVertices[0]->setSelection(1); + FlGui::instance()->selectedVertices[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedVertices[0]->tag()); + p.push_back(FlGui::instance()->selectedVertices[0]->tag()); } if(ib == 'r') { Msg::Warning("Entity de-selection not supported yet during circle creation"); @@ -732,7 +732,7 @@ static void add_new_circle() } if(p.size() == 3) { add_circ(p[0], p[1], p[2], GModel::current()->getFileName()); // begin, center, end - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); p.clear(); @@ -762,11 +762,11 @@ static void add_new_ellipse() if(p.size() == 3) Msg::StatusBar(3, false, "Select end point\n" "[Press 'u' to undo last selection or 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_POINT); + char ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'l') { - GUI::instance()->selectedVertices[0]->setSelection(1); + FlGui::instance()->selectedVertices[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedVertices[0]->tag()); + p.push_back(FlGui::instance()->selectedVertices[0]->tag()); } if(ib == 'r') { Msg::Warning("Entity de-selection not supported yet during ellipse creation"); @@ -786,7 +786,7 @@ static void add_new_ellipse() } if(p.size() == 4) { add_ell(p[0], p[1], p[2], p[3], GModel::current()->getFileName()); - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); p.clear(); @@ -864,7 +864,7 @@ static void add_new_surface_volume(int mode) "[Press 'u' to undo last selection or 'q' to abort]"); } - char ib = GUI::instance()->selectEntity(type); + char ib = FlGui::instance()->selectEntity(type); if(ib == 'q') { GModel::current()->setSelection(0); Draw(); @@ -892,8 +892,8 @@ static void add_new_surface_volume(int mode) } if(ib == 'l') { int num = (type == ENT_LINE) ? - GUI::instance()->selectedEdges[0]->tag() : - GUI::instance()->selectedFaces[0]->tag(); + FlGui::instance()->selectedEdges[0]->tag() : + FlGui::instance()->selectedFaces[0]->tag(); if(select_contour(type, num, List1)) { if(type == ENT_LINE) add_lineloop(List1, GModel::current()->getFileName(), &num); @@ -911,7 +911,7 @@ static void add_new_surface_volume(int mode) (3, false, "Select hole boundaries\n" "[Press 'e' to end selection, 'u' to undo last selection " "or 'q' to abort]"); - ib = GUI::instance()->selectEntity(type); + ib = FlGui::instance()->selectEntity(type); if(ib == 'q') { GModel::current()->setSelection(0); Draw(); @@ -941,12 +941,12 @@ static void add_new_surface_volume(int mode) } if(ib == 'l') { int size = (type == ENT_LINE) ? - GUI::instance()->selectedEdges.size() : - GUI::instance()->selectedFaces.size(); + FlGui::instance()->selectedEdges.size() : + FlGui::instance()->selectedFaces.size(); for(int i=0;i<size;i++){ int num = (type == ENT_LINE) ? - GUI::instance()->selectedEdges[i]->tag() : - GUI::instance()->selectedFaces[i]->tag(); + FlGui::instance()->selectedEdges[i]->tag() : + FlGui::instance()->selectedFaces[i]->tag(); if(select_contour(type, num, List1)) { if(type == ENT_LINE) add_lineloop(List1, GModel::current()->getFileName(), &num); @@ -971,7 +971,7 @@ static void add_new_surface_volume(int mode) GModel::current()->getFileName()); break; case 2: add_vol(List2, GModel::current()->getFileName()); break; } - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); break; @@ -991,13 +991,13 @@ static void add_new_surface_volume(int mode) static void geometry_elementary_add_new_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_add_new, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add_new, 0); return; } std::string str((const char*)data); if(str == "Parameter") - GUI::instance()->geoContext->show(0); + FlGui::instance()->geoContext->show(0); else if(str == "Point") add_new_point(); else if(str == "Line") @@ -1028,39 +1028,39 @@ static void split_selection() "[Press 'q' to abort]"); GEdge* edge_to_split = 0; while(1){ - char ib = GUI::instance()->selectEntity(ENT_LINE); + char ib = FlGui::instance()->selectEntity(ENT_LINE); if(ib == 'q') break; - if(!GUI::instance()->selectedEdges.empty()){ - edge_to_split = GUI::instance()->selectedEdges[0]; + if(!FlGui::instance()->selectedEdges.empty()){ + edge_to_split = FlGui::instance()->selectedEdges[0]; edge_to_split->setSelection(1); break; } } Msg::StatusBar(3, false, ""); - if(GUI::instance()->selectedEdges.empty()) return; + if(FlGui::instance()->selectedEdges.empty()) return; List_T *List1 = List_Create(5, 5, sizeof(int)); Msg::StatusBar(3, false, "Select break points\n" "[Press 'e' to end selection or 'q' to abort]"); opt_geometry_points(0, GMSH_SET | GMSH_GUI, 1); Draw(); while(1){ - char ib = GUI::instance()->selectEntity(ENT_POINT); + char ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'q') break; if(ib == 'e'){ split_edge(edge_to_split->tag(), List1, GModel::current()->getFileName()); break; } - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++){ - int tag = GUI::instance()->selectedVertices[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++){ + int tag = FlGui::instance()->selectedVertices[i]->tag(); int index = List_ISearchSeq(List1, &tag, fcmp_int); if(index < 0) List_Add(List1, &tag); - GUI::instance()->selectedVertices[i]->setSelection(1); + FlGui::instance()->selectedVertices[i]->setSelection(1); } } Msg::StatusBar(3, false, ""); - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); Draw(); } @@ -1096,7 +1096,7 @@ static void action_point_line_surface_volume(int action, int mode, const char *w } if(action == 8){ - GUI::instance()->meshContext->show(0); + FlGui::instance()->meshContext->show(0); } Draw(); @@ -1111,7 +1111,7 @@ static void action_point_line_surface_volume(int action, int mode, const char *w "[Press 'e' to end selection, 'u' to undo last selection " "or 'q' to abort]", str); - char ib = GUI::instance()->selectEntity(type); + char ib = FlGui::instance()->selectEntity(type); if(ib == 'l') { // we don't use List_Insert in order to keep the original // ordering (this is slower, but this way undo works as @@ -1119,33 +1119,33 @@ static void action_point_line_surface_volume(int action, int mode, const char *w int tag; switch (type) { case ENT_POINT: - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++){ - GUI::instance()->selectedVertices[i]->setSelection(1); - tag = GUI::instance()->selectedVertices[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++){ + FlGui::instance()->selectedVertices[i]->setSelection(1); + tag = FlGui::instance()->selectedVertices[i]->tag(); if(List_ISearchSeq(List1, &tag, fcmp_int) < 0) List_Add(List1, &tag); } break; case ENT_LINE: - for(unsigned int i = 0; i < GUI::instance()->selectedEdges.size(); i++){ - GUI::instance()->selectedEdges[i]->setSelection(1); - tag = GUI::instance()->selectedEdges[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++){ + FlGui::instance()->selectedEdges[i]->setSelection(1); + tag = FlGui::instance()->selectedEdges[i]->tag(); if(List_ISearchSeq(List1, &tag, fcmp_int) < 0) List_Add(List1, &tag); } break; case ENT_SURFACE: - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++){ - GUI::instance()->selectedFaces[i]->setSelection(1); - tag = GUI::instance()->selectedFaces[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++){ + FlGui::instance()->selectedFaces[i]->setSelection(1); + tag = FlGui::instance()->selectedFaces[i]->tag(); if(List_ISearchSeq(List1, &tag, fcmp_int) < 0) List_Add(List1, &tag); } break; case ENT_VOLUME: - for(unsigned int i = 0; i < GUI::instance()->selectedRegions.size(); i++){ - GUI::instance()->selectedRegions[i]->setSelection(1); - tag = GUI::instance()->selectedRegions[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedRegions.size(); i++){ + FlGui::instance()->selectedRegions[i]->setSelection(1); + tag = FlGui::instance()->selectedRegions[i]->tag(); if(List_ISearchSeq(List1, &tag, fcmp_int) < 0) List_Add(List1, &tag); } @@ -1160,35 +1160,35 @@ static void action_point_line_surface_volume(int action, int mode, const char *w int index, tag; switch (type) { case ENT_POINT: - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++){ - tag = GUI::instance()->selectedVertices[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++){ + tag = FlGui::instance()->selectedVertices[i]->tag(); index = List_ISearchSeq(List1, &tag, fcmp_int); if(index >= 0) List_PSuppress(List1, index); - GUI::instance()->selectedVertices[i]->setSelection(0); + FlGui::instance()->selectedVertices[i]->setSelection(0); } break; case ENT_LINE: - for(unsigned int i = 0; i < GUI::instance()->selectedEdges.size(); i++){ - tag = GUI::instance()->selectedEdges[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++){ + tag = FlGui::instance()->selectedEdges[i]->tag(); index = List_ISearchSeq(List1, &tag, fcmp_int); if(index >= 0) List_PSuppress(List1, index); - GUI::instance()->selectedEdges[i]->setSelection(0); + FlGui::instance()->selectedEdges[i]->setSelection(0); } break; case ENT_SURFACE: - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++){ - tag = GUI::instance()->selectedFaces[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++){ + tag = FlGui::instance()->selectedFaces[i]->tag(); index = List_ISearchSeq(List1, &tag, fcmp_int); if(index >= 0) List_PSuppress(List1, index); - GUI::instance()->selectedFaces[i]->setSelection(0); + FlGui::instance()->selectedFaces[i]->setSelection(0); } break; case ENT_VOLUME: - for(unsigned int i = 0; i < GUI::instance()->selectedRegions.size(); i++){ - tag = GUI::instance()->selectedRegions[i]->tag(); + for(unsigned int i = 0; i < FlGui::instance()->selectedRegions.size(); i++){ + tag = FlGui::instance()->selectedRegions[i]->tag(); index = List_ISearchSeq(List1, &tag, fcmp_int); if(index >= 0) List_PSuppress(List1, index); - GUI::instance()->selectedRegions[i]->setSelection(0); + FlGui::instance()->selectedRegions[i]->setSelection(0); } break; } @@ -1226,49 +1226,49 @@ static void action_point_line_surface_volume(int action, int mode, const char *w switch (action) { case 0: translate(mode, List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[6]->value(), - GUI::instance()->geoContext->input[7]->value(), - GUI::instance()->geoContext->input[8]->value()); + FlGui::instance()->geoContext->input[6]->value(), + FlGui::instance()->geoContext->input[7]->value(), + FlGui::instance()->geoContext->input[8]->value()); break; case 1: rotate(mode, List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[12]->value(), - GUI::instance()->geoContext->input[13]->value(), - GUI::instance()->geoContext->input[14]->value(), - GUI::instance()->geoContext->input[9]->value(), - GUI::instance()->geoContext->input[10]->value(), - GUI::instance()->geoContext->input[11]->value(), - GUI::instance()->geoContext->input[15]->value()); + FlGui::instance()->geoContext->input[12]->value(), + FlGui::instance()->geoContext->input[13]->value(), + FlGui::instance()->geoContext->input[14]->value(), + FlGui::instance()->geoContext->input[9]->value(), + FlGui::instance()->geoContext->input[10]->value(), + FlGui::instance()->geoContext->input[11]->value(), + FlGui::instance()->geoContext->input[15]->value()); break; case 2: dilate(mode, List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[16]->value(), - GUI::instance()->geoContext->input[17]->value(), - GUI::instance()->geoContext->input[18]->value(), - GUI::instance()->geoContext->input[19]->value()); + FlGui::instance()->geoContext->input[16]->value(), + FlGui::instance()->geoContext->input[17]->value(), + FlGui::instance()->geoContext->input[18]->value(), + FlGui::instance()->geoContext->input[19]->value()); break; case 3: symmetry(mode, List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[20]->value(), - GUI::instance()->geoContext->input[21]->value(), - GUI::instance()->geoContext->input[22]->value(), - GUI::instance()->geoContext->input[23]->value()); + FlGui::instance()->geoContext->input[20]->value(), + FlGui::instance()->geoContext->input[21]->value(), + FlGui::instance()->geoContext->input[22]->value(), + FlGui::instance()->geoContext->input[23]->value()); break; case 4: extrude(List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[6]->value(), - GUI::instance()->geoContext->input[7]->value(), - GUI::instance()->geoContext->input[8]->value()); + FlGui::instance()->geoContext->input[6]->value(), + FlGui::instance()->geoContext->input[7]->value(), + FlGui::instance()->geoContext->input[8]->value()); break; case 5: protude(List1, GModel::current()->getFileName(), what, - GUI::instance()->geoContext->input[12]->value(), - GUI::instance()->geoContext->input[13]->value(), - GUI::instance()->geoContext->input[14]->value(), - GUI::instance()->geoContext->input[9]->value(), - GUI::instance()->geoContext->input[10]->value(), - GUI::instance()->geoContext->input[11]->value(), - GUI::instance()->geoContext->input[15]->value()); + FlGui::instance()->geoContext->input[12]->value(), + FlGui::instance()->geoContext->input[13]->value(), + FlGui::instance()->geoContext->input[14]->value(), + FlGui::instance()->geoContext->input[9]->value(), + FlGui::instance()->geoContext->input[10]->value(), + FlGui::instance()->geoContext->input[11]->value(), + FlGui::instance()->geoContext->input[15]->value()); break; case 6: delet(List1, GModel::current()->getFileName(), what); @@ -1278,7 +1278,7 @@ static void action_point_line_surface_volume(int action, int mode, const char *w break; case 8: add_charlength(List1, GModel::current()->getFileName(), - GUI::instance()->meshContext->input[0]->value()); + FlGui::instance()->meshContext->input[0]->value()); break; case 9: add_recosurf(List1, GModel::current()->getFileName()); @@ -1289,7 +1289,7 @@ static void action_point_line_surface_volume(int action, int mode, const char *w break; } List_Reset(List1); - GUI::instance()->resetVisibility(); + FlGui::instance()->resetVisibility(); GModel::current()->setSelection(0); if(action <= 6) SetBoundingBox(); Draw(); @@ -1309,112 +1309,112 @@ static void action_point_line_surface_volume(int action, int mode, const char *w static void geometry_elementary_add_translate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_add_translate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add_translate, 0); return; } - GUI::instance()->geoContext->show(2); + FlGui::instance()->geoContext->show(2); action_point_line_surface_volume(0, 1, (const char*)data); } static void geometry_elementary_add_rotate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_add_rotate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add_rotate, 0); return; } - GUI::instance()->geoContext->show(3); + FlGui::instance()->geoContext->show(3); action_point_line_surface_volume(1, 1, (const char*)data); } static void geometry_elementary_add_scale_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_add_scale, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add_scale, 0); return; } - GUI::instance()->geoContext->show(4); + FlGui::instance()->geoContext->show(4); action_point_line_surface_volume(2, 1, (const char*)data); } static void geometry_elementary_add_symmetry_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_add_symmetry, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_add_symmetry, 0); return; } - GUI::instance()->geoContext->show(5); + FlGui::instance()->geoContext->show(5); action_point_line_surface_volume(3, 1, (const char*)data); } static void geometry_elementary_translate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_translate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_translate, 0); return; } - GUI::instance()->geoContext->show(2); + FlGui::instance()->geoContext->show(2); action_point_line_surface_volume(0, 0, (const char*)data); } static void geometry_elementary_rotate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_rotate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_rotate, 0); return; } - GUI::instance()->geoContext->show(3); + FlGui::instance()->geoContext->show(3); action_point_line_surface_volume(1, 0, (const char*)data); } static void geometry_elementary_scale_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_scale, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_scale, 0); return; } - GUI::instance()->geoContext->show(4); + FlGui::instance()->geoContext->show(4); action_point_line_surface_volume(2, 0, (const char*)data); } static void geometry_elementary_symmetry_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_symmetry, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_symmetry, 0); return; } - GUI::instance()->geoContext->show(5); + FlGui::instance()->geoContext->show(5); action_point_line_surface_volume(3, 0, (const char*)data); } static void geometry_elementary_extrude_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_geometry_elementary_extrude, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_extrude, 0); } static void geometry_elementary_extrude_translate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_extrude_translate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_extrude_translate, 0); return; } - GUI::instance()->geoContext->show(2); + FlGui::instance()->geoContext->show(2); action_point_line_surface_volume(4, 0, (const char*)data); } static void geometry_elementary_extrude_rotate_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_extrude_rotate, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_extrude_rotate, 0); return; } - GUI::instance()->geoContext->show(3); + FlGui::instance()->geoContext->show(3); action_point_line_surface_volume(5, 0, (const char*)data); } static void geometry_elementary_delete_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_delete, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_delete, 0); return; } action_point_line_surface_volume(6, 0, (const char*)data); @@ -1423,7 +1423,7 @@ static void geometry_elementary_delete_cb(Fl_Widget *w, void *data) static void geometry_elementary_split_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_elementary_split, 0); + FlGui::instance()->menu->setContext(menu_geometry_elementary_split, 0); return; } split_selection(); @@ -1437,14 +1437,14 @@ static void geometry_elementary_coherence_cb(Fl_Widget *w, void *data) static void geometry_physical_add_cb(Fl_Widget *w, void *data) { if(!data){ - GUI::instance()->menu->setContext(menu_geometry_physical_add, 0); + FlGui::instance()->menu->setContext(menu_geometry_physical_add, 0); return; } std::string str((const char*)data); if(str == "Point") - GUI::instance()->callForSolverPlugin(0); + FlGui::instance()->callForSolverPlugin(0); else if(str == "Line") - GUI::instance()->callForSolverPlugin(1); + FlGui::instance()->callForSolverPlugin(1); action_point_line_surface_volume(7, 0, str.c_str()); } @@ -1464,7 +1464,7 @@ static void mesh_save_cb(Fl_Widget *w, void *data) static void mesh_define_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_mesh_define, 0); + FlGui::instance()->menu->setContext(menu_mesh_define, 0); } void mesh_1d_cb(Fl_Widget *w, void *data) @@ -1490,7 +1490,7 @@ void mesh_3d_cb(Fl_Widget *w, void *data) static void mesh_delete_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_mesh_delete, 0); + FlGui::instance()->menu->setContext(menu_mesh_delete, 0); } static void mesh_delete_parts_cb(Fl_Widget *w, void *data) @@ -1532,49 +1532,49 @@ static void mesh_delete_parts_cb(Fl_Widget *w, void *data) Msg::StatusBar(3, false, "Select %s\n" "[Press 'e' to end selection or 'q' to abort]", str); - char ib = GUI::instance()->selectEntity(what); + char ib = FlGui::instance()->selectEntity(what); if(ib == 'l') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++){ - if(GUI::instance()->selectedElements[i]->getVisibility() != 2){ - GUI::instance()->selectedElements[i]->setVisibility(2); - ele.push_back(GUI::instance()->selectedElements[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++){ + if(FlGui::instance()->selectedElements[i]->getVisibility() != 2){ + FlGui::instance()->selectedElements[i]->setVisibility(2); + ele.push_back(FlGui::instance()->selectedElements[i]); } } } else{ - for(unsigned int i = 0; i < GUI::instance()->selectedEdges.size(); i++){ - if(GUI::instance()->selectedEdges[i]->getSelection() != 1){ - GUI::instance()->selectedEdges[i]->setSelection(1); - ent.push_back(GUI::instance()->selectedEdges[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++){ + if(FlGui::instance()->selectedEdges[i]->getSelection() != 1){ + FlGui::instance()->selectedEdges[i]->setSelection(1); + ent.push_back(FlGui::instance()->selectedEdges[i]); } } - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++){ - if(GUI::instance()->selectedFaces[i]->getSelection() != 1){ - GUI::instance()->selectedFaces[i]->setSelection(1); - ent.push_back(GUI::instance()->selectedFaces[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++){ + if(FlGui::instance()->selectedFaces[i]->getSelection() != 1){ + FlGui::instance()->selectedFaces[i]->setSelection(1); + ent.push_back(FlGui::instance()->selectedFaces[i]); } } - for(unsigned int i = 0; i < GUI::instance()->selectedRegions.size(); i++){ - if(GUI::instance()->selectedRegions[i]->getSelection() != 1){ - GUI::instance()->selectedRegions[i]->setSelection(1); - ent.push_back(GUI::instance()->selectedRegions[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedRegions.size(); i++){ + if(FlGui::instance()->selectedRegions[i]->getSelection() != 1){ + FlGui::instance()->selectedRegions[i]->setSelection(1); + ent.push_back(FlGui::instance()->selectedRegions[i]); } } } } if(ib == 'r') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++) - GUI::instance()->selectedElements[i]->setVisibility(1); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++) + FlGui::instance()->selectedElements[i]->setVisibility(1); } else{ - for(unsigned int i = 0; i < GUI::instance()->selectedEdges.size(); i++) - GUI::instance()->selectedEdges[i]->setSelection(0); - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++) - GUI::instance()->selectedFaces[i]->setSelection(0); - for(unsigned int i = 0; i < GUI::instance()->selectedRegions.size(); i++) - GUI::instance()->selectedRegions[i]->setSelection(0); + for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++) + FlGui::instance()->selectedEdges[i]->setSelection(0); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++) + FlGui::instance()->selectedFaces[i]->setSelection(0); + for(unsigned int i = 0; i < FlGui::instance()->selectedRegions.size(); i++) + FlGui::instance()->selectedRegions[i]->setSelection(0); } } if(ib == 'u') { @@ -1624,16 +1624,16 @@ static void mesh_inspect_cb(Fl_Widget *w, void *data) while(1) { Msg::StatusBar(3, false, "Select element\n[Press 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_ALL); + char ib = FlGui::instance()->selectEntity(ENT_ALL); if(ib == 'l') { - if(GUI::instance()->selectedElements.size()){ - MElement *ele = GUI::instance()->selectedElements[0]; + if(FlGui::instance()->selectedElements.size()){ + MElement *ele = FlGui::instance()->selectedElements[0]; GModel::current()->setSelection(0); ele->setVisibility(2); Msg::Direct("Element %d:", ele->getNum()); - int type = ele->getTypeForMSH(); - const char *name; - MElement::getInfoMSH(type, &name); + int type = ele->getTypeForMSH(); + const char *name; + MElement::getInfoMSH(type, &name); Msg::Direct(" Type: %d ('%s')", type, name); Msg::Direct(" Dimension: %d", ele->getDim()); Msg::Direct(" Order: %d", ele->getPolynomialOrder()); @@ -1653,7 +1653,7 @@ static void mesh_inspect_cb(Fl_Widget *w, void *data) Msg::Direct(" Disto: %g", ele->distoShapeMeasure()); CTX::instance()->mesh.changed = ENT_ALL; Draw(); - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } } if(ib == 'q') { @@ -1733,7 +1733,7 @@ static void mesh_define_recombine_cb(Fl_Widget *w, void *data) static void mesh_define_transfinite_cb(Fl_Widget *w, void *data) { - GUI::instance()->menu->setContext(menu_mesh_define_transfinite, 0); + FlGui::instance()->menu->setContext(menu_mesh_define_transfinite, 0); } static void add_transfinite(int dim) @@ -1758,15 +1758,15 @@ static void add_transfinite(int dim) Msg::StatusBar(3, false, "Select lines\n" "[Press 'e' to end selection, 'u' to undo last selection " "or 'q' to abort]"); - ib = GUI::instance()->selectEntity(ENT_LINE); + ib = FlGui::instance()->selectEntity(ENT_LINE); break; case 2: Msg::StatusBar(3, false, "Select surface\n[Press 'q' to abort]"); - ib = GUI::instance()->selectEntity(ENT_SURFACE); + ib = FlGui::instance()->selectEntity(ENT_SURFACE); break; case 3: Msg::StatusBar(3, false, "Select volume\n[Press 'q' to abort]"); - ib = GUI::instance()->selectEntity(ENT_VOLUME); + ib = FlGui::instance()->selectEntity(ENT_VOLUME); break; default: ib = 'l'; @@ -1777,9 +1777,9 @@ static void add_transfinite(int dim) if(dim == 1) { if(p.size()) add_trsfline(p, GModel::current()->getFileName(), - GUI::instance()->meshContext->choice[0]->text(), - GUI::instance()->meshContext->input[2]->value(), - GUI::instance()->meshContext->input[1]->value()); + FlGui::instance()->meshContext->choice[0]->text(), + FlGui::instance()->meshContext->input[2]->value(), + FlGui::instance()->meshContext->input[1]->value()); } GModel::current()->setSelection(0); Draw(); @@ -1807,23 +1807,23 @@ static void add_transfinite(int dim) if(ib == 'l') { switch (dim) { case 1: - for(unsigned int i = 0; i < GUI::instance()->selectedEdges.size(); i++){ - GUI::instance()->selectedEdges[i]->setSelection(1); - p.push_back(GUI::instance()->selectedEdges[i]->tag()); + for(unsigned int i = 0; i < FlGui::instance()->selectedEdges.size(); i++){ + FlGui::instance()->selectedEdges[i]->setSelection(1); + p.push_back(FlGui::instance()->selectedEdges[i]->tag()); } Draw(); break; case 2: case 3: if(dim == 2){ - GUI::instance()->selectedFaces[0]->setSelection(1); + FlGui::instance()->selectedFaces[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedFaces[0]->tag()); + p.push_back(FlGui::instance()->selectedFaces[0]->tag()); } else{ - GUI::instance()->selectedRegions[0]->setSelection(1); + FlGui::instance()->selectedRegions[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedRegions[0]->tag()); + p.push_back(FlGui::instance()->selectedRegions[0]->tag()); } while(1) { if(p.size() == 1) @@ -1833,11 +1833,11 @@ static void add_transfinite(int dim) Msg::StatusBar(3, false, "Select (ordered) boundary points\n" "[Press 'e' to end selection, 'u' to undo last selection " "or 'q' to abort]"); - ib = GUI::instance()->selectEntity(ENT_POINT); + ib = FlGui::instance()->selectEntity(ENT_POINT); if(ib == 'l') { - GUI::instance()->selectedVertices[0]->setSelection(1); + FlGui::instance()->selectedVertices[0]->setSelection(1); Draw(); - p.push_back(GUI::instance()->selectedVertices[0]->tag()); + p.push_back(FlGui::instance()->selectedVertices[0]->tag()); } if(ib == 'u') { if(p.size() > 1){ @@ -1856,7 +1856,7 @@ static void add_transfinite(int dim) case 2: if(p.size() == 0 + 1 || p.size() == 3 + 1 || p.size() == 4 + 1) add_trsfsurf(p, GModel::current()->getFileName(), - GUI::instance()->meshContext->choice[1]->text()); + FlGui::instance()->meshContext->choice[1]->text()); else Msg::Error("Wrong number of points for transfinite surface"); break; @@ -1889,13 +1889,13 @@ static void add_transfinite(int dim) static void mesh_define_transfinite_line_cb(Fl_Widget *w, void *data) { - GUI::instance()->meshContext->show(1); + FlGui::instance()->meshContext->show(1); add_transfinite(1); } static void mesh_define_transfinite_surface_cb(Fl_Widget *w, void *data) { - GUI::instance()->meshContext->show(2); + FlGui::instance()->meshContext->show(2); add_transfinite(2); } @@ -1908,7 +1908,7 @@ static void view_toggle_cb(Fl_Widget *w, void *data) { int num = (int)(long)data; opt_view_visible(num, GMSH_SET, - GUI::instance()->menu->toggle[num]->value()); + FlGui::instance()->menu->toggle[num]->value()); Draw(); } @@ -1938,7 +1938,7 @@ static void view_reload(int index) if(p->getOptions()->timeStep > p->getData()->getNumTimeSteps() - 1) p->getOptions()->timeStep = 0; p->setChanged(true); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); } } } @@ -1969,7 +1969,7 @@ static void view_remove_other_cb(Fl_Widget *w, void *data) if(PView::list.empty()) return; for(int i = PView::list.size() - 1; i >= 0; i--) if(i != (long)data) delete PView::list[i]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -1977,7 +1977,7 @@ static void view_remove_all_cb(Fl_Widget *w, void *data) { if(PView::list.empty()) return; while(PView::list.size()) delete PView::list[0]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -1986,7 +1986,7 @@ static void view_remove_visible_cb(Fl_Widget *w, void *data) if(PView::list.empty()) return; for(int i = PView::list.size() - 1; i >= 0; i--) if(opt_view_visible(i, GMSH_GET, 0)) delete PView::list[i]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -1995,7 +1995,7 @@ static void view_remove_invisible_cb(Fl_Widget *w, void *data) if(PView::list.empty()) return; for(int i = PView::list.size() - 1; i >= 0; i--) if(!opt_view_visible(i, GMSH_GET, 0)) delete PView::list[i]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -2004,14 +2004,14 @@ static void view_remove_empty_cb(Fl_Widget *w, void *data) if(PView::list.empty()) return; for(int i = PView::list.size() - 1; i >= 0; i--) if(PView::list[i]->getData()->empty()) delete PView::list[i]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_remove_cb(Fl_Widget *w, void *data) { delete PView::list[(int)(long)data]; - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -2070,56 +2070,56 @@ static void view_save_med_cb(Fl_Widget *w, void *data) static void view_alias_cb(Fl_Widget *w, void *data) { new PView(PView::list[(int)(long)data], false); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_alias_with_options_cb(Fl_Widget *w, void *data) { new PView(PView::list[(int)(long)data], true); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_space_all_cb(Fl_Widget *w, void *data) { PView::combine(false, 1, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_space_visible_cb(Fl_Widget *w, void *data) { PView::combine(false, 0, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_space_by_name_cb(Fl_Widget *w, void *data) { PView::combine(false, 2, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_time_all_cb(Fl_Widget *w, void *data) { PView::combine(true, 1, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_time_visible_cb(Fl_Widget *w, void *data) { PView::combine(true, 0, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } static void view_combine_time_by_name_cb(Fl_Widget *w, void *data) { PView::combine(true, 2, CTX::instance()->post.combineRemoveOrig); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } @@ -2287,7 +2287,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_add_translate[] = { {"0Geometry>Elementary>Add>Translate"} , {"Point", (Fl_Callback *)geometry_elementary_add_translate_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_add_translate_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_add_translate_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_add_translate_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_add_translate_cb, (void*)"Volume"} , {""} @@ -2295,7 +2295,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_add_rotate[] = { {"0Geometry>Elementary>Add>Rotate"} , {"Point", (Fl_Callback *)geometry_elementary_add_rotate_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_add_rotate_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_add_rotate_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_add_rotate_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_add_rotate_cb, (void*)"Volume"} , {""} @@ -2303,7 +2303,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_add_scale[] = { {"0Geometry>Elementary>Add>Scale"} , {"Point", (Fl_Callback *)geometry_elementary_add_scale_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_add_scale_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_add_scale_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_add_scale_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_add_scale_cb, (void*)"Volume"} , {""} @@ -2311,7 +2311,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_add_symmetry[] = { {"0Geometry>Elementary>Add>Symmetry"} , {"Point", (Fl_Callback *)geometry_elementary_add_symmetry_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_add_symmetry_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_add_symmetry_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_add_symmetry_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_add_symmetry_cb, (void*)"Volume"} , {""} @@ -2332,7 +2332,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_translate[] = { {"0Geometry>Elementary>Translate"} , {"Point", (Fl_Callback *)geometry_elementary_translate_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_translate_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_translate_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_translate_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_translate_cb, (void*)"Volume"} , {""} @@ -2340,7 +2340,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_rotate[] = { {"0Geometry>Elementary>Rotate"} , {"Point", (Fl_Callback *)geometry_elementary_rotate_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_rotate_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_rotate_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_rotate_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_rotate_cb, (void*)"Volume"} , {""} @@ -2348,7 +2348,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_scale[] = { {"0Geometry>Elementary>Scale"} , {"Point", (Fl_Callback *)geometry_elementary_scale_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_scale_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_scale_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_scale_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_scale_cb, (void*)"Volume"} , {""} @@ -2356,7 +2356,7 @@ contextItem menu_geometry[] = { contextItem menu_geometry_elementary_symmetry[] = { {"0Geometry>Elementary>Symmetry"} , {"Point", (Fl_Callback *)geometry_elementary_symmetry_cb, (void*)"Point"} , - {"Line", (Fl_Callback *)geometry_elementary_symmetry_cb, (void*)"Line"} , + {"Line", (Fl_Callback *)geometry_elementary_symmetry_cb, (void*)"Line"} , {"Surface", (Fl_Callback *)geometry_elementary_symmetry_cb, (void*)"Surface"} , {"Volume", (Fl_Callback *)geometry_elementary_symmetry_cb, (void*)"Volume"} , {""} diff --git a/Fltk/messageWindow.cpp b/Fltk/messageWindow.cpp index 344b659f49efdaef318cbc2204964e0eee11c4a8..441bfaaf477cb45cf682850b1d6588c976d63027 100644 --- a/Fltk/messageWindow.cpp +++ b/Fltk/messageWindow.cpp @@ -8,7 +8,7 @@ #include <FL/Fl_Box.H> #include <FL/Fl_Return_Button.H> #include <FL/fl_ask.H> -#include "GUI.h" +#include "FlGui.h" #include "messageWindow.h" #include "paletteWindow.h" #include "fileDialogs.h" @@ -18,20 +18,20 @@ void message_cb(Fl_Widget *w, void *data) { - GUI::instance()->messages->show(); + FlGui::instance()->messages->show(); } static void message_auto_scroll_cb(Fl_Widget *w, void *data) { - CTX::instance()->msgAutoScroll = GUI::instance()->messages->butt->value(); + CTX::instance()->msgAutoScroll = FlGui::instance()->messages->butt->value(); } static void message_copy_cb(Fl_Widget *w, void *data) { std::string buff; - for(int i = 1; i <= GUI::instance()->messages->browser->size(); i++) { - if(GUI::instance()->messages->browser->selected(i)) { - const char *c = GUI::instance()->messages->browser->text(i); + for(int i = 1; i <= FlGui::instance()->messages->browser->size(); i++) { + if(FlGui::instance()->messages->browser->selected(i)) { + const char *c = FlGui::instance()->messages->browser->text(i); if(strlen(c) > 5 && c[0] == '@') buff += std::string(&c[5]); else @@ -46,7 +46,7 @@ static void message_copy_cb(Fl_Widget *w, void *data) static void message_clear_cb(Fl_Widget *w, void *data) { - GUI::instance()->messages->browser->clear(); + FlGui::instance()->messages->browser->clear(); } static void message_save_cb(Fl_Widget *w, void *data) @@ -60,7 +60,7 @@ static void message_save_cb(Fl_Widget *w, void *data) "Cancel", "Replace", NULL, name.c_str())) goto test; } - GUI::instance()->messages->save(name.c_str()); + FlGui::instance()->messages->save(name.c_str()); } } diff --git a/Fltk/openglWindow.cpp b/Fltk/openglWindow.cpp index d6920fb0ce844a497d0456e2fd6f52fb8d114e70..8bdcccf488ddedf2819a03df5282d0038d71175b 100644 --- a/Fltk/openglWindow.cpp +++ b/Fltk/openglWindow.cpp @@ -15,7 +15,7 @@ #include "MElement.h" #include "Draw.h" #include "Numeric.h" -#include "GUI.h" +#include "FlGui.h" #include "VertexArray.h" #include "Context.h" @@ -36,7 +36,7 @@ static void lassoZoom(drawContext *ctx, mousePosition &click1, mousePosition &cl ctx->initPosition(); Draw(); - GUI::instance()->manip->update(); + FlGui::instance()->manip->update(); } openglWindow::openglWindow(int x, int y, int w, int h, const char *l) @@ -96,7 +96,7 @@ void openglWindow::drawBorder() Fl::get_color(FL_BACKGROUND_COLOR, r, g, b); */ glColor3ub(r, g, b); - glLineWidth(1); + glLineWidth(1.0F); glBegin(GL_LINE_LOOP); glVertex2d(_ctx->viewport[0], _ctx->viewport[1]); glVertex2d(_ctx->viewport[2], _ctx->viewport[1]); @@ -141,7 +141,7 @@ void openglWindow::draw() // glBlendEquation(GL_FUNC_ADD); glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO); glEnable(GL_BLEND); - glLineWidth(0.2); + glLineWidth(0.2F); glBegin(GL_LINE_LOOP); glVertex2d(_click.win[0], _ctx->viewport[3] - _click.win[1]); glVertex2d(_lassoXY[0], _ctx->viewport[3] - _click.win[1]); @@ -166,13 +166,15 @@ void openglWindow::draw() CTX::instance()->mesh.draw = 0; CTX::instance()->post.draw = 0; } - glClearColor(CTX::instance()->unpackRed(CTX::instance()->color.bg) / 255., - CTX::instance()->unpackGreen(CTX::instance()->color.bg) / 255., - CTX::instance()->unpackBlue(CTX::instance()->color.bg) / 255., 0.); + glClearColor + ((GLclampf)(CTX::instance()->unpackRed(CTX::instance()->color.bg) / 255.), + (GLclampf)(CTX::instance()->unpackGreen(CTX::instance()->color.bg) / 255.), + (GLclampf)(CTX::instance()->unpackBlue(CTX::instance()->color.bg) / 255.), + 0.0F); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); _ctx->draw3d(); glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glPointSize(CTX::instance()->geom.pointSize); + glPointSize((float)CTX::instance()->geom.pointSize); glBegin(GL_POINTS); glVertex3d(_point[0], _point[1], _point[2]); glEnd(); @@ -184,9 +186,11 @@ void openglWindow::draw() } else{ // draw the whole scene - glClearColor(CTX::instance()->unpackRed(CTX::instance()->color.bg) / 255., - CTX::instance()->unpackGreen(CTX::instance()->color.bg) / 255., - CTX::instance()->unpackBlue(CTX::instance()->color.bg) / 255., 0.); + glClearColor + ((GLclampf)(CTX::instance()->unpackRed(CTX::instance()->color.bg) / 255.), + (GLclampf)(CTX::instance()->unpackGreen(CTX::instance()->color.bg) / 255.), + (GLclampf)(CTX::instance()->unpackBlue(CTX::instance()->color.bg) / 255.), + 0.0F); glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); _ctx->draw3d(); _ctx->draw2d(); @@ -202,7 +206,7 @@ openglWindow *openglWindow::_lastHandled = 0; void openglWindow::_setLastHandled(openglWindow* w) { _lastHandled = w; - GUI::instance()->visibility->updatePerWindow(); + FlGui::instance()->visibility->updatePerWindow(); } int openglWindow::handle(int event) @@ -216,7 +220,7 @@ int openglWindow::handle(int event) case FL_SHORTCUT: case FL_KEYBOARD: // override the default widget arrow-key-navigation - if(GUI::instance()->testArrowShortcuts()) + if(FlGui::instance()->testArrowShortcuts()) return 1; return Fl_Gl_Window::handle(event); @@ -301,7 +305,7 @@ int openglWindow::handle(int event) } _click.set(_ctx, Fl::event_x(), Fl::event_y()); _prev.set(_ctx, Fl::event_x(), Fl::event_y()); - GUI::instance()->manip->update(); + FlGui::instance()->manip->update(); return 1; case FL_RELEASE: @@ -325,7 +329,7 @@ int openglWindow::handle(int event) _prev.recenter(_ctx); redraw(); } - GUI::instance()->manip->update(); + FlGui::instance()->manip->update(); return 1; case FL_DRAG: @@ -383,7 +387,7 @@ int openglWindow::handle(int event) } } _prev.set(_ctx, Fl::event_x(), Fl::event_y()); - GUI::instance()->manip->update(); + FlGui::instance()->manip->update(); return 1; case FL_MOVE: @@ -412,11 +416,11 @@ int openglWindow::handle(int event) } char str[32]; sprintf(str, "%g", _point[0]); - GUI::instance()->geoContext->input[2]->value(str); + FlGui::instance()->geoContext->input[2]->value(str); sprintf(str, "%g", _point[1]); - GUI::instance()->geoContext->input[3]->value(str); + FlGui::instance()->geoContext->input[3]->value(str); sprintf(str, "%g", _point[2]); - GUI::instance()->geoContext->input[4]->value(str); + FlGui::instance()->geoContext->input[4]->value(str); redraw(); } else{ // hover mode @@ -684,7 +688,7 @@ char openglWindow::selectEntity(int type, faces.clear(); regions.clear(); elements.clear(); - GUI::instance()->wait(); + FlGui::instance()->wait(); if(quitSelection) { _selection = ENT_NONE; selectionMode = false; diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index 1903b5c5f12da9c197d2fdb63fc8f3b32d196a91..8d63ca6bfc77f075e9b80eb67272e5eb915e32d7 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -10,7 +10,7 @@ #include "GmshConfig.h" #include "GmshDefines.h" #include "GmshMessage.h" -#include "GUI.h" +#include "FlGui.h" #include "optionWindow.h" #include "paletteWindow.h" #include "menuWindow.h" @@ -121,25 +121,25 @@ static void view_color_cb(Fl_Widget *w, void *data) unsigned int (*fct) (int, int, unsigned int); fct = (unsigned int (*)(int, int, unsigned int))data; uchar r = CTX::instance()->unpackRed - (fct(GUI::instance()->options->view.index, GMSH_GET, 0)); + (fct(FlGui::instance()->options->view.index, GMSH_GET, 0)); uchar g = CTX::instance()->unpackGreen - (fct(GUI::instance()->options->view.index, GMSH_GET, 0)); + (fct(FlGui::instance()->options->view.index, GMSH_GET, 0)); uchar b = CTX::instance()->unpackBlue - (fct(GUI::instance()->options->view.index, GMSH_GET, 0)); + (fct(FlGui::instance()->options->view.index, GMSH_GET, 0)); if(fl_color_chooser("Color Chooser", r, g, b)) - fct(GUI::instance()->options->view.index, + fct(FlGui::instance()->options->view.index, GMSH_SET | GMSH_GUI, CTX::instance()->packColor(r, g, b, 255)); Draw(); } void options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->win->show(); + FlGui::instance()->options->win->show(); } static void options_browser_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(GUI::instance()->options->browser->value()); + FlGui::instance()->options->showGroup(FlGui::instance()->options->browser->value()); } void options_save_cb(Fl_Widget *w, void *data) @@ -157,43 +157,43 @@ static void options_restore_defaults_cb(Fl_Widget *w, void *data) UnlinkFile(CTX::instance()->homeDir + CTX::instance()->optionsFileName); ReInitOptions(0); InitOptionsGUI(0); - if(GUI::instance()->menu->module->value() == 3) // hack to refresh the buttons - GUI::instance()->menu->setContext(menu_post, 0); + if(FlGui::instance()->menu->module->value() == 3) // hack to refresh the buttons + FlGui::instance()->menu->setContext(menu_post, 0); Draw(); } void general_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(1); + FlGui::instance()->options->showGroup(1); } static void general_options_color_scheme_cb(Fl_Widget *w, void *data) { opt_general_color_scheme - (0, GMSH_SET, GUI::instance()->options->general.choice[3]->value()); + (0, GMSH_SET, FlGui::instance()->options->general.choice[3]->value()); Draw(); } static void general_options_rotation_center_select_cb(Fl_Widget *w, void *data) { Msg::StatusBar(3, false, "Select entity\n[Press 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_ALL); + char ib = FlGui::instance()->selectEntity(ENT_ALL); if(ib == 'l') { SPoint3 pc(0., 0., 0.); - if(GUI::instance()->selectedVertices.size()) - pc.setPosition(GUI::instance()->selectedVertices[0]->x(), - GUI::instance()->selectedVertices[0]->y(), - GUI::instance()->selectedVertices[0]->z()); - else if(GUI::instance()->selectedEdges.size()) - pc = GUI::instance()->selectedEdges[0]->bounds().center(); - else if(GUI::instance()->selectedFaces.size()) - pc = GUI::instance()->selectedFaces[0]->bounds().center(); - else if(GUI::instance()->selectedRegions.size()) - pc = GUI::instance()->selectedRegions[0]->bounds().center(); - else if(GUI::instance()->selectedElements.size()) - pc = GUI::instance()->selectedElements[0]->barycenter(); + if(FlGui::instance()->selectedVertices.size()) + pc.setPosition(FlGui::instance()->selectedVertices[0]->x(), + FlGui::instance()->selectedVertices[0]->y(), + FlGui::instance()->selectedVertices[0]->z()); + else if(FlGui::instance()->selectedEdges.size()) + pc = FlGui::instance()->selectedEdges[0]->bounds().center(); + else if(FlGui::instance()->selectedFaces.size()) + pc = FlGui::instance()->selectedFaces[0]->bounds().center(); + else if(FlGui::instance()->selectedRegions.size()) + pc = FlGui::instance()->selectedRegions[0]->bounds().center(); + else if(FlGui::instance()->selectedElements.size()) + pc = FlGui::instance()->selectedElements[0]->barycenter(); opt_general_rotation_center_cg - (0, GMSH_SET, GUI::instance()->options->general.butt[15]->value()); + (0, GMSH_SET, FlGui::instance()->options->general.butt[15]->value()); opt_general_rotation_center0(0, GMSH_SET|GMSH_GUI, pc.x()); opt_general_rotation_center1(0, GMSH_SET|GMSH_GUI, pc.y()); opt_general_rotation_center2(0, GMSH_SET|GMSH_GUI, pc.z()); @@ -205,7 +205,7 @@ static void general_options_rotation_center_select_cb(Fl_Widget *w, void *data) static void general_options_ok_cb(Fl_Widget *w, void *data) { - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); static double lc = 0.; @@ -328,12 +328,12 @@ static void general_arrow_param_cb(Fl_Widget *w, void *data) void geometry_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(2); + FlGui::instance()->options->showGroup(2); } static void geometry_options_ok_cb(Fl_Widget *w, void *data) { - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); opt_geometry_points(0, GMSH_SET, o->geo.butt[0]->value()); @@ -386,12 +386,12 @@ static void geometry_options_ok_cb(Fl_Widget *w, void *data) void mesh_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(3); + FlGui::instance()->options->showGroup(3); } static void mesh_options_ok_cb(Fl_Widget *w, void *data) { - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); opt_mesh_reverse_all_normals(0, GMSH_SET, o->mesh.butt[0]->value()); @@ -460,12 +460,12 @@ static void mesh_options_ok_cb(Fl_Widget *w, void *data) void solver_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(4); + FlGui::instance()->options->showGroup(4); } static void solver_options_ok_cb(Fl_Widget *w, void *data) { - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); int old_listen = (int)opt_solver_listen(0, GMSH_GET, o->solver.butt[0]->value()); @@ -483,12 +483,12 @@ static void solver_options_ok_cb(Fl_Widget *w, void *data) void post_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup(5); + FlGui::instance()->options->showGroup(5); } static void post_options_ok_cb(Fl_Widget *w, void *data) { - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); opt_post_anim_cycle(0, GMSH_SET, o->post.butt[0]->value()); @@ -507,7 +507,7 @@ static void post_options_ok_cb(Fl_Widget *w, void *data) void view_options_cb(Fl_Widget *w, void *data) { - GUI::instance()->options->showGroup((int)(long)data + 6); + FlGui::instance()->options->showGroup((int)(long)data + 6); } static void view_options_timestep_cb(Fl_Widget *w, void *data) @@ -517,7 +517,7 @@ static void view_options_timestep_cb(Fl_Widget *w, void *data) for(int i = 0; i < (int)PView::list.size(); i++) { if((links == 2 || links == 4) || ((links == 1 || links == 3) && opt_view_visible(i, GMSH_GET, 0)) || - (links == 0 && i == GUI::instance()->options->view.index)) { + (links == 0 && i == FlGui::instance()->options->view.index)) { if(str == "=") opt_view_timestep(i, GMSH_SET, ((Fl_Value_Input *) w)->value()); else if(str == "-") @@ -533,11 +533,11 @@ static void view_options_timestep_cb(Fl_Widget *w, void *data) static void view_options_ok_cb(Fl_Widget *w, void *data) { - int current = GUI::instance()->options->view.index; + int current = FlGui::instance()->options->view.index; if(current < 0) return; - optionWindow *o = GUI::instance()->options; + optionWindow *o = FlGui::instance()->options; o->activate((const char*)data); if(data){ @@ -1118,11 +1118,11 @@ static void view_options_ok_cb(Fl_Widget *w, void *data) static void view_options_max_recursion_cb(Fl_Widget *w, void *data) { std::string str((const char*)data); - int val = (int)GUI::instance()->options->view.value[33]->value(); + int val = (int)FlGui::instance()->options->view.value[33]->value(); if(str == "-" && val > 0) - GUI::instance()->options->view.value[33]->value(val - 1); + FlGui::instance()->options->view.value[33]->value(val - 1); else if(str == "+") - GUI::instance()->options->view.value[33]->value(val + 1); + FlGui::instance()->options->view.value[33]->value(val + 1); view_options_ok_cb(0, 0); } diff --git a/Fltk/partitionDialog.cpp b/Fltk/partitionDialog.cpp index 58734d7c409d01b2611435933b9b2c4ab2732131..baa981a977a7580008c82594fbd081061641f735 100644 --- a/Fltk/partitionDialog.cpp +++ b/Fltk/partitionDialog.cpp @@ -21,7 +21,7 @@ #include "GmshConfig.h" #include "GmshDefines.h" #include "GmshMessage.h" -#include "GUI.h" +#include "FlGui.h" #include "paletteWindow.h" #include "GModel.h" #include "Draw.h" diff --git a/Fltk/pluginWindow.cpp b/Fltk/pluginWindow.cpp index 125cf6d02693bd45ca4170349325607a02ba0601..34e82f205024ad6adb3c584ae3cea9b2ceee7083 100644 --- a/Fltk/pluginWindow.cpp +++ b/Fltk/pluginWindow.cpp @@ -11,7 +11,7 @@ #include <FL/Fl_Box.H> #include <FL/Fl_Tabs.H> #include <FL/Fl_Scroll.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "pluginWindow.h" #include "paletteWindow.h" @@ -21,7 +21,8 @@ #include "Context.h" #define MAX_PLUGIN_OPTIONS 50 -struct PluginDialogBox{ +class PluginDialogBox{ + public: Fl_Group *group; Fl_Value_Input *value[MAX_PLUGIN_OPTIONS]; Fl_Input *input[MAX_PLUGIN_OPTIONS]; @@ -29,7 +30,7 @@ struct PluginDialogBox{ void plugin_cb(Fl_Widget *w, void *data) { - GUI::instance()->plugins->show((int)(long)data); + FlGui::instance()->plugins->show((int)(long)data); } static void plugin_input_value_cb(Fl_Widget *w, void *data) @@ -50,9 +51,9 @@ static void plugin_browser_cb(Fl_Widget *w, void *data) { // get selected plugin GMSH_Plugin *p = 0; - for(int i = 1; i <= GUI::instance()->plugins->browser->size(); i++) { - if(GUI::instance()->plugins->browser->selected(i)) { - p = (GMSH_Plugin*)GUI::instance()->plugins->browser->data(i); + for(int i = 1; i <= FlGui::instance()->plugins->browser->size(); i++) { + if(FlGui::instance()->plugins->browser->selected(i)) { + p = (GMSH_Plugin*)FlGui::instance()->plugins->browser->data(i); break; } } @@ -60,8 +61,8 @@ static void plugin_browser_cb(Fl_Widget *w, void *data) // get first first selected view int iView = -1; - for(int i = 1; i <= GUI::instance()->plugins->view_browser->size(); i++) { - if(GUI::instance()->plugins->view_browser->selected(i)) { + for(int i = 1; i <= FlGui::instance()->plugins->view_browser->size(); i++) { + if(FlGui::instance()->plugins->view_browser->selected(i)) { iView = i - 1; break; } @@ -95,8 +96,8 @@ static void plugin_browser_cb(Fl_Widget *w, void *data) } // hide all plugin groups except the selected one - for(int i = 1; i <= GUI::instance()->plugins->browser->size(); i++) - ((GMSH_Plugin*)GUI::instance()->plugins->browser->data(i))->dialogBox->group->hide(); + for(int i = 1; i <= FlGui::instance()->plugins->browser->size(); i++) + ((GMSH_Plugin*)FlGui::instance()->plugins->browser->data(i))->dialogBox->group->hide(); p->dialogBox->group->show(); } @@ -120,8 +121,8 @@ static void plugin_run_cb(Fl_Widget *w, void *data) // run on all selected views bool no_view_selected = true; - for(int i = 1; i <= GUI::instance()->plugins->view_browser->size(); i++) { - if(GUI::instance()->plugins->view_browser->selected(i)) { + for(int i = 1; i <= FlGui::instance()->plugins->view_browser->size(); i++) { + if(FlGui::instance()->plugins->view_browser->selected(i)) { no_view_selected = false; try{ if(i - 1 >= 0 && i - 1 < (int)PView::list.size()) @@ -138,7 +139,7 @@ static void plugin_run_cb(Fl_Widget *w, void *data) } if(no_view_selected) p->execute(0); - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); CTX::instance()->post.pluginDrawFunction = NULL; Draw(); } diff --git a/Fltk/projectionEditor.cpp b/Fltk/projectionEditor.cpp index a098fadd3b66227ae5ff79a9b8e7ce3393eacbe9..1f450c11bb0a4f0d6459c54b5fb1dc031d9bd5b3 100644 --- a/Fltk/projectionEditor.cpp +++ b/Fltk/projectionEditor.cpp @@ -8,7 +8,7 @@ #include <FL/Fl_Scroll.H> #include <FL/Fl_Repeat_Button.H> #include "GmshConfig.h" -#include "GUI.h" +#include "FlGui.h" #include "projectionEditor.h" #include "paletteWindow.h" #include "fileDialogs.h" @@ -233,20 +233,20 @@ static void set_position_cb(Fl_Widget *w, void *data) projectionEditor *e = (projectionEditor*)data; projection *p = e->getCurrentProjection(); if(p){ - char ib = GUI::instance()->selectEntity(ENT_ALL); + char ib = FlGui::instance()->selectEntity(ENT_ALL); if(ib == 'l'){ - if(GUI::instance()->selectedVertices.size()){ - p->parameters[0]->value(GUI::instance()->selectedVertices[0]->x()); - p->parameters[1]->value(GUI::instance()->selectedVertices[0]->y()); - p->parameters[2]->value(GUI::instance()->selectedVertices[0]->z()); + if(FlGui::instance()->selectedVertices.size()){ + p->parameters[0]->value(FlGui::instance()->selectedVertices[0]->x()); + p->parameters[1]->value(FlGui::instance()->selectedVertices[0]->y()); + p->parameters[2]->value(FlGui::instance()->selectedVertices[0]->z()); } - else if(GUI::instance()->selectedElements.size()){ - SPoint3 pc = GUI::instance()->selectedElements[0]->barycenter(); + else if(FlGui::instance()->selectedElements.size()){ + SPoint3 pc = FlGui::instance()->selectedElements[0]->barycenter(); p->parameters[0]->value(pc.x()); p->parameters[1]->value(pc.y()); p->parameters[2]->value(pc.z()); - if(GUI::instance()->selectedElements[0]->getNumFaces()){ - MFace f = GUI::instance()->selectedElements[0]->getFace(0); + if(FlGui::instance()->selectedElements[0]->getNumFaces()){ + MFace f = FlGui::instance()->selectedElements[0]->getFace(0); SVector3 n = f.normal(); p->parameters[3]->value(n[0]); p->parameters[4]->value(n[1]); @@ -282,46 +282,46 @@ static void select_cb(Fl_Widget *w, void *data) if(ele.size() || ent.size()) Msg::StatusBar(3, false, "Select %s\n[Press 'e' to end selection, 'u' to undo" - "last selection or 'q' to abort]", str); + "last selection or 'q' to abort]", str); else Msg::StatusBar(3, false, "Select %s\n" - "[Press 'e' to end selection or 'q' to abort]", str); + "[Press 'e' to end selection or 'q' to abort]", str); - char ib = GUI::instance()->selectEntity(what); + char ib = FlGui::instance()->selectEntity(what); if(ib == 'l') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++){ - if(GUI::instance()->selectedElements[i]->getVisibility() != 2){ - GUI::instance()->selectedElements[i]->setVisibility(2); - ele.push_back(GUI::instance()->selectedElements[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++){ + if(FlGui::instance()->selectedElements[i]->getVisibility() != 2){ + FlGui::instance()->selectedElements[i]->setVisibility(2); + ele.push_back(FlGui::instance()->selectedElements[i]); } } } else{ - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++){ - if(GUI::instance()->selectedVertices[i]->getSelection() != 1){ - GUI::instance()->selectedVertices[i]->setSelection(1); - ent.push_back(GUI::instance()->selectedVertices[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++){ + if(FlGui::instance()->selectedVertices[i]->getSelection() != 1){ + FlGui::instance()->selectedVertices[i]->setSelection(1); + ent.push_back(FlGui::instance()->selectedVertices[i]); } } - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++){ - if(GUI::instance()->selectedFaces[i]->getSelection() != 1){ - GUI::instance()->selectedFaces[i]->setSelection(1); - ent.push_back(GUI::instance()->selectedFaces[i]); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++){ + if(FlGui::instance()->selectedFaces[i]->getSelection() != 1){ + FlGui::instance()->selectedFaces[i]->setSelection(1); + ent.push_back(FlGui::instance()->selectedFaces[i]); } } } } if(ib == 'r') { if(CTX::instance()->pickElements){ - for(unsigned int i = 0; i < GUI::instance()->selectedElements.size(); i++) - GUI::instance()->selectedElements[i]->setVisibility(1); + for(unsigned int i = 0; i < FlGui::instance()->selectedElements.size(); i++) + FlGui::instance()->selectedElements[i]->setVisibility(1); } else{ - for(unsigned int i = 0; i < GUI::instance()->selectedVertices.size(); i++) - GUI::instance()->selectedVertices[i]->setSelection(0); - for(unsigned int i = 0; i < GUI::instance()->selectedFaces.size(); i++) - GUI::instance()->selectedFaces[i]->setSelection(0); + for(unsigned int i = 0; i < FlGui::instance()->selectedVertices.size(); i++) + FlGui::instance()->selectedVertices[i]->setSelection(0); + for(unsigned int i = 0; i < FlGui::instance()->selectedFaces.size(); i++) + FlGui::instance()->selectedFaces[i]->setSelection(0); } } if(ib == 'u') { @@ -551,67 +551,67 @@ static void compute_cb(Fl_Widget *w, void *data) if (e->getPatchType()) { // create the US-FFT/Windowing faces (with boundaries) FM::Patch* patch = - new FM::WFPatch(0, ps->clone(), u, v, f, 3, uModes, vModes); + new FM::WFPatch(0, ps->clone(), u, v, f, 3, uModes, vModes); m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patch); + AddPatch(patch); m->getFMInternals()->makeGFace(patch,m); //makeGFace(patch); } else { // create the Fourier faces (with boundaries) if(ps->IsUPeriodic()) { - FM::Patch* patchL = - new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, - uM, vM, h0, h1, h2, h3); - patchL->SetMinU(-0.35); - patchL->SetMaxU(0.35); - m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patchL); - m->getFMInternals()->makeGFace(patchL,m); - //makeGFace(patchL); - FM::Patch* patchR = - new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, - uM, vM, h0, h1, h2, h3); - patchR->SetMinU(0.15); - patchR->SetMaxU(0.85); - m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patchR); - m->getFMInternals()->makeGFace(patchR,m); - //makeGFace(patchR); + FM::Patch* patchL = + new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, + uM, vM, h0, h1, h2, h3); + patchL->SetMinU(-0.35); + patchL->SetMaxU(0.35); + m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> + AddPatch(patchL); + m->getFMInternals()->makeGFace(patchL,m); + //makeGFace(patchL); + FM::Patch* patchR = + new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, + uM, vM, h0, h1, h2, h3); + patchR->SetMinU(0.15); + patchR->SetMaxU(0.85); + m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> + AddPatch(patchR); + m->getFMInternals()->makeGFace(patchR,m); + //makeGFace(patchR); } else if (ps->IsVPeriodic()) { - FM::Patch* patchL = - new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, - uM, vM, h0, h1, h2, h3); - patchL->SetMinV(-0.35); - patchL->SetMaxV(0.35); - m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patchL); - m->getFMInternals()->makeGFace(patchL,m); - //makeGFace(patchL); - FM::Patch* patchR = - new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, - uM, vM, h0, h1, h2, h3); - patchR->SetMinV(0.15); - patchR->SetMaxV(0.85); - m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patchR); - m->getFMInternals()->makeGFace(patchR,m); - //makeGFace(patchR); + FM::Patch* patchL = + new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, + uM, vM, h0, h1, h2, h3); + patchL->SetMinV(-0.35); + patchL->SetMaxV(0.35); + m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> + AddPatch(patchL); + m->getFMInternals()->makeGFace(patchL,m); + //makeGFace(patchL); + FM::Patch* patchR = + new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, + uM, vM, h0, h1, h2, h3); + patchR->SetMinV(0.15); + patchR->SetMaxV(0.85); + m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> + AddPatch(patchR); + m->getFMInternals()->makeGFace(patchR,m); + //makeGFace(patchR); } else { - FM::Patch* patch = - new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, - uM, vM, h0, h1, h2, h3); - m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> - AddPatch(patch); - m->getFMInternals()->makeGFace(patch,m); - //makeGFace(patch); + FM::Patch* patch = + new FM::FPatch(0, ps->clone(), u, v, f, 3, uModes, vModes, + uM, vM, h0, h1, h2, h3); + m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()-> + AddPatch(patch); + m->getFMInternals()->makeGFace(patch,m); + //makeGFace(patch); } } } printf("nPatches = %d\n",m->getFMInternals()->current()->GetGroup(0)-> - GetBlendGroup()->GetNumPatches()); + GetBlendGroup()->GetNumPatches()); Draw(); } @@ -644,10 +644,10 @@ static void blend_cb(Fl_Widget *w, void *data) m->getFMInternals()->current()->GetGroup(0)->GetBlendGroup()->Blend(); for (int i = 0; i < m->getFMInternals()->current()->GetGroup(0)-> - GetBlendGroup()->GetNumPatches(); i++) + GetBlendGroup()->GetNumPatches(); i++) m->getFMInternals()->makeGFace(m->getFMInternals()->current()-> - GetGroup(0)->GetBlendGroup()-> - GetPatch(i),m); + GetGroup(0)->GetBlendGroup()-> + GetPatch(i),m); for (unsigned int i = 0; i < faces.size(); i++) { //delete_fourier(faces[i]); faces[i]->setVisibility(0, true); @@ -675,10 +675,10 @@ static void action_cb(Fl_Widget *w, void *data) } else if(what == "delete_select" || what == "save_select"){ Msg::StatusBar(3, false, "Select Surface\n[Press 'e' to end selection 'q' to abort]"); - char ib = GUI::instance()->selectEntity(ENT_SURFACE); + char ib = FlGui::instance()->selectEntity(ENT_SURFACE); if(ib == 'l') faces.insert(faces.end(), - GUI::instance()->selectedFaces.begin(), - GUI::instance()->selectedFaces.end()); + FlGui::instance()->selectedFaces.begin(), + FlGui::instance()->selectedFaces.end()); Msg::StatusBar(3, false, ""); } diff --git a/Fltk/solverWindow.cpp b/Fltk/solverWindow.cpp index 4cbaf93a3f9a5a5bd08dd76775721d0b25c6916e..cff7d3c393f1e734dd5f21b6ab579a4882a022cd 100644 --- a/Fltk/solverWindow.cpp +++ b/Fltk/solverWindow.cpp @@ -9,7 +9,7 @@ #include <FL/Fl_Return_Button.H> #include <FL/Fl_Browser.H> #include "GModel.h" -#include "GUI.h" +#include "FlGui.h" #include "solverWindow.h" #include "paletteWindow.h" #include "optionWindow.h" @@ -36,15 +36,15 @@ void solver_cb(Fl_Widget *w, void *data) first[num] = 0; std::vector<std::string> split = SplitFileName(GModel::current()->getFileName()); std::string file = split[0] + split[1] + SINFO[num].extension; - GUI::instance()->solver[num]->input[0]->value(file.c_str()); + FlGui::instance()->solver[num]->input[0]->value(file.c_str()); } // show the window before calling Solver() to avoid race condition on // Windows (if the message window pops up die to an error, the window // callbacks get messed up) - GUI::instance()->solver[num]->win->show(); + FlGui::instance()->solver[num]->win->show(); if(SINFO[num].nboptions) { - std::string file = FixWindowsPath(GUI::instance()->solver[num]->input[0]->value()); + std::string file = FixWindowsPath(FlGui::instance()->solver[num]->input[0]->value()); char tmp[256], tmp2[256]; sprintf(tmp, "\"%s\"", file.c_str()); sprintf(tmp2, SINFO[num].name_command.c_str(), tmp); @@ -62,7 +62,7 @@ static void solver_file_open_cb(Fl_Widget *w, void *data) // We allow to create the .pro file... Or should we add a "New file" // button? if(file_chooser(0, 0, "Choose", tmp)) { - GUI::instance()->solver[num]->input[0]->value(file_chooser_get_name(1).c_str()); + FlGui::instance()->solver[num]->input[0]->value(file_chooser_get_name(1).c_str()); if(SINFO[num].nboptions) { std::string file = FixWindowsPath(file_chooser_get_name(1).c_str()); sprintf(tmp, "\"%s\"", file.c_str()); @@ -77,7 +77,7 @@ static void solver_file_edit_cb(Fl_Widget *w, void *data) { int num = (int)(long)data; std::string prog = FixWindowsPath(CTX::instance()->editor.c_str()); - std::string file = FixWindowsPath(GUI::instance()->solver[num]->input[0]->value()); + std::string file = FixWindowsPath(FlGui::instance()->solver[num]->input[0]->value()); char cmd[1024]; ReplaceMultiFormat(prog.c_str(), file.c_str(), cmd); SystemCall(cmd); @@ -87,7 +87,7 @@ static void solver_choose_mesh_cb(Fl_Widget *w, void *data) { int num = (int)(long)data; if(file_chooser(0, 0, "Choose", "*")) - GUI::instance()->solver[num]->input[1]->value(file_chooser_get_name(1).c_str()); + FlGui::instance()->solver[num]->input[1]->value(file_chooser_get_name(1).c_str()); } static int nbs(const char *str) @@ -110,10 +110,10 @@ static void solver_command_cb(Fl_Widget *w, void *data) int usedopts = 0; if(SINFO[num].popup_messages) - GUI::instance()->messages->show(true); + FlGui::instance()->messages->show(true); - if(strlen(GUI::instance()->solver[num]->input[1]->value())) { - std::string m = FixWindowsPath(GUI::instance()->solver[num]->input[1]->value()); + if(strlen(FlGui::instance()->solver[num]->input[1]->value())) { + std::string m = FixWindowsPath(FlGui::instance()->solver[num]->input[1]->value()); sprintf(tmp, "\"%s\"", m.c_str()); sprintf(mesh, SINFO[num].mesh_command.c_str(), tmp); } @@ -128,7 +128,7 @@ static void solver_command_cb(Fl_Widget *w, void *data) Msg::Error("Missing options to execute command"); return; } - int val = GUI::instance()->solver[num]->choice[usedopts]->value(); + int val = FlGui::instance()->solver[num]->choice[usedopts]->value(); if(val < (int)SINFO[num].option[usedopts].size()) sprintf(command, SINFO[num].button_command[idx].c_str(), SINFO[num].option[usedopts][val].c_str()); @@ -141,7 +141,7 @@ static void solver_command_cb(Fl_Widget *w, void *data) strcpy(command, SINFO[num].button_command[idx].c_str()); } - std::string c = FixWindowsPath(GUI::instance()->solver[num]->input[0]->value()); + std::string c = FixWindowsPath(FlGui::instance()->solver[num]->input[0]->value()); sprintf(arg, "\"%s\"", c.c_str()); sprintf(tmp, SINFO[num].name_command.c_str(), arg); sprintf(arg, "%s %s %s", tmp, mesh, command); @@ -163,13 +163,13 @@ static void solver_ok_cb(Fl_Widget *w, void *data) int retry = 0, num = (int)(long)data; opt_solver_client_server - (num, GMSH_SET, GUI::instance()->solver[num]->menu->menu()[0].value() ? 1 : 0); + (num, GMSH_SET, FlGui::instance()->solver[num]->menu->menu()[0].value() ? 1 : 0); opt_solver_popup_messages - (num, GMSH_SET, GUI::instance()->solver[num]->menu->menu()[1].value() ? 1 : 0); + (num, GMSH_SET, FlGui::instance()->solver[num]->menu->menu()[1].value() ? 1 : 0); opt_solver_merge_views - (num, GMSH_SET, GUI::instance()->solver[num]->menu->menu()[2].value() ? 1 : 0); + (num, GMSH_SET, FlGui::instance()->solver[num]->menu->menu()[2].value() ? 1 : 0); - const char *exe = GUI::instance()->solver[num]->input[2]->value(); + const char *exe = FlGui::instance()->solver[num]->input[2]->value(); if(strcmp(opt_solver_executable(num, GMSH_GET, "").c_str(), exe)) retry = 1; opt_solver_executable(num, GMSH_SET, exe); @@ -187,7 +187,7 @@ static void solver_choose_executable_cb(Fl_Widget *w, void *data) "*" #endif )){ - GUI::instance()->solver[num]->input[2]->value(file_chooser_get_name(1).c_str()); + FlGui::instance()->solver[num]->input[2]->value(file_chooser_get_name(1).c_str()); solver_ok_cb(w, data); } } diff --git a/Fltk/statisticsWindow.cpp b/Fltk/statisticsWindow.cpp index ab62172ae43aab13fb6651acab79e6361fc98f26..c6a19d692b9f95a6c8dfe7b33744d3665cf02654 100644 --- a/Fltk/statisticsWindow.cpp +++ b/Fltk/statisticsWindow.cpp @@ -6,7 +6,7 @@ #include <FL/Fl_Tabs.H> #include <FL/Fl_Box.H> #include <FL/Fl_Return_Button.H> -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "statisticsWindow.h" #include "paletteWindow.h" @@ -18,12 +18,12 @@ void statistics_cb(Fl_Widget *w, void *data) { - GUI::instance()->stats->show(); + FlGui::instance()->stats->show(); } static void statistics_update_cb(Fl_Widget *w, void *data) { - GUI::instance()->stats->compute(true); + FlGui::instance()->stats->compute(true); } static void statistics_histogram_cb(Fl_Widget *w, void *data) @@ -33,19 +33,19 @@ static void statistics_histogram_cb(Fl_Widget *w, void *data) std::vector<double> x, y; if(name == "Gamma2D"){ - for(int i = 0; i < 100; i++) y.push_back(GUI::instance()->stats->quality[0][i]); + for(int i = 0; i < 100; i++) y.push_back(FlGui::instance()->stats->quality[0][i]); new PView("Gamma", "# Elements", x, y); } else if(name == "Eta2D"){ - for(int i = 0; i < 100; i++) y.push_back(GUI::instance()->stats->quality[1][i]); + for(int i = 0; i < 100; i++) y.push_back(FlGui::instance()->stats->quality[1][i]); new PView("Eta", "# Elements", x, y); } else if(name == "Rho2D"){ - for(int i = 0; i < 100; i++) y.push_back(GUI::instance()->stats->quality[2][i]); + for(int i = 0; i < 100; i++) y.push_back(FlGui::instance()->stats->quality[2][i]); new PView("Rho", "# Elements", x, y); } else if(name == "Disto2D"){ - for(int i = 0; i < 100; i++) y.push_back(GUI::instance()->stats->quality[3][i]); + for(int i = 0; i < 100; i++) y.push_back(FlGui::instance()->stats->quality[3][i]); new PView("Disto", "# Elements", x, y); } else{ @@ -70,7 +70,7 @@ static void statistics_histogram_cb(Fl_Widget *w, void *data) new PView(name, "ElementData", GModel::current(), d); } - GUI::instance()->updateViews(); + FlGui::instance()->updateViews(); Draw(); } diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp index 5daf0933f6f0473af736dfc11e6ed9fa102a7a41..fa0f506931f488ff9fbfe552bcd086bbae29a972 100644 --- a/Fltk/visibilityWindow.cpp +++ b/Fltk/visibilityWindow.cpp @@ -12,7 +12,7 @@ #include <FL/Fl_Box.H> #include <FL/Fl_Return_Button.H> #include "GmshConfig.h" -#include "GUI.h" +#include "FlGui.h" #include "Draw.h" #include "visibilityWindow.h" #include "paletteWindow.h" @@ -288,10 +288,10 @@ VisibilityList *VisibilityList::_instance = 0; static void _rebuild_list_browser() { - GUI::instance()->visibility->browser->clear(); + FlGui::instance()->visibility->browser->clear(); VisibilityList::VisibilityType type; - switch(GUI::instance()->visibility->browser_type->value()){ + switch(FlGui::instance()->visibility->browser_type->value()){ case 0: type = VisibilityList::Models; break; case 2: type = VisibilityList::PhysicalEntities; break; case 3: type = VisibilityList::MeshPartitions; break; @@ -300,17 +300,17 @@ static void _rebuild_list_browser() VisibilityList::instance()->update(type); for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ - GUI::instance()->visibility->browser->add + FlGui::instance()->visibility->browser->add (VisibilityList::instance()->getBrowserLine(i).c_str()); if(VisibilityList::instance()->getVisibility(i)) - GUI::instance()->visibility->browser->select(i + 1); + FlGui::instance()->visibility->browser->select(i + 1); } // activate/deactivate delete button if(type == VisibilityList::PhysicalEntities) - GUI::instance()->visibility->push[0]->activate(); + FlGui::instance()->visibility->push[0]->activate(); else - GUI::instance()->visibility->push[0]->deactivate(); + FlGui::instance()->visibility->push[0]->deactivate(); } static void visibility_browser_apply_cb(Fl_Widget *w, void *data) @@ -319,9 +319,9 @@ static void visibility_browser_apply_cb(Fl_Widget *w, void *data) // browser and apply them into the model if(VisibilityList::instance()->getNumEntities()){ CTX::instance()->mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + bool recursive = FlGui::instance()->visibility->butt[0]->value() ? true : false; VisibilityList::VisibilityType type; - switch(GUI::instance()->visibility->browser_type->value()){ + switch(FlGui::instance()->visibility->browser_type->value()){ case 0: type = VisibilityList::Models; break; case 2: type = VisibilityList::PhysicalEntities; break; case 3: type = VisibilityList::MeshPartitions; break; @@ -329,12 +329,12 @@ static void visibility_browser_apply_cb(Fl_Widget *w, void *data) } VisibilityList::instance()->setAllInvisible(type); for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++) - if(GUI::instance()->visibility->browser->selected(i + 1)) + if(FlGui::instance()->visibility->browser->selected(i + 1)) VisibilityList::instance()->setVisibility(i, 1, recursive); // then refresh the browser to account for recursive selections for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++) if(VisibilityList::instance()->getVisibility(i)) - GUI::instance()->visibility->browser->select(i + 1); + FlGui::instance()->visibility->browser->select(i + 1); Draw(); } } @@ -343,7 +343,7 @@ static void visibility_delete_cb(Fl_Widget *w, void *data) { bool all = true; for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ - if(!GUI::instance()->visibility->browser->selected(i + 1)){ + if(!FlGui::instance()->visibility->browser->selected(i + 1)){ all = false; break; } @@ -353,7 +353,7 @@ static void visibility_delete_cb(Fl_Widget *w, void *data) } else{ for(int i = 0; i < VisibilityList::instance()->getNumEntities(); i++){ - if(GUI::instance()->visibility->browser->selected(i + 1)){ + if(FlGui::instance()->visibility->browser->selected(i + 1)){ Vis *v = VisibilityList::instance()->getEntity(i); GModel::current()->deletePhysicalGroup(v->getDim(), v->getTag()); } @@ -381,37 +381,37 @@ static void visibility_sort_cb(Fl_Widget *w, void *data) if(val == 0) { // select or deselect everything int selectall = 0; - for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++) - if(!GUI::instance()->visibility->browser->selected(i + 1)) { + for(int i = 0; i < FlGui::instance()->visibility->browser->size(); i++) + if(!FlGui::instance()->visibility->browser->selected(i + 1)) { selectall = 1; break; } if(selectall) - for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++) - GUI::instance()->visibility->browser->select(i + 1); + for(int i = 0; i < FlGui::instance()->visibility->browser->size(); i++) + FlGui::instance()->visibility->browser->select(i + 1); else - GUI::instance()->visibility->browser->deselect(); + FlGui::instance()->visibility->browser->deselect(); } else if(val == -1){ // invert the selection - int *state = new int[GUI::instance()->visibility->browser->size()]; - for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++) - state[i] = GUI::instance()->visibility->browser->selected(i + 1); - GUI::instance()->visibility->browser->deselect(); - for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++) - if(!state[i]) GUI::instance()->visibility->browser->select(i + 1); + int *state = new int[FlGui::instance()->visibility->browser->size()]; + for(int i = 0; i < FlGui::instance()->visibility->browser->size(); i++) + state[i] = FlGui::instance()->visibility->browser->selected(i + 1); + FlGui::instance()->visibility->browser->deselect(); + for(int i = 0; i < FlGui::instance()->visibility->browser->size(); i++) + if(!state[i]) FlGui::instance()->visibility->browser->select(i + 1); delete [] state; } else if(val == -2){ // create new parameter name for selection - for(int i = 0; i < GUI::instance()->visibility->browser->size(); i++){ - if(GUI::instance()->visibility->browser->selected(i + 1)){ + for(int i = 0; i < FlGui::instance()->visibility->browser->size(); i++){ + if(FlGui::instance()->visibility->browser->selected(i + 1)){ static char tmpstr[256]; sprintf(tmpstr, "%d", VisibilityList::instance()->getTag(i)); - GUI::instance()->geoContext->input[1]->value(tmpstr); + FlGui::instance()->geoContext->input[1]->value(tmpstr); break; } } - GUI::instance()->geoContext->input[0]->value("NewName"); - GUI::instance()->geoContext->show(0); + FlGui::instance()->geoContext->input[0]->value("NewName"); + FlGui::instance()->geoContext->show(0); } else { // set new sorting mode VisibilityList::instance()->setSortMode(val); @@ -541,15 +541,15 @@ static void _rebuild_tree_browser(bool force) GModel::list[i]->getNumVertices(); } if(numEnt > 10000){ - GUI::instance()->visibility->tree->hide(); - GUI::instance()->visibility->tree_create->show(); + FlGui::instance()->visibility->tree->hide(); + FlGui::instance()->visibility->tree_create->show(); return; } } - GUI::instance()->visibility->tree_create->hide(); - GUI::instance()->visibility->tree->show(); - GUI::instance()->visibility->tree->clear(); + FlGui::instance()->visibility->tree_create->hide(); + FlGui::instance()->visibility->tree->show(); + FlGui::instance()->visibility->tree->clear(); char str[128]; for(unsigned int i = 0; i < GModel::list.size(); i++){ @@ -558,7 +558,7 @@ static void _rebuild_tree_browser(bool force) s += m->getName() + ">>"; if(m == GModel::current()) s += " (Active)"; sprintf(str, "Model [%d] %s/", i, s.c_str()); - Flu_Tree_Browser::Node *n = GUI::instance()->visibility->tree->add(str); + Flu_Tree_Browser::Node *n = FlGui::instance()->visibility->tree->add(str); if(m->getVisibility()) n->select(true); Flu_Tree_Browser::Node *e = n->add("Elementary entities/"); e->select(true); @@ -597,7 +597,7 @@ static void _recur_set_visible(Flu_Tree_Browser::Node *n) { if(n->user_data() && n->selected()){ GEntity *ge = (GEntity*)n->user_data(); - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + bool recursive = FlGui::instance()->visibility->butt[0]->value() ? true : false; ge->setVisibility(1, recursive); // force this: if we ask to see an entity, let's assume that we // don't want the whole model to be invisible @@ -620,8 +620,8 @@ static void _recur_update_selected(Flu_Tree_Browser::Node *n) static void visibility_tree_apply_cb(Fl_Widget *w, void *data) { CTX::instance()->mesh.changed |= (ENT_LINE | ENT_SURFACE | ENT_VOLUME); - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; - Flu_Tree_Browser::Node *root = GUI::instance()->visibility->tree->first(); + bool recursive = FlGui::instance()->visibility->butt[0]->value() ? true : false; + Flu_Tree_Browser::Node *root = FlGui::instance()->visibility->tree->first(); for(int i = 0; i < root->children(); i++){ GModel *m = GModel::list[i]; Flu_Tree_Browser::Node *n = root->child(i); @@ -683,15 +683,15 @@ void visibility_cb(Fl_Widget *w, void *data) // accordingly const char *str = (const char*)data; if(str && !strcmp(str, "redraw_only")) - GUI::instance()->visibility->show(true); + FlGui::instance()->visibility->show(true); else - GUI::instance()->visibility->show(false); + FlGui::instance()->visibility->show(false); _rebuild_list_browser(); #if defined(HAVE_TREE_BROWSER) _rebuild_tree_browser(false); #endif - GUI::instance()->visibility->updatePerWindow(true); + FlGui::instance()->visibility->updatePerWindow(true); } static void visibility_save_cb(Fl_Widget *w, void *data) @@ -823,7 +823,7 @@ static void _apply_visibility(char mode, bool physical, std::vector<GRegion*> ®ions, std::vector<MElement*> &elements) { - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + bool recursive = FlGui::instance()->visibility->butt[0]->value() ? true : false; if(mode == 1){ // when showing a single entity, first hide everything if(CTX::instance()->pickElements) @@ -869,9 +869,9 @@ static void _apply_visibility(char mode, bool physical, _set_visibility_by_number(9, regions[i]->physicals[j], mode, recursive); } } - int pos = GUI::instance()->visibility->browser->position(); + int pos = FlGui::instance()->visibility->browser->position(); visibility_cb(NULL, (void*)"redraw_only"); - GUI::instance()->visibility->browser->position(pos); + FlGui::instance()->visibility->browser->position(pos); } static void visibility_number_cb(Fl_Widget *w, void *data) @@ -891,16 +891,16 @@ static void visibility_number_cb(Fl_Widget *w, void *data) else{ // hide val = 0; } - const char *str = GUI::instance()->visibility->input[what]->value(); + const char *str = FlGui::instance()->visibility->input[what]->value(); int num = (!strcmp(str, "all") || !strcmp(str, "*")) ? -1 : atoi(str); - bool recursive = GUI::instance()->visibility->butt[0]->value() ? true : false; + bool recursive = FlGui::instance()->visibility->butt[0]->value() ? true : false; _set_visibility_by_number(what, num, val, recursive); - int pos = GUI::instance()->visibility->browser->position(); + int pos = FlGui::instance()->visibility->browser->position(); visibility_cb(NULL, (void*)"redraw_only"); - GUI::instance()->visibility->browser->position(pos); + FlGui::instance()->visibility->browser->position(pos); Draw(); } @@ -996,14 +996,14 @@ static void visibility_interactive_cb(Fl_Widget *w, void *data) Msg::StatusBar(3, false, "Select %s\n[Press %s'q' to abort]", str.c_str(), mode ? "" : "'u' to undo or "); - char ib = GUI::instance()->selectEntity(what); + char ib = FlGui::instance()->selectEntity(what); if(ib == 'l') { // store for possible undo later - vertices = GUI::instance()->selectedVertices; - edges = GUI::instance()->selectedEdges; - faces = GUI::instance()->selectedFaces; - regions = GUI::instance()->selectedRegions; - elements = GUI::instance()->selectedElements; + vertices = FlGui::instance()->selectedVertices; + edges = FlGui::instance()->selectedEdges; + faces = FlGui::instance()->selectedFaces; + regions = FlGui::instance()->selectedRegions; + elements = FlGui::instance()->selectedElements; _apply_visibility(mode, physical, vertices, edges, faces, regions, elements); } if(ib == 'u' && !mode){ // undo only in hide mode @@ -1024,30 +1024,30 @@ static void visibility_per_window_cb(Fl_Widget *w, void *data) { std::string what = (const char*)data; if(what == "item"){ - drawContext *ctx = GUI::instance()->getCurrentOpenglWindow()->getDrawContext(); + drawContext *ctx = FlGui::instance()->getCurrentOpenglWindow()->getDrawContext(); for(unsigned int i = 0; - i < (unsigned int)GUI::instance()->visibility->per_window->size(); i++){ + i < (unsigned int)FlGui::instance()->visibility->per_window->size(); i++){ if(i < GModel::list.size()){ GModel *m = GModel::list[i]; - if(GUI::instance()->visibility->per_window->selected(i + 1)) ctx->show(m); + if(FlGui::instance()->visibility->per_window->selected(i + 1)) ctx->show(m); else ctx->hide(m); } else if(i < GModel::list.size() + PView::list.size()){ PView *v = PView::list[i - GModel::list.size()]; - if(GUI::instance()->visibility->per_window->selected(i + 1)) ctx->show(v); + if(FlGui::instance()->visibility->per_window->selected(i + 1)) ctx->show(v); else ctx->hide(v); } } } else if(what == "reset_all"){ - for(unsigned int i = 0; i < GUI::instance()->graph.size(); i++){ - for(unsigned int j = 0; j < GUI::instance()->graph[i]->gl.size(); j++){ - drawContext *ctx = GUI::instance()->graph[i]->gl[j]->getDrawContext(); + for(unsigned int i = 0; i < FlGui::instance()->graph.size(); i++){ + for(unsigned int j = 0; j < FlGui::instance()->graph[i]->gl.size(); j++){ + drawContext *ctx = FlGui::instance()->graph[i]->gl[j]->getDrawContext(); ctx->showAll(); } } - for(int i = 0; i < GUI::instance()->visibility->per_window->size(); i++) - GUI::instance()->visibility->per_window->select(i + 1); + for(int i = 0; i < FlGui::instance()->visibility->per_window->size(); i++) + FlGui::instance()->visibility->per_window->select(i + 1); } Draw(); } @@ -1365,9 +1365,9 @@ void visibilityWindow::show(bool redrawOnly) void visibilityWindow::updatePerWindow(bool force) { static openglWindow *gl = 0; - if(!force && gl == GUI::instance()->getCurrentOpenglWindow()) return; + if(!force && gl == FlGui::instance()->getCurrentOpenglWindow()) return; - gl = GUI::instance()->getCurrentOpenglWindow(); + gl = FlGui::instance()->getCurrentOpenglWindow(); drawContext *ctx = gl->getDrawContext(); per_window->clear(); diff --git a/Geo/CGNSOptions.h b/Geo/CGNSOptions.h index bbf3de832b552137727d151ad4d2493b20d742f1..5f823a70b071132196c023f64ca7474121261919 100644 --- a/Geo/CGNSOptions.h +++ b/Geo/CGNSOptions.h @@ -8,8 +8,9 @@ #ifndef _CGNSOPTIONS_H_ #define _CGNSOPTIONS_H_ -struct CGNSOptions +class CGNSOptions { + public: // Types enum CGNSLocationType { LocVertex = 0, diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c598141b3e1cc8476c223168811826835a852f1a --- /dev/null +++ b/Geo/CMakeLists.txt @@ -0,0 +1,37 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + GEntity.cpp STensor3.cpp + GVertex.cpp GEdge.cpp GFace.cpp GRegion.cpp + GEdgeLoop.cpp GEdgeCompound.cpp GFaceCompound.cpp GRegionCompound.cpp + gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp gmshSurface.cpp + OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp + discreteEdge.cpp discreteFace.cpp discreteRegion.cpp + fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp + GModel.cpp + GModelIO_Geo.cpp + GModelIO_Mesh.cpp + GModelIO_OCC.cpp + OCC_Connect.cpp + GModelIO_Fourier.cpp + GModelIO_CGNS.cpp + GModelIO_MED.cpp + ExtrudeParams.cpp + Geo.cpp + GeoStringInterface.cpp GeoInterpolation.cpp + findLinks.cpp + SOrientedBoundingBox.cpp + GeomMeshMatcher.cpp + MVertex.cpp + MFace.cpp + MElement.cpp + MLine.cpp MTriangle.cpp MQuadrangle.cpp MTetrahedron.cpp + MHexahedron.cpp MPrism.cpp MPyramid.cpp MElementCut.cpp + MZone.cpp MZoneBoundary.cpp + CellComplex.cpp ChainComplex.cpp Homology.cpp +) + +append_gmsh_src(Geo "${SRC}") diff --git a/Geo/CellComplex.cpp b/Geo/CellComplex.cpp index 12c7b6ea6baa850074af0e76a7fd557c91036a04..46eb4b36c28e16b615a6940133aeaeb5dc6f627d 100644 --- a/Geo/CellComplex.cpp +++ b/Geo/CellComplex.cpp @@ -125,7 +125,6 @@ void CellComplex::insert_cells(bool subdomain, bool boundary){ else domain = _domain; std::vector<MVertex*> vertices; - int vertex = 0; std::pair<citer, bool> insertInfo; @@ -141,7 +140,6 @@ void CellComplex::insert_cells(bool subdomain, bool boundary){ } int dim = domain.at(j)->getMeshElement(i)->getDim(); - int type = domain.at(j)->getMeshElement(i)->getTypeForMSH(); Cell* cell; if(dim == 3) cell = new ThreeSimplex(vertices, 0, subdomain, boundary); else if(dim == 2) cell = new TwoSimplex(vertices, 0, subdomain, boundary); @@ -821,7 +819,7 @@ int CellComplex::writeComplexMSH(const std::string &name){ fprintf(fp, "$Nodes\n"); - fprintf(fp, "%d\n", _domainVertices.size()); + fprintf(fp, "%d\n", (int)_domainVertices.size()); for(std::set<MVertex*, Less_MVertex>::iterator vit = _domainVertices.begin(); vit != _domainVertices.end(); vit++){ MVertex* vertex = *vit; @@ -917,7 +915,7 @@ bool CellComplex::checkCoherence(){ int ori = (*it).first; citer cit = _cells[bdCell->getDim()].find(bdCell); if(cit == lastCell(bdCell->getDim())){ - printf("Warning! Boundary cell not in cell complex! Boundary removed. \n", cell->getDim()); + printf("Warning! Boundary cell not in cell complex! Boundary removed. \n"); //printf(" "); cell->printCell(); //printf(" "); bdCell->printCell(); cell->removeBoundaryCell(bdCell); @@ -940,7 +938,7 @@ bool CellComplex::checkCoherence(){ int ori = (*it).first; citer cit = _cells[cbdCell->getDim()].find(cbdCell); if(cit == lastCell(cbdCell->getDim())){ - printf("Warning! Coboundary cell not in cell complex! Coboundary removed. \n", cell->getDim()); + printf("Warning! Coboundary cell not in cell complex! Coboundary removed. \n"); //printf(" "); cell->printCell(); //printf(" "); cbdCell->printCell(); cell->removeCoboundaryCell(cbdCell); diff --git a/Geo/CellComplex.h b/Geo/CellComplex.h index e407d31ab5e022336c9842b1cc09eaa011553cdb..ad55b013c9efe8050472a722058712f4a88dbff1 100644 --- a/Geo/CellComplex.h +++ b/Geo/CellComplex.h @@ -154,6 +154,7 @@ class Cell return ori; } } + return 0; } virtual int removeCoboundaryCell(Cell* cell, bool other=true) { for(std::list< std::pair<int, Cell*> >::iterator it = _coboundary.begin(); it != _coboundary.end(); it++){ @@ -166,6 +167,7 @@ class Cell return ori; } } + return 0; } virtual bool hasBoundary(Cell* cell){ @@ -521,7 +523,7 @@ class CombinedCell : public Cell{ if(!this->hasVertex(c2->getVertex(i)->getNum())) _v.push_back(c2->getVertex(i)); } - for(int i = 0; i < _v.size(); i++) _vs.push_back(_v.at(i)->getNum()); + for(unsigned int i = 0; i < _v.size(); i++) _vs.push_back(_v.at(i)->getNum()); std::sort(_vs.begin(), _vs.end()); _cells = c1->getCells(); @@ -608,7 +610,7 @@ class CombinedCell : public Cell{ //std::vector<int>::iterator it = std::find(_vs.begin(), _vs.end(), vertex); //if (it == _vs.end()) return false; //else return true; - for(int i = 0; i < _v.size(); i++){ + for(unsigned int i = 0; i < _v.size(); i++){ if(_v.at(i)->getNum() == vertex) return true; } return false; diff --git a/Geo/ChainComplex.cpp b/Geo/ChainComplex.cpp index 37962355a8c71e17e32c4fa94801aaac9d9c2aeb..01245f710c510a5b4ceff3391aaafb74316d5815 100644 --- a/Geo/ChainComplex.cpp +++ b/Geo/ChainComplex.cpp @@ -77,8 +77,8 @@ ChainComplex::ChainComplex(CellComplex* cellComplex){ if(!bdCell->inSubdomain()){ int old_elem = 0; //printf("cell1: %d, cell2: %d \n", bdCell->getIndex(), cell->getIndex()); - if(bdCell->getIndex() > gmp_matrix_rows( _HMatrix[dim]) || bdCell->getIndex() < 1 - || cell->getIndex() > gmp_matrix_cols( _HMatrix[dim]) || cell->getIndex() < 1){ + if(bdCell->getIndex() > (int)gmp_matrix_rows( _HMatrix[dim]) || bdCell->getIndex() < 1 + || cell->getIndex() > (int)gmp_matrix_cols( _HMatrix[dim]) || cell->getIndex() < 1){ printf("Warning: Index out of bound! HMatrix: %d. \n", dim); } else{ @@ -173,7 +173,7 @@ void ChainComplex::KerCod(int dim){ rank++; } - if(rank != gmp_matrix_cols(normalForm->canonical)){ + if(rank != (int)gmp_matrix_cols(normalForm->canonical)){ _kerH[dim] = copy_gmp_matrix(normalForm->right, 1, rank+1, gmp_matrix_rows(normalForm->right), gmp_matrix_cols(normalForm->right)); } @@ -424,7 +424,7 @@ std::vector<int> ChainComplex::getCoeffVector(int dim, int chainNumber){ std::vector<int> coeffVector; if(dim < 0 || dim > 4) return coeffVector; - if(_Hbasis[dim] == NULL || gmp_matrix_cols(_Hbasis[dim]) < chainNumber) return coeffVector; + if(_Hbasis[dim] == NULL || (int)gmp_matrix_cols(_Hbasis[dim]) < chainNumber) return coeffVector; int rows = gmp_matrix_rows(_Hbasis[dim]); @@ -448,8 +448,8 @@ std::vector<int> ChainComplex::getCoeffVector(int dim, int chainNumber){ int ChainComplex::getTorsion(int dim, int chainNumber){ if(dim < 0 || dim > 4) return 0; - if(_Hbasis[dim] == NULL || gmp_matrix_cols(_Hbasis[dim]) < chainNumber) return 0; - if(_torsion[dim].empty() || _torsion[dim].size() < chainNumber) return 1; + if(_Hbasis[dim] == NULL || (int)gmp_matrix_cols(_Hbasis[dim]) < chainNumber) return 0; + if(_torsion[dim].empty() || (int)_torsion[dim].size() < chainNumber) return 1; else return _torsion[dim].at(chainNumber-1); } @@ -459,7 +459,7 @@ Chain::Chain(std::set<Cell*, Less_Cell> cells, std::vector<int> coeffs, CellComp int i = 0; for(std::set<Cell*, Less_Cell>::iterator cit = cells.begin(); cit != cells.end(); cit++){ Cell* cell = *cit; - if(!cell->inSubdomain() && coeffs.size() > i){ + if(!cell->inSubdomain() && (int)coeffs.size() > i){ if(coeffs.at(i) != 0) _cells.push_back( std::make_pair(cell, coeffs.at(i)) ); i++; } diff --git a/Geo/ChainComplex.h b/Geo/ChainComplex.h index 1b41eb7d027564f39626bfb0292b958f59c86315..9eaf86976a1f331764d5e4fd2f91a680c51dd28e 100644 --- a/Geo/ChainComplex.h +++ b/Geo/ChainComplex.h @@ -119,7 +119,7 @@ class ChainComplex{ int getBasisSize(int dim) { if(dim > -1 && dim < 5) return gmp_matrix_cols(_Hbasis[dim]); else return 0; } int printMatrix(gmp_matrix* matrix){ - printf("%d rows and %d columns\n", gmp_matrix_rows(matrix), gmp_matrix_cols(matrix)); + printf("%d rows and %d columns\n", (int)gmp_matrix_rows(matrix), (int)gmp_matrix_cols(matrix)); return gmp_matrix_printf(matrix); } // debugging aid diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index 4ed1be50cbc542e97ab4dbc233b19b7c1ed99905..bc07fcf05ffacf66ba915f01ebe35fa94388ebd0 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -109,7 +109,7 @@ SOrientedBoundingBox GEdge::getOBB() if(getNumMeshVertices() > 0) { int N = getNumMeshVertices(); for (int i = 0; i < N; i++) { - MVertex* mv = getMeshVertex(i); + MVertex* mv = getMeshVertex(i); vertices.push_back(mv->point()); } // Don't forget to add the first and last vertices... diff --git a/Geo/GEdgeCompound.cpp b/Geo/GEdgeCompound.cpp index 2a4c65742d4aba7af5f9254894cd4ed9223545e8..ee904522a10913239ce222afc600ffaca5620584 100644 --- a/Geo/GEdgeCompound.cpp +++ b/Geo/GEdgeCompound.cpp @@ -66,8 +66,8 @@ void GEdgeCompound::orderEdges() firstEdge = (tempv.begin())->second; for (std::list<GEdge*>::iterator it = edges.begin() ; it != edges.end() ; ++it){ if (*it == firstEdge){ - edges.erase(it); - break; + edges.erase(it); + break; } } } @@ -95,36 +95,36 @@ void GEdgeCompound::orderEdges() GEdge *e = *it; std::list<GEdge*>::iterator itp; if (e->getBeginVertex() == last){ - _c.push_back(e); - itp = it; - it++; - edges.erase(itp); - _orientation.push_back(1); - last = e->getEndVertex(); - found = true; - break; + _c.push_back(e); + itp = it; + it++; + edges.erase(itp); + _orientation.push_back(1); + last = e->getEndVertex(); + found = true; + break; } else if (e->getEndVertex() == last){ - _c.push_back(e); - itp = it; - it++; - edges.erase(itp); - _orientation.push_back(0); - last = e->getBeginVertex(); - found = true; - break; + _c.push_back(e); + itp = it; + it++; + edges.erase(itp); + _orientation.push_back(0); + last = e->getBeginVertex(); + found = true; + break; } } if (!found){ if (_c.size() == 1 && _orientation[0]){ - GVertex *temp = first; - first = last; - last = temp; - _orientation[0] = 0; + GVertex *temp = first; + first = last; + last = temp; + _orientation[0] = 0; } else { - Msg::Error("Compound Edge %d is wrong",tag()); - return; + Msg::Error("Compound Edge %d is wrong",tag()); + return; } } } @@ -148,7 +148,7 @@ void GEdgeCompound::orderEdges() int GEdgeCompound::minimumMeshSegments() const { int N = 0; - for (int i=0;i<_compound.size();i++)N +=_compound[i]->minimumMeshSegments(); + for (unsigned int i = 0; i < _compound.size(); i++) N +=_compound[i]->minimumMeshSegments(); return 3; } @@ -176,8 +176,8 @@ Range<double> GEdgeCompound::parBounds(int i) const */ void GEdgeCompound::getLocalParameter ( const double &t, - int &iEdge, - double & tLoc) const + int &iEdge, + double & tLoc) const { for (iEdge = 0; iEdge < (int)_compound.size(); iEdge++){ @@ -187,8 +187,8 @@ void GEdgeCompound::getLocalParameter ( const double &t, if (t >= tmin && t <= tmax){ Range<double> b = _compound[iEdge]->parBounds(0); tLoc = _orientation[iEdge] ? - b.low() + (t-tmin)/(tmax-tmin) * (b.high()-b.low()) : - b.high() - (t-tmin)/(tmax-tmin) * (b.high()-b.low()) ; + b.low() + (t-tmin)/(tmax-tmin) * (b.high()-b.low()) : + b.high() - (t-tmin)/(tmax-tmin) * (b.high()-b.low()) ; //printf("bhigh=%g, blow=%g, global t=%g , tLoc=%g ,iEdge=%d\n",b.high(), b.low(), t,tLoc,iEdge); return; } diff --git a/Geo/GEdgeCompound.h b/Geo/GEdgeCompound.h index 0e5a272b6e3b2d2f1eec888ae7fdd46f9b2eefb3..8c94f76161d4768f780cd696098e92f7ec84d294 100644 --- a/Geo/GEdgeCompound.h +++ b/Geo/GEdgeCompound.h @@ -21,12 +21,8 @@ class GEdgeCompound : public GEdge { void parametrize() ; void orderEdges() ; public: - void getLocalParameter ( const double &t, - int &iEdge, - double & tLoc) const; - void getCompoundParameter ( GEdge *ge, - const double &tLoc, - double &t) const; + void getLocalParameter(const double &t, int &iEdge, double & tLoc) const; + void getCompoundParameter(GEdge *ge, const double &tLoc, double &t) const; GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound); virtual ~GEdgeCompound(); Range<double> parBounds(int i) const; diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp index 3481457b3adb4ae9a9db3569b9086811c42c4460..ebdd475bfccf36f36eba3d9c2e7282e9f3a67b3e 100644 --- a/Geo/GEdgeLoop.cpp +++ b/Geo/GEdgeLoop.cpp @@ -11,7 +11,7 @@ void GEdgeSigned::print() const { Msg::Info("GEdgeSigned : Edge %d sign %d Ordered Vertices %d,%d", - ge->tag(), _sign, getBeginVertex()->tag(), getEndVertex()->tag()); + ge->tag(), _sign, getBeginVertex()->tag(), getEndVertex()->tag()); } int countInList(std::list<GEdge*> &wire, GEdge *ge) diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index 6575cbb00a20c7a0c1414e235b09ed25b4ff91d4..242039a1079c726ca9e609fcaa9cb21e6829330a 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -156,16 +156,16 @@ SOrientedBoundingBox GFace::getOBB() if(getNumMeshVertices() > 0) { int N = getNumMeshVertices(); for (int i = 0; i < N; i++) { - MVertex* mv = getMeshVertex(i); + MVertex* mv = getMeshVertex(i); vertices.push_back(mv->point()); } std::list<GEdge*> eds = edges(); for(std::list<GEdge*>::iterator ed = eds.begin(); ed != eds.end(); ed++) { - int N2 = (*ed)->getNumMeshVertices(); + int N2 = (*ed)->getNumMeshVertices(); for (int i = 0; i < N2; i++) { - MVertex* mv = (*ed)->getMeshVertex(i); + MVertex* mv = (*ed)->getMeshVertex(i); vertices.push_back(mv->point()); - } + } // Don't forget to add the first and last vertices... SPoint3 pt1((*ed)->getBeginVertex()->x(), (*ed)->getBeginVertex()->y(), @@ -174,7 +174,7 @@ SOrientedBoundingBox GFace::getOBB() (*ed)->getEndVertex()->y(), (*ed)->getEndVertex()->z()); vertices.push_back(pt1); - vertices.push_back(pt2); + vertices.push_back(pt2); } } else if(buildSTLTriangulation()) { @@ -455,13 +455,13 @@ end: Msg::Debug("Surface: %d", tag()); Msg::Debug("SVD : %g,%g,%g (min=%d)", svd[0], svd[1], svd[2], min); Msg::Debug("Plane : (%g x + %g y + %g z = %g)", - meanPlane.a, meanPlane.b, meanPlane.c, meanPlane.d); + meanPlane.a, meanPlane.b, meanPlane.c, meanPlane.d); Msg::Debug("Normal : (%g , %g , %g )", - meanPlane.a, meanPlane.b, meanPlane.c); + meanPlane.a, meanPlane.b, meanPlane.c); Msg::Debug("t1 : (%g , %g , %g )", t1[0], t1[1], t1[2]); Msg::Debug("t2 : (%g , %g , %g )", t2[0], t2[1], t2[2]); Msg::Debug("pt : (%g , %g , %g )", - meanPlane.x, meanPlane.y, meanPlane.z); + meanPlane.x, meanPlane.y, meanPlane.z); //check coherence for plane surfaces if(geomType() == Plane) { @@ -930,9 +930,9 @@ SPoint2 GFace::geodesic(const SPoint2 &pt1 , const SPoint2 &pt2 , double t) GPoint gp2 = point(pt2.x(), pt2.y()); SPoint2 guess = pt1 + (pt2 - pt1) * t; GPoint gp = closestPoint(SPoint3(gp1.x() + t * (gp2.x() - gp1.x()), - gp1.y() + t * (gp2.y() - gp1.y()), - gp1.z() + t * (gp2.z() - gp1.z())), - (double*)guess); + gp1.y() + t * (gp2.y() - gp1.y()), + gp1.z() + t * (gp2.z() - gp1.z())), + (double*)guess); if (gp.g()) return SPoint2(gp.u(), gp.v()); else @@ -969,17 +969,16 @@ int GFace::poincareMesh() { std::set<MEdge, Less_Edge> es; std::set<MVertex*> vs; - for (int i=0; i<getNumMeshElements() ; i++){ + for(unsigned int i = 0; i < getNumMeshElements(); i++){ MElement *e = getMeshElement(i); - for (int j=0;j<e->getNumVertices();j++)vs.insert(e->getVertex(j)); - for (int j=0;j<e->getNumEdges();j++)es.insert(e->getEdge(j)); + for(int j = 0; j < e->getNumVertices(); j++) vs.insert(e->getVertex(j)); + for(int j = 0; j < e->getNumEdges(); j++) es.insert(e->getEdge(j)); } - return vs.size() - es.size() + getNumMeshElements(); + return vs.size() - es.size() + getNumMeshElements(); } int GFace::genusGeom() { - int G = 0; int nSeams = 0; std::set<GEdge*> single_seams; for (std::list<GEdge*>::iterator it = l_edges.begin(); diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 319ace6f840a0ca66fcc41012796fbba293213b2..80ed8ab29f502cd7b8b8efc2f3e2e0d6dc195de7 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -61,7 +61,7 @@ private: mutable std::map<MVertex*, SPoint3> _coordinates; public: gmshDistanceBasedDiffusivity (std::map<MVertex*,SPoint3> &coordinates) - : _current (0),_coordinates(coordinates), comp(0){} + : comp(0), _current (0), _coordinates(coordinates) {} void setCurrent (MElement *current){ _current = current; } void setCompound(int compound){ comp = compound; } virtual double operator () (double x, double y, double z) const @@ -73,7 +73,7 @@ public: const SPoint3 p = _coordinates[_current->getVertex(i)]; value[i] = p[2]; } - double val = _current->interpolate(value, uvw[0], uvw[1], uvw[2]); + //double val = _current->interpolate(value, uvw[0], uvw[1], uvw[2]); //return 1./(exp(x)+1.e-4);//exp(5*val); return 1.0; //printf("compiound =%d \n", comp); @@ -180,12 +180,12 @@ static void computeCGKernelPolygon(std::map<MVertex*,SPoint3> &coordinates, std: c=(y4-y3)/(x4-x3); b=y1-a*x1; d=y3-c*x3; - if (std::abs(a-c) > 1.e-5 & x2!=x1 & x4 !=x3 & jnext != i){ + if (std::abs(a-c) > 1.e-5 && x2!=x1 && x4 !=x3 && jnext != i){ x=(d-b)/(a-c); y=a*x+b; bool exist= false; - for (int k= 1; k < setP.size(); k++){ - if (x == u(k,0) & y == u(k,1)) exist = true; + for (unsigned int k= 1; k < setP.size(); k++){ + if (x == u(k,0) && y == u(k,1)) exist = true; } if (!exist){ //printf("---> intersection (%d)=%g %g %g %g\n", N, x, y, a, c); @@ -255,8 +255,6 @@ static void myPolygon(std::vector<MElement*> &vTri, std::vector<MVertex*> &vPoly MTriangle *t = (MTriangle*) vTri[i]; for (int iEdge = 0; iEdge < 3; iEdge++) { MEdge tmp_edge = t->getEdge(iEdge); - MVertex *vB = tmp_edge.getVertex(0); - MVertex *vE = tmp_edge.getVertex(1); if (std::find(ePoly.begin(), ePoly.end(), tmp_edge) == ePoly.end()) ePoly.push_back(tmp_edge); else @@ -312,9 +310,8 @@ bool GFaceCompound::trivial() const { bool GFaceCompound::checkOrientation() const { - double U1, V1, U2,V2, U3,V3; std::list<GFace*>::const_iterator it = _compound.begin(); - double a_old, a_new; + double a_old = 0, a_new; bool oriented = true; int iter = 0; for ( ; it != _compound.end(); ++it){ @@ -357,8 +354,8 @@ bool GFaceCompound::checkCavity(std::vector<MElement*> &vTri) const{ bool badCavity = false; - int nbV = vTri.size(); - double a_old, a_new; + unsigned int nbV = vTri.size(); + double a_old = 0, a_new; for (unsigned int i = 0; i < nbV; ++i){ MTriangle *t = (MTriangle*) vTri[i]; SPoint3 v1 = coordinates[t->getVertex(0)]; @@ -708,7 +705,7 @@ SPoint2 GFaceCompound::getCoordinates(MVertex *v) const int j = 0; tL=tB; bool found = false; - while (j < ge->mesh_vertices.size()){ + while (j < (int)ge->mesh_vertices.size()){ vR = ge->mesh_vertices[j]; vR->getParameter(0,tR); if (!vR->getParameter(0,tR)) { @@ -751,6 +748,8 @@ SPoint2 GFaceCompound::getCoordinates(MVertex *v) const return SPoint2(uloc,vloc); } } + // never here + return SPoint2(0, 0); } void GFaceCompound::parametrize(iterationStep step) const @@ -1018,7 +1017,7 @@ Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 ¶m) const } parametrize(); - double U,V,UDU,UDV,VDU,VDV; + double U,V; GFaceCompoundTriangle *lt; getTriangle (param.x(), param.y(), <, U,V); if (!lt) @@ -1269,9 +1268,9 @@ void GFaceCompound::printStuff() const t->getVertex(1)->x(), t->getVertex(1)->y(), t->getVertex(1)->z(), t->getVertex(2)->x(), t->getVertex(2)->y(), t->getVertex(2)->z(), it0->second.x(),it1->second.x(),it2->second.x()); - double K1 = curvature(t,it0->second.x(),it0->second.y()); - double K2 = curvature(t,it1->second.x(),it1->second.y()); - double K3 = curvature(t,it2->second.x(),it2->second.y()); + //double K1 = curvature(t,it0->second.x(),it0->second.y()); + //double K2 = curvature(t,it1->second.x(),it1->second.y()); + //double K3 = curvature(t,it2->second.x(),it2->second.y()); // const double K = fabs(curvature (t)); fprintf(xyzc,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g};\n", t->getVertex(0)->x(), t->getVertex(0)->y(), t->getVertex(0)->z(), diff --git a/Geo/GFaceCompound.h b/Geo/GFaceCompound.h index 7974e302f2317c88d1f9b3654c816886611c39c7..e9426e14f0a806a5ec75dcb4b4cf694c6024ab14 100644 --- a/Geo/GFaceCompound.h +++ b/Geo/GFaceCompound.h @@ -74,11 +74,11 @@ class GFaceCompound : public GFace { public: typedef enum {UNITCIRCLE, SQUARE} typeOfIsomorphism; GFaceCompound(GModel *m, int tag, - std::list<GFace*> &compound, - std::list<GEdge*> &U0, - std::list<GEdge*> &U1, - std::list<GEdge*> &V0, - std::list<GEdge*> &V1); + std::list<GFace*> &compound, + std::list<GEdge*> &U0, + std::list<GEdge*> &U1, + std::list<GEdge*> &V0, + std::list<GEdge*> &V1); virtual ~GFaceCompound(); Range<double> parBounds(int i) const { return trivial() ? (*(_compound.begin()))->parBounds(i) : Range<double>(-1, 1); } virtual GPoint point(double par1, double par2) const; diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index a550b38a4aa4ebcaa33afe0f26325f4e032fe283..6c28aaa22764d211bd24525e413d803d72e39f87 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -206,8 +206,8 @@ void GModel::snapVertices() t = parb.high(); } else{ - Msg::Error("Weird vertex: impossible to snap"); - break; + Msg::Error("Weird vertex: impossible to snap"); + break; } GPoint gp = (*it)->point(t); double d = sqrt((gp.x() - (*vit)->x()) * (gp.x() - (*vit)->x()) + @@ -216,7 +216,7 @@ void GModel::snapVertices() if (d > tol){ (*vit)->setPosition(gp); Msg::Warning("Geom Vertex %d Corrupted (%12.5E)... Snap performed", - (*vit)->tag(), d); + (*vit)->tag(), d); } } vit++; @@ -252,7 +252,7 @@ void GModel::getPhysicalGroups(std::map<int, std::vector<GEntity*> > groups[4]) // should be "reversed" int p = std::abs(entities[i]->physicals[j]); if(std::find(group[p].begin(), group[p].end(), entities[i]) == group[p].end()) - group[p].push_back(entities[i]); + group[p].push_back(entities[i]); } } } @@ -274,7 +274,7 @@ void GModel::deletePhysicalGroup(int dim, int num) std::vector<int> p; for(unsigned int j = 0; j < entities[i]->physicals.size(); j++) if(entities[i]->physicals[j] != num) - p.push_back(entities[i]->physicals[j]); + p.push_back(entities[i]->physicals[j]); entities[i]->physicals = p; } } @@ -360,18 +360,18 @@ int GModel::getMeshStatus(bool countDiscrete) { for(riter it = firstRegion(); it != lastRegion(); ++it) if((countDiscrete || ((*it)->geomType() != GEntity::DiscreteVolume && - (*it)->meshAttributes.Method != MESH_NONE)) && + (*it)->meshAttributes.Method != MESH_NONE)) && ((*it)->tetrahedra.size() ||(*it)->hexahedra.size() || (*it)->prisms.size() || (*it)->pyramids.size() || (*it)->polyhedra.size())) return 3; for(fiter it = firstFace(); it != lastFace(); ++it) if((countDiscrete || ((*it)->geomType() != GEntity::DiscreteSurface && - (*it)->meshAttributes.Method != MESH_NONE)) && + (*it)->meshAttributes.Method != MESH_NONE)) && ((*it)->triangles.size() || (*it)->quadrangles.size() || (*it)->polygons.size())) return 2; for(eiter it = firstEdge(); it != lastEdge(); ++it) if((countDiscrete || ((*it)->geomType() != GEntity::DiscreteCurve && - (*it)->meshAttributes.Method != MESH_NONE)) && + (*it)->meshAttributes.Method != MESH_NONE)) && (*it)->lines.size()) return 1; for(viter it = firstVertex(); it != lastVertex(); ++it) if((*it)->mesh_vertices.size()) return 0; @@ -459,16 +459,16 @@ MElement *GModel::getMeshElementByCoord(SPoint3 &p) SBoundingBox3d bb = bounds(); double min[3] = {bb.min().x(), bb.min().y(), bb.min().z()}; double size[3] = {bb.max().x() - bb.min().x(), - bb.max().y() - bb.min().y(), - bb.max().z() - bb.min().z()}; + bb.max().y() - bb.min().y(), + bb.max().z() - bb.min().z()}; const int maxElePerBucket = 100; // memory vs. speed trade-off _octree = Octree_Create(maxElePerBucket, min, size, - MElementBB, MElementCentroid, MElementInEle); + MElementBB, MElementCentroid, MElementInEle); std::vector<GEntity*> entities; getEntities(entities); for(unsigned int i = 0; i < entities.size(); i++) for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++) - Octree_Insert(entities[i]->getMeshElement(j), _octree); + Octree_Insert(entities[i]->getMeshElement(j), _octree); Octree_Arrange(_octree); } double P[3] = {p.x(), p.y(), p.z()}; @@ -489,15 +489,15 @@ MVertex *GModel::getMeshVertexByTag(int n) // numbering starts at 1 _vertexVectorCache.resize(MVertex::getGlobalNumber() + 1); for(unsigned int i = 0; i < entities.size(); i++) - for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) - _vertexVectorCache[entities[i]->mesh_vertices[j]->getNum()] = - entities[i]->mesh_vertices[j]; + for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) + _vertexVectorCache[entities[i]->mesh_vertices[j]->getNum()] = + entities[i]->mesh_vertices[j]; } else{ for(unsigned int i = 0; i < entities.size(); i++) - for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) - _vertexMapCache[entities[i]->mesh_vertices[j]->getNum()] = - entities[i]->mesh_vertices[j]; + for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) + _vertexMapCache[entities[i]->mesh_vertices[j]->getNum()] = + entities[i]->mesh_vertices[j]; } } @@ -523,9 +523,9 @@ void GModel::getMeshVerticesForPhysicalGroup(int dim, int num, std::vector<MVert } else{ for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){ - MElement *e = entities[i]->getMeshElement(j); - for(int k = 0; k < e->getNumVertices(); k++) - sv.insert(e->getVertex(k)); + MElement *e = entities[i]->getMeshElement(j); + for(int k = 0; k < e->getNumVertices(); k++) + sv.insert(e->getVertex(k)); } } } @@ -587,15 +587,15 @@ int GModel::indexMeshVertices(bool all) for(unsigned int i = 0; i < entities.size(); i++) if(all || entities[i]->physicals.size()) for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++) - for(int k = 0; k < entities[i]->getMeshElement(j)->getNumVertices(); k++) - entities[i]->getMeshElement(j)->getVertex(k)->setIndex(0); + for(int k = 0; k < entities[i]->getMeshElement(j)->getNumVertices(); k++) + entities[i]->getMeshElement(j)->getVertex(k)->setIndex(0); // renumber all the mesh vertices tagged with 0 int numVertices = 0; for(unsigned int i = 0; i < entities.size(); i++) for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++) if(!entities[i]->mesh_vertices[j]->getIndex()) - entities[i]->mesh_vertices[j]->setIndex(++numVertices); + entities[i]->mesh_vertices[j]->setIndex(++numVertices); return numVertices; } @@ -656,8 +656,8 @@ void GModel::_storeElementsInEntities(std::map<int, std::vector<MElement*> > &ma v = new discreteVertex(this, it->first); add(v); } - if(v->points.empty()) // CAD points already have one by default - _addElements(v->points, it->second); + if(v->points.empty()) // CAD points already have one by default + _addElements(v->points, it->second); } break; case TYPE_LIN: @@ -706,8 +706,8 @@ static void _associateEntityWithElementVertices(GEntity *ge, std::vector<T*> &el for(unsigned int i = 0; i < elements.size(); i++) for(int j = 0; j < elements[i]->getNumVertices(); j++){ if (!elements[i]->getVertex(j)->onWhat() || - elements[i]->getVertex(j)->onWhat()->dim() > ge->dim()){ - elements[i]->getVertex(j)->setEntity(ge); + elements[i]->getVertex(j)->onWhat()->dim() > ge->dim()){ + elements[i]->getVertex(j)->setEntity(ge); } } } @@ -746,7 +746,7 @@ void GModel::_storeVerticesInEntities(std::map<int, MVertex*> &vertices) GEntity *ge = v->onWhat(); if(ge){ if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points - ge->mesh_vertices.push_back(v); + ge->mesh_vertices.push_back(v); } } else @@ -761,9 +761,9 @@ void GModel::_storeVerticesInEntities(std::vector<MVertex*> &vertices) if(v){ // the vector is allowed to have null entries GEntity *ge = v->onWhat(); if(ge) { - if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points - ge->mesh_vertices.push_back(v); - } + if(ge->dim() || ge->mesh_vertices.empty()){ // special case for points + ge->mesh_vertices.push_back(v); + } } else delete v; // we delete all unused vertices @@ -792,16 +792,16 @@ void GModel::checkMeshCoherence(double tolerance) int num = 0; for(unsigned int i = 0; i < entities.size(); i++){ for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++){ - MVertex *v = entities[i]->mesh_vertices[j]; - std::set<MVertex*, MVertexLessThanLexicographic>::iterator it = pos.find(v); - if(it == pos.end()){ - pos.insert(v); - } - else{ - Msg::Info("Vertices %d and %d have identical position (%g, %g, %g)", - (*it)->getNum(), v->getNum(), v->x(), v->y(), v->z()); - num++; - } + MVertex *v = entities[i]->mesh_vertices[j]; + std::set<MVertex*, MVertexLessThanLexicographic>::iterator it = pos.find(v); + if(it == pos.end()){ + pos.insert(v); + } + else{ + Msg::Info("Vertices %d and %d have identical position (%g, %g, %g)", + (*it)->getNum(), v->getNum(), v->x(), v->y(), v->z()); + num++; + } } } if(num) Msg::Warning("%d duplicate vertices", num); @@ -816,25 +816,25 @@ void GModel::checkMeshCoherence(double tolerance) int num = 0; for(unsigned int i = 0; i < entities.size(); i++){ for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){ - MElement *e = entities[i]->getMeshElement(j); - std::set<MElement*, MElementLessThanLexicographic>::iterator it = pos.find(e); - if(it == pos.end()){ - pos.insert(e); - } - else{ - std::ostringstream sstream; - sstream << "Element " << e->getNum() << " [ "; - for (int k = 0; k < e->getNumVertices(); k++) - sstream << e->getVertex(k)->getNum() << " "; - sstream << "] on entity " << entities[i]->tag() - << " has same barycenter as element " << (*it)->getNum() - << " [ "; - for (int k = 0; k < (*it)->getNumVertices(); k++) - sstream << (*it)->getVertex(k)->getNum() << " "; - sstream << "]"; - Msg::Info("%s", sstream.str().c_str()); - num++; - } + MElement *e = entities[i]->getMeshElement(j); + std::set<MElement*, MElementLessThanLexicographic>::iterator it = pos.find(e); + if(it == pos.end()){ + pos.insert(e); + } + else{ + std::ostringstream sstream; + sstream << "Element " << e->getNum() << " [ "; + for (int k = 0; k < e->getNumVertices(); k++) + sstream << e->getVertex(k)->getNum() << " "; + sstream << "] on entity " << entities[i]->tag() + << " has same barycenter as element " << (*it)->getNum() + << " [ "; + for (int k = 0; k < (*it)->getNumVertices(); k++) + sstream << (*it)->getVertex(k)->getNum() << " "; + sstream << "]"; + Msg::Info("%s", sstream.str().c_str()); + num++; + } } } if(num) Msg::Warning("%d duplicate elements", num); @@ -1005,11 +1005,11 @@ void GModel::createTopologyFromMesh() std::vector<int> tagFaces2 = itmap->second; if (tagFaces2 == tagFaces){ - myEdges.push_back(itmap->first); - map_edges.erase(itmap++); + myEdges.push_back(itmap->first); + map_edges.erase(itmap++); } else - itmap++; + itmap++; } //if the loaded mesh already contains discrete Edges @@ -1022,42 +1022,42 @@ void GModel::createTopologyFromMesh() //printf(" !!! discrete edges already exist %d \n", myEdges.size()); std::vector<int> tagEdges; if ( myEdges.size() == 1){ - for (std::vector<discreteEdge*>::iterator edge = Dedges.begin(); edge != Dedges.end(); edge++){ - (*edge)->createTopo(); - if( ( (*edge)->getBeginVertex()->mesh_vertices[0] == myEdges[0].getVertex(0) && - (*edge)->getEndVertex()->mesh_vertices[0] == myEdges[0].getVertex(1) ) || - ( (*edge)->getBeginVertex()->mesh_vertices[0] == myEdges[0].getVertex(1) && - (*edge)->getEndVertex()->mesh_vertices[0] == myEdges[0].getVertex(0) )){ - //printf("**********add tagedge =%d \n", (*edge)->tag()); - tagEdges.push_back((*edge)->tag()); - } - } + for (std::vector<discreteEdge*>::iterator edge = Dedges.begin(); edge != Dedges.end(); edge++){ + (*edge)->createTopo(); + if( ( (*edge)->getBeginVertex()->mesh_vertices[0] == myEdges[0].getVertex(0) && + (*edge)->getEndVertex()->mesh_vertices[0] == myEdges[0].getVertex(1) ) || + ( (*edge)->getBeginVertex()->mesh_vertices[0] == myEdges[0].getVertex(1) && + (*edge)->getEndVertex()->mesh_vertices[0] == myEdges[0].getVertex(0) )){ + //printf("**********add tagedge =%d \n", (*edge)->tag()); + tagEdges.push_back((*edge)->tag()); + } + } } else { - for(unsigned int i = 0; i < myEdges.size(); i++){ - if (myEdges[i].getVertex(0)->onWhat()->dim() == 1) { - int tagEdge = myEdges[i].getVertex(0)->onWhat()->tag(); - //printf("tagedge =%d \n", tagEdge); - std::vector<int>::iterator itv = std::find(tagEdges.begin(), tagEdges.end(), tagEdge); - if (itv == tagEdges.end()) { - tagEdges.push_back(tagEdge); - } - } - } + for(unsigned int i = 0; i < myEdges.size(); i++){ + if (myEdges[i].getVertex(0)->onWhat()->dim() == 1) { + int tagEdge = myEdges[i].getVertex(0)->onWhat()->tag(); + //printf("tagedge =%d \n", tagEdge); + std::vector<int>::iterator itv = std::find(tagEdges.begin(), tagEdges.end(), tagEdge); + if (itv == tagEdges.end()) { + tagEdges.push_back(tagEdge); + } + } + } } for (std::vector<int>::iterator itFace = tagFaces.begin(); itFace != tagFaces.end(); itFace++) { - std::map<int, std::vector<int> >::iterator it = face2Edges.find(*itFace); - if (it == face2Edges.end()) { - std::vector<int> allEdges; - allEdges.insert(allEdges.begin(), tagEdges.begin(), tagEdges.end()); - face2Edges.insert(std::make_pair(*itFace,allEdges)); - } - else{ - std::vector<int> allEdges = it->second; - allEdges.insert(allEdges.begin(), tagEdges.begin(), tagEdges.end()); - it->second = allEdges; - } - face2Edges.insert(std::make_pair(*itFace, tagEdges)); + std::map<int, std::vector<int> >::iterator it = face2Edges.find(*itFace); + if (it == face2Edges.end()) { + std::vector<int> allEdges; + allEdges.insert(allEdges.begin(), tagEdges.begin(), tagEdges.end()); + face2Edges.insert(std::make_pair(*itFace,allEdges)); + } + else{ + std::vector<int> allEdges = it->second; + allEdges.insert(allEdges.begin(), tagEdges.begin(), tagEdges.end()); + it->second = allEdges; + } + face2Edges.insert(std::make_pair(*itFace, tagEdges)); } //printf(" !!! END discrete edges already exist %d \n", myEdges.size()); } @@ -1067,98 +1067,98 @@ void GModel::createTopologyFromMesh() //for each actual GEdge while (! myEdges.empty()) { - std::vector<MEdge> myLines; - myLines.clear(); - std::vector<MEdge>::iterator it = myEdges.begin(); - - MVertex *vB = (*it).getVertex(0); - MVertex *vE = (*it).getVertex(1); - myLines.push_back(*it); - myEdges.erase(it); - it++; - - //printf("***candidate mline %d %d of size %d \n", vB->getNum(), vE->getNum(), myEdges.size()); - - for (int i=0; i<2; i++) { - - std::vector<MEdge>::iterator it= myEdges.begin() ; - while (it != myEdges.end()){ - MVertex *v1 = (*it).getVertex(0); - MVertex *v2 = (*it).getVertex(1); - //printf("mline %d %d \n", v1->getNum(), v2->getNum()); - - std::vector<MEdge>::iterator itp; - if ( v1 == vE ){ - //printf("->v1 = vE push back this mline \n"); - myLines.push_back(*it); - myEdges.erase(it); - vE = v2; - i = -1; - } - else if ( v2 == vE){ - //printf("->v2 = VE push back this mline \n"); - myLines.push_back(*it); - myEdges.erase(it); - vE = v1; - i=-1; - } - else it++; - - } - //printf("end Edges \n"); - - if (vB == vE) break; - - if (myEdges.empty()) break; - - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); - MVertex *temp = vB; - vB = vE; - vE = temp; - //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); - - } - - //printf("************ CANDIDATE NEW EDGE with num =%d size=%d\n", num, myLines.size()); - //for (std::vector<MEdge>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ - // MVertex *v1 = (*it).getVertex(0); - // MVertex *v2 = (*it).getVertex(1); - // printf("Line %d %d \n", v1->getNum(), v2->getNum()); - //} - discreteEdge *e = new discreteEdge(this, num, 0, 0); - add(e); - Dedges.push_back(e); - std::list<MVertex*> all_vertices; - for(unsigned int i = 0; i < myLines.size(); i++) { - MVertex *v0 = myLines[i].getVertex(0); - MVertex *v1 = myLines[i].getVertex(1); - e->lines.push_back(new MLine( v0, v1)); - if (std::find(all_vertices.begin(), all_vertices.end(), v0) == all_vertices.end()) all_vertices.push_back(v0); - if (std::find(all_vertices.begin(), all_vertices.end(), v1) == all_vertices.end()) all_vertices.push_back(v1); - } - e->mesh_vertices.insert(e->mesh_vertices.begin(), all_vertices.begin(), all_vertices.end()); - - for (std::vector<int>::iterator itFace = tagFaces.begin(); itFace != tagFaces.end(); itFace++) { - GFace *dFace = getFaceByTag(abs(*itFace)); - for (std::list<MVertex*>::iterator itv = all_vertices.begin(); itv != all_vertices.end(); itv++) { - std::vector<MVertex*>::iterator itve = std::find(dFace->mesh_vertices.begin(), dFace->mesh_vertices.end(), *itv) ; - if (itve != dFace->mesh_vertices.end()) dFace->mesh_vertices.erase(itve); - (*itv)->setEntity(e); - } - - std::map<int, std::vector<int> >::iterator f2e = face2Edges.find(*itFace); - if (f2e == face2Edges.end()){ - std::vector<int> tagEdges; - tagEdges.push_back(num); - face2Edges.insert(std::make_pair(*itFace,tagEdges)); - } - else{ - std::vector<int> tagEdges = f2e->second; - tagEdges.push_back(num); - f2e->second = tagEdges; - } - } - num++; + std::vector<MEdge> myLines; + myLines.clear(); + std::vector<MEdge>::iterator it = myEdges.begin(); + + MVertex *vB = (*it).getVertex(0); + MVertex *vE = (*it).getVertex(1); + myLines.push_back(*it); + myEdges.erase(it); + it++; + + //printf("***candidate mline %d %d of size %d \n", vB->getNum(), vE->getNum(), myEdges.size()); + + for (int i=0; i<2; i++) { + + std::vector<MEdge>::iterator it= myEdges.begin() ; + while (it != myEdges.end()){ + MVertex *v1 = (*it).getVertex(0); + MVertex *v2 = (*it).getVertex(1); + //printf("mline %d %d \n", v1->getNum(), v2->getNum()); + + std::vector<MEdge>::iterator itp; + if ( v1 == vE ){ + //printf("->v1 = vE push back this mline \n"); + myLines.push_back(*it); + myEdges.erase(it); + vE = v2; + i = -1; + } + else if ( v2 == vE){ + //printf("->v2 = VE push back this mline \n"); + myLines.push_back(*it); + myEdges.erase(it); + vE = v1; + i=-1; + } + else it++; + + } + //printf("end Edges \n"); + + if (vB == vE) break; + + if (myEdges.empty()) break; + + //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + MVertex *temp = vB; + vB = vE; + vE = temp; + //printf("not found VB=%d vE=%d\n", vB->getNum(), vE->getNum()); + + } + + //printf("************ CANDIDATE NEW EDGE with num =%d size=%d\n", num, myLines.size()); + //for (std::vector<MEdge>::iterator it = myLines.begin() ; it != myLines.end() ; ++it){ + // MVertex *v1 = (*it).getVertex(0); + // MVertex *v2 = (*it).getVertex(1); + // printf("Line %d %d \n", v1->getNum(), v2->getNum()); + //} + discreteEdge *e = new discreteEdge(this, num, 0, 0); + add(e); + Dedges.push_back(e); + std::list<MVertex*> all_vertices; + for(unsigned int i = 0; i < myLines.size(); i++) { + MVertex *v0 = myLines[i].getVertex(0); + MVertex *v1 = myLines[i].getVertex(1); + e->lines.push_back(new MLine( v0, v1)); + if (std::find(all_vertices.begin(), all_vertices.end(), v0) == all_vertices.end()) all_vertices.push_back(v0); + if (std::find(all_vertices.begin(), all_vertices.end(), v1) == all_vertices.end()) all_vertices.push_back(v1); + } + e->mesh_vertices.insert(e->mesh_vertices.begin(), all_vertices.begin(), all_vertices.end()); + + for (std::vector<int>::iterator itFace = tagFaces.begin(); itFace != tagFaces.end(); itFace++) { + GFace *dFace = getFaceByTag(abs(*itFace)); + for (std::list<MVertex*>::iterator itv = all_vertices.begin(); itv != all_vertices.end(); itv++) { + std::vector<MVertex*>::iterator itve = std::find(dFace->mesh_vertices.begin(), dFace->mesh_vertices.end(), *itv) ; + if (itve != dFace->mesh_vertices.end()) dFace->mesh_vertices.erase(itve); + (*itv)->setEntity(e); + } + + std::map<int, std::vector<int> >::iterator f2e = face2Edges.find(*itFace); + if (f2e == face2Edges.end()){ + std::vector<int> tagEdges; + tagEdges.push_back(num); + face2Edges.insert(std::make_pair(*itFace,tagEdges)); + } + else{ + std::vector<int> tagEdges = f2e->second; + tagEdges.push_back(num); + f2e->second = tagEdges; + } + } + num++; }//end for each actual GEdge @@ -1168,36 +1168,36 @@ void GModel::createTopologyFromMesh() // Dedges.push_back(e); // std::list<MVertex*> all_vertices; // for(int i = 0; i < myEdges.size(); i++) { -// MVertex *v0 = myEdges[i].getVertex(0); -// MVertex *v1 = myEdges[i].getVertex(1); -// e->lines.push_back(new MLine( v0, v1)); -// if (std::find(all_vertices.begin(), all_vertices.end(), v0) == all_vertices.end()) all_vertices.push_back(v0); -// if (std::find(all_vertices.begin(), all_vertices.end(), v1) == all_vertices.end()) all_vertices.push_back(v1); +// MVertex *v0 = myEdges[i].getVertex(0); +// MVertex *v1 = myEdges[i].getVertex(1); +// e->lines.push_back(new MLine( v0, v1)); +// if (std::find(all_vertices.begin(), all_vertices.end(), v0) == all_vertices.end()) all_vertices.push_back(v0); +// if (std::find(all_vertices.begin(), all_vertices.end(), v1) == all_vertices.end()) all_vertices.push_back(v1); // } // e->mesh_vertices.insert(e->mesh_vertices.begin(), all_vertices.begin(), all_vertices.end()); // printf("all vertice size =%d\n", all_vertices.size()); // for (std::vector<int>::iterator itFace = tagFaces.begin(); itFace != tagFaces.end(); itFace++) { -// GFace *dFace = getFaceByTag(abs(*itFace)); -// printf("face =%d \n", dFace->tag()); -// for (std::list<MVertex*>::iterator itv = all_vertices.begin(); itv != all_vertices.end(); itv++) { -// printf("vertrx=%d \n", (*itv)->getNum()); -// std::vector<MVertex*>::iterator itve = std::find(dFace->mesh_vertices.begin(), dFace->mesh_vertices.end(), *itv) ; -// if (itve != dFace->mesh_vertices.end()) dFace->mesh_vertices.erase(itve); -// (*itv)->setEntity(e); -// } - -// std::map<int, std::vector<int> >::iterator f2e = face2Edges.find(*itFace); -// if (f2e == face2Edges.end()){ -// std::vector<int> tagEdges; -// tagEdges.push_back(num); -// face2Edges.insert(std::make_pair(*itFace,tagEdges)); -// } -// else{ -// std::vector<int> tagEdges = f2e->second; -// tagEdges.push_back(num); -// f2e->second = tagEdges; -// } +// GFace *dFace = getFaceByTag(abs(*itFace)); +// printf("face =%d \n", dFace->tag()); +// for (std::list<MVertex*>::iterator itv = all_vertices.begin(); itv != all_vertices.end(); itv++) { +// printf("vertrx=%d \n", (*itv)->getNum()); +// std::vector<MVertex*>::iterator itve = std::find(dFace->mesh_vertices.begin(), dFace->mesh_vertices.end(), *itv) ; +// if (itve != dFace->mesh_vertices.end()) dFace->mesh_vertices.erase(itve); +// (*itv)->setEntity(e); +// } + +// std::map<int, std::vector<int> >::iterator f2e = face2Edges.find(*itFace); +// if (f2e == face2Edges.end()){ +// std::vector<int> tagEdges; +// tagEdges.push_back(num); +// face2Edges.insert(std::make_pair(*itFace,tagEdges)); +// } +// else{ +// std::vector<int> tagEdges = f2e->second; +// tagEdges.push_back(num); +// f2e->second = tagEdges; +// } // } // num++; diff --git a/Geo/GModel.h b/Geo/GModel.h index 0e88c59539b22a8a99152130f938cbde9de894c5..5dba3aeb0a654394bc2e482dd2e0e3f642fe2a76 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -351,12 +351,12 @@ class GModel // Medit (INRIA) mesh format int readMESH(const std::string &name); - int writeMESH(const std::string &name, + int writeMESH(const std::string &name, int elementTagType=1, bool saveAll=false, double scalingFactor=1.0); // Nastran Bulk Data File format int readBDF(const std::string &name); - int writeBDF(const std::string &name, int format=0, + int writeBDF(const std::string &name, int format=0, int elementTagType=1, bool saveAll=false, double scalingFactor=1.0); // Plot3D structured mesh format @@ -374,13 +374,13 @@ class GModel static int readMED(const std::string &name); int readMED(const std::string &name, int meshIndex); int writeMED(const std::string &name, - bool saveAll=false, double scalingFactor=1.0); + bool saveAll=false, double scalingFactor=1.0); // VTK format int readVTK(const std::string &name, bool bigEndian=false); int writeVTK(const std::string &name, bool binary=false, bool saveAll=false, double scalingFactor=1.0, - bool bigEndian=false); + bool bigEndian=false); // DIFFPACK format int readDIFF(const std::string &name); diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp index db25e3f2807728501e26d94988527bf0ed99d70b..49ad5032d107f64407df046612de95e94f3ee9fe 100644 --- a/Geo/GModelIO_Fourier.cpp +++ b/Geo/GModelIO_Fourier.cpp @@ -55,22 +55,22 @@ void FM_Internals::makeGFace(FM::Patch* patch, GModel* model) i1 = eB->GetStartPoint()->GetTag(); i2 = eB->GetEndPoint()->GetTag(); model->add(new fourierEdge(model, eB, eB->GetTag(), model->getVertexByTag(i1), - model->getVertexByTag(i2))); + model->getVertexByTag(i2))); FM::TopoEdge* eR = new FM::TopoEdge(++tagEdge, curveR, vLR, vUR); i1 = eR->GetStartPoint()->GetTag(); i2 = eR->GetEndPoint()->GetTag(); model->add(new fourierEdge(model, eR, eR->GetTag(), model->getVertexByTag(i1), - model->getVertexByTag(i2))); + model->getVertexByTag(i2))); FM::TopoEdge* eT = new FM::TopoEdge(++tagEdge, curveT, vUR, vUL); i1 = eT->GetStartPoint()->GetTag(); i2 = eT->GetEndPoint()->GetTag(); model->add(new fourierEdge(model, eT, eT->GetTag(), model->getVertexByTag(i1), - model->getVertexByTag(i2))); + model->getVertexByTag(i2))); FM::TopoEdge* eL = new FM::TopoEdge(++tagEdge, curveL, vUL, vLL); i1 = eL->GetStartPoint()->GetTag(); i2 = eL->GetEndPoint()->GetTag(); model->add(new fourierEdge(model, eL, eL->GetTag(), model->getVertexByTag(i1), - model->getVertexByTag(i2))); + model->getVertexByTag(i2))); FM::TopoFace* face = new FM::TopoFace(model->getNumFaces() + 1, patch); face->AddEdge(eB); face->AddEdge(eR); @@ -152,7 +152,7 @@ int GModel::readFourier(const std::string &fn) int GModel::writeFourier(const std::string &fn) { Msg::Error("Gmsh must be compiled with Fourier Model support to load '%s'", - fn.c_str()); + fn.c_str()); return 0; } diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp index 8f80637c0ae59140038136048e815d84ca1d39cb..2bd5313f24977756cbb667eb38aadf6f3c6fd372 100644 --- a/Geo/GModelIO_Geo.cpp +++ b/Geo/GModelIO_Geo.cpp @@ -125,17 +125,17 @@ int GModel::importGEOInternals() switch(p->Typ){ case MSH_PHYSICAL_POINT: ge = getVertexByTag(abs(num)); break; case MSH_PHYSICAL_LINE: - ge = getEdgeByTag(abs(num)); - e_compound.push_back(getEdgeByTag(abs(num))); - break; + ge = getEdgeByTag(abs(num)); + e_compound.push_back(getEdgeByTag(abs(num))); + break; case MSH_PHYSICAL_SURFACE: - ge = getFaceByTag(abs(num)); - f_compound.push_back(getFaceByTag(abs(num))); - break; + ge = getFaceByTag(abs(num)); + f_compound.push_back(getFaceByTag(abs(num))); + break; case MSH_PHYSICAL_VOLUME: - ge = getRegionByTag(abs(num)); - r_compound.push_back(getRegionByTag(abs(num))); - break; + ge = getRegionByTag(abs(num)); + r_compound.push_back(getRegionByTag(abs(num))); + break; } int pnum = sign(num) * p->Num; if(ge && std::find(ge->physicals.begin(), ge->physicals.end(), pnum) == @@ -150,8 +150,8 @@ int GModel::importGEOInternals() if (p->Typ == MSH_PHYSICAL_LINE && p->Boundaries[0]){ GEdge *ge = getEdgeByTag(abs(p->Num)); if (!ge){ - GEdgeCompound *ge = new GEdgeCompound(this, p->Num, e_compound); - add(ge); + GEdgeCompound *ge = new GEdgeCompound(this, p->Num, e_compound); + add(ge); } else ge->resetMeshAttributes(); @@ -161,19 +161,19 @@ int GModel::importGEOInternals() List_T *bnd; std::list<GEdge*> b[4]; while((bnd = p->Boundaries[i])){ - if (i > 3)break; - for(int j = 0; j < List_Nbr(bnd); j++){ - int ie; - List_Read(bnd, j, &ie); - b[i].push_back(getEdgeByTag(abs(ie))); - } - i++; + if (i > 3)break; + for(int j = 0; j < List_Nbr(bnd); j++){ + int ie; + List_Read(bnd, j, &ie); + b[i].push_back(getEdgeByTag(abs(ie))); + } + i++; } GFace *gf = getFaceByTag(abs(p->Num)); if (!gf){ - GFaceCompound *gf = new GFaceCompound(this, p->Num, f_compound, + GFaceCompound *gf = new GFaceCompound(this, p->Num, f_compound, b[0], b[1], b[2], b[3]); - add(gf); + add(gf); } else gf->resetMeshAttributes(); @@ -181,8 +181,8 @@ int GModel::importGEOInternals() if (p->Typ == MSH_PHYSICAL_VOLUME && p->Boundaries[0]){ GRegion *gr = getRegionByTag(abs(p->Num)); if (!gr){ - GRegionCompound *gr = new GRegionCompound(this, p->Num, r_compound); - add(gr); + GRegionCompound *gr = new GRegionCompound(this, p->Num, r_compound); + add(gr); } else gr->resetMeshAttributes(); diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp index a1a05e13ae2fcede8e2cdc1f66299c6be5d0b2ca..1ce28e473da7e9110beda2530e6e4539e04501a4 100644 --- a/Geo/GModelIO_MED.cpp +++ b/Geo/GModelIO_MED.cpp @@ -117,7 +117,7 @@ int med2mshNodeIndex(med_geometrie_element med, int k) } case MED_HEXA20: { static const int map[20] = {0, 3, 2, 1, 4, 7, 6, 5, 11, 8, 16, - 10, 19, 9, 18, 17, 15, 12, 14, 13}; + 10, 19, 9, 18, 17, 15, 12, 14, 13}; return map[k]; } case MED_PENTA15: { @@ -146,7 +146,7 @@ int GModel::readMED(const std::string &name) MEDversionDonner(&v[0], &v[1], &v[2]); MEDversionLire(fid, &vf[0], &vf[1], &vf[2]); Msg::Info("Reading MED file V%d.%d.%d using MED library V%d.%d.%d", - vf[0], vf[1], vf[2], v[0], v[1], v[2]); + vf[0], vf[1], vf[2], v[0], v[1], v[2]); if(vf[0] < 2 || (vf[0] == 2 && vf[1] < 2)){ Msg::Error("Cannot read MED file older than V2.2"); return 0; @@ -218,7 +218,7 @@ int GModel::readMED(const std::string &name, int meshIndex) // read nodes med_int numNodes = MEDnEntMaa(fid, meshName, MED_COOR, MED_NOEUD, MED_NONE, - MED_NOD); + MED_NOD); if(numNodes < 0){ Msg::Error("Could not read number of MED nodes"); return 0; @@ -233,7 +233,7 @@ int GModel::readMED(const std::string &name, int meshIndex) std::vector<char> coordUnit(meshDim * MED_TAILLE_PNOM + 1); med_repere rep; if(MEDcoordLire(fid, meshName, meshDim, &coord[0], MED_FULL_INTERLACE, - MED_ALL, 0, 0, &rep, &coordName[0], &coordUnit[0]) < 0){ + MED_ALL, 0, 0, &rep, &coordName[0], &coordUnit[0]) < 0){ Msg::Error("Could not read MED node coordinates"); return 0; } @@ -242,9 +242,9 @@ int GModel::readMED(const std::string &name, int meshIndex) nodeTags.clear(); for(int i = 0; i < numNodes; i++) verts[i] = new MVertex(coord[meshDim * i], - (meshDim > 1) ? coord[meshDim * i + 1] : 0., - (meshDim > 2) ? coord[meshDim * i + 2] : 0., - 0, nodeTags.empty() ? 0 : nodeTags[i]); + (meshDim > 1) ? coord[meshDim * i + 1] : 0., + (meshDim > 2) ? coord[meshDim * i + 2] : 0., + 0, nodeTags.empty() ? 0 : nodeTags[i]); // read elements (loop over all possible MSH element types) for(int mshType = 0; mshType < MSH_NUM_TYPE; mshType++){ @@ -255,7 +255,7 @@ int GModel::readMED(const std::string &name, int meshIndex) int numNodPerEle = type % 100; std::vector<med_int> conn(numEle * numNodPerEle); if(MEDconnLire(fid, meshName, meshDim, &conn[0], MED_FULL_INTERLACE, 0, MED_ALL, - MED_MAILLE, type, MED_NOD) < 0) { + MED_MAILLE, type, MED_NOD) < 0) { Msg::Error("Could not read MED elements"); return 0; } @@ -272,7 +272,7 @@ int GModel::readMED(const std::string &name, int meshIndex) for(int j = 0; j < numEle; j++){ std::vector<MVertex*> v(numNodPerEle); for(int k = 0; k < numNodPerEle; k++) - v[k] = verts[conn[numNodPerEle * j + med2mshNodeIndex(type, k)] - 1]; + v[k] = verts[conn[numNodPerEle * j + med2mshNodeIndex(type, k)] - 1]; MElement *e = factory.create(mshType, v, eleTags.empty() ? 0 : eleTags[j]); if(e) elements[-fam[j]].push_back(e); } @@ -301,26 +301,26 @@ int GModel::readMED(const std::string &name, int meshIndex) char familyName[MED_TAILLE_NOM + 1]; med_int familyNum; if(MEDfamInfo(fid, meshName, i + 1, familyName, &familyNum, &attribId[0], - &attribVal[0], &attribDes[0], &numAttrib, &groupNames[0], - &numGroups) < 0) { + &attribVal[0], &attribDes[0], &numAttrib, &groupNames[0], + &numGroups) < 0) { Msg::Error("Could not read info for MED family %d", i + 1); } else{ elementaryNames[std::pair<int, int>(-1, -familyNum)] = familyName; if(numGroups > 0){ - GEntity *ge; // family tags are unique (for all dimensions) - if((ge = getRegionByTag(-familyNum))){} - else if((ge = getFaceByTag(-familyNum))){} - else if((ge = getEdgeByTag(-familyNum))){} - else ge = getVertexByTag(-familyNum); - if(ge){ - for(int j = 0; j < numGroups; j++) { - char tmp[MED_TAILLE_LNOM + 1]; - strncpy(tmp, &groupNames[j * MED_TAILLE_LNOM], MED_TAILLE_LNOM); - tmp[MED_TAILLE_LNOM] = '\0'; - ge->physicals.push_back(setPhysicalName(tmp, ge->dim())); - } - } + GEntity *ge; // family tags are unique (for all dimensions) + if((ge = getRegionByTag(-familyNum))){} + else if((ge = getFaceByTag(-familyNum))){} + else if((ge = getEdgeByTag(-familyNum))){} + else ge = getVertexByTag(-familyNum); + if(ge){ + for(int j = 0; j < numGroups; j++) { + char tmp[MED_TAILLE_LNOM + 1]; + strncpy(tmp, &groupNames[j * MED_TAILLE_LNOM], MED_TAILLE_LNOM); + tmp[MED_TAILLE_LNOM] = '\0'; + ge->physicals.push_back(setPhysicalName(tmp, ge->dim())); + } + } } } } @@ -338,8 +338,8 @@ int GModel::readMED(const std::string &name, int meshIndex) template<class T> static void fillElementsMED(med_int family, std::vector<T*> &elements, - std::vector<med_int> &conn, std::vector<med_int> &fam, - med_geometrie_element &type) + std::vector<med_int> &conn, std::vector<med_int> &fam, + med_geometrie_element &type) { for(unsigned int i = 0; i < elements.size(); i++){ for(int j = 0; j < elements[i]->getNumVertices(); j++) @@ -350,12 +350,12 @@ static void fillElementsMED(med_int family, std::vector<T*> &elements, } static void writeElementsMED(med_idt &fid, char *meshName, std::vector<med_int> &conn, - std::vector<med_int> &fam, med_geometrie_element type) + std::vector<med_int> &fam, med_geometrie_element type) { if(fam.empty()) return; if(MEDelementsEcr(fid, meshName, (med_int)3, &conn[0], MED_FULL_INTERLACE, - 0, MED_FAUX, 0, MED_FAUX, &fam[0], (med_int)fam.size(), - MED_MAILLE, type, MED_NOD) < 0) + 0, MED_FAUX, 0, MED_FAUX, &fam[0], (med_int)fam.size(), + MED_MAILLE, type, MED_NOD) < 0) Msg::Error("Could not write elements"); } @@ -406,28 +406,28 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor // physical entity and no attributes for(unsigned int i = 0; i < entities.size(); i++){ if(saveAll || entities[i]->physicals.size()){ - int num = - (families.size() + 1); - families[entities[i]] = num; - std::ostringstream fs; - fs << entities[i]->dim() << "D_" << entities[i]->tag(); - std::string familyName = "F_" + fs.str(); - std::string groupName; - for(unsigned j = 0; j < entities[i]->physicals.size(); j++){ - std::string tmp = getPhysicalName + int num = - ((int)families.size() + 1); + families[entities[i]] = num; + std::ostringstream fs; + fs << entities[i]->dim() << "D_" << entities[i]->tag(); + std::string familyName = "F_" + fs.str(); + std::string groupName; + for(unsigned j = 0; j < entities[i]->physicals.size(); j++){ + std::string tmp = getPhysicalName (entities[i]->dim(), entities[i]->physicals[j]); - if(tmp.empty()){ // create unique name - std::ostringstream gs; - gs << entities[i]->dim() << "D_" << entities[i]->physicals[j]; - groupName += "G_" + gs.str(); - } - else - groupName += tmp; - groupName.resize((j + 1) * 80, ' '); - } - if(MEDfamCr(fid, meshName, (char*)familyName.c_str(), - (med_int)num, 0, 0, 0, 0, (char*)groupName.c_str(), - (med_int)entities[i]->physicals.size()) < 0) - Msg::Error("Could not create MED family %d", num); + if(tmp.empty()){ // create unique name + std::ostringstream gs; + gs << entities[i]->dim() << "D_" << entities[i]->physicals[j]; + groupName += "G_" + gs.str(); + } + else + groupName += tmp; + groupName.resize((j + 1) * 80, ' '); + } + if(MEDfamCr(fid, meshName, (char*)familyName.c_str(), + (med_int)num, 0, 0, 0, 0, (char*)groupName.c_str(), + (med_int)entities[i]->physicals.size()) < 0) + Msg::Error("Could not create MED family %d", num); } } } @@ -438,13 +438,13 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor std::vector<med_int> fam; for(unsigned int i = 0; i < entities.size(); i++){ for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++){ - MVertex *v = entities[i]->mesh_vertices[j]; - if(v->getIndex() >= 0){ - coord.push_back(v->x() * scalingFactor); - coord.push_back(v->y() * scalingFactor); - coord.push_back(v->z() * scalingFactor); - fam.push_back(0); // we never create node families - } + MVertex *v = entities[i]->mesh_vertices[j]; + if(v->getIndex() >= 0){ + coord.push_back(v->x() * scalingFactor); + coord.push_back(v->y() * scalingFactor); + coord.push_back(v->z() * scalingFactor); + fam.push_back(0); // we never create node families + } } } if(fam.empty()){ @@ -456,8 +456,8 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor char coordUnit[3 * MED_TAILLE_PNOM + 1] = "unknown unknown unknown "; if(MEDnoeudsEcr(fid, meshName, (med_int)3, &coord[0], MED_FULL_INTERLACE, - MED_CART, coordName, coordUnit, 0, MED_FAUX, 0, MED_FAUX, - &fam[0], (med_int)fam.size()) < 0) + MED_CART, coordName, coordUnit, 0, MED_FAUX, 0, MED_FAUX, + &fam[0], (med_int)fam.size()) < 0) Msg::Error("Could not write nodes"); } @@ -467,57 +467,57 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor { // points std::vector<med_int> conn, fam; for(viter it = firstVertex(); it != lastVertex(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->points, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->points, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // lines std::vector<med_int> conn, fam; for(eiter it = firstEdge(); it != lastEdge(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->lines, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->lines, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // triangles std::vector<med_int> conn, fam; for(fiter it = firstFace(); it != lastFace(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->triangles, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->triangles, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // quads std::vector<med_int> conn, fam; for(fiter it = firstFace(); it != lastFace(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->quadrangles, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->quadrangles, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // tets std::vector<med_int> conn, fam; for(riter it = firstRegion(); it != lastRegion(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->tetrahedra, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->tetrahedra, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // hexas std::vector<med_int> conn, fam; for(riter it = firstRegion(); it != lastRegion(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->hexahedra, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->hexahedra, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // prisms std::vector<med_int> conn, fam; for(riter it = firstRegion(); it != lastRegion(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->prisms, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->prisms, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } { // pyramids std::vector<med_int> conn, fam; for(riter it = firstRegion(); it != lastRegion(); it++) - if(saveAll || (*it)->physicals.size()) - fillElementsMED(families[*it], (*it)->pyramids, conn, fam, typ); + if(saveAll || (*it)->physicals.size()) + fillElementsMED(families[*it], (*it)->pyramids, conn, fam, typ); writeElementsMED(fid, meshName, conn, fam, typ); } } @@ -535,21 +535,21 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor int GModel::readMED(const std::string &name) { Msg::Error("Gmsh must be compiled with MED support to read '%s'", - name.c_str()); + name.c_str()); return 0; } int GModel::readMED(const std::string &name, int meshIndex) { Msg::Error("Gmsh must be compiled with MED support to read '%s'", - name.c_str()); + name.c_str()); return 0; } int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor) { Msg::Error("Gmsh must be compiled with MED support to write '%s'", - name.c_str()); + name.c_str()); return 0; } diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index 26a6f1f59278dc3de06de7f22f0e158514d2956d..1ebef3dfb2cb232a7fcc475ec6db0121c0dd7e56 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -188,7 +188,7 @@ int GModel::readMSH(const std::string &name) } else if(!strncmp(&str[1], "NO", 2) || !strncmp(&str[1], "Nodes", 5) || - !strncmp(&str[1], "ParametricNodes", 15)) { + !strncmp(&str[1], "ParametricNodes", 15)) { const bool parametric = !strncmp(&str[1], "ParametricNodes", 15); if(!fgets(str, sizeof(str), fp)) return 0; @@ -200,76 +200,76 @@ int GModel::readMSH(const std::string &name) vertexMap.clear(); int minVertex = numVertices + 1, maxVertex = -1; for(int i = 0; i < numVertices; i++) { - int num; + int num; double xyz[3], uv[2]; - MVertex *newVertex = 0; - if (!parametric){ - if(!binary){ - if (fscanf(fp, "%d %lf %lf %lf", &num, &xyz[0], &xyz[1], &xyz[2]) != 4) - return 0; - } - else{ - if(fread(&num, sizeof(int), 1, fp) != 1) return 0; - if(swap) SwapBytes((char*)&num, sizeof(int), 1); - if(fread(xyz, sizeof(double), 3, fp) != 3) return 0; - if(swap) SwapBytes((char*)xyz, sizeof(double), 3); - } - newVertex = new MVertex(xyz[0], xyz[1], xyz[2], 0, num); - } - else{ + MVertex *newVertex = 0; + if (!parametric){ + if(!binary){ + if (fscanf(fp, "%d %lf %lf %lf", &num, &xyz[0], &xyz[1], &xyz[2]) != 4) + return 0; + } + else{ + if(fread(&num, sizeof(int), 1, fp) != 1) return 0; + if(swap) SwapBytes((char*)&num, sizeof(int), 1); + if(fread(xyz, sizeof(double), 3, fp) != 3) return 0; + if(swap) SwapBytes((char*)xyz, sizeof(double), 3); + } + newVertex = new MVertex(xyz[0], xyz[1], xyz[2], 0, num); + } + else{ int iClasDim, iClasTag; - if(!binary){ - if (fscanf(fp, "%d %lf %lf %lf %d %d", &num, &xyz[0], &xyz[1], &xyz[2], + if(!binary){ + if (fscanf(fp, "%d %lf %lf %lf %d %d", &num, &xyz[0], &xyz[1], &xyz[2], &iClasDim, &iClasTag) != 6) - return 0; - } - else{ - if(fread(&num, sizeof(int), 1, fp) != 1) return 0; - if(swap) SwapBytes((char*)&num, sizeof(int), 1); - if(fread(xyz, sizeof(double), 3, fp) != 3) return 0; - if(swap) SwapBytes((char*)xyz, sizeof(double), 3); - if(fread(&iClasDim, sizeof(int), 1, fp) != 1) return 0; - if(swap) SwapBytes((char*)&iClasDim, sizeof(int), 1); - if(fread(&iClasTag, sizeof(int), 1, fp) != 1) return 0; - if(swap) SwapBytes((char*)&iClasTag, sizeof(int), 1); - } - if (iClasDim == 0){ - GVertex *gv = getVertexByTag(iClasTag); - if (gv) gv->deleteMesh(); - newVertex = new MVertex(xyz[0], xyz[1], xyz[2], gv, num); - } - else if (iClasDim == 1){ - GEdge *ge = getEdgeByTag(iClasTag); - if(!binary){ - if (fscanf(fp, "%lf", &uv[0]) != 1) return 0; - } - else{ - if(fread(uv, sizeof(double), 1, fp) != 1) return 0; - if(swap) SwapBytes((char*)uv, sizeof(double), 1); - } - newVertex = new MEdgeVertex(xyz[0], xyz[1], xyz[2], ge, uv[0], -1.0, num); - } - else if (iClasDim == 2){ - GFace *gf = getFaceByTag(iClasTag); - if(!binary){ - if (fscanf(fp, "%lf %lf", &uv[0], &uv[1]) != 2) return 0; - } - else{ - if(fread(uv, sizeof(double), 2, fp) != 2) return 0; - if(swap) SwapBytes((char*)uv, sizeof(double), 2); - } - newVertex = new MFaceVertex(xyz[0], xyz[1], xyz[2], gf, uv[0], uv[1], num); - } - else if (iClasDim == 3){ - GRegion *gr = getRegionByTag(iClasTag); - newVertex = new MVertex(xyz[0], xyz[1], xyz[2], gr, num); - } - } + return 0; + } + else{ + if(fread(&num, sizeof(int), 1, fp) != 1) return 0; + if(swap) SwapBytes((char*)&num, sizeof(int), 1); + if(fread(xyz, sizeof(double), 3, fp) != 3) return 0; + if(swap) SwapBytes((char*)xyz, sizeof(double), 3); + if(fread(&iClasDim, sizeof(int), 1, fp) != 1) return 0; + if(swap) SwapBytes((char*)&iClasDim, sizeof(int), 1); + if(fread(&iClasTag, sizeof(int), 1, fp) != 1) return 0; + if(swap) SwapBytes((char*)&iClasTag, sizeof(int), 1); + } + if (iClasDim == 0){ + GVertex *gv = getVertexByTag(iClasTag); + if (gv) gv->deleteMesh(); + newVertex = new MVertex(xyz[0], xyz[1], xyz[2], gv, num); + } + else if (iClasDim == 1){ + GEdge *ge = getEdgeByTag(iClasTag); + if(!binary){ + if (fscanf(fp, "%lf", &uv[0]) != 1) return 0; + } + else{ + if(fread(uv, sizeof(double), 1, fp) != 1) return 0; + if(swap) SwapBytes((char*)uv, sizeof(double), 1); + } + newVertex = new MEdgeVertex(xyz[0], xyz[1], xyz[2], ge, uv[0], -1.0, num); + } + else if (iClasDim == 2){ + GFace *gf = getFaceByTag(iClasTag); + if(!binary){ + if (fscanf(fp, "%lf %lf", &uv[0], &uv[1]) != 2) return 0; + } + else{ + if(fread(uv, sizeof(double), 2, fp) != 2) return 0; + if(swap) SwapBytes((char*)uv, sizeof(double), 2); + } + newVertex = new MFaceVertex(xyz[0], xyz[1], xyz[2], gf, uv[0], uv[1], num); + } + else if (iClasDim == 3){ + GRegion *gr = getRegionByTag(iClasTag); + newVertex = new MVertex(xyz[0], xyz[1], xyz[2], gr, num); + } + } minVertex = std::min(minVertex, num); maxVertex = std::max(maxVertex, num); if(vertexMap.count(num)) Msg::Warning("Skipping duplicate vertex %d", num); - vertexMap[num] = newVertex; + vertexMap[num] = newVertex; if(numVertices > 100000) Msg::ProgressMeter(i + 1, numVertices, "Reading nodes"); } @@ -997,7 +997,7 @@ static int readElementsVRML(FILE *fp, std::vector<MVertex*> &vertexVector, int r return 0; } Msg::Info("%d elements", elements[0][region].size() + - elements[1][region].size() + elements[2][region].size()); + elements[1][region].size() + elements[2][region].size()); return 1; } @@ -1505,7 +1505,8 @@ int GModel::readMESH(const std::string &name) return 1; } -int GModel::writeMESH(const std::string &name, bool saveAll, double scalingFactor) +int GModel::writeMESH(const std::string &name, int elementTagType, + bool saveAll, double scalingFactor) { FILE *fp = fopen(name.c_str(), "w"); if(!fp){ @@ -1546,9 +1547,11 @@ int GModel::writeMESH(const std::string &name, bool saveAll, double scalingFacto fprintf(fp, " Triangles\n"); fprintf(fp, " %d\n", numTriangles); for(fiter it = firstFace(); it != lastFace(); ++it){ - if(saveAll || (*it)->physicals.size()){ + int numPhys = (*it)->physicals.size(); + if(saveAll || numPhys){ for(unsigned int i = 0; i < (*it)->triangles.size(); i++) - (*it)->triangles[i]->writeMESH(fp, (*it)->tag()); + (*it)->triangles[i]->writeMESH(fp, elementTagType, (*it)->tag(), + numPhys ? (*it)->physicals[0] : 0); } } } @@ -1556,9 +1559,11 @@ int GModel::writeMESH(const std::string &name, bool saveAll, double scalingFacto fprintf(fp, " Quadrilaterals\n"); fprintf(fp, " %d\n", numQuadrangles); for(fiter it = firstFace(); it != lastFace(); ++it){ - if(saveAll || (*it)->physicals.size()){ + int numPhys = (*it)->physicals.size(); + if(saveAll || numPhys){ for(unsigned int i = 0; i < (*it)->quadrangles.size(); i++) - (*it)->quadrangles[i]->writeMESH(fp, (*it)->tag()); + (*it)->quadrangles[i]->writeMESH(fp, elementTagType, (*it)->tag(), + numPhys ? (*it)->physicals[0] : 0); } } } @@ -1566,9 +1571,11 @@ int GModel::writeMESH(const std::string &name, bool saveAll, double scalingFacto fprintf(fp, " Tetrahedra\n"); fprintf(fp, " %d\n", numTetrahedra); for(riter it = firstRegion(); it != lastRegion(); ++it){ - if(saveAll || (*it)->physicals.size()){ + int numPhys = (*it)->physicals.size(); + if(saveAll || numPhys){ for(unsigned int i = 0; i < (*it)->tetrahedra.size(); i++) - (*it)->tetrahedra[i]->writeMESH(fp, (*it)->tag()); + (*it)->tetrahedra[i]->writeMESH(fp, elementTagType, (*it)->tag(), + numPhys ? (*it)->physicals[0] : 0); } } } @@ -1855,8 +1862,8 @@ int GModel::readBDF(const std::string &name) return 1; } -int GModel::writeBDF(const std::string &name, int format, bool saveAll, - double scalingFactor) +int GModel::writeBDF(const std::string &name, int format, int elementTagType, + bool saveAll, double scalingFactor) { FILE *fp = fopen(name.c_str(), "w"); if(!fp){ @@ -1880,9 +1887,13 @@ int GModel::writeBDF(const std::string &name, int format, bool saveAll, // elements for(unsigned int i = 0; i < entities.size(); i++) - for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++) - if(saveAll || entities[i]->physicals.size()) - entities[i]->getMeshElement(j)->writeBDF(fp, format, entities[i]->tag()); + for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){ + int numPhys = entities[i]->physicals.size(); + if(saveAll || numPhys) + entities[i]->getMeshElement(j)->writeBDF + (fp, format, elementTagType, entities[i]->tag(), + numPhys ? entities[i]->physicals[0] : 0); + } fprintf(fp, "ENDDATA\n"); diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 41e67d0944e439c75684977f31cfa3f86e718117..a8634b1210da2391db390dd3e2bc2fd9174cc604 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -528,10 +528,10 @@ void OCC_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperato if (aValueC.ShapeType() != TopAbs_SOLID) isOnlySolids = false; } if (isOnlySolids) - Msg::Error("Face gluing not implemented"); - // theNewShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion()); + Msg::Error("Face gluing not implemented"); + // theNewShape = GEOMImpl_GlueDriver::GlueFaces(C, Precision::Confusion()); //else - theNewShape = C; + theNewShape = C; } } break; @@ -647,47 +647,47 @@ int GModel::applyOCCMeshConstraints(const void *constraints) const MeshGmsh_EdgeConstrain &c(edgeConstraints.Find(*s)); // prescribed mesh constraint if(c.IsMeshImposed()){ - TColStd_SequenceOfInteger nodeNum; - c.GetNodesNumber(nodeNum); - TColStd_SequenceOfReal nodePar; - c.GetParameters(nodePar); - int n = nodeNum.Length(); - if(n < 2){ - Msg::Error("We need at least two points in the edge constraint"); - } - else if(nodePar.Length() != n){ - Msg::Error("Wrong number of parameters in edge constraint: %d != %d", - nodeNum.Length(), nodePar.Length()); - } - else{ - // set the mesh as immutable - ge->meshAttributes.Method == MESH_NONE; - // set the correct tags on the boundary vertices - bool invert = (nodePar.Value(1) > nodePar.Value(n)); - int numbeg = nodeNum.Value(invert ? n : 1); - int numend = nodeNum.Value(invert ? 1 : n); - Msg::Debug("... beg=%d end=%d", numbeg, numend); - ge->getBeginVertex()->mesh_vertices[0]->setNum(numbeg); - ge->getEndVertex()->mesh_vertices[0]->setNum(numend); - // set the mesh on the edge - for(int i = 2; i < n; i++){ - int num = nodeNum.Value(invert ? n - i + 1 : i); - double u = nodePar.Value(invert ? n - i + 1 : i); - GPoint p = ge->point(u); - Msg::Debug("... adding mesh vertex num=%d u=%g xyz=(%g,%g,%g)", - num, u, p.x(), p.y(), p.z()); - MEdgeVertex *v = new MEdgeVertex(p.x(), p.y(), p.z(), ge, u); - v->setNum(num); - ge->mesh_vertices.push_back(v); - } - for(unsigned int i = 0; i < ge->mesh_vertices.size() + 1; i++){ - MVertex *v0 = (i == 0) ? - ge->getBeginVertex()->mesh_vertices[0] : ge->mesh_vertices[i - 1]; - MVertex *v1 = (i == ge->mesh_vertices.size()) ? - ge->getEndVertex()->mesh_vertices[0] : ge->mesh_vertices[i]; - ge->lines.push_back(new MLine(v0, v1)); - } - } + TColStd_SequenceOfInteger nodeNum; + c.GetNodesNumber(nodeNum); + TColStd_SequenceOfReal nodePar; + c.GetParameters(nodePar); + int n = nodeNum.Length(); + if(n < 2){ + Msg::Error("We need at least two points in the edge constraint"); + } + else if(nodePar.Length() != n){ + Msg::Error("Wrong number of parameters in edge constraint: %d != %d", + nodeNum.Length(), nodePar.Length()); + } + else{ + // set the mesh as immutable + ge->meshAttributes.Method == MESH_NONE; + // set the correct tags on the boundary vertices + bool invert = (nodePar.Value(1) > nodePar.Value(n)); + int numbeg = nodeNum.Value(invert ? n : 1); + int numend = nodeNum.Value(invert ? 1 : n); + Msg::Debug("... beg=%d end=%d", numbeg, numend); + ge->getBeginVertex()->mesh_vertices[0]->setNum(numbeg); + ge->getEndVertex()->mesh_vertices[0]->setNum(numend); + // set the mesh on the edge + for(int i = 2; i < n; i++){ + int num = nodeNum.Value(invert ? n - i + 1 : i); + double u = nodePar.Value(invert ? n - i + 1 : i); + GPoint p = ge->point(u); + Msg::Debug("... adding mesh vertex num=%d u=%g xyz=(%g,%g,%g)", + num, u, p.x(), p.y(), p.z()); + MEdgeVertex *v = new MEdgeVertex(p.x(), p.y(), p.z(), ge, u); + v->setNum(num); + ge->mesh_vertices.push_back(v); + } + for(unsigned int i = 0; i < ge->mesh_vertices.size() + 1; i++){ + MVertex *v0 = (i == 0) ? + ge->getBeginVertex()->mesh_vertices[0] : ge->mesh_vertices[i - 1]; + MVertex *v1 = (i == ge->mesh_vertices.size()) ? + ge->getEndVertex()->mesh_vertices[0] : ge->mesh_vertices[i]; + ge->lines.push_back(new MLine(v0, v1)); + } + } } // embedding constraint if(c.IsEmbedded() && !c.GetFace().IsNull()){ @@ -722,35 +722,35 @@ void GModel::_deleteOCCInternals() int GModel::readOCCSTEP(const std::string &fn) { Msg::Error("Gmsh must be compiled with OpenCascade support to load '%s'", - fn.c_str()); + fn.c_str()); return 0; } int GModel::readOCCIGES(const std::string &fn) { Msg::Error("Gmsh must be compiled with OpenCascade support to load '%s'", - fn.c_str()); + fn.c_str()); return 0; } int GModel::readOCCBREP(const std::string &fn) { Msg::Error("Gmsh must be compiled with OpenCascade support to load '%s'", - fn.c_str()); + fn.c_str()); return 0; } int GModel::importOCCShape(const void *shape) { Msg::Error("Gmsh must be compiled with OpenCascade support to import " - "a TopoDS_Shape"); + "a TopoDS_Shape"); return 0; } int GModel::applyOCCMeshConstraints(const void *constraints) { Msg::Error("Gmsh must be compiled with OpenCascade support to apply " - "OCC mesh constraints"); + "OCC mesh constraints"); return 0; } diff --git a/Geo/GPoint.h b/Geo/GPoint.h index 633580589bef6378c372b3dc6fe0fcba93a8cc50..070f98b850c3a85c3d669f68e47ff0273c787922 100644 --- a/Geo/GPoint.h +++ b/Geo/GPoint.h @@ -28,16 +28,19 @@ class GPoint inline double v() const { return par[1]; } inline const GEntity* g() const { return e; } GPoint (double _x=0, double _y=0, double _z=0, const GEntity *onwhat=0) - : X(_x), Y(_y), Z(_z), e(onwhat) ,success(true) + : X(_x), Y(_y), Z(_z), e(onwhat), success(true) { + par[0] = -1.; + par[1] = -1.; } GPoint (double _x, double _y, double _z, const GEntity *onwhat, double p) - : X(_x), Y(_y), Z(_z), e(onwhat),success(true) + : X(_x), Y(_y), Z(_z), e(onwhat), success(true) { par[0] = p; + par[1] = -1.; } GPoint (double _x, double _y, double _z, const GEntity *onwhat, double p[2]) - : X(_x), Y(_y), Z(_z), e(onwhat),success(true) + : X(_x), Y(_y), Z(_z), e(onwhat), success(true) { par[0] = p[0]; par[1] = p[1]; diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp index 141b73785e00785b0416836a2d5d255ec23dfe3e..1c9bb6796e91e956e04aade59519084f3ef69aba 100644 --- a/Geo/GRegion.cpp +++ b/Geo/GRegion.cpp @@ -128,51 +128,51 @@ SOrientedBoundingBox GRegion::getOBB() for (std::list<GFace*>::iterator b_face = b_faces.begin(); b_face != b_faces.end(); b_face++) { if((*b_face)->getNumMeshVertices() > 0) { - int N = (*b_face)->getNumMeshVertices(); - for (int i = 0; i < N; i++) { - MVertex* mv = (*b_face)->getMeshVertex(i); - vertices.push_back(mv->point()); - } + int N = (*b_face)->getNumMeshVertices(); + for (int i = 0; i < N; i++) { + MVertex* mv = (*b_face)->getMeshVertex(i); + vertices.push_back(mv->point()); + } std::list<GEdge*> eds = (*b_face)->edges(); - for(std::list<GEdge*>::iterator ed = eds.begin(); ed != eds.end(); ed++) { - int N2 = (*ed)->getNumMeshVertices(); - for (int i = 0; i < N2; i++) { - MVertex* mv = (*ed)->getMeshVertex(i); - vertices.push_back(mv->point()); - } - // Don't forget to add the first and last vertices... - SPoint3 pt1((*ed)->getBeginVertex()->x(), + for(std::list<GEdge*>::iterator ed = eds.begin(); ed != eds.end(); ed++) { + int N2 = (*ed)->getNumMeshVertices(); + for (int i = 0; i < N2; i++) { + MVertex* mv = (*ed)->getMeshVertex(i); + vertices.push_back(mv->point()); + } + // Don't forget to add the first and last vertices... + SPoint3 pt1((*ed)->getBeginVertex()->x(), (*ed)->getBeginVertex()->y(), (*ed)->getBeginVertex()->z()); - SPoint3 pt2((*ed)->getEndVertex()->x(), + SPoint3 pt2((*ed)->getEndVertex()->x(), (*ed)->getEndVertex()->y(), (*ed)->getEndVertex()->z()); - vertices.push_back(pt1); - vertices.push_back(pt2); - } + vertices.push_back(pt1); + vertices.push_back(pt2); + } } else if ((*b_face)->buildSTLTriangulation()) { - int N = (*b_face)->va_geom_triangles->getNumVertices(); + int N = (*b_face)->va_geom_triangles->getNumVertices(); for(int i = 0; i < N; i++) { - SPoint3 p(((*b_face)->va_geom_triangles->getVertexArray(3*i))[0], - ((*b_face)->va_geom_triangles->getVertexArray(3*i))[1], - ((*b_face)->va_geom_triangles->getVertexArray(3*i))[2]); - vertices.push_back(p); - } + SPoint3 p(((*b_face)->va_geom_triangles->getVertexArray(3*i))[0], + ((*b_face)->va_geom_triangles->getVertexArray(3*i))[1], + ((*b_face)->va_geom_triangles->getVertexArray(3*i))[2]); + vertices.push_back(p); + } } else { - int N = 10; + int N = 10; std::list<GEdge*> b_edges = (*b_face)->edges(); for (std::list<GEdge*>::iterator b_edge = b_edges.begin(); b_edge != b_edges.end(); b_edge++) { - Range<double> tr = (*b_edge)->parBounds(0); - for (int j = 0; j < N; j++) { - double t = tr.low() + (double)j / (double)(N - 1) * (tr.high() - tr.low()); - GPoint p = (*b_edge)->point(t); - SPoint3 pt(p.x(), p.y(), p.z()); - vertices.push_back(pt); - } - } + Range<double> tr = (*b_edge)->parBounds(0); + for (int j = 0; j < N; j++) { + double t = tr.low() + (double)j / (double)(N - 1) * (tr.high() - tr.low()); + GPoint p = (*b_edge)->point(t); + SPoint3 pt(p.x(), p.y(), p.z()); + vertices.push_back(pt); + } + } } } _obb = SOrientedBoundingBox::buildOBB(vertices); diff --git a/Geo/GRegionCompound.cpp b/Geo/GRegionCompound.cpp index 0e6798612d138ceafa8f377ec4cb708ee1e14873..723a0c2ce0392944625369de3f92fb6a3d88ca7c 100644 --- a/Geo/GRegionCompound.cpp +++ b/Geo/GRegionCompound.cpp @@ -41,8 +41,8 @@ void GRegionCompound::getBoundingFaces(){ std::list<GFace*> ed = (*it)->faces(); std::list<GFace*> :: iterator ite = ed.begin(); for ( ; ite != ed.end() ; ++ite){ - if (!(*ite)->degenerate(0) && _touched.count(*ite) == 1) { - _unique.insert(*ite); } + if (!(*ite)->degenerate(0) && _touched.count(*ite) == 1) { + _unique.insert(*ite); } } } diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 23feb25a3116b2c1be7147c8c5db25805b8ed71e..db9c76422d25328848dc5d68560ea565db1db2b4 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -156,9 +156,9 @@ PhysicalGroup *Create_PhysicalGroup(int Num, int typ, List_T *intlist, List_T *b for(int i = 0; i < 4; i++) { p->Boundaries[i] = List_Create(List_Nbr(bndlist[i]), 1, sizeof(int)); for(int j = 0; j < List_Nbr(bndlist[i]); j++) { - int k; - List_Read(bndlist[i], j, &k); - List_Add(p->Boundaries[i], &k); + int k; + List_Read(bndlist[i], j, &k); + List_Add(p->Boundaries[i], &k); } } } @@ -358,7 +358,7 @@ void End_Curve(Curve *c) else if(!v[3] && fabs((R - R2) / (R + R2)) > 0.1){ // check cocircular pts (allow 10% error) Msg::Error("Control points of Circle %d are not cocircular %g %g", - c->Num, R, R2); + c->Num, R, R2); } // A1 = angle first pt @@ -719,7 +719,7 @@ int NEWREG(void) } static int compare2Lists(List_T *List1, List_T *List2, - int (*fcmp) (const void *a, const void *b)) + int (*fcmp) (const void *a, const void *b)) { int i, found; @@ -1410,7 +1410,7 @@ static void SetTranslationMatrix(double matrix[4][4], double T[3]) } static void SetSymmetryMatrix(double matrix[4][4], double A, double B, double C, - double D) + double D) { double F = -2.0 / (A * A + B * B + C * C); matrix[0][0] = 1. + A * A * F; @@ -1544,6 +1544,7 @@ static void vecmat4x4(double mat[4][4], double vec[4], double res[4]) } } +#if 0 static void printCurve(Curve *c) { Vertex *v; @@ -1552,7 +1553,7 @@ static void printCurve(Curve *c) for(int i = 0; i < N; i++) { List_Read(c->Control_Points, i, &v); Msg::Debug("Vertex %d (%g,%g,%g,%g)", v->Num, v->Pos.X, v->Pos.Y, - v->Pos.Z, v->lc); + v->Pos.Z, v->lc); } } @@ -1567,9 +1568,10 @@ static void printSurface(Surface *s) printCurve(c); } } +#endif static void ApplyTransformationToPoint(double matrix[4][4], Vertex *v, - bool end_curve_surface=false) + bool end_curve_surface=false) { double pos[4], vec[4]; @@ -1707,7 +1709,7 @@ static void ApplicationOnShapes(double matrix[4][4], List_T *shapes) break; default: Msg::Error("Impossible to transform entity %d (of type %d)", O.Num, - O.Type); + O.Type); break; } } @@ -1862,7 +1864,7 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary) break; default: Msg::Error("Impossible to take boundary of entity %d (of type %d)", O.Num, - O.Type); + O.Type); break; } } @@ -1902,11 +1904,11 @@ void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams *e) } static int Extrude_ProtudePoint(int type, int ip, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Curve **pc, Curve **prc, int final, - ExtrudeParams *e) + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Curve **pc, Curve **prc, int final, + ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3], d; Vertex V, *pv, *newp, *chapeau; @@ -2066,11 +2068,11 @@ static int Extrude_ProtudePoint(int type, int ip, } static int Extrude_ProtudeCurve(int type, int ic, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Surface **ps, int final, - ExtrudeParams *e) + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Surface **ps, int final, + ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3]; Curve *CurveBeg, *CurveEnd; @@ -2226,10 +2228,10 @@ static int Extrude_ProtudeCurve(int type, int ic, } static int Extrude_ProtudeSurface(int type, int is, - double T0, double T1, double T2, - double A0, double A1, double A2, - double X0, double X1, double X2, double alpha, - Volume **pv, ExtrudeParams *e) + double T0, double T1, double T2, + double A0, double A1, double A2, + double X0, double X1, double X2, double alpha, + Volume **pv, ExtrudeParams *e) { double matrix[4][4], T[3], Ax[3]; Curve *c, *c2; @@ -2524,7 +2526,7 @@ void ExtrudeShapes(int type, List_T *list_in, break; default: Msg::Error("Impossible to extrude entity %d (of type %d)", - shape.Num, shape.Type); + shape.Num, shape.Type); break; } } @@ -2936,17 +2938,17 @@ bool ProjectPointOnSurface(Surface *s, Vertex &p, double uv[2]) for (int i = 0; i < NSAMPLES; i++){ const double U = i / (double)(NSAMPLES - 1); for (int j = 0; j < NSAMPLES; j++){ - const double V = j / (double)(NSAMPLES - 1); - Vertex pp = InterpolateSurface(s, U, V, 0, 0); - double d2 = + const double V = j / (double)(NSAMPLES - 1); + Vertex pp = InterpolateSurface(s, U, V, 0, 0); + double d2 = (pp.Pos.X - p.Pos.X) * (pp.Pos.X - p.Pos.X) + - (pp.Pos.Y - p.Pos.Y) * (pp.Pos.Y - p.Pos.Y) + - (pp.Pos.Z - p.Pos.Z) * (pp.Pos.Z - p.Pos.Z); - if (d2 < dmin) { - dmin = d2; - uok = U; - vok = V; - } + (pp.Pos.Y - p.Pos.Y) * (pp.Pos.Y - p.Pos.Y) + + (pp.Pos.Z - p.Pos.Z) * (pp.Pos.Z - p.Pos.Z); + if (d2 < dmin) { + dmin = d2; + uok = U; + vok = V; + } } } p = InterpolateSurface(s, uok, vok, 0, 0); @@ -3165,7 +3167,7 @@ void sortEdgesInLoop(int num, List_T *edges) if(c2->end == c0->beg) { if(List_Nbr(temp)) { Msg::Info("Starting subloop %d in Line Loop %d (are you sure about this?)", - ++k, num); + ++k, num); c0 = c1 = *(Curve **)List_Pointer(temp, 0); List_Add(edges, &c1->Num); List_PSuppress(temp, 0); diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp index a43fdf65f65c044e60efc0d479d2430d7668be04..077f7b5ebeed61776baf175c84595c0ee2326493 100644 --- a/Geo/GeoInterpolation.cpp +++ b/Geo/GeoInterpolation.cpp @@ -13,7 +13,7 @@ #define SQU(a) ((a)*(a)) static Vertex InterpolateCubicSpline(Vertex *v[4], double t, double mat[4][4], - int derivee, double t1, double t2) + int derivee, double t1, double t2) { Vertex V; int i, j; @@ -86,7 +86,7 @@ static Vertex InterpolateCubicSpline(Vertex *v[4], double t, double mat[4][4], // interpolation in the parametric space ! SPoint2 InterpolateCubicSpline(Vertex *v[4], double t, double mat[4][4], - double t1, double t2, gmshSurface *s) + double t1, double t2, gmshSurface *s) { Vertex V; int i, j; @@ -386,8 +386,8 @@ Vertex InterpolateCurve(Curve *c, double u, int derivee) (1.-u)*c4+u*c2+(1.-v)*c1+v*c3-((1.-u)*(1.-v)*s1+u*(1.-v)*s2+u*v*s3+(1.-u)*v*s4) static Vertex TransfiniteQua(Vertex c1, Vertex c2, Vertex c3, Vertex c4, - Vertex s1, Vertex s2, Vertex s3, Vertex s4, - double u, double v) + Vertex s1, Vertex s2, Vertex s3, Vertex s4, + double u, double v) { Vertex V; @@ -409,7 +409,7 @@ static Vertex TransfiniteQua(Vertex c1, Vertex c2, Vertex c3, Vertex c4, #define TRAN_TRI(c1,c2,c3,s1,s2,s3,u,v) u*c2+(1.-v)*c1+v*c3-(u*(1.-v)*s2+u*v*s3); static Vertex TransfiniteTri(Vertex c1, Vertex c2, Vertex c3, - Vertex s1, Vertex s2, Vertex s3, double u, double v) + Vertex s1, Vertex s2, Vertex s3, double u, double v) { Vertex V; V.lc = TRAN_TRI(c1.lc, c2.lc, c3.lc, s1.lc, s2.lc, s3.lc, u, v); @@ -458,29 +458,29 @@ bool iSRuledSurfaceASphere(Surface *s, SPoint3 ¢er, double &radius) // try to be intelligent (hum) for(int i = 0; i < std::min(List_Nbr(s->Generatrices), 4); i++) { if(C[i]->Typ != MSH_SEGM_CIRC && C[i]->Typ != MSH_SEGM_CIRC_INV){ - isSphere = false; + isSphere = false; } else if(isSphere){ - if(!i){ - List_Read(C[i]->Control_Points, 1, &O); - ((double *)center)[0]= O->Pos.X; - ((double *)center)[1]= O->Pos.Y; - ((double *)center)[2]= O->Pos.Z; - } - else{ - Vertex *tmp; - List_Read(C[i]->Control_Points, 1, &tmp); - if(compareVertex(&O, &tmp)) - isSphere = false; - } + if(!i){ + List_Read(C[i]->Control_Points, 1, &O); + ((double *)center)[0]= O->Pos.X; + ((double *)center)[1]= O->Pos.Y; + ((double *)center)[2]= O->Pos.Z; + } + else{ + Vertex *tmp; + List_Read(C[i]->Control_Points, 1, &tmp); + if(compareVertex(&O, &tmp)) + isSphere = false; + } } } } if (isSphere){ Vertex *p = C[0]->beg; radius = sqrt ((p->Pos.X - center.x())+ - (p->Pos.Y - center.y())+ - (p->Pos.Z - center.z())); + (p->Pos.Y - center.y())+ + (p->Pos.Z - center.z())); } return isSphere; @@ -506,31 +506,31 @@ static Vertex InterpolateRuledSurface(Surface *s, double u, double v) // try to be intelligent (hum) for(int i = 0; i < std::min(List_Nbr(s->Generatrices), 4); i++) { if(C[i]->Typ != MSH_SEGM_CIRC && C[i]->Typ != MSH_SEGM_CIRC_INV){ - isSphere = false; + isSphere = false; } else if(isSphere){ - if(!i){ - List_Read(C[i]->Control_Points, 1, &O); - } - else{ - Vertex *tmp; - List_Read(C[i]->Control_Points, 1, &tmp); - if(compareVertex(&O, &tmp)) - isSphere = false; - } + if(!i){ + List_Read(C[i]->Control_Points, 1, &O); + } + else{ + Vertex *tmp; + List_Read(C[i]->Control_Points, 1, &tmp); + if(compareVertex(&O, &tmp)) + isSphere = false; + } } } if(isSphere){ double n[3] = {C[0]->Circle.invmat[0][2], - C[0]->Circle.invmat[1][2], - C[0]->Circle.invmat[2][2]}; + C[0]->Circle.invmat[1][2], + C[0]->Circle.invmat[2][2]}; bool isPlane = true; for(int i = 1; i < std::min(List_Nbr(s->Generatrices), 4); i++) - isPlane &= (n[0] == C[i]->Circle.invmat[0][2] && - n[1] == C[i]->Circle.invmat[1][2] && - n[2] == C[i]->Circle.invmat[2][2]); + isPlane &= (n[0] == C[i]->Circle.invmat[0][2] && + n[1] == C[i]->Circle.invmat[1][2] && + n[2] == C[i]->Circle.invmat[2][2]); if(isPlane) - isSphere = false; + isSphere = false; } } diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp index 96820dfc9138436750bf5932790cf0f874b96903..45444f71f0c1869cf49e527334de35778f1b0731 100644 --- a/Geo/GeoStringInterface.cpp +++ b/Geo/GeoStringInterface.cpp @@ -199,22 +199,22 @@ void add_param(std::string par, std::string value, std::string fileName) } void add_point(std::string fileName, std::string x, std::string y, - std::string z, std::string lc) + std::string z, std::string lc) { std::ostringstream sstream; sstream << "Point(" << NEWPOINT() << ") = {" << x << ", " << y << ", " - << z ; + << z ; if(lc.size()) sstream << ", " << lc; sstream << "};"; add_infile(sstream.str(), fileName); } void add_field_option(int field_id, std::string option_name, - std::string option_value, std::string fileName) + std::string option_value, std::string fileName) { std::ostringstream sstream; sstream << "Field[" << field_id << "]." << option_name << " = " - << option_value << ";"; + << option_value << ";"; add_infile(sstream.str(), fileName); } @@ -255,7 +255,7 @@ void add_circ(int p1, int p2, int p3, std::string fileName) { std::ostringstream sstream; sstream << "Circle(" << NEWLINE() << ") = {" << p1 << ", " << p2 << ", " - << p3 << "};"; + << p3 << "};"; add_infile(sstream.str(), fileName); } @@ -263,7 +263,7 @@ void add_ell(int p1, int p2, int p3, int p4, std::string fileName) { std::ostringstream sstream; sstream << "Ellipse(" << NEWLINE() << ") = {" << p1 << ", " << p2 << ", " - << p3 << ", " << p4 << "};"; + << p3 << ", " << p4 << "};"; add_infile(sstream.str(), fileName); } @@ -303,7 +303,7 @@ void add_physical(std::string type, List_T *list, std::string fileName) { std::ostringstream sstream; sstream << "Physical " << type << "(" << NEWPHYSICAL() << ") = {" - << list2string(list) << "};"; + << list2string(list) << "};"; add_infile(sstream.str(), fileName); } @@ -325,7 +325,7 @@ void rotate(int add, List_T *list, std::string fileName, std::string what, { std::ostringstream sstream; sstream << "Rotate {{" << ax << ", " << ay << ", " << az << "}, {" - << px << ", " << py << ", " << pz << "}, " << angle << "} {\n "; + << px << ", " << py << ", " << pz << "}, " << angle << "} {\n "; if(add) sstream << "Duplicata { "; sstream << what << "{" << list2string(list) << "};"; if(add) sstream << " }"; @@ -362,7 +362,7 @@ void extrude(List_T *list, std::string fileName, std::string what, { std::ostringstream sstream; sstream << "Extrude {" << tx << ", " << ty << ", " << tz << "} {\n " << what - << "{" << list2string(list) << "};\n}"; + << "{" << list2string(list) << "};\n}"; add_infile(sstream.str(), fileName); } @@ -372,8 +372,8 @@ void protude(List_T *list, std::string fileName, std::string what, { std::ostringstream sstream; sstream << "Extrude {{" << ax << ", " << ay << ", " << az << "}, {" - << px << ", " << py << ", " << pz << "}, " << angle << "} {\n " - << what << "{" << list2string(list) << "};\n}"; + << px << ", " << py << ", " << pz << "}, " << angle << "} {\n " + << what << "{" << list2string(list) << "};\n}"; add_infile(sstream.str(), fileName); } diff --git a/Geo/GeoStringInterface.h b/Geo/GeoStringInterface.h index 287d4325b8e0a982fa661974330322099a6c4858..69cda3c0fb9ed4ea0f2e001b6eeb8ff1f5636d8b 100644 --- a/Geo/GeoStringInterface.h +++ b/Geo/GeoStringInterface.h @@ -28,7 +28,7 @@ void add_multline(std::string type, std::vector<int> &p, std::string fileName); void add_circ(int p1, int p2, int p3, std::string fileName); void add_ell(int p1, int p2, int p3, int p4, std::string fileName); void add_field_option(int field_id, std::string option_name, std::string option_value, - std::string fileName); + std::string fileName); void add_field(int field_id, std::string type_name, std::string fileName); void delete_field(int field_id, std::string fileName); void set_background_field(int field_id,std::string fileName); diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp index 35f6d55bd845949c3700a27f8a03140a82e633b5..6328fd9f86b65a135cdf9b76b02385c4bd33d114 100644 --- a/Geo/GeomMeshMatcher.cpp +++ b/Geo/GeomMeshMatcher.cpp @@ -198,25 +198,25 @@ std::vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GMod SOrientedBoundingBox mesh_obb = (*candidate)->getOBB(); Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); - //if (geo_obb->intersects(mesh_obb)) { + //if (geo_obb->intersects(mesh_obb)) { //double cen_dist1 = geo_obb->getCenter()[0]-mesh_obb->getCenter()[0]; //double cen_dist2 = geo_obb->getCenter()[1]-mesh_obb->getCenter()[1]; //double cen_dist3 = geo_obb->getCenter()[2]-mesh_obb->getCenter()[2]; //double score1 = sqrt( cen_dist1*cen_dist1 - // + cen_dist2*cen_dist2 + // + cen_dist2*cen_dist2 // + cen_dist3*cen_dist3); - // double score2 = fabs(geo_obb->getSize()[0]-mesh_obb->getSize()[0]); + // double score2 = fabs(geo_obb->getSize()[0]-mesh_obb->getSize()[0]); //double score3 = fabs(geo_obb->getSize()[1]-mesh_obb->getSize()[1]); //double score4 = fabs(geo_obb->getSize()[2]-mesh_obb->getSize()[2]); double score = SOrientedBoundingBox::compare(geo_obb,mesh_obb); if (score < best_score) { best_score = score; - choice = (*candidate); - } - //} + choice = (*candidate); + } + //} } Msg::Info("Edges %i (in m1) and %i (in m2) match.", ((GEdge*)*entity1)->tag(), @@ -426,22 +426,23 @@ void GeomMeshMatcher::destroy() delete GeomMeshMatcher::_gmm_instance; } -int GeomMeshMatcher:: match(GModel* geom, GModel* mesh) +int GeomMeshMatcher:: match(GModel *geom, GModel *mesh) { mesh->createTopologyFromMesh(); // This will match VERTICES - std::vector<Pair<GVertex*,GVertex*> >* coresp_v = matchVertices(geom,mesh); + std::vector<Pair<GVertex*, GVertex*> > *coresp_v = matchVertices(geom, mesh); // This will match EDGES - std::vector<Pair<GEdge*,GEdge*> >* coresp_e = matchEdges(geom,mesh,coresp_v); + std::vector<Pair<GEdge*, GEdge*> > *coresp_e = matchEdges(geom, mesh, coresp_v); // This will match SURFACES - std::vector<Pair<GFace*,GFace*> >* coresp_f = matchFaces(geom,mesh,coresp_e); + std::vector<Pair<GFace*, GFace*> > *coresp_f = matchFaces(geom, mesh, coresp_e); // This will match REGIONS - std::vector<Pair<GRegion*,GRegion*> >* coresp_r = matchRegions(geom,mesh,coresp_f); + //std::vector<Pair<GRegion*, GRegion*> >* coresp_r = + matchRegions(geom, mesh, coresp_f); - mesh->writeMSH("out.msh",2.0,false,true); + mesh->writeMSH("out.msh", 2.0, false, true); - return (1); + return 1; } diff --git a/Geo/Homology.cpp b/Geo/Homology.cpp index aebc84b2498915da916cc01b806f501762d5a6bb..650ac8a1dcbb8bebf5955dd932f4049e00f9c38d 100644 --- a/Geo/Homology.cpp +++ b/Geo/Homology.cpp @@ -28,23 +28,23 @@ Homology::Homology(GModel* model, std::vector<int> physicalDomain, std::vector<i std::vector<GEntity*> domainEntities; std::vector<GEntity*> subdomainEntities; - for(int i = 0; i < physicalDomain.size(); i++){ + for(unsigned int i = 0; i < physicalDomain.size(); i++){ for(int j = 0; j < 4; j++){ it = groups[j].find(physicalDomain.at(i)); if(it != groups[j].end()){ std::vector<GEntity*> physicalGroup = (*it).second; - for(int k = 0; k < physicalGroup.size(); k++){ + for(unsigned int k = 0; k < physicalGroup.size(); k++){ domainEntities.push_back(physicalGroup.at(k)); } } } } - for(int i = 0; i < physicalSubdomain.size(); i++){ + for(unsigned int i = 0; i < physicalSubdomain.size(); i++){ for(int j = 0; j < 4; j++){ it = groups[j].find(physicalSubdomain.at(i)); if(it != groups[j].end()){ std::vector<GEntity*> physicalGroup = (*it).second; - for(int k = 0; k < physicalGroup.size(); k++){ + for(unsigned int k = 0; k < physicalGroup.size(); k++){ subdomainEntities.push_back(physicalGroup.at(k)); } diff --git a/Geo/Homology.h b/Geo/Homology.h index 030fd4c1bea42f40cbc0fa2cd942c06a554825f3..c5dad2dbe24d8c203f4b8529e2981c07be5ba32b 100644 --- a/Geo/Homology.h +++ b/Geo/Homology.h @@ -37,7 +37,7 @@ class Homology ~Homology(){ delete _cellComplex; } bool getCombine() { return _combine; } - bool setCombine(bool combine) { _combine = combine; } + bool setCombine(bool combine) { _combine = combine; return _combine; } void findGenerators(std::string fileName); void findThickCuts(std::string fileName); diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 13613451cad7aa0fabb440cda31010455d0ab54d..a86138812cd3170bd24612af877c98afebd21a34 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -100,7 +100,8 @@ void MElement::getShapeFunctions(double u, double v, double w, double s[], int o else Msg::Error("Function space not implemented for this type of element"); } -void MElement::getGradShapeFunctions(double u, double v, double w, double s[][3], int o) +void MElement::getGradShapeFunctions(double u, double v, double w, double s[][3], + int o) { const gmshFunctionSpace* fs = getFunctionSpace(o); if(fs) fs->df(u, v, w, s); @@ -498,21 +499,21 @@ void MElement::writeSTL(FILE *fp, bool binary, double scalingFactor) else{ char data[50]; float *coords = (float*)data; - coords[0] = n[0]; - coords[1] = n[1]; - coords[2] = n[2]; + coords[0] = (float)n[0]; + coords[1] = (float)n[1]; + coords[2] = (float)n[2]; for(int j = 0; j < 3; j++){ - coords[3 + 3 * j] = getVertex(j)->x() * scalingFactor; - coords[3 + 3 * j + 1] = getVertex(j)->y() * scalingFactor; - coords[3 + 3 * j + 2] = getVertex(j)->z() * scalingFactor; + coords[3 + 3 * j] = (float)(getVertex(j)->x() * scalingFactor); + coords[3 + 3 * j + 1] = (float)(getVertex(j)->y() * scalingFactor); + coords[3 + 3 * j + 2] = (float)(getVertex(j)->z() * scalingFactor); } data[48] = data[49] = 0; fwrite(data, sizeof(char), 50, fp); if(getNumVertices() == 4){ for(int j = 0; j < 3; j++){ - coords[3 + 3 * j] = getVertex(qid[j])->x() * scalingFactor; - coords[3 + 3 * j + 1] = getVertex(qid[j])->y() * scalingFactor; - coords[3 + 3 * j + 2] = getVertex(qid[j])->z() * scalingFactor; + coords[3 + 3 * j] = (float)(getVertex(qid[j])->x() * scalingFactor); + coords[3 + 3 * j + 1] = (float)(getVertex(qid[j])->y() * scalingFactor); + coords[3 + 3 * j + 2] = (float)(getVertex(qid[j])->z() * scalingFactor); } fwrite(data, sizeof(char), 50, fp); } @@ -579,15 +580,18 @@ void MElement::writeUNV(FILE *fp, int num, int elementary, int physical) if(physical < 0) revert(); } -void MElement::writeMESH(FILE *fp, int elementary) +void MElement::writeMESH(FILE *fp, int elementTagType, int elementary, + int physical) { setVolumePositive(); for(int i = 0; i < getNumVertices(); i++) fprintf(fp, " %d", getVertex(i)->getIndex()); - fprintf(fp, " %d\n", elementary); + fprintf(fp, " %d\n", (elementTagType == 3) ? _partition : + (elementTagType == 2) ? physical : elementary); } -void MElement::writeBDF(FILE *fp, int format, int elementary) +void MElement::writeBDF(FILE *fp, int format, int elementTagType, int elementary, + int physical) { const char *str = getStringForBDF(); if(!str) return; @@ -597,8 +601,11 @@ void MElement::writeBDF(FILE *fp, int format, int elementary) const char *cont[4] = {"E", "F", "G", "H"}; int ncont = 0; + int tag = (elementTagType == 3) ? _partition : (elementTagType == 2) ? + physical : elementary; + if(format == 0){ // free field format - fprintf(fp, "%s,%d,%d", str, _num, elementary); + fprintf(fp, "%s,%d,%d", str, _num, tag); for(int i = 0; i < n; i++){ fprintf(fp, ",%d", getVertexBDF(i)->getIndex()); if(i != n - 1 && !((i + 3) % 8)){ @@ -611,7 +618,7 @@ void MElement::writeBDF(FILE *fp, int format, int elementary) fprintf(fp, "\n"); } else{ // small or large field format - fprintf(fp, "%-8s%-8d%-8d", str, _num, elementary); + fprintf(fp, "%-8s%-8d%-8d", str, _num, tag); for(int i = 0; i < n; i++){ fprintf(fp, "%-8d", getVertexBDF(i)->getIndex()); if(i != n - 1 && !((i + 3) % 8)){ @@ -690,7 +697,7 @@ int MElement::getInfoMSH(const int typeMSH, const char **const name) } MElement *MElementFactory::create(int type, std::vector<MVertex*> &v, - int num, int part) + int num, int part) { switch (type) { case MSH_PNT: return new MPoint(v, num, part); diff --git a/Geo/MElement.h b/Geo/MElement.h index f53d7ff23d5b0ae2c3b58f295b263fab1a1085e4..3d22aeec4e6d79e3775744f50c3e1fc9123cd480 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -226,9 +226,12 @@ class MElement virtual void writeVRML(FILE *fp); virtual void writeUNV(FILE *fp, int num=0, int elementary=1, int physical=1); virtual void writeVTK(FILE *fp, bool binary=false, bool bigEndian=false); - virtual void writeMESH(FILE *fp, int elementary=1); - virtual void writeBDF(FILE *fp, int format=0, int elementary=1); - virtual void writeDIFF(FILE *fp, int num, bool binary=false, int physical_property=1); + virtual void writeMESH(FILE *fp, int elementTagType=1, int elementary=1, + int physical=0); + virtual void writeBDF(FILE *fp, int format=0, int elementTagType=1, + int elementary=1, int physical=0); + virtual void writeDIFF(FILE *fp, int num, bool binary=false, + int physical_property=1); // info for specific IO formats (returning 0 means that the element // is not implemented in that format) diff --git a/Geo/MElementCut.cpp b/Geo/MElementCut.cpp index 588a3b1a27547072234f27291c3401243e832395..a4621966fb34550896b8c5d9393f6388ce348966 100644 --- a/Geo/MElementCut.cpp +++ b/Geo/MElementCut.cpp @@ -441,7 +441,7 @@ static void elementCutMesh (MElement *e, gLevelset *ls, GEntity *ge, GModel *GM, elements[9][elementary].push_back(p2); assignPhysicals(GM, gePhysicals, elementary, 3, physicals); - for (int i = 0; i < surfTriangles.size(); i++){ + for (unsigned int i = 0; i < surfTriangles.size(); i++){ MVertex *mv[3] = {NULL, NULL, NULL}; for(int j = 0; j < 3; j++){ int numV = getElementVertexNum(surfTriangles[i].pt(j), e); @@ -559,7 +559,7 @@ static void elementCutMesh (MElement *e, gLevelset *ls, GEntity *ge, GModel *GM, elements[8][elementary].push_back(p2); assignPhysicals(GM, gePhysicals, elementary, 2, physicals); - for (int i = 0; i < boundLines.size(); i++){ + for (unsigned int i = 0; i < boundLines.size(); i++){ MVertex *mv[2] = {NULL, NULL}; for(int j = 0; j < 2; j++){ int numV = getElementVertexNum(boundLines[i].pt(j), e); @@ -652,7 +652,7 @@ static void elementCutMesh (MElement *e, gLevelset *ls, GEntity *ge, GModel *GM, { DI_Point P(e->getVertex(0)->x(), e->getVertex(0)->y(), e->getVertex(0)->z()); P.computeLs(*ls); - int reg = P.lsTag() * elementary; + int reg = (int)(P.lsTag() * elementary); elements[0][reg].push_back(copy); assignPhysicals(GM, gePhysicals, reg, 0, physicals); } @@ -682,7 +682,7 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls, int numEle = gm->getNumMeshElements(); for(unsigned int i = 0; i < gmEntities.size(); i++) { - for(int j = 0; j < gmEntities[i]->getNumMeshElements(); j++) { + for(unsigned int j = 0; j < gmEntities[i]->getNumMeshElements(); j++) { MElement *e = gmEntities[i]->getMeshElement(j); elementCutMesh (e, ls, gmEntities[i], gm, numEle, vertexMap, newVertices, elements, border, physicals, entityCut); @@ -727,7 +727,7 @@ GModel *buildCutMesh(GModel *gm, gLevelset *ls, for(unsigned int i = 0; i < newVertices.size(); i++) { newVertices[i]->setNum(++num); vertexMap[num] = newVertices[i]; - }printf("numbering vertices finished : %d vertices \n",vertexMap.size()); + }printf("numbering vertices finished : %d vertices \n", (int)vertexMap.size()); return cutGM; #else diff --git a/Geo/MHexahedron.h b/Geo/MHexahedron.h index 302df4efc9d8de502a1b3434b75a3eff825d3f63..31a59a7cca40d09a9b8a1533011bdcc12ec4d830 100644 --- a/Geo/MHexahedron.h +++ b/Geo/MHexahedron.h @@ -88,9 +88,9 @@ class MHexahedron : public MElement { virtual MFace getFace(int num) { return MFace(_v[faces_hexa(num, 0)], - _v[faces_hexa(num, 1)], - _v[faces_hexa(num, 2)], - _v[faces_hexa(num, 3)]); + _v[faces_hexa(num, 1)], + _v[faces_hexa(num, 2)], + _v[faces_hexa(num, 3)]); } virtual int getNumFacesRep(){ return 12; } virtual void getFaceRep(int num, double *x, double *y, double *z, SVector3 *n) @@ -262,13 +262,13 @@ class MHexahedron20 : public MHexahedron { virtual MVertex *getVertexMED(int num) { static const int map[20] = {0, 3, 2, 1, 4, 7, 6, 5, 9, 13, 11, - 8, 17, 19, 18, 16, 10, 15, 14, 12}; + 8, 17, 19, 18, 16, 10, 15, 14, 12}; return getVertex(map[num]); } virtual MVertex *getVertexDIFF(int num) { static const int map[20] = {2, 3, 7, 6, 0, 1, 5, 4, 9, 18, 12, - 19, 14, 11, 15, 13, 8, 16, 17, 10}; + 19, 14, 11, 15, 13, 8, 16, 17, 10}; return getVertex(map[num]); } virtual int getNumEdgeVertices() const { return 12; } diff --git a/Geo/MTetrahedron.h b/Geo/MTetrahedron.h index d3ed297d774718b9f2bb8ee99388974be935f18c..d2a0f3c9a41000114eb5423c83494e8dafa4c94d 100644 --- a/Geo/MTetrahedron.h +++ b/Geo/MTetrahedron.h @@ -86,8 +86,8 @@ class MTetrahedron : public MElement { virtual MFace getFace(int num) { return MFace(_v[faces_tetra(num, 0)], - _v[faces_tetra(num, 1)], - _v[faces_tetra(num, 2)]); + _v[faces_tetra(num, 1)], + _v[faces_tetra(num, 2)]); } virtual int getNumFacesRep(){ return 4; } virtual void getFaceRep(int num, double *x, double *y, double *z, SVector3 *n) @@ -274,12 +274,12 @@ class MTetrahedron10 : public MTetrahedron { * ,/ | `\ E = order - 1 * ,/ '. `\ C = 4 + 6*E * ,/ | `\ F = ((order - 1)*(order - 2))/2 - * ,/ | `\ N = total number of vertices + * ,/ | `\ N = total number of vertices * 0-----------'.--------1 * `\. | ,/ Interior vertex numbers * `\. | ,/ for edge 0 <= i <= 5: 4+i*E to 3+(i+1)*E - * `\. '. ,/ for face 0 <= j <= 3: C+j*F to C-1+(j+1)*F - * `\. |/ in volume : C+4*F to N-1 + * `\. '. ,/ for face 0 <= j <= 3: C+j*F to C-1+(j+1)*F + * `\. |/ in volume : C+4*F to N-1 * `3 * */ @@ -293,12 +293,12 @@ class MTetrahedron10 : public MTetrahedron { * ,5 | `6 E = order - 1 * ,/ 12 `\ C = 4 + 6*E * ,4 | `7 F = ((order - 1)*(order - 2))/2 - * ,/ | `\ N = total number of vertices + * ,/ | `\ N = total number of vertices * 0-----9-----'.--8-----1 * `\. | ,/ Interior vertex numbers * 10. 13 ,14 for edge 0 <= i <= 5: 4+i*E to 3+(i+1)*E - * `\. '. 15 for face 0 <= j <= 3: C+j*F to C-1+(j+1)*F - * 11\.|/ in volume : C+4*F to N-1 + * `\. '. 15 for face 0 <= j <= 3: C+j*F to C-1+(j+1)*F + * 11\.|/ in volume : C+4*F to N-1 * `3 * */ @@ -348,7 +348,7 @@ class MTetrahedronN : public MTetrahedron { double _disto; public: MTetrahedronN(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, - std::vector<MVertex*> &v, char order, int num=0, int part=0) + std::vector<MVertex*> &v, char order, int num=0, int part=0) : MTetrahedron(v0, v1, v2, v3, num, part) , _vs (v), _order(order),_disto(-1.e22) { for(unsigned int i = 0; i < _vs.size(); i++) _vs[i]->setPolynomialOrder(_order); diff --git a/Geo/MVertex.cpp b/Geo/MVertex.cpp index 1080981bdb7da8c1050cb02c592d6aee72e26326..d7cdd0485900265eb4df44ced3a4bda707667db8 100644 --- a/Geo/MVertex.cpp +++ b/Geo/MVertex.cpp @@ -63,7 +63,7 @@ void MVertex::writeMSH(FILE *fp, bool binary, bool saveParametric, double scalin double _u; getParameter(0, _u); if(!binary) - fprintf(fp, " %.16g\n", _u); + fprintf(fp, " %.16g\n", _u); else fwrite(&_u, sizeof(double), 1, fp); } @@ -80,7 +80,7 @@ void MVertex::writeMSH(FILE *fp, bool binary, bool saveParametric, double scalin } else if(!binary) - fprintf(fp, "\n"); + fprintf(fp, "\n"); } } @@ -120,7 +120,7 @@ void MVertex::writeVTK(FILE *fp, bool binary, double scalingFactor, bool bigEndi } else{ fprintf(fp, "%.16g %.16g %.16g\n", - x() * scalingFactor, y() * scalingFactor, z() * scalingFactor); + x() * scalingFactor, y() * scalingFactor, z() * scalingFactor); } } @@ -220,19 +220,19 @@ static void getAllParameters(MVertex *v, GFace *gf, std::vector<SPoint2> ¶ms bool seam = false; for(std::list<GEdge*>::iterator it = ed.begin(); it != ed.end(); it++){ if((*it)->isSeam(gf)) { - Range<double> range = (*it)->parBounds(0); - if (gv == (*it)->getBeginVertex()){ - params.push_back((*it)->reparamOnFace(gf, range.low(),-1)); - params.push_back((*it)->reparamOnFace(gf, range.low(), 1)); - } - else if (gv == (*it)->getEndVertex()){ - params.push_back((*it)->reparamOnFace(gf, range.high(),-1)); - params.push_back((*it)->reparamOnFace(gf, range.high(), 1)); - } - else{ + Range<double> range = (*it)->parBounds(0); + if (gv == (*it)->getBeginVertex()){ + params.push_back((*it)->reparamOnFace(gf, range.low(),-1)); + params.push_back((*it)->reparamOnFace(gf, range.low(), 1)); + } + else if (gv == (*it)->getEndVertex()){ + params.push_back((*it)->reparamOnFace(gf, range.high(),-1)); + params.push_back((*it)->reparamOnFace(gf, range.high(), 1)); + } + else{ Msg::Warning("Strange!"); - } - seam = true; + } + seam = true; } } if (!seam) @@ -312,8 +312,8 @@ bool reparamMeshVertexOnFace(const MVertex *v, const GFace *gf, SPoint2 ¶m) return true; } - if(v->onWhat()->geomType() == GEntity::DiscreteCurve || - v->onWhat()->geomType() == GEntity::BoundaryLayerCurve){ + if(v->onWhat()->geomType() == GEntity::DiscreteCurve || + v->onWhat()->geomType() == GEntity::BoundaryLayerCurve){ param = gf->parFromPoint(SPoint3(v->x(), v->y(), v->z())); return true; } diff --git a/Geo/MVertex.h b/Geo/MVertex.h index 6a17d5e014ad5728ee2f801859a1ae9257dc7fe1..d755cfb9a5929388796f54e29a1c185049a60872 100644 --- a/Geo/MVertex.h +++ b/Geo/MVertex.h @@ -117,7 +117,7 @@ class MVertex{ void writeVRML(FILE *fp, double scalingFactor=1.0); void writeUNV(FILE *fp, double scalingFactor=1.0); void writeVTK(FILE *fp, bool binary=false, double scalingFactor=1.0, - bool bigEndian=false); + bool bigEndian=false); void writeMESH(FILE *fp, double scalingFactor=1.0); void writeBDF(FILE *fp, int format=0, double scalingFactor=1.0); void writeDIFF(FILE *fp, bool binary, double scalingFactor=1.0); diff --git a/Geo/Makefile b/Geo/Makefile deleted file mode 100644 index f1f17316d3775ea90ddffd0b28049c18b1d7ed0c..0000000000000000000000000000000000000000 --- a/Geo/Makefile +++ /dev/null @@ -1,455 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshGeo${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../contrib/ANN/include\ - ${DASH}I../contrib/kbipack ${DASH}I../contrib/DiscreteIntegration\ - ${DASH}I../contrib/MathEval ${DASH}I../contrib/gmm - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = GEntity.cpp STensor3.cpp\ - GVertex.cpp GEdge.cpp GFace.cpp GRegion.cpp\ - GEdgeLoop.cpp GEdgeCompound.cpp GFaceCompound.cpp GRegionCompound.cpp\ - gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp gmshSurface.cpp\ - OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp\ - discreteEdge.cpp discreteFace.cpp discreteRegion.cpp\ - fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp\ - GModel.cpp\ - GModelIO_Geo.cpp\ - GModelIO_Mesh.cpp\ - GModelIO_OCC.cpp\ - OCC_Connect.cpp\ - GModelIO_Fourier.cpp\ - GModelIO_CGNS.cpp\ - GModelIO_MED.cpp\ - ExtrudeParams.cpp\ - Geo.cpp\ - GeoStringInterface.cpp GeoInterpolation.cpp\ - findLinks.cpp\ - SOrientedBoundingBox.cpp\ - GeomMeshMatcher.cpp\ - MVertex.cpp\ - MFace.cpp\ - MElement.cpp\ - MLine.cpp MTriangle.cpp MQuadrangle.cpp MTetrahedron.cpp\ - MHexahedron.cpp MPrism.cpp MPyramid.cpp MElementCut.cpp\ - MZone.cpp MZoneBoundary.cpp\ - CellComplex.cpp ChainComplex.cpp Homology.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -GEntity${OBJEXT}: GEntity.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -STensor3${OBJEXT}: STensor3.cpp STensor3.h SVector3.h SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -GVertex${OBJEXT}: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GFace.h GEdgeLoop.h GEdge.h MPoint.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h -GEdge${OBJEXT}: GEdge.cpp ../Common/GmshConfig.h ../Common/GmshDefines.h \ - ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h MLine.h MElement.h \ - MVertex.h MEdge.h MFace.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/GaussLegendre1D.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -GFace${OBJEXT}: GFace.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h MTriangle.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - MQuadrangle.h MElementCut.h MTetrahedron.h MLine.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Numeric/EigSolve.h \ - ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -GRegion${OBJEXT}: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h MTetrahedron.h \ - MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - MHexahedron.h MPrism.h MPyramid.h MElementCut.h MTriangle.h MLine.h \ - ../Common/VertexArray.h ../Geo/SVector3.h -GEdgeLoop${OBJEXT}: GEdgeLoop.cpp GEdgeLoop.h GEdge.h GEntity.h Range.h \ - SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h \ - Pair.h GVertex.h GPoint.h ../Common/GmshMessage.h -GEdgeCompound${OBJEXT}: GEdgeCompound.cpp ../Common/GmshConfig.h GEdgeCompound.h \ - GFace.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdgeLoop.h \ - GEdge.h GVertex.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/GmshMessage.h -GFaceCompound${OBJEXT}: GFaceCompound.cpp ../Common/GmshConfig.h GFaceCompound.h \ - GFace.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdgeLoop.h \ - GEdge.h GVertex.h GEdgeCompound.h MLine.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h MTriangle.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Octree.h \ - ../Common/OctreeInternals.h ../Numeric/gmshAssembler.h \ - ../Numeric/gmshLinearSystem.h ../Numeric/gmshLaplace.h \ - ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshFunction.h ../Numeric/gmshAssembler.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Numeric/gmshFunction.h ../Common/Gmsh.h \ - ../Common/GmshMessage.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshConvexCombination.h ../Numeric/gmshTermOfFormulation.h \ - ../Numeric/gmshFunction.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h \ - ../Numeric/gmshLinearSystemCSR.h ../Numeric/gmshLinearSystem.h \ - ../Numeric/gmshLinearSystemFull.h ../Numeric/gmshLinearSystem.h \ - ../Numeric/GmshMatrix.h -GRegionCompound${OBJEXT}: GRegionCompound.cpp ../Common/GmshConfig.h \ - GRegionCompound.h GRegion.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h GFaceCompound.h \ - GEdgeCompound.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/GmshMessage.h -gmshVertex${OBJEXT}: gmshVertex.cpp GFace.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdgeLoop.h GEdge.h GVertex.h gmshVertex.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoInterpolation.h MVertex.h MPoint.h MElement.h MEdge.h MFace.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h -gmshEdge${OBJEXT}: gmshEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h GFaceCompound.h \ - GEdgeCompound.h gmshEdge.h Geo.h ../Common/GmshDefines.h gmshSurface.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \ - ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \ - ../Common/SmoothData.h GeoInterpolation.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -gmshFace${OBJEXT}: gmshFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h gmshFace.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoInterpolation.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -gmshRegion${OBJEXT}: gmshRegion.cpp GModel.h GVertex.h GEntity.h Range.h \ - SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h \ - Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h gmshRegion.h \ - Geo.h ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h -gmshSurface${OBJEXT}: gmshSurface.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gmshSurface.h Pair.h Range.h SPoint2.h \ - SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -OCCVertex${OBJEXT}: OCCVertex.cpp ../Common/GmshConfig.h GModel.h GVertex.h \ - GEntity.h Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h \ - SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \ - GRegion.h MVertex.h MPoint.h MElement.h ../Common/GmshDefines.h MEdge.h \ - MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h OCCVertex.h OCCIncludes.h \ - OCCEdge.h OCCFace.h -OCCEdge${OBJEXT}: OCCEdge.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h OCCEdge.h OCCVertex.h OCCIncludes.h \ - OCCFace.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -OCCFace${OBJEXT}: OCCFace.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \ - OCCFace.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -OCCRegion${OBJEXT}: OCCRegion.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \ - OCCFace.h OCCRegion.h -discreteEdge${OBJEXT}: discreteEdge.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h discreteEdge.h GModel.h GVertex.h GEntity.h \ - Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h \ - SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - discreteVertex.h MVertex.h MLine.h MElement.h ../Common/GmshDefines.h \ - MEdge.h MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - MPoint.h MTriangle.h MQuadrangle.h MPrism.h MTetrahedron.h \ - MHexahedron.h MPyramid.h Geo.h gmshSurface.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h -discreteFace${OBJEXT}: discreteFace.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h discreteFace.h GModel.h GVertex.h GEntity.h \ - Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h \ - SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - discreteEdge.h discreteVertex.h MVertex.h MEdge.h MTriangle.h \ - MElement.h ../Common/GmshDefines.h MFace.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h Geo.h gmshSurface.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h -discreteRegion${OBJEXT}: discreteRegion.cpp ../Common/GmshConfig.h \ - discreteRegion.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h MVertex.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h -fourierEdge${OBJEXT}: fourierEdge.cpp ../Common/GmshConfig.h fourierEdge.h \ - GEdge.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GVertex.h GPoint.h \ - GModel.h GFace.h GEdgeLoop.h GRegion.h fourierVertex.h MVertex.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -fourierFace${OBJEXT}: fourierFace.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h fourierVertex.h GModel.h GVertex.h GEntity.h \ - Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h \ - SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - MVertex.h fourierFace.h fourierEdge.h -fourierProjectionFace${OBJEXT}: fourierProjectionFace.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h fourierProjectionFace.h GModel.h GVertex.h \ - GEntity.h Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h \ - SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \ - GRegion.h ../Common/VertexArray.h ../Geo/SVector3.h -GModel${OBJEXT}: GModel.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h MPoint.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - MLine.h MTriangle.h MQuadrangle.h MTetrahedron.h MHexahedron.h MPrism.h \ - MPyramid.h MElementCut.h discreteRegion.h discreteFace.h discreteEdge.h \ - discreteVertex.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Common/SmoothData.h ../Mesh/Field.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Post/PView.h ../Geo/SPoint3.h ../Mesh/Generator.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -GModelIO_Geo${OBJEXT}: GModelIO_Geo.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/TreeUtils.h \ - ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \ - ../Common/SmoothData.h ../Common/OpenFile.h gmshVertex.h gmshFace.h \ - GFaceCompound.h GEdgeCompound.h GRegionCompound.h gmshEdge.h \ - gmshRegion.h ../Mesh/Field.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Parser/Parser.h -GModelIO_Mesh${OBJEXT}: GModelIO_Mesh.cpp GModel.h GVertex.h GEntity.h Range.h \ - SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h \ - Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - ../Common/GmshDefines.h MPoint.h MElement.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - MLine.h MTriangle.h MQuadrangle.h MTetrahedron.h MHexahedron.h MPrism.h \ - MPyramid.h MElementCut.h ../Common/StringUtils.h discreteVertex.h \ - discreteEdge.h discreteFace.h discreteRegion.h GEdgeCompound.h \ - GFaceCompound.h -GModelIO_OCC${OBJEXT}: GModelIO_OCC.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GModelIO_OCC.h GModel.h GVertex.h GEntity.h \ - Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h \ - SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - OCCIncludes.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h OCCVertex.h OCCEdge.h OCCFace.h \ - OCCRegion.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h \ - MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h MLine.h ../Common/OpenFile.h OCC_Connect.h -OCC_Connect${OBJEXT}: OCC_Connect.cpp OCC_Connect.h ../Common/GmshConfig.h -GModelIO_Fourier${OBJEXT}: GModelIO_Fourier.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h fourierVertex.h \ - MVertex.h fourierEdge.h fourierFace.h GModelIO_Fourier.h -GModelIO_CGNS${OBJEXT}: GModelIO_CGNS.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h CGNSOptions.h -GModelIO_MED${OBJEXT}: GModelIO_MED.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ - SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h -ExtrudeParams${OBJEXT}: ExtrudeParams.cpp ../Common/GmshMessage.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ - SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h -Geo${OBJEXT}: Geo.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/MallocUtils.h \ - Geo.h ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ - SPoint3.h SVector3.h SBoundingBox3d.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h GModel.h GVertex.h GEntity.h \ - SOrientedBoundingBox.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \ - GeoInterpolation.h ../Mesh/Field.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -GeoStringInterface${OBJEXT}: GeoStringInterface.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/StringUtils.h Geo.h ../Common/GmshDefines.h gmshSurface.h \ - Pair.h Range.h SPoint2.h SPoint3.h SVector3.h SBoundingBox3d.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ - GeoStringInterface.h ../Common/OpenFile.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h GModel.h GVertex.h \ - GEntity.h SOrientedBoundingBox.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \ - GRegion.h ../Parser/Parser.h -GeoInterpolation${OBJEXT}: GeoInterpolation.cpp ../Common/GmshMessage.h Geo.h \ - ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \ - SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \ - GeoStringInterface.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -findLinks${OBJEXT}: findLinks.cpp ../Common/GmshMessage.h GModel.h GVertex.h \ - GEntity.h Range.h SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h \ - SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \ - GRegion.h ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h -SOrientedBoundingBox${OBJEXT}: SOrientedBoundingBox.cpp SOrientedBoundingBox.h \ - SVector3.h SPoint3.h SPoint2.h Pair.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Mesh/DivideAndConquer.h SBoundingBox3d.h -GeomMeshMatcher${OBJEXT}: GeomMeshMatcher.cpp GeomMeshMatcher.h GModel.h \ - GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \ - SOrientedBoundingBox.h SVector3.h SPoint2.h Pair.h GPoint.h GEdge.h \ - GFace.h GEdgeLoop.h GRegion.h discreteVertex.h MVertex.h \ - ../Common/GmshMessage.h -MVertex${OBJEXT}: MVertex.cpp MVertex.h SPoint2.h SPoint3.h GVertex.h GEntity.h \ - Range.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GFaceCompound.h GEdgeCompound.h \ - ../Common/GmshMessage.h ../Common/StringUtils.h -MFace${OBJEXT}: MFace.cpp ../Common/GmshConfig.h MFace.h MVertex.h SPoint2.h \ - SPoint3.h MEdge.h SVector3.h ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -MElement${OBJEXT}: MElement.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - MElement.h ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h \ - MEdge.h SVector3.h MFace.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h MPoint.h MLine.h MTriangle.h \ - MQuadrangle.h MTetrahedron.h MHexahedron.h MPrism.h MPyramid.h \ - MElementCut.h GEntity.h Range.h SBoundingBox3d.h SOrientedBoundingBox.h \ - Pair.h GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h \ - ../Common/StringUtils.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -MLine${OBJEXT}: MLine.cpp MLine.h MElement.h ../Common/GmshDefines.h MVertex.h \ - SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Numeric/GaussLegendre1D.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Mesh/qualityMeasures.h -MTriangle${OBJEXT}: MTriangle.cpp MTriangle.h MElement.h ../Common/GmshDefines.h \ - MVertex.h SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Mesh/qualityMeasures.h -MQuadrangle${OBJEXT}: MQuadrangle.cpp MQuadrangle.h MElement.h \ - ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \ - SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Mesh/qualityMeasures.h -MTetrahedron${OBJEXT}: MTetrahedron.cpp MTetrahedron.h MElement.h \ - ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \ - SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Mesh/qualityMeasures.h ../Mesh/meshGFaceDelaunayInsertion.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Mesh/meshGRegionDelaunayInsertion.h \ - ../Geo/MTetrahedron.h ../Mesh/BackgroundMesh.h \ - ../Mesh/qualityMeasures.h -MHexahedron${OBJEXT}: MHexahedron.cpp MHexahedron.h MElement.h \ - ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h MEdge.h \ - SVector3.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -MPrism${OBJEXT}: MPrism.cpp MPrism.h MElement.h ../Common/GmshDefines.h \ - MVertex.h SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -MPyramid${OBJEXT}: MPyramid.cpp MPyramid.h MElement.h ../Common/GmshDefines.h \ - MVertex.h SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -MElementCut${OBJEXT}: MElementCut.cpp GModel.h GVertex.h GEntity.h Range.h \ - SPoint3.h SBoundingBox3d.h SOrientedBoundingBox.h SVector3.h SPoint2.h \ - Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h MElement.h \ - ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - MElementCut.h MTetrahedron.h MTriangle.h MLine.h -MZone${OBJEXT}: MZone.cpp ../Common/GmshConfig.h -MZoneBoundary${OBJEXT}: MZoneBoundary.cpp ../Common/GmshConfig.h -CellComplex${OBJEXT}: CellComplex.cpp CellComplex.h ../Common/GmshConfig.h \ - MElement.h ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h \ - MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - MPoint.h MLine.h MTriangle.h MTetrahedron.h GModel.h GVertex.h \ - GEntity.h Range.h SBoundingBox3d.h SOrientedBoundingBox.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h ../Common/OS.h -ChainComplex${OBJEXT}: ChainComplex.cpp ChainComplex.h ../Common/GmshConfig.h \ - MElement.h ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h \ - MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - GModel.h GVertex.h GEntity.h Range.h SBoundingBox3d.h \ - SOrientedBoundingBox.h Pair.h GPoint.h GEdge.h GFace.h GEdgeLoop.h \ - GRegion.h CellComplex.h MPoint.h MLine.h MTriangle.h MTetrahedron.h -Homology${OBJEXT}: Homology.cpp Homology.h CellComplex.h ../Common/GmshConfig.h \ - MElement.h ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h \ - MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - MPoint.h MLine.h MTriangle.h MTetrahedron.h GModel.h GVertex.h \ - GEntity.h Range.h SBoundingBox3d.h SOrientedBoundingBox.h Pair.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h ChainComplex.h \ - ../Common/OS.h diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index 2211896adaf23274395a59b4e4784dbee589f8fd..6f88d6c384aa5e37b6f5e6d70790574ff8a80365 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -62,7 +62,7 @@ SPoint2 OCCEdge::reparamOnFace(const GFace *face, double epar, int dir) const if(c2d.IsNull()){ Msg::Fatal("Reparam on face failed: curve %d is not on surface %d", - tag(), face->tag()); + tag(), face->tag()); } double u, v; @@ -78,11 +78,11 @@ SPoint2 OCCEdge::reparamOnFace(const GFace *face, double epar, int dir) const if(sqrt(dx * dx + dy * dy + dz * dz) > 1.e-4 * CTX::instance()->lc){ // return reparamOnFace(face, epar,-1); Msg::Warning("Reparam on face partially failed for curve %d surface %d at point %g", - tag(), face->tag(), epar); + tag(), face->tag(), epar); Msg::Warning("On the face %d local (%g %g) global (%g %g %g)", - face->tag(), u, v, p2.x(), p2.y(), p2.z()); + face->tag(), u, v, p2.x(), p2.y(), p2.z()); Msg::Warning("On the edge %d local (%g) global (%g %g %g)", - tag(), epar, p1.x(), p1.y(), p1.z()); + tag(), epar, p1.x(), p1.y(), p1.z()); // GPoint ppp = face->closestPoint(SPoint3(p1.x(), p1.y(), p1.z())); // return SPoint2(ppp.u(), ppp.v()); } diff --git a/Geo/OCCRegion.cpp b/Geo/OCCRegion.cpp index ee520b925c594f3bd02cf800745007fa85baf34f..1f3c7f5e4e5e312f044adeff211d827929f14b6d 100644 --- a/Geo/OCCRegion.cpp +++ b/Geo/OCCRegion.cpp @@ -25,11 +25,11 @@ OCCRegion::OCCRegion(GModel *m, TopoDS_Solid _s, int num, TopTools_IndexedMapOfS int index = fmap.FindIndex(face); GFace *f = m->getFaceByTag(index); if(f){ - l_faces.push_back(f); - f->addRegion(this); + l_faces.push_back(f); + f->addRegion(this); } else - Msg::Error("Unknown face %d in region %d", index, num); + Msg::Error("Unknown face %d in region %d", index, num); } } Msg::Info("OCC Region %d with %d faces", num, l_faces.size()); diff --git a/Geo/OCC_Connect.cpp b/Geo/OCC_Connect.cpp index aba904d4814224be369464c9759ffcfa24030ec3..8cdf8c14edcec88cb945ab79468f25415e0cf740 100644 --- a/Geo/OCC_Connect.cpp +++ b/Geo/OCC_Connect.cpp @@ -116,13 +116,13 @@ bool OCC_Connect::LessThanIntegerSet::operator()(std::set<int> const &a, { std::set<int>::const_iterator pa=a.begin(), pb=b.begin(); for(; pa!=a.end() && pb!=b.end(); pa++, pb++ ) { - if(*pa<*pb) - return 1; - if(*pb<*pa) - return 0; + if(*pa<*pb) + return 1; + if(*pb<*pa) + return 0; } if(pb!=b.end()) - return 1; + return 1; return 0; } @@ -140,10 +140,10 @@ int OCC_Connect::SaveBRep(char const *name) BB.MakeCompound(compound); TopTools_ListOfShape p; for(p=scale.Modified(assembly.front()); - !p.IsEmpty(); - p.RemoveFirst() + !p.IsEmpty(); + p.RemoveFirst() ) - BB.Add(compound,p.First()); + BB.Add(compound,p.First()); BRepTools::Write(compound, (char*)name); return 1; } @@ -173,7 +173,7 @@ void OCC_Connect::Collect(void) BB.MakeCompound(result); while(assembly.size()>0) { if(verbose&Cutting) - cout << "Adding item\n"; + cout << "Adding item\n"; BB.Add(result,assembly.front()); assembly.pop_front(); } @@ -222,35 +222,35 @@ void FinishEdge(int edge, int fv=e2v[edge].first; v2e[fv].erase(edge); while(v2e[fv].size()>1) { - std::set<int>::iterator e=v2e[fv].begin(); - int nv=v2e.size(); - v2e.push_back(std::set<int>()); - v2e[nv].insert(*e); - if(e2v[*e].first==fv) - e2v[*e].first=nv; - else - e2v[*e].second=nv; - if(verbose) + std::set<int>::iterator e=v2e[fv].begin(); + int nv=v2e.size(); + v2e.push_back(std::set<int>()); + v2e[nv].insert(*e); + if(e2v[*e].first==fv) + e2v[*e].first=nv; + else + e2v[*e].second=nv; + if(verbose) std::cout << "Created vertex " << nv << "(" << fv << "), edge[" << *e << "]=" << e2v[*e].first << " " << e2v[*e].second << "\n"; - v2e[fv].erase(*e); + v2e[fv].erase(*e); } int sv=e2v[edge].second; v2e[sv].erase(edge); while(v2e[sv].size()>1) { - std::set<int>::iterator e=v2e[sv].begin(); - int nv=v2e.size(); - v2e.push_back(std::set<int>()); - v2e[nv].insert(*e); - if(e2v[*e].first==sv) - e2v[*e].first=nv; - else - e2v[*e].second=nv; - if(verbose) + std::set<int>::iterator e=v2e[sv].begin(); + int nv=v2e.size(); + v2e.push_back(std::set<int>()); + v2e[nv].insert(*e); + if(e2v[*e].first==sv) + e2v[*e].first=nv; + else + e2v[*e].second=nv; + if(verbose) std::cout << "Created vertex " << nv << "(" << sv << "), edge[" << *e << "]=" << e2v[*e].first << " " << e2v[*e].second << "\n"; - v2e[sv].erase(*e); + v2e[sv].erase(*e); } } @@ -299,27 +299,27 @@ void OCC_Connect::FaceCutters::Build(TopoDS_Face const &face, int open_mode = -1; std::set<int> current_vertices; for(unsigned int start = 0; start < v2e.size(); start++) { - if(v2e[start].size()==1) { - if(verbose&Cutting) + if(v2e[start].size()==1) { + if(verbose&Cutting) std::cout << "start open at " << start << "\n"; - current_vertices.insert(start); - open_mode=1; - break; - } + current_vertices.insert(start); + open_mode=1; + break; + } } if(!current_vertices.size()) { - for(unsigned int start = 0; start < v2e.size(); start++) { - if(v2e[start].size()) { - if(verbose&Cutting) + for(unsigned int start = 0; start < v2e.size(); start++) { + if(v2e[start].size()) { + if(verbose&Cutting) std::cout << "start closed at " << start << "\n"; - current_vertices.insert(start); - open_mode=0; - break; - } - } + current_vertices.insert(start); + open_mode=0; + break; + } + } } if(!current_vertices.size()) - break; + break; std::map<int,std::deque<int> > wires; std::set<int> processed_edges; @@ -334,80 +334,80 @@ void OCC_Connect::FaceCutters::Build(TopoDS_Face const &face, e++ ) { if(processed_edges.count(*e)) - continue; - - int other=e2v[*e].first==*v? - e2v[*e].second:e2v[*e].first; - - if(open_mode) { - if(v2e[other].size()==1) { - // Other is open end too, finish wire. - wires[*v].push_back(*e); - std::deque<int>::const_iterator p; - BRepBuilderAPI_MakeWire wire; - if(verbose&Cutting) + continue; + + int other=e2v[*e].first==*v? + e2v[*e].second:e2v[*e].first; + + if(open_mode) { + if(v2e[other].size()==1) { + // Other is open end too, finish wire. + wires[*v].push_back(*e); + std::deque<int>::const_iterator p; + BRepBuilderAPI_MakeWire wire; + if(verbose&Cutting) std::cout << "CUT Open wire:"; - for(p=wires[*v].begin(); - p!=wires[*v].end(); - p++ - ) { - FinishEdge(*p, v2e, e2v); - wire.Add(edges[*p]); - if(verbose&Cutting) + for(p=wires[*v].begin(); + p!=wires[*v].end(); + p++ + ) { + FinishEdge(*p, v2e, e2v); + wire.Add(edges[*p]); + if(verbose&Cutting) std::cout << ' ' << (*p)+1; - } - if(verbose&Cutting) + } + if(verbose&Cutting) std::cout << "\n"; - push_back(wire); - goto next_vertex; - } - } else { - if( current_vertices.count(other) || - next_vertices.count(other) - ) { + push_back(wire); + goto next_vertex; + } + } else { + if( current_vertices.count(other) || + next_vertices.count(other) + ) { if(verbose&Cutting) std::cout << "CUT Closed wire:"; - wires[*v].push_back(*e); - while(wires[other].front() - ==wires[*v].front() - ) { - wires[other].pop_front(); - wires[*v].pop_front(); - } - - BRepBuilderAPI_MakeWire wire; - std::deque<int>::const_iterator p; - for(p=wires[other].begin(); - p!=wires[other].end(); - p++ - ) { - FinishEdge(*p, v2e, e2v); - wire.Add(edges[*p]); + wires[*v].push_back(*e); + while(wires[other].front() + ==wires[*v].front() + ) { + wires[other].pop_front(); + wires[*v].pop_front(); + } + + BRepBuilderAPI_MakeWire wire; + std::deque<int>::const_iterator p; + for(p=wires[other].begin(); + p!=wires[other].end(); + p++ + ) { + FinishEdge(*p, v2e, e2v); + wire.Add(edges[*p]); if(verbose&Cutting) std::cout << ' ' << (*p)+1; - } - std::deque<int>::reverse_iterator rp; - for(rp=wires[*v].rbegin(); - rp!=wires[*v].rend(); - rp++ - ) { - FinishEdge(*rp, v2e, e2v); - wire.Add(edges[*rp]); + } + std::deque<int>::reverse_iterator rp; + for(rp=wires[*v].rbegin(); + rp!=wires[*v].rend(); + rp++ + ) { + FinishEdge(*rp, v2e, e2v); + wire.Add(edges[*rp]); if(verbose&Cutting) std::cout << ' ' << (*rp)+1; - } + } if(verbose&Cutting) std::cout << "\n"; - push_back(wire); - goto next_vertex; - } - } - if(current_vertices.count(other)==0) { - wires[other]=wires[*v]; - wires[other].push_back(*e); - processed_edges.insert(*e); - next_vertices.insert(other); - } + push_back(wire); + goto next_vertex; + } + } + if(current_vertices.count(other)==0) { + wires[other]=wires[*v]; + wires[other].push_back(*e); + processed_edges.insert(*e); + next_vertices.insert(other); + } } } current_vertices=next_vertices; @@ -484,7 +484,7 @@ inline OCC_Connect::cutmap_t OCC_Connect::SelectCuttingEdges( } if(verbose&Cutting) - cout << "Accepted edge " << edge << " in face " << face << endl; + cout << "Accepted edge " << edge << " in face " << face << endl; // Add missing PCurve if necessary Handle_Geom2d_Curve c=BRep_Tool::CurveOnSurface(c_edge,c_face,s,e); @@ -503,71 +503,71 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, TopoDS_Shape &shape, TopoDS_Shape &tool) { /*************************************************************************** - We start by splitting edges at all the edge-edge intersections. - This may generate new vertices and edges. + We start by splitting edges at all the edge-edge intersections. + This may generate new vertices and edges. ***************************************************************************/ MergeVertices(shape,tool); LocOpe_SplitShape splitter1(shape); LocOpe_SplitShape splitter2(tool); TopOpeBRep_ShapeIntersector intersector; for(intersector.InitIntersection(shape,tool); - intersector.MoreIntersection(); - intersector.NextIntersection() + intersector.MoreIntersection(); + intersector.NextIntersection() ) { - if(verbose&Cutting) { - cout << "++++++++++++++++++++++++++++++++++++++++" - "++++++++++++++++++++++++++++++++++++++++\n"; - intersector.DumpCurrent(1); cout << " --> "; - intersector.DumpCurrent(2); cout << '\n'; - } - - TopOpeBRep_EdgesIntersector &ee=intersector.ChangeEdgesIntersector(); - if( intersector.CurrentGeomShape(1).ShapeType()==TopAbs_EDGE && + if(verbose&Cutting) { + cout << "++++++++++++++++++++++++++++++++++++++++" + "++++++++++++++++++++++++++++++++++++++++\n"; + intersector.DumpCurrent(1); cout << " --> "; + intersector.DumpCurrent(2); cout << '\n'; + } + + TopOpeBRep_EdgesIntersector &ee=intersector.ChangeEdgesIntersector(); + if( intersector.CurrentGeomShape(1).ShapeType()==TopAbs_EDGE && intersector.CurrentGeomShape(2).ShapeType()==TopAbs_EDGE ) { - for(ee.InitPoint(); ee.MorePoint(); ee.NextPoint()) { - TopOpeBRep_Point2d const &p=ee.Point(); - if(verbose&Cutting) - cout << "point loop " << p.Parameter(1) << '\n'; - TopoDS_Vertex vertex; - if(p.IsVertex(1)) - vertex=p.Vertex(1); - else if(p.IsVertex(2)) - vertex=p.Vertex(2); - else - vertex=BRepBuilderAPI_MakeVertex(p.Value()); - if(!p.IsVertex(1)) { - TopoDS_Edge edge=TopoDS::Edge(ee.Edge(1)); - if(!splitter1.CanSplit(edge)) { - if(verbose&Cutting) - cout << "Cannot split 1\n";; - } else { - if(verbose&Cutting) - cout << "splitting model 1\n"; - try { splitter1.Add(vertex,p.Parameter(1),edge); } - catch(Standard_ConstructionError c) { - if(verbose&Cutting) - cout << "Ooops \n"; - } - } - } - if(!p.IsVertex(2)) { - TopoDS_Edge edge=TopoDS::Edge(ee.Edge(2)); - if(!splitter2.CanSplit(edge)) { - if(verbose&Cutting) - cout << "Cannot split 2\n";; - } else { - if(verbose&Cutting) - cout << "splitting model 2\n"; - try { splitter2.Add(vertex,p.Parameter(2),edge); } - catch(Standard_ConstructionError c) { - if(verbose&Cutting) - cout << "Ooops \n"; - } - } - } - } - } + for(ee.InitPoint(); ee.MorePoint(); ee.NextPoint()) { + TopOpeBRep_Point2d const &p=ee.Point(); + if(verbose&Cutting) + cout << "point loop " << p.Parameter(1) << '\n'; + TopoDS_Vertex vertex; + if(p.IsVertex(1)) + vertex=p.Vertex(1); + else if(p.IsVertex(2)) + vertex=p.Vertex(2); + else + vertex=BRepBuilderAPI_MakeVertex(p.Value()); + if(!p.IsVertex(1)) { + TopoDS_Edge edge=TopoDS::Edge(ee.Edge(1)); + if(!splitter1.CanSplit(edge)) { + if(verbose&Cutting) + cout << "Cannot split 1\n";; + } else { + if(verbose&Cutting) + cout << "splitting model 1\n"; + try { splitter1.Add(vertex,p.Parameter(1),edge); } + catch(Standard_ConstructionError c) { + if(verbose&Cutting) + cout << "Ooops \n"; + } + } + } + if(!p.IsVertex(2)) { + TopoDS_Edge edge=TopoDS::Edge(ee.Edge(2)); + if(!splitter2.CanSplit(edge)) { + if(verbose&Cutting) + cout << "Cannot split 2\n";; + } else { + if(verbose&Cutting) + cout << "splitting model 2\n"; + try { splitter2.Add(vertex,p.Parameter(2),edge); } + catch(Standard_ConstructionError c) { + if(verbose&Cutting) + cout << "Ooops \n"; + } + } + } + } + } } /*************************************************************************** @@ -595,7 +595,7 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, if(!distance.IsDone()) continue; double tolerance=std::max(BRep_Tool::Tolerance(edge), - BRep_Tool::Tolerance(vertex)); + BRep_Tool::Tolerance(vertex)); for(int i=1;i<=distance.NbExt();i++) { if(distance.Value(i)<tolerance) { try { @@ -647,7 +647,7 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, if(!distance.IsDone()) continue; double tolerance=std::max(BRep_Tool::Tolerance(edge), - BRep_Tool::Tolerance(vertex)); + BRep_Tool::Tolerance(vertex)); for(int i=1;i<=distance.NbExt();i++) { if(distance.Value(i)<tolerance) { try { @@ -683,43 +683,43 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, } /*************************************************************************** - We need the shapes with all the edge-edge intersections to split - all the faces. All vertices and edges which can be merged, will - be merged. + We need the shapes with all the edge-edge intersections to split + all the faces. All vertices and edges which can be merged, will + be merged. ***************************************************************************/ TopoDS_Compound intermediate1; BB.MakeCompound(intermediate1); for(TopTools_ListIteratorOfListOfShape p(splitter1.DescendantShapes(shape)); - p.More(); - p.Next() + p.More(); + p.Next() ) { - BB.Add(intermediate1,p.Value()); + BB.Add(intermediate1,p.Value()); } TopoDS_Compound intermediate2; BB.MakeCompound(intermediate2); for(TopTools_ListIteratorOfListOfShape p(splitter2.DescendantShapes(tool)); - p.More(); - p.Next() + p.More(); + p.Next() ) { - BB.Add(intermediate2,p.Value()); + BB.Add(intermediate2,p.Value()); } if(verbose&Cutting) { - cout << "Before merging vertices and edges\n"; - TopoDS_Compound t; - BB.MakeCompound(t); - BB.Add(t,intermediate1); - BB.Add(t,intermediate2); - PrintItemCount(t); + cout << "Before merging vertices and edges\n"; + TopoDS_Compound t; + BB.MakeCompound(t); + BB.Add(t,intermediate1); + BB.Add(t,intermediate2); + PrintItemCount(t); } MergeVertices(intermediate1,intermediate2); MergeEdges(intermediate1,intermediate2); if(verbose&Cutting) { - cout << "After merging vertices and edges\n"; - TopoDS_Compound t; - BB.MakeCompound(t); - BB.Add(t,intermediate1); - BB.Add(t,intermediate2); - PrintItemCount(t); + cout << "After merging vertices and edges\n"; + TopoDS_Compound t; + BB.MakeCompound(t); + BB.Add(t,intermediate1); + BB.Add(t,intermediate2); + PrintItemCount(t); } // Create the result @@ -730,10 +730,10 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, // Add any missing PCurves for(TopExp_Explorer face(result,TopAbs_FACE); face.More(); face.Next()) { - for(TopExp_Explorer edge(face.Current(),TopAbs_EDGE); - edge.More(); - edge.Next() - ) { + for(TopExp_Explorer edge(face.Current(),TopAbs_EDGE); + edge.More(); + edge.Next() + ) { Standard_Real s, e; TopoDS_Edge c_edge=TopoDS::Edge(edge.Current()); TopoDS_Face c_face=TopoDS::Face(face.Current()); @@ -743,13 +743,13 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target, cout << "Adding missing PCurve\n"; ShapeFix_Edge().FixAddPCurve(c_edge,c_face,false,1e-7); } - } + } } /*************************************************************************** - We determine which edges/wires are going to cut a face. To do this - we create a map of FaceCutters which is indexed by the face number - in the faces map. The FaceCutters generate the correct cutting wires. + We determine which edges/wires are going to cut a face. To do this + we create a map of FaceCutters which is indexed by the face number + in the faces map. The FaceCutters generate the correct cutting wires. ***************************************************************************/ int retry; do { @@ -761,7 +761,7 @@ do { cutmap_t cutters=SelectCuttingEdges(edges,faces); /*************************************************************************** - Apply all face splits stored in the map. + Apply all face splits stored in the map. ***************************************************************************/ int cut_count=0; LocOpe_SplitShape splitter(result); @@ -769,9 +769,9 @@ do { TopoDS_Face const &face=TopoDS::Face(faces(f->first)); FaceCutters &cutter=f->second; cut_count+=cutter.size(); - if(verbose&Cutting) { + if(verbose&Cutting) { cout << "Cutting face " << f->first << " *************************\n"; - BRepTools::Dump(face,cout); + BRepTools::Dump(face,cout); } cutter.Build(face,result,verbose); for(FaceCutters::iterator p=cutter.begin(); p!=cutter.end(); p++) { @@ -782,10 +782,10 @@ do { cout << "IGNORED Closed wire with less than three edges\n"; continue; } - //BRepTools::Dump(*p,cout); - try { + //BRepTools::Dump(*p,cout); + try { splitter.Add(*p,face); - } + } catch(Standard_ConstructionError c) { cout << "splitting the face failed\n"; retry=1; @@ -800,10 +800,10 @@ do { BB.MakeCompound(cutted); int count=0; for(TopTools_ListIteratorOfListOfShape p(splitter.DescendantShapes(result)); - p.More(); - p.Next() + p.More(); + p.Next() ) { - if(++count==1) { + if(++count==1) { if(verbose&Cutting) { cout << "--------- " << count << " ---------------------------\n"; BRepTools::Dump(p.Value(),cout); @@ -825,12 +825,12 @@ void OCC_Connect::MergeVertices(TopoDS_Shape &shape1,TopoDS_Shape &shape2) const BRepTools_ReShape replacer; for(int i=0;i<imap.Extent();i++) { for(int j=0;j<omap.Extent();j++) { - TopoDS_Vertex orig=TopoDS::Vertex(imap(i+1)); - TopoDS_Vertex repl=TopoDS::Vertex(omap(j+1)); + TopoDS_Vertex orig=TopoDS::Vertex(imap(i+1)); + TopoDS_Vertex repl=TopoDS::Vertex(omap(j+1)); if(BRepTools::Compare(orig,repl)) { - repl.Orientation(orig.Orientation()); - replacer.Replace(orig,repl); - // FIXME, tolerance and point should be updated + repl.Orientation(orig.Orientation()); + replacer.Replace(orig,repl); + // FIXME, tolerance and point should be updated goto skip; } } @@ -846,17 +846,17 @@ void OCC_Connect::MergeVertices(TopoDS_Shape &shape1,TopoDS_Shape &shape2) const bool OCC_Connect::CanMergeCurve(TopoDS_Edge edge1,TopoDS_Edge edge2) const { if(BRep_Tool::Degenerated(edge1) && BRep_Tool::Degenerated(edge2)) - return 1; + return 1; double tol=1e-7; Standard_Real s,e; Handle(Geom_Curve) curve=BRep_Tool::Curve(edge1,s,e); for(Standard_Real i=s;i<=e;i+=(e-s)/10) { - TopoDS_Vertex v=BRepBuilderAPI_MakeVertex(curve->Value(i)); - double dist=BRepExtrema_DistShapeShape(edge2,v).Value(); - if(dist>tol) - return 0; + TopoDS_Vertex v=BRepBuilderAPI_MakeVertex(curve->Value(i)); + double dist=BRepExtrema_DistShapeShape(edge2,v).Value(); + if(dist>tol) + return 0; } return 1; } @@ -869,58 +869,58 @@ void OCC_Connect::MergeEdges(TopoDS_Shape &shape1, TopoDS_Shape &shape2) const BRepTools_ReShape replacer; for(int i=0;i<imap.Extent();i++) { for(int j=0;j<omap.Extent();j++) { - TopoDS_Edge orig=TopoDS::Edge(imap(i+1)); - TopoDS_Edge repl=TopoDS::Edge(omap(j+1)); - - TopoDS_Vertex o1, o2, r1, r2; - TopExp::Vertices(orig,o1,o2,true); - TopExp::Vertices(repl,r1,r2,true); - - if(o1.IsSame(o2)) { - if(!BRep_Tool::Degenerated(orig)) { - if(verbose&Cutting) { - cout << "Same vertex in edge\n"; - BRepTools::Dump(orig,cout); - } - replacer.Remove(orig); - goto skip; - } else if(o1.IsSame(r1) && o1.IsSame(r2) - && CanMergeCurve(orig,repl) - ) { - if(verbose&Cutting) { - cout << "Degenerated edge, replace " << i+1 - << " with " << j+1 << '\n'; - BRepTools::Dump(orig,cout); - BRepTools::Dump(repl,cout); - } - // FIXME, update tolerance - BRepTools::Dump(repl.Complemented(),cout); - replacer.Replace(orig,repl.Complemented()); - goto skip; - } - cout << i+1 << " Degenerated\n"; - } - if(o1.IsSame(r1) && o2.IsSame(r2) && CanMergeCurve(orig,repl)) { + TopoDS_Edge orig=TopoDS::Edge(imap(i+1)); + TopoDS_Edge repl=TopoDS::Edge(omap(j+1)); + + TopoDS_Vertex o1, o2, r1, r2; + TopExp::Vertices(orig,o1,o2,true); + TopExp::Vertices(repl,r1,r2,true); + + if(o1.IsSame(o2)) { + if(!BRep_Tool::Degenerated(orig)) { + if(verbose&Cutting) { + cout << "Same vertex in edge\n"; + BRepTools::Dump(orig,cout); + } + replacer.Remove(orig); + goto skip; + } else if(o1.IsSame(r1) && o1.IsSame(r2) + && CanMergeCurve(orig,repl) + ) { + if(verbose&Cutting) { + cout << "Degenerated edge, replace " << i+1 + << " with " << j+1 << '\n'; + BRepTools::Dump(orig,cout); + BRepTools::Dump(repl,cout); + } + // FIXME, update tolerance + BRepTools::Dump(repl.Complemented(),cout); + replacer.Replace(orig,repl.Complemented()); + goto skip; + } + cout << i+1 << " Degenerated\n"; + } + if(o1.IsSame(r1) && o2.IsSame(r2) && CanMergeCurve(orig,repl)) { if(verbose&Cutting) { cout << "Same order of vertices, replace " << i+1 << " with " << j+1 << '\n'; BRepTools::Dump(orig,cout); BRepTools::Dump(repl,cout); } - // FIXME, update tolerance - replacer.Replace(orig,repl); - goto skip; + // FIXME, update tolerance + replacer.Replace(orig,repl); + goto skip; } - if(o1.IsSame(r2) && o2.IsSame(r1) && CanMergeCurve(orig,repl)) { + if(o1.IsSame(r2) && o2.IsSame(r1) && CanMergeCurve(orig,repl)) { if(verbose&Cutting) { cout << "Reversed order of vertices, replace " << i+1 << " with " << j+1 << '\n'; BRepTools::Dump(orig,cout); BRepTools::Dump(repl,cout); } - // FIXME, update tolerance - replacer.Replace(orig,repl.Complemented()); - goto skip; + // FIXME, update tolerance + replacer.Replace(orig,repl.Complemented()); + goto skip; } } if(verbose&Cutting) @@ -970,7 +970,7 @@ void OCC_Connect::MergeFaces(TopoDS_Shape &shape) const { /*************************************************************************** We must find faces which are the same. Since all edges are already - merged, we know that faces which can be merged have identical edges. + merged, we know that faces which can be merged have identical edges. ***************************************************************************/ TopTools_IndexedMapOfShape faces, edges; TopExp::MapShapes(shape,TopAbs_FACE,faces); @@ -981,10 +981,10 @@ void OCC_Connect::MergeFaces(TopoDS_Shape &shape) const for(TopExp_Explorer p(faces(i+1),TopAbs_EDGE); p.More(); p.Next()) { int edge=edges.FindIndex(p.Current()); if(BRep_Tool::Degenerated(TopoDS::Edge(edges(edge)))) { - cout << "Degenerate edge " << edge << " inserted a 0\n"; - face_edges.insert(0); - } else - face_edges.insert(edge); + cout << "Degenerate edge " << edge << " inserted a 0\n"; + face_edges.insert(0); + } else + face_edges.insert(edge); } mapping[face_edges].insert(i+1); } @@ -997,7 +997,7 @@ void OCC_Connect::MergeFaces(TopoDS_Shape &shape) const /*************************************************************************** If two faces have an identical set of edges, they can be merged - when the planes are never seperated by more than the tolerance. + when the planes are never seperated by more than the tolerance. ***************************************************************************/ BRepTools_ReShape replacer; for(mapping_t::iterator p=mapping.begin(); p!=mapping.end(); p++) { diff --git a/Geo/OCC_Connect.h b/Geo/OCC_Connect.h index f648fc1030a5323e4ff7b675ada6004a9d86802f..ec75ef0505e8a6589122c986073bc3c364df909f 100644 --- a/Geo/OCC_Connect.h +++ b/Geo/OCC_Connect.h @@ -38,7 +38,7 @@ //////////////////////////////////////////////////////////////////////////////// class OCC_Connect { struct LessThanIntegerSet { - bool operator()(std::set<int> const &a, std::set<int> const &b) const; + bool operator()(std::set<int> const &a, std::set<int> const &b) const; }; typedef std::map<std::set<int>,std::set<int>,LessThanIntegerSet> mapping_t; @@ -47,8 +47,8 @@ class OCC_Connect { int rebuilt; public: FaceCutters(void) { rebuilt=0; } - void Build(TopoDS_Face const &,TopoDS_Shape&,int); - void Add(TopoDS_Edge const&); + void Build(TopoDS_Face const &,TopoDS_Shape&,int); + void Add(TopoDS_Edge const&); private: int FindConnectedEdge(int v, std::vector<int> &done, std::vector<std::vector<int> > &v_edge); diff --git a/Geo/STensor3.cpp b/Geo/STensor3.cpp index bafc15d0aa2991ee6096ec7dc547fdb8408733ec..8873bb7cade43b941dc47cd7209b0784dac0066c 100644 --- a/Geo/STensor3.cpp +++ b/Geo/STensor3.cpp @@ -4,8 +4,8 @@ void SMetric3::print (const char *s) const { printf(" metric %s : %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E \n",s, - (*this)(0,0),(*this)(1,1),(*this)(2,2), - (*this)(0,1),(*this)(0,2),(*this)(1,2)); + (*this)(0,0),(*this)(1,1),(*this)(2,2), + (*this)(0,1),(*this)(0,2),(*this)(1,2)); } @@ -28,8 +28,8 @@ SMetric3 intersection (const SMetric3 &m1, const SMetric3 &m2) // (1-t) * m1 + t * m2 SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const double t) + const SMetric3 &m2, + const double t) { SMetric3 im1 = m1.invert(); SMetric3 im2 = m2.invert(); @@ -40,10 +40,10 @@ SMetric3 interpolation (const SMetric3 &m1, } SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const SMetric3 &m3, - const double u, - const double v) + const SMetric3 &m2, + const SMetric3 &m3, + const double u, + const double v) { SMetric3 im1 = m1.invert(); SMetric3 im2 = m2.invert(); @@ -57,12 +57,12 @@ SMetric3 interpolation (const SMetric3 &m1, } SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const SMetric3 &m3, - const SMetric3 &m4, - const double u, - const double v, - const double w) + const SMetric3 &m2, + const SMetric3 &m3, + const SMetric3 &m4, + const double u, + const double v, + const double w) { SMetric3 im1 = m1.invert(); SMetric3 im2 = m2.invert(); diff --git a/Geo/STensor3.h b/Geo/STensor3.h index b7b406b0be5af42e7a4c2cede10760dd7426d9ad..3b406bf636278000a325d4125c4b160174b73847 100644 --- a/Geo/STensor3.h +++ b/Geo/STensor3.h @@ -23,14 +23,14 @@ class SMetric3 { void getMat (gmshMatrix<double> & mat) const{ for (int i=0;i<3;i++){ for (int j=0;j<3;j++){ - mat(i,j) = _val[getIndex(i,j)]; + mat(i,j) = _val[getIndex(i,j)]; } } } void setMat (const gmshMatrix<double> & mat){ for (int i=0;i<3;i++) for (int j=i;j<3;j++) - _val[getIndex(i,j)] = mat(i,j); + _val[getIndex(i,j)] = mat(i,j); } SMetric3(const SMetric3& m){ for (int i=0; i<6; i++) _val[i]=m._val[i]; @@ -41,11 +41,11 @@ class SMetric3 { _val[1] = _val[3] = _val[4] = 0.0; } /* SMetric3(const double l1, // (h_1)^-2 */ -/* const double l2, */ -/* const double l3, */ -/* const SVector3 &t1, */ -/* const SVector3 &t2, */ -/* const SVector3 &t3){ */ +/* const double l2, */ +/* const double l3, */ +/* const SVector3 &t1, */ +/* const SVector3 &t2, */ +/* const SVector3 &t3){ */ /* SVector3 t1b = t1; */ /* SVector3 t2b = t2; */ /* SVector3 t3b = t3; */ @@ -60,11 +60,11 @@ class SMetric3 { /* _val[5] = dot (t3b,t3); */ /* } */ SMetric3(const double l1, // l1 = h1^-2 - const double l2, - const double l3, - const SVector3 &t1, - const SVector3 &t2, - const SVector3 &t3) + const double l2, + const double l3, + const SVector3 &t1, + const SVector3 &t2, + const SVector3 &t3) { // M = e^1 * diag * e^1^t // where the elements of diag are l_i = h_i^-2 @@ -159,21 +159,21 @@ inline double dot(const SVector3 &a, const SMetric3 &m, const SVector3 &b) // compute the largest inscribed ellipsoid... SMetric3 intersection (const SMetric3 &m1, - const SMetric3 &m2); + const SMetric3 &m2); SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const double t); + const SMetric3 &m2, + const double t); SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const SMetric3 &m3, - const double u, - const double v); + const SMetric3 &m2, + const SMetric3 &m3, + const double u, + const double v); SMetric3 interpolation (const SMetric3 &m1, - const SMetric3 &m2, - const SMetric3 &m3, - const SMetric3 &m4, - const double u, - const double v, - const double w); + const SMetric3 &m2, + const SMetric3 &m3, + const SMetric3 &m4, + const double u, + const double v, + const double w); #endif diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp index 7bbccd5e7b16817cd7efac109e8393d7832db77c..dae79acf8c484297d388791e5f0d1570972b949e 100644 --- a/Geo/discreteEdge.cpp +++ b/Geo/discreteEdge.cpp @@ -68,8 +68,8 @@ void discreteEdge::orderMLines() firstLine = (boundv.begin())->second; for (std::list<MLine*>::iterator it = segments.begin() ; it != segments.end() ; ++it){ if (*it == firstLine){ - segments.erase(it); - break; + segments.erase(it); + break; } } } @@ -94,34 +94,34 @@ void discreteEdge::orderMLines() for (std::list<MLine*>::iterator it = segments.begin() ; it != segments.end() ; ++it){ MLine *e = *it; if (e->getVertex(0) == last){ - //printf("orientation 1: beginV=%d \n", e->getVertex(0)->getNum()); - _m.push_back(e); - segments.erase(it); - _orientation.push_back(1); - last = e->getVertex(1); - found = true; - break; + //printf("orientation 1: beginV=%d \n", e->getVertex(0)->getNum()); + _m.push_back(e); + segments.erase(it); + _orientation.push_back(1); + last = e->getVertex(1); + found = true; + break; } else if (e->getVertex(1) == last){ - //printf("orientation 0: endV=%d \n", e->getVertex(1)->getNum()); - _m.push_back(e); - segments.erase(it); - _orientation.push_back(0); - last = e->getVertex(0); - found = true; - break; + //printf("orientation 0: endV=%d \n", e->getVertex(1)->getNum()); + _m.push_back(e); + segments.erase(it); + _orientation.push_back(0); + last = e->getVertex(0); + found = true; + break; } } if (!found && _orientation[0]==1){ //reverse orientation of first Line if (_m.size() == 1 ){ - MVertex *temp = first; - first = last; - last = temp; - _orientation[0] = 0; + MVertex *temp = first; + first = last; + last = temp; + _orientation[0] = 0; } else { - Msg::Error("Discrete Edge %d is wrong",tag()); - return; + Msg::Error("Discrete Edge %d is wrong",tag()); + return; } } } @@ -156,21 +156,21 @@ void discreteEdge::setBoundVertices() MVertex* vE = (iter)->first; bool existVertex = false; for(GModel::viter point = model()->firstVertex(); point != model()->lastVertex(); point++){ - //printf("Discrete point =%d %d bound vE=%d\n",(*point)->tag(), (*point)->mesh_vertices[0]->getNum(), vE->getNum()); - if ((*point)->mesh_vertices[0]->getNum() == vE->getNum()){ - bound_vertices.push_back((*point)); - existVertex = true; - break; - } + //printf("Discrete point =%d %d bound vE=%d\n",(*point)->tag(), (*point)->mesh_vertices[0]->getNum(), vE->getNum()); + if ((*point)->mesh_vertices[0]->getNum() == vE->getNum()){ + bound_vertices.push_back((*point)); + existVertex = true; + break; + } } if(!existVertex){ - //printf(" !!! bound vertex %d does not exist, create one \n", vE->getNum()); - GVertex *gvB = new discreteVertex(model(),vE->getNum()); - bound_vertices.push_back(gvB); - vE->setEntity(gvB); - gvB->mesh_vertices.push_back(vE); - gvB->points.push_back(new MPoint(gvB->mesh_vertices.back())); - model()->add(gvB); + //printf(" !!! bound vertex %d does not exist, create one \n", vE->getNum()); + GVertex *gvB = new discreteVertex(model(),vE->getNum()); + bound_vertices.push_back(gvB); + vE->setEntity(gvB); + gvB->mesh_vertices.push_back(vE); + gvB->points.push_back(new MPoint(gvB->mesh_vertices.back())); + model()->add(gvB); } std::vector<MVertex*>::iterator itve = std::find(mesh_vertices.begin(), mesh_vertices.end(), vE) ; if (itve != mesh_vertices.end()) mesh_vertices.erase(itve); @@ -191,9 +191,9 @@ void discreteEdge::setBoundVertices() for(GModel::viter point = model()->firstVertex(); point != model()->lastVertex(); point++){ //printf("Discrete point =%d %d bound vE=%d \n",(*point)->tag(), (*point)->mesh_vertices[0]->getNum(), vE->getNum()); if ((*point)->mesh_vertices[0]->getNum() == vE->getNum()){ - bound_vertex = (*point); - existVertex = true; - break; + bound_vertex = (*point); + existVertex = true; + break; } } if(!existVertex){ @@ -275,20 +275,20 @@ void discreteEdge::parametrize() //MVertex *v[N]; std::vector<MVertex *> v(N); for(int j = 0; j < N; j++){ - v[j] = e->getVertex(j); + v[j] = e->getVertex(j); } - //printf("old triangle v0=%p (%d) v1=%p (%d) v2=%p (%d) \n",v[0], v[0]->getNum() , v[1],v[1]->getNum() ,v[2], v[2]->getNum()); - for (int j = 0; j < N; j++){ - std::map<MVertex*, MVertex*>::iterator itmap = old2new.find(v[j]); - MVertex *vNEW; - if (itmap != old2new.end()) { - vNEW = itmap->second; - v[j]=vNEW; - } - } - //printf(" new triangle v0=%p (%d) v1=%p (%d) v2=%p (%d) \n",v[0], v[0]->getNum() , v[1],v[1]->getNum() ,v[2], v[2]->getNum()); - if (N == 3) newTriangles.push_back(new MTriangle(v[0], v[1], v[2])); - else if ( N == 4) newQuadrangles.push_back(new MQuadrangle(v[0], v[1], v[2], v[3])); + //printf("old triangle v0=%p (%d) v1=%p (%d) v2=%p (%d) \n",v[0], v[0]->getNum() , v[1],v[1]->getNum() ,v[2], v[2]->getNum()); + for (int j = 0; j < N; j++){ + std::map<MVertex*, MVertex*>::iterator itmap = old2new.find(v[j]); + MVertex *vNEW; + if (itmap != old2new.end()) { + vNEW = itmap->second; + v[j]=vNEW; + } + } + //printf(" new triangle v0=%p (%d) v1=%p (%d) v2=%p (%d) \n",v[0], v[0]->getNum() , v[1],v[1]->getNum() ,v[2], v[2]->getNum()); + if (N == 3) newTriangles.push_back(new MTriangle(v[0], v[1], v[2])); + else if ( N == 4) newQuadrangles.push_back(new MQuadrangle(v[0], v[1], v[2], v[3])); } (*iFace)->deleteVertexArrays(); @@ -311,20 +311,20 @@ void discreteEdge::parametrize() //MVertex *v[N]; std::vector<MVertex *> v(N); for(int j = 0; j < N; j++){ - v[j] = e->getVertex(j); + v[j] = e->getVertex(j); } - for (int j = 0; j < N; j++){ - std::map<MVertex*, MVertex*>::iterator itmap = old2new.find(v[j]); - MVertex *vNEW; - if (itmap != old2new.end()) { - vNEW = itmap->second; - v[j]=vNEW; - } - } - if (N == 4) newTetrahedra.push_back(new MTetrahedron(v[0], v[1], v[2], v[3])); - else if ( N == 5) newPyramids.push_back(new MPyramid(v[0], v[1], v[2], v[3], v[4])); - else if ( N == 6) newPrisms.push_back(new MPrism(v[0], v[1], v[2], v[3], v[4], v[5])); - else if ( N == 8) newHexahedra.push_back(new MHexahedron(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7])); + for (int j = 0; j < N; j++){ + std::map<MVertex*, MVertex*>::iterator itmap = old2new.find(v[j]); + MVertex *vNEW; + if (itmap != old2new.end()) { + vNEW = itmap->second; + v[j]=vNEW; + } + } + if (N == 4) newTetrahedra.push_back(new MTetrahedron(v[0], v[1], v[2], v[3])); + else if ( N == 5) newPyramids.push_back(new MPyramid(v[0], v[1], v[2], v[3], v[4])); + else if ( N == 6) newPrisms.push_back(new MPrism(v[0], v[1], v[2], v[3], v[4], v[5])); + else if ( N == 8) newHexahedra.push_back(new MHexahedron(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7])); } (*iRegion)->deleteVertexArrays(); (*iRegion)->tetrahedra.clear(); @@ -365,9 +365,9 @@ void discreteEdge::computeNormals () const SVector3 n = crossprod(d1, d2); n.normalize(); for (int j = 0; j < 3; j++){ - std::map<MVertex*, SVector3>::iterator itn = _normals.find(t->getVertex(j)); - if (itn == _normals.end())_normals[t->getVertex(j)] = n; - else itn->second += n; + std::map<MVertex*, SVector3>::iterator itn = _normals.find(t->getVertex(j)); + if (itn == _normals.end())_normals[t->getVertex(j)] = n; + else itn->second += n; } } } diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp index eed2ff0d3826e00c0fce623bb936e8414ed17289..48f8d67305a3a58e47406d047b79c89d43d0bac6 100644 --- a/Geo/discreteFace.cpp +++ b/Geo/discreteFace.cpp @@ -29,10 +29,10 @@ void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_ e->getFaceVertices(0, fv); for (int iEdge = 0; iEdge < e->getNumEdges(); iEdge++) { MEdge tmp_edge = e->getEdge(iEdge); - if (std::find(bound_edges.begin(),bound_edges.end(),tmp_edge) == bound_edges.end()) - bound_edges.push_back(tmp_edge); + if (std::find(bound_edges.begin(),bound_edges.end(),tmp_edge) == bound_edges.end()) + bound_edges.push_back(tmp_edge); else - bound_edges.erase(std::find(bound_edges.begin(),bound_edges.end(),tmp_edge)); + bound_edges.erase(std::find(bound_edges.begin(),bound_edges.end(),tmp_edge)); } } @@ -42,7 +42,7 @@ void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_ if (itmap == map_edges.end()) { std::vector<int> tagFaces; tagFaces.push_back(this->tag()); - map_edges.insert(std::make_pair(*itv,tagFaces)); + map_edges.insert(std::make_pair(*itv,tagFaces)); } else{ std::vector<int> tagFaces = itmap->second; diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp index 60cdc2c6b9a79fca2f884bf6d8ec2d7434e6ed6a..cd38f42ad7e655eebbfbfa93dbaa7c5e7a02f88a 100644 --- a/Geo/gmshFace.cpp +++ b/Geo/gmshFace.cpp @@ -29,9 +29,9 @@ gmshFace::gmshFace(GModel *m, Surface *face) if ( ! first ) first = start; l_wire.push_back(e); if ( next == first ){ - edgeLoops.push_back(GEdgeLoop(l_wire)); - l_wire.clear(); - first = 0; + edgeLoops.push_back(GEdgeLoop(l_wire)); + l_wire.clear(); + first = 0; } l_edges.push_back(e); @@ -226,15 +226,15 @@ GPoint gmshFace::closestPoint(const SPoint3 & qp, const double initialGuess[2]) for (int i = 0; i < 2; i++){ BN[i] = 0; for (int k = 0; k < 3; k++){ - BN[i] += B[k] * M[k][i]; + BN[i] += B[k] * M[k][i]; } } for (int i = 0; i < 2; i++){ for (int j = 0; j < 2; j++){ - MN[i][j] = 0; - for (int k = 0; k < 3; k++){ - MN[i][j] += M[k][i] * M[k][j]; - } + MN[i][j] = 0; + for (int k = 0; k < 3; k++){ + MN[i][j] += M[k][i] * M[k][j]; + } } } sys2x2(MN, BN, UV); diff --git a/Graphics/CMakeLists.txt b/Graphics/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4b79bcecda2a031b06ccbc4fc1a334a553bfacc7 --- /dev/null +++ b/Graphics/CMakeLists.txt @@ -0,0 +1,26 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Trackball.cpp + Iso.cpp + ReadImg.cpp + drawContext.cpp + drawMesh.cpp + drawGeom.cpp + drawPost.cpp + drawAxes.cpp + drawScales.cpp + drawGraph2d.cpp + drawGlyph.cpp + gl2ps.cpp + gl2gif.cpp + gl2jpeg.cpp + gl2png.cpp + gl2ppm.cpp + gl2yuv.cpp +) + +append_gmsh_src(Graphics "${SRC}") diff --git a/Fltk/Draw.h b/Graphics/Draw.h similarity index 84% rename from Fltk/Draw.h rename to Graphics/Draw.h index 14ad67816f473d5236a95b4ccd40f668fbe866c2..e9ceb0efaebe8a23a1a95df7b94119767f38479a 100644 --- a/Fltk/Draw.h +++ b/Graphics/Draw.h @@ -6,8 +6,8 @@ #ifndef _DRAW_H_ #define _DRAW_H_ -// FLTK-dependent drawing functions (need to be redefined when linking -// the graphics lib with another widget toolkit) +// Widget-toolkit-dependent drawing functions (need to be redefined +// for each widget toolkit: FLTK, Qt, etc.) void Draw(); void DrawPlugin(void (*draw)(void *context)); diff --git a/Graphics/Makefile b/Graphics/Makefile deleted file mode 100644 index 8942f888f9c903badf8417810208462e97cc1297..0000000000000000000000000000000000000000 --- a/Graphics/Makefile +++ /dev/null @@ -1,165 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshGraphics${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Fltk ${DASH}I../Numeric\ - ${DASH}I../Plugin\ - ${DASH}I../contrib/MathEval ${DASH}I../contrib/ANN/include - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Trackball.cpp \ - Iso.cpp \ - ReadImg.cpp \ - drawContext.cpp \ - drawMesh.cpp \ - drawGeom.cpp \ - drawPost.cpp \ - drawAxes.cpp \ - drawScales.cpp \ - drawGraph2d.cpp \ - drawGlyph.cpp \ - gl2ps.cpp\ - gl2gif.cpp\ - gl2jpeg.cpp\ - gl2png.cpp\ - gl2ppm.cpp\ - gl2yuv.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Trackball${OBJEXT}: Trackball.cpp Trackball.h -Iso${OBJEXT}: Iso.cpp ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h -ReadImg${OBJEXT}: ReadImg.cpp ReadImg.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h -drawContext${OBJEXT}: drawContext.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h Trackball.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Post/PView.h ../Post/PViewOptions.h ../Post/ColorTable.h gl2ps.h -drawMesh${OBJEXT}: drawMesh.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Common/GmshMessage.h ../Common/GmshDefines.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Geo/MQuadrangle.h \ - ../Geo/MElement.h ../Geo/MTetrahedron.h ../Geo/MElement.h \ - ../Geo/MHexahedron.h ../Geo/MElement.h ../Geo/MPrism.h \ - ../Geo/MElement.h ../Geo/MPyramid.h ../Geo/MElement.h \ - ../Geo/MElementCut.h ../Geo/MElement.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Common/OS.h gl2ps.h ../Common/VertexArray.h ../Common/SmoothData.h \ - ../Post/PView.h ../Post/PViewData.h -drawGeom${OBJEXT}: drawGeom.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h gl2ps.h ../Common/GmshConfig.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Common/GmshMessage.h -drawPost${OBJEXT}: drawPost.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h Iso.h ../Post/PView.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h ../Post/PViewData.h \ - ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Common/SmoothData.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h gl2ps.h -drawAxes${OBJEXT}: drawAxes.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Fltk/Draw.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gl2ps.h -drawScales${OBJEXT}: drawScales.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Fltk/Draw.h ../Post/PView.h ../Post/PViewOptions.h \ - ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h gl2ps.h -drawGraph2d${OBJEXT}: drawGraph2d.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Fltk/Draw.h ../Post/PView.h ../Post/PViewOptions.h \ - ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h gl2ps.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -drawGlyph${OBJEXT}: drawGlyph.cpp drawContext.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Fltk/Draw.h ../Common/GmshDefines.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Common/StringUtils.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h gl2ps.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h -gl2ps${OBJEXT}: gl2ps.cpp gl2ps.h ../Common/GmshConfig.h -gl2gif${OBJEXT}: gl2gif.cpp ../Common/MallocUtils.h gl2gif.h PixelBuffer.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Fltk/Draw.h -gl2jpeg${OBJEXT}: gl2jpeg.cpp ../Common/GmshConfig.h gl2jpeg.h PixelBuffer.h \ - ../Common/GmshMessage.h ../Fltk/Draw.h -gl2png${OBJEXT}: gl2png.cpp ../Common/GmshConfig.h gl2png.h PixelBuffer.h \ - ../Common/GmshMessage.h ../Fltk/Draw.h -gl2ppm${OBJEXT}: gl2ppm.cpp gl2ppm.h PixelBuffer.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Fltk/Draw.h -gl2yuv${OBJEXT}: gl2yuv.cpp ../Common/MallocUtils.h gl2yuv.h PixelBuffer.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Fltk/Draw.h diff --git a/Graphics/PixelBuffer.h b/Graphics/PixelBuffer.h index 2c3216da745dec59568897afff797ef67c6a2241..4a72a18085273387ee149722a688676666eef6b3 100644 --- a/Graphics/PixelBuffer.h +++ b/Graphics/PixelBuffer.h @@ -105,16 +105,16 @@ class PixelBuffer{ else{ #if defined(HAVE_OSMESA) if(_format != GL_RGB && _type != GL_UNSIGNED_BYTE){ - Msg::Error("Offscreen rendering only implemented for GL_RGB/GL_UNSIGNED_BYTE"); + Msg::Error("Offscreen rendering only implemented for GL_RGB/GL_UNSIGNED_BYTE"); return; } OSMesaContext ctx = OSMesaCreateContextExt(OSMESA_RGB, 16, 0, 0, NULL); if(!ctx){ - Msg::Error("OSMesaCreateContext failed"); + Msg::Error("OSMesaCreateContext failed"); return; } if(!OSMesaMakeCurrent(ctx, (void*)_pixels, GL_UNSIGNED_BYTE, _width, _height)){ - Msg::Error("OSMesaMakeCurrent failed"); + Msg::Error("OSMesaMakeCurrent failed"); } DrawCurrentOpenglWindow(false); glFinish(); diff --git a/Graphics/drawAxes.cpp b/Graphics/drawAxes.cpp index cd997b371d57f1ad9c1b9c30babac613c05d9f75..a521ac47977dd53be0a76e2d598cee188f821357 100644 --- a/Graphics/drawAxes.cpp +++ b/Graphics/drawAxes.cpp @@ -278,8 +278,9 @@ void drawContext::drawAxes() if(geometryExists && (CTX::instance()->drawBBox || !CTX::instance()->mesh.draw)) { glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); drawBox(CTX::instance()->min[0], CTX::instance()->min[1], CTX::instance()->min[2], CTX::instance()->max[0], CTX::instance()->max[1], CTX::instance()->max[2]); glColor3d(1.,0.,0.); @@ -294,9 +295,9 @@ void drawContext::drawAxes() if(CTX::instance()->axes){ glColor4ubv((GLubyte *) & CTX::instance()->color.axes); - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); if(!CTX::instance()->axesAutoPosition){ drawAxes(CTX::instance()->axes, CTX::instance()->axesTics, CTX::instance()->axesFormat, CTX::instance()->axesLabel, @@ -342,9 +343,9 @@ void drawContext::drawSmallAxes() double zx = l * rot[8]; double zy = l * rot[9]; - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.smallAxes); glBegin(GL_LINES); diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index 850039c86771a38d40172b1b1b56e74b875b38a1..293067607d61038facc83d6e7fc69312a5457f65 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -227,8 +227,8 @@ void drawContext::draw3d() // measurement of the change in depth relative to the screen area of // the polygon, and r is the smallest value that is guaranteed to // produce a resolvable offset for a given implementation. - glPolygonOffset(CTX::instance()->polygonOffsetFactor, - CTX::instance()->polygonOffsetUnits); + glPolygonOffset((float)CTX::instance()->polygonOffsetFactor, + (float)CTX::instance()->polygonOffsetUnits); if(CTX::instance()->polygonOffsetFactor || CTX::instance()->polygonOffsetUnits) CTX::instance()->polygonOffset = CTX::instance()->polygonOffsetAlways ? 1 : needPolygonOffset(); @@ -410,9 +410,9 @@ void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) for(int j = img->h() - 1; j >= 0; j--) { for(int i = 0; i < img->w(); i++) { int idx = j * img->w() * img->d() + i * img->d(); - _bgImage.push_back((GLfloat)data[idx] / 255.); - _bgImage.push_back((GLfloat)data[idx + 1] / 255.); - _bgImage.push_back((GLfloat)data[idx + 2] / 255.); + _bgImage.push_back((GLfloat)data[idx] / 255.F); + _bgImage.push_back((GLfloat)data[idx + 1] / 255.F); + _bgImage.push_back((GLfloat)data[idx + 2] / 255.F); } } _bgImageSize[0] = img->w(); @@ -486,22 +486,31 @@ void drawContext::initRenderModel() (GLfloat)CTX::instance()->lightPosition[i][3]}; glLightfv((GLenum)(GL_LIGHT0 + i), GL_POSITION, position); - GLfloat r = CTX::instance()->unpackRed(CTX::instance()->color.ambientLight[i])/255.; - GLfloat g = CTX::instance()->unpackGreen(CTX::instance()->color.ambientLight[i])/255.; - GLfloat b = CTX::instance()->unpackBlue(CTX::instance()->color.ambientLight[i])/255.; - GLfloat ambient[4] = {r, g, b, 1.0}; + GLfloat r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.ambientLight[i]) / 255.); + GLfloat ambient[4] = {r, g, b, 1.0F}; glLightfv((GLenum)(GL_LIGHT0 + i), GL_AMBIENT, ambient); - r = CTX::instance()->unpackRed(CTX::instance()->color.diffuseLight[i])/255.; - g = CTX::instance()->unpackGreen(CTX::instance()->color.diffuseLight[i])/255.; - b = CTX::instance()->unpackBlue(CTX::instance()->color.diffuseLight[i])/255.; - GLfloat diffuse[4] = {r, g, b, 1.0}; + r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.diffuseLight[i]) / 255.); + g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.diffuseLight[i]) / 255.); + b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.diffuseLight[i]) / 255.); + GLfloat diffuse[4] = {r, g, b, 1.0F}; glLightfv((GLenum)(GL_LIGHT0 + i), GL_DIFFUSE, diffuse); - r = CTX::instance()->unpackRed(CTX::instance()->color.specularLight[i])/255.; - g = CTX::instance()->unpackGreen(CTX::instance()->color.specularLight[i])/255.; - b = CTX::instance()->unpackBlue(CTX::instance()->color.specularLight[i])/255.; - GLfloat specular[4] = {r, g, b, 1.0}; + r = (GLfloat)(CTX::instance()->unpackRed + (CTX::instance()->color.specularLight[i]) / 255.); + g = (GLfloat)(CTX::instance()->unpackGreen + (CTX::instance()->color.specularLight[i]) / 255.); + b = (GLfloat)(CTX::instance()->unpackBlue + (CTX::instance()->color.specularLight[i]) / 255.); + GLfloat specular[4] = {r, g, b, 1.0F}; glLightfv((GLenum)(GL_LIGHT0 + i), GL_SPECULAR, specular); glEnable((GLenum)(GL_LIGHT0 + i)); @@ -517,12 +526,14 @@ void drawContext::initRenderModel() glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); glEnable(GL_COLOR_MATERIAL); // "white"-only specular material reflection color - GLfloat spec[4] = {CTX::instance()->shine, CTX::instance()->shine, - CTX::instance()->shine, 1.0}; + GLfloat spec[4] = {(GLfloat)CTX::instance()->shine, + (GLfloat)CTX::instance()->shine, + (GLfloat)CTX::instance()->shine, 1.0F}; glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); // specular exponent in [0,128] (larger means more "focused" // reflection) - glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, CTX::instance()->shineExponent); + glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, + (GLfloat)CTX::instance()->shineExponent); glShadeModel(GL_SMOOTH); diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp index 0d1250943886e67b660fe993cff69c332ab5c540..60d2b979e17e89c7213e8ffee30a00a794c2ef38 100644 --- a/Graphics/drawGeom.cpp +++ b/Graphics/drawGeom.cpp @@ -29,15 +29,15 @@ class drawGVertex { } if(v->getSelection()) { - glPointSize(CTX::instance()->geom.selectedPointSize); - gl2psPointSize(CTX::instance()->geom.selectedPointSize * - CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)CTX::instance()->geom.selectedPointSize); + gl2psPointSize((float)(CTX::instance()->geom.selectedPointSize * + CTX::instance()->print.epsPointSizeFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.selection); } else { - glPointSize(CTX::instance()->geom.pointSize); - gl2psPointSize(CTX::instance()->geom.pointSize * - CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)CTX::instance()->geom.pointSize); + gl2psPointSize((float)(CTX::instance()->geom.pointSize * + CTX::instance()->print.epsPointSizeFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.point); } @@ -105,15 +105,15 @@ class drawGEdge { } if(e->getSelection()) { - glLineWidth(CTX::instance()->geom.selectedLineWidth); - gl2psLineWidth(CTX::instance()->geom.selectedLineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->geom.selectedLineWidth); + gl2psLineWidth((float)(CTX::instance()->geom.selectedLineWidth * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.selection); } else { - glLineWidth(CTX::instance()->geom.lineWidth); - gl2psLineWidth(CTX::instance()->geom.lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->geom.lineWidth); + gl2psLineWidth((float)(CTX::instance()->geom.lineWidth * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.line); } @@ -390,15 +390,15 @@ class drawGFace { } if(f->getSelection()) { - glLineWidth(CTX::instance()->geom.selectedLineWidth / 2.); - gl2psLineWidth(CTX::instance()->geom.selectedLineWidth / 2. * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)(CTX::instance()->geom.selectedLineWidth / 2.)); + gl2psLineWidth((float)(CTX::instance()->geom.selectedLineWidth / 2. * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.selection); } else { - glLineWidth(CTX::instance()->geom.lineWidth / 2.); - gl2psLineWidth(CTX::instance()->geom.lineWidth / 2. * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)(CTX::instance()->geom.lineWidth / 2.)); + gl2psLineWidth((float)(CTX::instance()->geom.lineWidth / 2. * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & CTX::instance()->color.geom.surface); } diff --git a/Graphics/drawGlyph.cpp b/Graphics/drawGlyph.cpp index 16192b147c9209e1902f9dbede36e98502c9ab7c..9042c0e2779019988f83e5d53d84cbe2d2e4f7ee 100644 --- a/Graphics/drawGlyph.cpp +++ b/Graphics/drawGlyph.cpp @@ -28,8 +28,8 @@ void drawContext::drawString(std::string s, std::string &font_name, int font_enu glGetDoublev(GL_CURRENT_RASTER_POSITION, pos); double x[3], w[3] = {pos[0], pos[1], pos[2]}; SetFont(font_enum, font_size); - float width = GetStringWidth(s.c_str()); - float height = GetStringHeight(); + double width = GetStringWidth(s.c_str()); + double height = GetStringHeight(); switch(align){ case 1: w[0] -= width/2.; break; // bottom center case 2: w[0] -= width; break; // bottom right diff --git a/Graphics/drawGraph2d.cpp b/Graphics/drawGraph2d.cpp index e6f84263c142a405c3e87ecdc0f57146c7eeca22..aa8b0850438dce45ec6184525e4f5fc5473a1a0f 100644 --- a/Graphics/drawGraph2d.cpp +++ b/Graphics/drawGraph2d.cpp @@ -150,18 +150,18 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop, if(!opt->axes) return; char label[1024]; - float font_h = GetStringHeight() ? GetStringHeight() : 1; // total font height - float font_a = font_h - GetStringDescent(); // height above ref. point + double font_h = GetStringHeight() ? GetStringHeight() : 1; // total font height + double font_a = font_h - GetStringDescent(); // height above ref. point const double tic = 5.; - glPointSize(CTX::instance()->pointSize); - gl2psPointSize(CTX::instance()->pointSize * - CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)CTX::instance()->pointSize); + gl2psPointSize((float)(CTX::instance()->pointSize * + CTX::instance()->print.epsPointSizeFactor)); - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); glColor4ubv((GLubyte *) & opt->color.axes); @@ -221,15 +221,15 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop, glEnable(GL_LINE_STIPPLE); glLineStipple(1, 0x1111); gl2psEnable(GL2PS_LINE_STIPPLE); - gl2psLineWidth(1. * CTX::instance()->print.epsLineWidthFactor); + gl2psLineWidth((float)(1. * CTX::instance()->print.epsLineWidthFactor)); glBegin(GL_LINES); glVertex2d(xleft, ytop - i * dy); glVertex2d(xleft + width, ytop - i * dy); glEnd(); glDisable(GL_LINE_STIPPLE); gl2psDisable(GL2PS_LINE_STIPPLE); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); } } if(opt->showScale){ @@ -268,15 +268,15 @@ static void drawGraphAxes(drawContext *ctx, PView *p, double xleft, double ytop, glEnable(GL_LINE_STIPPLE); glLineStipple(1, 0x1111); gl2psEnable(GL2PS_LINE_STIPPLE); - gl2psLineWidth(1. * CTX::instance()->print.epsLineWidthFactor); + gl2psLineWidth((float)(1. * CTX::instance()->print.epsLineWidthFactor)); glBegin(GL_LINES); glVertex2d(xleft + i * dx, ytop); glVertex2d(xleft + i * dx, ybot); glEnd(); glDisable(GL_LINE_STIPPLE); gl2psDisable(GL2PS_LINE_STIPPLE); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); } if(nb == 1) @@ -334,11 +334,11 @@ static void drawGraphCurves(drawContext *ctx, PView *p, double xleft, double yto { PViewOptions *opt = p->getOptions(); - glPointSize(opt->pointSize); - gl2psPointSize(opt->pointSize * CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)opt->pointSize); + gl2psPointSize((float)(opt->pointSize * CTX::instance()->print.epsPointSizeFactor)); - glLineWidth(opt->lineWidth); - gl2psLineWidth(opt->lineWidth * CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)opt->lineWidth); + gl2psLineWidth((float)(opt->lineWidth * CTX::instance()->print.epsLineWidthFactor)); if(opt->intervalsType == PViewOptions::Numeric){ for(unsigned int i = 0; i < y.size(); i++) diff --git a/Graphics/drawMesh.cpp b/Graphics/drawMesh.cpp index 08a2487ad7e782e5d888a249a3ab719e49fae05f..44f85260d6ff3e5e082ad688af68021ee919bc47 100644 --- a/Graphics/drawMesh.cpp +++ b/Graphics/drawMesh.cpp @@ -126,20 +126,20 @@ static bool isElementVisible(MElement *ele) bool hidden = false; for(int clip = 0; clip < 6; clip++){ if(CTX::instance()->mesh.clip & (1 << clip)){ - if(ele->getDim() < 3 && CTX::instance()->clipOnlyVolume){ - } - else{ - double d = intersectClipPlane(clip, ele); - if(ele->getDim() == 3 && + if(ele->getDim() < 3 && CTX::instance()->clipOnlyVolume){ + } + else{ + double d = intersectClipPlane(clip, ele); + if(ele->getDim() == 3 && CTX::instance()->clipOnlyDrawIntersectingVolume && d){ - hidden = true; - break; - } - else if(d < 0){ - hidden = true; - break; - } - } + hidden = true; + break; + } + else if(d < 0){ + hidden = true; + break; + } + } } } if(hidden) return false; @@ -184,7 +184,7 @@ static void drawElementLabels(drawContext *ctx, GEntity *e, int labelStep = getLabelStep(elements.size()); for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; if(!isElementVisible(ele)) continue; if(i % labelStep == 0) { SPoint3 pc = ele->barycenter(); @@ -213,7 +213,7 @@ static void drawNormals(drawContext *ctx, std::vector<T*> &elements) { glColor4ubv((GLubyte *) & CTX::instance()->color.mesh.normals); for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; if(!isElementVisible(ele)) continue; SVector3 n = ele->getFace(0).normal(); for(int j = 0; j < 3; j++) @@ -312,7 +312,7 @@ static void drawVerticesPerElement(drawContext *ctx, GEntity *e, std::vector<T*> &elements) { for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; for(int j = 0; j < ele->getNumVertices(); j++){ MVertex *v = ele->getVertex(j); if(isElementVisible(ele) && v->getVisibility()){ @@ -346,7 +346,7 @@ static void drawBarycentricDual(std::vector<T*> &elements) gl2psEnable(GL2PS_LINE_STIPPLE); glBegin(GL_LINES); for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; if(!isElementVisible(ele)) continue; SPoint3 pc = ele->barycenter(); if(ele->getDim() == 2){ @@ -393,17 +393,17 @@ static void drawVoronoiDual(std::vector<T*> &elements) if(ele->getDim() == 2){ for(int j = 0; j < ele->getNumEdges(); j++){ MEdge e = ele->getEdge(j); - SVector3 p2p1(e.getVertex(1)->x() - e.getVertex(0)->x(), - e.getVertex(1)->y() - e.getVertex(0)->y(), - e.getVertex(1)->z() - e.getVertex(0)->z()); - SVector3 pcp1(pc.x() - e.getVertex(0)->x(), - pc.y() - e.getVertex(0)->y(), - pc.z() - e.getVertex(0)->z()); - double alpha = dot(pcp1,p2p1) / dot(p2p1,p2p1); + SVector3 p2p1(e.getVertex(1)->x() - e.getVertex(0)->x(), + e.getVertex(1)->y() - e.getVertex(0)->y(), + e.getVertex(1)->z() - e.getVertex(0)->z()); + SVector3 pcp1(pc.x() - e.getVertex(0)->x(), + pc.y() - e.getVertex(0)->y(), + pc.z() - e.getVertex(0)->z()); + double alpha = dot(pcp1,p2p1) / dot(p2p1,p2p1); SPoint3 p((1 - alpha)*e.getVertex(0)->x() + alpha * e.getVertex(1)->x(), - (1 - alpha)*e.getVertex(0)->y() + alpha * e.getVertex(1)->y(), - (1 - alpha)*e.getVertex(0)->z() + alpha * e.getVertex(1)->z()); - glVertex3d(pc.x(), pc.y(), pc.z()); + (1 - alpha)*e.getVertex(0)->y() + alpha * e.getVertex(1)->y(), + (1 - alpha)*e.getVertex(0)->z() + alpha * e.getVertex(1)->z()); + glVertex3d(pc.x(), pc.y(), pc.z()); glVertex3d(p.x(), p.y(), p.z()); } } @@ -434,7 +434,7 @@ template<class T> static void addSmoothNormals(GEntity *e, std::vector<T*> &elements) { for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; SPoint3 pc(0., 0., 0.); if(CTX::instance()->mesh.explode != 1.) pc = ele->barycenter(); for(int j = 0; j < ele->getNumFacesRep(); j++){ @@ -460,7 +460,7 @@ static void addElementsInArrays(GEntity *e, std::vector<T*> &elements, bool edges, bool faces) { for(unsigned int i = 0; i < elements.size(); i++){ - MElement *ele = (MElement*) elements[i]; + MElement *ele = elements[i]; if(!isElementVisible(ele) || ele->getDim() < 1) continue; @@ -694,7 +694,8 @@ class initMeshGFace { { int num = 0; if(CTX::instance()->mesh.surfacesEdges){ - num += (3 * f->triangles.size() + 4 * f->quadrangles.size() + 4 * f->polygons.size()) / 2; + num += (3 * f->triangles.size() + 4 * f->quadrangles.size() + + 4 * f->polygons.size()) / 2; if(CTX::instance()->mesh.explode != 1.) num *= 2; if(_curved) num *= 2; } @@ -704,7 +705,8 @@ class initMeshGFace { { int num = 0; if(CTX::instance()->mesh.surfacesFaces){ - num += (f->triangles.size() + 2 * f->quadrangles.size() + 2 * f->polygons.size()); + num += (f->triangles.size() + 2 * f->quadrangles.size() + + 2 * f->polygons.size()); if(_curved) num *= 4; } return num + 100; @@ -811,8 +813,8 @@ class initMeshGRegion { if(CTX::instance()->clipWholeElements && CTX::instance()->clipOnlyDrawIntersectingVolume){ for(int clip = 0; clip < 6; clip++){ - if(CTX::instance()->mesh.clip & (1 << clip)) - return (int)sqrt((double)num); + if(CTX::instance()->mesh.clip & (1 << clip)) + return (int)sqrt((double)num); } } return num; @@ -985,13 +987,13 @@ void drawContext::drawMesh() PView::list[j]->setChanged(true); } - glPointSize(CTX::instance()->mesh.pointSize); - gl2psPointSize(CTX::instance()->mesh.pointSize * - CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)CTX::instance()->mesh.pointSize); + gl2psPointSize((float)(CTX::instance()->mesh.pointSize * + CTX::instance()->print.epsPointSizeFactor)); - glLineWidth(CTX::instance()->mesh.lineWidth); - gl2psLineWidth(CTX::instance()->mesh.lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->mesh.lineWidth); + gl2psLineWidth((float)(CTX::instance()->mesh.lineWidth * + CTX::instance()->print.epsLineWidthFactor)); if(CTX::instance()->mesh.lightTwoSide) glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); @@ -1001,9 +1003,9 @@ void drawContext::drawMesh() if(!CTX::instance()->clipWholeElements){ for(int i = 0; i < 6; i++) if(CTX::instance()->mesh.clip & (1 << i)) - glEnable((GLenum)(GL_CLIP_PLANE0 + i)); + glEnable((GLenum)(GL_CLIP_PLANE0 + i)); else - glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + glDisable((GLenum)(GL_CLIP_PLANE0 + i)); } static bool busy = false; diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp index 982995e019f7d420f4a4ea5a6cf4c2d73a343be6..516b46befb0819d6bfab96f426e8c8d9ce888d80 100644 --- a/Graphics/drawPost.cpp +++ b/Graphics/drawPost.cpp @@ -23,13 +23,13 @@ #include "matheval.h" #endif -// we only "really" draw forst order elements (high order ones are -// subdivided in adaptiveView beforehand) -#define NMAX 35 +// we only really draw first order elements (high order ones should +// always be subdivided in adaptiveView beforehand) +#define NMAX 35 // SHOULD BE 8! static void saturate(int nb, double val[NMAX][9], double vmin, double vmax, - int i0=0, int i1=1, int i2=2, int i3=3, - int i4=4, int i5=5, int i6=6, int i7=7) + int i0=0, int i1=1, int i2=2, int i3=3, + int i4=4, int i5=5, int i6=6, int i7=7) { int id[8] = {i0, i1, i2, i3, i4, i5, i6, i7}; for(int i = 0; i < nb; i++){ @@ -66,7 +66,7 @@ static SVector3 getPointNormal(PView *p, double v) } static void getLineNormal(PView *p, double x[2], double y[2], double z[2], - double *v, SVector3 n[2], bool computeNormal) + double *v, SVector3 n[2], bool computeNormal) { PViewOptions *opt = p->getOptions(); @@ -110,8 +110,8 @@ static void getLineNormal(PView *p, double x[2], double y[2], double z[2], } static bool getExternalValues(PView *p, int index, int ient, int iele, - int numNodes, int numComp, double val[NMAX][9], - int &numComp2, double val2[NMAX][9]) + int numNodes, int numComp, double val[NMAX][9], + int &numComp2, double val2[NMAX][9]) { PViewOptions *opt = p->getOptions(); @@ -154,7 +154,7 @@ static bool getExternalValues(PView *p, int index, int ient, int iele, } static void applyGeneralRaise(PView *p, int numNodes, int numComp, - double vals[NMAX][9], double xyz[NMAX][3]) + double vals[NMAX][9], double xyz[NMAX][3]) { PViewOptions *opt = p->getOptions(); @@ -293,15 +293,15 @@ static bool isElementVisible(PViewOptions *opt, int dim, int numNodes, if(dim < 3 && CTX::instance()->clipOnlyVolume){ } else{ - double d = intersectClipPlane(clip, numNodes, xyz); - if(dim == 3 && CTX::instance()->clipOnlyDrawIntersectingVolume && d){ - hidden = true; - break; - } - else if(d < 0){ - hidden = true; - break; - } + double d = intersectClipPlane(clip, numNodes, xyz); + if(dim == 3 && CTX::instance()->clipOnlyDrawIntersectingVolume && d){ + hidden = true; + break; + } + else if(d < 0){ + hidden = true; + break; + } } } } @@ -309,7 +309,7 @@ static bool isElementVisible(PViewOptions *opt, int dim, int numNodes, } static void addOutlinePoint(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre, int i0=0) + bool pre, int i0=0) { if(pre) return; SVector3 n = getPointNormal(p, 1.); @@ -317,7 +317,7 @@ static void addOutlinePoint(PView *p, double xyz[NMAX][3], unsigned int color, } static void addScalarPoint(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre, int i0=0, bool unique=false) + bool pre, int i0=0, bool unique=false) { if(pre) return; @@ -336,7 +336,7 @@ static void addScalarPoint(PView *p, double xyz[NMAX][3], double val[NMAX][9], } static void addOutlineLine(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre, int i0=0, int i1=1) + bool pre, int i0=0, int i1=1) { if(pre) return; @@ -353,7 +353,7 @@ static void addOutlineLine(PView *p, double xyz[NMAX][3], unsigned int color, } static void addScalarLine(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre, int i0=0, int i1=1, bool unique=false) + bool pre, int i0=0, int i1=1, bool unique=false) { if(pre) return; @@ -432,7 +432,7 @@ static void addScalarLine(PView *p, double xyz[NMAX][3], double val[NMAX][9], } static void addOutlineTriangle(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre, int i0=0, int i1=1, int i2=2) + bool pre, int i0=0, int i1=1, int i2=2) { PViewOptions *opt = p->getOptions(); @@ -458,8 +458,8 @@ static void addOutlineTriangle(PView *p, double xyz[NMAX][3], unsigned int color } static void addScalarTriangle(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre, int i0=0, int i1=1, int i2=2, - bool unique=false, bool skin=false) + bool pre, int i0=0, int i1=1, int i2=2, + bool unique=false, bool skin=false) { PViewOptions *opt = p->getOptions(); @@ -576,7 +576,7 @@ static void addScalarTriangle(PView *p, double xyz[NMAX][3], double val[NMAX][9] } static void addOutlineQuadrangle(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre, int i0=0, int i1=1, int i2=2, int i3=3) + bool pre, int i0=0, int i1=1, int i2=2, int i3=3) { PViewOptions *opt = p->getOptions(); @@ -602,8 +602,8 @@ static void addOutlineQuadrangle(PView *p, double xyz[NMAX][3], unsigned int col } static void addScalarQuadrangle(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre, int i0=0, int i1=1, int i2=2, int i3=3, - bool unique=false) + bool pre, int i0=0, int i1=1, int i2=2, int i3=3, + bool unique=false) { PViewOptions *opt = p->getOptions(); @@ -623,7 +623,7 @@ static void addScalarQuadrangle(PView *p, double xyz[NMAX][3], double val[NMAX][ } static void addOutlineTetrahedron(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre) + bool pre) { const int it[4][3] = {{0, 2, 1}, {0, 1, 3}, {0, 3, 2}, {3, 1, 2}}; for(int i = 0; i < 4; i++) @@ -631,7 +631,7 @@ static void addOutlineTetrahedron(PView *p, double xyz[NMAX][3], unsigned int co } static void addScalarTetrahedron(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre, int i0=0, int i1=1, int i2=2, int i3=3) + bool pre, int i0=0, int i1=1, int i2=2, int i3=3) { PViewOptions *opt = p->getOptions(); @@ -686,7 +686,7 @@ static void addScalarTetrahedron(PView *p, double xyz[NMAX][3], double val[NMAX] } static void addOutlineHexahedron(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre) + bool pre) { const int iq[6][4] = {{0, 3, 2, 1}, {0, 1, 5, 4}, {0, 4, 7, 3}, {1, 2, 6, 5}, {2, 3, 7, 6}, {4, 5, 6, 7}}; @@ -697,7 +697,7 @@ static void addOutlineHexahedron(PView *p, double xyz[NMAX][3], unsigned int col } static void addScalarHexahedron(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre) + bool pre) { PViewOptions *opt = p->getOptions(); @@ -719,7 +719,7 @@ static void addScalarHexahedron(PView *p, double xyz[NMAX][3], double val[NMAX][ } static void addOutlinePrism(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre) + bool pre) { const int iq[3][4] = {{0, 1, 4, 3}, {0, 3, 5, 2}, {1, 2, 5, 4}}; const int it[2][3] = {{0, 2, 1}, {3, 4, 5}}; @@ -730,7 +730,7 @@ static void addOutlinePrism(PView *p, double xyz[NMAX][3], unsigned int color, addOutlineTriangle(p, xyz, color, pre, it[i][0], it[i][1], it[i][2]); } static void addScalarPrism(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre) + bool pre) { PViewOptions *opt = p->getOptions(); const int iq[3][4] = {{0, 1, 4, 3}, {0, 3, 5, 2}, {1, 2, 5, 4}}; @@ -752,7 +752,7 @@ static void addScalarPrism(PView *p, double xyz[NMAX][3], double val[NMAX][9], } static void addOutlinePyramid(PView *p, double xyz[NMAX][3], unsigned int color, - bool pre) + bool pre) { const int it[4][3] = {{0, 1, 4}, {3, 0, 4}, {1, 2, 4}, {2, 3, 4}}; @@ -762,7 +762,7 @@ static void addOutlinePyramid(PView *p, double xyz[NMAX][3], unsigned int color, } static void addScalarPyramid(PView *p, double xyz[NMAX][3], double val[NMAX][9], - bool pre) + bool pre) { PViewOptions *opt = p->getOptions(); @@ -798,7 +798,7 @@ static void addOutlineElement(PView *p, int type, double xyz[NMAX][3], bool pre) } static void addScalarElement(PView *p, int type, double xyz[NMAX][3], - double val[NMAX][9], bool pre) + double val[NMAX][9], bool pre) { switch(type){ case TYPE_PNT: addScalarPoint(p, xyz, val, pre); break; @@ -813,8 +813,8 @@ static void addScalarElement(PView *p, int type, double xyz[NMAX][3], } static void addVectorElement(PView *p, int ient, int iele, int numNodes, - int type, double xyz[NMAX][3], double val[NMAX][9], - bool pre) + int type, double xyz[NMAX][3], double val[NMAX][9], + bool pre) { // use adaptive data if available PViewData *data = p->getData(true); @@ -920,7 +920,7 @@ static void addVectorElement(PView *p, int ient, int iele, int numNodes, } static void addTensorElement(PView *p, int numNodes, int type, - double xyz[NMAX][3], double val[NMAX][9], bool pre) + double xyz[NMAX][3], double val[NMAX][9], bool pre) { PViewOptions *opt = p->getOptions(); @@ -933,6 +933,8 @@ static void addTensorElement(PView *p, int numNodes, int type, static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) { + static int numNodesError = 0, numCompError = 0; + // use adaptive data if available PViewData *data = p->getData(true); PViewOptions *opt = p->getOptions(); @@ -948,12 +950,21 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) if(opt->skipElement(type)) continue; int numComp = data->getNumComponents(opt->timeStep, ent, i); int numNodes = data->getNumNodes(opt->timeStep, ent, i); - if(numNodes > 35){ - Msg::Error("Should never draw view with > 20 nodes per element: adapt?"); + if(numNodes > NMAX){ + if(numNodesError != numNodes){ + numNodesError = numNodes; + Msg::Error("You should never draw views with > %d nodes per element: use", + NMAX); + Msg::Error("'Adapt visualization grid' to view high-order datasets!"); + } continue; } if(numComp > 9){ - Msg::Error("Should never draw view with > 9 components: adapt?"); + if(numCompError != numComp){ + numCompError = numComp; + Msg::Error("You should never draw views with > 9 values per node: use"); + Msg::Error("'Adapt visualization grid' to view high-order datasets!"); + } continue; } for(int j = 0; j < numNodes; j++){ @@ -972,22 +983,22 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) addOutlineElement(p, type, xyz, preprocessNormalsOnly); if(opt->intervalsType != PViewOptions::Numeric){ - if(data->useGaussPoints()){ - for(int j = 0; j < numNodes; j++){ - double xyz2[NMAX][3], val2[NMAX][9]; - xyz2[0][0] = xyz[j][0]; - xyz2[0][1] = xyz[j][1]; - xyz2[0][2] = xyz[j][2]; - for(int k = 0; k < numComp; k++) - val2[0][k] = val[j][k]; - if(numComp == 1 && opt->drawScalars) - addScalarElement(p, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); - else if(numComp == 3 && opt->drawVectors) - addVectorElement(p, ent, i, 1, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); - else if(numComp == 9 && opt->drawTensors) - addTensorElement(p, 1, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); - } - } + if(data->useGaussPoints()){ + for(int j = 0; j < numNodes; j++){ + double xyz2[NMAX][3], val2[NMAX][9]; + xyz2[0][0] = xyz[j][0]; + xyz2[0][1] = xyz[j][1]; + xyz2[0][2] = xyz[j][2]; + for(int k = 0; k < numComp; k++) + val2[0][k] = val[j][k]; + if(numComp == 1 && opt->drawScalars) + addScalarElement(p, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); + else if(numComp == 3 && opt->drawVectors) + addVectorElement(p, ent, i, 1, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); + else if(numComp == 9 && opt->drawTensors) + addTensorElement(p, 1, TYPE_PNT, xyz2, val2, preprocessNormalsOnly); + } + } else if(numComp == 1 && opt->drawScalars) addScalarElement(p, type, xyz, val, preprocessNormalsOnly); else if(numComp == 3 && opt->drawVectors) @@ -1019,18 +1030,17 @@ static void drawArrays(drawContext *ctx, PView *p, VertexArray *va, GLint type, f = char2float(*n); } if(opt->pointType == 2){ - - int s = (int)(opt->pointSize * f); - if(s){ - glPointSize(s); - gl2psPointSize(s * CTX::instance()->print.epsPointSizeFactor); - glBegin(GL_POINTS); - glVertex3d(p[0], p[1], p[2]); - glEnd(); - } + int s = (int)(opt->pointSize * f); + if(s){ + glPointSize((float)s); + gl2psPointSize((float)(s * CTX::instance()->print.epsPointSizeFactor)); + glBegin(GL_POINTS); + glVertex3d(p[0], p[1], p[2]); + glEnd(); + } } else - ctx->drawSphere(opt->pointSize * f, p[0], p[1], p[2], opt->light); + ctx->drawSphere(opt->pointSize * f, p[0], p[1], p[2], opt->light); } } else if(type == GL_LINES && opt->lineType > 0){ @@ -1087,9 +1097,9 @@ static void drawVectorArray(drawContext *ctx, PView *p, VertexArray *va) double scale = (opt->arrowSizeMax - opt->arrowSizeMin) / lmax; // log scaling if(opt->scaleType == PViewOptions::Logarithmic && - opt->tmpMin > 0 && opt->tmpMax > opt->tmpMin && l != opt->tmpMin){ - scale = (opt->arrowSizeMax - opt->arrowSizeMin) / l * - log10(l / opt->tmpMin) / log10(opt->tmpMax / opt->tmpMin); + opt->tmpMin > 0 && opt->tmpMax > opt->tmpMin && l != opt->tmpMin){ + scale = (opt->arrowSizeMax - opt->arrowSizeMin) / l * + log10(l / opt->tmpMin) / log10(opt->tmpMax / opt->tmpMin); } if(opt->arrowSizeMin && l) scale += opt->arrowSizeMin / l; double px = scale * v[0]; @@ -1132,7 +1142,7 @@ static std::string stringValue(int numComp, double d[9], double norm, } static void drawNumberGlyphs(drawContext *ctx, PView *p, int numNodes, int numComp, - double xyz[NMAX][3], double val[NMAX][9]) + double xyz[NMAX][3], double val[NMAX][9]) { PViewOptions *opt = p->getOptions(); double d[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.}; @@ -1258,8 +1268,8 @@ class initPView { CTX::instance()->clipOnlyDrawIntersectingVolume){ PViewOptions *opt = p->getOptions(); for(int clip = 0; clip < 6; clip++){ - if(opt->clip & (1 << clip)) - return (int)sqrt((double)num); + if(opt->clip & (1 << clip)) + return (int)sqrt((double)num); } } return num; @@ -1353,8 +1363,8 @@ class initPView { p->va_vectors->finalize(); Msg::Info("Rendering %d vertices", p->va_points->getNumVertices() + - p->va_lines->getNumVertices() + p->va_triangles->getNumVertices() + - p->va_vectors->getNumVertices()); + p->va_lines->getNumVertices() + p->va_triangles->getNumVertices() + + p->va_vectors->getNumVertices()); p->setChanged(false); } @@ -1386,11 +1396,13 @@ class drawPView { if(!opt->visible || opt->type != PViewOptions::Plot3D) return; if(!_ctx->isVisible(p)) return; - glPointSize(opt->pointSize); - gl2psPointSize(opt->pointSize * CTX::instance()->print.epsPointSizeFactor); + glPointSize((float)opt->pointSize); + gl2psPointSize((float)(opt->pointSize * + CTX::instance()->print.epsPointSizeFactor)); - glLineWidth(opt->lineWidth); - gl2psLineWidth(opt->lineWidth * CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)opt->lineWidth); + gl2psLineWidth((float)(opt->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); if(opt->lightTwoSide) glLightModelf(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); @@ -1399,10 +1411,10 @@ class drawPView { if(!CTX::instance()->clipWholeElements){ for(int i = 0; i < 6; i++) - if(opt->clip & (1 << i)) - glEnable((GLenum)(GL_CLIP_PLANE0 + i)); - else - glDisable((GLenum)(GL_CLIP_PLANE0 + i)); + if(opt->clip & (1 << i)) + glEnable((GLenum)(GL_CLIP_PLANE0 + i)); + else + glDisable((GLenum)(GL_CLIP_PLANE0 + i)); } if(CTX::instance()->alpha && ColorTable_IsAlpha(&opt->colorTable)){ @@ -1474,9 +1486,9 @@ class drawPView { if(opt->axes && opt->type == PViewOptions::Plot3D){ glColor4ubv((GLubyte *) & opt->color.axes); - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); if(!opt->axesAutoPosition) _ctx->drawAxes(opt->axes, opt->axesTics, opt->axesFormat, opt->axesLabel, opt->axesPosition, opt->axesMikado); @@ -1504,9 +1516,9 @@ class drawPViewBoundingBox { if(bb.empty()) return; glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glLineWidth(CTX::instance()->lineWidth); - gl2psLineWidth(CTX::instance()->lineWidth * - CTX::instance()->print.epsLineWidthFactor); + glLineWidth((float)CTX::instance()->lineWidth); + gl2psLineWidth((float)(CTX::instance()->lineWidth * + CTX::instance()->print.epsLineWidthFactor)); _ctx->drawBox(bb.min().x(), bb.min().y(), bb.min().z(), bb.max().x(), bb.max().y(), bb.max().z()); diff --git a/Graphics/gl2gif.cpp b/Graphics/gl2gif.cpp index 7f94fa6b4115d1bf2cd362ccecda4b8cb17c875f..3fdddc21f9c5ff38acdf75d9f74d9f8614401639 100644 --- a/Graphics/gl2gif.cpp +++ b/Graphics/gl2gif.cpp @@ -88,8 +88,8 @@ static void ppm_freecolorhash(colorhash_table cht) } static colorhash_table ppm_computecolorhash(pixel ** const pixels, - const int cols, const int rows, - const int maxcolors, int *const colorsP) + const int cols, const int rows, + const int maxcolors, int *const colorsP) { colorhash_table cht; const pixel *pP; @@ -125,7 +125,7 @@ static colorhash_table ppm_computecolorhash(pixel ** const pixels, } static int ppm_addtocolorhash(colorhash_table cht, const pixel * const colorP, - const int value) + const int value) { register int hash; register colorhist_list chl; @@ -140,7 +140,7 @@ static int ppm_addtocolorhash(colorhash_table cht, const pixel * const colorP, } static colorhist_vector ppm_colorhashtocolorhist(const colorhash_table cht, - const int maxcolors) + const int maxcolors) { colorhist_vector chv; colorhist_list chl; @@ -162,7 +162,7 @@ static colorhist_vector ppm_colorhashtocolorhist(const colorhash_table cht, } static colorhash_table ppm_colorhisttocolorhash(const colorhist_vector chv, - const int colors) + const int colors) { colorhash_table cht; int i, hash; @@ -189,8 +189,8 @@ static colorhash_table ppm_colorhisttocolorhash(const colorhist_vector chv, } static colorhist_vector ppm_computecolorhist(pixel ** const pixels, - const int cols, const int rows, - const int maxcolors, int *const colorsP) + const int cols, const int rows, + const int maxcolors, int *const colorsP) { colorhash_table cht; colorhist_vector chv; @@ -433,11 +433,11 @@ static colorhist_vector mediancut(colorhist_vector chv, int colors, float rl, gl, bl; PPM_ASSIGN(p, maxr - minr, 0, 0); - rl = PPM_LUMIN(p); + rl = (float)PPM_LUMIN(p); PPM_ASSIGN(p, 0, maxg - ming, 0); - gl = PPM_LUMIN(p); + gl = (float)PPM_LUMIN(p); PPM_ASSIGN(p, 0, 0, maxb - minb); - bl = PPM_LUMIN(p); + bl = (float)PPM_LUMIN(p); if(rl >= gl && rl >= bl) qsort((char *)&(chv[indx]), clrs, sizeof(struct colorhist_item), @@ -1309,7 +1309,7 @@ void create_gif(FILE * outfile, PixelBuffer *buffer, } if(usehash) { if(ppm_addtocolorhash(cht, pP, ind) < 0) { - Msg::Warning("GIF: Out of memory adding to hash table"); + Msg::Warning("GIF: Out of memory adding to hash table"); usehash = 0; } } diff --git a/Graphics/gl2ps.cpp b/Graphics/gl2ps.cpp index 86f632117b9e2983f54dd8c82bd186ce2e77bd83..120926f90384bf19b5a11cda787917a01a399202 100644 --- a/Graphics/gl2ps.cpp +++ b/Graphics/gl2ps.cpp @@ -2360,8 +2360,8 @@ static void gl2psParseFeedbackBuffer(GLint used) node->image->width = (GLint)current[2]; current += 2; used -= 2; node->image->height = (GLint)current[2]; - prim->verts[0].xyz[0] = prim->verts[0].xyz[0] - (int)(node->image->width / 2) + 0.5; - prim->verts[0].xyz[1] = prim->verts[0].xyz[1] - (int)(node->image->height / 2) + 0.5; + prim->verts[0].xyz[0] = prim->verts[0].xyz[0] - (int)(node->image->width / 2) + 0.5F; + prim->verts[0].xyz[1] = prim->verts[0].xyz[1] - (int)(node->image->height / 2) + 0.5F; for(i = 1; i < 4; i++){ for(v = 0; v < 3; v++){ prim->verts[i].xyz[v] = prim->verts[0].xyz[v]; @@ -2457,7 +2457,7 @@ static void gl2psPrintPostScriptPixmap(GLfloat x, GLfloat y, GL2PSimage *im) for(row = 0; row < height; row++){ for(col = 0; col < width; col++){ gl2psGetRGB(im, col, row, &dr, &dg, &db); - fgrey = (0.30 * dr + 0.59 * dg + 0.11 * db); + fgrey = (0.30F * dr + 0.59F * dg + 0.11F * db); grey = (unsigned char)(255. * fgrey); gl2psWriteByte(grey); } @@ -4929,46 +4929,46 @@ static void gl2psPrintSVGSmoothTriangle(GL2PSxyz xyz[3], GL2PSrgba rgba[3]) /* subdivide into 4 subtriangles */ for(i = 0; i < 3; i++){ xyz2[0][i] = xyz[0][i]; - xyz2[1][i] = 0.5 * (xyz[0][i] + xyz[1][i]); - xyz2[2][i] = 0.5 * (xyz[0][i] + xyz[2][i]); + xyz2[1][i] = 0.5F * (xyz[0][i] + xyz[1][i]); + xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); } for(i = 0; i < 4; i++){ rgba2[0][i] = rgba[0][i]; - rgba2[1][i] = 0.5 * (rgba[0][i] + rgba[1][i]); - rgba2[2][i] = 0.5 * (rgba[0][i] + rgba[2][i]); + rgba2[1][i] = 0.5F * (rgba[0][i] + rgba[1][i]); + rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); } gl2psPrintSVGSmoothTriangle(xyz2, rgba2); for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[1][i]); + xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); xyz2[1][i] = xyz[1][i]; - xyz2[2][i] = 0.5 * (xyz[1][i] + xyz[2][i]); + xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); } for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[1][i]); + rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); rgba2[1][i] = rgba[1][i]; - rgba2[2][i] = 0.5 * (rgba[1][i] + rgba[2][i]); + rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); } gl2psPrintSVGSmoothTriangle(xyz2, rgba2); for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[2][i]); + xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[2][i]); xyz2[1][i] = xyz[2][i]; - xyz2[2][i] = 0.5 * (xyz[1][i] + xyz[2][i]); + xyz2[2][i] = 0.5F * (xyz[1][i] + xyz[2][i]); } for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[2][i]); + rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[2][i]); rgba2[1][i] = rgba[2][i]; - rgba2[2][i] = 0.5 * (rgba[1][i] + rgba[2][i]); + rgba2[2][i] = 0.5F * (rgba[1][i] + rgba[2][i]); } gl2psPrintSVGSmoothTriangle(xyz2, rgba2); for(i = 0; i < 3; i++){ - xyz2[0][i] = 0.5 * (xyz[0][i] + xyz[1][i]); - xyz2[1][i] = 0.5 * (xyz[1][i] + xyz[2][i]); - xyz2[2][i] = 0.5 * (xyz[0][i] + xyz[2][i]); + xyz2[0][i] = 0.5F * (xyz[0][i] + xyz[1][i]); + xyz2[1][i] = 0.5F * (xyz[1][i] + xyz[2][i]); + xyz2[2][i] = 0.5F * (xyz[0][i] + xyz[2][i]); } for(i = 0; i < 4; i++){ - rgba2[0][i] = 0.5 * (rgba[0][i] + rgba[1][i]); - rgba2[1][i] = 0.5 * (rgba[1][i] + rgba[2][i]); - rgba2[2][i] = 0.5 * (rgba[0][i] + rgba[2][i]); + rgba2[0][i] = 0.5F * (rgba[0][i] + rgba[1][i]); + rgba2[1][i] = 0.5F * (rgba[1][i] + rgba[2][i]); + rgba2[2][i] = 0.5F * (rgba[0][i] + rgba[2][i]); } gl2psPrintSVGSmoothTriangle(xyz2, rgba2); } @@ -5107,6 +5107,9 @@ static void gl2psPrintSVGPrimitive(void *data) gl2psSVGGetColorString(prim->verts[0].rgba, col); gl2psPrintf("<text fill=\"%s\" x=\"%g\" y=\"%g\" font-size=\"%d\" ", col, xyz[0][0], xyz[0][1], prim->data.text->fontsize); + if(prim->data.text->angle) + gl2psPrintf("transform=\"rotate(%g, %g, %g)\" ", + -prim->data.text->angle, xyz[0][0], xyz[0][1]); if(!strcmp(prim->data.text->fontname, "Times-Roman")) gl2psPrintf("font-family=\"Times\">"); else if(!strcmp(prim->data.text->fontname, "Times-Bold")) diff --git a/Graphics/gl2yuv.cpp b/Graphics/gl2yuv.cpp index 552882188db77f8a107cb4824180ed3cd8ffc565..376fadd84b11f1e8679ba265da7fb1be75b1ff4f 100644 --- a/Graphics/gl2yuv.cpp +++ b/Graphics/gl2yuv.cpp @@ -59,14 +59,14 @@ void create_yuv(FILE * outfile, PixelBuffer *buffer) maxValue = 255; for(index = 0; index <= maxValue; index++) { - mult299[index] = index * 0.29900; - mult587[index] = index * 0.58700; - mult114[index] = index * 0.11400; - mult16874[index] = -0.16874 * index; - mult33126[index] = -0.33126 * index; - mult5[index] = index * 0.50000; - mult41869[index] = -0.41869 * index; - mult08131[index] = -0.08131 * index; + mult299[index] = index * 0.29900F; + mult587[index] = index * 0.58700F; + mult114[index] = index * 0.11400F; + mult16874[index] = -0.16874F * index; + mult33126[index] = -0.33126F * index; + mult5[index] = index * 0.50000F; + mult41869[index] = -0.41869F * index; + mult08131[index] = -0.08131F * index; } first = 0; diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp index 68048b5dcd00d948a0574865e02b90d11e38f3a7..bb2258ae0355af49f8221b792358709cd9a40742 100644 --- a/Mesh/BDS.cpp +++ b/Mesh/BDS.cpp @@ -25,51 +25,51 @@ void outputScalarField(std::list<BDS_Face*> t, const char *iii, int param, GFace if (!(*tit)->deleted){ (*tit)->getNodes(pts); if(param) - fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d};\n", - pts[0]->u, pts[0]->v, 0.0, - pts[1]->u, pts[1]->v, 0.0, - pts[2]->u, pts[2]->v, 0.0, - pts[0]->iD, pts[1]->iD, pts[2]->iD); + fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d};\n", + pts[0]->u, pts[0]->v, 0.0, + pts[1]->u, pts[1]->v, 0.0, + pts[2]->u, pts[2]->v, 0.0, + pts[0]->iD, pts[1]->iD, pts[2]->iD); else{ - if(!gf){ - if (pts[3]){ - fprintf(f, "SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d,%d};\n", - pts[0]->X, pts[0]->Y, pts[0]->Z, - pts[1]->X, pts[1]->Y, pts[1]->Z, - pts[2]->X, pts[2]->Y, pts[2]->Z, - pts[3]->X, pts[3]->Y, pts[3]->Z, - pts[0]->iD, pts[1]->iD, pts[2]->iD, pts[3]->iD); - } - else{ - fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d};\n", - pts[0]->X, pts[0]->Y, pts[0]->Z, - pts[1]->X, pts[1]->Y, pts[1]->Z, - pts[2]->X, pts[2]->Y, pts[2]->Z, - pts[0]->iD, pts[1]->iD, pts[2]->iD); - } - } - else{ - if (pts[3]){ - fprintf(f, "SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g,%g};\n", - pts[0]->X, pts[0]->Y, pts[0]->Z, - pts[1]->X, pts[1]->Y, pts[1]->Z, - pts[2]->X, pts[2]->Y, pts[2]->Z, - pts[3]->X, pts[3]->Y, pts[3]->Z, - gf->curvatureDiv(SPoint2(pts[0]->u, pts[0]->v)), - gf->curvatureDiv(SPoint2(pts[1]->u, pts[1]->v)), - gf->curvatureDiv(SPoint2(pts[2]->u, pts[2]->v)), - gf->curvatureDiv(SPoint2(pts[3]->u, pts[3]->v))); - } - else{ - fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g};\n", - pts[0]->X, pts[0]->Y, pts[0]->Z, - pts[1]->X, pts[1]->Y, pts[1]->Z, - pts[2]->X, pts[2]->Y, pts[2]->Z, - gf->curvatureDiv(SPoint2(pts[0]->u, pts[0]->v)), - gf->curvatureDiv(SPoint2(pts[1]->u, pts[1]->v)), - gf->curvatureDiv(SPoint2(pts[2]->u, pts[2]->v))); - } - } + if(!gf){ + if (pts[3]){ + fprintf(f, "SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d,%d};\n", + pts[0]->X, pts[0]->Y, pts[0]->Z, + pts[1]->X, pts[1]->Y, pts[1]->Z, + pts[2]->X, pts[2]->Y, pts[2]->Z, + pts[3]->X, pts[3]->Y, pts[3]->Z, + pts[0]->iD, pts[1]->iD, pts[2]->iD, pts[3]->iD); + } + else{ + fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%d,%d,%d};\n", + pts[0]->X, pts[0]->Y, pts[0]->Z, + pts[1]->X, pts[1]->Y, pts[1]->Z, + pts[2]->X, pts[2]->Y, pts[2]->Z, + pts[0]->iD, pts[1]->iD, pts[2]->iD); + } + } + else{ + if (pts[3]){ + fprintf(f, "SQ(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g,%g};\n", + pts[0]->X, pts[0]->Y, pts[0]->Z, + pts[1]->X, pts[1]->Y, pts[1]->Z, + pts[2]->X, pts[2]->Y, pts[2]->Z, + pts[3]->X, pts[3]->Y, pts[3]->Z, + gf->curvatureDiv(SPoint2(pts[0]->u, pts[0]->v)), + gf->curvatureDiv(SPoint2(pts[1]->u, pts[1]->v)), + gf->curvatureDiv(SPoint2(pts[2]->u, pts[2]->v)), + gf->curvatureDiv(SPoint2(pts[3]->u, pts[3]->v))); + } + else{ + fprintf(f, "ST(%g,%g,%g,%g,%g,%g,%g,%g,%g){%g,%g,%g};\n", + pts[0]->X, pts[0]->Y, pts[0]->Z, + pts[1]->X, pts[1]->Y, pts[1]->Z, + pts[2]->X, pts[2]->Y, pts[2]->Z, + gf->curvatureDiv(SPoint2(pts[0]->u, pts[0]->v)), + gf->curvatureDiv(SPoint2(pts[1]->u, pts[1]->v)), + gf->curvatureDiv(SPoint2(pts[2]->u, pts[2]->v))); + } + } } } ++tit; @@ -250,13 +250,13 @@ BDS_Edge *BDS_Mesh::recover_edge_fast(BDS_Point *p1, BDS_Point *p2){ BDS_Edge *e= t->oppositeEdge (p1); BDS_Face *f= e->otherFace (t); if (!f->e4){ - BDS_Point *p2b = f->oppositeVertex(e); - if (p2 == p2b){ - if (swap_edge(e, BDS_SwapEdgeTestQuality(false,false))){ - printf("coucou\n"); - return find_edge (p1,p2->iD); - } - } + BDS_Point *p2b = f->oppositeVertex(e); + if (p2 == p2b){ + if (swap_edge(e, BDS_SwapEdgeTestQuality(false,false))){ + printf("coucou\n"); + return find_edge (p1,p2->iD); + } + } } } ++it; @@ -282,7 +282,6 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, std::set<EdgeToRecover> *e2 Msg::Debug("edge %d %d has to be recovered", num1, num2); int ix = 0; - int ixMax = 300; double x[2]; while(1){ std::vector<BDS_Edge*> intersected; @@ -293,27 +292,27 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, std::set<EdgeToRecover> *e2 while(it != edges.end()){ e = (*it); if(!e->deleted && e->p1 != p1 && e->p1 != p2 && e->p2 != p1 && e->p2 != p2) - if(Intersect_Edges_2d(e->p1->u, e->p1->v, - e->p2->u, e->p2->v, - p1->u, p1->v, - p2->u, p2->v,x)){ - // intersect - if(e2r && e2r->find(EdgeToRecover(e->p1->iD, e->p2->iD, 0)) != e2r->end()){ - std::set<EdgeToRecover>::iterator itr1 = - e2r->find(EdgeToRecover(e->p1->iD, e->p2->iD, 0)); - std::set<EdgeToRecover>::iterator itr2 = - e2r->find(EdgeToRecover(num1, num2, 0)); - Msg::Debug("edge %d %d on model edge %d cannot be recovered because" - " it intersects %d %d on model edge %d", num1, num2, itr2->ge->tag(), - e->p1->iD, e->p2->iD, itr1->ge->tag()); - // now throw a class that contains the diagnostic - not_recovered->insert(EdgeToRecover(num1, num2, itr2->ge)); - not_recovered->insert(EdgeToRecover(e->p1->iD, e->p2->iD, itr1->ge)); - selfIntersection = true; - } - if (e->numfaces() != e->numTriangles())return 0; - intersected.push_back(e); - } + if(Intersect_Edges_2d(e->p1->u, e->p1->v, + e->p2->u, e->p2->v, + p1->u, p1->v, + p2->u, p2->v,x)){ + // intersect + if(e2r && e2r->find(EdgeToRecover(e->p1->iD, e->p2->iD, 0)) != e2r->end()){ + std::set<EdgeToRecover>::iterator itr1 = + e2r->find(EdgeToRecover(e->p1->iD, e->p2->iD, 0)); + std::set<EdgeToRecover>::iterator itr2 = + e2r->find(EdgeToRecover(num1, num2, 0)); + Msg::Debug("edge %d %d on model edge %d cannot be recovered because" + " it intersects %d %d on model edge %d", num1, num2, itr2->ge->tag(), + e->p1->iD, e->p2->iD, itr1->ge->tag()); + // now throw a class that contains the diagnostic + not_recovered->insert(EdgeToRecover(num1, num2, itr2->ge)); + not_recovered->insert(EdgeToRecover(e->p1->iD, e->p2->iD, itr1->ge)); + selfIntersection = true; + } + if (e->numfaces() != e->numTriangles())return 0; + intersected.push_back(e); + } ++it; } @@ -329,17 +328,18 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, std::set<EdgeToRecover> *e2 if(!intersected.size() || ix > 1000){ BDS_Edge *eee = find_edge(num1, num2); if(!eee){ - outputScalarField(triangles, "debugp.pos", 1); - outputScalarField(triangles, "debugr.pos", 0); - Msg::Debug("edge %d %d cannot be recovered at all, look at debugp.pos " - "and debugr.pos", num1, num2); - return 0; + outputScalarField(triangles, "debugp.pos", 1); + outputScalarField(triangles, "debugr.pos", 0); + Msg::Debug("edge %d %d cannot be recovered at all, look at debugp.pos " + "and debugr.pos", num1, num2); + return 0; } return eee; } int ichoice = ix++ % intersected.size(); - bool success = swap_edge(intersected[ichoice], BDS_SwapEdgeTestQuality(false, false)); + //bool success = + swap_edge(intersected[ichoice], BDS_SwapEdgeTestQuality(false, false)); // printf("trying to swop %d %d = %d (%d %d)\n", intersected[ichoice]->p1->iD, // intersected[ichoice]->p2->iD, success, intersected[ichoice]->deleted, // intersected[ichoice]->numfaces()); diff --git a/Mesh/BDS.h b/Mesh/BDS.h index bdab5edf66ad9172a5bb1a96fece07f86b878f20..57df6f50b2dc6701430dff559a169a818e8a700e 100644 --- a/Mesh/BDS.h +++ b/Mesh/BDS.h @@ -213,7 +213,7 @@ class BDS_Edge { if(numfaces()!=2) { Msg::Fatal("otherFace wrong, ony %d faces attached to edge %d %d", - numfaces(), p1->iD, p2->iD); + numfaces(), p1->iD, p2->iD); return 0; } if(f == _faces[0]) return _faces[1]; @@ -273,14 +273,14 @@ class BDS_Face { if (e4){ Msg::Fatal("oppositeVertex to edge %d %d cannot be applied to a quad", - e->p1->iD, e->p2->iD); + e->p1->iD, e->p2->iD); return 0; } if (e == e1) return e2->commonvertex(e3); if (e == e2) return e1->commonvertex(e3); if (e == e3) return e1->commonvertex(e2); Msg::Fatal("edge %d %d does not belong to this triangle", - e->p1->iD, e->p2->iD); + e->p1->iD, e->p2->iD); return 0; } inline void getNodes(BDS_Point *n[4]) const @@ -467,6 +467,6 @@ void outputScalarField(std::list<BDS_Face*> t, const char *fn, int param, GFace void recur_tag(BDS_Face *t, BDS_GeomEntity *g); int Intersect_Edges_2d(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, - double x[2]); + double x[2]); #endif diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp index a5a8bc0df132c820e392f5b28fc8aa6e603eac0c..83fefa1f89c42145e7891e840f4b84d1baea4580 100644 --- a/Mesh/BackgroundMesh.cpp +++ b/Mesh/BackgroundMesh.cpp @@ -120,16 +120,16 @@ static double LC_MVertex_PNTS(GEntity *ge, double U, double V) GVertex *v1 = ged->getBeginVertex(); GVertex *v2 = ged->getEndVertex(); if (v1 && v2){ - Range<double> range = ged->parBounds(0); - double a = (U - range.low()) / (range.high() - range.low()); - double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() + - (a) * v2->prescribedMeshSizeAtVertex() ; - // FIXME we might want to remove this to make all lc treatment consistent - if(lc >= MAX_LC) return CTX::instance()->lc / 10.; - return lc; + Range<double> range = ged->parBounds(0); + double a = (U - range.low()) / (range.high() - range.low()); + double lc = (1 - a) * v1->prescribedMeshSizeAtVertex() + + (a) * v2->prescribedMeshSizeAtVertex() ; + // FIXME we might want to remove this to make all lc treatment consistent + if(lc >= MAX_LC) return CTX::instance()->lc / 10.; + return lc; } else - return MAX_LC; + return MAX_LC; } default: return MAX_LC; @@ -138,7 +138,7 @@ static double LC_MVertex_PNTS(GEntity *ge, double U, double V) // This is the only function that is used by the meshers double BGM_MeshSize(GEntity *ge, double U, double V, - double X, double Y, double Z) + double X, double Y, double Z) { // default lc (mesh size == size of the model) double l1 = CTX::instance()->lc; @@ -167,7 +167,7 @@ double BGM_MeshSize(GEntity *ge, double U, double V, if(lc <= 0.){ Msg::Error("Wrong characteristic length lc = %g (lcmin = %g, lcmax = %g)", - lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax); + lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax); lc = l1; } @@ -177,8 +177,8 @@ double BGM_MeshSize(GEntity *ge, double U, double V, // anisotropic version of the background field SMetric3 BGM_MeshMetric(GEntity *ge, - double U, double V, - double X, double Y, double Z) + double U, double V, + double X, double Y, double Z) { // default lc (mesh size == size of the model) double l1 = CTX::instance()->lc; @@ -200,9 +200,9 @@ SMetric3 BGM_MeshMetric(GEntity *ge, Field *f = fields->get(fields->background_field); if(f){ if (!f->isotropic()) - (*f)(X, Y, Z, l4,ge); + (*f)(X, Y, Z, l4,ge); else - l4 = SMetric3((*f)(X, Y, Z, ge)); + l4 = SMetric3((*f)(X, Y, Z, ge)); } } @@ -214,7 +214,7 @@ SMetric3 BGM_MeshMetric(GEntity *ge, if(lc <= 0.){ Msg::Error("Wrong characteristic length lc = %g (lcmin = %g, lcmax = %g)", - lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax); + lc, CTX::instance()->mesh.lcMin, CTX::instance()->mesh.lcMax); lc = l1; } SMetric3 LC(lc); diff --git a/Mesh/BoundaryLayers.cpp b/Mesh/BoundaryLayers.cpp index 0d77d5a0879f517b7c9647dd235325c3a6a50310..04c6b35e0010307462c77002d3ea6beac76f9cdb 100644 --- a/Mesh/BoundaryLayers.cpp +++ b/Mesh/BoundaryLayers.cpp @@ -48,7 +48,7 @@ int Mesh2DWithBoundaryLayers(GModel *m) Msg::Error("Unknown source face %d for boundary layer", ep->geo.Source); return 0; } - if(ep->geo.Source < 0) sourceFaceInvert[from->tag()] = true; + if(ep->geo.Source < 0) sourceFaceInvert[from->tag()] = true; sourceFaces.insert(from); std::list<GEdge*> e = from->edges(); sourceEdges.insert(e.begin(), e.end()); @@ -133,7 +133,7 @@ int Mesh2DWithBoundaryLayers(GModel *m) GFace *gf = *it; if(gf->geomType() == GEntity::BoundaryLayerSurface){ Msg::StatusBar(2, true, "Meshing surface %d (%s)", gf->tag(), - gf->getTypeString().c_str()); + gf->getTypeString().c_str()); deMeshGFace dem; dem(gf); MeshExtrudedSurface(gf); diff --git a/Mesh/CMakeLists.txt b/Mesh/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c66dd893813d24e931c0aeb06990843b1e1f115c --- /dev/null +++ b/Mesh/CMakeLists.txt @@ -0,0 +1,36 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Generator.cpp + Field.cpp + gmshSmoothHighOrder.cpp + meshGEdge.cpp + meshGEdgeExtruded.cpp + meshGFace.cpp + meshGFaceTransfinite.cpp + meshGFaceExtruded.cpp + meshGFaceBDS.cpp + meshGFaceDelaunayInsertion.cpp + meshGFaceOptimize.cpp + meshGFaceQuadrilateralize.cpp + meshGRegion.cpp + meshGRegionDelaunayInsertion.cpp + meshGRegionTransfinite.cpp + meshGRegionExtruded.cpp + meshGRegionCarveHole.cpp + meshGRegionLocalMeshMod.cpp + DivideAndConquer.cpp + BackgroundMesh.cpp + qualityMeasures.cpp + BoundaryLayers.cpp + BDS.cpp + HighOrder.cpp + meshPartition.cpp + meshRefine.cpp +) + +append_gmsh_src(Mesh "${SRC}") + diff --git a/Mesh/DivideAndConquer.cpp b/Mesh/DivideAndConquer.cpp index e3e1f53a023c7e4a198dc15a2fdfdda5756fd761..7582b364defa03c6095a5ae94f5bb7b40fc31ca5 100644 --- a/Mesh/DivideAndConquer.cpp +++ b/Mesh/DivideAndConquer.cpp @@ -559,7 +559,7 @@ static void RemoveAllDList(int n, PointRecord *pPointArray) } DocRecord::DocRecord(int n) - : numPoints(n), points(NULL), striangle(0),numTriangles(0), triangles(NULL) + : numPoints(n), points(NULL), numTriangles(0), triangles(NULL), striangle(0) { if(numPoints) points = (PointRecord*)Malloc(numPoints * sizeof(PointRecord)); diff --git a/Mesh/DivideAndConquer.h b/Mesh/DivideAndConquer.h index d71705bc02a4d788c0a5c727982857a18b108e0a..52e2dce3140d32c404438b686f7716427fda5b8d 100644 --- a/Mesh/DivideAndConquer.h +++ b/Mesh/DivideAndConquer.h @@ -53,10 +53,8 @@ class DocRecord{ Triangle *triangles; // 2D results STriangle *striangle; // connected points DocRecord(int n); - double & x(int i) - {return points[i].where.v;} - double & y(int i) - {return points[i].where.h;} + double & x(int i){ return points[i].where.v; } + double & y(int i){ return points[i].where.h; } ~DocRecord(); void MakeMeshWithPoints(); void MakeVoronoi(); diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index 73d0f580318c593a5c183c44aec5963aa7c83d22..36d08b232ac7f5f1639160fbc8d33a3314809955 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -673,9 +673,9 @@ public: t1 = crossprod(t2,g); metr = SMetric3(1./(lc*lc), - 1/(lcmax*lcmax), - 1/(lcmax*lcmax), - g,t1,t2); + 1/(lcmax*lcmax), + 1/(lcmax*lcmax), + g,t1,t2); } }; @@ -735,7 +735,7 @@ class GradientField : public Field return sqrt(gx * gx + gy * gy + gz * gz); default: Msg::Error("Field %i : Unknown kind (%i) of gradient.", this->id, - kind); + kind); return MAX_LC; } } @@ -787,7 +787,7 @@ class CurvatureField : public Field grad_norm(*field, x, y, z + delta / 2, grad[4]); grad_norm(*field, x, y, z - delta / 2, grad[5]); return (grad[0][0] - grad[1][0] + grad[2][1] - - grad[3][1] + grad[4][2] - grad[5][2]) / delta; + grad[3][1] + grad[4][2] - grad[5][2]) / delta; } }; @@ -872,9 +872,9 @@ class LaplacianField : public Field Field *field = GModel::current()->getFields()->get(iField); if(!field) return MAX_LC; return ((*field) (x + delta , y, z)+ (*field) (x - delta , y, z) - +(*field) (x, y + delta , z)+ (*field) (x, y - delta , z) - +(*field) (x, y, z + delta )+ (*field) (x, y, z - delta ) - -6* (*field) (x , y, z)) / (delta*delta); + +(*field) (x, y + delta , z)+ (*field) (x, y - delta , z) + +(*field) (x, y, z + delta )+ (*field) (x, y, z - delta ) + -6* (*field) (x , y, z)) / (delta*delta); } }; @@ -908,9 +908,9 @@ class MeanField : public Field Field *field = GModel::current()->getFields()->get(iField); if(!field) return MAX_LC; return ((*field) (x + delta , y, z) + (*field) (x - delta, y, z) - + (*field) (x, y + delta, z) + (*field) (x, y - delta, z) - + (*field) (x, y, z + delta) + (*field) (x, y, z - delta) - + (*field) (x, y, z)) / 7; + + (*field) (x, y + delta, z) + (*field) (x, y - delta, z) + + (*field) (x, y, z + delta) + (*field) (x, y, z - delta) + + (*field) (x, y, z)) / 7; } }; @@ -937,10 +937,10 @@ class MathEvalExpression values[i] = x; break; case -2: - values[i] = y; + values[i] = y; break; case -3: - values[i] = z; + values[i] = z; break; default: { @@ -962,7 +962,8 @@ class MathEvalExpression { free_members(); error_status = false; - c_str_function = strdup(f.c_str()); + c_str_function = new char[f.size() + 1]; + strcpy(c_str_function, f.c_str()); eval = evaluator_create(c_str_function); if(!eval) { error_status = true; @@ -992,11 +993,11 @@ class MathEvalExpression void free_members() { if(c_str_function) - free(c_str_function); + delete [] c_str_function; if(eval) evaluator_destroy(eval); if(values) - delete[]values; + delete [] values; if(evaluators_id) delete evaluators_id; } @@ -1022,7 +1023,7 @@ class MathEvalField : public Field if(update_needed) { if(!expr.set_function(f)) Msg::Error("Field %i: Invalid matheval expression \"%s\"", - this->id, f.c_str()); + this->id, f.c_str()); update_needed = false; } return expr.evaluate(x, y, z); @@ -1070,15 +1071,15 @@ class ParametricField : public Field for(int i = 0; i < 3; i++) { if(!expr[i].set_function(f[i])) Msg::Error("Field %i : Invalid matheval expression \"%s\"", - this->id, f[i].c_str()); + this->id, f[i].c_str()); } update_needed = false; } Field *field = GModel::current()->getFields()->get(ifield); if(!field) return MAX_LC; return (*field)(expr[0].evaluate(x, y, z), - expr[1].evaluate(x, y, z), - expr[2].evaluate(x, y, z)); + expr[1].evaluate(x, y, z), + expr[2].evaluate(x, y, z)); } const char *getName() { @@ -1144,7 +1145,7 @@ class MinField : public Field MinField() { options["FieldsList"] = new FieldOptionList - (idlist, "Field indices", &update_needed); + (idlist, "Field indices", &update_needed); } std::string getDescription() { @@ -1284,7 +1285,7 @@ class AttractorField : public Field delete kdtree; } int totpoints = nodes_id.size() + n_nodes_by_edge * edges_id.size() + - n_nodes_by_edge * n_nodes_by_edge * faces_id.size(); + n_nodes_by_edge * n_nodes_by_edge * faces_id.size(); if(totpoints) zeronodes = annAllocPts(totpoints, 4); int k = 0; @@ -1340,33 +1341,33 @@ class AttractorField : public Field Surface *s = FindSurface(*it); if(s) { for(int i = 0; i < n_nodes_by_edge; i++) { - for(int j = 0; j < n_nodes_by_edge; j++) { - double u = (double)i / (n_nodes_by_edge - 1); - double v = (double)j / (n_nodes_by_edge - 1); - Vertex V = InterpolateSurface(s, u, v, 0, 0); - zeronodes[k][0] = V.Pos.X; - zeronodes[k][1] = V.Pos.Y; - zeronodes[k++][2] = V.Pos.Z; - } - } + for(int j = 0; j < n_nodes_by_edge; j++) { + double u = (double)i / (n_nodes_by_edge - 1); + double v = (double)j / (n_nodes_by_edge - 1); + Vertex V = InterpolateSurface(s, u, v, 0, 0); + zeronodes[k][0] = V.Pos.X; + zeronodes[k][1] = V.Pos.Y; + zeronodes[k++][2] = V.Pos.Z; + } + } } else { GFace *f = GModel::current()->getFaceByTag(*it); if(f) { for(int i = 0; i < n_nodes_by_edge; i++) { - for(int j = 0; j < n_nodes_by_edge; j++) { - double u = (double)i / (n_nodes_by_edge - 1); - double v = (double)j / (n_nodes_by_edge - 1); - Range<double> b1 = ge->parBounds(0); - Range<double> b2 = ge->parBounds(1); - double t1 = b1.low() + u * (b1.high() - b1.low()); - double t2 = b2.low() + v * (b2.high() - b2.low()); - GPoint gp = f->point(t1, t2); - zeronodes[k][0] = gp.x(); - zeronodes[k][1] = gp.y(); - zeronodes[k++][2] = gp.z(); - } - } + for(int j = 0; j < n_nodes_by_edge; j++) { + double u = (double)i / (n_nodes_by_edge - 1); + double v = (double)j / (n_nodes_by_edge - 1); + Range<double> b1 = ge->parBounds(0); + Range<double> b2 = ge->parBounds(1); + double t1 = b1.low() + u * (b1.high() - b1.low()); + double t2 = b2.low() + v * (b2.high() - b2.low()); + GPoint gp = f->point(t1, t2); + zeronodes[k][0] = gp.x(); + zeronodes[k][1] = gp.y(); + zeronodes[k++][2] = gp.z(); + } + } } } } @@ -1454,11 +1455,11 @@ void Field::putOnView(PView *view, int comp) for(int ele = 0; ele < data->getNumElements(0, ent); ele++){ if(data->skipElement(0, ent, ele)) continue; for(int nod = 0; nod < data->getNumNodes(0, ent, ele); nod++){ - double x, y, z; - data->getNode(0, ent, ele, nod, x, y, z); + double x, y, z; + data->getNode(0, ent, ele, nod, x, y, z); double val = (*this)(x, y, z); - for(int comp = 0; comp < data->getNumComponents(0, ent, ele); comp++) - data->setValue(0, ent, ele, nod, comp, val); + for(int comp = 0; comp < data->getNumComponents(0, ent, ele); comp++) + data->setValue(0, ent, ele, nod, comp, val); } } } diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index a2420b9481e29f38ba0a9bddc9991ca57aaacd06..6ca8621b1bee147578ed9ece984028f3943b0f63 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -45,8 +45,8 @@ static MVertex* isEquivalentTo(std::multimap<MVertex*, MVertex*> &m, MVertex *v) } static void buildASetOfEquivalentMeshVertices(GFace *gf, - std::multimap<MVertex*, MVertex *> &equivalent, - std::map<GVertex*, MVertex*> &bm) + std::multimap<MVertex*, MVertex *> &equivalent, + std::map<GVertex*, MVertex*> &bm) { // an edge is degenerated when is length is considered to be // zero. In some cases, a model edge can be considered as too @@ -65,11 +65,11 @@ static void buildASetOfEquivalentMeshVertices(GFace *gf, MVertex *va = *((*it)->getBeginVertex()->mesh_vertices.begin()); MVertex *vb = *((*it)->getEndVertex()->mesh_vertices.begin()); if (va != vb){ - equivalent.insert(std::make_pair(va, vb)); - equivalent.insert(std::make_pair(vb, va)); - bm[(*it)->getBeginVertex()] = va; - bm[(*it)->getEndVertex()] = vb; - printf("%d equivalent to %d\n", va->getNum(), vb->getNum()); + equivalent.insert(std::make_pair(va, vb)); + equivalent.insert(std::make_pair(vb, va)); + bm[(*it)->getBeginVertex()] = va; + bm[(*it)->getEndVertex()] = vb; + printf("%d equivalent to %d\n", va->getNum(), vb->getNum()); } } ++it; @@ -81,10 +81,10 @@ static void buildASetOfEquivalentMeshVertices(GFace *gf, MVertex *va = *((*it)->getBeginVertex()->mesh_vertices.begin()); MVertex *vb = *((*it)->getEndVertex()->mesh_vertices.begin()); if (va != vb){ - equivalent.insert(std::make_pair(va, vb)); - equivalent.insert(std::make_pair(vb, va)); - bm[(*it)->getBeginVertex()] = va; - bm[(*it)->getEndVertex()] = vb; + equivalent.insert(std::make_pair(va, vb)); + equivalent.insert(std::make_pair(vb, va)); + bm[(*it)->getBeginVertex()] = va; + bm[(*it)->getEndVertex()] = vb; } } ++it; @@ -216,28 +216,28 @@ void GetStatistics(double stat[50], double quality[4][100]) double disto=0., distoMin=1., distoMax=0.; if (m->firstRegion() == m->lastRegion()){ for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){ - GetQualityMeasure((*it)->quadrangles, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax, quality); - GetQualityMeasure((*it)->triangles, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax, quality); + GetQualityMeasure((*it)->quadrangles, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax, quality); + GetQualityMeasure((*it)->triangles, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax, quality); } } else{ for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){ - GetQualityMeasure((*it)->tetrahedra, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax, quality); - GetQualityMeasure((*it)->hexahedra, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax, quality); - GetQualityMeasure((*it)->prisms, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax,quality); - GetQualityMeasure((*it)->pyramids, gamma, gammaMin, gammaMax, - eta, etaMin, etaMax, rho, rhoMin, rhoMax, - disto, distoMin, distoMax, quality); + GetQualityMeasure((*it)->tetrahedra, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax, quality); + GetQualityMeasure((*it)->hexahedra, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax, quality); + GetQualityMeasure((*it)->prisms, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax,quality); + GetQualityMeasure((*it)->pyramids, gamma, gammaMin, gammaMax, + eta, etaMin, etaMax, rho, rhoMin, rhoMax, + disto, distoMin, distoMax, quality); } } double N = stat[9] + stat[10] + stat[11] + stat[12]; @@ -412,7 +412,7 @@ static void Mesh2D(GModel *m) } static void FindConnectedRegions(std::vector<GRegion*> &delaunay, - std::vector<std::vector<GRegion*> > &connected) + std::vector<std::vector<GRegion*> > &connected) { // FIXME: need to split region vector into connected components here! connected.push_back(delaunay); @@ -444,7 +444,6 @@ static void Mesh3D(GModel *m) std::vector<std::vector<GRegion*> > connected; FindConnectedRegions(delaunay, connected); for(unsigned int i = 0; i < connected.size(); i++){ - printf("*********Meshing all delaunay regions\n"); MeshDelaunayVolume(connected[i]); } @@ -567,7 +566,7 @@ void GenerateMesh(GModel *m, int ask) CTX::instance()->mesh.secondOrderIncomplete); Msg::Info("%d vertices %d elements", - m->getNumMeshVertices(), m->getNumMeshElements()); + m->getNumMeshVertices(), m->getNumMeshElements()); Msg::PrintErrorCounter("Mesh generation error summary"); diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp index bba90346b896023330797649b6a0d01a7b143747..e8917bba337d4c103aa28449b5bcb56ed75c49eb 100644 --- a/Mesh/HighOrder.cpp +++ b/Mesh/HighOrder.cpp @@ -309,10 +309,10 @@ static void getEdgeVertices(GEdge *ge, MElement *ele, std::vector<MVertex*> &ve, } static void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve, - edgeContainer &edgeVertices, bool linear, - int nPts = 1, - gmshHighOrderSmoother *displ2D = 0, - gmshHighOrderSmoother *displ3D = 0) + edgeContainer &edgeVertices, bool linear, + int nPts = 1, + gmshHighOrderSmoother *displ2D = 0, + gmshHighOrderSmoother *displ3D = 0) { if(gf->geomType() == GEntity::DiscreteSurface || gf->geomType() == GEntity::BoundaryLayerSurface) @@ -349,12 +349,12 @@ static void getEdgeVertices(GFace *gf, MElement *ele, std::vector<MVertex*> &ve, } else{ GPoint pc = gf->point(US[j + 1], VS[j + 1]); - v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, US[j + 1], VS[j + 1]); - if (displ2D || displ3D){ - SPoint3 pc2 = edge.interpolate(t); - if (displ3D) displ3D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); - if (displ2D) displ2D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); - } + v = new MFaceVertex(pc.x(), pc.y(), pc.z(), gf, US[j + 1], VS[j + 1]); + if (displ2D || displ3D){ + SPoint3 pc2 = edge.interpolate(t); + if (displ3D) displ3D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); + if (displ2D) displ2D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); + } } temp.push_back(v); gf->mesh_vertices.push_back(v); @@ -441,8 +441,8 @@ static void getFaceVertices(GFace *gf, MElement *incomplete, MElement *ele, SPoint2 pts[20]; bool reparamOK = true; if(!linear){ - for(int k = 0; k < incomplete->getNumVertices(); k++) - reparamOK &= reparamMeshVertexOnFace(incomplete->getVertex(k), gf, pts[k]); + for(int k = 0; k < incomplete->getNumVertices(); k++) + reparamOK &= reparamMeshVertexOnFace(incomplete->getVertex(k), gf, pts[k]); } if(face.getNumVertices() == 3 && nPts > 1){ // tri face for(int k = start; k < points.size1(); k++){ @@ -454,36 +454,36 @@ static void getFaceVertices(GFace *gf, MElement *incomplete, MElement *ele, v = new MVertex(pc.x(), pc.y(), pc.z(), gf); } else{ - double X(0), Y(0), Z(0), GUESS[2] = {0, 0}; + double X(0), Y(0), Z(0), GUESS[2] = {0, 0}; double sf[256]; incomplete->getShapeFunctions(t1, t2, 0, sf); - for (int j = 0; j < incomplete->getNumVertices(); j++){ - MVertex *vt = incomplete->getVertex(j); + for (int j = 0; j < incomplete->getNumVertices(); j++){ + MVertex *vt = incomplete->getVertex(j); X += sf[j] * vt->x(); - Y += sf[j] * vt->y(); - Z += sf[j] * vt->z(); - if (reparamOK){ - GUESS[0] += sf[j] * pts[j][0]; - GUESS[1] += sf[j] * pts[j][1]; - } - } - if(reparamOK){ - GPoint gp = gf->closestPoint(SPoint3(X, Y, Z), GUESS); - if (gp.g()){ - v = new MFaceVertex(gp.x(), gp.y(), gp.z(), gf, gp.u(), gp.v()); - } - else{ - v = new MVertex(X, Y, Z, gf); - } - } - else{ - v = new MVertex(X, Y, Z, gf); - } - if(displ3D || displ2D){ - SPoint3 pc2 = face.interpolate(t1, t2); - if(displ3D)displ3D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); - if(displ2D)displ2D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); - } + Y += sf[j] * vt->y(); + Z += sf[j] * vt->z(); + if (reparamOK){ + GUESS[0] += sf[j] * pts[j][0]; + GUESS[1] += sf[j] * pts[j][1]; + } + } + if(reparamOK){ + GPoint gp = gf->closestPoint(SPoint3(X, Y, Z), GUESS); + if (gp.g()){ + v = new MFaceVertex(gp.x(), gp.y(), gp.z(), gf, gp.u(), gp.v()); + } + else{ + v = new MVertex(X, Y, Z, gf); + } + } + else{ + v = new MVertex(X, Y, Z, gf); + } + if(displ3D || displ2D){ + SPoint3 pc2 = face.interpolate(t1, t2); + if(displ3D)displ3D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); + if(displ2D)displ2D->add(v, SVector3(pc2.x(), pc2.y(), pc2.z())); + } } // should be expensive -> induces a new search each time vtcs.push_back(v); @@ -702,41 +702,41 @@ static void setHighOrder(GEdge *ge, edgeContainer &edgeVertices, bool linear, } MTriangle* setHighOrder(MTriangle *t, - GFace *gf, - edgeContainer &edgeVertices, - faceContainer &faceVertices, - bool linear, - bool incomplete, - int nPts, - gmshHighOrderSmoother *displ2D, - gmshHighOrderSmoother *displ3D){ + GFace *gf, + edgeContainer &edgeVertices, + faceContainer &faceVertices, + bool linear, + bool incomplete, + int nPts, + gmshHighOrderSmoother *displ2D, + gmshHighOrderSmoother *displ3D){ std::vector<MVertex*> ve, vf; getEdgeVertices(gf, t, ve, edgeVertices, linear, nPts, displ2D, displ3D); if(nPts == 1){ return new MTriangle6(t->getVertex(0), t->getVertex(1), t->getVertex(2), - ve[0], ve[1], ve[2]); + ve[0], ve[1], ve[2]); } else{ if(incomplete){ return new MTriangleN(t->getVertex(0), t->getVertex(1), t->getVertex(2), - ve, nPts + 1); + ve, nPts + 1); } else{ // MTriangleN incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2), // ve, nPts + 1); if (displ2D && gf->geomType() == GEntity::Plane){ - MTriangle incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2)); - getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); + MTriangle incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2)); + getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); } else{ MTriangleN incpl(t->getVertex(0), t->getVertex(1), t->getVertex(2), - ve, nPts + 1); - getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); + ve, nPts + 1); + getFaceVertices(gf, &incpl, t, vf, faceVertices, linear, nPts, displ2D, displ3D); } ve.insert(ve.end(), vf.begin(), vf.end()); return new MTriangleN(t->getVertex(0), t->getVertex(1), t->getVertex(2), - ve, nPts + 1); + ve, nPts + 1); } } } @@ -751,7 +751,7 @@ static void setHighOrder(GFace *gf, edgeContainer &edgeVertices, for(unsigned int i = 0; i < gf->triangles.size(); i++){ MTriangle *t = gf->triangles[i]; MTriangle *tNew = setHighOrder(t,gf,edgeVertices,faceVertices, linear, incomplete, - nPts,displ2D,displ3D); + nPts,displ2D,displ3D); triangles2.push_back(tNew); delete t; } @@ -793,8 +793,8 @@ static void setHighOrder(GRegion *gr, edgeContainer &edgeVertices, getEdgeVertices(gr, t, ve, edgeVertices, linear, nPts, displ2D, displ3D); if(nPts == 1){ tetrahedra2.push_back - (new MTetrahedron10(t->getVertex(0), t->getVertex(1), t->getVertex(2), - t->getVertex(3), ve[0], ve[1], ve[2], ve[3], ve[4], ve[5])); + (new MTetrahedron10(t->getVertex(0), t->getVertex(1), t->getVertex(2), + t->getVertex(3), ve[0], ve[1], ve[2], ve[3], ve[4], ve[5])); } else{ getFaceVertices(gr, t, vf, faceVertices, edgeVertices, linear, nPts); @@ -1024,13 +1024,13 @@ static void printJacobians(GModel *m, const char *nm) double u = (double)i / (n - 1); double v = (double)k / (n - 1); t->pnt(u, v, 0, pt); - D[i][k] = mesh_functional_distorsion(t, u, v); + D[i][k] = mesh_functional_distorsion(t, u, v); //X[i][k] = u; //Y[i][k] = v; //Z[i][k] = 0.0; - X[i][k] = pt.x(); - Y[i][k] = pt.y(); - Z[i][k] = pt.z(); + X[i][k] = pt.x(); + Y[i][k] = pt.y(); + Z[i][k] = pt.z(); } } for(int i= 0; i < n -1; i++){ diff --git a/Mesh/HighOrder.h b/Mesh/HighOrder.h index ca6e7d2a3a05a4e648e3f33d1eb192d76a5e15fc..b4324ba52d4158a34cff4d5932172fd1bcefeb47 100644 --- a/Mesh/HighOrder.h +++ b/Mesh/HighOrder.h @@ -27,12 +27,12 @@ void SetOrderN(GModel *m, int order, bool linear=true, bool incomplete=false); MTriangle* setHighOrder(MTriangle *t, - GFace *gf, - edgeContainer &edgeVertices, - faceContainer &faceVertices, - bool linear, - bool incomplete, - int nPts = 1, - gmshHighOrderSmoother *displ2D = 0, - gmshHighOrderSmoother *displ3D = 0); + GFace *gf, + edgeContainer &edgeVertices, + faceContainer &faceVertices, + bool linear, + bool incomplete, + int nPts = 1, + gmshHighOrderSmoother *displ2D = 0, + gmshHighOrderSmoother *displ3D = 0); #endif diff --git a/Mesh/Makefile b/Mesh/Makefile deleted file mode 100644 index 5d204dc4895191fea95781a17009fad8d7f11bae..0000000000000000000000000000000000000000 --- a/Mesh/Makefile +++ /dev/null @@ -1,548 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshMesh${LIBEXT} - -INC = ${DASH}I../Numeric ${DASH}I../Common ${DASH}I../Geo\ - ${DASH}I../Mesh ${DASH}I../Post\ - ${DASH}I../contrib/Tetgen ${DASH}I../contrib/Netgen\ - ${DASH}I../contrib/Netgen/libsrc/include\ - ${DASH}I../contrib/Netgen/libsrc/interface\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/Metis\ - ${DASH}I../contrib/MathEval ${DASH}I../contrib/gmm - - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Generator.cpp \ - Field.cpp\ - gmshSmoothHighOrder.cpp \ - meshGEdge.cpp \ - meshGEdgeExtruded.cpp \ - meshGFace.cpp \ - meshGFaceTransfinite.cpp \ - meshGFaceExtruded.cpp \ - meshGFaceBDS.cpp \ - meshGFaceDelaunayInsertion.cpp \ - meshGFaceOptimize.cpp \ - meshGFaceQuadrilateralize.cpp \ - meshGRegion.cpp \ - meshGRegionDelaunayInsertion.cpp \ - meshGRegionTransfinite.cpp \ - meshGRegionExtruded.cpp \ - meshGRegionCarveHole.cpp \ - meshGRegionLocalMeshMod.cpp\ - DivideAndConquer.cpp \ - BackgroundMesh.cpp \ - qualityMeasures.cpp \ - BoundaryLayers.cpp \ - BDS.cpp \ - HighOrder.cpp \ - meshPartition.cpp \ - meshRefine.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -# Don't optimize BDS: it crashes with some flavors of gcc 4.1 (e.g. on debian etch) -BDS.o: - ${CXX} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}c BDS.cpp - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Generator${OBJEXT}: Generator.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Common/OS.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MLine.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h ../Geo/MTetrahedron.h \ - ../Geo/MElement.h ../Geo/MHexahedron.h ../Geo/MElement.h \ - ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h ../Geo/MElement.h \ - meshGEdge.h meshGFace.h meshGFaceBDS.h meshGRegion.h BackgroundMesh.h \ - ../Geo/STensor3.h ../Geo/SVector3.h BoundaryLayers.h HighOrder.h \ - Generator.h ../Post/PView.h ../Post/PViewData.h -Field${OBJEXT}: Field.cpp ../Common/GmshConfig.h \ - ../contrib/ANN/include/ANN/ANN.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h Field.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Post/PView.h ../Geo/GeoInterpolation.h \ - ../Geo/Geo.h ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ - ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h -gmshSmoothHighOrder${OBJEXT}: gmshSmoothHighOrder.cpp ../Geo/MLine.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Geo/MQuadrangle.h ../Geo/MElement.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Geo/MHexahedron.h \ - ../Geo/MElement.h ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h \ - ../Geo/MElement.h HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - meshGFaceOptimize.h meshGFaceDelaunayInsertion.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - gmshSmoothHighOrder.h ../Numeric/gmshAssembler.h \ - ../Numeric/gmshLinearSystem.h ../Numeric/gmshLaplace.h \ - ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshFunction.h ../Numeric/gmshAssembler.h \ - ../Numeric/gmshFunction.h ../Common/Gmsh.h ../Common/GmshMessage.h \ - ../Numeric/GmshMatrix.h ../Numeric/gmshElasticity.h \ - ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h \ - ../Numeric/gmshLinearSystemCSR.h ../Numeric/gmshLinearSystem.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -meshGEdge${OBJEXT}: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h meshGEdge.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - BackgroundMesh.h ../Geo/STensor3.h ../Geo/SVector3.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -meshGEdgeExtruded${OBJEXT}: meshGEdgeExtruded.cpp ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h -meshGFace${OBJEXT}: meshGFace.cpp meshGFace.h meshGFaceBDS.h \ - meshGFaceDelaunayInsertion.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h meshGFaceQuadrilateralize.h meshGFaceOptimize.h \ - DivideAndConquer.h BackgroundMesh.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GEdgeCompound.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GEdge.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h BDS.h \ - qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h HighOrder.h -meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -meshGFaceExtruded${OBJEXT}: meshGFaceExtruded.cpp ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MLine.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Geo/MQuadrangle.h \ - ../Geo/MElement.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -meshGFaceBDS${OBJEXT}: meshGFaceBDS.cpp ../Common/GmshMessage.h \ - ../Numeric/GmshPredicates.h meshGFace.h meshGFaceOptimize.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - meshGFaceDelaunayInsertion.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h BackgroundMesh.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h BDS.h \ - qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h -meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \ - ../Common/GmshMessage.h ../Numeric/GmshPredicates.h BackgroundMesh.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h meshGFaceDelaunayInsertion.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h meshGFaceOptimize.h meshGFace.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \ - ../Geo/Pair.h -meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Common/GmshMessage.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h meshGFaceDelaunayInsertion.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ - qualityMeasures.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint2.h \ - ../Geo/Pair.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/MQuadrangle.h \ - ../Geo/MElement.h BackgroundMesh.h Generator.h -meshGFaceQuadrilateralize${OBJEXT}: meshGFaceQuadrilateralize.cpp \ - meshGFaceQuadrilateralize.h ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/STensor3.h \ - ../Geo/SVector3.h meshGFaceOptimize.h meshGFaceBDS.h BDS.h -meshGRegion${OBJEXT}: meshGRegion.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h meshGRegion.h meshGRegionDelaunayInsertion.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h BackgroundMesh.h \ - ../Geo/STensor3.h ../Geo/SVector3.h qualityMeasures.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/gmshRegion.h ../Geo/Geo.h ../Geo/gmshSurface.h ../Geo/Pair.h \ - ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SBoundingBox3d.h ../Common/ListUtils.h ../Common/TreeUtils.h \ - ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GRegion.h \ - ../Geo/MLine.h ../Geo/MElement.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h BDS.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Geo/GFaceCompound.h ../Geo/GFace.h ../Geo/GEdge.h \ - ../Geo/GEdgeCompound.h ../Geo/GFace.h ../Geo/GEdge.h -meshGRegionDelaunayInsertion${OBJEXT}: meshGRegionDelaunayInsertion.cpp \ - ../Common/GmshMessage.h ../Numeric/GmshPredicates.h ../Common/OS.h \ - BackgroundMesh.h ../Geo/STensor3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h meshGRegion.h meshGRegionLocalMeshMod.h \ - meshGRegionDelaunayInsertion.h ../Geo/MTetrahedron.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - qualityMeasures.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MTriangle.h \ - ../Geo/MElement.h -meshGRegionTransfinite${OBJEXT}: meshGRegionTransfinite.cpp meshGFace.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MHexahedron.h ../Geo/MElement.h ../Geo/MPrism.h \ - ../Geo/MElement.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -meshGRegionExtruded${OBJEXT}: meshGRegionExtruded.cpp ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h ../Geo/MTetrahedron.h \ - ../Geo/MElement.h ../Geo/MHexahedron.h ../Geo/MElement.h \ - ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h ../Geo/MElement.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h meshGFace.h meshGRegion.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -meshGRegionCarveHole${OBJEXT}: meshGRegionCarveHole.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h ../Geo/MTetrahedron.h \ - ../Geo/MElement.h ../Geo/MHexahedron.h ../Geo/MElement.h \ - ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h ../Geo/MElement.h \ - ../contrib/ANN/include/ANN/ANN.h -meshGRegionLocalMeshMod${OBJEXT}: meshGRegionLocalMeshMod.cpp \ - meshGRegionLocalMeshMod.h meshGRegionDelaunayInsertion.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h BackgroundMesh.h \ - ../Geo/STensor3.h ../Geo/SVector3.h qualityMeasures.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h -DivideAndConquer${OBJEXT}: DivideAndConquer.cpp ../Common/GmshMessage.h \ - ../Numeric/GmshPredicates.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h DivideAndConquer.h \ - ../Common/MallocUtils.h -BackgroundMesh${OBJEXT}: BackgroundMesh.cpp ../Common/GmshMessage.h \ - BackgroundMesh.h ../Geo/STensor3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h -qualityMeasures${OBJEXT}: qualityMeasures.cpp qualityMeasures.h BDS.h \ - ../Common/GmshMessage.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Geo/MTetrahedron.h \ - ../Geo/MElement.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Geo/MQuadrangle.h ../Geo/MElement.h BoundaryLayers.h \ - ../Geo/ExtrudeParams.h ../Common/SmoothData.h meshGEdge.h meshGFace.h -BDS${OBJEXT}: BDS.cpp ../Common/GmshMessage.h ../Numeric/GmshPredicates.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - BDS.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/STensor3.h \ - ../Geo/SVector3.h qualityMeasures.h -HighOrder${OBJEXT}: HighOrder.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/SVector3.h ../Common/GmshMessage.h \ - gmshSmoothHighOrder.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Geo/MLine.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Geo/MTriangle.h ../Geo/MElement.h ../Geo/MQuadrangle.h \ - ../Geo/MElement.h ../Geo/MTetrahedron.h ../Geo/MElement.h \ - ../Geo/MHexahedron.h ../Geo/MElement.h ../Geo/MPrism.h \ - ../Geo/MElement.h ../Geo/MPyramid.h ../Geo/MElement.h ../Common/OS.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -meshPartition${OBJEXT}: meshPartition.cpp ../Common/GmshConfig.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h meshPartition.h meshPartitionObjects.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h meshPartitionOptions.h -meshRefine${OBJEXT}: meshRefine.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/SVector3.h ../Common/GmshMessage.h \ - ../Geo/MLine.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MFace.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Geo/MQuadrangle.h ../Geo/MElement.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Geo/MHexahedron.h \ - ../Geo/MElement.h ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h \ - ../Geo/MElement.h ../Common/OS.h diff --git a/Mesh/gmshSmoothHighOrder.cpp b/Mesh/gmshSmoothHighOrder.cpp index 2365f7df61cc6d661a89b670e65231d9fcc35f28..142ecc7742b8c8817a442d04acecb7b73c8aefe8 100644 --- a/Mesh/gmshSmoothHighOrder.cpp +++ b/Mesh/gmshSmoothHighOrder.cpp @@ -96,9 +96,9 @@ struct p2data{ s->moveToStraightSidedLocation(t1); s->moveToStraightSidedLocation(t2); m1 = new gmshMatrix<double>(3*t1->getNumVertices(), - 3*t1->getNumVertices()); + 3*t1->getNumVertices()); m2 = new gmshMatrix<double>(3*t2->getNumVertices(), - 3*t2->getNumVertices()); + 3*t2->getNumVertices()); el.elementMatrix(t1,*m1); el.elementMatrix(t2,*m2); s->moveToTargetLocation(t1); @@ -123,9 +123,9 @@ struct pNdata{ s->moveToStraightSidedLocation(t1); s->moveToStraightSidedLocation(t2); m1 = new gmshMatrix<double>(3*t1->getNumVertices(), - 3*t1->getNumVertices()); + 3*t1->getNumVertices()); m2 = new gmshMatrix<double>(3*t2->getNumVertices(), - 3*t2->getNumVertices()); + 3*t2->getNumVertices()); el.elementMatrix(t1,*m1); el.elementMatrix(t2,*m2); s->moveToTargetLocation(t1); @@ -139,8 +139,8 @@ struct pNdata{ static double _DeformationEnergy (MElement *e, - gmshMatrix<double> *K, - gmshHighOrderSmoother *s){ + gmshMatrix<double> *K, + gmshHighOrderSmoother *s){ int N = e->getNumVertices(); gmshVector<double> Kdx(N*3),dx(N*3); @@ -155,10 +155,10 @@ static double _DeformationEnergy (MElement *e, dx(i+2*N) = disp.z(); if (0 && (fabs(disp.x())>1.e-12 ||fabs(disp.y())>1.e-12)) printf("%6d (%12.5E %12.5E %12.5E -- %12.5E %12.5E %12.5E -- %12.5E %12.5E %12.5E)\n", - e->getVertex(i)->getNum(), - disp.x(),disp.y(),disp.z(), - str.x(),str.y(),str.z(),e->getVertex(i)->x(),e->getVertex(i)->y(), - e->getVertex(i)->z()); + e->getVertex(i)->getNum(), + disp.x(),disp.y(),disp.z(), + str.x(),str.y(),str.z(),e->getVertex(i)->x(),e->getVertex(i)->y(), + e->getVertex(i)->z()); } K->mult(dx,Kdx); @@ -309,11 +309,11 @@ void addOneLayer(const std::vector<MElement*> & v, if (!found){ int n = e->getNumPrimaryVertices(); for (int j = 0; j < n; j++){ - MVertex *vert = e->getVertex(j); - if (all.find(vert) != all.end()){ - layer.push_back(e); - j = n; - } + MVertex *vert = e->getVertex(j); + if (all.find(vert) != all.end()){ + layer.push_back(e); + j = n; + } } } } @@ -326,7 +326,7 @@ void gmshHighOrderSmoother::smooth(GFace *gf, bool metric) v.insert(v.begin(), gf->triangles.begin(),gf->triangles.end()); v.insert(v.begin(), gf->quadrangles.begin(),gf->quadrangles.end()); Msg::Info("Smoothing high order mesh : model face %d (%d elements)", gf->tag(), - v.size()); + v.size()); if (metric)smooth_metric(v,gf); else smooth(v); } @@ -338,7 +338,7 @@ void gmshHighOrderSmoother::smooth(GRegion *gr) v.insert(v.begin(), gr->hexahedra.begin(),gr->hexahedra.end()); v.insert(v.begin(), gr->prisms.begin(),gr->prisms.end()); Msg::Info("Smoothing high order mesh : model region %d (%d elements)", gr->tag(), - v.size()); + v.size()); smooth(v); } @@ -353,8 +353,8 @@ void gmshHighOrderSmoother::smooth(GRegion *gr) void gmshHighOrderSmoother::optimize(GFace * gf, - edgeContainer &edgeVertices, - faceContainer &faceVertices){ + edgeContainer &edgeVertices, + faceContainer &faceVertices){ // if (gf->geomType() != GEntity::Plane)return; @@ -368,7 +368,8 @@ void gmshHighOrderSmoother::optimize(GFace * gf, // then try to swap for better configurations smooth(gf,true); - int nbSwap = _gmshSwapHighOrderTriangles(gf,edgeVertices,faceVertices,this); + //int nbSwap = + _gmshSwapHighOrderTriangles(gf,edgeVertices,faceVertices,this); //smooth(gf,true); // smooth(gf,true); // smooth(gf,true); @@ -389,10 +390,10 @@ void gmshHighOrderSmoother::optimize(GFace * gf, void gmshHighOrderSmoother::computeMetricVector (GFace *gf, - MElement *e, - gmshMatrix<double> &J, - gmshMatrix<double> &JT, - gmshVector<double> &D){ + MElement *e, + gmshMatrix<double> &J, + gmshMatrix<double> &JT, + gmshVector<double> &D){ int nbNodes = e->getNumVertices(); for (int j = 0; j < nbNodes; j++){ SPoint2 param; @@ -481,19 +482,19 @@ void gmshHighOrderSmoother::smooth_metric ( std::vector<MElement*> & all, GFace // printf("%d %d %d v\n",i,j,v[i]->getNumVertices()); its = _straightSidedLocation.find(vert); if (its == _straightSidedLocation.end()){ - _straightSidedLocation[vert] = - SVector3(vert->x(),vert->y(),vert->z()); - _targetLocation[vert] = - SVector3(vert->x(),vert->y(),vert->z()); + _straightSidedLocation[vert] = + SVector3(vert->x(),vert->y(),vert->z()); + _targetLocation[vert] = + SVector3(vert->x(),vert->y(),vert->z()); } else{ - vert->x() = its->second.x(); - vert->y() = its->second.y(); - vert->z() = its->second.z(); - if (vert->onWhat()->dim() < _dim){ - myAssembler.fixVertex ( vert , 0 , getTag() , 0); - myAssembler.fixVertex ( vert , 1 , getTag() , 0); - } + vert->x() = its->second.x(); + vert->y() = its->second.y(); + vert->z() = its->second.z(); + if (vert->onWhat()->dim() < _dim){ + myAssembler.fixVertex ( vert , 0 , getTag() , 0); + myAssembler.fixVertex ( vert , 1 , getTag() , 0); + } } } } @@ -543,13 +544,13 @@ void gmshHighOrderSmoother::smooth_metric ( std::vector<MElement*> & all, GFace double gmshHighOrderSmoother::smooth_metric_ ( std::vector<MElement*> & v, - GFace *gf, - gmshAssembler<double> &myAssembler, - std::set<MVertex*> &verticesToMove, - gmshElasticityTerm &El) + GFace *gf, + gmshAssembler<double> &myAssembler, + std::set<MVertex*> &verticesToMove, + gmshElasticityTerm &El) { // Msg::Info("%d vertices FIXED %d NUMBERED", myAssembler.sizeOfF() - // , myAssembler.sizeOfR()); + // , myAssembler.sizeOfR()); std::set<MVertex*>::iterator it; @@ -575,18 +576,18 @@ double gmshHighOrderSmoother::smooth_metric_ ( std::vector<MElement*> & v, K22.gemm(J23K33,J32,1,0); J23K33.mult(D3,R2); for (int j = 0; j < n2; j++){ - MVertex *vR; - int iCompR, iFieldR; - El.getLocalDofR(e, j, &vR, &iCompR, &iFieldR); - myAssembler.assemble(vR, iCompR, iFieldR,-R2(j)); - for (int k = 0; k < n2; k++){ - MVertex *vC; - int iCompC, iFieldC; - El.getLocalDofC(e, k, &vC, &iCompC, &iFieldC); - myAssembler.assemble(vR, iCompR, iFieldR, - vC, iCompC, iFieldC, - K22(j, k)); - } + MVertex *vR; + int iCompR, iFieldR; + El.getLocalDofR(e, j, &vR, &iCompR, &iFieldR); + myAssembler.assemble(vR, iCompR, iFieldR,-R2(j)); + for (int k = 0; k < n2; k++){ + MVertex *vC; + int iCompC, iFieldC; + El.getLocalDofC(e, k, &vC, &iCompC, &iFieldC); + myAssembler.assemble(vR, iCompR, iFieldR, + vC, iCompC, iFieldC, + K22(j, k)); + } } } // solve the system @@ -600,7 +601,7 @@ double gmshHighOrderSmoother::smooth_metric_ ( std::vector<MElement*> & v, SPoint2 param; reparamMeshVertexOnFace((*it), gf, param); SPoint2 dparam (myAssembler.getDofValue ((*it), 0 ,getTag()), - myAssembler.getDofValue ((*it), 1 ,getTag())); + myAssembler.getDofValue ((*it), 1 ,getTag())); SPoint2 newp = param+dparam; dx += newp.x()*newp.x()+newp.y()*newp.y(); (*it)->setParameter(0,newp.x()); @@ -669,15 +670,15 @@ void gmshHighOrderSmoother::smooth ( std::vector<MElement*> & all) its = _straightSidedLocation.find(vert); itt = _targetLocation.find(vert); if (its != _straightSidedLocation.end() && vert->onWhat()->dim() < _dim){ - myAssembler.fixVertex ( vert , 0 , getTag() , vert->x()-its->second.x()); - myAssembler.fixVertex ( vert , 1 , getTag() , vert->y()-its->second.y()); - myAssembler.fixVertex ( vert , 2 , getTag() , vert->z()-its->second.z()); + myAssembler.fixVertex ( vert , 0 , getTag() , vert->x()-its->second.x()); + myAssembler.fixVertex ( vert , 1 , getTag() , vert->y()-its->second.y()); + myAssembler.fixVertex ( vert , 2 , getTag() , vert->z()-its->second.z()); } // ensure we do not touch any vertex that is on the boundary else if (vert->onWhat()->dim() < _dim){ - myAssembler.fixVertex ( vert , 0 , getTag() , 0); - myAssembler.fixVertex ( vert , 1 , getTag() , 0); - myAssembler.fixVertex ( vert , 2 , getTag() , 0); + myAssembler.fixVertex ( vert , 0 , getTag() , 0); + myAssembler.fixVertex ( vert , 1 , getTag() , 0); + myAssembler.fixVertex ( vert , 2 , getTag() , 0); } } } @@ -698,7 +699,7 @@ void gmshHighOrderSmoother::smooth ( std::vector<MElement*> & all) } // Msg::Info("%d vertices FIXED %d NUMBERED", myAssembler.sizeOfF() - // , myAssembler.sizeOfR()); + // , myAssembler.sizeOfR()); if (myAssembler.sizeOfR()){ @@ -747,8 +748,8 @@ void gmshHighOrderSmoother::smooth ( std::vector<MElement*> & all) static void getNodesP2 (const MEdge &me, MTriangle *t1, MTriangle *t2, - MVertex * &n1,MVertex * &n2,MVertex * &n3,MVertex * &n4, - MVertex * &n12,MVertex * &n14,MVertex * &n24,MVertex * &n23,MVertex * &n13){ + MVertex * &n1,MVertex * &n2,MVertex * &n3,MVertex * &n4, + MVertex * &n12,MVertex * &n14,MVertex * &n24,MVertex * &n23,MVertex * &n13){ n1 = me.getVertex(0); n2 = me.getVertex(1); @@ -789,12 +790,12 @@ static void getNodesP2 (const MEdge &me, MTriangle *t1, MTriangle *t2, } static void getNodesPN (const MEdge &me, MTriangle *t1, MTriangle *t2, - MVertex * &n1,MVertex * &n2,MVertex * &n3,MVertex * &n4, - std::vector<MVertex *> &n12, - std::vector<MVertex *> &n14, - std::vector<MVertex *> &n24, - std::vector<MVertex *> &n23, - std::vector<MVertex *> &n13){ + MVertex * &n1,MVertex * &n2,MVertex * &n3,MVertex * &n4, + std::vector<MVertex *> &n12, + std::vector<MVertex *> &n14, + std::vector<MVertex *> &n24, + std::vector<MVertex *> &n23, + std::vector<MVertex *> &n13){ n1 = me.getVertex(0); n2 = me.getVertex(1); @@ -883,14 +884,14 @@ struct swap_triangles_p2 } MVertex *optimalLocation (GFace *gf, - SPoint2 &p3, - SPoint2 &p4) const { + SPoint2 &p3, + SPoint2 &p4) const { SPoint2 p34_linear = (p3+p4)*.5; GPoint gp34 = gf->point(p34_linear); MFaceVertex *_test = new MFaceVertex (gp34.x(),gp34.y(),gp34.z(), - gf,p34_linear.x(),p34_linear.y()); + gf,p34_linear.x(),p34_linear.y()); std::vector<MVertex *>vv; vv.push_back(n13);vv.push_back(_test);vv.push_back(n14); MTriangleN t3_test (n1,n3,n4,vv,2,t1->getNum(),t1->getPartition()); @@ -949,16 +950,16 @@ struct swap_triangles_p2 void print() const{ printf("%g <--- %g\n",quality_new,quality_old); printf("%d %d %d %d %d %d\n",t1->getVertex(0)->getNum(),t1->getVertex(1)->getNum(),t1->getVertex(2)->getNum(), - t1->getVertex(3)->getNum(),t1->getVertex(4)->getNum(),t1->getVertex(5)->getNum()); + t1->getVertex(3)->getNum(),t1->getVertex(4)->getNum(),t1->getVertex(5)->getNum()); printf("%d %d %d %d %d %d\n",t2->getVertex(0)->getNum(),t2->getVertex(1)->getNum(),t2->getVertex(2)->getNum(), - t2->getVertex(3)->getNum(),t2->getVertex(4)->getNum(),t2->getVertex(5)->getNum()); + t2->getVertex(3)->getNum(),t2->getVertex(4)->getNum(),t2->getVertex(5)->getNum()); printf("%d %d %d %d %d %d\n",t3->getVertex(0)->getNum(),t3->getVertex(1)->getNum(),t3->getVertex(2)->getNum(), - t3->getVertex(3)->getNum(),t3->getVertex(4)->getNum(),t3->getVertex(5)->getNum()); + t3->getVertex(3)->getNum(),t3->getVertex(4)->getNum(),t3->getVertex(5)->getNum()); printf("%d %d %d %d %d %d\n",t4->getVertex(0)->getNum(),t4->getVertex(1)->getNum(),t4->getVertex(2)->getNum(), - t4->getVertex(3)->getNum(),t4->getVertex(4)->getNum(),t4->getVertex(5)->getNum()); + t4->getVertex(3)->getNum(),t4->getVertex(4)->getNum(),t4->getVertex(5)->getNum()); printf("%d %d %d %d %d %d %d %d %d\n",n1->getNum(), - n2->getNum(),n3->getNum(),n4->getNum(), - n12->getNum(),n23->getNum(),n13->getNum(),n24->getNum(),n14->getNum()); + n2->getNum(),n3->getNum(),n4->getNum(), + n12->getNum(),n23->getNum(),n13->getNum(),n24->getNum(),n14->getNum()); } }; @@ -978,9 +979,9 @@ struct swap_triangles_pN gmshHighOrderSmoother *s; swap_triangles_pN(const MEdge &me, MTriangle *_t1, MTriangle *_t2, GFace *gf, - edgeContainer &_edgeVertices, - faceContainer &_faceVertices, - gmshHighOrderSmoother *_s) + edgeContainer &_edgeVertices, + faceContainer &_faceVertices, + gmshHighOrderSmoother *_s) : t1(_t1), t2(_t2),edgeVertices(_edgeVertices),faceVertices(_faceVertices),s(_s) { @@ -999,11 +1000,11 @@ struct swap_triangles_pN MTriangle t4lin(n4,n3,n2); t3 = setHighOrder(&t3lin,gf,edgeVertices,faceVertices,false, - !t1->getNumFaceVertices(), - t1->getPolynomialOrder()-1,s); + !t1->getNumFaceVertices(), + t1->getPolynomialOrder()-1,s); t4 = setHighOrder(&t4lin,gf,edgeVertices,faceVertices,false, - !t1->getNumFaceVertices(), - t1->getPolynomialOrder()-1,s); + !t1->getNumFaceVertices(), + t1->getPolynomialOrder()-1,s); optimalLocationPN_ (gf,me, t3, t4,s); @@ -1026,15 +1027,15 @@ struct swap_triangles_pN static int optimalLocationP2_ (GFace *gf, - const MEdge &me, - MTriangle *t1, MTriangle *t2, - gmshHighOrderSmoother *s){ + const MEdge &me, + MTriangle *t1, MTriangle *t2, + gmshHighOrderSmoother *s){ double qini = std::min(shapeMeasure(t1),shapeMeasure(t2)); if (qini > 0.6) return 0; - MVertex *n1,*n2,*n3,*n4,*n12,*n14,*n24,*n23,*n13; + MVertex *n1,*n2,*n3=0,*n4=0,*n12,*n14,*n24,*n23,*n13; getNodesP2 (me,t1,t2,n1,n2,n3,n4,n12,n14,n24,n23,n13); SPoint2 p1,p2,p3,p4,p12; reparamMeshVertexOnFace(n12,gf,p12); @@ -1087,8 +1088,8 @@ int optimalLocationPN_ (GFace *gf, const MEdge &me, MTriangle *t1, MTriangle *t2 for (int j=3;j<3+NE;j++){ MVertex *v2 = t2->getVertex(j); if (v1 == v2 && v1 != n1 && v1 != n2){ - toOptimize.push_back(v1); - break; + toOptimize.push_back(v1); + break; } } } @@ -1113,7 +1114,7 @@ int optimalLocationPN_ (GFace *gf, const MEdge &me, MTriangle *t1, MTriangle *t2 ///double opti = minimize_grad_fd (_function_pNt, pp, &data); if (init-opti < 1.e-5*(init))return 0; printf("Optimization has reduced the deformation energy %g -> %g\n", - init,opti); + init,opti); for (unsigned int i=0;i<toOptimize.size();i++){ GPoint gp12 = gf->point(SPoint2(pp(2*i),pp(2*i+1))); toOptimize[i]->x() = gp12.x(); @@ -1134,7 +1135,7 @@ static int _gmshFindOptimalLocationsP2(GFace *gf, gmshHighOrderSmoother *s) for (e2t_cont::iterator it = adj.begin(); it!= adj.end(); ++it){ if (it->second.second) N += optimalLocationP2_(gf,it->first, dynamic_cast<MTriangle*>(it->second.first), - dynamic_cast<MTriangle*>(it->second.second),s); + dynamic_cast<MTriangle*>(it->second.second),s); } return N; } @@ -1150,16 +1151,16 @@ static int _gmshFindOptimalLocationsPN(GFace *gf,gmshHighOrderSmoother *s) for (e2t_cont::iterator it = adj.begin(); it!= adj.end(); ++it){ if (it->second.second) N += optimalLocationPN_(gf,it->first, dynamic_cast<MTriangle*>(it->second.first), - dynamic_cast<MTriangle*>(it->second.second),s); + dynamic_cast<MTriangle*>(it->second.second),s); } printf("coucou3\n"); return N; } static int _gmshSwapHighOrderTriangles(GFace *gf, - edgeContainer &edgeVertices, - faceContainer &faceVertices, - gmshHighOrderSmoother *s) + edgeContainer &edgeVertices, + faceContainer &faceVertices, + gmshHighOrderSmoother *s) { e2t_cont adj; buildEdgeToTriangle(gf->triangles, adj); @@ -1176,8 +1177,8 @@ static int _gmshSwapHighOrderTriangles(GFace *gf, // printf("swap : %g %g\n",qold1,qold2); if (qold1 < 0.6 || qold2 < 0.6) - pairs.insert(swap_triangles_pN(it->first,t1,t2,gf, - edgeVertices,faceVertices,s)); + pairs.insert(swap_triangles_pN(it->first,t1,t2,gf, + edgeVertices,faceVertices,s)); } } std::set<swap_triangles_pN>::iterator itp = pairs.begin(); @@ -1194,17 +1195,17 @@ static int _gmshSwapHighOrderTriangles(GFace *gf, while(itp != pairs.end()){ double diff = fabs(itp->s_before - itp->s_after); if ( t_removed.find(itp->t1) == t_removed.end() && - t_removed.find(itp->t2) == t_removed.end() && - itp->quality_new > itp->quality_old && - diff < 1.e-9){ + t_removed.find(itp->t2) == t_removed.end() && + itp->quality_new > itp->quality_old && + diff < 1.e-9){ // itp->print(); t_removed.insert(itp->t1); t_removed.insert(itp->t2); triangles2.push_back(itp->t3); triangles2.push_back(itp->t4); // if (itp->n34 != itp->n12){ - // v_removed.insert(itp->n12); - // mesh_vertices2.push_back(itp->n34); + // v_removed.insert(itp->n12); + // mesh_vertices2.push_back(itp->n34); // } nbSwap++; } @@ -1243,7 +1244,7 @@ static int _gmshSwapHighOrderTriangles(GFace *gf) const double qold1 = shapeMeasure(t1); const double qold2 = shapeMeasure(t2); if (qold1 < 0.6 || qold2 < 0.6) - pairs.insert(swap_triangles_p2(it->first,t1,t2,gf)); + pairs.insert(swap_triangles_p2(it->first,t1,t2,gf)); } } std::set<swap_triangles_p2>::iterator itp = pairs.begin(); @@ -1260,17 +1261,17 @@ static int _gmshSwapHighOrderTriangles(GFace *gf) while(itp != pairs.end()){ double diff = fabs(itp->s_before - itp->s_after); if ( t_removed.find(itp->t1) == t_removed.end() && - t_removed.find(itp->t2) == t_removed.end() && - itp->quality_new > itp->quality_old && - diff < 1.e-9){ + t_removed.find(itp->t2) == t_removed.end() && + itp->quality_new > itp->quality_old && + diff < 1.e-9){ // itp->print(); t_removed.insert(itp->t1); t_removed.insert(itp->t2); triangles2.push_back(itp->t3); triangles2.push_back(itp->t4); if (itp->n34 != itp->n12){ - v_removed.insert(itp->n12); - mesh_vertices2.push_back(itp->n34); + v_removed.insert(itp->n12); + mesh_vertices2.push_back(itp->n34); } nbSwap++; } @@ -1307,8 +1308,8 @@ static int _gmshSwapHighOrderTriangles(GFace *gf) } void gmshHighOrderSmoother::swap(GFace *gf, - edgeContainer &edgeVertices, - faceContainer &faceVertices){ + edgeContainer &edgeVertices, + faceContainer &faceVertices){ // _gmshSwapHighOrderTriangles(gf); _gmshSwapHighOrderTriangles(gf,edgeVertices,faceVertices,this); //_gmshSwapHighOrderTriangles(gf); @@ -1527,25 +1528,25 @@ double angle3Points(MVertex *p1, MVertex *p2, MVertex *p3) typedef std::map<std::pair<MVertex*, MVertex*>, std::vector<MElement*> > edge2tris; void localHarmonicMapping(GModel *gm, - MTriangle *t1 , - MTriangle *t2, - MVertex *n1, - MVertex *n2, - MVertex *n3, - MVertex *n4, -// SPoint2 &np1, -// SPoint2 &np2, -// SPoint2 &np3, -// SPoint2 &np4, - std::vector<MVertex*> &e1, - std::vector<MVertex*> &e2, - std::vector<MVertex*> &e3, - std::vector<MVertex*> &e4, -// std::vector<SPoint2> &ep1, -// std::vector<SPoint2> &ep2, -// std::vector<SPoint2> &ep3, -// std::vector<SPoint2> &ep4 - std::vector<MVertex*> &e) { + MTriangle *t1 , + MTriangle *t2, + MVertex *n1, + MVertex *n2, + MVertex *n3, + MVertex *n4, +// SPoint2 &np1, +// SPoint2 &np2, +// SPoint2 &np3, +// SPoint2 &np4, + std::vector<MVertex*> &e1, + std::vector<MVertex*> &e2, + std::vector<MVertex*> &e3, + std::vector<MVertex*> &e4, +// std::vector<SPoint2> &ep1, +// std::vector<SPoint2> &ep2, +// std::vector<SPoint2> &ep3, +// std::vector<SPoint2> &ep4 + std::vector<MVertex*> &e) { gmshLinearSystemGmm<double> *lsys = new gmshLinearSystemGmm<double>; gmshAssembler<double> myAssembler(lsys); @@ -1678,10 +1679,10 @@ static void getParametricCoordnates ( GFace *gf, } static void curvilinearEdgeSwap (GFace *gf, - // int nPts, - edgeContainer &edgeVertices, - edge2tris::iterator &it, - edge2tris &e2t) + // int nPts, + edgeContainer &edgeVertices, + edge2tris::iterator &it, + edge2tris &e2t) { std::pair<MVertex*, MVertex*> edge = it->first; std::vector<MElement*> triangles = it->second; @@ -1767,114 +1768,114 @@ bool smoothInternalEdges(GFace *gf, edgeContainer &edgeVertices) const double angleLimit = 3*M_PI/4.; if (ang1 < angleLimit && ang2 < angleLimit && ang3 < angleLimit && ang4 < angleLimit){ - if(n1 < n2) - e1 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n1, n2)]; - else - e1 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n1)]; - if(n2 < n3) - e2 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n3)]; - else - e2 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n3, n2)]; - if(n3 < n4) - e3 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n3, n4)]; - else - e3 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n3)]; - if(n4 < n1) - e4 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n1)]; - else - e4 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n1, n4)]; - if(n2 < n4) - e = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n4)]; - else - e = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n2)]; - - if((!straightLine(e1, n1, n2) || !straightLine(e2, n2, n3) || - !straightLine(e3, n3, n4) || !straightLine(e4, n4, n1))){ - - double Unew[NBST][10],Vnew[NBST][10]; - double Xold[10],Yold[10],Zold[10]; - - for(unsigned int i = 0; i < e.size(); i++){ - Xold[i] = e[i]->x(); - Yold[i] = e[i]->y(); - Zold[i] = e[i]->z(); - } - - double minJ = 1.e22; - double maxJ = -1.e22; - getMinMaxJac (t1, minJ, maxJ); - getMinMaxJac (t2, minJ, maxJ); - int kopt = -1; - for (int k=0;k<NBST;k++){ - double relax = (k+1)/(double)NBST; - for(unsigned int i = 0; i < e.size(); i++){ - double v = (double)(i + 1) / (e.size() + 1); - double u = 1. - v; - MVertex *vert = (n2 < n4) ? e[i] : e[e.size() - i - 1]; - MVertex *vert1 = (n1 < n2) ? e1[e1.size() - i - 1] : e1[i]; - MVertex *vert3 = (n3 < n4) ? e3[i] : e3[e3.size() - i - 1]; - MVertex *vert4 = (n4 < n1) ? e4[e4.size() - i - 1] : e4[i]; - MVertex *vert2 = (n2 < n3) ? e2[i] : e2[e2.size() - i - 1]; - double U1,V1,U2,V2,U3,V3,U4,V4,U,V,nU1,nV1,nU2,nV2,nU3,nV3,nU4,nV4; - parametricCoordinates(vert , gf, U, V); - parametricCoordinates(vert1, gf, U1, V1); - parametricCoordinates(vert2, gf, U2, V2); - parametricCoordinates(vert3, gf, U3, V3); - parametricCoordinates(vert4, gf, U4, V4); - parametricCoordinates(n1, gf, nU1, nV1); - parametricCoordinates(n2, gf, nU2, nV2); - parametricCoordinates(n3, gf, nU3, nV3); - parametricCoordinates(n4, gf, nU4, nV4); - - Unew[k][i] = U + relax * ((1.-u) * U4 + u * U2 + - (1.-v) * U1 + v * U3 - - ((1.-u)*(1.-v) * nU1 - + u * (1.-v) * nU2 - + u * v * nU3 - + (1.-u) * v * nU4) - U); - Vnew[k][i] = V + relax * ((1.-u) * V4 + u * V2 + - (1.-v) * V1 + v * V3 - - ((1.-u)*(1.-v) * nV1 - + u * (1.-v) * nV2 - + u * v * nV3 - + (1.-u) * v * nV4) - V); - GPoint gp = gf->point(Unew[k][i],Vnew[k][i]); - vert->x() = gp.x(); - vert->y() = gp.y(); - vert->z() = gp.z(); - } - double minJloc = 1.e22; - double maxJloc = -1.e22; - getMinMaxJac(t1, minJloc, maxJloc); - getMinMaxJac(t2, minJloc, maxJloc); - // printf("relax = %g min %g max %g\n",relax,minJloc,maxJloc); - - if (minJloc > minJ){ - kopt = k; - minJ = minJloc; - } - } - // kopt = 1; - if (kopt == -1){ - for(unsigned int i = 0; i < e.size(); i++){ - e[i]->x() = Xold[i]; - e[i]->y() = Yold[i]; - e[i]->z() = Zold[i]; - } - } - else{ - success = true; - for(unsigned int i = 0; i < e.size(); i++){ - MVertex *vert = (n2 < n4) ? e[i] : e[e.size() - i - 1]; - vert->setParameter(0,Unew[kopt][i]); - vert->setParameter(1,Vnew[kopt][i]); - GPoint gp = gf->point(Unew[kopt][i],Vnew[kopt][i]); - vert->x() = gp.x(); - vert->y() = gp.y(); - vert->z() = gp.z(); - } - } - } + if(n1 < n2) + e1 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n1, n2)]; + else + e1 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n1)]; + if(n2 < n3) + e2 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n3)]; + else + e2 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n3, n2)]; + if(n3 < n4) + e3 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n3, n4)]; + else + e3 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n3)]; + if(n4 < n1) + e4 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n1)]; + else + e4 = edgeVertices[std::make_pair<MVertex*, MVertex*>(n1, n4)]; + if(n2 < n4) + e = edgeVertices[std::make_pair<MVertex*, MVertex*>(n2, n4)]; + else + e = edgeVertices[std::make_pair<MVertex*, MVertex*>(n4, n2)]; + + if((!straightLine(e1, n1, n2) || !straightLine(e2, n2, n3) || + !straightLine(e3, n3, n4) || !straightLine(e4, n4, n1))){ + + double Unew[NBST][10],Vnew[NBST][10]; + double Xold[10],Yold[10],Zold[10]; + + for(unsigned int i = 0; i < e.size(); i++){ + Xold[i] = e[i]->x(); + Yold[i] = e[i]->y(); + Zold[i] = e[i]->z(); + } + + double minJ = 1.e22; + double maxJ = -1.e22; + getMinMaxJac (t1, minJ, maxJ); + getMinMaxJac (t2, minJ, maxJ); + int kopt = -1; + for (int k=0;k<NBST;k++){ + double relax = (k+1)/(double)NBST; + for(unsigned int i = 0; i < e.size(); i++){ + double v = (double)(i + 1) / (e.size() + 1); + double u = 1. - v; + MVertex *vert = (n2 < n4) ? e[i] : e[e.size() - i - 1]; + MVertex *vert1 = (n1 < n2) ? e1[e1.size() - i - 1] : e1[i]; + MVertex *vert3 = (n3 < n4) ? e3[i] : e3[e3.size() - i - 1]; + MVertex *vert4 = (n4 < n1) ? e4[e4.size() - i - 1] : e4[i]; + MVertex *vert2 = (n2 < n3) ? e2[i] : e2[e2.size() - i - 1]; + double U1,V1,U2,V2,U3,V3,U4,V4,U,V,nU1,nV1,nU2,nV2,nU3,nV3,nU4,nV4; + parametricCoordinates(vert , gf, U, V); + parametricCoordinates(vert1, gf, U1, V1); + parametricCoordinates(vert2, gf, U2, V2); + parametricCoordinates(vert3, gf, U3, V3); + parametricCoordinates(vert4, gf, U4, V4); + parametricCoordinates(n1, gf, nU1, nV1); + parametricCoordinates(n2, gf, nU2, nV2); + parametricCoordinates(n3, gf, nU3, nV3); + parametricCoordinates(n4, gf, nU4, nV4); + + Unew[k][i] = U + relax * ((1.-u) * U4 + u * U2 + + (1.-v) * U1 + v * U3 - + ((1.-u)*(1.-v) * nU1 + + u * (1.-v) * nU2 + + u * v * nU3 + + (1.-u) * v * nU4) - U); + Vnew[k][i] = V + relax * ((1.-u) * V4 + u * V2 + + (1.-v) * V1 + v * V3 - + ((1.-u)*(1.-v) * nV1 + + u * (1.-v) * nV2 + + u * v * nV3 + + (1.-u) * v * nV4) - V); + GPoint gp = gf->point(Unew[k][i],Vnew[k][i]); + vert->x() = gp.x(); + vert->y() = gp.y(); + vert->z() = gp.z(); + } + double minJloc = 1.e22; + double maxJloc = -1.e22; + getMinMaxJac(t1, minJloc, maxJloc); + getMinMaxJac(t2, minJloc, maxJloc); + // printf("relax = %g min %g max %g\n",relax,minJloc,maxJloc); + + if (minJloc > minJ){ + kopt = k; + minJ = minJloc; + } + } + // kopt = 1; + if (kopt == -1){ + for(unsigned int i = 0; i < e.size(); i++){ + e[i]->x() = Xold[i]; + e[i]->y() = Yold[i]; + e[i]->z() = Zold[i]; + } + } + else{ + success = true; + for(unsigned int i = 0; i < e.size(); i++){ + MVertex *vert = (n2 < n4) ? e[i] : e[e.size() - i - 1]; + vert->setParameter(0,Unew[kopt][i]); + vert->setParameter(1,Vnew[kopt][i]); + GPoint gp = gf->point(Unew[kopt][i],Vnew[kopt][i]); + vert->x() = gp.x(); + vert->y() = gp.y(); + vert->z() = gp.z(); + } + } + } } } } diff --git a/Mesh/gmshSmoothHighOrder.h b/Mesh/gmshSmoothHighOrder.h index 9f52604cd36d4e96d70d5a0fd5e7c16ce3894496..998b761162c45ce7af9cf5f32e103f35486d7a08 100644 --- a/Mesh/gmshSmoothHighOrder.h +++ b/Mesh/gmshSmoothHighOrder.h @@ -38,9 +38,9 @@ public: } void smooth ( std::vector<MElement*> & ); double smooth_metric_ ( std::vector<MElement*> &, GFace *gf, - gmshAssembler<double> &myAssembler, - std::set<MVertex*> &verticesToMove, - gmshElasticityTerm &El); + gmshAssembler<double> &myAssembler, + std::set<MVertex*> &verticesToMove, + gmshElasticityTerm &El); void smooth_metric ( std::vector<MElement*> &, GFace *gf ); void smooth ( GFace* , bool metric = false); void smooth_p2point ( GFace* ); @@ -48,16 +48,16 @@ public: void smooth ( GRegion* ); int getTag() const {return _tag;} void swap(GFace *, - edgeContainer &edgeVertices, - faceContainer &faceVertices); + edgeContainer &edgeVertices, + faceContainer &faceVertices); void optimize(GFace *, - edgeContainer &edgeVertices, - faceContainer &faceVertices); + edgeContainer &edgeVertices, + faceContainer &faceVertices); void computeMetricVector (GFace *gf, - MElement *e, - gmshMatrix<double> &J, - gmshMatrix<double> &JT, - gmshVector<double> &D); + MElement *e, + gmshMatrix<double> &J, + gmshMatrix<double> &JT, + gmshVector<double> &D); void moveToStraightSidedLocation (MVertex *) const; void moveToTargetLocation (MVertex *) const; void moveToStraightSidedLocation (MElement *) const; @@ -75,8 +75,8 @@ public: return SVector3(0.0,0.0,0.0); else{ return SVector3(itt->second.x() - it->second.x(), - itt->second.y() - it->second.y(), - itt->second.z() - it->second.z()); + itt->second.y() - it->second.y(), + itt->second.z() - it->second.z()); } } }; diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index e73a1c28cdbae29971d96d0cdd687845ab477984..45f36fb40e4a4eaa050f9dd5bf11999d0632d70b 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -174,9 +174,9 @@ static double trapezoidal(IntPoint * P1, IntPoint * P2) } static void RecursiveIntegration(GEdge *ge, IntPoint *from, IntPoint *to, - double (*f) (GEdge *e, double X), - std::vector<IntPoint> &Points, - double Prec, int *depth) + double (*f) (GEdge *e, double X), + std::vector<IntPoint> &Points, + double Prec, int *depth) { IntPoint P, p1; @@ -208,8 +208,8 @@ static void RecursiveIntegration(GEdge *ge, IntPoint *from, IntPoint *to, } static double Integration(GEdge *ge, double t1, double t2, - double (*f) (GEdge *e, double X), - std::vector<IntPoint> &Points, double Prec) + double (*f) (GEdge *e, double X), + std::vector<IntPoint> &Points, double Prec) { IntPoint from, to; @@ -290,10 +290,9 @@ void meshGEdge::operator() (GEdge *ge) } else{ a = Integration(ge, t_begin, t_end, F_Lc, Points, - CTX::instance()->mesh.lcIntegrationPrecision); + CTX::instance()->mesh.lcIntegrationPrecision); } N = std::max(ge->minimumMeshSegments() + 1, (int)(a + 1.)); - } // if the curve is periodic and if the begin vertex is identical to diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index 5b681f2ae0be998653197e8f9383d59581e5ad12..a90778592589549ecdc7ffb58ec1b4216ffaccf6 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -32,8 +32,8 @@ #include "HighOrder.h" void computeEdgeLoops(const GFace *gf, - std::vector<MVertex*> &all_mvertices, - std::vector<int> &indices) + std::vector<MVertex*> &all_mvertices, + std::vector<int> &indices) { std::list<GEdge*> edges = gf->edges(); std::list<int> ori = gf->orientations(); @@ -64,13 +64,13 @@ void computeEdgeLoops(const GFace *gf, } else{ if(it == edges.end ()){ - Msg::Error("Something wrong in edge loop computation"); - return; + Msg::Error("Something wrong in edge loop computation"); + return; } v_start = ((*ito) == 1) ? (*it)->getBeginVertex() : (*it)->getEndVertex(); if(v_start != v_end){ - Msg::Error("Something wrong in edge loop computation"); - return; + Msg::Error("Something wrong in edge loop computation"); + return; } v_end = ((*ito) != 1) ? (*it)->getBeginVertex() : (*it)->getEndVertex(); } @@ -114,7 +114,7 @@ static bool noseam(GFace *gf) } static void remeshUnrecoveredEdges(std::set<EdgeToRecover> &edgesNotRecovered, - std::list<GFace*> &facesToRemesh) + std::list<GFace*> &facesToRemesh) { facesToRemesh.clear(); deMeshGFace dem; @@ -199,7 +199,7 @@ static void remeshUnrecoveredEdges(std::set<EdgeToRecover> &edgesNotRecovered, static bool AlgoDelaunay2D(GFace *gf) { if(noseam(gf) && (CTX::instance()->mesh.algo2d == ALGO_2D_DELAUNAY || - CTX::instance()->mesh.algo2d == ALGO_2D_FRONTAL)) + CTX::instance()->mesh.algo2d == ALGO_2D_FRONTAL)) return true; return false; } @@ -224,7 +224,7 @@ void computeElementShapes(GFace *gf, double &worst, double &avg, double &best, } static bool recover_medge(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, - std::set<EdgeToRecover> *not_recovered, int pass_) + std::set<EdgeToRecover> *not_recovered, int pass_) { BDS_GeomEntity *g = 0; if (pass_ == 2){ @@ -269,7 +269,7 @@ static bool recover_medge(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, } static bool recover_medge_old(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e2r, - std::set<EdgeToRecover> *not_recovered, int pass_) + std::set<EdgeToRecover> *not_recovered, int pass_) { BDS_GeomEntity *g = 0; if (pass_ == 2){ @@ -384,11 +384,11 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, std::list<GEdge*>::iterator it = edges.begin(); while(it != edges.end()){ if ((*it)->getCompound()){ - mySet.insert((*it)->getCompound()); - //printf("compound edge %d found in edge %d\n",(*it)->getCompound()->tag(), (*it)->tag()); + mySet.insert((*it)->getCompound()); + //printf("compound edge %d found in edge %d\n",(*it)->getCompound()->tag(), (*it)->tag()); } else - mySet.insert(*it); + mySet.insert(*it); ++it; } //printf("replacing %d edges by %d in the GFaceCompound %d\n",edges.size(),mySet.size(),gf->tag()); @@ -408,8 +408,8 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, if ((*it)->isSeam(gf)) return false; if(!(*it)->isMeshDegenerated()){ for (unsigned int i = 0; i< (*it)->lines.size(); i++){ - all_vertices.insert((*it)->lines[i]->getVertex(0)); - all_vertices.insert((*it)->lines[i]->getVertex(1)); + all_vertices.insert((*it)->lines[i]->getVertex(0)); + all_vertices.insert((*it)->lines[i]->getVertex(1)); } } ++it; @@ -419,11 +419,11 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, while(it != emb_edges.end()){ if(!(*it)->isMeshDegenerated()){ all_vertices.insert((*it)->mesh_vertices.begin(), - (*it)->mesh_vertices.end() ); + (*it)->mesh_vertices.end() ); all_vertices.insert((*it)->getBeginVertex()->mesh_vertices.begin(), - (*it)->getBeginVertex()->mesh_vertices.end()); + (*it)->getBeginVertex()->mesh_vertices.end()); all_vertices.insert((*it)->getEndVertex()->mesh_vertices.begin(), - (*it)->getEndVertex()->mesh_vertices.end()); + (*it)->getEndVertex()->mesh_vertices.end()); } ++it; } @@ -431,14 +431,14 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, // add embedded vertices while(itvx != emb_vertx.end()){ all_vertices.insert((*itvx)->mesh_vertices.begin(), - (*itvx)->mesh_vertices.end() ); + (*itvx)->mesh_vertices.end() ); ++itvx; } if (all_vertices.size() < 3){ Msg::Warning("Mesh Generation of Model Face %d Skipped: " - "Only %d Mesh Vertices on The Contours", - gf->tag(), all_vertices.size()); + "Only %d Mesh Vertices on The Contours", + gf->tag(), all_vertices.size()); gf->meshStatistics.status = GFace::DONE; return true; } @@ -532,8 +532,8 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, V = bb[-1 - num]->y(); } else{ - U = U_[num]; - V = V_[num]; + U = U_[num]; + V = V_[num]; } m->add_point(num, U, V, gf); } @@ -566,13 +566,13 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, it = edges.begin(); while(it != edges.end()){ if(!(*it)->isMeshDegenerated()) - recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 1); + recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 1); ++it; } it = emb_edges.begin(); while(it != emb_edges.end()){ if(!(*it)->isMeshDegenerated()) - recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 1); + recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 1); ++it; } @@ -582,7 +582,7 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, it = edges.begin(); while(it != edges.end()){ if(!(*it)->isMeshDegenerated()){ - recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 2); + recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 2); } ++it; } @@ -597,28 +597,28 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, Msg::Warning("8-| Gmsh splits those edges and tries again"); if (debug){ - char name[245]; - sprintf(name, "surface%d-not_yet_recovered-real-%d.msh", gf->tag(),RECUR_ITER); - gf->model()->writeMSH(name); + char name[245]; + sprintf(name, "surface%d-not_yet_recovered-real-%d.msh", gf->tag(),RECUR_ITER); + gf->model()->writeMSH(name); } std::list<GFace *> facesToRemesh; if (repairSelfIntersecting1dMesh) - remeshUnrecoveredEdges(edgesNotRecovered, facesToRemesh); + remeshUnrecoveredEdges(edgesNotRecovered, facesToRemesh); else{ - std::set<EdgeToRecover>::iterator itr = edgesNotRecovered.begin(); - int *_error = new int[3*edgesNotRecovered.size()]; - int I = 0; - for (; itr != edgesNotRecovered.end(); ++itr){ - int p1 = itr->p1; - int p2 = itr->p2; - int tag = itr->ge->tag(); - _error[3*I+0] = p1; - _error[3*I+1] = p2; - _error[3*I+2] = tag; - I++; - } - throw _error; + std::set<EdgeToRecover>::iterator itr = edgesNotRecovered.begin(); + int *_error = new int[3*edgesNotRecovered.size()]; + int I = 0; + for (; itr != edgesNotRecovered.end(); ++itr){ + int p1 = itr->p1; + int p2 = itr->p2; + int tag = itr->ge->tag(); + _error[3*I+0] = p1; + _error[3*I+1] = p2; + _error[3*I+2] = tag; + I++; + } + throw _error; } // delete the mesh @@ -626,7 +626,7 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, delete [] U_; delete [] V_; if (RECUR_ITER < 10 && facesToRemesh.size() == 0) - return gmsh2DMeshGenerator(gf, RECUR_ITER+1, repairSelfIntersecting1dMesh, debug); + return gmsh2DMeshGenerator(gf, RECUR_ITER+1, repairSelfIntersecting1dMesh, debug); return false; } @@ -643,27 +643,27 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, { std::list<BDS_Edge*>::iterator ite = m->edges.begin(); while (ite != m->edges.end()){ - BDS_Edge *e = *ite; - if(e->g && e->numfaces() == 2){ - BDS_Point *oface[2]; - e->oppositeof(oface); - if (oface[0]->iD < 0){ - recur_tag(e->faces(1), &CLASS_F); - break; - } - else if (oface[1]->iD < 0){ - recur_tag(e->faces(0), &CLASS_F); - break; - } - } - ++ite; + BDS_Edge *e = *ite; + if(e->g && e->numfaces() == 2){ + BDS_Point *oface[2]; + e->oppositeof(oface); + if (oface[0]->iD < 0){ + recur_tag(e->faces(1), &CLASS_F); + break; + } + else if (oface[1]->iD < 0){ + recur_tag(e->faces(0), &CLASS_F); + break; + } + } + ++ite; } } it = emb_edges.begin(); while(it != emb_edges.end()){ if(!(*it)->isMeshDegenerated()) - recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 2); + recover_medge(m, *it, &edgesToRecover, &edgesNotRecovered, 2); ++it; } // compute characteristic lengths at vertices @@ -674,15 +674,15 @@ static bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, GEntity *ge = here->onWhat(); BDS_Point *pp = m->find_point(num); if(ge->dim() == 0){ - pp->lcBGM() = BGM_MeshSize(ge, 0, 0, here->x(), here->y(), here->z()); + pp->lcBGM() = BGM_MeshSize(ge, 0, 0, here->x(), here->y(), here->z()); } else if(ge->dim() == 1){ - double u; - here->getParameter(0,u); - pp->lcBGM() = BGM_MeshSize(ge, u, 0, here->x(), here->y(), here->z()); + double u; + here->getParameter(0,u); + pp->lcBGM() = BGM_MeshSize(ge, u, 0, here->x(), here->y(), here->z()); } else - pp->lcBGM() = MAX_LC; + pp->lcBGM() = MAX_LC; pp->lc() = pp->lcBGM(); } for(int ip = 0; ip < 4; ip++) delete bb[ip]; @@ -839,11 +839,11 @@ static void printMesh1d(int iEdge, int seam, std::vector<SPoint2> &m) } static bool buildConsecutiveListOfVertices(GFace *gf, GEdgeLoop &gel, - std::vector<BDS_Point*> &result, - SBoundingBox3d &bbox, BDS_Mesh *m, - std::map<BDS_Point*, MVertex*> &recover_map_global, - int &count, int countTot, double tol, - bool seam_the_first = false) + std::vector<BDS_Point*> &result, + SBoundingBox3d &bbox, BDS_Mesh *m, + std::map<BDS_Point*, MVertex*> &recover_map_global, + int &count, int countTot, double tol, + bool seam_the_first = false) { // for each edge, we build a list of points that are the mapping of // the edge points on the face for seams, we build the list for @@ -1404,7 +1404,7 @@ void meshGFace::operator() (GFace *gf) algo = "MeshAdapt"; Msg::StatusBar(2, true, "Meshing surface %d (%s, %s)", - gf->tag(), gf->getTypeString().c_str(), algo); + gf->tag(), gf->getTypeString().c_str(), algo); // compute loops on the fly (indices indicate start and end points // of a loop; loops are not yet oriented) @@ -1423,7 +1423,7 @@ void meshGFace::operator() (GFace *gf) // gmshQMorph(gf); Msg::Debug("Type %d %d triangles generated, %d internal vertices", - gf->geomType(), gf->triangles.size(), gf->mesh_vertices.size()); + gf->geomType(), gf->triangles.size(), gf->mesh_vertices.size()); } template<class T> diff --git a/Mesh/meshGFace.h b/Mesh/meshGFace.h index c3b684c2822e3eaf64811f3483d8c45b4be0e589..bff73b26260ef1102374d358c273f8aaac65e540 100644 --- a/Mesh/meshGFace.h +++ b/Mesh/meshGFace.h @@ -46,7 +46,7 @@ void computeEdgeLoops(const GFace *gf, std::vector<int> &indices); void findTransfiniteCorners(GFace *gf, std::vector<MVertex*> &corners); int MeshTransfiniteSurface(GFace *gf); -int MeshExtrudedSurface(GFace *gf, - std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges=0); +int MeshExtrudedSurface(GFace *gf, std::set<std::pair<MVertex*, MVertex*> > + *constrainedEdges=0); #endif diff --git a/Mesh/meshGFaceBDS.cpp b/Mesh/meshGFaceBDS.cpp index 92c877b791508dd1298a2243312648a27ca05155..8f198ca7df543c0f5abc08c26bc10f93218e4e6b 100644 --- a/Mesh/meshGFaceBDS.cpp +++ b/Mesh/meshGFaceBDS.cpp @@ -33,10 +33,10 @@ double computeEdgeLinearLength(BDS_Point *p1, BDS_Point *p2) } inline double computeEdgeLinearLength(BDS_Point *p1, - BDS_Point *p2, - GFace *f, - double SCALINGU, - double SCALINGV) + BDS_Point *p2, + GFace *f, + double SCALINGU, + double SCALINGV) { GPoint GP = f->point(SPoint2(0.5 * (p1->u + p2->u) * SCALINGU, @@ -129,10 +129,10 @@ inline double computeEdgeMiddleCoord_new(BDS_Point *p1, } inline double computeEdgeMiddleCoord(BDS_Point *p1, - BDS_Point *p2, - GFace *f, + BDS_Point *p2, + GFace *f, double SCALINGU, - double SCALINGV) + double SCALINGV) { if (f->geomType() == GEntity::Plane) return 0.5; @@ -156,9 +156,9 @@ inline double computeEdgeMiddleCoord(BDS_Point *p1, } inline double computeEdgeLinearLength(BDS_Edge *e, - GFace *f, + GFace *f, double SCALINGU, - double SCALINGV) + double SCALINGV) { if (f->geomType() == GEntity::Plane) return e->length(); @@ -173,7 +173,7 @@ double NewGetLc(BDS_Point *p) } static double correctLC_ (BDS_Point *p1,BDS_Point *p2, GFace *f, - double SCALINGU, double SCALINGV){ + double SCALINGU, double SCALINGV){ double l1 = NewGetLc(p1); double l2 = NewGetLc(p2); double l = 0.5*(l1+l2); @@ -183,7 +183,7 @@ static double correctLC_ (BDS_Point *p1,BDS_Point *p2, GFace *f, if(CTX::instance()->mesh.lcFromCurvature) { // GPoint GP = f->point(SPoint2(0.5 * (p1->u + p2->u) * SCALINGU, - // 0.5 * (p1->v + p2->v) * SCALINGV)); + // 0.5 * (p1->v + p2->v) * SCALINGV)); // double l3 = BGM_MeshSize(f,GP.u(),GP.v(),GP.x(),GP.y(),GP.z()); double l3=l2; double lcmin = std::min(std::min(l1,l2),l3); @@ -508,21 +508,21 @@ void splitEdgePassUnsorted(GFace *gf, BDS_Mesh &m, double MAXE_, int &nb_split) // m.scalingU, m.scalingV); BDS_Point *mid; - GPoint gpp = gf->point(m.scalingU*(coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u), - m.scalingV*(coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v)); - if (gpp.succeeded()){ - mid = m.add_point(++m.MAXPOINTNUMBER, - coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u, - coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v, gf); - mid->lcBGM() = BGM_MeshSize - (gf, - (coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u)*m.scalingU, - (coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v)*m.scalingV, - mid->X,mid->Y,mid->Z); - mid->lc() = 0.5 * ((*it)->p1->lc() + (*it)->p2->lc()); - if(!m.split_edge(*it, mid)) m.del_point(mid); - else nb_split++; - } + GPoint gpp = gf->point(m.scalingU*(coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u), + m.scalingV*(coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v)); + if (gpp.succeeded()){ + mid = m.add_point(++m.MAXPOINTNUMBER, + coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u, + coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v, gf); + mid->lcBGM() = BGM_MeshSize + (gf, + (coord * (*it)->p1->u + (1 - coord) * (*it)->p2->u)*m.scalingU, + (coord * (*it)->p1->v + (1 - coord) * (*it)->p2->v)*m.scalingV, + mid->X,mid->Y,mid->Z); + mid->lc() = 0.5 * ((*it)->p1->lc() + (*it)->p2->lc()); + if(!m.split_edge(*it, mid)) m.del_point(mid); + else nb_split++; + } } } ++it; @@ -558,17 +558,17 @@ void splitEdgePass(GFace *gf, BDS_Mesh &m, double MAXE_, int &nb_split) GPoint gpp = gf->point(m.scalingU*U,m.scalingV*V); if (gpp.succeeded()){ - mid = m.add_point(++m.MAXPOINTNUMBER, gpp.x(),gpp.y(),gpp.z()); - mid->u = U; - mid->v = V; - mid->lcBGM() = BGM_MeshSize - (gf, - (coord * e->p1->u + (1 - coord) * e->p2->u)*m.scalingU, - (coord * e->p1->v + (1 - coord) * e->p2->v)*m.scalingV, - mid->X,mid->Y,mid->Z); - mid->lc() = 0.5 * (e->p1->lc() + e->p2->lc()); - if(!m.split_edge(e, mid)) m.del_point(mid); - else nb_split++; + mid = m.add_point(++m.MAXPOINTNUMBER, gpp.x(),gpp.y(),gpp.z()); + mid->u = U; + mid->v = V; + mid->lcBGM() = BGM_MeshSize + (gf, + (coord * e->p1->u + (1 - coord) * e->p2->u)*m.scalingU, + (coord * e->p1->v + (1 - coord) * e->p2->v)*m.scalingV, + mid->X,mid->Y,mid->Z); + mid->lc() = 0.5 * (e->p1->lc() + e->p2->lc()); + if(!m.split_edge(e, mid)) m.del_point(mid); + else nb_split++; } } } @@ -683,10 +683,10 @@ void gmshRefineMeshBDS(GFace *gf, BDS_Mesh &m, const int NIT, ++it; } if ((*itp)->g && (*itp)->g->classif_tag > 0){ - if (!ne) L = MAX_LC; - if(CTX::instance()->mesh.lcFromPoints) - (*itp)->lc() = L; - (*itp)->lcBGM() = L; + if (!ne) L = MAX_LC; + if(CTX::instance()->mesh.lcFromPoints) + (*itp)->lc() = L; + (*itp)->lcBGM() = L; } ++itp; } diff --git a/Mesh/meshGFaceBDS.h b/Mesh/meshGFaceBDS.h index 6b22dd452aaac9338873c36b169e58f44a07f133..2589dc8c69984859dff37f83d99e117ad5c4799d 100644 --- a/Mesh/meshGFaceBDS.h +++ b/Mesh/meshGFaceBDS.h @@ -8,6 +8,7 @@ #include <map> #include <list> + class GFace; class GModel; class BDS_Mesh; @@ -28,4 +29,5 @@ void gmshCollapseSmallEdges(GModel &gm); BDS_Mesh *gmsh2BDS(std::list<GFace*> &l); double computeEdgeLinearLength(BDS_Point *p1, BDS_Point *p2); void smoothVertexPass(GFace *gf, BDS_Mesh &m, int &nb_smooth, bool q); + #endif diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp index dc31fb1ea8ae35b537add9a6c9b60f447954a620..09750cbec286327edda3e0b425c063bc6a1764f3 100644 --- a/Mesh/meshGFaceDelaunayInsertion.cpp +++ b/Mesh/meshGFaceDelaunayInsertion.cpp @@ -80,7 +80,7 @@ void circumCenterMetric(double *pa, double *pb, double *pc, } void circumCenterMetricXYZ(double *p1, double *p2, double *p3, SMetric3 & metric, - double *res, double *uv, double &radius) + double *res, double *uv, double &radius) { double v1[3] = {p2[0] - p1[0], p2[1] - p1[1], p2[2] - p1[2]}; double v2[3] = {p3[0] - p1[0], p3[1] - p1[1], p3[2] - p1[2]}; @@ -149,23 +149,23 @@ void buildMetric(GFace *gf, double *uv, SMetric3 & m, double *metric) Pair<SVector3, SVector3> der = gf->firstDer(SPoint2(uv[0], uv[1])); SVector3 x1 (m(0,0) * der.first().x() + - m(1,0) * der.first().y() + - m(2,0) * der.first().z(), - m(0,1) * der.first().x() + - m(1,1) * der.first().y() + - m(2,1) * der.first().z(), - m(0,2) * der.first().x() + - m(1,2) * der.first().y() + - m(2,2) * der.first().z()); + m(1,0) * der.first().y() + + m(2,0) * der.first().z(), + m(0,1) * der.first().x() + + m(1,1) * der.first().y() + + m(2,1) * der.first().z(), + m(0,2) * der.first().x() + + m(1,2) * der.first().y() + + m(2,2) * der.first().z()); SVector3 x2 (m(0,0) * der.second().x() + - m(1,0) * der.second().y() + - m(2,0) * der.second().z(), - m(0,1) * der.second().x() + - m(1,1) * der.second().y() + - m(2,1) * der.second().z(), - m(0,2) * der.second().x() + - m(1,2) * der.second().y() + - m(2,2) * der.second().z()); + m(1,0) * der.second().y() + + m(2,0) * der.second().z(), + m(0,1) * der.second().x() + + m(1,1) * der.second().y() + + m(2,1) * der.second().z(), + m(0,2) * der.second().x() + + m(1,2) * der.second().y() + + m(2,2) * der.second().z()); metric[0] = dot(x1, der.first()); metric[1] = dot(x2, der.first()); @@ -414,10 +414,10 @@ bool insertVertex(GFace *gf, MVertex *v, double *param , MTri3 *t, std::set<MTri3*, compareTri3Ptr> &allTets, std::set<MTri3*, compareTri3Ptr> *activeTets, std::vector<double> &vSizes, - std::vector<double> &vSizesBGM, - std::vector<SMetric3> &vMetricsBGM, + std::vector<double> &vSizesBGM, + std::vector<SMetric3> &vMetricsBGM, std::vector<double> &Us, - std::vector<double> &Vs, + std::vector<double> &Vs, double *metric = 0) { std::list<edgeXface> shell; @@ -452,19 +452,19 @@ bool insertVertex(GFace *gf, MVertex *v, double *param , MTri3 *t, MTriangle *t = new MTriangle(it->v[0], it->v[1], v); const double ONE_THIRD = 1./3.; double lc = ONE_THIRD * (vSizes[t->getVertex(0)->getNum()] + - vSizes[t->getVertex(1)->getNum()] + - vSizes[t->getVertex(2)->getNum()]); + vSizes[t->getVertex(1)->getNum()] + + vSizes[t->getVertex(2)->getNum()]); double lcBGM = ONE_THIRD * (vSizesBGM[t->getVertex(0)->getNum()] + - vSizesBGM[t->getVertex(1)->getNum()] + - vSizesBGM[t->getVertex(2)->getNum()]); + vSizesBGM[t->getVertex(1)->getNum()] + + vSizesBGM[t->getVertex(2)->getNum()]); double LL = Extend1dMeshIn2dSurfaces() ? std::min(lc, lcBGM) : lcBGM; MTri3 *t4; if (_experimental_anisotropic_blues_band_){ SMetric3 metrBGM = interpolation ( vMetricsBGM[t->getVertex(0)->getNum()], - vMetricsBGM[t->getVertex(1)->getNum()], - vMetricsBGM[t->getVertex(2)->getNum()], - ONE_THIRD,ONE_THIRD); + vMetricsBGM[t->getVertex(1)->getNum()], + vMetricsBGM[t->getVertex(2)->getNum()], + ONE_THIRD,ONE_THIRD); t4 = new MTri3(t, LL,&metrBGM); } @@ -473,11 +473,11 @@ bool insertVertex(GFace *gf, MVertex *v, double *param , MTri3 *t, } double d1 = sqrt((it->v[0]->x() - v->x()) * (it->v[0]->x() - v->x()) + - (it->v[0]->y() - v->y()) * (it->v[0]->y() - v->y()) + - (it->v[0]->z() - v->z()) * (it->v[0]->z() - v->z())); + (it->v[0]->y() - v->y()) * (it->v[0]->y() - v->y()) + + (it->v[0]->z() - v->z()) * (it->v[0]->z() - v->z())); double d2 = sqrt((it->v[1]->x() - v->x()) * (it->v[1]->x() - v->x()) + - (it->v[1]->y() - v->y()) * (it->v[1]->y() - v->y()) + - (it->v[1]->z() - v->z()) * (it->v[1]->z() - v->z())); + (it->v[1]->y() - v->y()) * (it->v[1]->y() - v->y()) + + (it->v[1]->z() - v->z()) * (it->v[1]->z() - v->z())); if (d1 < LL * .25 || d2 < LL * .25) onePointIsTooClose = true; // if (t4->getRadius () < LIMIT_ / 2) onePointIsTooClose = true; @@ -501,11 +501,11 @@ bool insertVertex(GFace *gf, MVertex *v, double *param , MTri3 *t, allTets.insert(newTris, newTris + shell.size()); if (activeTets){ for (std::list<MTri3*>::iterator i = new_cavity.begin(); i != new_cavity.end(); ++i){ - int active_edge; - if(isActive(*i, LIMIT_, active_edge) && (*i)->getRadius() > LIMIT_){ - if ((*activeTets).find(*i) == (*activeTets).end()) - (*activeTets).insert(*i); - } + int active_edge; + if(isActive(*i, LIMIT_, active_edge) && (*i)->getRadius() > LIMIT_){ + if ((*activeTets).find(*i) == (*activeTets).end()) + (*activeTets).insert(*i); + } } } delete [] newTris; @@ -535,34 +535,34 @@ void _printTris(char *name, std::set<MTri3*, compareTri3Ptr> &AllTris, MTri3 *worst = *it; if (!worst->isDeleted()){ if (param) - fprintf(ff,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n", - Us [(worst)->tri()->getVertex(0)->getNum()], - Vs [(worst)->tri()->getVertex(0)->getNum()], - 0.0, - Us [(worst)->tri()->getVertex(1)->getNum()], - Vs [(worst)->tri()->getVertex(1)->getNum()], - 0.0, - Us [(worst)->tri()->getVertex(2)->getNum()], - Vs [(worst)->tri()->getVertex(2)->getNum()], - 0.0, - (worst)->getRadius(), - (worst)->getRadius(), - (worst)->getRadius()); + fprintf(ff,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n", + Us [(worst)->tri()->getVertex(0)->getNum()], + Vs [(worst)->tri()->getVertex(0)->getNum()], + 0.0, + Us [(worst)->tri()->getVertex(1)->getNum()], + Vs [(worst)->tri()->getVertex(1)->getNum()], + 0.0, + Us [(worst)->tri()->getVertex(2)->getNum()], + Vs [(worst)->tri()->getVertex(2)->getNum()], + 0.0, + (worst)->getRadius(), + (worst)->getRadius(), + (worst)->getRadius()); else - fprintf(ff,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n", - (worst)->tri()->getVertex(0)->x(), - (worst)->tri()->getVertex(0)->y(), - (worst)->tri()->getVertex(0)->z(), - (worst)->tri()->getVertex(1)->x(), - (worst)->tri()->getVertex(1)->y(), - (worst)->tri()->getVertex(1)->z(), - (worst)->tri()->getVertex(2)->x(), - (worst)->tri()->getVertex(2)->y(), - (worst)->tri()->getVertex(2)->z(), - (worst)->getRadius(), - (worst)->getRadius(), - (worst)->getRadius() - ); + fprintf(ff,"ST(%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g};\n", + (worst)->tri()->getVertex(0)->x(), + (worst)->tri()->getVertex(0)->y(), + (worst)->tri()->getVertex(0)->z(), + (worst)->tri()->getVertex(1)->x(), + (worst)->tri()->getVertex(1)->y(), + (worst)->tri()->getVertex(1)->z(), + (worst)->tri()->getVertex(2)->x(), + (worst)->tri()->getVertex(2)->y(), + (worst)->tri()->getVertex(2)->z(), + (worst)->getRadius(), + (worst)->getRadius(), + (worst)->getRadius() + ); } ++it; } @@ -571,17 +571,17 @@ void _printTris(char *name, std::set<MTri3*, compareTri3Ptr> &AllTris, } static void insertAPoint(GFace *gf, - std::set<MTri3*,compareTri3Ptr>::iterator it, - double center[2], - double metric[3], - std::vector<double> &Us, - std::vector<double> &Vs, - std::vector<double> &vSizes, - std::vector<double> &vSizesBGM, - std::vector<SMetric3> &vMetricsBGM, - std::set<MTri3*,compareTri3Ptr> &AllTris, - std::set<MTri3*,compareTri3Ptr> * ActiveTris = 0, - MTri3 *worst = 0){ + std::set<MTri3*,compareTri3Ptr>::iterator it, + double center[2], + double metric[3], + std::vector<double> &Us, + std::vector<double> &Vs, + std::vector<double> &vSizes, + std::vector<double> &vSizesBGM, + std::vector<SMetric3> &vMetricsBGM, + std::set<MTri3*,compareTri3Ptr> &AllTris, + std::set<MTri3*,compareTri3Ptr> * ActiveTris = 0, + MTri3 *worst = 0){ if (worst){ it = AllTris.find(worst); if (worst != *it){ @@ -593,7 +593,7 @@ static void insertAPoint(GFace *gf, MTri3 *ptin = 0; double uv[2]; - MTriangle *base = worst->tri(); + //MTriangle *base = worst->tri(); bool inside = invMapUV(worst->tri(), center, Us, Vs, uv, 1.e-8); if (inside)ptin = worst; if (!inside && worst->getNeigh(0)){ @@ -617,8 +617,8 @@ static void insertAPoint(GFace *gf, MVertex *v = new MFaceVertex(p.x(), p.y(), p.z(), gf, center[0], center[1]); v->setNum(Us.size()); double lc1 = ((1. - uv[0] - uv[1]) * vSizes[ptin->tri()->getVertex(0)->getNum()] + - uv[0] * vSizes [ptin->tri()->getVertex(1)->getNum()] + - uv[1] * vSizes [ptin->tri()->getVertex(2)->getNum()]); + uv[0] * vSizes [ptin->tri()->getVertex(1)->getNum()] + + uv[1] * vSizes [ptin->tri()->getVertex(2)->getNum()]); double lc = BGM_MeshSize(gf,center[0],center[1],p.x(),p.y(),p.z()); //SMetric3 metr = BGM_MeshMetric(gf,center[0],center[1],p.x(),p.y(),p.z()); // vMetricsBGM.push_back(metr); @@ -628,11 +628,11 @@ static void insertAPoint(GFace *gf, Vs.push_back(center[1]); if (!p.succeeded() || !insertVertex(gf, v, center, worst, AllTris,ActiveTris, vSizes, vSizesBGM,vMetricsBGM, - Us, Vs, metric) ) { + Us, Vs, metric) ) { // Msg::Debug("2D Delaunay : a cavity is not star shaped"); AllTris.erase(it); worst->forceRadius(-1); - AllTris.insert(worst); + AllTris.insert(worst); delete v; } else { @@ -641,14 +641,14 @@ static void insertAPoint(GFace *gf, } else { /* Msg::Debug("Point %g %g is outside (%g %g , %g %g , %g %g) (metric %g %g %g)", - center[0], center[1], - Us[base->getVertex(0)->getNum()], - Vs[base->getVertex(0)->getNum()], - Us[base->getVertex(1)->getNum()], - Vs[base->getVertex(1)->getNum()], - Us[base->getVertex(2)->getNum()], - Vs[base->getVertex(2)->getNum()], - metric[0], metric[1], metric[2]);*/ + center[0], center[1], + Us[base->getVertex(0)->getNum()], + Vs[base->getVertex(0)->getNum()], + Us[base->getVertex(1)->getNum()], + Vs[base->getVertex(1)->getNum()], + Us[base->getVertex(2)->getNum()], + Vs[base->getVertex(2)->getNum()], + metric[0], metric[1], metric[2]);*/ AllTris.erase(it); worst->forceRadius(0); AllTris.insert(worst); @@ -678,8 +678,8 @@ void gmshBowyerWatson(GFace *gf) } else{ if(ITER++ % 5000 == 0) - Msg::Debug("%7d points created -- Worst tri radius is %8.3f", - vSizes.size(), worst->getRadius()); + Msg::Debug("%7d points created -- Worst tri radius is %8.3f", + vSizes.size(), worst->getRadius()); double center[2],metric[3],r2; if (worst->getRadius() < 0.5 * sqrt(2.0)) break; circUV(worst->tri(), Us, Vs, center, gf); @@ -723,8 +723,8 @@ void gmshBowyerWatson(GFace *gf) static double length_metric ( const double p[2], const double q[2], const double metric[3]) { return sqrt ( (p[0]-q[0]) * metric [0] * (p[0]-q[0]) + - 2*(p[0]-q[0]) * metric [1] * (p[1]-q[1]) + - (p[1]-q[1]) * metric [2] * (p[1]-q[1]) ); + 2*(p[0]-q[0]) * metric [1] * (p[1]-q[1]) + + (p[1]-q[1]) * metric [2] * (p[1]-q[1]) ); } /* @@ -800,18 +800,18 @@ void gmshBowyerWatsonFrontal(GFace *gf) if (!worst->isDeleted() && isActive(worst, LIMIT_, active_edge) && worst->getRadius() > LIMIT_){ if(ITER++ % 5000 == 0) - Msg::Debug("%7d points created -- Worst tri radius is %8.3f", - vSizes.size(), worst->getRadius()); + Msg::Debug("%7d points created -- Worst tri radius is %8.3f", + vSizes.size(), worst->getRadius()); // compute circum center of that guy double center[2],metric[3],r2; MTriangle *base = worst->tri(); circUV(base, Us, Vs, center, gf); double pa[2] = {(Us[base->getVertex(0)->getNum()] + - Us[base->getVertex(1)->getNum()] + - Us[base->getVertex(2)->getNum()]) / 3., - (Vs[base->getVertex(0)->getNum()] + - Vs[base->getVertex(1)->getNum()] + - Vs[base->getVertex(2)->getNum()]) / 3.}; + Us[base->getVertex(1)->getNum()] + + Us[base->getVertex(2)->getNum()]) / 3., + (Vs[base->getVertex(0)->getNum()] + + Vs[base->getVertex(1)->getNum()] + + Vs[base->getVertex(2)->getNum()]) / 3.}; buildMetric(gf, pa, metric); circumCenterMetric(worst->tri(), metric, Us, Vs, center, r2); // compute the middle point of the edge @@ -819,11 +819,11 @@ void gmshBowyerWatsonFrontal(GFace *gf) int ip2 = active_edge; // printf("the active edge is %d : %g %g -> %g %g\n", // active_edge,base->getVertex(ip1)->x(),base->getVertex(ip1)->y(), - // base->getVertex(ip2)->x(),base->getVertex(ip2)->y()); + // base->getVertex(ip2)->x(),base->getVertex(ip2)->y()); double P[2] = {Us[base->getVertex(ip1)->getNum()], - Vs[base->getVertex(ip1)->getNum()]}; + Vs[base->getVertex(ip1)->getNum()]}; double Q[2] = {Us[base->getVertex(ip2)->getNum()], - Vs[base->getVertex(ip2)->getNum()]}; + Vs[base->getVertex(ip2)->getNum()]}; double midpoint[2] = {0.5 * (P[0] + Q[0]), 0.5 * (P[1] + Q[1])}; // now we have the edge center and the center of the circumcircle, diff --git a/Mesh/meshGFaceExtruded.cpp b/Mesh/meshGFaceExtruded.cpp index f255026cd442db92a1e4fb0279d0414d233861e1..a5838abd3b73aad433f3d4dffeff0945bd787c68 100644 --- a/Mesh/meshGFaceExtruded.cpp +++ b/Mesh/meshGFaceExtruded.cpp @@ -13,7 +13,7 @@ #include "GmshMessage.h" static void createQuaTri(std::vector<MVertex*> &v, GFace *to, - std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) + std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -46,8 +46,8 @@ static void createQuaTri(std::vector<MVertex*> &v, GFace *to, } static void extrudeMesh(GEdge *from, GFace *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > *constrainedEdges) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -107,7 +107,7 @@ static void extrudeMesh(GEdge *from, GFace *to, } static void copyMesh(GFace *from, GFace *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { ExtrudeParams *ep = to->meshAttributes.extrude; diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp index ad0f32730cf9d9910c62eac8f56b890265baf1ac..31f706fadf9ef47d84afbc2ad8d14f46871d762e 100644 --- a/Mesh/meshGFaceOptimize.cpp +++ b/Mesh/meshGFaceOptimize.cpp @@ -38,8 +38,8 @@ static void setLcs(MTriangle *t, std::map<MVertex*, double> &vSizes) double dy = vi->y()-vj->y(); double dz = vi->z()-vj->z(); double l = sqrt(dx * dx + dy * dy + dz * dz); - std::map<MVertex*,double>::iterator iti = vSizes.find(vi); - std::map<MVertex*,double>::iterator itj = vSizes.find(vj); + std::map<MVertex*,double>::iterator iti = vSizes.find(vi); + std::map<MVertex*,double>::iterator itj = vSizes.find(vj); if (iti->second < 0 || iti->second > l) iti->second = l; if (itj->second < 0 || itj->second > l) itj->second = l; } @@ -50,7 +50,7 @@ void buildMeshGenerationDataStructures(GFace *gf, std::set<MTri3*, compareTri3Ptr> &AllTris, std::vector<double> &vSizes, std::vector<double> &vSizesBGM, - std::vector<SMetric3> &vMetricsBGM, + std::vector<SMetric3> &vMetricsBGM, std::vector<double> &Us, std::vector<double> &Vs) { @@ -221,28 +221,28 @@ void laplaceSmoothing(GFace *gf) const std::vector<MElement*> < = it->second; double cu = 0, cv = 0; double pu[4], pv[4]; - double fact = 0.0; + double fact = 0.0; for (unsigned int i = 0; i < lt.size(); i++){ parametricCoordinates(lt[i], gf, pu, pv); cu += (pu[0] + pu[1] + pu[2]); cv += (pv[0] + pv[1] + pv[2]); - if (lt[i]->getNumVertices() == 4){ - cu += pu[3]; - cv += pv[3]; - } - fact += lt[i]->getNumVertices(); + if (lt[i]->getNumVertices() == 4){ + cu += pu[3]; + cv += pv[3]; + } + fact += lt[i]->getNumVertices(); // have to test validity ! } - if (fact != 0.0){ - ver->setParameter(0, cu / fact); - ver->setParameter(1, cv / fact); - GPoint pt = gf->point(SPoint2(cu / fact, cv / fact)); - if (pt.succeeded()){ - ver->x() = pt.x(); - ver->y() = pt.y(); - ver->z() = pt.z(); - } - } + if (fact != 0.0){ + ver->setParameter(0, cu / fact); + ver->setParameter(1, cv / fact); + GPoint pt = gf->point(SPoint2(cu / fact, cv / fact)); + if (pt.succeeded()){ + ver->x() = pt.x(); + ver->y() = pt.y(); + ver->z() = pt.z(); + } + } } ++it; } @@ -611,9 +611,9 @@ bool gmshBuildVertexCavity(MTri3 *t, int iLocalVertex, MVertex **v1, } if (!t) return false; if (t->isDeleted()){ - Msg::Error("Impossible to build vertex cavity"); - return false; - } + Msg::Error("Impossible to build vertex cavity"); + return false; + } cavity.push_back(t); for (int j = 0; j < 3; j++){ if (t->tri()->getVertex(j) !=lastinring && t->tri()->getVertex(j) != *v1){ @@ -858,12 +858,12 @@ static void _gmshRecombineIntoQuads(GFace *gf) for (e2t_cont::iterator it = adj.begin(); it!= adj.end(); ++it){ if (it->second.second && it->second.first->getNumVertices() == 3 && - it->second.second->getNumVertices() == 3 && + it->second.second->getNumVertices() == 3 && (emb_edgeverts.find(it->first.getVertex(0)) == emb_edgeverts.end() || emb_edgeverts.find(it->first.getVertex(1)) == emb_edgeverts.end())) pairs.insert(recombine_triangle(it->first, - it->second.first, - it->second.second)); + it->second.first, + it->second.second)); } std::set<MElement*> touched; @@ -875,9 +875,9 @@ static void _gmshRecombineIntoQuads(GFace *gf) MElement *t1 = itp->t1; MElement *t2 = itp->t2; if (touched.find(t1) == touched.end() && - touched.find(t2) == touched.end()){ - touched.insert(t1); - touched.insert(t2); + touched.find(t2) == touched.end()){ + touched.insert(t1); + touched.insert(t2); int orientation = 0; for(int i = 0; i < 3; i++) { @@ -894,7 +894,7 @@ static void _gmshRecombineIntoQuads(GFace *gf) q = new MQuadrangle(itp->n1, itp->n3, itp->n2, itp->n4); else q = new MQuadrangle(itp->n1, itp->n4, itp->n2, itp->n3); - gf->quadrangles.push_back(q); + gf->quadrangles.push_back(q); } } ++itp; diff --git a/Mesh/meshGFaceQuadrilateralize.cpp b/Mesh/meshGFaceQuadrilateralize.cpp index 4e5dfdb040667e53b07076365f589ce9c7768388..4f759a54747c924c3571892f2390ce17abfee879 100644 --- a/Mesh/meshGFaceQuadrilateralize.cpp +++ b/Mesh/meshGFaceQuadrilateralize.cpp @@ -65,8 +65,8 @@ public: for (int i=0;i<5;i++){ std::set<BDS_Edge*>::iterator it = stat[i].find(e); if (it !=stat[i].end()){ - stat[i].erase(it); - return; + stat[i].erase(it); + return; } } } @@ -93,11 +93,11 @@ SVector3 norm_edge (BDS_Point *p1, BDS_Point *p2){ } void recur_empty_cavity (BDS_Face *f, - BDS_Edge *be[4], - BDS_Point *bv[4], - std::set<BDS_Face*> & faces, - std::set<BDS_Edge*> & edges, - std::set<BDS_Point*> & vertices){ + BDS_Edge *be[4], + BDS_Point *bv[4], + std::set<BDS_Face*> & faces, + std::set<BDS_Edge*> & edges, + std::set<BDS_Point*> & vertices){ if (faces.find(f) != faces.end())return; faces.insert(f); BDS_Edge *ee[3] = {f->e1,f->e2,f->e3}; @@ -105,9 +105,9 @@ void recur_empty_cavity (BDS_Face *f, BDS_Edge *e = ee[i]; if (e != be[0] && e != be[1] && e != be[2] && e != be[3]) { - edges.insert(e); - BDS_Face *of = e->otherFace(f); - recur_empty_cavity (of,be,bv,faces,edges,vertices); + edges.insert(e); + BDS_Face *of = e->otherFace(f); + recur_empty_cavity (of,be,bv,faces,edges,vertices); } } } @@ -124,9 +124,9 @@ void gmshEdgeFront::emptyCavity (BDS_Edge *bottom, BDS_Edge *top, BDS_Edge *left std::set<BDS_Point*> m_vertices; BDS_Edge *be[4] = {bottom,top,left,right}; BDS_Point *bv[4] = {bottom->commonvertex(left), - left->commonvertex(top), - top->commonvertex(right), - right->commonvertex(bottom)}; + left->commonvertex(top), + top->commonvertex(right), + right->commonvertex(bottom)}; recur_empty_cavity (f,be,bv,m_faces,m_edges,m_vertices); @@ -168,8 +168,8 @@ SVector3 gmshEdgeFront::normal (BDS_Edge*e) const{ SVector3 t2 (p3->X-p1->X,p3->Y-p1->Y,p3->Z-p1->Z); SVector3 t3 = crossprod(t1,t2); double m[3][3] = {{t1.x(),t2.x(),t3.x()}, - {t1.y(),t2.y(),t3.y()}, - {t1.z(),t2.z(),t3.z()}}; + {t1.y(),t2.y(),t3.y()}, + {t1.z(),t2.z(),t3.z()}}; double im[3][3]; inv3x3(m,im); SVector3 n (im[1][0],im[1][1],im[1][2]); @@ -207,7 +207,7 @@ void gmshEdgeFront::initiate () { std::list<BDS_Edge*>::iterator it = m->edges.begin(); while (it!= m->edges.end()){ if (((*it)->numfaces() == 1 && (*it)->faces(0)->e4 == 0) || - ((*it)->numfaces() == 2 && (*it)->numTriangles() == 1)) { + ((*it)->numfaces() == 2 && (*it)->numTriangles() == 1)) { edges.insert(*it); } ++it; @@ -247,7 +247,7 @@ int gmshEdgeFront::computeStatus (BDS_Edge *e) const { if (dot(n1,n3) < 0)angle2 = M_PI; // printf("edge %d %d angles %g (%d %d) %g (%d %d)\n",e->p1->iD,e->p2->iD,angle1*180/M_PI,e1->p1->iD,e1->p2->iD,angle2*180/M_PI, - // e2->p1->iD,e2->p2->iD); + // e2->p1->iD,e2->p2->iD); const double angleLimit = 3*M_PI/4.; @@ -259,13 +259,13 @@ int gmshEdgeFront::computeStatus (BDS_Edge *e) const { bool gmshEdgeFront::formQuad (BDS_Edge *e, - BDS_Edge *left, - BDS_Edge *right){ + BDS_Edge *left, + BDS_Edge *right){ printf("e (%d,%d), l(%d,%d), r(%d,%d)\n", - e->p1->iD,e->p2->iD, - left->p1->iD,left->p2->iD, - right->p1->iD,right->p2->iD); + e->p1->iD,e->p2->iD, + left->p1->iD,left->p2->iD, + right->p1->iD,right->p2->iD); // outputScalarField(m->triangles, "deb_before.pos", 0); @@ -303,10 +303,10 @@ bool gmshEdgeFront::formQuad (BDS_Edge *e, // top edge becomes part of the front /* printf("(%d,%d),(%d,%d),(%d,%d),(%d,%d)\n", - e->p1->iD,e->p2->iD, - left->p1->iD,left->p2->iD, - top->p1->iD,top->p2->iD, - right->p1->iD,right->p2->iD); + e->p1->iD,e->p2->iD, + left->p1->iD,left->p2->iD, + top->p1->iD,top->p2->iD, + right->p1->iD,right->p2->iD); */ // outputScalarField(m->triangles, "deb.pos", 0); @@ -335,7 +335,8 @@ bool gmshEdgeFront::formQuad (BDS_Edge *e, for (unsigned int i=0;i<toUpdate.size();i++){ toUpdate[i]->config_modified = true; - bool done = m->smooth_point_parametric(toUpdate[i], gf); + //bool done = + m->smooth_point_parametric(toUpdate[i], gf); // printf("smooth done %d (g %d)\n",done,toUpdate[i]->g->classif_degree); } @@ -343,7 +344,7 @@ bool gmshEdgeFront::formQuad (BDS_Edge *e, BDS_Point *p = toUpdate[i]; for (std::list<BDS_Edge*>::iterator itp = p->edges.begin(); itp != p->edges.end() ; ++ itp){ if (inFront(*itp)){ - updateStatus(*itp); + updateStatus(*itp); } } } @@ -372,8 +373,8 @@ BDS_Edge *gmshEdgeFront::findOptimalEdge(BDS_Point *p, BDS_Point *avoid){ d.normalize(); double COS = dot(n,d); if (COS > lowerBound && q != avoid){ - lowerBound = COS; - found = *itp; + lowerBound = COS; + found = *itp; } } } @@ -389,48 +390,48 @@ BDS_Edge *gmshEdgeFront::findOptimalEdge(BDS_Point *p, BDS_Point *avoid){ while(it != ite) { BDS_Face *t = *it; if (!t->e4){ - BDS_Edge *e = t->oppositeEdge(p); - if (e->numfaces() == 2){ - BDS_Face *f = e->otherFace(t); - if (!f->e4){ - BDS_Point *target = f->oppositeVertex(e); - // ONLY WORKS IN 2D for now !!!!!!!!!!!!!!!!!!! - Intersect_Edges_2d ( e->p1->X,e->p1->Y, - e->p2->X,e->p2->Y, - p->X,p->Y, - p->X+n.x(),p->Y + n.y(),x); - if ( x[0] >= 0 && x[0] <= 1){ - SVector3 d (target->X-p->X,target->Y-p->Y,target->Z-p->Z); - d.normalize(); - double COS = dot(n,d); - double L2 = sqrt ((target->X - p->X) *(target->X - p->X) + - (target->X - p->Y) *(target->X - p->Y) + - (target->X - p->Z) *(target->X - p->Z) ); - - // swapping the edge alllow to find an edgge that has the right direction and - // right size - if (COS > cos (M_PI/6.0) && L2 < L){ - m->swap_edge( e, BDS_SwapEdgeTestQuality(false,false)); - BDS_Edge *newE = m->find_edge(p,target); - // printf("swapping -> %p\n",newE); - return newE; - } - // split the edge - else{ - BDS_Point *mid; - mid = m->add_point(++m->MAXPOINTNUMBER,(1.-x[0])*e->p1->u + x[0]*e->p2->u, - (1.-x[0])*e->p1->v + x[0]*e->p2->v,gf); - mid->lc() = 0.5 * (p->lc() + target->lc()); - mid->g = e->p1->g; - m->split_edge(e, mid); - BDS_Edge *newE = m->find_edge(p,mid); - // printf("splitting -> %p %p\n",newE,e->p1->g); - // m->cleanup(); - return newE; - } - } - } - } + BDS_Edge *e = t->oppositeEdge(p); + if (e->numfaces() == 2){ + BDS_Face *f = e->otherFace(t); + if (!f->e4){ + BDS_Point *target = f->oppositeVertex(e); + // ONLY WORKS IN 2D for now !!!!!!!!!!!!!!!!!!! + Intersect_Edges_2d ( e->p1->X,e->p1->Y, + e->p2->X,e->p2->Y, + p->X,p->Y, + p->X+n.x(),p->Y + n.y(),x); + if ( x[0] >= 0 && x[0] <= 1){ + SVector3 d (target->X-p->X,target->Y-p->Y,target->Z-p->Z); + d.normalize(); + double COS = dot(n,d); + double L2 = sqrt ((target->X - p->X) *(target->X - p->X) + + (target->X - p->Y) *(target->X - p->Y) + + (target->X - p->Z) *(target->X - p->Z) ); + + // swapping the edge alllow to find an edgge that has the right direction and + // right size + if (COS > cos (M_PI/6.0) && L2 < L){ + m->swap_edge( e, BDS_SwapEdgeTestQuality(false,false)); + BDS_Edge *newE = m->find_edge(p,target); + // printf("swapping -> %p\n",newE); + return newE; + } + // split the edge + else{ + BDS_Point *mid; + mid = m->add_point(++m->MAXPOINTNUMBER,(1.-x[0])*e->p1->u + x[0]*e->p2->u, + (1.-x[0])*e->p1->v + x[0]*e->p2->v,gf); + mid->lc() = 0.5 * (p->lc() + target->lc()); + mid->g = e->p1->g; + m->split_edge(e, mid); + BDS_Edge *newE = m->find_edge(p,mid); + // printf("splitting -> %p %p\n",newE,e->p1->g); + // m->cleanup(); + return newE; + } + } + } + } } ++it; } @@ -445,7 +446,7 @@ bool gmshEdgeFront::emptyFront (int tag){ // front edges tagged "tag" is empty if (stat[tag].size() == 0)return true; BDS_Edge *e = *(stat[tag].begin()); - BDS_Edge *left,*right; + BDS_Edge *left,*right=0; eiter it1,it2; std::vector<eiter> fe1,fe2; @@ -545,18 +546,18 @@ int gmshQMorph (GFace *gf) while (1){ if (front.emptyFront ( 3 )){ if (front.emptyFront ( 2 )){ - if (front.emptyFront ( 1 )){ - if (front.emptyFront ( 0 )){ - int ns; - smoothVertexPass(gf,*pm,ns,false); - printf("nex row iter %6d->>>\n",ITER); - front.initiate(); - int _numQuadsNew = numQuads (pm); - if (front.edges.size() == 0 || _numQuads == _numQuadsNew) - break; - _numQuads = _numQuadsNew; - } - } + if (front.emptyFront ( 1 )){ + if (front.emptyFront ( 0 )){ + int ns; + smoothVertexPass(gf,*pm,ns,false); + printf("nex row iter %6d->>>\n",ITER); + front.initiate(); + int _numQuadsNew = numQuads (pm); + if (front.edges.size() == 0 || _numQuads == _numQuadsNew) + break; + _numQuads = _numQuadsNew; + } + } } } ITER++; diff --git a/Mesh/meshGFaceTransfinite.cpp b/Mesh/meshGFaceTransfinite.cpp index 37f782411398cb4372026b514604977683cc2dc0..fb1125f127297258ac292973afb0ca986215c353 100644 --- a/Mesh/meshGFaceTransfinite.cpp +++ b/Mesh/meshGFaceTransfinite.cpp @@ -90,7 +90,7 @@ int MeshTransfiniteSurface(GFace *gf) findTransfiniteCorners(gf, corners); if(corners.size () != 3 && corners.size () != 4){ Msg::Error("Surface %d is transfinite but has %d corners", - gf->tag(), corners.size()); + gf->tag(), corners.size()); return 0; } @@ -100,7 +100,7 @@ int MeshTransfiniteSurface(GFace *gf) if(indices.size () != 2){ Msg::Error("Surface %d is transfinite but has %d holes", - gf->tag(), indices.size() - 2); + gf->tag(), indices.size() - 2); return 0; } @@ -159,7 +159,7 @@ int MeshTransfiniteSurface(GFace *gf) int Lb = N4 - N3, Hb = m_vertices.size() - N4; if(Lb != L || Hb != H){ Msg::Error("Surface %d cannot be meshed using the transfinite algo", - gf->tag()); + gf->tag()); return 0; } } @@ -167,7 +167,7 @@ int MeshTransfiniteSurface(GFace *gf) int Lb = m_vertices.size() - N3; if(Lb != L){ Msg::Error("Surface %d cannot be meshed using the transfinite algo %d != %d", - gf->tag(), L, Lb); + gf->tag(), L, Lb); return 0; } } diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp index 701113ba8e6160b264ade3a81e0d453f3b0fa2de..53b1a4fc0bac34057c5803e3a4b8672497e7f3dd 100644 --- a/Mesh/meshGRegion.cpp +++ b/Mesh/meshGRegion.cpp @@ -121,7 +121,7 @@ void TransferTetgenMesh(GRegion *gr, tetgenio &in, tetgenio &out, } Msg::Info("%d points %d edges and %d faces in the final mesh", - out.numberofpoints, out.numberofedges, out.numberoftrifaces); + out.numberofpoints, out.numberofedges, out.numberoftrifaces); // Tetgen modifies both surface & edge mesh, so we need to re-create // everything @@ -162,30 +162,30 @@ void TransferTetgenMesh(GRegion *gr, tetgenio &in, tetgenio &out, Msg::Error("Uncategorized vertex %d", v[j]->getNum()); } else if(v[j]->onWhat()->dim() == 2){ - double uu,vv; - v[j]->getParameter(0,uu); - v[j]->getParameter(1,vv); - guess[0] += uu; - guess[1] += vv; - Count++; + double uu,vv; + v[j]->getParameter(0,uu); + v[j]->getParameter(1,vv); + guess[0] += uu; + guess[1] += vv; + Count++; } else if (v[j]->onWhat()->dim() == 1){ - GEdge *ge = (GEdge*)v[j]->onWhat(); - double UU; - v[j]->getParameter(0, UU); - SPoint2 param; - param = ge->reparamOnFace(gf, UU, 1); - guess[0]+=param.x(); - guess[1]+=param.y(); - Count++; + GEdge *ge = (GEdge*)v[j]->onWhat(); + double UU; + v[j]->getParameter(0, UU); + SPoint2 param; + param = ge->reparamOnFace(gf, UU, 1); + guess[0]+=param.x(); + guess[1]+=param.y(); + Count++; } else if (v[j]->onWhat()->dim() == 0){ - SPoint2 param; - GVertex *gv = (GVertex*)v[j]->onWhat(); - param = gv->reparamOnFace(gf,1); - guess[0]+=param.x(); - guess[1]+=param.y(); - Count++; + SPoint2 param; + GVertex *gv = (GVertex*)v[j]->onWhat(); + param = gv->reparamOnFace(gf,1); + guess[0]+=param.x(); + guess[1]+=param.y(); + Count++; } } if (Count != 0){ @@ -200,35 +200,35 @@ void TransferTetgenMesh(GRegion *gr, tetgenio &in, tetgenio &out, v[j]->onWhat()->mesh_vertices.end(), v[j])); MVertex *v1b; - if (CTX::instance()->mesh.order > 1 && + if (CTX::instance()->mesh.order > 1 && CTX::instance()->mesh.secondOrderExperimental){ - // PARAMETRIC COORDINATES SHOULD BE SET for the vertex !!!!!!!!!!!!! - // This is not 100 % safe yet, so we reserve that operation for high order - // meshes. - // Msg::Debug("A new point has been inserted in mesh face %d by the 3D mesher, guess %g %g",gf->tag(),guess[0],guess[1]); - GPoint gp = gf->closestPoint (SPoint3(v[j]->x(), v[j]->y(), v[j]->z()),guess); - - // To be safe, we should ensure that this mesh motion does not lead to an invalid mesh !!!! - //v1b = new MVertex(gp.x(),gp.y(),gp.z(),gf); - if (gp.g() ){ - //v1b = new MFaceVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf,gp.u(),gp.v()); - v1b = new MFaceVertex(gp.x(),gp.y(),gp.z(),gf,gp.u(),gp.v()); - // Msg::Info("The point has been projected back to the surface (%g %g %g) -> (%g %g %g)", - // v[j]->x(), v[j]->y(), v[j]->z(),gp.x(),gp.y(),gp.z()); - } - else{ - v1b = new MVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf); - Msg::Warning("The point was not projected back to the surface (%g %g %g)", + // PARAMETRIC COORDINATES SHOULD BE SET for the vertex !!!!!!!!!!!!! + // This is not 100 % safe yet, so we reserve that operation for high order + // meshes. + // Msg::Debug("A new point has been inserted in mesh face %d by the 3D mesher, guess %g %g",gf->tag(),guess[0],guess[1]); + GPoint gp = gf->closestPoint (SPoint3(v[j]->x(), v[j]->y(), v[j]->z()),guess); + + // To be safe, we should ensure that this mesh motion does not lead to an invalid mesh !!!! + //v1b = new MVertex(gp.x(),gp.y(),gp.z(),gf); + if (gp.g() ){ + //v1b = new MFaceVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf,gp.u(),gp.v()); + v1b = new MFaceVertex(gp.x(),gp.y(),gp.z(),gf,gp.u(),gp.v()); + // Msg::Info("The point has been projected back to the surface (%g %g %g) -> (%g %g %g)", + // v[j]->x(), v[j]->y(), v[j]->z(),gp.x(),gp.y(),gp.z()); + } + else{ + v1b = new MVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf); + Msg::Warning("The point was not projected back to the surface (%g %g %g)", v[j]->x(), v[j]->y(), v[j]->z()); - } - } - else{ - v1b = new MVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf); - } + } + } + else{ + v1b = new MVertex(v[j]->x(), v[j]->y(), v[j]->z(),gf); + } gf->mesh_vertices.push_back(v1b); numberedV[out.trifacelist[i * 3 + j] - 1] = v1b; - delete v[j]; + delete v[j]; v[j] = v1b; } } @@ -280,13 +280,13 @@ void MeshDelaunayVolume(std::vector<GRegion*> ®ions) char opts[128]; buildTetgenStructure(gr, in, numberedV); sprintf(opts, "pe%c", - (Msg::GetVerbosity() < 3) ? 'Q': (Msg::GetVerbosity() > 6)? 'V': '\0'); + (Msg::GetVerbosity() < 3) ? 'Q': (Msg::GetVerbosity() > 6)? 'V': '\0'); try{ tetrahedralize(opts, &in, &out); } catch (int error){ Msg::Error("Self intersecting surface mesh, computing intersections " - "(this could take a while)"); + "(this could take a while)"); sprintf(opts, "dV"); try{ tetrahedralize(opts, &in, &out); @@ -496,11 +496,6 @@ void meshNormalsPointOutOfTheRegion(GRegion *gr) std::list<GFace*> faces = gr->faces(); std::list<GFace*>::iterator it = faces.begin(); - - printf("in normals faces size = %d \n", faces.size()); - for (std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++) - printf("in normals face %d \n", (*it)->tag()); - double rrr[6]; setRand(rrr); @@ -604,14 +599,15 @@ void meshGRegion::operator() (GRegion *gr) std::list<GFace*>::iterator it = faces.begin(); while(it != faces.end()){ if ((*it)->getCompound()){ - mySet.insert((*it)->getCompound()); - printf("compound face %d found in face %d\n",(*it)->getCompound()->tag(), (*it)->tag()); + mySet.insert((*it)->getCompound()); + printf("compound face %d found in face %d\n",(*it)->getCompound()->tag(), (*it)->tag()); } else - mySet.insert(*it); + mySet.insert(*it); ++it; } - printf("replacing %d edges by %d in the GFaceCompound %d\n",faces.size(),mySet.size(),gr->tag()); + printf("replacing %d edges by %d in the GFaceCompound %d\n", + (int)faces.size(), (int)mySet.size(), gr->tag()); faces.clear(); faces.insert(faces.begin(), mySet.begin(), mySet.end()); gr->set(faces); diff --git a/Mesh/meshGRegionExtruded.cpp b/Mesh/meshGRegionExtruded.cpp index bd953c18ab4fec11c55d57e69d8df3570daebd22..83773a0c850ce052b3bf066f3f2167e5004dcbbe 100644 --- a/Mesh/meshGRegionExtruded.cpp +++ b/Mesh/meshGRegionExtruded.cpp @@ -80,8 +80,8 @@ static void createTet(MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, GRegio } static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::vector<MVertex*> &verts) + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::vector<MVertex*> &verts) { std::set<MVertex*, MVertexLessThanLexicographic>::iterator itp; double x[8], y[8], z[8]; @@ -113,7 +113,7 @@ static int getExtrudedVertices(MElement *ele, ExtrudeParams *ep, int j, int k, } static void extrudeMesh(GFace *from, GRegion *to, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { ExtrudeParams *ep = to->meshAttributes.extrude; @@ -163,7 +163,7 @@ static void extrudeMesh(GFace *from, GRegion *to, } static void insertAllVertices(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos) + std::set<MVertex*, MVertexLessThanLexicographic> &pos) { pos.insert(gr->mesh_vertices.begin(), gr->mesh_vertices.end()); std::list<GFace*> faces = gr->faces(); @@ -227,21 +227,21 @@ void meshGRegionExtruded::operator() (GRegion *gr) } static int edgeExists(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); return edges.count(p); } static void createEdge(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); edges.insert(p); } static void deleteEdge(MVertex *v1, MVertex *v2, - std::set<std::pair<MVertex*, MVertex*> > &edges) + std::set<std::pair<MVertex*, MVertex*> > &edges) { std::pair<MVertex*, MVertex*> p(std::min(v1, v2), std::max(v1, v2)); edges.erase(p); @@ -249,8 +249,8 @@ static void deleteEdge(MVertex *v1, MVertex *v2, // subdivide the 3 lateral faces of each prism static void phase1(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges) + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); @@ -284,10 +284,10 @@ static void phase1(GRegion *gr, // modify lateral edges to make them "tet-compatible" static void phase2(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges, - std::set<std::pair<MVertex*, MVertex*> > &edges_swap, - int &swap) + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges, + std::set<std::pair<MVertex*, MVertex*> > &edges_swap, + int &swap) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); @@ -352,8 +352,8 @@ static void phase2(GRegion *gr, // create tets static void phase3(GRegion *gr, - std::set<MVertex*, MVertexLessThanLexicographic> &pos, - std::set<std::pair<MVertex*, MVertex*> > &edges) + std::set<MVertex*, MVertexLessThanLexicographic> &pos, + std::set<std::pair<MVertex*, MVertex*> > &edges) { ExtrudeParams *ep = gr->meshAttributes.extrude; GFace *from = gr->model()->getFaceByTag(std::abs(ep->geo.Source)); diff --git a/Mesh/meshGRegionLocalMeshMod.cpp b/Mesh/meshGRegionLocalMeshMod.cpp index ba34b8ae9db70a69092ad9c3b7bec0021e5cd8c7..7f9abd4d5a185d7a8b17b6639503ddf0ca0c8ba3 100644 --- a/Mesh/meshGRegionLocalMeshMod.cpp +++ b/Mesh/meshGRegionLocalMeshMod.cpp @@ -791,7 +791,7 @@ bool gmshSmoothVertexOptimize(MTet4 *t, double xyzopti[3] = {vd.v->x(), vd.v->y(), vd.v->z()}; - double val = 0.; + //double val = 0.; Msg::Error("Fletcher-Reeves minimizer routine must be reimplemented"); //minimize_N(3, smooth_obj_3D, deriv_smoothing_objective_function_3D, &vd, 4, // xyzopti, val); diff --git a/Mesh/meshGRegionTransfinite.cpp b/Mesh/meshGRegionTransfinite.cpp index 0f319a0d61e891d0631db1beb1f84f92110b1d08..8a299fadd1ccd6120b88ffc52d09e52470ee4d94 100644 --- a/Mesh/meshGRegionTransfinite.cpp +++ b/Mesh/meshGRegionTransfinite.cpp @@ -99,13 +99,13 @@ tab[i + 1][j + 1][k ]) static double transfiniteHex(double f1, double f2, double f3, double f4, - double f5, double f6, - double c1, double c2, double c3, double c4, - double c5, double c6, double c7, double c8, - double c9, double c10, double c11, double c12, - double s1, double s2, double s3, double s4, - double s5, double s6, double s7, double s8, - double u, double v, double w) + double f5, double f6, + double c1, double c2, double c3, double c4, + double c5, double c6, double c7, double c8, + double c9, double c10, double c11, double c12, + double s1, double s2, double s3, double s4, + double s5, double s6, double s7, double s8, + double u, double v, double w) { return (1-u)*f4 + u*f2 + (1-v)*f1 + v*f3 + (1-w)*f5 + w*f6 - ((1-u)*(1-v)*c9 + (1-u)*v*c12 + u*(1-v)*c10 + u*v*c11) - @@ -116,14 +116,14 @@ static double transfiniteHex(double f1, double f2, double f3, double f4, } static MVertex *transfiniteHex(GRegion *gr, - MVertex *f1, MVertex *f2, MVertex *f3, MVertex *f4, - MVertex *f5, MVertex *f6, - MVertex *c1, MVertex *c2, MVertex *c3, MVertex *c4, - MVertex *c5, MVertex *c6, MVertex *c7, MVertex *c8, - MVertex *c9, MVertex *c10, MVertex *c11, MVertex *c12, - MVertex *s1, MVertex *s2, MVertex *s3, MVertex *s4, - MVertex *s5, MVertex *s6, MVertex *s7, MVertex *s8, - double u, double v, double w) + MVertex *f1, MVertex *f2, MVertex *f3, MVertex *f4, + MVertex *f5, MVertex *f6, + MVertex *c1, MVertex *c2, MVertex *c3, MVertex *c4, + MVertex *c5, MVertex *c6, MVertex *c7, MVertex *c8, + MVertex *c9, MVertex *c10, MVertex *c11, MVertex *c12, + MVertex *s1, MVertex *s2, MVertex *s3, MVertex *s4, + MVertex *s5, MVertex *s6, MVertex *s7, MVertex *s8, + double u, double v, double w) { double x = transfiniteHex(f1->x(), f2->x(), f3->x(), f4->x(), f5->x(), f6->x(), c1->x(), c2->x(), c3->x(), c4->x(), c5->x(), c6->x(), @@ -321,7 +321,7 @@ int MeshTransfiniteVolume(GRegion *gr) findTransfiniteCorners(gr, corners); if(corners.size() != 6 && corners.size() != 8){ Msg::Error("Volume %d is transfinite but has %d corners", - gr->tag(), corners.size()); + gr->tag(), corners.size()); return 0; } @@ -330,7 +330,7 @@ int MeshTransfiniteVolume(GRegion *gr) GOrientedTransfiniteFace f(*it, corners); if(f.index() < 0){ Msg::Error("Incompatible surface %d in transfinite volume %d", - (*it)->tag(), gr->tag()); + (*it)->tag(), gr->tag()); return 0; } orientedFaces[f.index()] = f; diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp index b1d205e73dd6a9c623dac6e3fc418c2b0e752c47..078c84216347f01fb03b28b9039a9fa7302f9eb8 100644 --- a/Mesh/meshPartition.cpp +++ b/Mesh/meshPartition.cpp @@ -154,9 +154,9 @@ int PartitionGraph(Graph &graph, meshPartitionOptions &options) // Some setup (similar to that of Chaco/input/input.c) if(options.global_method != 2) options.rqi_flag = 0; if(options.global_method == 1 || options.rqi_flag) { - if (options.vmax < 2*(1 << options.ndims)) { + if (options.vmax < 2*(1 << options.ndims)) { options.vmax = 2*(1 << options.ndims); - } + } } // Ensure num_partitions reflects values used by Chaco switch(options.architecture) { diff --git a/Mesh/meshRefine.cpp b/Mesh/meshRefine.cpp index a33b4dc568704baf5b595cea8a93dc27e6a5f5af..21d654aed1877b422d97fc51f2b345adfb4b2b94 100644 --- a/Mesh/meshRefine.cpp +++ b/Mesh/meshRefine.cpp @@ -59,14 +59,14 @@ static void Subdivide(GFace *gf, bool splitIntoQuads, bool splitIntoHexas, for(unsigned int i = 0; i < gf->triangles.size(); i++){ MTriangle *t = gf->triangles[i]; if(t->getNumVertices() == 6){ - triangles2.push_back - (new MTriangle(t->getVertex(0), t->getVertex(3), t->getVertex(5))); - triangles2.push_back - (new MTriangle(t->getVertex(3), t->getVertex(4), t->getVertex(5))); - triangles2.push_back - (new MTriangle(t->getVertex(3), t->getVertex(1), t->getVertex(4))); - triangles2.push_back - (new MTriangle(t->getVertex(5), t->getVertex(4), t->getVertex(2))); + triangles2.push_back + (new MTriangle(t->getVertex(0), t->getVertex(3), t->getVertex(5))); + triangles2.push_back + (new MTriangle(t->getVertex(3), t->getVertex(4), t->getVertex(5))); + triangles2.push_back + (new MTriangle(t->getVertex(3), t->getVertex(1), t->getVertex(4))); + triangles2.push_back + (new MTriangle(t->getVertex(5), t->getVertex(4), t->getVertex(2))); } delete t; } @@ -92,32 +92,32 @@ static void Subdivide(GFace *gf, bool splitIntoQuads, bool splitIntoHexas, for(unsigned int i = 0; i < gf->triangles.size(); i++){ MTriangle *t = gf->triangles[i]; if(t->getNumVertices() == 6){ - SPoint2 pt; - SPoint3 ptx; t->pnt(0.5, 0.5, 0, ptx); - bool reparamOK = true; - for(int k = 0; k < 6; k++){ + SPoint2 pt; + SPoint3 ptx; t->pnt(0.5, 0.5, 0, ptx); + bool reparamOK = true; + for(int k = 0; k < 6; k++){ SPoint2 temp; - reparamOK &= reparamMeshVertexOnFace(t->getVertex(k), gf, temp); - pt[0] += temp[0] / 6.; - pt[1] += temp[1] / 6.; - } - MVertex *newv; - if (reparamOK){ - GPoint gp = gf->point(pt); - newv = new MFaceVertex(gp.x(), gp.y(), gp.z(), gf, pt[0], pt[1]); - } - else { - newv = new MVertex(ptx.x(), ptx.y(), ptx.z(), gf); - } - gf->mesh_vertices.push_back(newv); + reparamOK &= reparamMeshVertexOnFace(t->getVertex(k), gf, temp); + pt[0] += temp[0] / 6.; + pt[1] += temp[1] / 6.; + } + MVertex *newv; + if (reparamOK){ + GPoint gp = gf->point(pt); + newv = new MFaceVertex(gp.x(), gp.y(), gp.z(), gf, pt[0], pt[1]); + } + else { + newv = new MVertex(ptx.x(), ptx.y(), ptx.z(), gf); + } + gf->mesh_vertices.push_back(newv); if(splitIntoHexas) faceVertices[t->getFace(0)].push_back(newv); - quadrangles2.push_back - (new MQuadrangle(t->getVertex(0), t->getVertex(3), newv, t->getVertex(5))); - quadrangles2.push_back - (new MQuadrangle(t->getVertex(3), t->getVertex(1), t->getVertex(4), newv)); - quadrangles2.push_back - (new MQuadrangle(t->getVertex(5), newv,t->getVertex(4), t->getVertex(2))); - delete t; + quadrangles2.push_back + (new MQuadrangle(t->getVertex(0), t->getVertex(3), newv, t->getVertex(5))); + quadrangles2.push_back + (new MQuadrangle(t->getVertex(3), t->getVertex(1), t->getVertex(4), newv)); + quadrangles2.push_back + (new MQuadrangle(t->getVertex(5), newv,t->getVertex(4), t->getVertex(2))); + delete t; } } gf->triangles.clear(); @@ -210,19 +210,19 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti SPoint3 pc = t->barycenter(); newv.push_back(new MVertex(pc.x(), pc.y(), pc.z(), gr)); gr->mesh_vertices.push_back(newv.back()); - hexahedra2.push_back - (new MHexahedron(t->getVertex(0), t->getVertex(4), newv[0], t->getVertex(6), + hexahedra2.push_back + (new MHexahedron(t->getVertex(0), t->getVertex(4), newv[0], t->getVertex(6), t->getVertex(7), newv[1], newv[4], newv[2])); - hexahedra2.push_back - (new MHexahedron(t->getVertex(4), t->getVertex(1), t->getVertex(5), newv[0], + hexahedra2.push_back + (new MHexahedron(t->getVertex(4), t->getVertex(1), t->getVertex(5), newv[0], newv[1], t->getVertex(9), newv[3], newv[4])); - hexahedra2.push_back - (new MHexahedron(t->getVertex(6), newv[0], t->getVertex(5), t->getVertex(2), + hexahedra2.push_back + (new MHexahedron(t->getVertex(6), newv[0], t->getVertex(5), t->getVertex(2), newv[2], newv[4], newv[3], t->getVertex(8))); - hexahedra2.push_back - (new MHexahedron(t->getVertex(3), t->getVertex(9), newv[1], t->getVertex(7), + hexahedra2.push_back + (new MHexahedron(t->getVertex(3), t->getVertex(9), newv[1], t->getVertex(7), t->getVertex(8), newv[3], newv[4], newv[2])); - delete t; + delete t; } } gr->tetrahedra.clear(); @@ -247,23 +247,23 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti SPoint3 pc = p->barycenter(); newv.push_back(new MVertex(pc.x(), pc.y(), pc.z(), gr)); gr->mesh_vertices.push_back(newv.back()); - hexahedra2.push_back - (new MHexahedron(p->getVertex(0), p->getVertex(6), newv[0], p->getVertex(7), + hexahedra2.push_back + (new MHexahedron(p->getVertex(0), p->getVertex(6), newv[0], p->getVertex(7), p->getVertex(8), p->getVertex(15), newv[2], p->getVertex(16))); - hexahedra2.push_back - (new MHexahedron(p->getVertex(1), p->getVertex(9), newv[0], p->getVertex(6), + hexahedra2.push_back + (new MHexahedron(p->getVertex(1), p->getVertex(9), newv[0], p->getVertex(6), p->getVertex(10), p->getVertex(17), newv[2], p->getVertex(15))); - hexahedra2.push_back - (new MHexahedron(p->getVertex(2), p->getVertex(7), newv[0], p->getVertex(9), + hexahedra2.push_back + (new MHexahedron(p->getVertex(2), p->getVertex(7), newv[0], p->getVertex(9), p->getVertex(11), p->getVertex(16), newv[2], p->getVertex(17))); - hexahedra2.push_back - (new MHexahedron(p->getVertex(8), p->getVertex(15), newv[2], p->getVertex(16), + hexahedra2.push_back + (new MHexahedron(p->getVertex(8), p->getVertex(15), newv[2], p->getVertex(16), p->getVertex(3), p->getVertex(12), newv[1], p->getVertex(13))); - hexahedra2.push_back - (new MHexahedron(p->getVertex(10), p->getVertex(17), newv[2], p->getVertex(15), + hexahedra2.push_back + (new MHexahedron(p->getVertex(10), p->getVertex(17), newv[2], p->getVertex(15), p->getVertex(4), p->getVertex(14), newv[1], p->getVertex(12))); - hexahedra2.push_back - (new MHexahedron(p->getVertex(11), p->getVertex(16), newv[2], p->getVertex(17), + hexahedra2.push_back + (new MHexahedron(p->getVertex(11), p->getVertex(16), newv[2], p->getVertex(17), p->getVertex(5), p->getVertex(13), newv[1], p->getVertex(14))); } } @@ -281,22 +281,22 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti p->getVertex(8), p->getVertex(15), p->getVertex(16))); prisms2.push_back (new MPrism(p->getVertex(8), p->getVertex(15), p->getVertex(16), - p->getVertex(3), p->getVertex(12), p->getVertex(13))); + p->getVertex(3), p->getVertex(12), p->getVertex(13))); prisms2.push_back (new MPrism(p->getVertex(6), p->getVertex(1), p->getVertex(9), - p->getVertex(15), p->getVertex(10), p->getVertex(17))); + p->getVertex(15), p->getVertex(10), p->getVertex(17))); prisms2.push_back (new MPrism(p->getVertex(15), p->getVertex(10), p->getVertex(17), - p->getVertex(12), p->getVertex(4), p->getVertex(14))); + p->getVertex(12), p->getVertex(4), p->getVertex(14))); prisms2.push_back (new MPrism(p->getVertex(7), p->getVertex(9), p->getVertex(2), - p->getVertex(16), p->getVertex(17), p->getVertex(11))); + p->getVertex(16), p->getVertex(17), p->getVertex(11))); prisms2.push_back (new MPrism(p->getVertex(16), p->getVertex(17), p->getVertex(11), - p->getVertex(13), p->getVertex(14), p->getVertex(5))); + p->getVertex(13), p->getVertex(14), p->getVertex(5))); prisms2.push_back (new MPrism(p->getVertex(9), p->getVertex(7), p->getVertex(6), - p->getVertex(17), p->getVertex(16), p->getVertex(15))); + p->getVertex(17), p->getVertex(16), p->getVertex(15))); prisms2.push_back (new MPrism(p->getVertex(17), p->getVertex(16), p->getVertex(15), p->getVertex(14), p->getVertex(13), p->getVertex(12))); @@ -363,7 +363,7 @@ void RefineMesh(GModel *m, bool linear, bool splitIntoQuads, bool splitIntoHexas { Msg::StatusBar(1, true, "Refining mesh..."); double t1 = Cpu(); - + // Create 2nd order mesh (using "2nd order complete" elements) to // generate vertex positions SetOrderN(m, 2, linear, false); diff --git a/Mesh/qualityMeasures.cpp b/Mesh/qualityMeasures.cpp index 432e7cd86d62f842366c457d286e42484922f341..5cc0acef9741edf9db8b6ef13f861e2a3bbd848c 100644 --- a/Mesh/qualityMeasures.cpp +++ b/Mesh/qualityMeasures.cpp @@ -67,12 +67,14 @@ double qmTriangle(const double &xa, const double &ya, const double &za, // condition number case QMTRI_COND: { + /* double a [3] = {xc - xa, yc - ya, zc - za}; double b [3] = {xb - xa, yb - ya, zb - za}; double c [3] ; prodve(a, b, c); norme(c); double A[3][3] = {{a[0] , b[0] , c[0]} , {a[1] , b[1] , c[1]} , {a[2] , b[2] , c[2]}}; + */ quality = -1; } break; @@ -103,7 +105,6 @@ double qmTet(const double &x1, const double &y1, const double &z1, const double &x4, const double &y4, const double &z4, const gmshQualityMeasure4Tet &cr, double *volume) { - double quality; switch(cr){ case QMTET_ONE: return 1.0; @@ -179,21 +180,19 @@ double mesh_functional_distorsion(MTriangle *t, double u, double v) { // compute uncurved element jacobian d_u x and d_v x double mat[3][3]; - double d1 = t->getPrimaryJacobian(u,v,0,mat); - - //double d1 = t->getJacobian(u,v,0,mat); + t->getPrimaryJacobian(u, v, 0, mat); + // t->getJacobian(u,v,0,mat); double v1[3] = {mat[0][0], mat[0][1], mat[0][2]}; double v2[3] = {mat[1][0], mat[1][1], mat[1][2]}; double normal1[3]; prodve(v1, v2, normal1); double nn = sqrt(normal1[0]*normal1[0] + - normal1[1]*normal1[1] + - normal1[2]*normal1[2]); + normal1[1]*normal1[1] + + normal1[2]*normal1[2]); // compute uncurved element jacobian d_u x and d_v x - double d2 = t->getJacobian(u, v, 0, mat); - + t->getJacobian(u, v, 0, mat); double v1b[3] = {mat[0][0], mat[0][1], mat[0][2]}; double v2b[3] = {mat[1][0], mat[1][1], mat[1][2]}; double normal[3]; @@ -226,27 +225,26 @@ double mesh_functional_distorsion_p2(MTriangle *t) double qmDistorsionOfMapping (MTriangle *e) { // return 1.0; - if (e->getPolynomialOrder() == 1)return 1.0; - // if (e->getPolynomialOrder() == 2)return mesh_functional_distorsion_p2(e); + if (e->getPolynomialOrder() == 1) return 1.0; + // if (e->getPolynomialOrder() == 2) return mesh_functional_distorsion_p2(e); IntPt *pts; int npts; e->getIntegrationPoints(e->getPolynomialOrder(),&npts, &pts); double dmin; - for (int i=0;i<npts;i++){ + for (int i = 0 ; i < npts; i++){ const double u = pts[i].pt[0]; const double v = pts[i].pt[1]; - const double w = pts[i].pt[2]; - const double di = mesh_functional_distorsion (e,u,v); - dmin = (i==0)? di : std::min(dmin,di); + const double di = mesh_functional_distorsion (e, u, v); + dmin = (i == 0)? di : std::min(dmin, di); } const gmshMatrix<double>& points = e->getFunctionSpace()->points; - for (int i=0;i<e->getNumPrimaryVertices();i++) { - const double u = points(i,0); - const double v = points(i,1); - const double di = mesh_functional_distorsion (e,u,v); - dmin = std::min(dmin,di); + for (int i = 0; i < e->getNumPrimaryVertices(); i++) { + const double u = points(i, 0); + const double v = points(i, 1); + const double di = mesh_functional_distorsion (e, u, v); + dmin = std::min(dmin, di); } return dmin; } diff --git a/Numeric/CMakeLists.txt b/Numeric/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e60e6970bbda21786f798a1ec007ffea23961b69 --- /dev/null +++ b/Numeric/CMakeLists.txt @@ -0,0 +1,26 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Numeric.cpp + GmshMatrix.cpp + gmshLaplace.cpp + gmshConvexCombination.cpp + gmshHelmholtz.cpp + gmshElasticity.cpp + gmshProjection.cpp + gmshLinearSystemCSR.cpp + EigSolve.cpp + FunctionSpace.cpp + GaussQuadratureLin.cpp + GaussQuadratureTri.cpp + GaussQuadratureQuad.cpp + GaussQuadratureTet.cpp + GaussQuadratureHex.cpp + GaussLegendreSimplex.cpp + GmshPredicates.cpp +) + +append_gmsh_src(Numeric "${SRC}") diff --git a/Numeric/FunctionSpace.cpp b/Numeric/FunctionSpace.cpp index cc004f2f06606f246a15523123d6bbb49bd9d94e..59b1b0d63a3ef87c3f4114aa2367089fac0cec21 100644 --- a/Numeric/FunctionSpace.cpp +++ b/Numeric/FunctionSpace.cpp @@ -154,7 +154,7 @@ static gmshMatrix<double> generatePascalTetrahedron(int order) } static int nbdoftriangle(int order) { return (order + 1) * (order + 2) / 2; } -static int nbdoftriangleserendip(int order) { return 3 * order; } +//static int nbdoftriangleserendip(int order) { return 3 * order; } //KH : caveat : node coordinates are not yet coherent with node numbering associated // to numbering of principal vertices of face !!!! diff --git a/Numeric/GaussLegendreSimplex.cpp b/Numeric/GaussLegendreSimplex.cpp index dc9e801f41b257edec82b5d79b92537b12b6aa07..65672ee7718c87299965adad12e6c3a66e51b55e 100644 --- a/Numeric/GaussLegendreSimplex.cpp +++ b/Numeric/GaussLegendreSimplex.cpp @@ -47,7 +47,7 @@ int GaussLegendreTet(int n1, int n2, int n3, IntPt *pts) for(k=0; k < n3; k++) { brickToTet(pt1[i],pt2[j],pt3[k],&(pts[index].pt[0]), &(pts[index].pt[1]),&(pts[index].pt[2]),&dJ); - pts[index++].weight = dJ*wt1[i]*wt2[j]*wt3[k]; + pts[index++].weight = dJ*wt1[i]*wt2[j]*wt3[k]; } } } diff --git a/Numeric/GaussQuadratureHex.cpp b/Numeric/GaussQuadratureHex.cpp index c99e9c6cd7c00132dd55bcefca039c481966f3a9..9cf9205d43f5adf8bf0bc9199d785c93b177c606 100644 --- a/Numeric/GaussQuadratureHex.cpp +++ b/Numeric/GaussQuadratureHex.cpp @@ -80,15 +80,15 @@ IntPt *getGQHPts(int order) GQH[index] = new IntPt[n*n*n]; int l = 0; for(int i=0; i < n; i++) { - for(int j=0; j < n; j++) { - for(int k=0; k < n; k++) { - GQH[index][l].pt[0] = pt[i]; - GQH[index][l].pt[1] = pt[j]; - GQH[index][l].pt[2] = pt[k]; - GQH[index][l++].weight = wt[i]*wt[j]*wt[k]; - // printf ("%f %f %f %f\n",pt[i],pt[j],pt[k],wt[i]*wt[j]*wt[k]); - } - } + for(int j=0; j < n; j++) { + for(int k=0; k < n; k++) { + GQH[index][l].pt[0] = pt[i]; + GQH[index][l].pt[1] = pt[j]; + GQH[index][l].pt[2] = pt[k]; + GQH[index][l++].weight = wt[i]*wt[j]*wt[k]; + // printf ("%f %f %f %f\n",pt[i],pt[j],pt[k],wt[i]*wt[j]*wt[k]); + } + } } } return GQH[index]; diff --git a/Numeric/GaussQuadratureQuad.cpp b/Numeric/GaussQuadratureQuad.cpp index 9bbee0fbffc8618af357ee02032526a9e0ade951..7547a0ecc780b518871470bc0980a6590e46cb73 100644 --- a/Numeric/GaussQuadratureQuad.cpp +++ b/Numeric/GaussQuadratureQuad.cpp @@ -31,11 +31,11 @@ IntPt GQQ4[4] = { }; const double pq7[7] = {1.142857142857,0.595238095238,0.595238095238, - 0.416666666666,0.416666666666,0.416666666666,0.416666666666}; + 0.416666666666,0.416666666666,0.416666666666,0.416666666666}; const double xq7[7] = {0.0,-0.683130051064,0.683130051064,0.890654421782, - -0.890654421782,0.374256642286,-0.374256642286}; + -0.890654421782,0.374256642286,-0.374256642286}; const double yq7[7] = {0.0,-0.683130051064,0.683130051064,-0.374256642286,0.374256642286, - -0.890654421782,0.890654421782,}; + -0.890654421782,0.890654421782,}; IntPt GQQ7[7] = { { {xq7[0],yq7[0],0},pq7[0] }, { {xq7[1],yq7[1],0},pq7[1] }, @@ -70,15 +70,15 @@ IntPt GQQ9[9] = { const double a16 = 0.861136311594053; const double b16 = 0.339981043584856; const double xq16[16] = {-a16, -b16, b16, a16, -a16, -b16, b16, a16, - -a16, -b16, b16, a16, -a16, -b16, b16, a16}; + -a16, -b16, b16, a16, -a16, -b16, b16, a16}; const double yq16[16] = {-a16, -a16, -a16, -a16, -b16, -b16, -b16, -b16, - b16, b16, b16, b16, a16, a16, a16, a16}; + b16, b16, b16, b16, a16, a16, a16, a16}; const double pe2 = 0.347854845137454 * 0.347854845137454; const double pf2 = 0.652145154862546 * 0.652145154862546; const double pef = 0.347854845137454 * 0.652145154862546; double pq16[16] = { pe2, pef, pef, pe2, pef, pf2, pf2, pef, - pef, pf2, pf2, pef, pe2, pef, pef, pe2}; + pef, pf2, pf2, pef, pe2, pef, pef, pe2}; IntPt GQQ16[16] = { { {xq16[0],yq16[0],0},pq16[0] }, @@ -121,13 +121,13 @@ IntPt *getGQQPts(int order) GQQ[index] = new IntPt[n*n]; int k = 0; for(int i=0; i < n; i++) { - for(int j=0; j < n; j++) { - GQQ[index][k].pt[0] = pt[i]; - GQQ[index][k].pt[1] = pt[j]; - GQQ[index][k].pt[2] = 0.0; - GQQ[index][k++].weight = wt[i]*wt[j]; - // printf ("%f %f %f\n",pt[i],pt[j],wt[i]*wt[j]); - } + for(int j=0; j < n; j++) { + GQQ[index][k].pt[0] = pt[i]; + GQQ[index][k].pt[1] = pt[j]; + GQQ[index][k].pt[2] = 0.0; + GQQ[index][k++].weight = wt[i]*wt[j]; + // printf ("%f %f %f\n",pt[i],pt[j],wt[i]*wt[j]); + } } } return GQQ[index]; diff --git a/Numeric/GmshMatrix.cpp b/Numeric/GmshMatrix.cpp index 125933b37287302d7edc17dd1145aad81a6ab6c1..286df546a452f2a30e0d319a7a4c5ea9e7a17540 100644 --- a/Numeric/GmshMatrix.cpp +++ b/Numeric/GmshMatrix.cpp @@ -9,25 +9,33 @@ #include "GmshMatrix.h" #include "GmshMessage.h" +//#if defined(_MSC_VER) +//#define F77NAME(x) (x) +//#endif + +#if !defined(F77NAME) +#define F77NAME(x) (x##_) +#endif + #if defined(HAVE_BLAS) extern "C" { - void dgemm_(const char *transa, const char *transb, int *m, int *n, int *k, - double *alpha, double *a, int *lda, - double *b, int *ldb, double *beta, - double *c, int *ldc); - void zgemm_(const char *transa, const char *transb, int *m, int *n, int *k, - std::complex<double> *alpha, std::complex<double> *a, int *lda, - std::complex<double> *b, int *ldb, std::complex<double> *beta, - std::complex<double> *c, int *ldc); - void dgemv_(const char *trans, int *m, int *n, - double *alpha, double *a, int *lda, - double *x, int *incx, double *beta, - double *y, int *incy); - void zgemv_(const char *trans, int *m, int *n, - std::complex<double> *alpha, std::complex<double> *a, int *lda, - std::complex<double> *x, int *incx, std::complex<double> *beta, - std::complex<double> *y, int *incy); + void F77NAME(dgemm)(const char *transa, const char *transb, int *m, int *n, int *k, + double *alpha, double *a, int *lda, + double *b, int *ldb, double *beta, + double *c, int *ldc); + void F77NAME(zgemm)(const char *transa, const char *transb, int *m, int *n, int *k, + std::complex<double> *alpha, std::complex<double> *a, int *lda, + std::complex<double> *b, int *ldb, std::complex<double> *beta, + std::complex<double> *c, int *ldc); + void F77NAME(dgemv)(const char *trans, int *m, int *n, + double *alpha, double *a, int *lda, + double *x, int *incx, double *beta, + double *y, int *incy); + void F77NAME(zgemv)(const char *trans, int *m, int *n, + std::complex<double> *alpha, std::complex<double> *a, int *lda, + std::complex<double> *x, int *incx, std::complex<double> *beta, + std::complex<double> *y, int *incy); } template<> @@ -36,8 +44,8 @@ void gmshMatrix<double>::mult(const gmshMatrix<double> &b, gmshMatrix<double> &c int M = c.size1(), N = c.size2(), K = _c; int LDA = _r, LDB = b.size1(), LDC = c.size1(); double alpha = 1., beta = 0.; - dgemm_("N", "N", &M, &N, &K, &alpha, _data, &LDA, b._data, &LDB, - &beta, c._data, &LDC); + F77NAME(dgemm)("N", "N", &M, &N, &K, &alpha, _data, &LDA, b._data, &LDB, + &beta, c._data, &LDC); } template<> @@ -47,8 +55,8 @@ void gmshMatrix<std::complex<double> >::mult(const gmshMatrix<std::complex<doubl int M = c.size1(), N = c.size2(), K = _c; int LDA = _r, LDB = b.size1(), LDC = c.size1(); std::complex<double> alpha = 1., beta = 0.; - zgemm_("N", "N", &M, &N, &K, &alpha, _data, &LDA, b._data, &LDB, - &beta, c._data, &LDC); + F77NAME(zgemm)("N", "N", &M, &N, &K, &alpha, _data, &LDA, b._data, &LDB, + &beta, c._data, &LDC); } template<> @@ -57,8 +65,8 @@ void gmshMatrix<double>::gemm(gmshMatrix<double> &a, gmshMatrix<double> &b, { int M = size1(), N = size2(), K = a.size2(); int LDA = a.size1(), LDB = b.size1(), LDC = size1(); - dgemm_("N", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB, - &beta, _data, &LDC); + F77NAME(dgemm)("N", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB, + &beta, _data, &LDC); } template<> @@ -69,8 +77,8 @@ void gmshMatrix<std::complex<double> >::gemm(gmshMatrix<std::complex<double> > & { int M = size1(), N = size2(), K = a.size2(); int LDA = a.size1(), LDB = b.size1(), LDC = size1(); - zgemm_("N", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB, - &beta, _data, &LDC); + F77NAME(zgemm)("N", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB, + &beta, _data, &LDC); } template<> @@ -78,8 +86,8 @@ void gmshMatrix<double>::mult(const gmshVector<double> &x, gmshVector<double> &y { int M = _r, N = _c, LDA = _r, INCX = 1, INCY = 1; double alpha = 1., beta = 0.; - dgemv_("N", &M, &N, &alpha, _data, &LDA, x._data, &INCX, - &beta, y._data, &INCY); + F77NAME(dgemv)("N", &M, &N, &alpha, _data, &LDA, x._data, &INCX, + &beta, y._data, &INCY); } template<> @@ -88,8 +96,8 @@ void gmshMatrix<std::complex<double> >::mult(const gmshVector<std::complex<doubl { int M = _r, N = _c, LDA = _r, INCX = 1, INCY = 1; std::complex<double> alpha = 1., beta = 0.; - zgemv_("N", &M, &N, &alpha, _data, &LDA, x._data, &INCX, - &beta, y._data, &INCY); + F77NAME(zgemv)("N", &M, &N, &alpha, _data, &LDA, x._data, &INCX, + &beta, y._data, &INCY); } #endif @@ -97,21 +105,21 @@ void gmshMatrix<std::complex<double> >::mult(const gmshVector<std::complex<doubl #if defined(HAVE_LAPACK) extern "C" { - void dgesv_(int *N, int *nrhs, double *A, int *lda, int *ipiv, - double *b, int *ldb, int *info); - void dgetrf_(int *M, int *N, double *A, int *lda, int *ipiv, int *info); - void dgetri_(int *M, double *A, int *lda, int *ipiv, double *work, int *lwork, - int *info); - void dgesvd_(const char* jobu, const char *jobvt, int *M, int *N, - double *A, int *lda, double *S, double* U, int *ldu, - double *VT, int *ldvt, double *work, int *lwork, int *info); - void dgeev_(const char *jobvl, const char *jobvr, - int *n, double *a, int *lda, - double *wr, double *wi, - double *vl, int *ldvl, - double *vr, int *ldvr, - double *work, int *lwork, - int *info); + void F77NAME(dgesv)(int *N, int *nrhs, double *A, int *lda, int *ipiv, + double *b, int *ldb, int *info); + void F77NAME(dgetrf)(int *M, int *N, double *A, int *lda, int *ipiv, int *info); + void F77NAME(dgetri)(int *M, double *A, int *lda, int *ipiv, double *work, int *lwork, + int *info); + void F77NAME(dgesvd)(const char* jobu, const char *jobvt, int *M, int *N, + double *A, int *lda, double *S, double* U, int *ldu, + double *VT, int *ldvt, double *work, int *lwork, int *info); + void F77NAME(dgeev)(const char *jobvl, const char *jobvr, + int *n, double *a, int *lda, + double *wr, double *wi, + double *vl, int *ldvl, + double *vr, int *ldvr, + double *work, int *lwork, + int *info); } template<> @@ -121,10 +129,10 @@ bool gmshMatrix<double>::invertInPlace() int *ipiv = new int[N]; double * invA = new double[N*N]; - for (size_t i = 0; i < N * N; i++) invA[i] = 0.; - for (size_t i = 0; i < N; i++) invA[i * N + i] = 1.; + for (int i = 0; i < N * N; i++) invA[i] = 0.; + for (int i = 0; i < N; i++) invA[i * N + i] = 1.; - dgesv_(&N, &nrhs, _data, &lda, ipiv, invA, &ldb, &info); + F77NAME(dgesv)(&N, &nrhs, _data, &lda, ipiv, invA, &ldb, &info); memcpy(_data, invA, N * N * sizeof(double)); delete [] invA; @@ -140,22 +148,16 @@ bool gmshMatrix<double>::invertInPlace() template<> -bool gmshMatrix<double>::eig(gmshMatrix<double> &VL, // left eigenvectors - gmshVector<double> &DR, // Real part of eigenvalues - gmshVector<double> &DI, // Im part of eigenvalues - gmshMatrix<double> &VR, - bool sortRealPart) // if true: sorted from min '|DR|' to max '|DR|' +bool gmshMatrix<double>::eig(gmshMatrix<double> &VL, gmshVector<double> &DR, + gmshVector<double> &DI, gmshMatrix<double> &VR, + bool sortRealPart) { int N = size1(), info; - int LWORK = 10*N; - double * work = new double[LWORK]; + int LWORK = 10 * N; + double *work = new double[LWORK]; - dgeev_("V","V", - &N,_data, - &N,DR._data,DI._data, - VL._data,&N, - VR._data,&N, - work,&LWORK,&info); + F77NAME(dgeev)("V", "V", &N, _data, &N, DR._data, DI._data, + VL._data, &N, VR._data, &N, work, &LWORK, &info); delete [] work; @@ -167,37 +169,36 @@ bool gmshMatrix<double>::eig(gmshMatrix<double> &VL, // left eigenvectors if (sortRealPart) { double tmp[8]; // do permutations - for (int i=0; i<(size1()-1); i++) { + for (int i = 0; i < size1() - 1; i++) { int minR = i; - for (int j=i+1; j<size1(); j++) if ( fabs(DR(j)) < fabs(DR(minR)) ) minR = j; - if ( minR != i ) - { - tmp[0] = DR(i); tmp[1] = DI(i); - tmp[2] = VL(0,i); tmp[3] = VL(1,i); tmp[4] = VL(2,i); - tmp[5] = VR(0,i); tmp[6] = VR(1,i); tmp[7] = VR(2,i); + for (int j = i + 1; j < size1(); j++) + if (fabs(DR(j)) < fabs(DR(minR))) minR = j; + if ( minR != i ){ + tmp[0] = DR(i); tmp[1] = DI(i); + tmp[2] = VL(0,i); tmp[3] = VL(1,i); tmp[4] = VL(2,i); + tmp[5] = VR(0,i); tmp[6] = VR(1,i); tmp[7] = VR(2,i); - DR(i) = DR(minR); DI(i) = DI(minR); - VL(0,i) = VL(0,minR); VL(1,i) = VL(1,minR); VL(2,i) = VL(2,minR); - VR(0,i) = VR(0,minR); VR(1,i) = VR(1,minR); VR(2,i) = VR(2,minR); + DR(i) = DR(minR); DI(i) = DI(minR); + VL(0,i) = VL(0,minR); VL(1,i) = VL(1,minR); VL(2,i) = VL(2,minR); + VR(0,i) = VR(0,minR); VR(1,i) = VR(1,minR); VR(2,i) = VR(2,minR); - DR(minR) = tmp[0]; DI(minR) = tmp[1]; - VL(0,minR) = tmp[2]; VL(1,minR) = tmp[3]; VL(2,minR) = tmp[4]; - VR(0,minR) = tmp[5]; VR(1,minR) = tmp[6]; VR(2,minR) = tmp[7]; - } + DR(minR) = tmp[0]; DI(minR) = tmp[1]; + VL(0,minR) = tmp[2]; VL(1,minR) = tmp[3]; VL(2,minR) = tmp[4]; + VR(0,minR) = tmp[5]; VR(1,minR) = tmp[6]; VR(2,minR) = tmp[7]; + } } } - + return true; } - template<> bool gmshMatrix<double>::lu_solve(const gmshVector<double> &rhs, gmshVector<double> &result) { int N = size1(), nrhs = 1, lda = N, ldb = N, info; int *ipiv = new int[N]; for(int i = 0; i < N; i++) result(i) = rhs(i); - dgesv_(&N, &nrhs, _data, &lda, ipiv, result._data, &ldb, &info); + F77NAME(dgesv)(&N, &nrhs, _data, &lda, ipiv, result._data, &ldb, &info); delete [] ipiv; if(info == 0) return true; if(info > 0) @@ -213,11 +214,11 @@ bool gmshMatrix<double>::invert(gmshMatrix<double> &result) int M = size1(), N = size2(), lda = size1(), info; int *ipiv = new int[std::min(M, N)]; result = *this; - dgetrf_(&M, &N, result._data, &lda, ipiv, &info); + F77NAME(dgetrf)(&M, &N, result._data, &lda, ipiv, &info); if(info == 0){ int lwork = M * 4; double *work = new double[lwork]; - dgetri_(&M, result._data, &lda, ipiv, work, &lwork, &info); + F77NAME(dgetri)(&M, result._data, &lda, ipiv, work, &lwork, &info); delete [] work; } delete [] ipiv; @@ -235,7 +236,7 @@ double gmshMatrix<double>::determinant() const gmshMatrix<double> tmp(*this); int M = size1(), N = size2(), lda = size1(), info; int *ipiv = new int[std::min(M, N)]; - dgetrf_(&M, &N, tmp._data, &lda, ipiv, &info); + F77NAME(dgetrf)(&M, &N, tmp._data, &lda, ipiv, &info); double det = 1.; if(info == 0){ for(int i = 0; i < size1(); i++){ @@ -258,8 +259,8 @@ bool gmshMatrix<double>::svd(gmshMatrix<double> &V, gmshVector<double> &S) int M = size1(), N = size2(), LDA = size1(), LDVT = VT.size1(), info; int LWORK = std::max(3 * std::min(M, N) + std::max(M, N), 5 * std::min(M, N)); gmshVector<double> WORK(LWORK); - dgesvd_("O", "A", &M, &N, _data, &LDA, S._data, _data, &LDA, - VT._data, &LDVT, WORK._data, &LWORK, &info); + F77NAME(dgesvd)("O", "A", &M, &N, _data, &LDA, S._data, _data, &LDA, + VT._data, &LDVT, WORK._data, &LWORK, &info); V = VT.transpose(); if(info == 0) return true; if(info > 0) diff --git a/Numeric/GmshMatrix.h b/Numeric/GmshMatrix.h index a2d9ca46b2c8f2c809ea6b647fbea41d85b7e293..cc2dcfd53bd2111a616dc4ffa92d5021b18215cf 100644 --- a/Numeric/GmshMatrix.h +++ b/Numeric/GmshMatrix.h @@ -163,7 +163,7 @@ class gmshMatrix { for(int i = 0; i < size1(); i++) for(int j = 0; j < size2(); j++) - (*this)(i, j) += m(i, j); + (*this)(i, j) += m(i, j); } void mult(const gmshVector<scalar> &x, gmshVector<scalar> &y) #if !defined(HAVE_BLAS) @@ -213,9 +213,9 @@ class gmshMatrix #endif ; bool eig(gmshMatrix<scalar> &VL, // left eigenvectors - gmshVector<double> &DR, // Real part of eigenvalues - gmshVector<double> &DI, // Im part of eigen - gmshMatrix<scalar> &VR, + gmshVector<double> &DR, // Real part of eigenvalues + gmshVector<double> &DI, // Im part of eigen + gmshMatrix<scalar> &VR, bool sortRealPart=false) // if true: sorted from min 'DR' to max 'DR' #if !defined(HAVE_LAPACK) { @@ -239,8 +239,8 @@ class gmshMatrix gmshMatrix<scalar> cof(ni - 1, nj - 1); for(int I = 0; I < ni; I++){ for(int J = 0; J < nj; J++){ - if(J != j && I != i) - cof(I < i ? I : I - 1, J < j ? J : J - 1) = (*this)(I, J); + if(J != j && I != i) + cof(I < i ? I : I - 1, J < j ? J : J - 1) = (*this)(I, J); } } return cof; diff --git a/Numeric/Makefile b/Numeric/Makefile deleted file mode 100644 index e3cf870075fa646fa4e5fb5d338361b43dae2627..0000000000000000000000000000000000000000 --- a/Numeric/Makefile +++ /dev/null @@ -1,165 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshNumeric${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Numeric ${DASH}I../Geo ${DASH}I../contrib/gmm - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Numeric.cpp\ - GmshMatrix.cpp\ - gmshLaplace.cpp\ - gmshConvexCombination.cpp\ - gmshHelmholtz.cpp\ - gmshElasticity.cpp\ - gmshProjection.cpp\ - gmshLinearSystemCSR.cpp\ - EigSolve.cpp\ - FunctionSpace.cpp\ - GaussQuadratureLin.cpp\ - GaussQuadratureTri.cpp\ - GaussQuadratureQuad.cpp\ - GaussQuadratureTet.cpp\ - GaussQuadratureHex.cpp\ - GaussLegendreSimplex.cpp\ - GmshPredicates.cpp\ - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -# Don't optimize J. Shewchuk's predicates. Otherwise, Gmsh may not -# work properly. -GmshPredicates${OBJEXT}: - ${CXX} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}c GmshPredicates.cpp - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Numeric${OBJEXT}: Numeric.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - Numeric.h GmshMatrix.h -GmshMatrix${OBJEXT}: GmshMatrix.cpp ../Common/GmshConfig.h GmshMatrix.h \ - ../Common/GmshMessage.h -gmshLaplace${OBJEXT}: gmshLaplace.cpp gmshLaplace.h gmshTermOfFormulation.h \ - GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - gmshFunction.h gmshAssembler.h gmshLinearSystem.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Gmsh.h \ - ../Common/GmshMessage.h Numeric.h -gmshConvexCombination${OBJEXT}: gmshConvexCombination.cpp \ - gmshConvexCombination.h gmshTermOfFormulation.h GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h gmshFunction.h \ - gmshAssembler.h gmshLinearSystem.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Gmsh.h \ - ../Common/GmshMessage.h Numeric.h -gmshHelmholtz${OBJEXT}: gmshHelmholtz.cpp gmshHelmholtz.h \ - gmshTermOfFormulation.h GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gmshFunction.h gmshAssembler.h \ - gmshLinearSystem.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Common/Gmsh.h ../Common/GmshMessage.h Numeric.h -gmshElasticity${OBJEXT}: gmshElasticity.cpp gmshElasticity.h \ - gmshTermOfFormulation.h GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gmshFunction.h gmshAssembler.h \ - gmshLinearSystem.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Common/Gmsh.h ../Common/GmshMessage.h Numeric.h -gmshProjection${OBJEXT}: gmshProjection.cpp gmshProjection.h \ - gmshTermOfFormulation.h GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gmshFunction.h gmshAssembler.h \ - gmshLinearSystem.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Common/Gmsh.h ../Common/GmshMessage.h Numeric.h -gmshLinearSystemCSR${OBJEXT}: gmshLinearSystemCSR.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h gmshLinearSystemCSR.h gmshLinearSystem.h -EigSolve${OBJEXT}: EigSolve.cpp -FunctionSpace${OBJEXT}: FunctionSpace.cpp FunctionSpace.h GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/GmshDefines.h -GaussQuadratureLin${OBJEXT}: GaussQuadratureLin.cpp Gauss.h GaussLegendre1D.h -GaussQuadratureTri${OBJEXT}: GaussQuadratureTri.cpp Gauss.h GaussLegendre1D.h -GaussQuadratureQuad${OBJEXT}: GaussQuadratureQuad.cpp Gauss.h GaussLegendre1D.h -GaussQuadratureTet${OBJEXT}: GaussQuadratureTet.cpp Gauss.h GaussLegendre1D.h -GaussQuadratureHex${OBJEXT}: GaussQuadratureHex.cpp Gauss.h GaussLegendre1D.h -GaussLegendreSimplex${OBJEXT}: GaussLegendreSimplex.cpp Gauss.h \ - GaussLegendre1D.h -GmshPredicates${OBJEXT}: GmshPredicates.cpp diff --git a/Numeric/Numeric.cpp b/Numeric/Numeric.cpp index 14004b233ed7b26bd76428626cc9b94501e9e967..28e263a372a779d09a67c54d4f5a3bcc990a6443 100644 --- a/Numeric/Numeric.cpp +++ b/Numeric/Numeric.cpp @@ -551,9 +551,9 @@ bool newton_fd(void (*func)(gmshVector<double> &, gmshVector<double> &, void *), bool isZero = false; for (int k=0; k<N; k++) { - if (f(k) == 0. ) isZero = true; - else isZero = false; - if (isZero == false) break; + if (f(k) == 0. ) isZero = true; + else isZero = false; + if (isZero == false) break; } if (isZero) break; //printf("**** fffffff0=%g %g %g %g %g %g %g %g %g\n", f(0), f(1), f(2), f(3), f(4), f(5), f(6), f(7), f(8)); @@ -636,20 +636,20 @@ void gmshLineSearch(double (*func)(gmshVector<double> &, void *), void* data, else if (f <= fold + ALF*alam*slope) return; else { if (alam == 1.0) - tmplam = -slope/(2.0*(f-fold-slope)); + tmplam = -slope/(2.0*(f-fold-slope)); else { - rhs1 = f-fold-alam*slope; - rhs2=f2-fold2-alam2*slope; - const double a=(rhs1/(alam*alam)-rhs2/(alam2*alam2))/(alam-alam2); - const double b=(-alam2*rhs1/(alam*alam)+alam*rhs2/(alam2*alam2))/(alam-alam2); - if (a == 0.0) tmplam = -slope/(2.0*b); - else { - const double disc=b*b-3.0*a*slope; - if (disc<0.0) Msg::Error("Roundoff problem in gmshLineSearch."); - else tmplam=(-b+sqrt(disc))/(3.0*a); - } - if (tmplam>0.5*alam) - tmplam=0.5*alam; + rhs1 = f-fold-alam*slope; + rhs2=f2-fold2-alam2*slope; + const double a=(rhs1/(alam*alam)-rhs2/(alam2*alam2))/(alam-alam2); + const double b=(-alam2*rhs1/(alam*alam)+alam*rhs2/(alam2*alam2))/(alam-alam2); + if (a == 0.0) tmplam = -slope/(2.0*b); + else { + const double disc=b*b-3.0*a*slope; + if (disc<0.0) Msg::Error("Roundoff problem in gmshLineSearch."); + else tmplam=(-b+sqrt(disc))/(3.0*a); + } + if (tmplam>0.5*alam) + tmplam=0.5*alam; } } alam2=alam; @@ -660,7 +660,7 @@ void gmshLineSearch(double (*func)(gmshVector<double> &, void *), void* data, } double minimize_grad_fd (double (*func)(gmshVector<double> &, void *), - gmshVector<double> &x, void *data) + gmshVector<double> &x, void *data) { const int MAXIT = 3; const double EPS = 1.e-4; diff --git a/Numeric/Numeric.h b/Numeric/Numeric.h index ba4e0deb72467f8a0ee8d1eb81b56f59518adef8..fd672af9cd16ea130b2189a6e2383e8fc06c99c0 100644 --- a/Numeric/Numeric.h +++ b/Numeric/Numeric.h @@ -75,6 +75,6 @@ void invert_singular_matrix3x3(double MM[3][3], double II[3][3]); bool newton_fd(void (*func)(gmshVector<double> &, gmshVector<double> &, void *), gmshVector<double> &x, void *data, double relax=1., double tolx=1.e-6); double minimize_grad_fd (double (*func)(gmshVector<double> &, void *), - gmshVector<double> &x, void *data); + gmshVector<double> &x, void *data); #endif diff --git a/Numeric/gmshAssembler.h b/Numeric/gmshAssembler.h index 88bc5646d61f0e19ab6608a85e7ac19c2d200e15..fb346bc98cd331fe7ea34264153567024f51d2ab 100644 --- a/Numeric/gmshAssembler.h +++ b/Numeric/gmshAssembler.h @@ -95,20 +95,20 @@ class gmshAssembler { { std::map<gmshDofKey, int>::const_iterator it = numbering.find(key); if (it != numbering.end()) - return lsys->getFromSolution(it->second); + return lsys->getFromSolution(it->second); } { typename std::map<gmshDofKey, std::vector<std::pair<gmshDofKey, scalar> > >:: const_iterator itConstr = constraints.find(key); if (itConstr != constraints.end()){ - scalar val = 0.; - for (unsigned int i = 0; i < itConstr->second.size(); i++){ - const gmshDofKey &dofKeyConstr = itConstr->second[i].first; - scalar valConstr = itConstr->second[i].second; - val += getDofValue(dofKeyConstr.v, dofKeyConstr.comp, dofKeyConstr.field) - * valConstr; - } - return val; + scalar val = 0.; + for (unsigned int i = 0; i < itConstr->second.size(); i++){ + const gmshDofKey &dofKeyConstr = itConstr->second[i].first; + scalar valConstr = itConstr->second[i].second; + val += getDofValue(dofKeyConstr.v, dofKeyConstr.comp, dofKeyConstr.field) + * valConstr; + } + return val; } } return 0.0; diff --git a/Numeric/gmshConvexCombination.cpp b/Numeric/gmshConvexCombination.cpp index f92817a461b4c63986b6e34fe157250a0b1048a8..f960e4bed014dc6c36e587bb1749833fb423fc38 100644 --- a/Numeric/gmshConvexCombination.cpp +++ b/Numeric/gmshConvexCombination.cpp @@ -8,21 +8,18 @@ void gmshConvexCombinationTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const { - - m.set_all(0.); - int nbNodes = e->getNumVertices(); - //double x = 0.3*(e->getVertex(0)->x()+e->getVertex(1)->x()+e->getVertex(2)->x()); - //double y = 0.3*(e->getVertex(0)->y()+e->getVertex(1)->y()+e->getVertex(2)->y()); - //double z = 0.3*(e->getVertex(0)->z()+e->getVertex(1)->z()+e->getVertex(2)->z()); - //const double _diff = (*_diffusivity)(x, y, z); - const double _diff = 1.0; - - - for (int j = 0; j < nbNodes; j++){ - for (int k = 0; k < nbNodes; k++){ - m(j,k) = -1.*_diff; - } - m(j,j) = (nbNodes-1)*_diff; - } + m.set_all(0.); + int nbNodes = e->getNumVertices(); + //double x = 0.3*(e->getVertex(0)->x()+e->getVertex(1)->x()+e->getVertex(2)->x()); + //double y = 0.3*(e->getVertex(0)->y()+e->getVertex(1)->y()+e->getVertex(2)->y()); + //double z = 0.3*(e->getVertex(0)->z()+e->getVertex(1)->z()+e->getVertex(2)->z()); + const double _diff = 1.0; + + for (int j = 0; j < nbNodes; j++){ + for (int k = 0; k < nbNodes; k++){ + m(j,k) = -1.*_diff; + } + m(j,j) = (nbNodes-1)*_diff; + } } diff --git a/Numeric/gmshHelmholtz.cpp b/Numeric/gmshHelmholtz.cpp index eaf52c7ef211c8835c5bfa5ecdce2d3449dcfafa..d78bb53b6ab0fa7552365e841c7d7d2105b3530e 100644 --- a/Numeric/gmshHelmholtz.cpp +++ b/Numeric/gmshHelmholtz.cpp @@ -41,7 +41,7 @@ void gmshHelmholtzTerm::elementMatrix(MElement *e, } for (int j = 0; j < nbNodes; j++){ for (int k = 0; k < nbNodes; k++){ - m(j, k) += ((Grads[j][0] * Grads[k][0] + + m(j, k) += ((Grads[j][0] * Grads[k][0] + Grads[j][1] * Grads[k][1] + Grads[j][2] * Grads[k][2]) - kk * kk * sf[j] * sf[k]) * weight * detJ; diff --git a/Numeric/gmshLaplace.cpp b/Numeric/gmshLaplace.cpp index 2ae3e3481e4a88a409c7988dd578f72422527392..63550e4744a76699f252ce8c4e2fb80083e0edca 100644 --- a/Numeric/gmshLaplace.cpp +++ b/Numeric/gmshLaplace.cpp @@ -37,13 +37,12 @@ void gmshLaplaceTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const Grads[j][2] = invjac[2][0] * grads[j][0] + invjac[2][1] * grads[j][1] + invjac[2][2] * grads[j][2]; } - double pi = 3.14; - double K_x= 1.0; + double K_x=1.0; double K_y=1.0; double K_z=1.0; for (int j = 0; j < nbNodes; j++){ for (int k = 0; k <= j; k++){ - m(j, k) += (K_x*Grads[j][0] * Grads[k][0] + + m(j, k) += (K_x*Grads[j][0] * Grads[k][0] + K_y*Grads[j][1] * Grads[k][1] + K_z*Grads[j][2] * Grads[k][2]) * weight * detJ * _diff; } @@ -53,7 +52,6 @@ void gmshLaplaceTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const for (int j = 0; j < nbNodes; j++) for (int k = 0; k < j; k++) m(k, j) = m(j, k); - } void gmshLaplaceTerm2DParametric::elementMatrix(MElement *e, gmshMatrix<double> &m) const diff --git a/Numeric/gmshLinearSystemCSR.cpp b/Numeric/gmshLinearSystemCSR.cpp index 9cf1c1b51eeb9fc4c8c2a6730de5c7e8702fe10c..410ca4324724eec37462343819e923514d435ea1 100644 --- a/Numeric/gmshLinearSystemCSR.cpp +++ b/Numeric/gmshLinearSystemCSR.cpp @@ -4,21 +4,9 @@ #include <stdlib.h> #include <string.h> - - #define SWAP(a,b) temp=(a);(a)=(b);(b)=temp; #define SWAPI(a,b) tempi=(a);(a)=(b);(b)=tempi; -// #if defined(HAVE_TAUCS) -// #include "taucs.h" -// #endif - -// #if defined(HAVE_GMM) -// #include <gmm.h> -// #include <gmm_interface.h> -// #endif - - void *CSRMalloc(size_t size) { void *ptr; @@ -134,7 +122,7 @@ void gmshLinearSystemCSR<double> :: allocate(int _nbRows) } const int NSTACK = 50; -const int M_sort2 = 7; +const unsigned int M_sort2 = 7; static void free_ivector(int *v, long nl, long nh){ // free an int vector allocated with ivector() @@ -169,22 +157,22 @@ void _sort2_xkws (unsigned long n, double arr[], INDEX_TYPE ai[] , INDEX_TYPE aj for (;;) { if (ir-l < M_sort2) { for (j=l+1;j<=ir;j++) { - a=arr[j -1]; - b=ai[j -1]; - c=aj[j -1]; - for (i=j-1;i>=1;i--) { - if (cmpij(ai[i -1],aj[i -1],b,c) <= 0) break; - arr[i+1 -1]=arr[i -1]; - ai[i+1 -1]=ai[i -1]; - aj[i+1 -1]=aj[i -1]; - } - arr[i+1 -1]=a; - ai[i+1 -1]=b; - aj[i+1 -1]=c; + a=arr[j -1]; + b=ai[j -1]; + c=aj[j -1]; + for (i=j-1;i>=1;i--) { + if (cmpij(ai[i -1],aj[i -1],b,c) <= 0) break; + arr[i+1 -1]=arr[i -1]; + ai[i+1 -1]=ai[i -1]; + aj[i+1 -1]=aj[i -1]; + } + arr[i+1 -1]=a; + ai[i+1 -1]=b; + aj[i+1 -1]=c; } if (!jstack) { - free_ivector(istack,1,NSTACK); - return; + free_ivector(istack,1,NSTACK); + return; } ir=istack[jstack]; l=istack[jstack-1]; @@ -196,19 +184,19 @@ void _sort2_xkws (unsigned long n, double arr[], INDEX_TYPE ai[] , INDEX_TYPE aj SWAPI(ai[k -1],ai[l+1 -1]) SWAPI(aj[k -1],aj[l+1 -1]) if (cmpij(ai[l+1 -1],aj[l+1 -1],ai[ir -1],aj[ir -1])>0){ - SWAP(arr[l+1 -1],arr[ir -1]) - SWAPI(ai[l+1 -1],ai[ir -1]) - SWAPI(aj[l+1 -1],aj[ir -1]) + SWAP(arr[l+1 -1],arr[ir -1]) + SWAPI(ai[l+1 -1],ai[ir -1]) + SWAPI(aj[l+1 -1],aj[ir -1]) } if (cmpij(ai[l -1],aj[l -1],ai[ir -1],aj[ir -1])>0){ - SWAP(arr[l -1],arr[ir -1]) - SWAPI(ai[l -1],ai[ir -1]) - SWAPI(aj[l -1],aj[ir -1]) + SWAP(arr[l -1],arr[ir -1]) + SWAPI(ai[l -1],ai[ir -1]) + SWAPI(aj[l -1],aj[ir -1]) } if (cmpij(ai[l+1 -1],aj[l+1 -1],ai[l -1],aj[l -1])>0){ - SWAP(arr[l+1 -1],arr[l -1]) - SWAPI(ai[l+1 -1],ai[l -1]) - SWAPI(aj[l+1 -1],aj[l -1]) + SWAP(arr[l+1 -1],arr[l -1]) + SWAPI(ai[l+1 -1],ai[l -1]) + SWAPI(aj[l+1 -1],aj[l -1]) } i=l+1; j=ir; @@ -216,13 +204,13 @@ void _sort2_xkws (unsigned long n, double arr[], INDEX_TYPE ai[] , INDEX_TYPE aj b=ai[l -1]; c=aj[l -1]; for (;;) { - do i++; while (cmpij(ai[i -1],aj[i -1],b,c) < 0); - do j--; while (cmpij(ai[j -1],aj[j -1],b,c) > 0); - if (j < i) break; - SWAP(arr[i -1],arr[j -1]) - SWAPI(ai[i -1],ai[j -1]) - SWAPI(aj[i -1],aj[j -1]) - } + do i++; while (cmpij(ai[i -1],aj[i -1],b,c) < 0); + do j--; while (cmpij(ai[j -1],aj[j -1],b,c) > 0); + if (j < i) break; + SWAP(arr[i -1],arr[j -1]) + SWAPI(ai[i -1],ai[j -1]) + SWAPI(aj[i -1],aj[j -1]) + } arr[l -1]=arr[j -1]; arr[j -1]=a; ai[l -1]=ai[j -1]; @@ -231,18 +219,18 @@ void _sort2_xkws (unsigned long n, double arr[], INDEX_TYPE ai[] , INDEX_TYPE aj aj[j -1]=c; jstack += 2; if (jstack > NSTACK) { - Msg::Fatal("NSTACK too small while sorting the columns of the matrix"); - throw; + Msg::Fatal("NSTACK too small while sorting the columns of the matrix"); + throw; } if (ir-i+1 >= j-l) { - istack[jstack]=ir; - istack[jstack-1]=i; - ir=j-1; + istack[jstack]=ir; + istack[jstack-1]=i; + ir=j-1; } else { - istack[jstack]=j-1; - istack[jstack-1]=l; - l=i; + istack[jstack]=j-1; + istack[jstack-1]=l; + l=i; } } } @@ -250,11 +238,11 @@ void _sort2_xkws (unsigned long n, double arr[], INDEX_TYPE ai[] , INDEX_TYPE aj template <class scalar> void sortColumns (int NbLines, - int nnz, - INDEX_TYPE *ptr, - INDEX_TYPE *jptr, - INDEX_TYPE *ai, - scalar *a) { + int nnz, + INDEX_TYPE *ptr, + INDEX_TYPE *jptr, + INDEX_TYPE *ai, + scalar *a) { // replace pointers by lines int *count = new int [NbLines]; @@ -301,9 +289,9 @@ int gmshLinearSystemCSRGmm<double> :: systemSolve() sorted = true; gmm::csr_matrix_ref<double*,INDEX_TYPE *,INDEX_TYPE *, 0> ref((double*) a_->array, - (INDEX_TYPE *) ai_->array, - (INDEX_TYPE *) jptr_->array, - _b->size(), _b->size()); + (INDEX_TYPE *) ai_->array, + (INDEX_TYPE *) jptr_->array, + _b->size(), _b->size()); gmm::csr_matrix<double,0> M; M.init_with(ref); @@ -331,7 +319,7 @@ int gmshLinearSystemCSRGmm<double> :: checkSystem() sorted = true; printf("Coucou check system \n"); - for (int i=0;i<_b->size();i++) + for (unsigned int i = 0; i < _b->size(); i++) printf("%d ",((INDEX_TYPE *) jptr_->array)[i]); printf("\n"); @@ -360,8 +348,8 @@ int gmshLinearSystemCSRTaucs<double> :: systemSolve() myVeryCuteTaucsMatrix.values.d = (double*) a_->array; char* options[] = { "taucs.factor.LLT=true", NULL }; int result = taucs_linsolve(&myVeryCuteTaucsMatrix, - NULL, 1, &(*_x)[0],&(*_b)[0], - options,NULL); + NULL, 1, &(*_x)[0],&(*_b)[0], + options,NULL); if (result != TAUCS_SUCCESS){ Msg::Error("Taucs Was Not Successfull"); } diff --git a/Numeric/gmshLinearSystemCSR.h b/Numeric/gmshLinearSystemCSR.h index 386a17be6d8ed1c5d924528ca2ae2d1b38587b26..9933fb3fec09c2b1f58efe1188bb531f68c7299e 100644 --- a/Numeric/gmshLinearSystemCSR.h +++ b/Numeric/gmshLinearSystemCSR.h @@ -37,7 +37,7 @@ class gmshLinearSystemCSR : public gmshLinearSystem<scalar> { std::vector<scalar> *_b, *_x; public: gmshLinearSystemCSR() - : a_(0),sorted(false) {} + : sorted(false), a_(0) {} virtual bool isAllocated() const { return a_ != 0; } virtual void allocate(int) ; virtual ~gmshLinearSystemCSR() @@ -57,13 +57,13 @@ class gmshLinearSystemCSR : public gmshLinearSystem<scalar> { if(something[il]) { while(1){ - if(ai[position_] == ic){ - a[position_] += val; - // if (il == 0) printf("FOUND %d %d %d\n",il,ic,position_); - return; - } - if (ptr[position_] == 0)break; - position_ = ptr[position_]; + if(ai[position_] == ic){ + a[position_] += val; + // if (il == 0) printf("FOUND %d %d %d\n",il,ic,position_); + return; + } + if (ptr[position_] == 0)break; + position_ = ptr[position_]; } } @@ -143,6 +143,7 @@ class gmshLinearSystemCSRGmm : public gmshLinearSystemCSR<scalar> { #else { Msg::Error("Gmm++ is not available in this version of Gmsh"); + return 0; } #endif virtual int checkSystem() @@ -170,6 +171,7 @@ class gmshLinearSystemCSRTaucs : public gmshLinearSystemCSR<scalar> { #else { Msg::Error("Taucs is not available in this version of Gmsh"); + return 0; } #endif }; diff --git a/Numeric/gmshProjection.cpp b/Numeric/gmshProjection.cpp index c3fdf746e0552aae938a4226afb82f7c9624f864..231e50b15b3379572b7061eb7ff5919d718b6948 100644 --- a/Numeric/gmshProjection.cpp +++ b/Numeric/gmshProjection.cpp @@ -26,7 +26,7 @@ void gmshProjectionTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const e->getShapeFunctions(u, v, w, sf); for (int j = 0; j < nbNodes; j++){ for (int k = 0; k < nbNodes; k++){ - m(j, k) += sf[j] * sf[k] * weight * detJ; + m(j, k) += sf[j] * sf[k] * weight * detJ; } } } diff --git a/Numeric/gmshTermOfFormulation.h b/Numeric/gmshTermOfFormulation.h index fec73887a0bed4d9340ea174353ea13c72c9d0b5..b2f5d4170c0b8e3b37c76b54a9c0c56d54b298da 100644 --- a/Numeric/gmshTermOfFormulation.h +++ b/Numeric/gmshTermOfFormulation.h @@ -102,11 +102,11 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { } } void addDirichlet(int physical, - int dim, - int comp, - int field, - const gmshFunction<scalar> &e, - gmshAssembler<scalar> &lsys) + int dim, + int comp, + int field, + const gmshFunction<scalar> &e, + gmshAssembler<scalar> &lsys) { std::vector<MVertex *> v; GModel *m = gmshTermOfFormulation<scalar>::_gm; @@ -115,11 +115,11 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { lsys.fixVertex(v[i], comp, field, e(v[i]->x(), v[i]->y(), v[i]->z())); } void addNeumann(int physical, - int dim, - int comp, - int field, - const gmshFunction<scalar> &fct, - gmshAssembler<scalar> &lsys) + int dim, + int comp, + int field, + const gmshFunction<scalar> &fct, + gmshAssembler<scalar> &lsys) { std::map<int, std::vector<GEntity*> > groups[4]; GModel *m = gmshTermOfFormulation<scalar>::_gm; @@ -139,17 +139,17 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { IntPt *GP; e->getIntegrationPoints(integrationOrder, &npts, &GP); for (int ip = 0; ip < npts; ip++){ - const double u = GP[ip].pt[0]; - const double v = GP[ip].pt[1]; - const double w = GP[ip].pt[2]; - const double weight = GP[ip].weight; - const double detJ = e->getJacobian(u, v, w, jac); + const double u = GP[ip].pt[0]; + const double v = GP[ip].pt[1]; + const double w = GP[ip].pt[2]; + const double weight = GP[ip].weight; + const double detJ = e->getJacobian(u, v, w, jac); SPoint3 p; e->pnt(u, v, w, p); e->getShapeFunctions(u, v, w, sf); - const scalar FCT = fct(p.x(), p.y(), p.z()); - for (int k = 0; k < nbNodes; k++){ - lsys.assemble(e->getVertex(k), comp, field, detJ * weight * sf[k] * FCT); - } + const scalar FCT = fct(p.x(), p.y(), p.z()); + for (int k = 0; k < nbNodes; k++){ + lsys.assemble(e->getVertex(k), comp, field, detJ * weight * sf[k] * FCT); + } } } } @@ -158,12 +158,12 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { GModel *m = gmshTermOfFormulation<scalar>::_gm; if (m->getNumRegions()){ for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it){ - addToRightHandSide(lsys,*it); + addToRightHandSide(lsys,*it); } } else if(m->getNumFaces()){ for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){ - addToRightHandSide(lsys,*it); + addToRightHandSide(lsys,*it); } } } @@ -175,9 +175,9 @@ class gmshNodalFemTerm : public gmshTermOfFormulation<scalar> { elementVector (e, V); // assembly for (int j=0;j<nbR;j++){ - MVertex *vR;int iCompR,iFieldR; - getLocalDofR (e,j,&vR,&iCompR,&iFieldR); - lsys.assemble(vR,iCompR,iFieldR,V(j)); + MVertex *vR;int iCompR,iFieldR; + getLocalDofR (e,j,&vR,&iCompR,&iFieldR); + lsys.assemble(vR,iCompR,iFieldR,V(j)); } } } diff --git a/contrib/ANN/Makefile b/Parser/CMakeLists.txt similarity index 52% rename from contrib/ANN/Makefile rename to Parser/CMakeLists.txt index b7cb9a0e55569826907ba3f513b55d32fb07aebd..2ea7c818a8a863f4ff04224eece990696ea0447a 100644 --- a/contrib/ANN/Makefile +++ b/Parser/CMakeLists.txt @@ -3,16 +3,10 @@ # See the LICENSE.txt file for license information. Please report all # bugs and problems to <gmsh@geuz.org>. -include ../../variables +set(SRC + Gmsh.tab.cpp + Gmsh.yy.cpp + FunctionManager.cpp +) -default: - @cd src && ${MAKE} - -cpobj: - @cd src && ${MAKE} cpobj - -clean: - @cd src && ${MAKE} clean - -depend: - @cd src && ${MAKE} depend +append_gmsh_src(Parser "${SRC}") diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index f1d0ecbab25401a43556f90257c99968f8a67dd5..42e06170edcced89ca62a9eafcf1fb130fd24f94 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -987,32 +987,32 @@ static const yytype_uint16 yyrline[] = 842, 848, 868, 889, 915, 927, 944, 948, 959, 962, 975, 978, 988, 1012, 1011, 1031, 1053, 1071, 1089, 1119, 1149, 1169, 1187, 1205, 1231, 1249, 1248, 1271, 1289, 1328, - 1334, 1340, 1347, 1372, 1397, 1414, 1413, 1434, 1452, 1480, - 1498, 1518, 1536, 1554, 1553, 1578, 1583, 1588, 1593, 1598, - 1618, 1624, 1635, 1636, 1641, 1644, 1648, 1671, 1694, 1717, - 1745, 1754, 1758, 1773, 1800, 1817, 1831, 1837, 1843, 1852, - 1866, 1914, 1932, 1947, 1966, 1978, 2002, 2006, 2013, 2019, - 2024, 2030, 2039, 2056, 2073, 2092, 2111, 2139, 2147, 2153, - 2160, 2164, 2173, 2181, 2189, 2198, 2197, 2210, 2209, 2222, - 2221, 2234, 2233, 2246, 2253, 2260, 2267, 2274, 2281, 2288, - 2295, 2302, 2310, 2309, 2321, 2320, 2332, 2331, 2343, 2342, - 2354, 2353, 2365, 2364, 2376, 2375, 2387, 2386, 2398, 2397, - 2412, 2415, 2421, 2430, 2450, 2473, 2477, 2501, 2504, 2520, - 2523, 2536, 2539, 2545, 2548, 2555, 2611, 2681, 2686, 2753, - 2796, 2822, 2845, 2868, 2871, 2880, 2884, 2900, 2901, 2902, - 2903, 2904, 2905, 2906, 2907, 2908, 2915, 2916, 2917, 2918, - 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, - 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, - 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2948, 2949, - 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, - 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2977, - 2978, 2979, 2980, 2981, 2982, 2983, 2987, 3000, 3012, 3027, - 3037, 3047, 3065, 3070, 3075, 3085, 3095, 3103, 3107, 3111, - 3115, 3119, 3126, 3130, 3134, 3138, 3145, 3150, 3157, 3162, - 3166, 3171, 3175, 3183, 3194, 3198, 3210, 3218, 3226, 3233, - 3244, 3264, 3274, 3284, 3294, 3314, 3319, 3323, 3327, 3339, - 3343, 3355, 3362, 3372, 3376, 3391, 3396, 3403, 3407, 3420, - 3428, 3439, 3443, 3451, 3459, 3473, 3487, 3491 + 1334, 1340, 1347, 1372, 1397, 1414, 1413, 1433, 1450, 1478, + 1495, 1515, 1533, 1551, 1550, 1575, 1580, 1585, 1590, 1595, + 1615, 1621, 1632, 1633, 1638, 1641, 1645, 1668, 1691, 1714, + 1742, 1751, 1755, 1770, 1797, 1814, 1828, 1834, 1840, 1849, + 1863, 1911, 1929, 1944, 1963, 1975, 1999, 2003, 2010, 2016, + 2021, 2027, 2036, 2053, 2070, 2089, 2108, 2136, 2144, 2150, + 2157, 2161, 2170, 2178, 2186, 2195, 2194, 2207, 2206, 2219, + 2218, 2231, 2230, 2243, 2250, 2257, 2264, 2271, 2278, 2285, + 2292, 2299, 2307, 2306, 2318, 2317, 2329, 2328, 2340, 2339, + 2351, 2350, 2362, 2361, 2373, 2372, 2384, 2383, 2395, 2394, + 2409, 2412, 2418, 2427, 2447, 2470, 2474, 2498, 2501, 2517, + 2520, 2533, 2536, 2542, 2545, 2552, 2608, 2678, 2683, 2750, + 2793, 2819, 2842, 2865, 2868, 2877, 2881, 2897, 2898, 2899, + 2900, 2901, 2902, 2903, 2904, 2905, 2912, 2913, 2914, 2915, + 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, + 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934, 2935, + 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2945, 2946, + 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, + 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2974, + 2975, 2976, 2977, 2978, 2979, 2980, 2984, 2997, 3009, 3024, + 3034, 3044, 3062, 3067, 3072, 3082, 3092, 3100, 3104, 3108, + 3112, 3116, 3123, 3127, 3131, 3135, 3142, 3147, 3154, 3159, + 3163, 3168, 3172, 3180, 3191, 3195, 3207, 3215, 3223, 3230, + 3241, 3261, 3271, 3281, 3291, 3311, 3316, 3320, 3324, 3336, + 3340, 3352, 3359, 3369, 3373, 3388, 3393, 3400, 3404, 3417, + 3425, 3436, 3440, 3448, 3456, 3470, 3484, 3488 }; #endif @@ -4048,7 +4048,7 @@ yyreduce: #if !defined(HAVE_NO_POST) if(ViewValueList){ for(int i = 0; i < 3; i++) - for(int j = 0; j < ViewCoord.size() / 3; j++) + for(unsigned int j = 0; j < ViewCoord.size() / 3; j++) ViewValueList->push_back(ViewCoord[3 * j + i]); } #endif @@ -4271,7 +4271,7 @@ yyreduce: yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (7)].c)); } else{ - if(gmsh_yysymbols[(yyvsp[(1) - (7)].c)].size() < index + 1) + if((int)gmsh_yysymbols[(yyvsp[(1) - (7)].c)].size() < index + 1) gmsh_yysymbols[(yyvsp[(1) - (7)].c)].resize(index + 1, 0.); switch((yyvsp[(5) - (7)].i)){ case 0 : gmsh_yysymbols[(yyvsp[(1) - (7)].c)][index] = (yyvsp[(6) - (7)].d); break; @@ -4310,7 +4310,7 @@ yyreduce: for(int i = 0; i < List_Nbr((yyvsp[(4) - (9)].l)); i++){ int index = (int)(*(double*)List_Pointer((yyvsp[(4) - (9)].l), i)); double d = *(double*)List_Pointer((yyvsp[(8) - (9)].l), i); - if(gmsh_yysymbols[(yyvsp[(1) - (9)].c)].size() < index + 1) + if((int)gmsh_yysymbols[(yyvsp[(1) - (9)].c)].size() < index + 1) gmsh_yysymbols[(yyvsp[(1) - (9)].c)].resize(index + 1, 0.); switch((yyvsp[(7) - (9)].i)){ case 0 : gmsh_yysymbols[(yyvsp[(1) - (9)].c)][index] = d; break; @@ -4373,7 +4373,7 @@ yyreduce: yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c)); else{ int index = (int)(yyvsp[(3) - (6)].d); - if(gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1) + if((int)gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1) gmsh_yysymbols[(yyvsp[(1) - (6)].c)].resize(index + 1, 0.); gmsh_yysymbols[(yyvsp[(1) - (6)].c)][index] += (yyvsp[(5) - (6)].i); } @@ -5223,7 +5223,7 @@ yyreduce: break; case 117: -#line 1435 "Gmsh.y" +#line 1434 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -5243,7 +5243,7 @@ yyreduce: break; case 118: -#line 1453 "Gmsh.y" +#line 1452 "Gmsh.y" { int num = (int)(yyvsp[(4) - (12)].d); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -5273,7 +5273,7 @@ yyreduce: break; case 119: -#line 1481 "Gmsh.y" +#line 1479 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -5293,7 +5293,7 @@ yyreduce: break; case 120: -#line 1499 "Gmsh.y" +#line 1496 "Gmsh.y" { int num = (int)(yyvsp[(4) - (8)].d); if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){ @@ -5313,7 +5313,7 @@ yyreduce: break; case 121: -#line 1519 "Gmsh.y" +#line 1516 "Gmsh.y" { yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead"); int num = (int)(yyvsp[(4) - (8)].d); @@ -5334,7 +5334,7 @@ yyreduce: break; case 122: -#line 1537 "Gmsh.y" +#line 1534 "Gmsh.y" { int num = (int)(yyvsp[(3) - (7)].d); if(FindVolume(num)){ @@ -5354,14 +5354,14 @@ yyreduce: break; case 123: -#line 1554 "Gmsh.y" +#line 1551 "Gmsh.y" { curPhysDim = 3; ;} break; case 124: -#line 1558 "Gmsh.y" +#line 1555 "Gmsh.y" { int num = (int)(yyvsp[(5) - (9)].i); if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){ @@ -5380,7 +5380,7 @@ yyreduce: break; case 125: -#line 1579 "Gmsh.y" +#line 1576 "Gmsh.y" { TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5388,7 +5388,7 @@ yyreduce: break; case 126: -#line 1584 "Gmsh.y" +#line 1581 "Gmsh.y" { RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l)); (yyval.l) = (yyvsp[(10) - (11)].l); @@ -5396,7 +5396,7 @@ yyreduce: break; case 127: -#line 1589 "Gmsh.y" +#line 1586 "Gmsh.y" { SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l)); (yyval.l) = (yyvsp[(4) - (5)].l); @@ -5404,7 +5404,7 @@ yyreduce: break; case 128: -#line 1594 "Gmsh.y" +#line 1591 "Gmsh.y" { DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l)); (yyval.l) = (yyvsp[(8) - (9)].l); @@ -5412,7 +5412,7 @@ yyreduce: break; case 129: -#line 1599 "Gmsh.y" +#line 1596 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){ @@ -5435,7 +5435,7 @@ yyreduce: break; case 130: -#line 1619 "Gmsh.y" +#line 1616 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l)); @@ -5444,7 +5444,7 @@ yyreduce: break; case 131: -#line 1625 "Gmsh.y" +#line 1622 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape*)); List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l)); @@ -5455,31 +5455,31 @@ yyreduce: break; case 132: -#line 1635 "Gmsh.y" +#line 1632 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 133: -#line 1636 "Gmsh.y" +#line 1633 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 134: -#line 1641 "Gmsh.y" +#line 1638 "Gmsh.y" { (yyval.l) = List_Create(3, 3, sizeof(Shape)); ;} break; case 135: -#line 1645 "Gmsh.y" +#line 1642 "Gmsh.y" { List_Add((yyval.l), &(yyvsp[(2) - (2)].s)); ;} break; case 136: -#line 1649 "Gmsh.y" +#line 1646 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5505,7 +5505,7 @@ yyreduce: break; case 137: -#line 1672 "Gmsh.y" +#line 1669 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5531,7 +5531,7 @@ yyreduce: break; case 138: -#line 1695 "Gmsh.y" +#line 1692 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5557,7 +5557,7 @@ yyreduce: break; case 139: -#line 1718 "Gmsh.y" +#line 1715 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ double d; @@ -5583,7 +5583,7 @@ yyreduce: break; case 140: -#line 1746 "Gmsh.y" +#line 1743 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5595,14 +5595,14 @@ yyreduce: break; case 141: -#line 1755 "Gmsh.y" +#line 1752 "Gmsh.y" { GModel::current()->getFields()->deleteField((int)(yyvsp[(4) - (6)].d)); ;} break; case 142: -#line 1759 "Gmsh.y" +#line 1756 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (6)].c), "View")){ @@ -5620,7 +5620,7 @@ yyreduce: break; case 143: -#line 1774 "Gmsh.y" +#line 1771 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){ for(unsigned int i = 0; i < GModel::list.size(); i++){ @@ -5650,7 +5650,7 @@ yyreduce: break; case 144: -#line 1801 "Gmsh.y" +#line 1798 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){ @@ -5665,7 +5665,7 @@ yyreduce: break; case 145: -#line 1818 "Gmsh.y" +#line 1815 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){ Shape TheShape; @@ -5677,7 +5677,7 @@ yyreduce: break; case 146: -#line 1832 "Gmsh.y" +#line 1829 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 1); @@ -5686,7 +5686,7 @@ yyreduce: break; case 147: -#line 1838 "Gmsh.y" +#line 1835 "Gmsh.y" { for(int i = 0; i < 4; i++) VisibilityShape((yyvsp[(2) - (3)].c), i, 0); @@ -5695,7 +5695,7 @@ yyreduce: break; case 148: -#line 1844 "Gmsh.y" +#line 1841 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5707,7 +5707,7 @@ yyreduce: break; case 149: -#line 1853 "Gmsh.y" +#line 1850 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){ Shape TheShape; @@ -5719,7 +5719,7 @@ yyreduce: break; case 150: -#line 1867 "Gmsh.y" +#line 1864 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Include")){ char tmpstring[1024]; @@ -5770,7 +5770,7 @@ yyreduce: break; case 151: -#line 1915 "Gmsh.y" +#line 1912 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){ @@ -5791,7 +5791,7 @@ yyreduce: break; case 152: -#line 1933 "Gmsh.y" +#line 1930 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh") && !strcmp((yyvsp[(3) - (7)].c), "View")){ @@ -5809,7 +5809,7 @@ yyreduce: break; case 153: -#line 1948 "Gmsh.y" +#line 1945 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){ SleepInSeconds((yyvsp[(2) - (3)].d)); @@ -5831,7 +5831,7 @@ yyreduce: break; case 154: -#line 1967 "Gmsh.y" +#line 1964 "Gmsh.y" { #if !defined(HAVE_NO_POST) try { @@ -5846,7 +5846,7 @@ yyreduce: break; case 155: -#line 1979 "Gmsh.y" +#line 1976 "Gmsh.y" { #if !defined(HAVE_NO_POST) if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews")) @@ -5873,14 +5873,14 @@ yyreduce: break; case 156: -#line 2003 "Gmsh.y" +#line 2000 "Gmsh.y" { exit(0); ;} break; case 157: -#line 2007 "Gmsh.y" +#line 2004 "Gmsh.y" { // FIXME: this is a hack to force a transfer from the old DB to // the new DB. This will become unnecessary if/when we fill the @@ -5890,7 +5890,7 @@ yyreduce: break; case 158: -#line 2014 "Gmsh.y" +#line 2011 "Gmsh.y" { CTX::instance()->forcedBBox = 0; GModel::current()->importGEOInternals(); @@ -5899,7 +5899,7 @@ yyreduce: break; case 159: -#line 2020 "Gmsh.y" +#line 2017 "Gmsh.y" { CTX::instance()->forcedBBox = 1; SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d)); @@ -5907,7 +5907,7 @@ yyreduce: break; case 160: -#line 2025 "Gmsh.y" +#line 2022 "Gmsh.y" { #if defined(HAVE_FLTK) Draw(); @@ -5916,14 +5916,14 @@ yyreduce: break; case 161: -#line 2031 "Gmsh.y" +#line 2028 "Gmsh.y" { GModel::current()->createTopologyFromMesh(); ;} break; case 162: -#line 2040 "Gmsh.y" +#line 2037 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d); @@ -5943,7 +5943,7 @@ yyreduce: break; case 163: -#line 2057 "Gmsh.y" +#line 2054 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d); @@ -5963,7 +5963,7 @@ yyreduce: break; case 164: -#line 2074 "Gmsh.y" +#line 2071 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d); @@ -5985,7 +5985,7 @@ yyreduce: break; case 165: -#line 2093 "Gmsh.y" +#line 2090 "Gmsh.y" { LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d); LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d); @@ -6007,7 +6007,7 @@ yyreduce: break; case 166: -#line 2112 "Gmsh.y" +#line 2109 "Gmsh.y" { if(ImbricatedLoop <= 0){ yymsg(0, "Invalid For/EndFor loop"); @@ -6038,7 +6038,7 @@ yyreduce: break; case 167: -#line 2140 "Gmsh.y" +#line 2137 "Gmsh.y" { if(!FunctionManager::Instance()->createFunction ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6049,7 +6049,7 @@ yyreduce: break; case 168: -#line 2148 "Gmsh.y" +#line 2145 "Gmsh.y" { if(!FunctionManager::Instance()->leaveFunction (&gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6058,7 +6058,7 @@ yyreduce: break; case 169: -#line 2154 "Gmsh.y" +#line 2151 "Gmsh.y" { if(!FunctionManager::Instance()->enterFunction ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno)) @@ -6068,20 +6068,20 @@ yyreduce: break; case 170: -#line 2161 "Gmsh.y" +#line 2158 "Gmsh.y" { if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf"); ;} break; case 171: -#line 2165 "Gmsh.y" +#line 2162 "Gmsh.y" { ;} break; case 172: -#line 2174 "Gmsh.y" +#line 2171 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), @@ -6092,7 +6092,7 @@ yyreduce: break; case 173: -#line 2182 "Gmsh.y" +#line 2179 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), @@ -6103,7 +6103,7 @@ yyreduce: break; case 174: -#line 2190 "Gmsh.y" +#line 2187 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), @@ -6114,14 +6114,14 @@ yyreduce: break; case 175: -#line 2198 "Gmsh.y" +#line 2195 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 176: -#line 2202 "Gmsh.y" +#line 2199 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), @@ -6132,14 +6132,14 @@ yyreduce: break; case 177: -#line 2210 "Gmsh.y" +#line 2207 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 178: -#line 2214 "Gmsh.y" +#line 2211 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), @@ -6150,14 +6150,14 @@ yyreduce: break; case 179: -#line 2222 "Gmsh.y" +#line 2219 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 180: -#line 2226 "Gmsh.y" +#line 2223 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), @@ -6168,14 +6168,14 @@ yyreduce: break; case 181: -#line 2234 "Gmsh.y" +#line 2231 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 182: -#line 2238 "Gmsh.y" +#line 2235 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., @@ -6185,7 +6185,7 @@ yyreduce: break; case 183: -#line 2247 "Gmsh.y" +#line 2244 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), @@ -6195,7 +6195,7 @@ yyreduce: break; case 184: -#line 2254 "Gmsh.y" +#line 2251 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), @@ -6205,7 +6205,7 @@ yyreduce: break; case 185: -#line 2261 "Gmsh.y" +#line 2258 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), @@ -6215,7 +6215,7 @@ yyreduce: break; case 186: -#line 2268 "Gmsh.y" +#line 2265 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6225,7 +6225,7 @@ yyreduce: break; case 187: -#line 2275 "Gmsh.y" +#line 2272 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6235,7 +6235,7 @@ yyreduce: break; case 188: -#line 2282 "Gmsh.y" +#line 2279 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6245,7 +6245,7 @@ yyreduce: break; case 189: -#line 2289 "Gmsh.y" +#line 2286 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), @@ -6255,7 +6255,7 @@ yyreduce: break; case 190: -#line 2296 "Gmsh.y" +#line 2293 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), @@ -6265,7 +6265,7 @@ yyreduce: break; case 191: -#line 2303 "Gmsh.y" +#line 2300 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), @@ -6275,14 +6275,14 @@ yyreduce: break; case 192: -#line 2310 "Gmsh.y" +#line 2307 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 193: -#line 2314 "Gmsh.y" +#line 2311 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), @@ -6292,14 +6292,14 @@ yyreduce: break; case 194: -#line 2321 "Gmsh.y" +#line 2318 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 195: -#line 2325 "Gmsh.y" +#line 2322 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), @@ -6309,14 +6309,14 @@ yyreduce: break; case 196: -#line 2332 "Gmsh.y" +#line 2329 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 197: -#line 2336 "Gmsh.y" +#line 2333 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), @@ -6326,14 +6326,14 @@ yyreduce: break; case 198: -#line 2343 "Gmsh.y" +#line 2340 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 199: -#line 2347 "Gmsh.y" +#line 2344 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), @@ -6343,14 +6343,14 @@ yyreduce: break; case 200: -#line 2354 "Gmsh.y" +#line 2351 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 201: -#line 2358 "Gmsh.y" +#line 2355 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), @@ -6360,14 +6360,14 @@ yyreduce: break; case 202: -#line 2365 "Gmsh.y" +#line 2362 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 203: -#line 2369 "Gmsh.y" +#line 2366 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), @@ -6377,14 +6377,14 @@ yyreduce: break; case 204: -#line 2376 "Gmsh.y" +#line 2373 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 205: -#line 2380 "Gmsh.y" +#line 2377 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), @@ -6394,14 +6394,14 @@ yyreduce: break; case 206: -#line 2387 "Gmsh.y" +#line 2384 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 207: -#line 2391 "Gmsh.y" +#line 2388 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), @@ -6411,14 +6411,14 @@ yyreduce: break; case 208: -#line 2398 "Gmsh.y" +#line 2395 "Gmsh.y" { extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false; ;} break; case 209: -#line 2402 "Gmsh.y" +#line 2399 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(Shape)); ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), @@ -6428,19 +6428,19 @@ yyreduce: break; case 210: -#line 2413 "Gmsh.y" +#line 2410 "Gmsh.y" { ;} break; case 211: -#line 2416 "Gmsh.y" +#line 2413 "Gmsh.y" { ;} break; case 212: -#line 2422 "Gmsh.y" +#line 2419 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = 1; @@ -6452,7 +6452,7 @@ yyreduce: break; case 213: -#line 2431 "Gmsh.y" +#line 2428 "Gmsh.y" { extr.mesh.ExtrudeMesh = true; extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l)); @@ -6475,7 +6475,7 @@ yyreduce: break; case 214: -#line 2451 "Gmsh.y" +#line 2448 "Gmsh.y" { yymsg(0, "Explicit region numbers in layers are deprecated"); extr.mesh.ExtrudeMesh = true; @@ -6501,14 +6501,14 @@ yyreduce: break; case 215: -#line 2474 "Gmsh.y" +#line 2471 "Gmsh.y" { extr.mesh.Recombine = true; ;} break; case 216: -#line 2478 "Gmsh.y" +#line 2475 "Gmsh.y" { int num = (int)(yyvsp[(3) - (9)].d); if(FindSurface(num)){ @@ -6530,14 +6530,14 @@ yyreduce: break; case 217: -#line 2501 "Gmsh.y" +#line 2498 "Gmsh.y" { (yyval.v)[0] = (yyval.v)[1] = 1.; ;} break; case 218: -#line 2505 "Gmsh.y" +#line 2502 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power")) (yyval.v)[0] = 1.; @@ -6553,14 +6553,14 @@ yyreduce: break; case 219: -#line 2520 "Gmsh.y" +#line 2517 "Gmsh.y" { (yyval.i) = -1; // left ;} break; case 220: -#line 2524 "Gmsh.y" +#line 2521 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "Right")) (yyval.i) = 1; @@ -6573,35 +6573,35 @@ yyreduce: break; case 221: -#line 2536 "Gmsh.y" +#line 2533 "Gmsh.y" { (yyval.l) = List_Create(1, 1, sizeof(double)); ;} break; case 222: -#line 2540 "Gmsh.y" +#line 2537 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); ;} break; case 223: -#line 2545 "Gmsh.y" +#line 2542 "Gmsh.y" { (yyval.i) = 45; ;} break; case 224: -#line 2549 "Gmsh.y" +#line 2546 "Gmsh.y" { (yyval.i) = (int)(yyvsp[(2) - (2)].d); ;} break; case 225: -#line 2556 "Gmsh.y" +#line 2553 "Gmsh.y" { int type = (int)(yyvsp[(6) - (7)].v)[0]; double coef = fabs((yyvsp[(6) - (7)].v)[1]); @@ -6660,7 +6660,7 @@ yyreduce: break; case 226: -#line 2612 "Gmsh.y" +#line 2609 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (6)].l)); if(k != 0 && k != 3 && k != 4){ @@ -6733,7 +6733,7 @@ yyreduce: break; case 227: -#line 2682 "Gmsh.y" +#line 2679 "Gmsh.y" { yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)"); List_Delete((yyvsp[(7) - (8)].l)); @@ -6741,7 +6741,7 @@ yyreduce: break; case 228: -#line 2687 "Gmsh.y" +#line 2684 "Gmsh.y" { int k = List_Nbr((yyvsp[(4) - (5)].l)); if(k != 0 && k != 6 && k != 8){ @@ -6811,7 +6811,7 @@ yyreduce: break; case 229: -#line 2754 "Gmsh.y" +#line 2751 "Gmsh.y" { if(!(yyvsp[(3) - (5)].l)){ List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces); @@ -6857,7 +6857,7 @@ yyreduce: break; case 230: -#line 2797 "Gmsh.y" +#line 2794 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){ double d; @@ -6880,7 +6880,7 @@ yyreduce: break; case 231: -#line 2823 "Gmsh.y" +#line 2820 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -6906,7 +6906,7 @@ yyreduce: break; case 232: -#line 2846 "Gmsh.y" +#line 2843 "Gmsh.y" { Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d)); if(s){ @@ -6932,26 +6932,26 @@ yyreduce: break; case 233: -#line 2869 "Gmsh.y" +#line 2866 "Gmsh.y" { ;} break; case 234: -#line 2872 "Gmsh.y" +#line 2869 "Gmsh.y" { ;} break; case 235: -#line 2881 "Gmsh.y" +#line 2878 "Gmsh.y" { ReplaceAllDuplicates(); ;} break; case 236: -#line 2885 "Gmsh.y" +#line 2882 "Gmsh.y" { if(!strcmp((yyvsp[(2) - (3)].c), "Geometry")) ReplaceAllDuplicates(); @@ -6964,47 +6964,47 @@ yyreduce: break; case 237: -#line 2900 "Gmsh.y" +#line 2897 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 238: -#line 2901 "Gmsh.y" +#line 2898 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (3)].d); ;} break; case 239: -#line 2902 "Gmsh.y" +#line 2899 "Gmsh.y" { (yyval.d) = -(yyvsp[(2) - (2)].d); ;} break; case 240: -#line 2903 "Gmsh.y" +#line 2900 "Gmsh.y" { (yyval.d) = (yyvsp[(2) - (2)].d); ;} break; case 241: -#line 2904 "Gmsh.y" +#line 2901 "Gmsh.y" { (yyval.d) = !(yyvsp[(2) - (2)].d); ;} break; case 242: -#line 2905 "Gmsh.y" +#line 2902 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d); ;} break; case 243: -#line 2906 "Gmsh.y" +#line 2903 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d); ;} break; case 244: -#line 2907 "Gmsh.y" +#line 2904 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d); ;} break; case 245: -#line 2909 "Gmsh.y" +#line 2906 "Gmsh.y" { if(!(yyvsp[(3) - (3)].d)) yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); @@ -7014,307 +7014,307 @@ yyreduce: break; case 246: -#line 2915 "Gmsh.y" +#line 2912 "Gmsh.y" { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d); ;} break; case 247: -#line 2916 "Gmsh.y" +#line 2913 "Gmsh.y" { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d)); ;} break; case 248: -#line 2917 "Gmsh.y" +#line 2914 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d); ;} break; case 249: -#line 2918 "Gmsh.y" +#line 2915 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d); ;} break; case 250: -#line 2919 "Gmsh.y" +#line 2916 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d); ;} break; case 251: -#line 2920 "Gmsh.y" +#line 2917 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d); ;} break; case 252: -#line 2921 "Gmsh.y" +#line 2918 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d); ;} break; case 253: -#line 2922 "Gmsh.y" +#line 2919 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d); ;} break; case 254: -#line 2923 "Gmsh.y" +#line 2920 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d); ;} break; case 255: -#line 2924 "Gmsh.y" +#line 2921 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d); ;} break; case 256: -#line 2925 "Gmsh.y" +#line 2922 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;} break; case 257: -#line 2926 "Gmsh.y" +#line 2923 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 258: -#line 2927 "Gmsh.y" +#line 2924 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 259: -#line 2928 "Gmsh.y" +#line 2925 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 260: -#line 2929 "Gmsh.y" +#line 2926 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 261: -#line 2930 "Gmsh.y" +#line 2927 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 262: -#line 2931 "Gmsh.y" +#line 2928 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 263: -#line 2932 "Gmsh.y" +#line 2929 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 264: -#line 2933 "Gmsh.y" +#line 2930 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 265: -#line 2934 "Gmsh.y" +#line 2931 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 266: -#line 2935 "Gmsh.y" +#line 2932 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 267: -#line 2936 "Gmsh.y" +#line 2933 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 268: -#line 2937 "Gmsh.y" +#line 2934 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 269: -#line 2938 "Gmsh.y" +#line 2935 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 270: -#line 2939 "Gmsh.y" +#line 2936 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 271: -#line 2940 "Gmsh.y" +#line 2937 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 272: -#line 2941 "Gmsh.y" +#line 2938 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 273: -#line 2942 "Gmsh.y" +#line 2939 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 274: -#line 2943 "Gmsh.y" +#line 2940 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 275: -#line 2944 "Gmsh.y" +#line 2941 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 276: -#line 2945 "Gmsh.y" +#line 2942 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 277: -#line 2946 "Gmsh.y" +#line 2943 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 278: -#line 2948 "Gmsh.y" +#line 2945 "Gmsh.y" { (yyval.d) = exp((yyvsp[(3) - (4)].d)); ;} break; case 279: -#line 2949 "Gmsh.y" +#line 2946 "Gmsh.y" { (yyval.d) = log((yyvsp[(3) - (4)].d)); ;} break; case 280: -#line 2950 "Gmsh.y" +#line 2947 "Gmsh.y" { (yyval.d) = log10((yyvsp[(3) - (4)].d)); ;} break; case 281: -#line 2951 "Gmsh.y" +#line 2948 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (4)].d)); ;} break; case 282: -#line 2952 "Gmsh.y" +#line 2949 "Gmsh.y" { (yyval.d) = sin((yyvsp[(3) - (4)].d)); ;} break; case 283: -#line 2953 "Gmsh.y" +#line 2950 "Gmsh.y" { (yyval.d) = asin((yyvsp[(3) - (4)].d)); ;} break; case 284: -#line 2954 "Gmsh.y" +#line 2951 "Gmsh.y" { (yyval.d) = cos((yyvsp[(3) - (4)].d)); ;} break; case 285: -#line 2955 "Gmsh.y" +#line 2952 "Gmsh.y" { (yyval.d) = acos((yyvsp[(3) - (4)].d)); ;} break; case 286: -#line 2956 "Gmsh.y" +#line 2953 "Gmsh.y" { (yyval.d) = tan((yyvsp[(3) - (4)].d)); ;} break; case 287: -#line 2957 "Gmsh.y" +#line 2954 "Gmsh.y" { (yyval.d) = atan((yyvsp[(3) - (4)].d)); ;} break; case 288: -#line 2958 "Gmsh.y" +#line 2955 "Gmsh.y" { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;} break; case 289: -#line 2959 "Gmsh.y" +#line 2956 "Gmsh.y" { (yyval.d) = sinh((yyvsp[(3) - (4)].d)); ;} break; case 290: -#line 2960 "Gmsh.y" +#line 2957 "Gmsh.y" { (yyval.d) = cosh((yyvsp[(3) - (4)].d)); ;} break; case 291: -#line 2961 "Gmsh.y" +#line 2958 "Gmsh.y" { (yyval.d) = tanh((yyvsp[(3) - (4)].d)); ;} break; case 292: -#line 2962 "Gmsh.y" +#line 2959 "Gmsh.y" { (yyval.d) = fabs((yyvsp[(3) - (4)].d)); ;} break; case 293: -#line 2963 "Gmsh.y" +#line 2960 "Gmsh.y" { (yyval.d) = floor((yyvsp[(3) - (4)].d)); ;} break; case 294: -#line 2964 "Gmsh.y" +#line 2961 "Gmsh.y" { (yyval.d) = ceil((yyvsp[(3) - (4)].d)); ;} break; case 295: -#line 2965 "Gmsh.y" +#line 2962 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 296: -#line 2966 "Gmsh.y" +#line 2963 "Gmsh.y" { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;} break; case 297: -#line 2967 "Gmsh.y" +#line 2964 "Gmsh.y" { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;} break; case 298: -#line 2968 "Gmsh.y" +#line 2965 "Gmsh.y" { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;} break; case 299: -#line 2977 "Gmsh.y" +#line 2974 "Gmsh.y" { (yyval.d) = (yyvsp[(1) - (1)].d); ;} break; case 300: -#line 2978 "Gmsh.y" +#line 2975 "Gmsh.y" { (yyval.d) = 3.141592653589793; ;} break; case 301: -#line 2979 "Gmsh.y" +#line 2976 "Gmsh.y" { (yyval.d) = Msg::GetCommRank(); ;} break; case 302: -#line 2980 "Gmsh.y" +#line 2977 "Gmsh.y" { (yyval.d) = Msg::GetCommSize(); ;} break; case 303: -#line 2981 "Gmsh.y" +#line 2978 "Gmsh.y" { (yyval.d) = GetGmshMajorVersion(); ;} break; case 304: -#line 2982 "Gmsh.y" +#line 2979 "Gmsh.y" { (yyval.d) = GetGmshMinorVersion(); ;} break; case 305: -#line 2983 "Gmsh.y" +#line 2980 "Gmsh.y" { (yyval.d) = GetGmshPatchVersion(); ;} break; case 306: -#line 2988 "Gmsh.y" +#line 2985 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c)); @@ -7327,7 +7327,7 @@ yyreduce: break; case 307: -#line 3001 "Gmsh.y" +#line 2998 "Gmsh.y" { char tmpstring[1024]; sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ; @@ -7342,14 +7342,14 @@ yyreduce: break; case 308: -#line 3013 "Gmsh.y" +#line 3010 "Gmsh.y" { int index = (int)(yyvsp[(3) - (4)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (4)].c)); (yyval.d) = 0.; } - else if(gmsh_yysymbols[(yyvsp[(1) - (4)].c)].size() < index + 1){ + else if((int)gmsh_yysymbols[(yyvsp[(1) - (4)].c)].size() < index + 1){ yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (4)].c), index); (yyval.d) = 0.; } @@ -7360,7 +7360,7 @@ yyreduce: break; case 309: -#line 3028 "Gmsh.y" +#line 3025 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c)); @@ -7373,7 +7373,7 @@ yyreduce: break; case 310: -#line 3038 "Gmsh.y" +#line 3035 "Gmsh.y" { if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c)); @@ -7386,14 +7386,14 @@ yyreduce: break; case 311: -#line 3048 "Gmsh.y" +#line 3045 "Gmsh.y" { int index = (int)(yyvsp[(3) - (5)].d); if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){ yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (5)].c)); (yyval.d) = 0.; } - else if(gmsh_yysymbols[(yyvsp[(1) - (5)].c)].size() < index + 1){ + else if((int)gmsh_yysymbols[(yyvsp[(1) - (5)].c)].size() < index + 1){ yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (5)].c), index); (yyval.d) = 0.; } @@ -7404,7 +7404,7 @@ yyreduce: break; case 312: -#line 3066 "Gmsh.y" +#line 3063 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d)); Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c)); @@ -7412,7 +7412,7 @@ yyreduce: break; case 313: -#line 3071 "Gmsh.y" +#line 3068 "Gmsh.y" { NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d)); Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c)); @@ -7420,7 +7420,7 @@ yyreduce: break; case 314: -#line 3076 "Gmsh.y" +#line 3073 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){ @@ -7433,7 +7433,7 @@ yyreduce: break; case 315: -#line 3086 "Gmsh.y" +#line 3083 "Gmsh.y" { double d = 0.; if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){ @@ -7446,7 +7446,7 @@ yyreduce: break; case 316: -#line 3096 "Gmsh.y" +#line 3093 "Gmsh.y" { (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d)); Free((yyvsp[(3) - (6)].c)); @@ -7454,70 +7454,70 @@ yyreduce: break; case 317: -#line 3104 "Gmsh.y" +#line 3101 "Gmsh.y" { memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double)); ;} break; case 318: -#line 3108 "Gmsh.y" +#line 3105 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i]; ;} break; case 319: -#line 3112 "Gmsh.y" +#line 3109 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i]; ;} break; case 320: -#line 3116 "Gmsh.y" +#line 3113 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i]; ;} break; case 321: -#line 3120 "Gmsh.y" +#line 3117 "Gmsh.y" { for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i]; ;} break; case 322: -#line 3127 "Gmsh.y" +#line 3124 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (11)].d); (yyval.v)[1] = (yyvsp[(4) - (11)].d); (yyval.v)[2] = (yyvsp[(6) - (11)].d); (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d); ;} break; case 323: -#line 3131 "Gmsh.y" +#line 3128 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (9)].d); (yyval.v)[1] = (yyvsp[(4) - (9)].d); (yyval.v)[2] = (yyvsp[(6) - (9)].d); (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0; ;} break; case 324: -#line 3135 "Gmsh.y" +#line 3132 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 325: -#line 3139 "Gmsh.y" +#line 3136 "Gmsh.y" { (yyval.v)[0] = (yyvsp[(2) - (7)].d); (yyval.v)[1] = (yyvsp[(4) - (7)].d); (yyval.v)[2] = (yyvsp[(6) - (7)].d); (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0; ;} break; case 326: -#line 3146 "Gmsh.y" +#line 3143 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(List_T*)); List_Add((yyval.l), &((yyvsp[(1) - (1)].l))); @@ -7525,14 +7525,14 @@ yyreduce: break; case 327: -#line 3151 "Gmsh.y" +#line 3148 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].l))); ;} break; case 328: -#line 3158 "Gmsh.y" +#line 3155 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7540,14 +7540,14 @@ yyreduce: break; case 329: -#line 3163 "Gmsh.y" +#line 3160 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 330: -#line 3167 "Gmsh.y" +#line 3164 "Gmsh.y" { // creates an empty list (yyval.l) = List_Create(2, 1, sizeof(double)); @@ -7555,14 +7555,14 @@ yyreduce: break; case 331: -#line 3172 "Gmsh.y" +#line 3169 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 332: -#line 3176 "Gmsh.y" +#line 3173 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (4)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7573,7 +7573,7 @@ yyreduce: break; case 333: -#line 3184 "Gmsh.y" +#line 3181 "Gmsh.y" { (yyval.l) = (yyvsp[(4) - (5)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7584,14 +7584,14 @@ yyreduce: break; case 334: -#line 3195 "Gmsh.y" +#line 3192 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 335: -#line 3199 "Gmsh.y" +#line 3196 "Gmsh.y" { if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all")) (yyval.l) = 0; @@ -7603,7 +7603,7 @@ yyreduce: break; case 336: -#line 3211 "Gmsh.y" +#line 3208 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (2)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7614,7 +7614,7 @@ yyreduce: break; case 337: -#line 3219 "Gmsh.y" +#line 3216 "Gmsh.y" { (yyval.l) = (yyvsp[(3) - (3)].l); for(int i = 0; i < List_Nbr((yyval.l)); i++){ @@ -7625,7 +7625,7 @@ yyreduce: break; case 338: -#line 3227 "Gmsh.y" +#line 3224 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); @@ -7635,7 +7635,7 @@ yyreduce: break; case 339: -#line 3234 "Gmsh.y" +#line 3231 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){ @@ -7649,7 +7649,7 @@ yyreduce: break; case 340: -#line 3245 "Gmsh.y" +#line 3242 "Gmsh.y" { // Returns the coordinates of a point and fills a list with it. // This allows to ensure e.g. that relative point positions are @@ -7672,7 +7672,7 @@ yyreduce: break; case 341: -#line 3265 "Gmsh.y" +#line 3262 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7685,7 +7685,7 @@ yyreduce: break; case 342: -#line 3275 "Gmsh.y" +#line 3272 "Gmsh.y" { (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double)); for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){ @@ -7698,7 +7698,7 @@ yyreduce: break; case 343: -#line 3285 "Gmsh.y" +#line 3282 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c))) @@ -7711,7 +7711,7 @@ yyreduce: break; case 344: -#line 3295 "Gmsh.y" +#line 3292 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c))) @@ -7719,7 +7719,7 @@ yyreduce: else{ for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){ int index = (int)(*(double*)List_Pointer_Fast((yyvsp[(4) - (6)].l), i)); - if(gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1) + if((int)gmsh_yysymbols[(yyvsp[(1) - (6)].c)].size() < index + 1) yymsg(0, "Uninitialized variable '%s[%d]'", (yyvsp[(1) - (6)].c), index); else List_Add((yyval.l), &gmsh_yysymbols[(yyvsp[(1) - (6)].c)][index]); @@ -7731,7 +7731,7 @@ yyreduce: break; case 345: -#line 3315 "Gmsh.y" +#line 3312 "Gmsh.y" { (yyval.l) = List_Create(2, 1, sizeof(double)); List_Add((yyval.l), &((yyvsp[(1) - (1)].d))); @@ -7739,21 +7739,21 @@ yyreduce: break; case 346: -#line 3320 "Gmsh.y" +#line 3317 "Gmsh.y" { (yyval.l) = (yyvsp[(1) - (1)].l); ;} break; case 347: -#line 3324 "Gmsh.y" +#line 3321 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].d))); ;} break; case 348: -#line 3328 "Gmsh.y" +#line 3325 "Gmsh.y" { for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){ double d; @@ -7765,21 +7765,21 @@ yyreduce: break; case 349: -#line 3340 "Gmsh.y" +#line 3337 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d)); ;} break; case 350: -#line 3344 "Gmsh.y" +#line 3341 "Gmsh.y" { (yyval.u) = CTX::instance()->packColor((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255); ;} break; case 351: -#line 3356 "Gmsh.y" +#line 3353 "Gmsh.y" { int flag; (yyval.u) = GetColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag); @@ -7789,7 +7789,7 @@ yyreduce: break; case 352: -#line 3363 "Gmsh.y" +#line 3360 "Gmsh.y" { unsigned int val = 0; ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val); @@ -7799,14 +7799,14 @@ yyreduce: break; case 353: -#line 3373 "Gmsh.y" +#line 3370 "Gmsh.y" { (yyval.l) = (yyvsp[(2) - (3)].l); ;} break; case 354: -#line 3377 "Gmsh.y" +#line 3374 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); GmshColorTable *ct = GetColorTable((int)(yyvsp[(3) - (6)].d)); @@ -7821,7 +7821,7 @@ yyreduce: break; case 355: -#line 3392 "Gmsh.y" +#line 3389 "Gmsh.y" { (yyval.l) = List_Create(256, 10, sizeof(unsigned int)); List_Add((yyval.l), &((yyvsp[(1) - (1)].u))); @@ -7829,21 +7829,21 @@ yyreduce: break; case 356: -#line 3397 "Gmsh.y" +#line 3394 "Gmsh.y" { List_Add((yyval.l), &((yyvsp[(3) - (3)].u))); ;} break; case 357: -#line 3404 "Gmsh.y" +#line 3401 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 358: -#line 3408 "Gmsh.y" +#line 3405 "Gmsh.y" { if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){ yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c)); @@ -7859,7 +7859,7 @@ yyreduce: break; case 359: -#line 3421 "Gmsh.y" +#line 3418 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), out); @@ -7870,7 +7870,7 @@ yyreduce: break; case 360: -#line 3429 "Gmsh.y" +#line 3426 "Gmsh.y" { std::string out; StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), out); @@ -7881,14 +7881,14 @@ yyreduce: break; case 361: -#line 3440 "Gmsh.y" +#line 3437 "Gmsh.y" { (yyval.c) = (yyvsp[(1) - (1)].c); ;} break; case 362: -#line 3444 "Gmsh.y" +#line 3441 "Gmsh.y" { (yyval.c) = (char *)Malloc(32 * sizeof(char)); time_t now; @@ -7899,7 +7899,7 @@ yyreduce: break; case 363: -#line 3452 "Gmsh.y" +#line 3449 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char)); strcpy((yyval.c), (yyvsp[(3) - (6)].c)); @@ -7910,7 +7910,7 @@ yyreduce: break; case 364: -#line 3460 "Gmsh.y" +#line 3457 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -7927,7 +7927,7 @@ yyreduce: break; case 365: -#line 3474 "Gmsh.y" +#line 3471 "Gmsh.y" { (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char)); int i; @@ -7944,14 +7944,14 @@ yyreduce: break; case 366: -#line 3488 "Gmsh.y" +#line 3485 "Gmsh.y" { (yyval.c) = (yyvsp[(3) - (4)].c); ;} break; case 367: -#line 3492 "Gmsh.y" +#line 3489 "Gmsh.y" { char tmpstring[1024]; int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring); @@ -8188,7 +8188,7 @@ yyreturn: } -#line 3512 "Gmsh.y" +#line 3509 "Gmsh.y" int PrintListOfDouble(char *format, List_T *list, char *buffer) diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index cb79b2535fdf812147d31b97a54b8541b7e98987..0bd325df09bfb22ea6fc828318e00cce76616d7f 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -416,7 +416,7 @@ Element : #if !defined(HAVE_NO_POST) if(ViewValueList){ for(int i = 0; i < 3; i++) - for(int j = 0; j < ViewCoord.size() / 3; j++) + for(unsigned int j = 0; j < ViewCoord.size() / 3; j++) ViewValueList->push_back(ViewCoord[3 * j + i]); } #endif @@ -602,7 +602,7 @@ Affectation : yymsg(0, "Unknown variable '%s'", $1); } else{ - if(gmsh_yysymbols[$1].size() < index + 1) + if((int)gmsh_yysymbols[$1].size() < index + 1) gmsh_yysymbols[$1].resize(index + 1, 0.); switch($5){ case 0 : gmsh_yysymbols[$1][index] = $6; break; @@ -638,7 +638,7 @@ Affectation : for(int i = 0; i < List_Nbr($4); i++){ int index = (int)(*(double*)List_Pointer($4, i)); double d = *(double*)List_Pointer($8, i); - if(gmsh_yysymbols[$1].size() < index + 1) + if((int)gmsh_yysymbols[$1].size() < index + 1) gmsh_yysymbols[$1].resize(index + 1, 0.); switch($7){ case 0 : gmsh_yysymbols[$1][index] = d; break; @@ -689,7 +689,7 @@ Affectation : yymsg(0, "Unknown variable '%s'", $1); else{ int index = (int)$3; - if(gmsh_yysymbols[$1].size() < index + 1) + if((int)gmsh_yysymbols[$1].size() < index + 1) gmsh_yysymbols[$1].resize(index + 1, 0.); gmsh_yysymbols[$1][index] += $5; } @@ -1430,7 +1430,6 @@ Shape : $$.Type = MSH_PHYSICAL_SURFACE; $$.Num = num; } - | tCompound tVolume '(' FExpr ')' tAFFECT ListOfDouble tEND { int num = (int)$4; @@ -1448,8 +1447,8 @@ Shape : $$.Type = MSH_PHYSICAL_VOLUME; $$.Num = num; } - - | tCompound tSurface '(' FExpr ')' tAFFECT ListOfDouble tSTRING '{' RecursiveListOfListOfDouble '}' tEND + | tCompound tSurface '(' FExpr ')' tAFFECT ListOfDouble tSTRING + '{' RecursiveListOfListOfDouble '}' tEND { int num = (int)$4; if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -1476,8 +1475,7 @@ Shape : $$.Type = MSH_PHYSICAL_SURFACE; $$.Num = num; } - //EMI ADDED - | tCompound tSurface '(' FExpr ')' tAFFECT ListOfDouble tEND + | tCompound tSurface '(' FExpr ')' tAFFECT ListOfDouble tEND { int num = (int)$4; if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){ @@ -1494,8 +1492,6 @@ Shape : $$.Type = MSH_PHYSICAL_SURFACE; $$.Num = num; } - // END EMI ADDED - | tCompound tLine '(' FExpr ')' tAFFECT ListOfDouble tEND { int num = (int)$4; @@ -3017,7 +3013,7 @@ FExpr_Single : yymsg(0, "Unknown variable '%s'", $1); $$ = 0.; } - else if(gmsh_yysymbols[$1].size() < index + 1){ + else if((int)gmsh_yysymbols[$1].size() < index + 1){ yymsg(0, "Uninitialized variable '%s[%d]'", $1, index); $$ = 0.; } @@ -3052,7 +3048,7 @@ FExpr_Single : yymsg(0, "Unknown variable '%s'", $1); $$ = 0.; } - else if(gmsh_yysymbols[$1].size() < index + 1){ + else if((int)gmsh_yysymbols[$1].size() < index + 1){ yymsg(0, "Uninitialized variable '%s[%d]'", $1, index); $$ = 0.; } @@ -3300,7 +3296,7 @@ FExpr_Multi : else{ for(int i = 0; i < List_Nbr($4); i++){ int index = (int)(*(double*)List_Pointer_Fast($4, i)); - if(gmsh_yysymbols[$1].size() < index + 1) + if((int)gmsh_yysymbols[$1].size() < index + 1) yymsg(0, "Uninitialized variable '%s[%d]'", $1, index); else List_Add($$, &gmsh_yysymbols[$1][index]); diff --git a/Parser/Makefile b/Parser/Makefile deleted file mode 100644 index 5a6ed86bc71525b4b31f4345752d0ed4cf16ef45..0000000000000000000000000000000000000000 --- a/Parser/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshParser${LIBEXT} - -INC = ${DASH}I../Parser ${DASH}I../Common ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Fltk\ - ${DASH}I../Plugin ${DASH}I../contrib/ANN/include - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Gmsh.tab.cpp\ - Gmsh.yy.cpp\ - FunctionManager.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -# Don't optimize Gmsh.tab.o: on many architectures, g++ -O2 generates -# assembly code too large to be addressed correctly -Gmsh.tab${OBJEXT}: - ${CXX} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}c Gmsh.tab.cpp - -parser: - bison -p gmsh_yy --output Gmsh.tab.cpp -d Gmsh.y - if [ -r Gmsh.tab.cpp.h ]; then mv Gmsh.tab.cpp.h Gmsh.tab.hpp ; fi - flex -P gmsh_yy -oGmsh.yy.cpp Gmsh.l - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Gmsh.tab${OBJEXT}: Gmsh.tab.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - ../Numeric/GmshMatrix.h ../Common/MallocUtils.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/Geo.h ../Common/GmshDefines.h \ - ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \ - ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Mesh/Generator.h \ - ../Fltk/Draw.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/Colors.h ../Common/Options.h Parser.h ../Common/OpenFile.h \ - ../Common/CommandLine.h FunctionManager.h ../Common/OS.h \ - ../Common/CreateFile.h ../Mesh/Field.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Post/PView.h ../Mesh/BackgroundMesh.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Plugin/PluginManager.h -Gmsh.yy${OBJEXT}: Gmsh.yy.cpp ../Common/GmshMessage.h ../Geo/Geo.h \ - ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \ - ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \ - ../Common/ListUtils.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \ - ../Common/SmoothData.h Gmsh.tab.hpp -FunctionManager${OBJEXT}: FunctionManager.cpp FunctionManager.h diff --git a/Plugin/Annotate.cpp b/Plugin/Annotate.cpp index 48982e6483358dcafc331062a5593265c9bba1ae..f7c108b603991b0c00f2549ffee3a7ae73b8b31d 100644 --- a/Plugin/Annotate.cpp +++ b/Plugin/Annotate.cpp @@ -12,7 +12,7 @@ #include <FL/gl.h> #include "drawContext.h" #include "Draw.h" -#include "GUI.h" +#include "FlGui.h" #endif StringXNumber AnnotateOptions_Number[] = { diff --git a/Plugin/Annotate.h b/Plugin/Annotate.h index d52e273095c5fa07389dd911363ba6f239597ac2..c10648a2f13f5a365812d10c99c9d9cb86f9945f 100644 --- a/Plugin/Annotate.h +++ b/Plugin/Annotate.h @@ -16,12 +16,12 @@ extern "C" class GMSH_AnnotatePlugin : public GMSH_PostPlugin { -private: + private: static double callback(int num, int action, double value, double *opt, double step, double min, double max); static std::string callbackStr(int num, int action, std::string value, std::string &opt); -public: + public: GMSH_AnnotatePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..1268d34b4048f9c48d5eb203b080b9a9250336db --- /dev/null +++ b/Plugin/CMakeLists.txt @@ -0,0 +1,30 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Plugin.cpp PluginManager.cpp + Levelset.cpp + CutPlane.cpp CutSphere.cpp CutMap.cpp + Smooth.cpp CutParametric.cpp + Lambda2.cpp + Eigenvectors.cpp Eigenvalues.cpp + StreamLines.cpp CutGrid.cpp + Transform.cpp + LongitudeLatitude.cpp + Triangulate.cpp + Warp.cpp SphericalRaise.cpp + Skin.cpp GSHHS.cpp + Extract.cpp ExtractElements.cpp ExtractEdges.cpp + MakeSimplex.cpp + Evaluate.cpp FieldView.cpp + Integrate.cpp Gradient.cpp Curl.cpp Divergence.cpp + Annotate.cpp Remove.cpp + Probe.cpp + HarmonicToTime.cpp ModulusPhase.cpp + FiniteElement.cpp + HomologyComputation.cpp +) + +append_gmsh_src(Plugin "${SRC}") diff --git a/Plugin/Curl.cpp b/Plugin/Curl.cpp index 4407c40d4f276e355afeb0a0330fe7fbd677a100..434b11ab76f3a0c06c19a87c98bc991b5631245e 100644 --- a/Plugin/Curl.cpp +++ b/Plugin/Curl.cpp @@ -25,7 +25,7 @@ void GMSH_CurlPlugin::getName(char *name) const } void GMSH_CurlPlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "C. Geuzaine, J.-F. Remacle"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); @@ -94,7 +94,7 @@ PView *GMSH_CurlPlugin::execute(PView *v) int numNodes = data1->getNumNodes(0, ent, ele); double x[8], y[8], z[8], val[8 * 3]; for(int nod = 0; nod < numNodes; nod++) - data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); + data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); int dim = data1->getDimension(0, ent, ele); elementFactory factory; element *element = factory.create(numNodes, dim, x, y, z); @@ -103,17 +103,17 @@ PView *GMSH_CurlPlugin::execute(PView *v) for(int nod = 0; nod < numNodes; nod++) out->push_back(y[nod]); for(int nod = 0; nod < numNodes; nod++) out->push_back(z[nod]); for(int step = 0; step < data1->getNumTimeSteps(); step++){ - for(int nod = 0; nod < numNodes; nod++) - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); - for(int nod = 0; nod < numNodes; nod++){ - double u, v, w, f[3]; - element->getNode(nod, u, v, w); - element->interpolateCurl(val, u, v, w, f, 3); - out->push_back(f[0]); - out->push_back(f[1]); - out->push_back(f[2]); - } + for(int nod = 0; nod < numNodes; nod++) + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); + for(int nod = 0; nod < numNodes; nod++){ + double u, v, w, f[3]; + element->getNode(nod, u, v, w); + element->interpolateCurl(val, u, v, w, f, 3); + out->push_back(f[0]); + out->push_back(f[1]); + out->push_back(f[2]); + } } delete element; } diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp index 54c6c02796bd588b8e490d74a4a9d5be8c39d30f..8fbf779347ea45cdf194c367eaa2a1b85da94bd4 100644 --- a/Plugin/CutGrid.cpp +++ b/Plugin/CutGrid.cpp @@ -91,55 +91,64 @@ double GMSH_CutGridPlugin::callback(int num, int action, double value, double *o double GMSH_CutGridPlugin::callbackX0(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[0].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackY0(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[1].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackZ0(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[2].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackX1(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[3].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackY1(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[4].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackZ1(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[5].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackX2(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[6].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackY2(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[7].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackZ2(int num, int action, double value) { return callback(num, action, value, &CutGridOptions_Number[8].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutGridPlugin::callbackU(int num, int action, double value) @@ -203,12 +212,12 @@ void GMSH_CutGridPlugin::catchErrorMessage(char *errorMessage) const int GMSH_CutGridPlugin::getNbU() { - return (int)CutGridOptions_Number[9].def; + return (int)CutGridOptions_Number[9].def; } int GMSH_CutGridPlugin::getNbV() { - return (int)CutGridOptions_Number[10].def; + return (int)CutGridOptions_Number[10].def; } void GMSH_CutGridPlugin::getPoint(int iU, int iV, double *X) @@ -217,13 +226,13 @@ void GMSH_CutGridPlugin::getPoint(int iU, int iV, double *X) double v = getNbV() > 1 ? (double)iV / (double)(getNbV() - 1.) : 0.; X[0] = CutGridOptions_Number[0].def + u * (CutGridOptions_Number[3].def-CutGridOptions_Number[0].def) + - v * (CutGridOptions_Number[6].def-CutGridOptions_Number[0].def) ; + v * (CutGridOptions_Number[6].def-CutGridOptions_Number[0].def); X[1] = CutGridOptions_Number[1].def + u * (CutGridOptions_Number[4].def-CutGridOptions_Number[1].def) + - v * (CutGridOptions_Number[7].def-CutGridOptions_Number[1].def) ; + v * (CutGridOptions_Number[7].def-CutGridOptions_Number[1].def); X[2] = CutGridOptions_Number[2].def + u * (CutGridOptions_Number[5].def-CutGridOptions_Number[2].def) + - v * (CutGridOptions_Number[8].def-CutGridOptions_Number[2].def) ; + v * (CutGridOptions_Number[8].def-CutGridOptions_Number[2].def); } void GMSH_CutGridPlugin::addInView(int numsteps, int connect, int nbcomp, diff --git a/Plugin/CutGrid.h b/Plugin/CutGrid.h index 93ef11694ee00fc0846f35e4e2ba10c0328f6348..1bf062abb64d3804e2ab65bfc0ebddf7628a1ccc 100644 --- a/Plugin/CutGrid.h +++ b/Plugin/CutGrid.h @@ -23,7 +23,7 @@ class GMSH_CutGridPlugin : public GMSH_PostPlugin std::vector<double> &L, int *nL, std::vector<double> &Q, int *nQ); PView *GenerateView (PView *v, int connectPoints); -public: + public: GMSH_CutGridPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp index 7d49fee1faa9af95a183827a4fb31a3000be128e..56ad15a07fb0ff2c6221b888d71a4c4e74b1fb7a 100644 --- a/Plugin/CutParametric.cpp +++ b/Plugin/CutParametric.cpp @@ -21,7 +21,7 @@ StringXNumber CutParametricOptions_Number[] = { {GMSH_FULLRC, "MinU", GMSH_CutParametricPlugin::callbackMinU, 0.}, - {GMSH_FULLRC, "MaxU", GMSH_CutParametricPlugin::callbackMaxU, 2*3.1416}, + {GMSH_FULLRC, "MaxU", GMSH_CutParametricPlugin::callbackMaxU, 2 * 3.1416}, {GMSH_FULLRC, "nPointsU", GMSH_CutParametricPlugin::callbackN, 360.}, {GMSH_FULLRC, "ConnectPoints", GMSH_CutParametricPlugin::callbackConnect, 0.}, {GMSH_FULLRC, "iView", NULL, -1.} @@ -93,9 +93,9 @@ int GMSH_CutParametricPlugin::fillXYZ() for(int i = 0; i < nbU; ++i){ char *names[] = { "u" }; double values[] = { getU(i) }; - x[i] = evaluator_evaluate(fx, sizeof(names)/sizeof(names[0]), names, values); - y[i] = evaluator_evaluate(fy, sizeof(names)/sizeof(names[0]), names, values); - z[i] = evaluator_evaluate(fz, sizeof(names)/sizeof(names[0]), names, values); + x[i] = evaluator_evaluate(fx, sizeof(names) / sizeof(names[0]), names, values); + y[i] = evaluator_evaluate(fy, sizeof(names) / sizeof(names[0]), names, values); + z[i] = evaluator_evaluate(fz, sizeof(names) / sizeof(names[0]), names, values); } return 1; #endif diff --git a/Plugin/CutParametric.h b/Plugin/CutParametric.h index 875ce30950757e65c6dd0a9c0a0a31015349d6aa..3acd85b8a7999696cf144ce9950a988230b5dc42 100644 --- a/Plugin/CutParametric.h +++ b/Plugin/CutParametric.h @@ -17,7 +17,7 @@ extern "C" class GMSH_CutParametricPlugin : public GMSH_PostPlugin { -private: + private: static double callback(int num, int action, double value, double *opt, double step, double min, double max); static std::string callbackStr(int num, int action, std::string value, @@ -25,7 +25,7 @@ private: static int fillXYZ(); static int recompute; static std::vector<double> x, y, z; -public: + public: GMSH_CutParametricPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp index 4fb9bfe9e942b68b04894e19d4a6736e03fe6d70..009fc8c8de9c3ce5340500cb436bcd54a9ffc37b 100644 --- a/Plugin/CutPlane.cpp +++ b/Plugin/CutPlane.cpp @@ -41,7 +41,7 @@ void GMSH_CutPlanePlugin::draw(void *context) if(num < 0) num = iview; if(num >= 0 && num < (int)PView::list.size()){ glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glLineWidth(CTX::instance()->lineWidth); + glLineWidth((float)CTX::instance()->lineWidth); SBoundingBox3d bb = PView::list[num]->getData()->getBoundingBox(); ctx->drawPlaneInBoundingBox(bb.min().x(), bb.min().y(), bb.min().z(), bb.max().x(), bb.max().y(), bb.max().z(), @@ -91,7 +91,8 @@ double GMSH_CutPlanePlugin::callbackC(int num, int action, double value) double GMSH_CutPlanePlugin::callbackD(int num, int action, double value) { return callback(num, action, value, &CutPlaneOptions_Number[3].def, - CTX::instance()->lc/200., -CTX::instance()->lc, CTX::instance()->lc); + CTX::instance()->lc / 200., -CTX::instance()->lc, + CTX::instance()->lc); } double GMSH_CutPlanePlugin::callbackVol(int num, int action, double value) @@ -150,8 +151,7 @@ void GMSH_CutPlanePlugin::catchErrorMessage(char *errorMessage) const double GMSH_CutPlanePlugin::levelset(double x, double y, double z, double val) const { - return CutPlaneOptions_Number[0].def * x + - CutPlaneOptions_Number[1].def * y + + return CutPlaneOptions_Number[0].def * x + CutPlaneOptions_Number[1].def * y + CutPlaneOptions_Number[2].def * z + CutPlaneOptions_Number[3].def; } diff --git a/Plugin/CutPlane.h b/Plugin/CutPlane.h index afe0f7d19ba2a346f5593716de295db9fa004499..be1bcab398bb825be6a29c558a7078379db61212 100644 --- a/Plugin/CutPlane.h +++ b/Plugin/CutPlane.h @@ -19,7 +19,7 @@ class GMSH_CutPlanePlugin : public GMSH_LevelsetPlugin static double callback(int num, int action, double value, double *opt, double step, double min, double max); static int iview; -public: + public: GMSH_CutPlanePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp index 04438863b82189e9a6c96e99152ed39addc95b65..0e8a2523c0a802a08e41cd9d3e884f85d0c53b17 100644 --- a/Plugin/CutSphere.cpp +++ b/Plugin/CutSphere.cpp @@ -38,7 +38,7 @@ void GMSH_CutSpherePlugin::draw(void *context) glGetIntegerv(GL_POLYGON_MODE, mode); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glLineWidth(CTX::instance()->lineWidth); + glLineWidth((float)CTX::instance()->lineWidth); drawContext *ctx = (drawContext*)context; ctx->drawSphere(CutSphereOptions_Number[3].def, CutSphereOptions_Number[0].def, @@ -67,25 +67,28 @@ double GMSH_CutSpherePlugin::callback(int num, int action, double value, double double GMSH_CutSpherePlugin::callbackX(int num, int action, double value) { return callback(num, action, value, &CutSphereOptions_Number[0].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., - 2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutSpherePlugin::callbackY(int num, int action, double value) { return callback(num, action, value, &CutSphereOptions_Number[1].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutSpherePlugin::callbackZ(int num, int action, double value) { return callback(num, action, value, &CutSphereOptions_Number[2].def, - CTX::instance()->lc/100., -2*CTX::instance()->lc, 2*CTX::instance()->lc); + CTX::instance()->lc / 100., -2 * CTX::instance()->lc, + 2 * CTX::instance()->lc); } double GMSH_CutSpherePlugin::callbackR(int num, int action, double value) { return callback(num, action, value, &CutSphereOptions_Number[3].def, - CTX::instance()->lc/100., 0., 2*CTX::instance()->lc); + CTX::instance()->lc / 100., 0., 2 * CTX::instance()->lc); } double GMSH_CutSpherePlugin::callbackVol(int num, int action, double value) diff --git a/Plugin/CutSphere.h b/Plugin/CutSphere.h index 45956ac320b8fae78ef533e7dda9ae09b1f9a2c7..d0692fecd38d1137fd89ea1dca85db8c07ce327b 100644 --- a/Plugin/CutSphere.h +++ b/Plugin/CutSphere.h @@ -18,7 +18,7 @@ class GMSH_CutSpherePlugin : public GMSH_LevelsetPlugin double levelset(double x, double y, double z, double val) const; static double callback(int num, int action, double value, double *opt, double step, double min, double max); -public: + public: GMSH_CutSpherePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Divergence.cpp b/Plugin/Divergence.cpp index b81434f14a00835a6cef2bbc1d867c0d191062f4..a64144152f7c5834fa8c5037bc3ae51ce7fcc2ad 100644 --- a/Plugin/Divergence.cpp +++ b/Plugin/Divergence.cpp @@ -25,7 +25,7 @@ void GMSH_DivergencePlugin::getName(char *name) const } void GMSH_DivergencePlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "C. Geuzaine, J.-F. Remacle"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); @@ -94,7 +94,7 @@ PView *GMSH_DivergencePlugin::execute(PView *v) int numNodes = data1->getNumNodes(0, ent, ele); double x[8], y[8], z[8], val[8 * 3]; for(int nod = 0; nod < numNodes; nod++) - data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); + data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); int dim = data1->getDimension(0, ent, ele); elementFactory factory; element *element = factory.create(numNodes, dim, x, y, z); @@ -103,15 +103,15 @@ PView *GMSH_DivergencePlugin::execute(PView *v) for(int nod = 0; nod < numNodes; nod++) out->push_back(y[nod]); for(int nod = 0; nod < numNodes; nod++) out->push_back(z[nod]); for(int step = 0; step < data1->getNumTimeSteps(); step++){ - for(int nod = 0; nod < numNodes; nod++) - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); - for(int nod = 0; nod < numNodes; nod++){ - double u, v, w; - element->getNode(nod, u, v, w); - double f = element->interpolateDiv(val, u, v, w, 3); - out->push_back(f); - } + for(int nod = 0; nod < numNodes; nod++) + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); + for(int nod = 0; nod < numNodes; nod++){ + double u, v, w; + element->getNode(nod, u, v, w); + double f = element->interpolateDiv(val, u, v, w, 3); + out->push_back(f); + } } delete element; } diff --git a/Plugin/Eigenvalues.cpp b/Plugin/Eigenvalues.cpp index bc285d89f69419e93b53baaaa9f124f2b81d3e7c..6dc711a4565fe2d61086a94aeaf27e3311b1f1a9 100644 --- a/Plugin/Eigenvalues.cpp +++ b/Plugin/Eigenvalues.cpp @@ -100,27 +100,27 @@ PView *GMSH_EigenvaluesPlugin::execute(PView *v) int numNodes = data1->getNumNodes(0, ent, ele); double xyz[3][8]; for(int nod = 0; nod < numNodes; nod++) - data1->getNode(0, ent, ele, nod, xyz[0][nod], xyz[1][nod], xyz[2][nod]); + data1->getNode(0, ent, ele, nod, xyz[0][nod], xyz[1][nod], xyz[2][nod]); for(int i = 0; i < 3; i++){ - for(int nod = 0; nod < numNodes; nod++){ - outmin->push_back(xyz[i][nod]); - outmid->push_back(xyz[i][nod]); - outmax->push_back(xyz[i][nod]); - } + for(int nod = 0; nod < numNodes; nod++){ + outmin->push_back(xyz[i][nod]); + outmid->push_back(xyz[i][nod]); + outmax->push_back(xyz[i][nod]); + } } for(int step = 0; step < data1->getNumTimeSteps(); step++){ - for(int nod = 0; nod < numNodes; nod++){ - double val[9], w[3]; - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[comp]); - double A[3][3] = {{val[0], val[1], val[2]}, - {val[3], val[4], val[5]}, - {val[6], val[7], val[8]}}; - eigenvalue(A, w); - outmin->push_back(w[2]); - outmid->push_back(w[1]); - outmax->push_back(w[0]); - } + for(int nod = 0; nod < numNodes; nod++){ + double val[9], w[3]; + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[comp]); + double A[3][3] = {{val[0], val[1], val[2]}, + {val[3], val[4], val[5]}, + {val[6], val[7], val[8]}}; + eigenvalue(A, w); + outmin->push_back(w[2]); + outmid->push_back(w[1]); + outmax->push_back(w[0]); + } } } } diff --git a/Plugin/Eigenvectors.cpp b/Plugin/Eigenvectors.cpp index fa869e61a77314354394b9bd7c9dd07c6041e0ff..8992a1624ebabb078a56bb2b44eddcadb0f5c9a9 100644 --- a/Plugin/Eigenvectors.cpp +++ b/Plugin/Eigenvectors.cpp @@ -118,33 +118,33 @@ PView *GMSH_EigenvectorsPlugin::execute(PView *v) int numNodes = data1->getNumNodes(0, ent, ele); double xyz[3][8]; for(int nod = 0; nod < numNodes; nod++) - data1->getNode(0, ent, ele, nod, xyz[0][nod], xyz[1][nod], xyz[2][nod]); + data1->getNode(0, ent, ele, nod, xyz[0][nod], xyz[1][nod], xyz[2][nod]); for(int i = 0; i < 3; i++){ - for(int nod = 0; nod < numNodes; nod++){ - outmin->push_back(xyz[i][nod]); - outmid->push_back(xyz[i][nod]); - outmax->push_back(xyz[i][nod]); - } + for(int nod = 0; nod < numNodes; nod++){ + outmin->push_back(xyz[i][nod]); + outmid->push_back(xyz[i][nod]); + outmax->push_back(xyz[i][nod]); + } } for(int step = 0; step < data1->getNumTimeSteps(); step++){ - for(int nod = 0; nod < numNodes; nod++){ - double val[9]; - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[comp]); - double wr[3], wi[3], B[9]; - if(!EigSolve3x3(val, wr, wi, B)) - Msg::Error("Eigensolver failed to converge"); - nbcomplex += nonzero(wi); - if(!scale) wr[0] = wr[1] = wr[2] = 1.; - for(int i = 0; i < 3; i++){ - double res; - // wrong if there are complex eigenvals (B contains both - // real and imag parts: cf. explanation in EigSolve.cpp) - res = wr[0] * B[i]; outmin->push_back(res); - res = wr[1] * B[3 + i]; outmid->push_back(res); - res = wr[2] * B[6 + i]; outmax->push_back(res); - } - } + for(int nod = 0; nod < numNodes; nod++){ + double val[9]; + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[comp]); + double wr[3], wi[3], B[9]; + if(!EigSolve3x3(val, wr, wi, B)) + Msg::Error("Eigensolver failed to converge"); + nbcomplex += nonzero(wi); + if(!scale) wr[0] = wr[1] = wr[2] = 1.; + for(int i = 0; i < 3; i++){ + double res; + // wrong if there are complex eigenvals (B contains both + // real and imag parts: cf. explanation in EigSolve.cpp) + res = wr[0] * B[i]; outmin->push_back(res); + res = wr[1] * B[3 + i]; outmid->push_back(res); + res = wr[2] * B[6 + i]; outmax->push_back(res); + } + } } } } diff --git a/Plugin/Evaluate.cpp b/Plugin/Evaluate.cpp index f8ede37a7a8ccbe68c97eb49314bae5479135eaa..f06e8a5fb5ab08b5053c9d23cc559ce20e150ce9 100644 --- a/Plugin/Evaluate.cpp +++ b/Plugin/Evaluate.cpp @@ -181,15 +181,15 @@ PView *GMSH_EvaluatePlugin::execute(PView *v) // tag all the nodes with "0" (the default tag) for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; + if(data1->skipElement(step, ent, ele)) continue; int numComp = data1->getNumComponents(step, ent, ele); int numComp2 = data2->getNumComponents(step2, ent, ele); for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){ @@ -197,8 +197,8 @@ PView *GMSH_EvaluatePlugin::execute(PView *v) int tag = data1->getNode(step, ent, ele, nod, x, y, z); if(tag) continue; // node has already been modified std::vector<double> v(numComp, 0.), w(numComp2, 0.); - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, v[comp]); + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, v[comp]); if(octree){ if(!octree->searchScalar(x, y, z, &w[0], step2)) if(!octree->searchVector(x, y, z, &w[0], step2)) @@ -208,7 +208,7 @@ PView *GMSH_EvaluatePlugin::execute(PView *v) for(int comp = 0; comp < numComp2; comp++) data2->getValue(step2, ent, ele, nod, comp, w[comp]); - for(int comp = 0; comp < numComp; comp++){ + for(int comp = 0; comp < numComp; comp++){ if(component >= 0 && component != comp) continue; char *names[] = {"x", "y", "z", "Time", "TimeStep", diff --git a/Plugin/Evaluate.h b/Plugin/Evaluate.h index 6f9c686e954b3f4c02066d079a1df6e56a0a0a46..adf2937e07144a9a8be1d7d6c9b87fb4bc1a9cbe 100644 --- a/Plugin/Evaluate.h +++ b/Plugin/Evaluate.h @@ -15,7 +15,7 @@ extern "C" class GMSH_EvaluatePlugin : public GMSH_PostPlugin { -public: + public: GMSH_EvaluatePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Extract.cpp b/Plugin/Extract.cpp index febc5a1152dccf068fea34a07bc5b7c75162d98b..a515275fe474066cc5616bc6a525d7538c90ebe8 100644 --- a/Plugin/Extract.cpp +++ b/Plugin/Extract.cpp @@ -248,7 +248,7 @@ PView *GMSH_ExtractPlugin::execute(PView *v) for(int nod = 0; nod < numNodes; nod++){ std::vector<double> v(numComp); for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, v[comp]); + data1->getValue(step, ent, ele, nod, comp, v[comp]); for(int comp = 0; comp < numComp2; comp++){ #if defined(HAVE_MATH_EVAL) char *names[] = { "x", "y", "z", "v0", "v1", "v2", diff --git a/Plugin/FiniteElement.cpp b/Plugin/FiniteElement.cpp index 3dd214efd7d7297a3f55a0ea02cca1aad25fe33e..b10fd745f11dded29873a7cf442a19bec12470e2 100644 --- a/Plugin/FiniteElement.cpp +++ b/Plugin/FiniteElement.cpp @@ -192,7 +192,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v) for (unsigned int i = 0; i < vertices.size(); i++) data[vertices[i]->getNum()].push_back (s.myAssembler->getDofValue(vertices[i], 0, 1)); - PView *pv = new PView("projection", "NodeData", m, data, 0.); + new PView("projection", "NodeData", m, data, 0.); } else if(equation == "Laplace"){ solver<double> s; @@ -205,7 +205,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v) for (unsigned int i = 0; i < vertices.size(); i++) data[vertices[i]->getNum()].push_back (s.myAssembler->getDofValue(vertices[i], 0, 1)); - PView *pv = new PView("laplace", "NodeData", m, data, 0.); + new PView("laplace", "NodeData", m, data, 0.); } else if(equation == "Helmholtz"){ solver<std::complex<double> > s; diff --git a/Plugin/FiniteElement.h b/Plugin/FiniteElement.h index 7eaa1b7948f11a416027f30768a0be7e231c3891..fd8c92b75e52cbed9639e280d199b67e69c75333 100644 --- a/Plugin/FiniteElement.h +++ b/Plugin/FiniteElement.h @@ -15,7 +15,7 @@ extern "C" class GMSH_FiniteElementPlugin : public GMSH_PostPlugin { -public: + public: GMSH_FiniteElementPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/GSHHS.cpp b/Plugin/GSHHS.cpp index 086ea15c6b0d47f0c6709e177b4ceb2e7c46a97f..37af2a83b464bae6ac5f8e0c196dac6690f2f08f 100644 --- a/Plugin/GSHHS.cpp +++ b/Plugin/GSHHS.cpp @@ -9,828 +9,872 @@ #include "GSHHS.h" #include "GModel.h" -class GMSH_GSHHSPlugin:public GMSH_PostPlugin +class GMSH_GSHHSPlugin : public GMSH_PostPlugin { +public: + // ************** Inputs (readers) ************* + class reader{ public: - // ************** Inputs (readers) ************* - class reader{ - public: - virtual int next_loop(bool &closed)=0; - virtual bool next_point(SPoint3 &point)=0; - }; - class reader_loops2:public reader{ - FILE *fp; - int npoints_in_loop; - int ipoint; - std::string filename; - public: - reader_loops2(std::string _filename){ - filename=_filename; - fp=fopen(filename.c_str(),"r"); - } - ~reader_loops2(){ - fclose(fp); - } - int next_loop(bool & closed){ - ipoint=0; - npoints_in_loop=-1; - int i_closed; - if(fscanf(fp, "%d %d", &npoints_in_loop,&i_closed) != 2) - return 0; - closed = i_closed; - return npoints_in_loop; - } - bool next_point(SPoint3 &point){ - if(ipoint>=npoints_in_loop) - return false; - point[2]=0; - ipoint++; - if(fscanf(fp, "%le %le", &point[0], &point[1]) != 2) - Msg::Error("gshhs: Error reading loops2 file.\n"); - return true; - } + virtual int next_loop(bool &closed)=0; + virtual bool next_point(SPoint3 &point)=0; + virtual ~reader(){} + }; + class reader_loops2 : public reader{ + FILE *fp; + int npoints_in_loop; + int ipoint; + std::string filename; + public: + reader_loops2(std::string _filename) + { + filename = _filename; + fp = fopen(filename.c_str(), "r"); + } + virtual ~reader_loops2() + { + fclose(fp); + } + int next_loop(bool & closed) + { + ipoint = 0; + npoints_in_loop = -1; + int i_closed; + if(fscanf(fp, "%d %d", &npoints_in_loop, &i_closed) != 2) + return 0; + closed = i_closed; + return npoints_in_loop; + } + bool next_point(SPoint3 &point) + { + if(ipoint >= npoints_in_loop) + return false; + point[2] = 0; + ipoint++; + if(fscanf(fp, "%le %le", &point[0], &point[1]) != 2) + Msg::Error("gshhs: Error reading loops2 file.\n"); + return true; + } + }; + class reader_gshhs : public reader{ + /* $Id: GSHHS.cpp,v 1.31 2009-08-14 08:25:16 geuzaine Exp $ + * + * Include file defining structures used in gshhs.c + * + * Paul Wessel, SOEST + * + * Copyright (c) 1996-2008 by P. Wessel and W. H. F. Smith + * See COPYING file for copying and redistribution conditions. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Contact info: www.soest.hawaii.edu/pwessel + * + * 14-SEP-2004. PW: Version 1.3. Header is now n * 8 bytes (n = 5) + * For use with version 1.3 of GSHHS + * 2-MAY-2006. PW: Version 1.4. Header is now 32 bytes (all int 4) + * For use with version 1.4 of GSHHS + * 31-MAR-2007. PW: Version 1.5. no format change + * For use with version 1.5 of GSHHS + * 28-AUG-2007. PW: Version 1.6. no format change + * For use with version 1.6 of GSHHS which now has WDBII + * borders and rivers. + */ +#define GSHHS_DATA_VERSION 6 // For v1.5 data set + //define GSHHS_PROG_VERSION "1.9" +#define GSHHS_SCL 1.0e-6 // COnvert micro-degrees to degrees + inline unsigned int swabi4(unsigned int i4) + { // For byte swapping on little-endian systems (GSHHS is defined to be bigendian) + return (((i4) >> 24) + (((i4) >> 8) & 65280) + (((i4) & 65280) << 8) + (((i4) & 255) << 24)); + } + class POINT { /* Each lon, lat pair is stored in micro-degrees in 4-byte integer format */ + public: + int x; + int y; }; - class reader_gshhs:public reader{ - /* $Id: GSHHS.cpp,v 1.30 2009-04-20 08:47:13 remacle Exp $ - * - * Include file defining structures used in gshhs.c - * - * Paul Wessel, SOEST - * - * Copyright (c) 1996-2008 by P. Wessel and W. H. F. Smith - * See COPYING file for copying and redistribution conditions. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Contact info: www.soest.hawaii.edu/pwessel - * - * 14-SEP-2004. PW: Version 1.3. Header is now n * 8 bytes (n = 5) - * For use with version 1.3 of GSHHS - * 2-MAY-2006. PW: Version 1.4. Header is now 32 bytes (all int 4) - * For use with version 1.4 of GSHHS - * 31-MAR-2007. PW: Version 1.5. no format change - * For use with version 1.5 of GSHHS - * 28-AUG-2007. PW: Version 1.6. no format change - * For use with version 1.6 of GSHHS which now has WDBII - * borders and rivers. + class GSHHS { /* Global Self-consistent Hierarchical High-resolution Shorelines */ + public: + int id; /* Unique polygon id number, starting at 0 */ + int n; /* Number of points in this polygon */ + int flag; /* = level + version << 8 + greenwich << 16 + source << 24 */ + /* flag contains 4 items, one in each byte, as follows: + * low byte: level = flag & 255: Values: 1 land, 2 lake, 3 island_in_lake, 4 pond_in_island_in_lake + * 2nd byte: version = (flag >> 8) & 255: Values: Should be 4 for GSHHS version 1.4 + * 3rd byte: greenwich = (flag >> 16) & 255: Values: Greenwich is 1 if Greenwich is crossed + * 4th byte: source = (flag >> 24) & 255: Values: 0 = CIA WDBII, 1 = WVS */ -#define GSHHS_DATA_VERSION 6 // For v1.5 data set - //define GSHHS_PROG_VERSION "1.9" -#define GSHHS_SCL 1.0e-6 // COnvert micro-degrees to degrees - inline unsigned int swabi4(unsigned int i4){ // For byte swapping on little-endian systems (GSHHS is defined to be bigendian) - return (((i4) >> 24) + (((i4) >> 8) & 65280) + (((i4) & 65280) << 8) + (((i4) & 255) << 24)); - } - class POINT { /* Each lon, lat pair is stored in micro-degrees in 4-byte integer format */ - public: - int x; - int y; - }; - class GSHHS { /* Global Self-consistent Hierarchical High-resolution Shorelines */ - public: - int id; /* Unique polygon id number, starting at 0 */ - int n; /* Number of points in this polygon */ - int flag; /* = level + version << 8 + greenwich << 16 + source << 24 */ - /* flag contains 4 items, one in each byte, as follows: - * low byte: level = flag & 255: Values: 1 land, 2 lake, 3 island_in_lake, 4 pond_in_island_in_lake - * 2nd byte: version = (flag >> 8) & 255: Values: Should be 4 for GSHHS version 1.4 - * 3rd byte: greenwich = (flag >> 16) & 255: Values: Greenwich is 1 if Greenwich is crossed - * 4th byte: source = (flag >> 24) & 255: Values: 0 = CIA WDBII, 1 = WVS - */ - int west, east, south, north; /* min/max extent in micro-degrees */ - int area; /* Area of polygon in 1/10 km^2 */ - }; - GSHHS h; - POINT p; - FILE *fp; - int max_east,flip,ip,greenwich; - bool first_loop; - public: - reader_gshhs(std::string filename){ - fp=fopen(filename.c_str(),"rb"); - max_east = 270000000; - first_loop=true; - } - ~reader_gshhs(){ - fclose(fp); - } - int next_loop(bool &closed){ - closed=true; - int level=0; - ip=0; - while(level!=1){ - int n_read = fread ((void *)&h, (size_t)sizeof (struct GSHHS), (size_t)1, fp); - if(n_read!=1 || feof(fp)) - return 0; - level = h.flag & 255; - int version = (h.flag >> 8) & 255; - flip = (version != GSHHS_DATA_VERSION); /* Take as sign that byte-swabbing is needed */ - if (flip) { - h.id = swabi4 ((unsigned int)h.id); - h.n = swabi4 ((unsigned int)h.n); - h.west = swabi4 ((unsigned int)h.west); - h.east = swabi4 ((unsigned int)h.east); - h.south = swabi4 ((unsigned int)h.south); - h.north = swabi4 ((unsigned int)h.north); - h.area = swabi4 ((unsigned int)h.area); - h.flag = swabi4 ((unsigned int)h.flag); - } - if(level!=1) - fseek(fp, (size_t)(h.n * sizeof(struct POINT)), SEEK_CUR); - if(first_loop) - first_loop=false; - else - max_east = 180000000; /* Only Eurasiafrica needs 270 */ - } - greenwich = (h.flag >> 16) & 255; - int src = (h.flag >> 24) & 255; - double w = h.west * GSHHS_SCL; /* Convert from microdegrees to degrees */ - double e = h.east * GSHHS_SCL; - double s = h.south * GSHHS_SCL; - double n = h.north * GSHHS_SCL; - char source = (src == 1) ? 'W' : 'C'; /* Either WVS or CIA (WDBII) pedigree */ - int line = (h.area) ? 0 : 1; /* Either Polygon (0) or Line (1) (if no area) */ - double area = 0.1 * h.area; /* Now im km^2 */ - return h.n; - } - bool next_point(SPoint3 &point){ - if(ip>=h.n) - return false; - if (fread ((void *)&p, (size_t)sizeof(struct POINT), (size_t)1, fp) != 1) { - printf ("gshhs: Error reading gshhs file.\n"); - exit(1); - } + int west, east, south, north; /* min/max extent in micro-degrees */ + int area; /* Area of polygon in 1/10 km^2 */ + }; + GSHHS h; + POINT p; + FILE *fp; + int max_east,flip,ip,greenwich; + bool first_loop; + public: + reader_gshhs(std::string filename) + { + fp = fopen(filename.c_str(),"rb"); + max_east = 270000000; + first_loop = true; + } + ~reader_gshhs() + { + fclose(fp); + } + int next_loop(bool &closed) + { + closed = true; + int level = 0; + ip = 0; + while(level != 1){ + int n_read = fread ((void *)&h, (size_t)sizeof (GSHHS), (size_t)1, fp); + if(n_read != 1 || feof(fp)) + return 0; + level = h.flag & 255; + int version = (h.flag >> 8) & 255; + flip = (version != GSHHS_DATA_VERSION); /* Take as sign that byte-swabbing is needed */ if (flip) { - p.x = swabi4 ((unsigned int)p.x); - p.y = swabi4 ((unsigned int)p.y); + h.id = swabi4 ((unsigned int)h.id); + h.n = swabi4 ((unsigned int)h.n); + h.west = swabi4 ((unsigned int)h.west); + h.east = swabi4 ((unsigned int)h.east); + h.south = swabi4 ((unsigned int)h.south); + h.north = swabi4 ((unsigned int)h.north); + h.area = swabi4 ((unsigned int)h.area); + h.flag = swabi4 ((unsigned int)h.flag); } - double lon = p.x * GSHHS_SCL; - if (greenwich && p.x > max_east) - lon -= 360.0; - double lat = p.y * GSHHS_SCL; - point[0]=lon*M_PI/180; - point[1]=lat*M_PI/180; - point[2]=0; - ip++; - return true; - } - }; - - // ************** Coordinate Systems ************* - class coordinate_system{ - public: - virtual void to_cartesian(const SPoint3 coord, SPoint3 &cartesian)=0; - virtual void from_cartesian(const SPoint3 cartesian, SPoint3 &coord)=0; - }; - // ************** Longitude Latitude *************** - class coordinate_lonlat:public coordinate_system{ - double radius; - public: - coordinate_lonlat(double r){ - radius=r; + if(level!=1) + fseek(fp, (size_t)(h.n * sizeof(POINT)), SEEK_CUR); + if(first_loop) + first_loop=false; + else + max_east = 180000000; /* Only Eurasiafrica needs 270 */ } - void to_cartesian(const SPoint3 ll, SPoint3 &xyz){ - double clat = cos(ll.y()); - xyz.setPosition( clat * cos(ll.x())*radius, clat * sin(ll.x())*radius, sin(ll.y())*radius); - } - void from_cartesian(const SPoint3 xyz, SPoint3 &ll){ - double r=sqrt(xyz.x()*xyz.x()+xyz.y()*xyz.y()+xyz.z()*xyz.z()); - ll.setPosition( atan2(xyz.y(),xyz.x()), asin(xyz.z()/r), r); - } - }; - // ************** Longitude Latitude (degrees) *************** - class coordinate_lonlat_degrees:public coordinate_system{ - coordinate_lonlat cll; - SPoint3 llradian; - public: - coordinate_lonlat_degrees(double r):cll(r){}; - void to_cartesian(const SPoint3 ll, SPoint3 &xyz){ - llradian.setPosition(ll.x()*M_PI/180,ll.y()*M_PI/180,0); - cll.to_cartesian(llradian,xyz); + greenwich = (h.flag >> 16) & 255; + //int src = (h.flag >> 24) & 255; + //double w = h.west * GSHHS_SCL; /* Convert from microdegrees to degrees */ + //double e = h.east * GSHHS_SCL; + //double s = h.south * GSHHS_SCL; + //double n = h.north * GSHHS_SCL; + //char source = (src == 1) ? 'W' : 'C'; /* Either WVS or CIA (WDBII) pedigree */ + //int line = (h.area) ? 0 : 1; /* Either Polygon (0) or Line (1) (if no area) */ + //double area = 0.1 * h.area; /* Now im km^2 */ + return h.n; + } + bool next_point(SPoint3 &point) + { + if(ip >= h.n) + return false; + if (fread ((void *)&p, (size_t)sizeof(POINT), (size_t)1, fp) != 1) { + printf ("gshhs: Error reading gshhs file.\n"); + exit(1); } - void from_cartesian(const SPoint3 xyz, SPoint3 &ll){ - cll.from_cartesian(xyz,llradian); - ll.setPosition(llradian.x()*180/M_PI,llradian.y()*180/M_PI,0); + if (flip) { + p.x = swabi4 ((unsigned int)p.x); + p.y = swabi4 ((unsigned int)p.y); } - }; + double lon = p.x * GSHHS_SCL; + if (greenwich && p.x > max_east) + lon -= 360.0; + double lat = p.y * GSHHS_SCL; + point[0] = lon * M_PI / 180; + point[1] = lat * M_PI / 180; + point[2] = 0; + ip++; + return true; + } + }; - // ************** UTM ************** - class coordinate_utm :public coordinate_system{ - int zone; - coordinate_lonlat ll_conv; - SPoint3 ll; - double a, b, n, n2, n3, n4, n5, e, e2, e1, e12, e13, e14, J1, J2, J3, J4, - Ap, Bp, Cp, Dp, Ep, e4, e6, ep, ep2, ep4, k0, mu_fact; - public: - static int get_zone_from_longitude(double lon){ - return (int)ceil((lon / M_PI + 1) * 30); + // ************** Coordinate Systems ************* + class coordinate_system{ + public: + virtual void to_cartesian(const SPoint3 coord, SPoint3 &cartesian)=0; + virtual void from_cartesian(const SPoint3 cartesian, SPoint3 &coord)=0; + virtual ~coordinate_system(){} + }; + // ************** Longitude Latitude *************** + class coordinate_lonlat : public coordinate_system{ + double radius; + public: + coordinate_lonlat(double r) + { + radius = r; + } + void to_cartesian(const SPoint3 ll, SPoint3 &xyz) + { + double clat = cos(ll.y()); + xyz.setPosition(clat * cos(ll.x()) * radius, clat * sin(ll.x()) * radius, sin(ll.y()) * radius); + } + void from_cartesian(const SPoint3 xyz, SPoint3 &ll) + { + double r = sqrt(xyz.x() * xyz.x() + xyz.y() * xyz.y() + xyz.z() * xyz.z()); + ll.setPosition(atan2(xyz.y(), xyz.x()), asin(xyz.z() / r), r); + } + }; + // ************** Longitude Latitude (degrees) *************** + class coordinate_lonlat_degrees : public coordinate_system{ + coordinate_lonlat cll; + SPoint3 llradian; + public: + coordinate_lonlat_degrees(double r) : cll(r){}; + void to_cartesian(const SPoint3 ll, SPoint3 &xyz) + { + llradian.setPosition(ll.x() * M_PI / 180, ll.y() * M_PI / 180, 0); + cll.to_cartesian(llradian, xyz); + } + void from_cartesian(const SPoint3 xyz, SPoint3 &ll){ + cll.from_cartesian(xyz, llradian); + ll.setPosition(llradian.x() * 180 / M_PI, llradian.y() * 180 / M_PI, 0); + } + }; + + // ************** UTM ************** + class coordinate_utm : public coordinate_system{ + int zone; + coordinate_lonlat ll_conv; + SPoint3 ll; + double a, b, n, n2, n3, n4, n5, e, e2, e1, e12, e13, e14, J1, J2, J3, J4, + Ap, Bp, Cp, Dp, Ep, e4, e6, ep, ep2, ep4, k0, mu_fact; + public: + static int get_zone_from_longitude(double lon) + { + return (int)ceil((lon / M_PI + 1) * 30); + } + double meridionalarc(double lon, double lat) + { + return Ap * lat + Bp * sin(2 * lat) + Cp * sin(4 * lat) + + Dp * sin(6 * lat) + Ep; + } + void from_cartesian(const SPoint3 xyz,SPoint3 &utm) + { + ll_conv.from_cartesian(xyz,ll); + double S = meridionalarc(ll.x(),ll.y()); + double slat = sin(ll.y()); + double clat = cos(ll.y()); + double slat2 = slat * slat; + double clat2 = clat * clat; + double clat3 = clat2 * clat; + double clat4 = clat3 * clat; + double tlat2 = slat2 / clat2; + double nu = a / sqrt(1 - e * e * slat2); + double p = ll.x() - ((zone - 0.5) / 30 - 1) * M_PI; + double p2 = p * p; + double p3 = p * p2; + double p4 = p2 * p2; + utm.setPosition(k0 * nu * clat * p + (k0 * nu * clat3 / 6) + * (1 - tlat2 + ep2 * clat2) * p3 + 5e5, + S * k0 + k0 * nu * slat * clat / 2 * p2 + + k0 * nu * slat * clat3 / 24 + * (5 - tlat2 + 9 * ep2 * clat2 + 4 * ep4 * clat4) * p4, + 0); + } + void to_cartesian(const SPoint3 utm, SPoint3 &xyz) + { + double mu = utm.y() * mu_fact; + double fp = + mu + J1 * sin(2 * mu) + J2 * sin(4 * mu) + J3 * sin(6 * mu) + + J4 * sin(8 * mu); + double cfp = cos(fp); + double cfp2 = cfp * cfp; + double sfp = sin(fp); + double sfp2 = sfp * sfp; + double c1 = ep2 * cfp2; + double c12 = c1 * c1; + double t1 = sfp2 / cfp2; + double t12 = t1 * t1; + double r1 = a * (1 - e2) / pow((1 - e2 * sfp2), 1.5); + double n1 = a / sqrt(1 - e2 * sfp2); + double d = (utm.x() - 5e5) / (n1 * k0); + double d2 = d * d; + double d3 = d2 * d; + double d4 = d2 * d2; + double d5 = d4 * d; + double d6 = d4 * d2; + ll.setPosition( + ((zone - 0.5) / 30 - 1) * M_PI + (d - (1 + 2 * t1 + c1) * d3 / 6 + + (5 - 2 * c1 + 28 * t1 - 3 * c12 + + 8 * ep2 + + 24 * t12) * d5 / 120) / cfp, + fp - n1 * sfp / cfp / r1 + * (d2 / 2 - (5 + 3 * t1 + 10 * c1 - 4 * c12 - 9 * ep2) * d4 / 24 + + (61 + 90 * t1 + 298 * c1 + 45 * t12 - 3 * c12 - 252 * ep2) * d6 / 720), + 0); + ll_conv.to_cartesian(ll,xyz); + } + coordinate_utm(int _zone,double ll_radius, double _a = 6378137, double _b = 6356752.3142) : ll_conv(ll_radius) + { + /* see http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM */ + a = _a; /* Equatorial Radius*/ + b = _b; /* Rayon Polar Radius*/ + zone=_zone; + n = (a - b) / (a + b); + n2 = n * n; + n3 = n * n * n; + n4 = n * n * n * n; + n5 = n * n * n * n * n; + e = sqrt(1 - b * b / a / a); + e2 = e * e; + e1 = (1 - sqrt(1 - e2)) / (1 + sqrt(1 - e2)); + e12 = e1 * e1; + e13 = e1 * e1 * e1; + e14 = e1 * e1 * e1 * e1; + J1 = (3 * e1 / 2 - 27 * e13 / 32); + J2 = (21 * e12 / 16 - 55 * e14 / 32); + J3 = 151 * e13 / 96; + J4 = 1097 * e14 / 512; + Ap = a * (1 - n + (5. / 4.) * (n2 - n3) + (81. / 64.) * (n4 - n5)); + Bp = -3 * a * n / 2 * (1 - n + (7. / 8.) * (n2 - n3) + + (55. / 64.) * (n4 - n5)); + Cp = 14 * a * n2 / 16 * (1 - n + (3. / 4) * (n2 - n3)); + Dp = -35 * a * n3 / 48 * (1 - n + 11. / 16. * (n2 - n3)); + Ep = +315 * a * n4 / 51 * (1 - n); + e4 = e2 * e2; + e6 = e2 * e2 * e2; + ep = e * a / b; + ep2 = ep * ep; + ep4 = ep2 * ep2; + k0 = 0.9996; + mu_fact = 1 / (k0 * a * (1 - e2 / 4 - 3 * e4 / 64 - 5 * e6 / 256)); + } + }; + + /********** classes and functions to ensure minimal distance and angle between points **********/ + class box; + class loop; + class point{ + public: + SPoint3 v; + std::list<point>::iterator it_loop; + std::list<point*>::iterator it_box; + box *b; + double min_dist; + loop *l; + point(double _x,double _y,double _z,Field *f) + { + v[0]=_x; v[1]=_y; v[2]=_z; + if(f) + min_dist=(*f)(v[0],v[1],v[2]); + } + point(double _x,double _y,double _z,double _min_dist) + { + v[0]=_x; v[1]=_y; v[2]=_z; + min_dist=_min_dist; + } + double dist(point p) + { + return sqrt((v[0]-p.v[0])*(v[0]-p.v[0]) + +(v[1]-p.v[1])*(v[1]-p.v[1]) + +(v[2]-p.v[2])*(v[2]-p.v[2])); + } + void to_stereo(double &xp,double &yp,bool inverse_stereo=false) + { + double r=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]); + if(inverse_stereo){ + xp=v[1]/(r-v[2]); + yp=v[0]/(r-v[2]); } - double meridionalarc(double lon, double lat){ - return Ap * lat + Bp * sin(2 * lat) + Cp * sin(4 * lat) + - Dp * sin(6 * lat) + Ep; + else{ + xp=-v[0]/(r+v[2]); + yp=-v[1]/(r+v[2]); } - void from_cartesian(const SPoint3 xyz,SPoint3 &utm) { - ll_conv.from_cartesian(xyz,ll); - double S = meridionalarc(ll.x(),ll.y()); - double slat = sin(ll.y()); - double clat = cos(ll.y()); - double slat2 = slat * slat; - double clat2 = clat * clat; - double clat3 = clat2 * clat; - double clat4 = clat3 * clat; - double tlat2 = slat2 / clat2; - double nu = a / sqrt(1 - e * e * slat2); - double p = ll.x() - ((zone - 0.5) / 30 - 1) * M_PI; - double p2 = p * p; - double p3 = p * p2; - double p4 = p2 * p2; - utm.setPosition( - k0 * nu * clat * p + (k0 * nu * clat3 / 6) - * (1 - tlat2 + ep2 * clat2) * p3 + 5e5, - S * k0 + k0 * nu * slat * clat / 2 * p2 - + k0 * nu * slat * clat3 / 24 - * (5 - tlat2 + 9 * ep2 * clat2 + 4 * ep4 * clat4) * p4, - 0); + } + void to_latlon(double &lat,double &lon) + { + lat=asin(v[2]); + lon=atan2(v[1],v[0]); + if(lon<-15*M_PI/16)lon+=2*M_PI; + } + }; + class box{ + public: + box *sub_boxes[2]; + point min,max; + int max_n; + double min_size,size; + bool splitted; + std::list<point*> list; + int cut_dim,ndim; + int n; + box(point _min,point _max,int _max_n=100,double _min_size=0,int _cut_dim=0):min(_min),max(_max),max_n(_max_n) + { + n=0; + min_size=_min_size; + size=0; + ndim=3; + for(int i=0;i<ndim;i++) + size=std::max(size,fabs(max.v[i]-min.v[i])); + splitted=false; + cut_dim=_cut_dim; + } + void add(point &p) + { + if(!splitted){ + list.push_back(&p); + p.it_box=list.end(); + p.it_box--; + p.b=this; + n++; + if(n>max_n && size>=min_size){ + point mid0(min); + point mid1(max); + mid1.v[cut_dim]=mid0.v[cut_dim]=(min.v[cut_dim]+max.v[cut_dim])/2; + int newdim=(cut_dim+1)%ndim; + sub_boxes[0]=new box(min,mid1,max_n,min_size,newdim); + sub_boxes[1]=new box(mid0,max,max_n,min_size,newdim); + splitted=true; + for(std::list<point*>::iterator it=list.begin();it!=list.end();it++) + add(**it); + list.clear(); + } } - void to_cartesian(const SPoint3 utm, SPoint3 &xyz){ - double mu = utm.y() * mu_fact; - double fp = - mu + J1 * sin(2 * mu) + J2 * sin(4 * mu) + J3 * sin(6 * mu) + - J4 * sin(8 * mu); - double cfp = cos(fp); - double cfp2 = cfp * cfp; - double sfp = sin(fp); - double sfp2 = sfp * sfp; - double c1 = ep2 * cfp2; - double c12 = c1 * c1; - double t1 = sfp2 / cfp2; - double t12 = t1 * t1; - double r1 = a * (1 - e2) / pow((1 - e2 * sfp2), 1.5); - double n1 = a / sqrt(1 - e2 * sfp2); - double d = (utm.x() - 5e5) / (n1 * k0); - double d2 = d * d; - double d3 = d2 * d; - double d4 = d2 * d2; - double d5 = d4 * d; - double d6 = d4 * d2; - ll.setPosition( - ((zone - 0.5) / 30 - 1) * M_PI + (d - (1 + 2 * t1 + c1) * d3 / 6 + - (5 - 2 * c1 + 28 * t1 - 3 * c12 + - 8 * ep2 + - 24 * t12) * d5 / 120) / cfp, - fp - n1 * sfp / cfp / r1 - * (d2 / 2 - (5 + 3 * t1 + 10 * c1 - 4 * c12 - 9 * ep2) * d4 / 24 - + (61 + 90 * t1 + 298 * c1 + 45 * t12 - 3 * c12 - 252 * ep2) * d6 / 720), - 0); - ll_conv.to_cartesian(ll,xyz); + else{ + int ix=(p.v[cut_dim]-min.v[cut_dim])>(max.v[cut_dim]-min.v[cut_dim])/2; + sub_boxes[ix]->add(p); } - coordinate_utm(int _zone,double ll_radius, double _a = 6378137, double _b = 6356752.3142) :ll_conv(ll_radius){ - /* see http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM */ - a = _a; /* Equatorial Radius*/ - b = _b; /* Rayon Polar Radius*/ - zone=_zone; - n = (a - b) / (a + b); - n2 = n * n; - n3 = n * n * n; - n4 = n * n * n * n; - n5 = n * n * n * n * n; - e = sqrt(1 - b * b / a / a); - e2 = e * e; - e1 = (1 - sqrt(1 - e2)) / (1 + sqrt(1 - e2)); - e12 = e1 * e1; - e13 = e1 * e1 * e1; - e14 = e1 * e1 * e1 * e1; - J1 = (3 * e1 / 2 - 27 * e13 / 32); - J2 = (21 * e12 / 16 - 55 * e14 / 32); - J3 = 151 * e13 / 96; - J4 = 1097 * e14 / 512; - Ap = a * (1 - n + (5. / 4.) * (n2 - n3) + (81. / 64.) * (n4 - n5)); - Bp = -3 * a * n / 2 * (1 - n + (7. / 8.) * (n2 - n3) + - (55. / 64.) * (n4 - n5)); - Cp = 14 * a * n2 / 16 * (1 - n + (3. / 4) * (n2 - n3)); - Dp = -35 * a * n3 / 48 * (1 - n + 11. / 16. * (n2 - n3)); - Ep = +315 * a * n4 / 51 * (1 - n); - e4 = e2 * e2; - e6 = e2 * e2 * e2; - ep = e * a / b; - ep2 = ep * ep; - ep4 = ep2 * ep2; - k0 = 0.9996; - mu_fact = 1 / (k0 * a * (1 - e2 / 4 - 3 * e4 / 64 - 5 * e6 / 256)); + } + void remove(point *p) + { + if(p->b!=this) + p->b->remove(p); + else{ + list.erase(p->it_box); + n--; } - }; - - /********** classes and functions to ensure minimal distance and angle between points **********/ - class box; - class loop; - class point{ - public: - SPoint3 v; - std::list<point>::iterator it_loop; - std::list<point*>::iterator it_box; - box *b; - double min_dist; - loop *l; - point(double _x,double _y,double _z,Field *f){ - v[0]=_x; v[1]=_y; v[2]=_z; - if(f) - min_dist=(*f)(v[0],v[1],v[2]); - } - point(double _x,double _y,double _z,double _min_dist){ - v[0]=_x; v[1]=_y; v[2]=_z; - min_dist=_min_dist; - } - double dist(point p){ - return sqrt( - (v[0]-p.v[0])*(v[0]-p.v[0]) - +(v[1]-p.v[1])*(v[1]-p.v[1]) - +(v[2]-p.v[2])*(v[2]-p.v[2])); - } - void to_stereo(double &xp,double &yp,bool inverse_stereo=false){ - double r=sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]); - if(inverse_stereo){ - xp=v[1]/(r-v[2]); - yp=v[0]/(r-v[2]); - }else{ - xp=-v[0]/(r+v[2]); - yp=-v[1]/(r+v[2]); - } - } - void to_latlon(double &lat,double &lon){ - lat=asin(v[2]); - lon=atan2(v[1],v[0]); - if(lon<-15*M_PI/16)lon+=2*M_PI; - } - }; - class box{ - public: - box *sub_boxes[2]; - point min,max; - int max_n; - double min_size,size; - bool splitted; - std::list<point*> list; - int cut_dim,ndim; - int n; - box(point _min,point _max,int _max_n=100,double _min_size=0,int _cut_dim=0):min(_min),max(_max),max_n(_max_n){ - n=0; - min_size=_min_size; - size=0; - ndim=3; - for(int i=0;i<ndim;i++) - size=std::max(size,fabs(max.v[i]-min.v[i])); - splitted=false; - cut_dim=_cut_dim; - } - void add( point &p){ - if(!splitted){ - list.push_back(&p); - p.it_box=list.end(); - p.it_box--; - p.b=this; - n++; - if(n>max_n && size>=min_size){ - point mid0(min); - point mid1(max); - mid1.v[cut_dim]=mid0.v[cut_dim]=(min.v[cut_dim]+max.v[cut_dim])/2; - int newdim=(cut_dim+1)%ndim; - sub_boxes[0]=new box(min,mid1,max_n,min_size,newdim); - sub_boxes[1]=new box(mid0,max,max_n,min_size,newdim); - splitted=true; - for(std::list<point*>::iterator it=list.begin();it!=list.end();it++) - add(**it); - list.clear(); - } - }else{ - int ix=(p.v[cut_dim]-min.v[cut_dim])>(max.v[cut_dim]-min.v[cut_dim])/2; - sub_boxes[ix]->add(p); - } - } - void remove(point *p){ - if(p->b!=this) - p->b->remove(p); - else{ - list.erase(p->it_box); - n--; - } - } - void find_closest(point p,int nc,double *d,point **cp){ - int i=(cut_dim+ndim-1)%ndim; - if(p.v[i]<min.v[i]-d[nc-1] || p.v[i]>max.v[i]+d[nc-1]) - return; - if(splitted){ - for(int i=0;i<2;i++) - sub_boxes[i]->find_closest(p,nc,d,cp); - }else for(std::list<point*>::iterator it=list.begin();it!=list.end();it++){ - double dd=p.dist(**it); - if(dd<d[nc-1]){ - int j; - for(j=nc-2;j>=0;j--){ - if(dd>d[j])break; - d[j+1]=d[j]; - cp[j+1]=cp[j]; - } - d[j+1]=dd; - cp[j+1]=*it; + } + void find_closest(point p,int nc,double *d,point **cp) + { + int i=(cut_dim+ndim-1)%ndim; + if(p.v[i]<min.v[i]-d[nc-1] || p.v[i]>max.v[i]+d[nc-1]) + return; + if(splitted){ + for(int i=0;i<2;i++) + sub_boxes[i]->find_closest(p,nc,d,cp); + }else for(std::list<point*>::iterator it=list.begin();it!=list.end();it++){ + double dd=p.dist(**it); + if(dd<d[nc-1]){ + int j; + for(j=nc-2;j>=0;j--){ + if(dd>d[j])break; + d[j+1]=d[j]; + cp[j+1]=cp[j]; } + d[j+1]=dd; + cp[j+1]=*it; } } - }; - static double get_angle(double x0,double y0,double x1,double y1,double x2,double y2){ - double dx0=x1-x0; - double dx1=x2-x1; - double dy0=y1-y0; - double dy1=y2-y1; - return atan2(dx0*dy1-dx1*dy0,dx1*dx0+dy1*dy0); } - static double get_angle(point &p0,point &p1,point &p2){ - double dx0=p1.v[0]-p0.v[0]; - double dy0=p1.v[1]-p0.v[1]; - double dz0=p1.v[2]-p0.v[2]; - double dx1=p2.v[0]-p1.v[0]; - double dy1=p2.v[1]-p1.v[1]; - double dz1=p2.v[2]-p1.v[2]; - double scalar=dx0*dx1+dy0*dy1+dz0*dz1; - double vectx=dy0*dz1-dy1*dz0; - double vecty=dz0*dx1-dz1*dx0; - double vectz=dx0*dy1-dx1*dy0; - int sign=vectx*p1.v[0]+vecty*p1.v[1]+vectz*p1.v[2]<0?-1:1; - double vect=sqrt(vectx*vectx+vecty*vecty+vectz*vectz); - return atan2(-vect*sign,scalar); + }; + static double get_angle(double x0,double y0,double x1,double y1,double x2,double y2) + { + double dx0=x1-x0; + double dx1=x2-x1; + double dy0=y1-y0; + double dy1=y2-y1; + return atan2(dx0*dy1-dx1*dy0,dx1*dx0+dy1*dy0); + } + static double get_angle(point &p0,point &p1,point &p2) + { + double dx0=p1.v[0]-p0.v[0]; + double dy0=p1.v[1]-p0.v[1]; + double dz0=p1.v[2]-p0.v[2]; + double dx1=p2.v[0]-p1.v[0]; + double dy1=p2.v[1]-p1.v[1]; + double dz1=p2.v[2]-p1.v[2]; + double scalar=dx0*dx1+dy0*dy1+dz0*dz1; + double vectx=dy0*dz1-dy1*dz0; + double vecty=dz0*dx1-dz1*dx0; + double vectz=dx0*dy1-dx1*dy0; + int sign=vectx*p1.v[0]+vecty*p1.v[1]+vectz*p1.v[2]<0?-1:1; + double vect=sqrt(vectx*vectx+vecty*vecty+vectz*vectz); + return atan2(-vect*sign,scalar); + } + // angle (01,12) + class loop:public std::list<point>{ + public: + bool closed; + loop(){ + closed=true; } - // angle (01,12) - class loop:public std::list<point>{ - public: - bool closed; - loop(){ - closed=true; - } - inline iterator next(iterator i){ - ++i; - if(i==end()){ - i=begin(); - } - return i; - } - inline iterator prev(iterator i){ - if(i==begin()) - i=end(); - --i; - return i; - } - iterator remove_range(loop::iterator i0,loop::iterator i1){ //remove [id0, id1] and replace it by a single point at (id0+id1)/2; - for(int i=0;i<3;i++) - i1->v[i]=(i0->v[i]+i1->v[i])/2; - while(i0!=i1){ - if(i0->b) - i0->b->remove(&*i0); - i0=erase(i0); - if(i0==end()) - i0=begin(); - } - return i1; - } - int orientation(iterator i0, iterator i1,bool reverse_stereo){ - if(next(i0)==i1) - return 0; - double alpha=0; - double x[3],y[3]; - i1->to_stereo(x[0],y[0],reverse_stereo); - i0->to_stereo(x[1],y[1],reverse_stereo); - iterator p=i0; - do{ - p=next(p); - p->to_stereo(x[2],y[2],reverse_stereo); - alpha+=get_angle(x[0],y[0],x[1],y[1],x[2],y[2]); - x[0]=x[1];y[0]=y[1]; - x[1]=x[2];y[1]=y[2]; - }while(p!=i1); - i0->to_stereo(x[2],y[2],reverse_stereo); - alpha+=get_angle(x[0],y[0],x[1],y[1],x[2],y[2]); - return (int)(alpha/(M_PI*2)); - } - int length(iterator i0,iterator i1){ - int l=1; - while(i0!=i1){ - i0=next(i0); - l++; - } - return l; - } - void insert_range(iterator i,iterator j0,iterator j1){ - iterator n=j0; - do{ - j0=n; - iterator is=insert(i,*j0); - is->it_loop=is; - is->l=this; - *(j0->it_box)=&*is; - n=j0->l->next(j0); - }while(j0!=j1); - } - }; - - class loops:public std::list<loop>{ - public: - void print_gnuplot(std::ostream &stream){ - double lat,lon; - for(iterator il=begin();il!=end();il++){ - stream<<"\n"; - for(loop::iterator ip=il->begin();ip!=il->end();ip++){ - ip->to_latlon(lat,lon); - stream<<lon*180/M_PI<<" "<<lat*180/M_PI<<"\n"; - } - il->front().to_latlon(lat,lon); - stream<<lon*180/M_PI<<" "<<lat*180/M_PI<<"\n"; - } - } - }; - - double stereo_cross_product(point p00,point p01, point p10,point p11){ - double x[4],y[4]; - p00.to_stereo(x[0],y[0]); - p01.to_stereo(x[1],y[1]); - p10.to_stereo(x[2],y[2]); - p11.to_stereo(x[3],y[3]); - return (x[1]-x[0])*(y[3]-y[2])-(y[1]-y[0])*(x[3]-x[2]); + inline iterator next(iterator i) + { + ++i; + if(i==end()){ + i=begin(); + } + return i; } - bool is_intersected(point p00,point p01, point p10,point p11){ - if(stereo_cross_product(p00,p01,p00,p10)*stereo_cross_product(p00,p01,p00,p11)>0) - return false; - if(stereo_cross_product(p10,p11,p10,p00)*stereo_cross_product(p10,p11,p10,p01)>0) - return false; - return true; + inline iterator prev(iterator i) + { + if(i==begin()) + i=end(); + --i; + return i; } - void loop_fill_box(loop *l,box &b){ - int i=0; - for(loop::iterator ip=l->begin();ip!=l->end();ip++){ - ip->l=l; - ip->it_loop=ip; - b.add(*ip); + iterator remove_range(loop::iterator i0,loop::iterator i1) + { //remove [id0, id1] and replace it by a single point at (id0+id1)/2; + for(int i=0;i<3;i++) + i1->v[i]=(i0->v[i]+i1->v[i])/2; + while(i0!=i1){ + if(i0->b) + i0->b->remove(&*i0); + i0=erase(i0); + if(i0==end()) + i0=begin(); } + return i1; } - bool loop_check_intersections(loop *l,box &b){ - // Check for intersections - bool result=false; - for(loop::iterator i00=l->begin();i00!=l->end();++i00){ - loop::iterator i01=l->next(i00); - if(i01==l->begin() && !l->closed) - break; - double length0=i00->dist(*i01); -#define NP 5 - double d[NP*2]={length0*1.0001}; - for(int i=0;i<NP*2;i++) - d[i]=DBL_MAX; - point *cp[NP*2]; - b.find_closest(*i00,NP,d,cp); - b.find_closest(*i01,NP,d+NP,cp+NP); - for(int i=0;i<NP*2;i++){ - if(d[i]>length0) - break; - if(i00!=cp[i]->it_loop && i01!=cp[i]->it_loop){ - loop::iterator i10=cp[i]->it_loop; - loop::iterator i11=l->next(i10); - if((i11!=l->begin() || l->closed) &&(i11 != i00 && i11 != i01)) - if(is_intersected(*i00,*i01,*i10,*i11)){ - if(l->length(i11,i00)<l->length(i01,i10)) - i00=l->remove_range(i11,i00); - else - i00=l->remove_range(i01,i10); - result=true; - if(i00!=l->begin()) - i00--; - break; - } - i11=i10; - i10=l->prev(i11); - if((i11!=l->begin() || l->closed) &&(i10 != i00 && i10 != i01)) - if(is_intersected(*i00,*i01,*i10,*i11)){ - if(l->length(i11,i00)<l->length(i01,i10)) - i00=l->remove_range(i11,i00); - else - i00=l->remove_range(i01,i10); - result=true; - if(i00!=l->begin()) - i00--; - break; - } - } - } + int orientation(iterator i0, iterator i1,bool reverse_stereo) + { + if(next(i0)==i1) + return 0; + double alpha=0; + double x[3],y[3]; + i1->to_stereo(x[0],y[0],reverse_stereo); + i0->to_stereo(x[1],y[1],reverse_stereo); + iterator p=i0; + do{ + p=next(p); + p->to_stereo(x[2],y[2],reverse_stereo); + alpha+=get_angle(x[0],y[0],x[1],y[1],x[2],y[2]); + x[0]=x[1];y[0]=y[1]; + x[1]=x[2];y[1]=y[2]; + }while(p!=i1); + i0->to_stereo(x[2],y[2],reverse_stereo); + alpha+=get_angle(x[0],y[0],x[1],y[1],x[2],y[2]); + return (int)(alpha/(M_PI*2)); + } + int length(iterator i0,iterator i1) + { + int l=1; + while(i0!=i1){ + i0=next(i0); + l++; } - return result; + return l; } + void insert_range(iterator i,iterator j0,iterator j1) + { + iterator n=j0; + do{ + j0=n; + iterator is=insert(i,*j0); + is->it_loop=is; + is->l=this; + *(j0->it_box)=&*is; + n=j0->l->next(j0); + }while(j0!=j1); + } + }; - bool loop_check_close_points_self(loop *l,box &b){ - bool result=false; - bool reverse_stereo=(l->orientation(l->begin(),--l->end(),false)<0); - for(loop::iterator i=l->begin();i!=l->end();){ - double d[2]={i->min_dist*1.001,i->min_dist*1.001}; - point *cp[2]; - b.find_closest(*i,2,d,cp); - if(d[1]<i->min_dist){ - loop::iterator id1=cp[1]->it_loop; - int not_a_loop=-1; - if(!l->closed){ - loop::iterator ii; - for(ii=i;ii!=l->end() && ii!=id1;ii++); - not_a_loop= ii==l->end()?0:1; - } - if(not_a_loop!=0 && (l->orientation(i,id1,reverse_stereo)==-1 || l->length(i,id1)<3)){ - i=l->remove_range(i,id1); - result=true; - } - if(not_a_loop!=1 && (l->orientation(id1,i,reverse_stereo)==-1 || l->length(id1,i)<3)){ - i=l->remove_range(id1,i); - result=true; - }else - i++; - }else - i++; + class loops:public std::list<loop>{ + public: + void print_gnuplot(std::ostream &stream) + { + double lat,lon; + for(iterator il=begin();il!=end();il++){ + stream<<"\n"; + for(loop::iterator ip=il->begin();ip!=il->end();ip++){ + ip->to_latlon(lat,lon); + stream<<lon*180/M_PI<<" "<<lat*180/M_PI<<"\n"; + } + il->front().to_latlon(lat,lon); + stream<<lon*180/M_PI<<" "<<lat*180/M_PI<<"\n"; } - return result; } + }; - bool loop_check_small_angles(loop *l){ - bool removed=false; - for(loop::iterator i=l->begin();i!=l->end();++i){ - loop::iterator i1=l->next(i); - loop::iterator i2=l->next(i1); - if((!l->closed) && i2==l->begin()) + double stereo_cross_product(point p00,point p01, point p10,point p11) + { + double x[4],y[4]; + p00.to_stereo(x[0],y[0]); + p01.to_stereo(x[1],y[1]); + p10.to_stereo(x[2],y[2]); + p11.to_stereo(x[3],y[3]); + return (x[1]-x[0])*(y[3]-y[2])-(y[1]-y[0])*(x[3]-x[2]); + } + bool is_intersected(point p00,point p01, point p10,point p11) + { + if(stereo_cross_product(p00,p01,p00,p10)*stereo_cross_product(p00,p01,p00,p11)>0) + return false; + if(stereo_cross_product(p10,p11,p10,p00)*stereo_cross_product(p10,p11,p10,p01)>0) + return false; + return true; + } + void loop_fill_box(loop *l,box &b) + { + for(loop::iterator ip=l->begin();ip!=l->end();ip++){ + ip->l=l; + ip->it_loop=ip; + b.add(*ip); + } + } + bool loop_check_intersections(loop *l,box &b) + { + // Check for intersections + bool result=false; + for(loop::iterator i00=l->begin();i00!=l->end();++i00){ + loop::iterator i01=l->next(i00); + if(i01==l->begin() && !l->closed) + break; + double length0=i00->dist(*i01); +#define NP 5 + double d[NP*2]={length0*1.0001}; + for(int i=0;i<NP*2;i++) + d[i]=DBL_MAX; + point *cp[NP*2]; + b.find_closest(*i00,NP,d,cp); + b.find_closest(*i01,NP,d+NP,cp+NP); + for(int i=0;i<NP*2;i++){ + if(d[i]>length0) break; - double alpha=get_angle(*i,*i1,*i2); - if(alpha>3*M_PI/4){ - i1->b->remove(&*i1); - i=l->erase(i1); - removed=true; + if(i00!=cp[i]->it_loop && i01!=cp[i]->it_loop){ + loop::iterator i10=cp[i]->it_loop; + loop::iterator i11=l->next(i10); + if((i11!=l->begin() || l->closed) &&(i11 != i00 && i11 != i01)) + if(is_intersected(*i00,*i01,*i10,*i11)){ + if(l->length(i11,i00)<l->length(i01,i10)) + i00=l->remove_range(i11,i00); + else + i00=l->remove_range(i01,i10); + result=true; + if(i00!=l->begin()) + i00--; + break; + } + i11=i10; + i10=l->prev(i11); + if((i11!=l->begin() || l->closed) &&(i10 != i00 && i10 != i01)) + if(is_intersected(*i00,*i01,*i10,*i11)){ + if(l->length(i11,i00)<l->length(i01,i10)) + i00=l->remove_range(i11,i00); + else + i00=l->remove_range(i01,i10); + result=true; + if(i00!=l->begin()) + i00--; + break; + } } } - return removed; } + return result; + } - bool loop_check_close_points(loop *l,box &b){ -#define NPD 10 - for(loop::iterator i=l->begin();i!=l->end();){ - double d[NPD]; - point *cp[NPD]; - for(int j=0;j<NPD;j++){ - d[j]=i->min_dist*1.001; - cp[j]=NULL; + bool loop_check_close_points_self(loop *l,box &b) + { + bool result=false; + bool reverse_stereo=(l->orientation(l->begin(),--l->end(),false)<0); + for(loop::iterator i=l->begin();i!=l->end();){ + double d[2]={i->min_dist*1.001,i->min_dist*1.001}; + point *cp[2]; + b.find_closest(*i,2,d,cp); + if(d[1]<i->min_dist){ + loop::iterator id1=cp[1]->it_loop; + int not_a_loop=-1; + if(!l->closed){ + loop::iterator ii; + for(ii=i;ii!=l->end() && ii!=id1;ii++); + not_a_loop= ii==l->end()?0:1; } - b.find_closest(*i,NPD,d,cp); - bool merged=false; - for(int j=0;j<NPD;j++){ - if(!cp[j])break; - if(i->l!=cp[j]->l){ - double lat,lon; - i->to_latlon(lat,lon); - loop::iterator f0=i; - loop::iterator f1=cp[j]->it_loop; - double newx[3],dx[3],crossx[3]; - for(int k=0;k<3;k++){ - newx[k]=(f0->v[k]+f1->v[k])/2; - dx[k]=(f1->v[k]-f0->v[k])/2; - } - for(int k=0;k<3;k++){ - int k1=(k+1)%3; - int k2=(k+2)%3; - crossx[k]=newx[k1]*dx[k2]-newx[k2]*dx[k1]; - } - double norm=sqrt(crossx[0]*crossx[0]+crossx[1]*crossx[1]+crossx[2]*crossx[2]); - for(int k=0;k<3;k++){ - crossx[k]*=i->min_dist*0.1/norm; - f0->v[k]=newx[k]-crossx[k]; - f1->v[k]=newx[k]+crossx[k]; - } - - l->insert_range(++f0,f1->l->next(f1),f1); - cp[j]->l->clear(); - merged=true; - break; - } + if(not_a_loop!=0 && (l->orientation(i,id1,reverse_stereo)==-1 || l->length(i,id1)<3)){ + i=l->remove_range(i,id1); + result=true; } - if(!merged) + if(not_a_loop!=1 && (l->orientation(id1,i,reverse_stereo)==-1 || l->length(id1,i)<3)){ + i=l->remove_range(id1,i); + result=true; + }else i++; - } - return true; + }else + i++; } - class GeoEarthImport - { - std::ostringstream loop_buff, surface_buff;; - std::string filename; - std::ofstream *file; - int il, ip, is, ill, ifi; - int first_point_in_loop, first_point_in_surface,first_point_in_attractor; - bool empty_surface; - void new_attractor(){ - first_point_in_attractor = ip; - } - void new_surface() { - surface_buff.str(""); - surface_buff << "Plane Surface( IS + " << is++ << " ) = { "; - first_point_in_surface = ip; - empty_surface = true; + return result; + } + + bool loop_check_small_angles(loop *l) + { + bool removed=false; + for(loop::iterator i=l->begin();i!=l->end();++i){ + loop::iterator i1=l->next(i); + loop::iterator i2=l->next(i1); + if((!l->closed) && i2==l->begin()) + break; + double alpha=get_angle(*i,*i1,*i2); + if(alpha>3*M_PI/4){ + i1->b->remove(&*i1); + i=l->erase(i1); + removed=true; } - void new_loop(){ - loop_buff.str(""); - first_point_in_loop = ip; + } + return removed; + } + + bool loop_check_close_points(loop *l,box &b) + { +#define NPD 10 + for(loop::iterator i=l->begin();i!=l->end();){ + double d[NPD]; + point *cp[NPD]; + for(int j=0;j<NPD;j++){ + d[j]=i->min_dist*1.001; + cp[j]=NULL; } - public: - GeoEarthImport(const std::string _filename, bool write_polar_sphere,double radius) - { - filename = _filename; - file=new std::ofstream(filename.c_str()); - loop_buff.precision(16); - std::ostringstream buff; - il = ip = ill = is = ifi = 0; - buff << "IP = newp;\n"; - buff << "IL = newl;\n"; - buff << "ILL = newll;\n"; - buff << "IS = news;\n"; - buff << "IFI = newf;\n"; - if(write_polar_sphere){ - buff << "Point ( IP + " << ip++ << " ) = {0, 0, 0 };\n"; - buff << "Point ( IP + " << ip++ <<" ) = {0, 0,"<<radius<<"};\n"; - buff << "PolarSphere ( IS + " << is++ << " ) = {IP , IP+1};\n"; + b.find_closest(*i,NPD,d,cp); + bool merged=false; + for(int j=0;j<NPD;j++){ + if(!cp[j])break; + if(i->l!=cp[j]->l){ + double lat,lon; + i->to_latlon(lat,lon); + loop::iterator f0=i; + loop::iterator f1=cp[j]->it_loop; + double newx[3],dx[3],crossx[3]; + for(int k=0;k<3;k++){ + newx[k]=(f0->v[k]+f1->v[k])/2; + dx[k]=(f1->v[k]-f0->v[k])/2; + } + for(int k=0;k<3;k++){ + int k1=(k+1)%3; + int k2=(k+2)%3; + crossx[k]=newx[k1]*dx[k2]-newx[k2]*dx[k1]; + } + double norm=sqrt(crossx[0]*crossx[0]+crossx[1]*crossx[1]+crossx[2]*crossx[2]); + for(int k=0;k<3;k++){ + crossx[k]*=i->min_dist*0.1/norm; + f0->v[k]=newx[k]-crossx[k]; + f1->v[k]=newx[k]+crossx[k]; + } + + l->insert_range(++f0,f1->l->next(f1),f1); + cp[j]->l->clear(); + merged=true; + break; } - *file << buff.str(); - new_surface(); - new_attractor(); - new_loop(); } - ~GeoEarthImport(){ - //file << "Euclidian Coordinates;"; - file->close(); - } - void add_point(SPoint3 point){ - double r=sqrt(point.x()*point.x()+point.y()*point.y()+point.z()*point.z()); - SPoint2 stereo(-point.x() / (r + point.z()), -point.y() / (r + point.z())); - loop_buff << "Point ( IP + " << ip++ << " ) = {" << stereo. - x() << ", " << stereo.y() << ", " << 0 << " };\n"; + if(!merged) + i++; + } + return true; + } + class GeoEarthImport + { + std::ostringstream loop_buff, surface_buff;; + std::string filename; + std::ofstream *file; + int il, ip, is, ill, ifi; + int first_point_in_loop, first_point_in_surface,first_point_in_attractor; + bool empty_surface; + void new_attractor() + { + first_point_in_attractor = ip; + } + void new_surface() + { + surface_buff.str(""); + surface_buff << "Plane Surface( IS + " << is++ << " ) = { "; + first_point_in_surface = ip; + empty_surface = true; + } + void new_loop() + { + loop_buff.str(""); + first_point_in_loop = ip; + } + public: + GeoEarthImport(const std::string _filename, bool write_polar_sphere,double radius) + { + filename = _filename; + file=new std::ofstream(filename.c_str()); + loop_buff.precision(16); + std::ostringstream buff; + il = ip = ill = is = ifi = 0; + buff << "IP = newp;\n"; + buff << "IL = newl;\n"; + buff << "ILL = newll;\n"; + buff << "IS = news;\n"; + buff << "IFI = newf;\n"; + if(write_polar_sphere){ + buff << "Point ( IP + " << ip++ << " ) = {0, 0, 0 };\n"; + buff << "Point ( IP + " << ip++ <<" ) = {0, 0,"<<radius<<"};\n"; + buff << "PolarSphere ( IS + " << is++ << " ) = {IP , IP+1};\n"; } - void end_loop(bool closed) { - if(ip - first_point_in_loop > 3) { - loop_buff<<"LoopStart"<<il<<" = IP + "<< first_point_in_loop<<";\n"; - loop_buff<<"LoopEnd"<<il<<" = IP + "<< ip - 1<<";\n"; - loop_buff << "Spline ( IL + " << il++ << " ) = { IP + " << - first_point_in_loop << " : IP + " << ip - 1 ; - if(closed) loop_buff<< ", IP + " << first_point_in_loop; - loop_buff<< " };\n"; - if(closed){ - loop_buff << "Line Loop ( ILL + " << ill++ << " ) = { IL + " << il - - 1 << " };"; - } - *file << loop_buff.str(); - if(closed){ - if(!empty_surface) - surface_buff << ", "; - surface_buff << "ILL + " << ill - 1; - empty_surface = false; - } + *file << buff.str(); + new_surface(); + new_attractor(); + new_loop(); + } + ~GeoEarthImport() + { + //file << "Euclidian Coordinates;"; + file->close(); + } + void add_point(SPoint3 point) + { + double r=sqrt(point.x()*point.x()+point.y()*point.y()+point.z()*point.z()); + SPoint2 stereo(-point.x() / (r + point.z()), -point.y() / (r + point.z())); + loop_buff << "Point ( IP + " << ip++ << " ) = {" << stereo. + x() << ", " << stereo.y() << ", " << 0 << " };\n"; + } + void end_loop(bool closed) + { + if(ip - first_point_in_loop > 3) { + loop_buff<<"LoopStart"<<il<<" = IP + "<< first_point_in_loop<<";\n"; + loop_buff<<"LoopEnd"<<il<<" = IP + "<< ip - 1<<";\n"; + loop_buff << "Spline ( IL + " << il++ << " ) = { IP + " << + first_point_in_loop << " : IP + " << ip - 1 ; + if(closed) loop_buff<< ", IP + " << first_point_in_loop; + loop_buff<< " };\n"; + if(closed){ + loop_buff << "Line Loop ( ILL + " << ill++ << " ) = { IL + " << il - + 1 << " };"; } - else { - ip = first_point_in_loop; + *file << loop_buff.str(); + if(closed){ + if(!empty_surface) + surface_buff << ", "; + surface_buff << "ILL + " << ill - 1; + empty_surface = false; } - new_loop(); } - void end_surface(){ - if(!empty_surface) { - surface_buff << "};\n"; - surface_buff.str(""); - *file << surface_buff.str()<<"\n"; - } - new_surface(); + else { + ip = first_point_in_loop; } - void end_attractor(){ - *file << "Field [ IFI + " << ifi << "] = Attractor;\n"; - *file << "Field [ IFI + " << ifi++ << "].NodesList = { IP + " << - first_point_in_attractor << " : IP + " << ip - 1 << " };"; - new_attractor(); + new_loop(); + } + void end_surface() + { + if(!empty_surface) { + surface_buff << "};\n"; + surface_buff.str(""); + *file << surface_buff.str()<<"\n"; } - }; - void getName(char *name) const; - void getInfos(char *author, char *copyright, char *help_text) const; - void catchErrorMessage(char *errorMessage) const; - int getNbOptions() const; - int getNbOptionsStr() const; - StringXNumber *getOption(int iopt); - StringXString *getOptionStr(int iopt); - PView *execute(PView *); + new_surface(); + } + void end_attractor() + { + *file << "Field [ IFI + " << ifi << "] = Attractor;\n"; + *file << "Field [ IFI + " << ifi++ << "].NodesList = { IP + " << + first_point_in_attractor << " : IP + " << ip - 1 << " };"; + new_attractor(); + } + }; + void getName(char *name) const; + void getInfos(char *author, char *copyright, char *help_text) const; + void catchErrorMessage(char *errorMessage) const; + int getNbOptions() const; + int getNbOptionsStr() const; + StringXNumber *getOption(int iopt); + StringXString *getOptionStr(int iopt); + PView *execute(PView *); }; - - - - - - - - // ************** MAIN PLUGIN ************** StringXNumber GSHHSOptions_Number[] = { {GMSH_FULLRC, "iField", NULL, -1.}, @@ -862,35 +906,35 @@ void GMSH_GSHHSPlugin::getName(char *name) const } void GMSH_GSHHSPlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "J. Lambrechts"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); strcpy(help_text, - "Plugin(GSHHS) read different kind of contour lines data and write a .geo file on the surface of a sphere (the Earth).\n" - "The principal application is to load GSHHS data\n (see http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html).\n" - "Valid values for \"Format\" are ):\n" - " -\"gshhs\" : open GSHHS file\n" - " -\"loops2\" : import 2D contour lines in simple text format :\n" - " NB_POINTS_IN_FIRST_LOOP FIRST_LOOP_IS_CLOSED\n" - " COORD1 COORD2\n" - " COORD1 COORD2\n" - " ... ...\n" - " NB_POINTS_IN_SECOND_LOOP SECOND_LOOP_IS_CLOSED\n" - " ...\n" - " (LOOP_IS_CLOSED specify if this coast line describe a closed curve (0=no, 1=yes).\n" - "In the case of \"loops2\" format, you can specify the the coordinate system used in the input file with the" - "\"Coordinate\" option, valid values are\n" - " -\"lonlat\" for longitude-latidute radian,\n" - " -\"lonlat_degrees\" for longitude-latitude degrees,\n" - " -\"UTM\" for universal transverse mercartor (\"UTMZone\" option should be specified)\n" - " -\"cartesian\" for full 3D coordinates\n" - "\"radius\" specify the earth radius.\n" - "If the \"iField\" option is set, consecutive points closer than the value of the field iField (in meters) will not be added.\n" - "If \"MinStraitsFactor\" >0 and if a field iField is provided, coastlines closer than MinStraitsFactor*field(IField) are merged and inner corners which form an angle < pi/3 are removed.\n" - "The output is always in stereographic coordinates, if the \"WritePolarSphere\" option is not 0, a sphere is added to the geo file.\n" - "WARNING : this plugin is still experimental and need polishing and error-handling. In particular, it will probably crash if an inexistant field id is given or if the input/output cannot be open." - ); + "Plugin(GSHHS) read different kind of contour lines data and write a .geo file on the surface of a sphere (the Earth).\n" + "The principal application is to load GSHHS data\n (see http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html).\n" + "Valid values for \"Format\" are ):\n" + " -\"gshhs\" : open GSHHS file\n" + " -\"loops2\" : import 2D contour lines in simple text format :\n" + " NB_POINTS_IN_FIRST_LOOP FIRST_LOOP_IS_CLOSED\n" + " COORD1 COORD2\n" + " COORD1 COORD2\n" + " ... ...\n" + " NB_POINTS_IN_SECOND_LOOP SECOND_LOOP_IS_CLOSED\n" + " ...\n" + " (LOOP_IS_CLOSED specify if this coast line describe a closed curve (0=no, 1=yes).\n" + "In the case of \"loops2\" format, you can specify the the coordinate system used in the input file with the" + "\"Coordinate\" option, valid values are\n" + " -\"lonlat\" for longitude-latidute radian,\n" + " -\"lonlat_degrees\" for longitude-latitude degrees,\n" + " -\"UTM\" for universal transverse mercartor (\"UTMZone\" option should be specified)\n" + " -\"cartesian\" for full 3D coordinates\n" + "\"radius\" specify the earth radius.\n" + "If the \"iField\" option is set, consecutive points closer than the value of the field iField (in meters) will not be added.\n" + "If \"MinStraitsFactor\" >0 and if a field iField is provided, coastlines closer than MinStraitsFactor*field(IField) are merged and inner corners which form an angle < pi/3 are removed.\n" + "The output is always in stereographic coordinates, if the \"WritePolarSphere\" option is not 0, a sphere is added to the geo file.\n" + "WARNING : this plugin is still experimental and need polishing and error-handling. In particular, it will probably crash if an inexistant field id is given or if the input/output cannot be open." + ); } int GMSH_GSHHSPlugin::getNbOptions() const @@ -945,7 +989,7 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) c_syst=&utm; else if(coordinate_name != "cartesian"){ Msg::Error("gshhs: Unknown coordinate system %s.\n", - coordinate_name.c_str()); + coordinate_name.c_str()); return NULL; } Field *field = NULL; @@ -956,12 +1000,12 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) return NULL; } } - double x,y,z; SPoint3 p; - reader *read; + reader *read=0; if(format == "loops2") { read=new reader_loops2(filename); - }else if(format == "gshhs") { + } + else if(format == "gshhs") { c_syst=&lonlat; read=new reader_gshhs(filename); } @@ -982,7 +1026,8 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) if(l.size()>=3) ll.push_back(l); l.clear(); - } else if (l.empty() || oldp.dist(newp)>newp.min_dist){ + } + else if (l.empty() || oldp.dist(newp)>newp.min_dist){ l.push_back(newp); oldp=newp; } @@ -1007,10 +1052,10 @@ PView *GMSH_GSHHSPlugin::execute(PView * v) box b(point(-radius,-radius,-radius,0.),point(radius,radius,radius,0.)); loop_fill_box(&*il,b); while(false - || loop_check_small_angles(&*il) - || loop_check_close_points_self(&*il,b) - || loop_check_intersections(&*il,b) - ); + || loop_check_small_angles(&*il) + || loop_check_close_points_self(&*il,b) + || loop_check_intersections(&*il,b) + ); } } for(std::list<loop>::iterator l=ll.begin();l!=ll.end();l++){ diff --git a/Plugin/GSHHS.h b/Plugin/GSHHS.h index cfb67fb954f48ab7612d5bb2b167d2fa25fb04f8..e5f0313902341a450ece6d67fd3bf8cfb7d28b56 100644 --- a/Plugin/GSHHS.h +++ b/Plugin/GSHHS.h @@ -13,5 +13,4 @@ extern "C" GMSH_Plugin *GMSH_RegisterGSHHSPlugin(); } - #endif diff --git a/Plugin/Gradient.cpp b/Plugin/Gradient.cpp index ffc4b0dec9ef7921b29a5c5f28c69ca22cb5d6ab..0cdecde311fd51e457b8445579ab617223770146 100644 --- a/Plugin/Gradient.cpp +++ b/Plugin/Gradient.cpp @@ -25,7 +25,7 @@ void GMSH_GradientPlugin::getName(char *name) const } void GMSH_GradientPlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "C. Geuzaine, J.-F. Remacle"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); @@ -110,7 +110,7 @@ PView *GMSH_GradientPlugin::execute(PView *v) int numNodes = data1->getNumNodes(0, ent, ele); double x[8], y[8], z[8], val[8 * 3]; for(int nod = 0; nod < numNodes; nod++) - data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); + data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); int dim = data1->getDimension(0, ent, ele); elementFactory factory; element *element = factory.create(numNodes, dim, x, y, z); @@ -119,19 +119,19 @@ PView *GMSH_GradientPlugin::execute(PView *v) for(int nod = 0; nod < numNodes; nod++) out->push_back(y[nod]); for(int nod = 0; nod < numNodes; nod++) out->push_back(z[nod]); for(int step = 0; step < data1->getNumTimeSteps(); step++){ - for(int nod = 0; nod < numNodes; nod++) - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); - for(int nod = 0; nod < numNodes; nod++){ - double u, v, w, f[3]; - element->getNode(nod, u, v, w); - for(int comp = 0; comp < numComp; comp++){ - element->interpolateGrad(val + comp, u, v, w, f, numComp); - out->push_back(f[0]); - out->push_back(f[1]); - out->push_back(f[2]); - } - } + for(int nod = 0; nod < numNodes; nod++) + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); + for(int nod = 0; nod < numNodes; nod++){ + double u, v, w, f[3]; + element->getNode(nod, u, v, w); + for(int comp = 0; comp < numComp; comp++){ + element->interpolateGrad(val + comp, u, v, w, f, numComp); + out->push_back(f[0]); + out->push_back(f[1]); + out->push_back(f[2]); + } + } } delete element; } diff --git a/Plugin/HarmonicToTime.h b/Plugin/HarmonicToTime.h index cf56528fab5e8d7584290044dad992e7cc69463d..731f434f6134d7ac5635b537f706feda0486c779 100644 --- a/Plugin/HarmonicToTime.h +++ b/Plugin/HarmonicToTime.h @@ -15,7 +15,7 @@ extern "C" class GMSH_HarmonicToTimePlugin : public GMSH_PostPlugin { -public: + public: GMSH_HarmonicToTimePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/HomologyComputation.cpp b/Plugin/HomologyComputation.cpp index 6ad01929ebd9c4c17c4955eeede159e3432ce1e4..80cc7e6155b9f93da7b312073bf5646b447d64f7 100644 --- a/Plugin/HomologyComputation.cpp +++ b/Plugin/HomologyComputation.cpp @@ -14,6 +14,7 @@ #include "HomologyComputation.h" #if defined(HAVE_KBIPACK) + StringXNumber HomologyComputationOptions_Number[] = { {GMSH_FULLRC, "PhysicalGroupForDomain1", NULL, 0.}, {GMSH_FULLRC, "PhysicalGroupForDomain2", NULL, 0.}, diff --git a/Plugin/HomologyComputation.h b/Plugin/HomologyComputation.h index b5e43f87389465f1ef19a537e865a3ed8b9d1a26..b832be52c746bd751e6a7b88eab362fae3e54b60 100644 --- a/Plugin/HomologyComputation.h +++ b/Plugin/HomologyComputation.h @@ -12,6 +12,7 @@ #include "Plugin.h" #if defined(HAVE_KBIPACK) + extern "C" { GMSH_Plugin *GMSH_RegisterHomologyComputationPlugin(); @@ -19,7 +20,7 @@ extern "C" class GMSH_HomologyComputationPlugin : public GMSH_PostPlugin { -public: + public: GMSH_HomologyComputationPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Integrate.cpp b/Plugin/Integrate.cpp index 5f7abd58a847fa4d131eac8889bfb0be4006f92c..3b24166ac71e7659ecd42695616c253a84cd1981 100644 --- a/Plugin/Integrate.cpp +++ b/Plugin/Integrate.cpp @@ -81,24 +81,24 @@ PView *GMSH_IntegratePlugin::execute(PView * v) bool simpleSum = false; for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - int numComp = data1->getNumComponents(step, ent, ele); - int numEdges = data1->getNumEdges(step, ent, ele); - bool scalar = (numComp == 1); - bool circulation = (numComp == 3 && numEdges == 1); - bool flux = (numComp == 3 && (numEdges == 3 || numEdges == 4)); - int numNodes = data1->getNumNodes(step, ent, ele); - int dim = data1->getDimension(step, ent, ele); - double x[8], y[8], z[8], val[8 * 3]; - for(int nod = 0; nod < numNodes; nod++){ - data1->getNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); - for(int comp = 0; comp < numComp; comp++) - data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); - } + if(data1->skipElement(step, ent, ele)) continue; + int numComp = data1->getNumComponents(step, ent, ele); + int numEdges = data1->getNumEdges(step, ent, ele); + bool scalar = (numComp == 1); + bool circulation = (numComp == 3 && numEdges == 1); + bool flux = (numComp == 3 && (numEdges == 3 || numEdges == 4)); + int numNodes = data1->getNumNodes(step, ent, ele); + int dim = data1->getDimension(step, ent, ele); + double x[8], y[8], z[8], val[8 * 3]; + for(int nod = 0; nod < numNodes; nod++){ + data1->getNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); + for(int comp = 0; comp < numComp; comp++) + data1->getValue(step, ent, ele, nod, comp, val[numComp * nod + comp]); + } if(numNodes == 1){ simpleSum = true; res += val[0]; - for(int comp = 0; comp < numComp; comp++) + for(int comp = 0; comp < numComp; comp++) resv[comp] += val[comp]; } else{ diff --git a/Plugin/Lambda2.h b/Plugin/Lambda2.h index 814e820dd1340242f3a3f9f32e17a8cc6ae7e737..9a6bf6935d905ef9420f98264b1fcf9ad9e7c272 100644 --- a/Plugin/Lambda2.h +++ b/Plugin/Lambda2.h @@ -15,7 +15,7 @@ extern "C" class GMSH_Lambda2Plugin : public GMSH_PostPlugin { -public: + public: GMSH_Lambda2Plugin(); void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp index e22baaaa0a8e7c81e1152a51d87e5933fc90c53e..6103ad3fddbfcd932b8286ca3f53050e5d3d3f10 100644 --- a/Plugin/Levelset.cpp +++ b/Plugin/Levelset.cpp @@ -435,7 +435,7 @@ PView *GMSH_LevelsetPlugin::execute(PView *v) PViewDataList *out = getDataList(new PView()); for(int ent = 0; ent < vdata->getNumEntities(0); ent++){ for(int ele = 0; ele < vdata->getNumElements(0, ent); ele++){ - if(vdata->skipElement(0, ent, ele)) continue; + if(vdata->skipElement(0, ent, ele)) continue; for(int nod = 0; nod < vdata->getNumNodes(0, ent, ele); nod++){ vdata->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); levels[nod] = levelset(x[nod], y[nod], z[nod], 0.); @@ -457,7 +457,7 @@ PView *GMSH_LevelsetPlugin::execute(PView *v) PViewDataList *out = getDataList(new PView()); for(int ent = 0; ent < vdata->getNumEntities(step); ent++){ for(int ele = 0; ele < vdata->getNumElements(step, ent); ele++){ - if(vdata->skipElement(step, ent, ele)) continue; + if(vdata->skipElement(step, ent, ele)) continue; for(int nod = 0; nod < vdata->getNumNodes(step, ent, ele); nod++){ vdata->getNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); vdata->getScalarValue(step, ent, ele, nod, scalarValues[nod]); diff --git a/Plugin/Levelset.h b/Plugin/Levelset.h index 6f471824c924e1750a2af625c760e0fa2c0fe981..f697d93a470fa77f42782448a38287fe99b662e7 100644 --- a/Plugin/Levelset.h +++ b/Plugin/Levelset.h @@ -22,10 +22,10 @@ class GMSH_LevelsetPlugin : public GMSH_PostPlugin PViewDataList *out); protected: double _ref[3], _targetError; - int _valueTimeStep, _valueView, _valueIndependent, _recurLevel, _extractVolume; + int _valueTimeStep, _valueView, _valueIndependent, _recurLevel, _extractVolume; typedef enum {NONE, PLANE, SPHERE, MAP} ORIENTATION; ORIENTATION _orientation; -public: + public: GMSH_LevelsetPlugin(); virtual double levelset(double x, double y, double z, double val) const = 0; virtual PView *execute(PView *); diff --git a/Plugin/LongitudeLatitude.cpp b/Plugin/LongitudeLatitude.cpp index a9be619e703858aeb918ded940e5867fabdfa779..077a761f72fd93d9f609bdc73090ed19f338ce47 100644 --- a/Plugin/LongitudeLatitude.cpp +++ b/Plugin/LongitudeLatitude.cpp @@ -24,7 +24,7 @@ void GMSH_LongituteLatitudePlugin::getName(char *name) const } void GMSH_LongituteLatitudePlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "J. Lambrechts"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); @@ -63,9 +63,9 @@ PView *GMSH_LongituteLatitudePlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } } diff --git a/Plugin/LongitudeLatitude.h b/Plugin/LongitudeLatitude.h index 44470b7e00576bc2a615b9809178d2dd4c4ecdb9..cdb84c437ede21b429992b604f06c5aec776c534 100644 --- a/Plugin/LongitudeLatitude.h +++ b/Plugin/LongitudeLatitude.h @@ -15,7 +15,7 @@ extern "C" class GMSH_LongituteLatitudePlugin : public GMSH_PostPlugin { -public: + public: void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; void catchErrorMessage(char *errorMessage) const; diff --git a/Plugin/Makefile b/Plugin/Makefile deleted file mode 100644 index 50881823c9f000582d1a01d388113a6506e60adf..0000000000000000000000000000000000000000 --- a/Plugin/Makefile +++ /dev/null @@ -1,353 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshPlugin${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Graphics ${DASH}I../Geo\ - ${DASH}I../Mesh ${DASH}I../Post ${DASH}I../Fltk ${DASH}I../Numeric\ - ${DASH}I../contrib/ANN/include ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/gmm - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Plugin.cpp PluginManager.cpp\ - Levelset.cpp\ - CutPlane.cpp CutSphere.cpp CutMap.cpp \ - Smooth.cpp CutParametric.cpp\ - Lambda2.cpp\ - Eigenvectors.cpp Eigenvalues.cpp\ - StreamLines.cpp CutGrid.cpp\ - Transform.cpp\ - LongitudeLatitude.cpp\ - Triangulate.cpp\ - Warp.cpp SphericalRaise.cpp\ - Skin.cpp GSHHS.cpp \ - Extract.cpp ExtractElements.cpp ExtractEdges.cpp\ - MakeSimplex.cpp\ - Evaluate.cpp FieldView.cpp \ - Integrate.cpp Gradient.cpp Curl.cpp Divergence.cpp\ - Annotate.cpp Remove.cpp\ - Probe.cpp\ - HarmonicToTime.cpp ModulusPhase.cpp\ - FiniteElement.cpp\ - HomologyComputation.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Plugin${OBJEXT}: Plugin.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h -PluginManager${OBJEXT}: PluginManager.cpp ../Common/GmshConfig.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h PluginManager.h CutMap.h \ - Levelset.h CutGrid.h StreamLines.h CutPlane.h CutParametric.h \ - CutSphere.h Skin.h Extract.h ExtractElements.h ExtractEdges.h \ - HarmonicToTime.h ModulusPhase.h Integrate.h Gradient.h Curl.h \ - Divergence.h Annotate.h Remove.h MakeSimplex.h Smooth.h Transform.h \ - LongitudeLatitude.h Triangulate.h Warp.h SphericalRaise.h \ - Eigenvectors.h Eigenvalues.h Lambda2.h Evaluate.h Probe.h FieldView.h \ - GSHHS.h FiniteElement.h HomologyComputation.h -Levelset${OBJEXT}: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h MakeSimplex.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Post/adaptiveData.h -CutPlane${OBJEXT}: CutPlane.cpp ../Common/GmshConfig.h CutPlane.h Levelset.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Graphics/drawContext.h ../Fltk/Draw.h -CutSphere${OBJEXT}: CutSphere.cpp ../Common/GmshConfig.h CutSphere.h Levelset.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Graphics/drawContext.h ../Fltk/Draw.h -CutMap${OBJEXT}: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h -Smooth${OBJEXT}: Smooth.cpp Smooth.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h -CutParametric${OBJEXT}: CutParametric.cpp ../Common/GmshConfig.h \ - ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - CutParametric.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Graphics/drawContext.h ../Fltk/Draw.h -Lambda2${OBJEXT}: Lambda2.cpp Lambda2.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -Eigenvectors${OBJEXT}: Eigenvectors.cpp Eigenvectors.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Numeric/EigSolve.h -Eigenvalues${OBJEXT}: Eigenvalues.cpp Eigenvalues.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -StreamLines${OBJEXT}: StreamLines.cpp ../Common/GmshConfig.h StreamLines.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Post/OctreePost.h \ - ../Common/Octree.h ../Common/OctreeInternals.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Post/PViewOptions.h ../Post/ColorTable.h ../Graphics/drawContext.h \ - ../Fltk/Draw.h -CutGrid${OBJEXT}: CutGrid.cpp ../Common/GmshConfig.h ../Post/OctreePost.h \ - ../Common/Octree.h ../Common/OctreeInternals.h CutGrid.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Graphics/drawContext.h ../Fltk/Draw.h -Transform${OBJEXT}: Transform.cpp Transform.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h -LongitudeLatitude${OBJEXT}: LongitudeLatitude.cpp LongitudeLatitude.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/OpenFile.h -Triangulate${OBJEXT}: Triangulate.cpp ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/discreteFace.h ../Geo/GModel.h \ - ../Geo/GFace.h ../Geo/discreteEdge.h ../Geo/GModel.h ../Geo/GEdge.h \ - ../Geo/discreteVertex.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Mesh/DivideAndConquer.h \ - ../Common/GmshMessage.h Triangulate.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Post/PView.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -Warp${OBJEXT}: Warp.cpp Warp.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/SmoothData.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -SphericalRaise${OBJEXT}: SphericalRaise.cpp SphericalRaise.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -Skin${OBJEXT}: Skin.cpp Skin.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -GSHHS${OBJEXT}: GSHHS.cpp ../Mesh/Field.h ../Common/GmshConfig.h \ - ../Geo/STensor3.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Post/PView.h ../Geo/SPoint2.h GSHHS.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint2.h \ - ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \ - ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \ - ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \ - ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h -Extract${OBJEXT}: Extract.cpp ../Common/GmshConfig.h Extract.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h -ExtractElements${OBJEXT}: ExtractElements.cpp ExtractElements.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -ExtractEdges${OBJEXT}: ExtractEdges.cpp ExtractEdges.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h -MakeSimplex${OBJEXT}: MakeSimplex.cpp MakeSimplex.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h -Evaluate${OBJEXT}: Evaluate.cpp ../Common/GmshConfig.h Evaluate.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Post/OctreePost.h ../Common/Octree.h \ - ../Common/OctreeInternals.h -FieldView${OBJEXT}: FieldView.cpp FieldView.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Mesh/Field.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \ - ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h -Integrate${OBJEXT}: Integrate.cpp Integrate.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Post/PViewOptions.h ../Post/ColorTable.h -Gradient${OBJEXT}: Gradient.cpp Gradient.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -Curl${OBJEXT}: Curl.cpp Curl.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \ - ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Post/shapeFunctions.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -Divergence${OBJEXT}: Divergence.cpp Divergence.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -Annotate${OBJEXT}: Annotate.cpp ../Common/GmshConfig.h Annotate.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Graphics/drawContext.h ../Fltk/Draw.h \ - ../Fltk/GUI.h -Remove${OBJEXT}: Remove.cpp Remove.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h -Probe${OBJEXT}: Probe.cpp ../Common/GmshConfig.h Probe.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Post/OctreePost.h ../Common/Octree.h \ - ../Common/OctreeInternals.h ../Graphics/drawContext.h ../Fltk/Draw.h -HarmonicToTime${OBJEXT}: HarmonicToTime.cpp HarmonicToTime.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h -ModulusPhase${OBJEXT}: ModulusPhase.cpp ModulusPhase.h Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \ - ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \ - ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h -FiniteElement${OBJEXT}: FiniteElement.cpp ../Common/GmshConfig.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h FiniteElement.h Plugin.h ../Common/Options.h \ - ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \ - ../Post/PViewDataList.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshAssembler.h ../Numeric/gmshLinearSystem.h \ - ../Numeric/gmshProjection.h ../Numeric/gmshTermOfFormulation.h \ - ../Numeric/GmshMatrix.h ../Numeric/gmshFunction.h \ - ../Numeric/gmshAssembler.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/gmshFunction.h \ - ../Common/Gmsh.h ../Common/GmshMessage.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshLaplace.h ../Numeric/gmshTermOfFormulation.h \ - ../Numeric/gmshFunction.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshHelmholtz.h ../Numeric/gmshTermOfFormulation.h \ - ../Numeric/gmshFunction.h ../Numeric/GmshMatrix.h \ - ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h -HomologyComputation${OBJEXT}: HomologyComputation.cpp ../Common/Gmsh.h \ - ../Common/GmshMessage.h ../Common/GmshConfig.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/Homology.h ../Geo/CellComplex.h \ - ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \ - ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \ - ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h \ - ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Geo/MPoint.h ../Geo/MElement.h ../Geo/MLine.h \ - ../Geo/MElement.h ../Geo/MTriangle.h ../Geo/MElement.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Geo/GModel.h \ - ../Geo/GEntity.h ../Geo/GRegion.h ../Geo/GFace.h ../Geo/GVertex.h \ - ../Post/PViewDataGModel.h ../Post/PViewData.h HomologyComputation.h \ - Plugin.h ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \ - ../Post/PViewDataList.h ../Post/PViewData.h diff --git a/Plugin/ModulusPhase.cpp b/Plugin/ModulusPhase.cpp index 6523d7fa58b574a8a3a2e1c2f2d2258266eb837a..d77ac7dcc4f45028dee81e045215618ba43696c0 100644 --- a/Plugin/ModulusPhase.cpp +++ b/Plugin/ModulusPhase.cpp @@ -80,9 +80,9 @@ PView *GMSH_ModulusPhasePlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } } @@ -92,20 +92,20 @@ PView *GMSH_ModulusPhasePlugin::execute(PView *v) for(int ele = 0; ele < data1->getNumElements(rIndex, ent); ele++){ if(data1->skipElement(rIndex, ent, ele)) continue; for(int nod = 0; nod < data1->getNumNodes(rIndex, ent, ele); nod++){ - double x, y, z; - int tag = data1->getNode(rIndex, ent, ele, nod, x, y, z); - if(tag) continue; - for(int comp = 0; comp < data1->getNumComponents(rIndex, ent, ele); comp++){ - double vr, vi; - data1->getValue(rIndex, ent, ele, nod, comp, vr); - data1->getValue(iIndex, ent, ele, nod, comp, vi); - double modulus = sqrt(vr * vr + vi * vi); - double phase = atan2(vi, vr); - data1->setValue(rIndex, ent, ele, nod, comp, modulus); - data1->setValue(iIndex, ent, ele, nod, comp, phase); - data1->tagNode(rIndex, ent, ele, nod, 1); - data1->tagNode(iIndex, ent, ele, nod, 1); - } + double x, y, z; + int tag = data1->getNode(rIndex, ent, ele, nod, x, y, z); + if(tag) continue; + for(int comp = 0; comp < data1->getNumComponents(rIndex, ent, ele); comp++){ + double vr, vi; + data1->getValue(rIndex, ent, ele, nod, comp, vr); + data1->getValue(iIndex, ent, ele, nod, comp, vi); + double modulus = sqrt(vr * vr + vi * vi); + double phase = atan2(vi, vr); + data1->setValue(rIndex, ent, ele, nod, comp, modulus); + data1->setValue(iIndex, ent, ele, nod, comp, phase); + data1->tagNode(rIndex, ent, ele, nod, 1); + data1->tagNode(iIndex, ent, ele, nod, 1); + } } } } diff --git a/Plugin/ModulusPhase.h b/Plugin/ModulusPhase.h index 3af0142b30319a003961d871eeb84e0928805159..ca8210dfa540c3c1285eca5d35071d614ec7f820 100644 --- a/Plugin/ModulusPhase.h +++ b/Plugin/ModulusPhase.h @@ -15,7 +15,7 @@ extern "C" class GMSH_ModulusPhasePlugin : public GMSH_PostPlugin { -public: + public: GMSH_ModulusPhasePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp index ec2f4deed573d776abb16b3a8e1a8019d5461e0c..0090235a7e47007ebd83be14fb0697c69267c6e8 100644 --- a/Plugin/Probe.cpp +++ b/Plugin/Probe.cpp @@ -42,7 +42,7 @@ void GMSH_ProbePlugin::draw(void *context) double z = ProbeOptions_Number[2].def; drawContext *ctx = (drawContext*)context; glColor4ubv((GLubyte *) & CTX::instance()->color.fg); - glLineWidth(CTX::instance()->lineWidth); + glLineWidth((float)CTX::instance()->lineWidth); SBoundingBox3d bb = PView::list[num]->getData()->getBoundingBox(); if(x >= bb.min().x() && x <= bb.max().x() && y >= bb.min().y() && y <= bb.max().y() && diff --git a/Plugin/Probe.h b/Plugin/Probe.h index cdf7670ab513fca109398ce9db67b953b6eb1891..bd8879111ef6e5eef9d95cbd497bbe5846bd53ae 100644 --- a/Plugin/Probe.h +++ b/Plugin/Probe.h @@ -18,7 +18,7 @@ class GMSH_ProbePlugin : public GMSH_PostPlugin double levelset(double x, double y, double z, double val) const; static double callback(int num, int action, double value, double *opt); static int iview; -public: + public: GMSH_ProbePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Remove.h b/Plugin/Remove.h index a617c583bb0ef5540ad0f7d14818f6a22a163315..aec2d06d930bbd61331661d5c68a5de4c5344c22 100644 --- a/Plugin/Remove.h +++ b/Plugin/Remove.h @@ -15,7 +15,7 @@ extern "C" class GMSH_RemovePlugin : public GMSH_PostPlugin { -public: + public: GMSH_RemovePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Smooth.h b/Plugin/Smooth.h index fe77c462c341498ce9d34ea98f7ce16245e9111f..8ac56c603aea89003ee651e5e556725dd75cecad 100644 --- a/Plugin/Smooth.h +++ b/Plugin/Smooth.h @@ -15,7 +15,7 @@ extern "C" class GMSH_SmoothPlugin : public GMSH_PostPlugin { -public: + public: GMSH_SmoothPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/SphericalRaise.cpp b/Plugin/SphericalRaise.cpp index 99b19b56cdbd8fa84467d29cc1650574c1cc3983..f74f07eaf00bdedb841402afcf378233290f9f34 100644 --- a/Plugin/SphericalRaise.cpp +++ b/Plugin/SphericalRaise.cpp @@ -93,9 +93,9 @@ PView *GMSH_SphericalRaisePlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } } @@ -104,25 +104,25 @@ PView *GMSH_SphericalRaisePlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){ - double x, y, z; - int tag = data1->getNode(step, ent, ele, nod, x, y, z); - if(!tag){ - double r[3], val; - r[0] = x - center[0]; - r[1] = y - center[1]; - r[2] = z - center[2]; - norme(r); - data1->getScalarValue(step, ent, ele, nod, val); - double coef = offset + raise * val; - x += coef * r[0]; - y += coef * r[1]; - z += coef * r[2]; - data1->setNode(step, ent, ele, nod, x, y, z); - data1->tagNode(step, ent, ele, nod, 1); - } - } + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){ + double x, y, z; + int tag = data1->getNode(step, ent, ele, nod, x, y, z); + if(!tag){ + double r[3], val; + r[0] = x - center[0]; + r[1] = y - center[1]; + r[2] = z - center[2]; + norme(r); + data1->getScalarValue(step, ent, ele, nod, val); + double coef = offset + raise * val; + x += coef * r[0]; + y += coef * r[1]; + z += coef * r[2]; + data1->setNode(step, ent, ele, nod, x, y, z); + data1->tagNode(step, ent, ele, nod, 1); + } + } } } } diff --git a/Plugin/SphericalRaise.h b/Plugin/SphericalRaise.h index b5680baf1d5d56f430fec3dab617c4cdbdd2f394..8ee260113d010591cdb9612b467e0208a3ddfb52 100644 --- a/Plugin/SphericalRaise.h +++ b/Plugin/SphericalRaise.h @@ -15,7 +15,7 @@ extern "C" class GMSH_SphericalRaisePlugin : public GMSH_PostPlugin { -public: + public: GMSH_SphericalRaisePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp index ac59714c4f98fc42be95f270b7cd6071c6a1facc..6800e1bd46840dc5ee826a0cd86c5d3021faada9 100644 --- a/Plugin/StreamLines.cpp +++ b/Plugin/StreamLines.cpp @@ -291,7 +291,7 @@ PView *GMSH_StreamLinesPlugin::execute(PView *v) // X3 = X + a3 * DT * V(X2) // X4 = X + a4 * DT * V(X3) // X = X + b1 X1 + b2 X2 + b3 X3 + b4 x4 - double val[3]; + double val[3]; o1.searchVector(X[0], X[1], X[2], val, currentTimeStep); for(int k = 0; k < 3; k++) X1[k] = X[k] + DT * val[k] * a1; o1.searchVector(X1[0], X1[1], X1[2], val, currentTimeStep); diff --git a/Plugin/StreamLines.h b/Plugin/StreamLines.h index a5e2063cf490524367b14ab358a0497669ea16cf..42075298880fa298bb1fb3eacc2431738111e699 100644 --- a/Plugin/StreamLines.h +++ b/Plugin/StreamLines.h @@ -17,7 +17,7 @@ class GMSH_StreamLinesPlugin : public GMSH_PostPlugin { static double callback(int num, int action, double value, double *opt, double step, double min, double max); -public: + public: GMSH_StreamLinesPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp index 1e6044da0571eb8496afc0ff689a31d0081deabb..2319b2f5ca0188f68300a0fb8da405a9a7606067 100644 --- a/Plugin/Transform.cpp +++ b/Plugin/Transform.cpp @@ -99,10 +99,10 @@ PView *GMSH_TransformPlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - if(swap) data1->revertElement(step, ent, ele); - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + if(swap) data1->revertElement(step, ent, ele); + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } } @@ -111,19 +111,19 @@ PView *GMSH_TransformPlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){ - double x, y, z; - int tag = data1->getNode(step, ent, ele, nod, x, y, z); - if(!tag){ - double x2, y2, z2; - x2 = mat[0][0] * x + mat[0][1] * y + mat[0][2] * z + mat[0][3]; - y2 = mat[1][0] * x + mat[1][1] * y + mat[1][2] * z + mat[1][3]; - z2 = mat[2][0] * x + mat[2][1] * y + mat[2][2] * z + mat[2][3]; - data1->setNode(step, ent, ele, nod, x2, y2, z2); - data1->tagNode(step, ent, ele, nod, 1); - } - } + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++){ + double x, y, z; + int tag = data1->getNode(step, ent, ele, nod, x, y, z); + if(!tag){ + double x2, y2, z2; + x2 = mat[0][0] * x + mat[0][1] * y + mat[0][2] * z + mat[0][3]; + y2 = mat[1][0] * x + mat[1][1] * y + mat[1][2] * z + mat[1][3]; + z2 = mat[2][0] * x + mat[2][1] * y + mat[2][2] * z + mat[2][3]; + data1->setNode(step, ent, ele, nod, x2, y2, z2); + data1->tagNode(step, ent, ele, nod, 1); + } + } } } } diff --git a/Plugin/Transform.h b/Plugin/Transform.h index cac10abc874151f78b62b2ce90903acf4eb125ae..6732293f2dd9929651efb97d8714f03a57f96b9c 100644 --- a/Plugin/Transform.h +++ b/Plugin/Transform.h @@ -15,7 +15,7 @@ extern "C" class GMSH_TransformPlugin : public GMSH_PostPlugin { -public: + public: GMSH_TransformPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Plugin/Triangulate.cpp b/Plugin/Triangulate.cpp index ff91d953c91c247cfc0d8f5221793002315d178f..17738fcb03e5b849a775f8e3fbb4a3e6345b7447 100644 --- a/Plugin/Triangulate.cpp +++ b/Plugin/Triangulate.cpp @@ -152,14 +152,14 @@ PView *GMSH_TriangulatePlugin::execute(PView *v) p[2] = (PointData*)doc.points[doc.triangles[i].c].data; int numComp = 0; std::vector<double> *vec = 0; - if(p[0]->v.size() == 3 + 9 * numSteps && - p[1]->v.size() == 3 + 9 * numSteps && - p[2]->v.size() == 3 + 9 * numSteps){ + if((int)p[0]->v.size() == 3 + 9 * numSteps && + (int)p[1]->v.size() == 3 + 9 * numSteps && + (int)p[2]->v.size() == 3 + 9 * numSteps){ numComp = 9; data2->NbTT++; vec = &data2->TT; } - else if(p[0]->v.size() == 3 + 3 * numSteps && - p[1]->v.size() == 3 + 3 * numSteps && - p[2]->v.size() == 3 + 3 * numSteps){ + else if((int)p[0]->v.size() == 3 + 3 * numSteps && + (int)p[1]->v.size() == 3 + 3 * numSteps && + (int)p[2]->v.size() == 3 + 3 * numSteps){ numComp = 3; data2->NbVT++; vec = &data2->VT; } else{ diff --git a/Plugin/Triangulate.h b/Plugin/Triangulate.h index 9b84903be1be0171b55cb5e45741b313aa2ffb90..f8a280ab19e8b2718fc6686acb1ae174acf4d61f 100644 --- a/Plugin/Triangulate.h +++ b/Plugin/Triangulate.h @@ -15,7 +15,7 @@ extern "C" class GMSH_TriangulatePlugin : public GMSH_PostPlugin { -public: + public: GMSH_TriangulatePlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *helpText) const; diff --git a/Plugin/Warp.cpp b/Plugin/Warp.cpp index ecfd6ee000789e3156bcabd40276f54a61a2674f..207f5487daf29efd76615f2dc5cc009425e83c34 100644 --- a/Plugin/Warp.cpp +++ b/Plugin/Warp.cpp @@ -29,7 +29,7 @@ void GMSH_WarpPlugin::getName(char *name) const } void GMSH_WarpPlugin::getInfos(char *author, char *copyright, - char *help_text) const + char *help_text) const { strcpy(author, "C. Geuzaine, J.-F. Remacle"); strcpy(copyright, "C. Geuzaine, J.-F. Remacle"); @@ -97,16 +97,16 @@ PView *GMSH_WarpPlugin::execute(PView *v) normals = new smooth_normals(AngleTol); for(int ent = 0; ent < data1->getNumEntities(0); ent++){ for(int ele = 0; ele < data1->getNumElements(0, ent); ele++){ - if(data1->skipElement(0, ent, ele)) continue; - int numEdges = data1->getNumEdges(0, ent, ele); - if(numEdges == 3 || numEdges == 4){ - double x[4], y[4], z[4], n[4]; - for(int nod = 0; nod < numEdges; nod++) - data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); - normal3points(x[0], y[0], z[0], x[1], y[1], z[1], x[2], y[2], z[2], n); - for(int nod = 0; nod < numEdges; nod++) - normals->add(x[nod], y[nod], z[nod], n[0], n[1], n[2]); - } + if(data1->skipElement(0, ent, ele)) continue; + int numEdges = data1->getNumEdges(0, ent, ele); + if(numEdges == 3 || numEdges == 4){ + double x[4], y[4], z[4], n[4]; + for(int nod = 0; nod < numEdges; nod++) + data1->getNode(0, ent, ele, nod, x[nod], y[nod], z[nod]); + normal3points(x[0], y[0], z[0], x[1], y[1], z[1], x[2], y[2], z[2], n); + for(int nod = 0; nod < numEdges; nod++) + normals->add(x[nod], y[nod], z[nod], n[0], n[1], n[2]); + } } } } @@ -115,9 +115,9 @@ PView *GMSH_WarpPlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) - data1->tagNode(step, ent, ele, nod, 0); + if(data1->skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < data1->getNumNodes(step, ent, ele); nod++) + data1->tagNode(step, ent, ele, nod, 0); } } } @@ -126,35 +126,35 @@ PView *GMSH_WarpPlugin::execute(PView *v) for(int step = 0; step < data1->getNumTimeSteps(); step++){ for(int ent = 0; ent < data1->getNumEntities(step); ent++){ for(int ele = 0; ele < data1->getNumElements(step, ent); ele++){ - if(data1->skipElement(step, ent, ele)) continue; - int numNodes = data1->getNumNodes(step, ent, ele); - double x[8], y[8], z[8], n[3] = {0., 0., 0.}; - int tag[8]; - for(int nod = 0; nod < numNodes; nod++) - tag[nod] = data1->getNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); - int dim = data1->getDimension(step, ent, ele); - if(normals && dim == 2) - normal3points(x[0], y[0], z[0], x[1], y[1], z[1], x[2], y[2], z[2], n); - for(int nod = 0; nod < numNodes; nod++){ - if(tag[nod]) continue; // already transformed - double mult = 1., val[3] = {n[0], n[1], n[2]}; - if(normals){ - if(dim == 2){ - normals->get(x[nod], y[nod], z[nod], val[0], val[1], val[2]); - data1->getScalarValue(step, ent, ele, nod, mult); - } - } - else if(data2->getNumComponents(TimeStep, ent, ele) == 3 && - data2->getNumNodes(TimeStep, ent, ele) == numNodes){ - for(int comp = 0; comp < 3; comp++) - data2->getValue(TimeStep, ent, ele, nod, comp, val[comp]); - } - x[nod] += factor * mult * val[0]; - y[nod] += factor * mult * val[1]; - z[nod] += factor * mult * val[2]; - data1->setNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); - data1->tagNode(step, ent, ele, nod, 1); - } + if(data1->skipElement(step, ent, ele)) continue; + int numNodes = data1->getNumNodes(step, ent, ele); + double x[8], y[8], z[8], n[3] = {0., 0., 0.}; + int tag[8]; + for(int nod = 0; nod < numNodes; nod++) + tag[nod] = data1->getNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); + int dim = data1->getDimension(step, ent, ele); + if(normals && dim == 2) + normal3points(x[0], y[0], z[0], x[1], y[1], z[1], x[2], y[2], z[2], n); + for(int nod = 0; nod < numNodes; nod++){ + if(tag[nod]) continue; // already transformed + double mult = 1., val[3] = {n[0], n[1], n[2]}; + if(normals){ + if(dim == 2){ + normals->get(x[nod], y[nod], z[nod], val[0], val[1], val[2]); + data1->getScalarValue(step, ent, ele, nod, mult); + } + } + else if(data2->getNumComponents(TimeStep, ent, ele) == 3 && + data2->getNumNodes(TimeStep, ent, ele) == numNodes){ + for(int comp = 0; comp < 3; comp++) + data2->getValue(TimeStep, ent, ele, nod, comp, val[comp]); + } + x[nod] += factor * mult * val[0]; + y[nod] += factor * mult * val[1]; + z[nod] += factor * mult * val[2]; + data1->setNode(step, ent, ele, nod, x[nod], y[nod], z[nod]); + data1->tagNode(step, ent, ele, nod, 1); + } } } } diff --git a/Plugin/Warp.h b/Plugin/Warp.h index eb6ef7226b5753b9cdf784bd67c30e9a9a5d4dd7..deb87e3cc82ae1a328018f229c8569d1da9a44d2 100644 --- a/Plugin/Warp.h +++ b/Plugin/Warp.h @@ -15,7 +15,7 @@ extern "C" class GMSH_WarpPlugin : public GMSH_PostPlugin { -public: + public: GMSH_WarpPlugin(){} void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; diff --git a/Post/CMakeLists.txt b/Post/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..eb5c0f29b44879ff8b1176c8ce45d7a84f041870 --- /dev/null +++ b/Post/CMakeLists.txt @@ -0,0 +1,17 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + PView.cpp PViewIO.cpp + PViewData.cpp PViewDataIO.cpp + PViewDataList.cpp PViewDataListIO.cpp + PViewDataGModel.cpp PViewDataGModelIO.cpp + PViewOptions.cpp + adaptiveData.cpp shapeFunctions.cpp + OctreePost.cpp + ColorTable.cpp +) + +append_gmsh_src(Post "${SRC}") diff --git a/Post/Makefile b/Post/Makefile deleted file mode 100644 index 7c08c79e69f4400e573970656833bf8acf74ab7e..0000000000000000000000000000000000000000 --- a/Post/Makefile +++ /dev/null @@ -1,163 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../variables - -LIB = ../lib/libGmshPost${LIBEXT} - -INC = ${DASH}I../Common ${DASH}I../Geo ${DASH}I../Mesh\ - ${DASH}I../Post ${DASH}I../Graphics ${DASH}I../Numeric ${DASH}I../Parser\ - ${DASH}I../Plugin ${DASH}I../Fltk ${DASH}I../contrib/MathEval\ - ${DASH}I../contrib/ANN/include - -CFLAGS =${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = PView.cpp PViewIO.cpp\ - PViewData.cpp PViewDataIO.cpp\ - PViewDataList.cpp PViewDataListIO.cpp\ - PViewDataGModel.cpp PViewDataGModelIO.cpp\ - PViewOptions.cpp\ - adaptiveData.cpp shapeFunctions.cpp\ - OctreePost.cpp\ - ColorTable.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -PView${OBJEXT}: PView.cpp PView.h ../Geo/SPoint3.h PViewDataList.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h PViewDataGModel.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h PViewOptions.h ColorTable.h \ - ../Common/VertexArray.h ../Common/SmoothData.h adaptiveData.h -PViewIO${OBJEXT}: PViewIO.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ - PView.h ../Geo/SPoint3.h PViewDataList.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Common/StringUtils.h -PViewData${OBJEXT}: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \ - ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h adaptiveData.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h -PViewDataIO${OBJEXT}: PViewDataIO.cpp ../Common/GmshMessage.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h -PViewDataList${OBJEXT}: PViewDataList.cpp PViewDataList.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/GmshDefines.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/SmoothData.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h -PViewDataListIO${OBJEXT}: PViewDataListIO.cpp PViewDataList.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/StringUtils.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h adaptiveData.h -PViewDataGModel${OBJEXT}: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Geo/GModel.h \ - ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h \ - ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \ - ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \ - ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \ - ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/MLine.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \ - ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \ - ../Geo/MEdge.h ../Geo/SVector3.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/MTriangle.h \ - ../Geo/MElement.h ../Geo/MQuadrangle.h ../Geo/MElement.h \ - ../Geo/MTetrahedron.h ../Geo/MElement.h ../Geo/MHexahedron.h \ - ../Geo/MElement.h ../Geo/MPrism.h ../Geo/MElement.h ../Geo/MPyramid.h \ - ../Geo/MElement.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h -PViewDataGModelIO${OBJEXT}: PViewDataGModelIO.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h PViewDataGModel.h PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \ - ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SOrientedBoundingBox.h \ - ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/Pair.h \ - ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \ - ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \ - ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \ - ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ - ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \ - ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MElement.h ../Common/GmshDefines.h \ - ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/StringUtils.h -PViewOptions${OBJEXT}: PViewOptions.cpp ../Common/GmshConfig.h \ - ../Common/GmshMessage.h PViewOptions.h ColorTable.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h -adaptiveData${OBJEXT}: adaptiveData.cpp adaptiveData.h ../Numeric/GmshMatrix.h \ - ../Common/GmshConfig.h ../Common/GmshMessage.h ../Plugin/Plugin.h \ - ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \ - ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \ - ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/OS.h -shapeFunctions${OBJEXT}: shapeFunctions.cpp shapeFunctions.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ - ../Common/GmshMessage.h -OctreePost${OBJEXT}: OctreePost.cpp ../Common/Octree.h \ - ../Common/OctreeInternals.h OctreePost.h PView.h ../Geo/SPoint3.h \ - PViewDataList.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ - PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \ - ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \ - ../Geo/SOrientedBoundingBox.h ../Geo/SVector3.h ../Geo/SPoint3.h \ - ../Geo/SPoint2.h ../Geo/Pair.h ../Geo/GPoint.h ../Geo/SPoint2.h \ - ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h \ - ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \ - ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \ - ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \ - ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h shapeFunctions.h ../Geo/MElement.h \ - ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \ - ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ - ../Geo/MFace.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/SVector3.h \ - ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h -ColorTable${OBJEXT}: ColorTable.cpp ../Common/GmshMessage.h ColorTable.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h diff --git a/Post/OctreePost.cpp b/Post/OctreePost.cpp index 2bfbc93f12d22116ef0fe81fe31f2885d583c41a..90c8bfc4a745db9eca2c458db3cacc0c05a2b648 100644 --- a/Post/OctreePost.cpp +++ b/Post/OctreePost.cpp @@ -225,8 +225,8 @@ OctreePost::OctreePost(PView *v) SBoundingBox3d bb = _theViewDataList->getBoundingBox(); double min[3] = {bb.min().x(), bb.min().y(), bb.min().z()}; double size[3] = {bb.max().x() - bb.min().x(), - bb.max().y() - bb.min().y(), - bb.max().z() - bb.min().z()}; + bb.max().y() - bb.min().y(), + bb.max().z() - bb.min().z()}; const int maxElePerBucket = 100; // memory vs. speed trade-off PViewDataList *l = _theViewDataList; @@ -334,7 +334,7 @@ bool OctreePost::_getValue(void *in, int dim, int nbNod, int nbComp, } bool OctreePost::_getValue(void *in, int nbComp, double P[3], int timestep, - double *values, double *elementSize) + double *values, double *elementSize) { if(!in) return false; @@ -359,7 +359,7 @@ bool OctreePost::_getValue(void *in, int nbComp, double P[3], int timestep, for(int nod = 0; nod < e->getNumVertices(); nod++){ for(int comp = 0; comp < nbComp; comp++){ if(!_theViewDataGModel->getValueByIndex(step, dataIndex[nod], nod, comp, - nodeval[nod * nbComp + comp])) + nodeval[nod * nbComp + comp])) return false; } } diff --git a/Post/PViewData.h b/Post/PViewData.h index d592827192f61b00ee6aefd4839c3f4e868486e4..7b28e2d2eb0d01c6849cbb7bea0eef08a5240987 100644 --- a/Post/PViewData.h +++ b/Post/PViewData.h @@ -104,9 +104,9 @@ class PViewData { // ele-th element in the ent-th entity (if the node has a tag, // getNode returns it) virtual int getNode(int step, int ent, int ele, int nod, - double &x, double &y, double &z) = 0; + double &x, double &y, double &z) = 0; virtual void setNode(int step, int ent, int ele, int nod, - double x, double y, double z); + double x, double y, double z); virtual void tagNode(int step, int ent, int ele, int nod, int tag){} // return the number of componts available for the ele-th element in @@ -157,7 +157,7 @@ class PViewData { // check if we should skip the given entity/element virtual bool skipEntity(int step, int ent){ return false; } virtual bool skipElement(int step, int ent, int ele, - bool checkVisibility=false){ return false; } + bool checkVisibility=false){ return false; } // check if the data has the given step/partition/etc. virtual bool hasTimeStep(int step){ return step < getNumTimeSteps(); } diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp index 7f7c063fcdccf167bcb22eb24bdef1d9ea2a26cd..629ecf8f0264d598c906cfec2944550903d328af 100644 --- a/Post/PViewDataGModel.cpp +++ b/Post/PViewDataGModel.cpp @@ -35,26 +35,26 @@ bool PViewDataGModel::finalize() // treat these 2 special cases separately for maximum efficiency int numComp = _steps[step]->getNumComponents(); for(int i = 0; i < _steps[step]->getNumData(); i++){ - double *d = _steps[step]->getData(i); - if(d){ - double val = ComputeScalarRep(numComp, d); - _steps[step]->setMin(std::min(_steps[step]->getMin(), val)); - _steps[step]->setMax(std::max(_steps[step]->getMax(), val)); - } + double *d = _steps[step]->getData(i); + if(d){ + double val = ComputeScalarRep(numComp, d); + _steps[step]->setMin(std::min(_steps[step]->getMin(), val)); + _steps[step]->setMax(std::max(_steps[step]->getMax(), val)); + } } } else{ // general case (slower) for(int ent = 0; ent < getNumEntities(step); ent++){ - for(int ele = 0; ele < getNumElements(step, ent); ele++){ - if(skipElement(step, ent, ele)) continue; - for(int nod = 0; nod < getNumNodes(step, ent, ele); nod++){ - double val; - getScalarValue(step, ent, ele, nod, val); - _steps[step]->setMin(std::min(_steps[step]->getMin(), val)); - _steps[step]->setMax(std::max(_steps[step]->getMax(), val)); - } - } + for(int ele = 0; ele < getNumElements(step, ent); ele++){ + if(skipElement(step, ent, ele)) continue; + for(int nod = 0; nod < getNumNodes(step, ent, ele); nod++){ + double val; + getScalarValue(step, ent, ele, nod, val); + _steps[step]->setMin(std::min(_steps[step]->getMin(), val)); + _steps[step]->setMax(std::max(_steps[step]->getMax(), val)); + } + } } } _min = std::min(_min, _steps[step]->getMin()); @@ -288,7 +288,7 @@ int PViewDataGModel::getNumNodes(int step, int ent, int ele) } int PViewDataGModel::getNode(int step, int ent, int ele, int nod, - double &x, double &y, double &z) + double &x, double &y, double &z) { MElement *e = _getElement(step, ent, ele); if(_type == GaussPointData){ @@ -302,9 +302,9 @@ int PViewDataGModel::getNode(int step, int ent, int ele, int nod, else{ double vx[8], vy[8], vz[8]; for(int i = 0; i < e->getNumPrimaryVertices(); i++){ - vx[i] = e->getVertex(i)->x(); - vy[i] = e->getVertex(i)->y(); - vz[i] = e->getVertex(i)->z(); + vx[i] = e->getVertex(i)->x(); + vy[i] = e->getVertex(i)->y(); + vz[i] = e->getVertex(i)->z(); } x = e->interpolate(vx, p[3 * nod], p[3 * nod + 1], p[3 * nod + 2], 1, 1); y = e->interpolate(vy, p[3 * nod], p[3 * nod + 1], p[3 * nod + 2], 1, 1); @@ -431,30 +431,30 @@ void PViewDataGModel::smooth() GModel *m = _steps[step]->getModel(); int numComp = _steps[step]->getNumComponents(); _steps2.push_back(new stepData<double>(m, numComp, _steps[step]->getFileName(), - _steps[step]->getFileIndex())); + _steps[step]->getFileIndex())); std::map<int, int> nodeConnect; for(int ent = 0; ent < getNumEntities(step); ent++){ for(int ele = 0; ele < getNumElements(step, ent); ele++){ - MElement *e = _steps[step]->getEntity(ent)->getMeshElement(ele); - double val; - if(!getValueByIndex(step, e->getNum(), 0, 0, val)) continue; - for(int nod = 0; nod < e->getNumVertices(); nod++){ - MVertex *v = e->getVertex(nod); - if(nodeConnect.count(v->getNum())) - nodeConnect[v->getNum()]++; - else - nodeConnect[v->getNum()] = 1; - double *d = _steps2.back()->getData(v->getNum(), true); - for(int j = 0; j < numComp; j++) - if(getValueByIndex(step, e->getNum(), nod, j, val)) d[j] += val; - } + MElement *e = _steps[step]->getEntity(ent)->getMeshElement(ele); + double val; + if(!getValueByIndex(step, e->getNum(), 0, 0, val)) continue; + for(int nod = 0; nod < e->getNumVertices(); nod++){ + MVertex *v = e->getVertex(nod); + if(nodeConnect.count(v->getNum())) + nodeConnect[v->getNum()]++; + else + nodeConnect[v->getNum()] = 1; + double *d = _steps2.back()->getData(v->getNum(), true); + for(int j = 0; j < numComp; j++) + if(getValueByIndex(step, e->getNum(), nod, j, val)) d[j] += val; + } } } for(int i = 0; i < _steps2.back()->getNumData(); i++){ double *d = _steps2.back()->getData(i); if(d){ - double f = nodeConnect[i]; - if(f) for(int j = 0; j < numComp; j++) d[j] /= f; + double f = nodeConnect[i]; + if(f) for(int j = 0; j < numComp; j++) d[j] /= f; } } } diff --git a/Post/PViewDataGModel.h b/Post/PViewDataGModel.h index 2d0639194de96cd67ebc203d8de6944c5195d95b..64cb163432da76cce8b55a421227a46398754cee 100644 --- a/Post/PViewDataGModel.h +++ b/Post/PViewDataGModel.h @@ -40,7 +40,7 @@ class stepData{ std::vector<std::vector<double> > _gaussPoints; public: stepData(GModel *model, int numComp, std::string fileName="", int fileIndex=-1, - double time=0., double min=VAL_INF, double max=-VAL_INF) + double time=0., double min=VAL_INF, double max=-VAL_INF) : _model(model), _fileName(fileName), _fileIndex(fileIndex), _time(time), _min(min), _max(max), _numComp(numComp), _data(0) { @@ -78,8 +78,8 @@ class stepData{ if(allocIfNeeded){ if(index >= getNumData()) resizeData(index + 100); // optimize this if(!(*_data)[index]){ - (*_data)[index] = new real[_numComp * mult]; - for(int i = 0; i < _numComp * mult; i++) (*_data)[index][i] = 0.; + (*_data)[index] = new real[_numComp * mult]; + for(int i = 0; i < _numComp * mult; i++) (*_data)[index][i] = 0.; } } else{ diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index 2149b58fd2c8d27494d98414bd669f73da05a141..6e1253fbc0aa4ae9c93ce4f2bf58039430b727f9 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -135,54 +135,54 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary) if(_steps[step]->getData(i)) numNodes++; if(numNodes){ if (_type == NodeData){ - fprintf(fp, "$NodeData\n"); - fprintf(fp, "1\n\"%s\"\n", getName().c_str()); - fprintf(fp, "1\n%.16g\n", _steps[step]->getTime()); - fprintf(fp, "3\n%d\n%d\n%d\n", step, numComp, numNodes); - for(int i = 0; i < _steps[step]->getNumData(); i++){ - if(_steps[step]->getData(i)){ - MVertex *v = _steps[step]->getModel()->getMeshVertexByTag(i); - if(!v){ - Msg::Error("Unknown vertex %d in data", i); - return false; - } - int num = v->getIndex(); - if(binary){ - fwrite(&num, sizeof(int), 1, fp); - fwrite(_steps[step]->getData(i), sizeof(double), numComp, fp); - } - else{ - fprintf(fp, "%d", num); - for(int k = 0; k < numComp; k++) - fprintf(fp, " %.16g", _steps[step]->getData(i)[k]); - fprintf(fp, "\n"); - } - } - } - if(binary) fprintf(fp, "\n"); - fprintf(fp, "$EndNodeData\n"); + fprintf(fp, "$NodeData\n"); + fprintf(fp, "1\n\"%s\"\n", getName().c_str()); + fprintf(fp, "1\n%.16g\n", _steps[step]->getTime()); + fprintf(fp, "3\n%d\n%d\n%d\n", step, numComp, numNodes); + for(int i = 0; i < _steps[step]->getNumData(); i++){ + if(_steps[step]->getData(i)){ + MVertex *v = _steps[step]->getModel()->getMeshVertexByTag(i); + if(!v){ + Msg::Error("Unknown vertex %d in data", i); + return false; + } + int num = v->getIndex(); + if(binary){ + fwrite(&num, sizeof(int), 1, fp); + fwrite(_steps[step]->getData(i), sizeof(double), numComp, fp); + } + else{ + fprintf(fp, "%d", num); + for(int k = 0; k < numComp; k++) + fprintf(fp, " %.16g", _steps[step]->getData(i)[k]); + fprintf(fp, "\n"); + } + } + } + if(binary) fprintf(fp, "\n"); + fprintf(fp, "$EndNodeData\n"); } else{ - fprintf(fp, "$ElementData\n"); - fprintf(fp, "1\n\"%s\"\n", getName().c_str()); - fprintf(fp, "1\n%.16g\n", _steps[step]->getTime()); - fprintf(fp, "3\n%d\n%d\n%d\n", step, numComp, numNodes); - for(int i = 0; i < _steps[step]->getNumData(); i++){ - if(_steps[step]->getData(i)){ - if(binary){ - fwrite(&i, sizeof(int), 1, fp); - fwrite(_steps[step]->getData(i), sizeof(double), numComp, fp); - } - else{ - fprintf(fp, "%d", i); - for(int k = 0; k < numComp; k++) - fprintf(fp, " %.16g", _steps[step]->getData(i)[k]); - fprintf(fp, "\n"); - } - } - } - if(binary) fprintf(fp, "\n"); - fprintf(fp, "$EndElementData\n"); + fprintf(fp, "$ElementData\n"); + fprintf(fp, "1\n\"%s\"\n", getName().c_str()); + fprintf(fp, "1\n%.16g\n", _steps[step]->getTime()); + fprintf(fp, "3\n%d\n%d\n%d\n", step, numComp, numNodes); + for(int i = 0; i < _steps[step]->getNumData(); i++){ + if(_steps[step]->getData(i)){ + if(binary){ + fwrite(&i, sizeof(int), 1, fp); + fwrite(_steps[step]->getData(i), sizeof(double), numComp, fp); + } + else{ + fprintf(fp, "%d", i); + for(int k = 0; k < numComp; k++) + fprintf(fp, " %.16g", _steps[step]->getData(i)[k]); + fprintf(fp, "\n"); + } + } + } + if(binary) fprintf(fp, "\n"); + fprintf(fp, "$EndElementData\n"); } } } diff --git a/Post/PViewDataList.cpp b/Post/PViewDataList.cpp index b2f97f0781fb485b7888d0a8b424c9a41c9ea7d2..2bdb107e37be62ffa32a800cccc87be666757bc7 100644 --- a/Post/PViewDataList.cpp +++ b/Post/PViewDataList.cpp @@ -58,7 +58,7 @@ bool PViewDataList::finalize() // add dummy time values if none (or too few) time values are // provided (e.g. using the old parsed format) - if(Time.size() < NbTimeStep) { + if((int)Time.size() < NbTimeStep) { for(int i = Time.size(); i < NbTimeStep; i++) Time.push_back(i); } @@ -275,7 +275,7 @@ int PViewDataList::getNumNodes(int step, int ent, int ele) } int PViewDataList::getNode(int step, int ent, int ele, int nod, - double &x, double &y, double &z) + double &x, double &y, double &z) { if(ele != _lastElement) _setLast(ele); x = _lastXYZ[nod]; @@ -285,7 +285,7 @@ int PViewDataList::getNode(int step, int ent, int ele, int nod, } void PViewDataList::setNode(int step, int ent, int ele, int nod, - double x, double y, double z) + double x, double y, double z) { if(step) return; if(ele != _lastElement) _setLast(ele); @@ -327,8 +327,8 @@ void PViewDataList::setValue(int step, int ent, int ele, int nod, int comp, doub if(ele != _lastElement) _setLast(ele); if(step >= NbTimeStep) step = 0; _lastVal[step * _lastNumNodes * _lastNumComponents + - nod * _lastNumComponents + - comp] = val; + nod * _lastNumComponents + + comp] = val; } int PViewDataList::getNumEdges(int step, int ent, int ele) @@ -359,7 +359,7 @@ void PViewDataList::_getString(int dim, int i, int step, std::string &str, int index, nbchar; double *d1 = &td[i * nbd]; - double *d2 = ((i + 1) * nbd < td.size()) ? &td[(i + 1) * nbd] : 0; + double *d2 = ((i + 1) * nbd < (int)td.size()) ? &td[(i + 1) * nbd] : 0; if(dim == 2) { x = d1[0]; @@ -433,10 +433,10 @@ void PViewDataList::revertElement(int step, int ent, int ele) for(int step = 0; step < getNumTimeSteps(); step++) for(int i = 0; i < _lastNumNodes; i++) for(int k = 0; k < _lastNumComponents; k++) - _lastVal[_lastNumComponents * _lastNumNodes * step + - _lastNumComponents * i + k] = - V[_lastNumComponents * _lastNumNodes * step + - _lastNumComponents * (_lastNumNodes - i - 1) + k]; + _lastVal[_lastNumComponents * _lastNumNodes * step + + _lastNumComponents * i + k] = + V[_lastNumComponents * _lastNumNodes * step + + _lastNumComponents * (_lastNumNodes - i - 1) + k]; } static void generateConnectivities(std::vector<double> &list, int nbList, int nbTimeStep, @@ -449,7 +449,7 @@ static void generateConnectivities(std::vector<double> &list, int nbList, int nb double *x = &list[i]; double *y = &list[i + nbVert]; double *z = &list[i + 2 * nbVert]; - double *v = &list[list, i + 3 * nbVert]; + double *v = &list[i + 3 * nbVert]; for(int j = 0; j < nbVert; j++) { for(int ts = 0; ts < nbTimeStep; ts++) for(int k = 0; k < nbComp; k++) diff --git a/Post/PViewDataListIO.cpp b/Post/PViewDataListIO.cpp index 8c45f93ae06f02788b46ec771f5b6a079c5094aa..99198d727d71c06f35526d644181ede01112c68d 100644 --- a/Post/PViewDataListIO.cpp +++ b/Post/PViewDataListIO.cpp @@ -369,12 +369,12 @@ bool PViewDataList::writePOS(std::string fileName, bool binary, bool parsed, boo fprintf(fp, "%s ", str.c_str()); fprintf(fp, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d " "%d %d %d %d %d %d %d %d %d %d %d %d\n", - Time.size(), + (int)Time.size(), NbSP, NbVP, NbTP, NbSL, NbVL, NbTL, NbST, NbVT, NbTT, NbSQ, NbVQ, NbTQ, NbSS, NbVS, NbTS, NbSH, NbVH, NbTH, NbSI, NbVI, NbTI, NbSY, NbVY, NbTY, - NbT2, T2C.size(), NbT3, T3C.size()); + NbT2, (int)T2C.size(), NbT3, (int)T3C.size()); if(binary) { int one = 1; if(!fwrite(&one, sizeof(int), 1, fp)){ diff --git a/Post/PViewIO.cpp b/Post/PViewIO.cpp index 4123686a1a643b1d08f58ec27243af4c16457323..d8322e77940853f8fc241836b247c6c331d3dab9 100644 --- a/Post/PViewIO.cpp +++ b/Post/PViewIO.cpp @@ -120,64 +120,64 @@ bool PView::readMSH(std::string fileName, int fileIndex) } } else if(!strncmp(&str[1], "NodeData", 8) || - !strncmp(&str[1], "ElementData", 11) || - !strncmp(&str[1], "ElementNodeData", 15)) { + !strncmp(&str[1], "ElementData", 11) || + !strncmp(&str[1], "ElementNodeData", 15)) { index++; if(fileIndex < 0 || fileIndex == index){ - PViewDataGModel::DataType type; - if(!strncmp(&str[1], "NodeData", 8)) - type = PViewDataGModel::NodeData; - else if(!strncmp(&str[1], "ElementData", 11)) - type = PViewDataGModel::ElementData; - else - type = PViewDataGModel::ElementNodeData; - int numTags; - // string tags - std::string viewName, interpolName; + PViewDataGModel::DataType type; + if(!strncmp(&str[1], "NodeData", 8)) + type = PViewDataGModel::NodeData; + else if(!strncmp(&str[1], "ElementData", 11)) + type = PViewDataGModel::ElementData; + else + type = PViewDataGModel::ElementNodeData; + int numTags; + // string tags + std::string viewName, interpolName; if(!fgets(str, sizeof(str), fp)) return false; - if(sscanf(str, "%d", &numTags) != 1) return false; - for(int i = 0; i < numTags; i++){ - if(!fgets(str, sizeof(str), fp)) return false; - if(i == 0) - viewName = ExtractDoubleQuotedString(str, sizeof(str)); - else if(i == 1) - interpolName = ExtractDoubleQuotedString(str, sizeof(str)); - } - // double tags + if(sscanf(str, "%d", &numTags) != 1) return false; + for(int i = 0; i < numTags; i++){ + if(!fgets(str, sizeof(str), fp)) return false; + if(i == 0) + viewName = ExtractDoubleQuotedString(str, sizeof(str)); + else if(i == 1) + interpolName = ExtractDoubleQuotedString(str, sizeof(str)); + } + // double tags double time = 0.; if(!fgets(str, sizeof(str), fp)) return false; - if(sscanf(str, "%d", &numTags) != 1) return false; - for(int i = 0; i < numTags; i++){ - if(!fgets(str, sizeof(str), fp)) return false; - if(i == 0){ - if(sscanf(str, "%lf", &time) != 1) return false; - } - } - // integer tags + if(sscanf(str, "%d", &numTags) != 1) return false; + for(int i = 0; i < numTags; i++){ + if(!fgets(str, sizeof(str), fp)) return false; + if(i == 0){ + if(sscanf(str, "%lf", &time) != 1) return false; + } + } + // integer tags int timeStep = 0, numComp = 0, numEnt = 0, partition = 0; if(!fgets(str, sizeof(str), fp)) return false; - if(sscanf(str, "%d", &numTags) != 1) return false; - for(int i = 0; i < numTags; i++){ - if(!fgets(str, sizeof(str), fp)) return false; - if(i == 0){ - if(sscanf(str, "%d", &timeStep) != 1) return false; - } - else if(i == 1){ - if(sscanf(str, "%d", &numComp) != 1) return false; - } - else if(i == 2){ - if(sscanf(str, "%d", &numEnt) != 1) return false; - } - else if(i == 3){ - if(sscanf(str, "%d", &partition) != 1) return false; - } - } + if(sscanf(str, "%d", &numTags) != 1) return false; + for(int i = 0; i < numTags; i++){ + if(!fgets(str, sizeof(str), fp)) return false; + if(i == 0){ + if(sscanf(str, "%d", &timeStep) != 1) return false; + } + else if(i == 1){ + if(sscanf(str, "%d", &numComp) != 1) return false; + } + else if(i == 2){ + if(sscanf(str, "%d", &numEnt) != 1) return false; + } + else if(i == 3){ + if(sscanf(str, "%d", &partition) != 1) return false; + } + } // either get existing viewData, or create new one PView *p = getViewByName(viewName, timeStep, partition); PViewDataGModel *d = 0; if(p) d = dynamic_cast<PViewDataGModel*>(p->getData()); bool create = d ? false : true; - if(create) d = new PViewDataGModel(type); + if(create) d = new PViewDataGModel(type); if(!d->readMSH(fileName, fileIndex, fp, binary, swap, timeStep, time, partition, numComp, numEnt)){ Msg::Error("Could not read data in msh file"); @@ -228,14 +228,14 @@ bool PView::readMED(std::string fileName, int fileIndex) if(fileIndex < 0 || index == fileIndex){ PViewDataGModel *d = new PViewDataGModel(); if(!d->readMED(fileName, index)){ - Msg::Error("Could not read data in MED file"); - delete d; - return false; + Msg::Error("Could not read data in MED file"); + delete d; + return false; } else{ - d->setFileName(fileName); - d->setFileIndex(index); - new PView(d); + d->setFileName(fileName); + d->setFileIndex(index); + new PView(d); } } } diff --git a/Post/adaptiveData.cpp b/Post/adaptiveData.cpp index 132d9a0e867a51149af1f2b3749d547cb4a91bb2..a5d7b9c9c05c7948f47777f8b6741759f7f90881 100644 --- a/Post/adaptiveData.cpp +++ b/Post/adaptiveData.cpp @@ -51,7 +51,7 @@ static void cleanElement() } static void computeShapeFunctions(gmshMatrix<double> *coeffs, gmshMatrix<double> *eexps, - double u, double v, double w, gmshVector<double> *sf, + double u, double v, double w, gmshVector<double> *sf, gmshVector<double> *tmp) { for(int i = 0; i < eexps->size1(); i++) { diff --git a/Post/adaptiveData.h b/Post/adaptiveData.h index 415193c543491029875abd81837d81c94faa43c2..4f7550624559807cb9aae7adabf418651ace4073 100644 --- a/Post/adaptiveData.h +++ b/Post/adaptiveData.h @@ -107,7 +107,7 @@ class adaptiveQuadrangle { static int numNodes, numEdges; public: adaptiveQuadrangle(adaptivePoint *p1, adaptivePoint *p2, - adaptivePoint *p3, adaptivePoint *p4) + adaptivePoint *p3, adaptivePoint *p4) : visible(false) { p[0] = p1; @@ -143,7 +143,7 @@ class adaptivePrism { static int numNodes, numEdges; public: adaptivePrism(adaptivePoint *p1, adaptivePoint *p2, - adaptivePoint *p3, adaptivePoint *p4, + adaptivePoint *p3, adaptivePoint *p4, adaptivePoint *p5, adaptivePoint *p6) : visible(false) { @@ -186,7 +186,7 @@ class adaptiveTetrahedron { static int numNodes, numEdges; public: adaptiveTetrahedron(adaptivePoint *p1, adaptivePoint *p2, - adaptivePoint *p3, adaptivePoint *p4) + adaptivePoint *p3, adaptivePoint *p4) : visible(false) { p[0] = p1; @@ -223,8 +223,8 @@ class adaptiveHexahedron { static int numNodes, numEdges; public: adaptiveHexahedron(adaptivePoint *p1, adaptivePoint *p2, adaptivePoint *p3, - adaptivePoint *p4, adaptivePoint *p5, adaptivePoint *p6, - adaptivePoint *p7, adaptivePoint *p8) + adaptivePoint *p4, adaptivePoint *p5, adaptivePoint *p6, + adaptivePoint *p7, adaptivePoint *p8) : visible(false) { p[0] = p1; diff --git a/Post/shapeFunctions.h b/Post/shapeFunctions.h index 1871bfdc16915dce5f780059cee858b58269586c..973dc00735a5f5d9d1e40ca8a4e287037cfcd0ef 100644 --- a/Post/shapeFunctions.h +++ b/Post/shapeFunctions.h @@ -833,21 +833,21 @@ public: void getGaussPoint(int num, double &u, double &v, double &w, double &weight) { double u8[8] = {0.2631840555694285,-0.2631840555694285, - 0.2631840555694285,-0.2631840555694285, - 0.5066163033492386,-0.5066163033492386, - 0.5066163033492386,-0.5066163033492386}; + 0.2631840555694285,-0.2631840555694285, + 0.5066163033492386,-0.5066163033492386, + 0.5066163033492386,-0.5066163033492386}; double v8[8] = {0.2631840555694285,0.2631840555694285, - -0.2631840555694285,-0.2631840555694285, - 0.5066163033492386,0.5066163033492386, - -0.5066163033492386,-0.5066163033492386}; + -0.2631840555694285,-0.2631840555694285, + 0.5066163033492386,0.5066163033492386, + -0.5066163033492386,-0.5066163033492386}; double w8[8] = {0.544151844011225,0.544151844011225, - 0.544151844011225,0.544151844011225, - 0.122514822655441,0.122514822655441, - 0.122514822655441,0.122514822655441}; + 0.544151844011225,0.544151844011225, + 0.122514822655441,0.122514822655441, + 0.122514822655441,0.122514822655441}; double p8[8] = {0.100785882079825,0.100785882079825, - 0.100785882079825,0.100785882079825, - 0.232547451253508,0.232547451253508, - 0.232547451253508,0.232547451253508}; + 0.100785882079825,0.100785882079825, + 0.232547451253508,0.232547451253508, + 0.232547451253508,0.232547451253508}; if(num < 0 || num > 7) return; u = u8[num]; v = v8[num]; @@ -874,20 +874,20 @@ public: if(w == 1. && num != 4) { switch(num) { case 0 : s[0] = -0.25 ; - s[1] = -0.25 ; - s[2] = -0.25 ; break ; + s[1] = -0.25 ; + s[2] = -0.25 ; break ; case 1 : s[0] = 0.25 ; - s[1] = -0.25 ; - s[2] = -0.25 ; break ; + s[1] = -0.25 ; + s[2] = -0.25 ; break ; case 2 : s[0] = 0.25 ; - s[1] = 0.25 ; + s[1] = 0.25 ; s[2] = -0.25 ; break ; case 3 : s[0] = -0.25 ; - s[1] = 0.25 ; + s[1] = 0.25 ; s[2] = -0.25 ; break ; case 4 : s[0] = 0. ; - s[1] = 0. ; - s[2] = 1. ; break ; + s[1] = 0. ; + s[2] = 1. ; break ; default : s[0] = s[1] = s[2] = 0.; break; } } diff --git a/Qt/CMakeLists.txt b/Qt/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..15cd94e0c3cd54bac51b8a38c50b4b6f72133444 --- /dev/null +++ b/Qt/CMakeLists.txt @@ -0,0 +1,23 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + QGui.cpp + Draw.cpp + GLWidget.cpp + graphicWindow.cpp +) + +set(MOC_HDR + GLWidget.h + graphicWindow.h +) + +append_gmsh_src(Qt "${SRC}") + +foreach(FILE ${MOC_HDR}) + list(APPEND MOC_LIST Qt/${FILE}) +endforeach(FILE) +set(GMSH_MOC_HDR ${GMSH_MOC_HDR};${MOC_LIST} PARENT_SCOPE) diff --git a/Qt/Draw.cpp b/Qt/Draw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1b8e3eb869cea2fca84a1a865abfec3cb25b64b1 --- /dev/null +++ b/Qt/Draw.cpp @@ -0,0 +1,73 @@ +// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#include <string.h> +#include "QGui.h" +#include "gl2ps.h" +#include "Context.h" +#include "drawContext.h" + +void Draw() +{ + drawContext *ctx = QGui::instance()->getDrawContext(); + ctx->draw3d(); + ctx->draw2d(); +} + +void DrawCurrentOpenglWindow(bool make_current) +{ +} + +void DrawPlugin(void (*draw)(void *context)) +{ +} + +int GetFontIndex(const char *fontname) +{ + return 0; +} + +int GetFontEnum(int index) +{ + return 0; +} + +const char *GetFontName(int index) +{ + return "Helvetica"; +} + +int GetFontAlign(const char *alignstr) +{ + return 0; +} + +int GetFontSize() +{ + return 14; +} + +void SetFont(int fontid, int fontsize) +{ +} + +double GetStringWidth(const char *str) +{ + return 14.; +} + +int GetStringHeight() +{ + return 14.; +} + +int GetStringDescent() +{ + return 10.; +} + +void DrawString(const char *str) +{ +} diff --git a/Qt/GLWidget.cpp b/Qt/GLWidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..83261bba44b838915b867ed2c179b6695f5d0a52 --- /dev/null +++ b/Qt/GLWidget.cpp @@ -0,0 +1,72 @@ +#include <QtGui> +#include <QtOpenGL> +#include <math.h> +#include "GLWidget.h" +#include "Draw.h" + +GLWidget::GLWidget(QWidget *parent) + : QGLWidget(parent) +{ + _ctx = new drawContext(); +} + +GLWidget::~GLWidget() +{ + makeCurrent(); + delete _ctx; +} + +QSize GLWidget::minimumSizeHint() const +{ + return QSize(50, 50); +} + +QSize GLWidget::sizeHint() const +{ + return QSize(400, 400); +} + +void GLWidget::setXRotation(int angle) +{ + emit xRotationChanged(angle); + updateGL(); +} + +void GLWidget::initializeGL() +{ +} + +void GLWidget::paintGL() +{ + glViewport(_ctx->viewport[0], _ctx->viewport[1], + _ctx->viewport[2], _ctx->viewport[3]); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); + _ctx->draw3d(); + _ctx->draw2d(); +} + +void GLWidget::resizeGL(int width, int height) +{ + _ctx->viewport[2] = width; + _ctx->viewport[3] = height; +} + +void GLWidget::mousePressEvent(QMouseEvent *event) +{ +} + +void GLWidget::mouseMoveEvent(QMouseEvent *event) +{ + /* + int dx = event->x() - lastPos.x(); + int dy = event->y() - lastPos.y(); + if (event->buttons() & Qt::LeftButton) { + setXRotation(xRot + 8 * dy); + setYRotation(yRot + 8 * dx); + } else if (event->buttons() & Qt::RightButton) { + setXRotation(xRot + 8 * dy); + setZRotation(zRot + 8 * dx); + } + lastPos = event->pos(); + */ +} diff --git a/Qt/GLWidget.h b/Qt/GLWidget.h new file mode 100644 index 0000000000000000000000000000000000000000..18e90dd025c4523712cafea658015bc3e2bd5b3a --- /dev/null +++ b/Qt/GLWidget.h @@ -0,0 +1,31 @@ +#ifndef _GLWIDGET_H_ +#define _GLWIDGET_H_ + +#include <QGLWidget> +#include "Gmsh.h" +#include "drawContext.h" + +class GLWidget : public QGLWidget +{ + Q_OBJECT + private: + drawContext *_ctx; + public: + GLWidget(QWidget *parent = 0); + ~GLWidget(); + drawContext *getDrawContext(){ return _ctx; } + QSize minimumSizeHint() const; + QSize sizeHint() const; + public slots: + void setXRotation(int angle); + signals: + void xRotationChanged(int angle); + protected: + void initializeGL(); + void paintGL(); + void resizeGL(int width, int height); + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); +}; + +#endif diff --git a/Qt/Main.cpp b/Qt/Main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b13be926a8d29fa260fba9fdb9a4c6ab1b1000d4 --- /dev/null +++ b/Qt/Main.cpp @@ -0,0 +1,35 @@ +// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#include <stdlib.h> +#include "Gmsh.h" +#include "GmshMessage.h" +#include "GModel.h" +#include "CommandLine.h" +#include "OpenFile.h" +#include "Context.h" +#include "QGui.h" + +#include <QApplication> + +int main(int argc, char *argv[]) +{ + new GModel(); + GmshInitialize(argc, argv); + + OpenProject(GModel::current()->getFileName()); + for(unsigned int i = 1; i < CTX::instance()->files.size(); i++){ + if(CTX::instance()->files[i] == "-new"){ + GModel::current()->setVisibility(0); + new GModel(); + } + else + MergeFile(CTX::instance()->files[i]); + } + + QApplication app(argc, argv); + QGui::instance(argc, argv); + return app.exec(); +} diff --git a/Qt/QGui.cpp b/Qt/QGui.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5c82925d5a503cff470b7bbfcb12906287cf4a7e --- /dev/null +++ b/Qt/QGui.cpp @@ -0,0 +1,29 @@ +// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#include <QtGui> +#include <QWidget> +#include <QSlider> +#include "QGui.h" +#include "graphicWindow.h" + +QGui::QGui(int argc, char **argv) +{ + _graphicWindow = new graphicWindow(); + _graphicWindow->show(); +} + +QGui *QGui::_instance = 0; + +QGui *QGui::instance(int argc, char **argv) +{ + if(!_instance) _instance = new QGui(argc, argv); + return _instance; +} + +drawContext *QGui::getDrawContext() +{ + return _graphicWindow->getDrawContext(); +} diff --git a/Qt/QGui.h b/Qt/QGui.h new file mode 100644 index 0000000000000000000000000000000000000000..27cdc3468ca5cce5aeb78582691fc8e9c3376a29 --- /dev/null +++ b/Qt/QGui.h @@ -0,0 +1,42 @@ +// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +// +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. + +#ifndef _Q_GUI_H_ +#define _Q_GUI_H_ + +#include <string> +#include <vector> + +class GVertex; +class GEdge; +class GFace; +class GRegion; +class MElement; + +class graphicWindow; +class drawContext; + +class QGui{ + private: + static QGui *_instance; + graphicWindow *_graphicWindow; + public: + std::vector<GVertex*> selectedVertices; + std::vector<GEdge*> selectedEdges; + std::vector<GFace*> selectedFaces; + std::vector<GRegion*> selectedRegions; + std::vector<MElement*> selectedElements; + public: + QGui(int argc, char **argv); + ~QGui(){} + // return the single static instance of the GUI + static QGui *instance(int argc=0, char **argv=0); + // check if the GUI is available + static bool available(){ return (_instance != 0); } + // get draw context + drawContext *getDrawContext(); +}; + +#endif diff --git a/Qt/graphicWindow.cpp b/Qt/graphicWindow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e75716872ee4f9ac26cecb8ea2b842785fc8a6d6 --- /dev/null +++ b/Qt/graphicWindow.cpp @@ -0,0 +1,26 @@ +#include <QtGui> +#include "GLWidget.h" +#include "graphicWindow.h" + +graphicWindow::graphicWindow() +{ + _glWidget = new GLWidget(); + + _xSlider = new QSlider(Qt::Vertical); + _xSlider->setRange(0, 360 * 16); + _xSlider->setSingleStep(16); + _xSlider->setPageStep(15 * 16); + _xSlider->setTickInterval(15 * 16); + _xSlider->setTickPosition(QSlider::TicksRight); + _xSlider->setValue(15 * 16); + + connect(_xSlider, SIGNAL(valueChanged(int)), _glWidget, SLOT(setXRotation(int))); + connect(_glWidget, SIGNAL(xRotationChanged(int)), _xSlider, SLOT(setValue(int))); + + QHBoxLayout *mainLayout = new QHBoxLayout; + mainLayout->addWidget(_glWidget); + mainLayout->addWidget(_xSlider); + setLayout(mainLayout); + + setWindowTitle(tr("QtGmsh")); +} diff --git a/Qt/graphicWindow.h b/Qt/graphicWindow.h new file mode 100644 index 0000000000000000000000000000000000000000..74b08cfd84e83d0b6a210bbafc7ae5be9adf8454 --- /dev/null +++ b/Qt/graphicWindow.h @@ -0,0 +1,20 @@ +#ifndef _GRAPHIC_WINDOW_H_ +#define _GRAPHIC_WINDOW_H_ + +#include <QWidget> +#include "GLWidget.h" + +class QSlider; + +class graphicWindow : public QWidget +{ + Q_OBJECT + private: + GLWidget *_glWidget; + QSlider *_xSlider; + public: + graphicWindow(); + drawContext *getDrawContext(){ return _glWidget->getDrawContext(); } +}; + +#endif diff --git a/README.txt b/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..d074047e86761d0f224b4aab6e857b586185d3a2 --- /dev/null +++ b/README.txt @@ -0,0 +1,102 @@ +This is Gmsh, an automatic three-dimensional finite element mesh +generator with built-in pre- and post-processing facilities. + +Gmsh is distributed under the terms of the GNU General Public License, +with an exception to allow for easier linking with external mesh +generators. See doc/LICENSE.txt and doc/CREDITS.txt for more +information. + +See the doc/ and tutorial/ directories for documentation. The +reference manual is located in doc/texinfo/. See the demos/ directory +and the web site http://geuz.org/gmsh for additional examples. + +Building Gmsh from source requires CMake (http://www.cmake.org). +Building the graphical user interface requires FLTK 1.1.7 or above +(http://www.fltk.org), configured with OpenGL support. + + +Build Gmsh using CMake's graphical user interface +------------------------------------------------- + +* Launch CMake and fill-in the two top input fields (telling where the + Gmsh source is located and where you want the Gmsh binary to be + created). + +* Click on "Add entry" and define the variable CMAKE_PREFIX_PATH, of + type "PATH", pointing to the location(s) of any external package(s) + (FLTK, BLAS/LAPACK, etc.) installed in non-standard directories. + + (If you are using our pre-compiled "gmsh dependencies" package + (http://geuz.org/gmsh/bin/Windows/gmsh-dep-msvc2008-release.zip) + with Visual Studio on Windows simply point CMAKE_PREFIX_PATH to the + "gmsh-dep" directory.) + +* Click on "Configure" and choose your compiler (e.g. Visual Studio). + +* Optionally change some configuration options (re-run "Configure" + every time you change some options). + +* Once you are happy with all the configuration options, click on + "Generate". + +* Go to the build directory and build Gmsh using your chosen compiler. + + (With Visual Studio double-click on "gmsh.sln". If you are using our + pre-compiled "gmsh dependencies" package you must use the "Release" + or "RelWithDebInfo" build type.) + + +Build Gmsh from the command line +-------------------------------- + +* Create a build directory, for example as a subdirectory of Gmsh's + source directory: + + mkdir build + +* Run cmake from within the build directory, pointing to Gmsh's + source directory: + + cd build + cmake .. + +* To build and install Gmsh then simply type + + make + make install + +* To change build options you can use "ccmake" instead of "cmake", + e.g.: + + ccmake .. + + or you can specify options directly on the command line, e.g. + + cmake -DCMAKE_PREFIX_PATH=/opt/local .. + + to specify the location of external packages installed in + non-standard directories, or + + cmake -DENABLE_FLTK=0 .. + + to build a version of Gmsh without the FLTK graphical interface. + +* You can keep multiple builds with different build options at the + same time. For example, you could configure a full release graphical + build in a "bin" subdirectory with + + cd bin + cmake -DCMAKE_BUILD_TYPE=Release .. + make + make install + + and a stripped-down debug library build in a "lib" subdirectory with + + cd lib + cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_FLTK=0 -DENABLE_OCC=0 .. + make lib + make install/fast + +* To see a detailed compilation log use + + make VERBOSE=1 diff --git a/benchmarks/testsuite/Makefile b/benchmarks/testsuite/Makefile deleted file mode 100644 index ab9a1fdc5d9b46e444cd1bd4fa7c861f6b984a38..0000000000000000000000000000000000000000 --- a/benchmarks/testsuite/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -clean: - rm -f *.msh *.dat diff --git a/contrib/ANN/CMakeLists.txt b/contrib/ANN/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..cc237338b92f184205a8f8d22284b312f56979df --- /dev/null +++ b/contrib/ANN/CMakeLists.txt @@ -0,0 +1,23 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + src/ANN.cpp + src/bd_fix_rad_search.cpp + src/bd_pr_search.cpp + src/bd_search.cpp + src/bd_tree.cpp + src/brute.cpp + src/kd_dump.cpp + src/kd_fix_rad_search.cpp + src/kd_pr_search.cpp + src/kd_search.cpp + src/kd_split.cpp + src/kd_tree.cpp + src/kd_util.cpp + src/perf.cpp +) + +append_gmsh_src(contrib/ANN "${SRC}") diff --git a/contrib/ANN/src/Makefile b/contrib/ANN/src/Makefile deleted file mode 100644 index bf2a3f85f833a4e4d3d456437b1d1b4729a10880..0000000000000000000000000000000000000000 --- a/contrib/ANN/src/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../../variables - -LIB = ../../../lib/libGmshANN${LIBEXT} - -INC = ${DASH}I../../../Common ${DASH}I../include - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = ANN.cpp\ - bd_fix_rad_search.cpp\ - bd_pr_search.cpp\ - bd_search.cpp\ - bd_tree.cpp\ - brute.cpp\ - kd_dump.cpp\ - kd_fix_rad_search.cpp\ - kd_pr_search.cpp\ - kd_search.cpp\ - kd_split.cpp\ - kd_tree.cpp\ - kd_util.cpp\ - perf.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -ANN${OBJEXT}: ANN.cpp ../include/ANN/ANNx.h ../include/ANN/ANN.h \ - ../include/ANN/ANNperf.h -bd_fix_rad_search${OBJEXT}: bd_fix_rad_search.cpp bd_tree.h \ - ../include/ANN/ANNx.h ../include/ANN/ANN.h kd_tree.h \ - kd_fix_rad_search.h kd_util.h pr_queue_k.h ../include/ANN/ANNperf.h -bd_pr_search${OBJEXT}: bd_pr_search.cpp bd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_tree.h kd_pr_search.h kd_util.h pr_queue.h \ - ../include/ANN/ANNperf.h pr_queue_k.h -bd_search${OBJEXT}: bd_search.cpp bd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_tree.h kd_search.h kd_util.h pr_queue_k.h \ - ../include/ANN/ANNperf.h -bd_tree${OBJEXT}: bd_tree.cpp bd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_tree.h kd_util.h kd_split.h \ - ../include/ANN/ANNperf.h -brute${OBJEXT}: brute.cpp ../include/ANN/ANNx.h ../include/ANN/ANN.h \ - pr_queue_k.h ../include/ANN/ANNperf.h -kd_dump${OBJEXT}: kd_dump.cpp kd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h bd_tree.h -kd_fix_rad_search${OBJEXT}: kd_fix_rad_search.cpp kd_fix_rad_search.h kd_tree.h \ - ../include/ANN/ANNx.h ../include/ANN/ANN.h kd_util.h pr_queue_k.h \ - ../include/ANN/ANNperf.h -kd_pr_search${OBJEXT}: kd_pr_search.cpp kd_pr_search.h kd_tree.h \ - ../include/ANN/ANNx.h ../include/ANN/ANN.h kd_util.h pr_queue.h \ - ../include/ANN/ANNperf.h pr_queue_k.h -kd_search${OBJEXT}: kd_search.cpp kd_search.h kd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_util.h pr_queue_k.h ../include/ANN/ANNperf.h -kd_split${OBJEXT}: kd_split.cpp kd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_util.h kd_split.h -kd_tree${OBJEXT}: kd_tree.cpp kd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h kd_split.h kd_util.h ../include/ANN/ANNperf.h -kd_util${OBJEXT}: kd_util.cpp kd_util.h kd_tree.h ../include/ANN/ANNx.h \ - ../include/ANN/ANN.h ../include/ANN/ANNperf.h -perf${OBJEXT}: perf.cpp ../include/ANN/ANN.h ../include/ANN/ANNperf.h diff --git a/contrib/Chaco/CMakeLists.txt b/contrib/Chaco/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..8e616be818c482b9940157a1d43f26a8d7c6ac6f --- /dev/null +++ b/contrib/Chaco/CMakeLists.txt @@ -0,0 +1,91 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + main/Gmsh_printf.cpp main/Gmsh_exit.cpp + main/user_params.c main/interface.c + submain/balance.c submain/divide.c submain/submain.c + input/input_assign.c + input/check_input.c input/input.c input/input_geom.c + input/input_graph.c input/read_params.c input/reflect_input.c + input/read_val.c + graph/check_graph.c graph/free_graph.c + graph/reformat.c graph/subgraph.c graph/graph_out.c + inertial/eigenvec2.c inertial/eigenvec3.c inertial/inertial.c + inertial/inertial1d.c inertial/inertial2d.c + inertial/inertial3d.c inertial/make_subgeom.c + klspiff/buckets.c klspiff/buckets_bi.c klspiff/buckets1.c + klspiff/bilistops.c klspiff/coarsen_kl.c klspiff/count_weights.c + klspiff/compress_ewgts.c klspiff/kl_init.c klspiff/kl_output.c + klspiff/klspiff.c klspiff/make_bndy_list.c + klspiff/make_kl_list.c klspiff/nway_kl.c + klvspiff/bpm_improve.c klvspiff/bucketsv.c + klvspiff/clear_dvals.c klvspiff/coarsen_klv.c + klvspiff/countup_vtx_sep.c klvspiff/find_bndy.c klvspiff/flow.c + klvspiff/klv_init.c klvspiff/klvspiff.c klvspiff/make_bpgraph.c + klvspiff/make_sep_list.c klvspiff/matching.c klvspiff/nway_klv.c + klvspiff/flatten.c + coarsen/coarsen.c coarsen/interpolate.c coarsen/makefgraph.c + coarsen/makeccoords.c + coarsen/coarsen1.c coarsen/makev2cv.c + coarsen/maxmatch.c coarsen/maxmatch1.c coarsen/maxmatch2.c + coarsen/maxmatch3.c coarsen/maxmatch4.c coarsen/maxmatch5.c + connect/add_edges.c connect/connected.c connect/find_edges.c + eigen/bidir.c eigen/bisect.c eigen/checkeig.c + eigen/checkeig_ext.c + eigen/checkorth.c eigen/cksturmcnt.c eigen/mkeigvecs.c + eigen/eigensolve.c eigen/get_extval.c eigen/get_ritzvals.c + eigen/lanczos_FO.c eigen/lanczos_SO.c eigen/lanczos_SO_float.c + eigen/lanczos_ext.c eigen/lanczos_ext_float.c eigen/lanc_seconds.c + eigen/lanpause.c eigen/makeorthlnk.c eigen/mkscanlist.c + eigen/orthog1.c eigen/orthogonalize.c eigen/orthogvec.c + eigen/ql.c eigen/rqi.c eigen/rqi_ext.c eigen/scale_diag.c + eigen/scanmax.c eigen/scanmin.c eigen/solistout.c + eigen/sorthog.c eigen/splarax.c eigen/sturmcnt.c + eigen/Tevec.c eigen/tri_solve.c eigen/warnings.c + symmlq/aprod.c symmlq/msolve.c symmlq/pow_dd.c + symmlq/symmlq.c symmlq/symmlqblas.c + tinvit/tinvit.c tinvit/pythag.c tinvit/epslon.c + optimize/determinant.c optimize/func2d.c + optimize/func3d.c optimize/opt2d.c optimize/opt3d.c + assign/assign.c assign/assign_out.c assign/mapper.c + assign/median.c assign/merge_assign.c + assign/rec_median.c assign/rotate.c assign/y2x.c + bpmatch/checkbp.c bpmatch/inits2d.c bpmatch/inits3d.c + bpmatch/genvals2d.c bpmatch/genvals3d.c bpmatch/map2d.c + bpmatch/map3d.c bpmatch/movevtxs.c + bpmatch/sorts2d.c bpmatch/sorts3d.c + refine_map/compute_cube_edata.c refine_map/compute_cube_vdata.c + refine_map/refine_cube.c refine_map/update_cube_edata.c + refine_map/update_cube_vdata.c refine_map/find_edge_cube.c + refine_map/init_cube_edata.c refine_map/compute_mesh_edata.c + refine_map/compute_mesh_vdata.c refine_map/find_edge_mesh.c + refine_map/init_mesh_edata.c refine_map/refine_mesh.c + refine_map/update_mesh_edata.c refine_map/update_mesh_vdata.c + refine_map/refine_map.c refine_map/make_comm_graph.c + refine_part/refine_part.c refine_part/kl_refine.c + refine_part/make_maps_ref.c refine_part/make_terms_ref.c + internal/force_internal.c internal/improve_internal.c + internal/check_internal.c + misc/define_subcubes.c misc/define_submeshes.c + misc/divide_procs.c misc/merge_goals.c misc/make_term_props.c + misc/count.c misc/countup.c misc/countup_cube.c + misc/countup_mesh.c misc/make_subgoal.c + misc/find_maxdeg.c misc/make_maps.c misc/make_setlists.c + misc/sequence.c misc/perturb.c misc/simple_part.c + misc/time_kernels.c misc/timing_chaco.c + util/affirm.c util/array_alloc_2D.c util/bit_reverse.c + util/checkpnt.c util/cpvec.c util/dot.c + util/doubleout.c util/input_int.c util/gray.c + util/machine_params.c util/makevwsqrt.c util/mkvec.c util/norm.c + util/normalize.c util/mergesort.c + util/randomize.c util/smalloc.c util/bail.c + util/scadd.c util/seconds.c util/setvec.c util/shell_sort.c + util/strout.c util/tri_prod.c util/true_or_false.c + util/update.c util/vecout.c util/vecran.c + util/vecscale.c +) + +append_gmsh_src(contrib/Chaco "${SRC}") diff --git a/contrib/Chaco/Makefile b/contrib/Chaco/Makefile deleted file mode 100644 index 571939bb5256ae1ec11d42dda1766c551ff549ab..0000000000000000000000000000000000000000 --- a/contrib/Chaco/Makefile +++ /dev/null @@ -1,117 +0,0 @@ - -include ../../variables - -LIB = ../../lib/libGmshChaco${LIBEXT} - -INC = ${DASH}Imain ${DASH}I../../Common - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRCX = main/Gmsh_printf.cpp main/Gmsh_exit.cpp -SRC = main/user_params.c main/interface.c \ - submain/balance.c submain/divide.c submain/submain.c \ - input/input_assign.c \ - input/check_input.c input/input.c input/input_geom.c \ - input/input_graph.c input/read_params.c input/reflect_input.c \ - input/read_val.c \ - graph/check_graph.c graph/free_graph.c \ - graph/reformat.c graph/subgraph.c graph/graph_out.c \ - inertial/eigenvec2.c inertial/eigenvec3.c inertial/inertial.c \ - inertial/inertial1d.c inertial/inertial2d.c \ - inertial/inertial3d.c inertial/make_subgeom.c \ - klspiff/buckets.c klspiff/buckets_bi.c klspiff/buckets1.c \ - klspiff/bilistops.c klspiff/coarsen_kl.c klspiff/count_weights.c \ - klspiff/compress_ewgts.c klspiff/kl_init.c klspiff/kl_output.c \ - klspiff/klspiff.c klspiff/make_bndy_list.c \ - klspiff/make_kl_list.c klspiff/nway_kl.c \ - klvspiff/bpm_improve.c klvspiff/bucketsv.c \ - klvspiff/clear_dvals.c klvspiff/coarsen_klv.c \ - klvspiff/countup_vtx_sep.c klvspiff/find_bndy.c klvspiff/flow.c \ - klvspiff/klv_init.c klvspiff/klvspiff.c klvspiff/make_bpgraph.c \ - klvspiff/make_sep_list.c klvspiff/matching.c klvspiff/nway_klv.c \ - klvspiff/flatten.c \ - coarsen/coarsen.c coarsen/interpolate.c coarsen/makefgraph.c \ - coarsen/makeccoords.c \ - coarsen/coarsen1.c coarsen/makev2cv.c \ - coarsen/maxmatch.c coarsen/maxmatch1.c coarsen/maxmatch2.c \ - coarsen/maxmatch3.c coarsen/maxmatch4.c coarsen/maxmatch5.c \ - connect/add_edges.c connect/connected.c connect/find_edges.c \ - eigen/bidir.c eigen/bisect.c eigen/checkeig.c \ - eigen/checkeig_ext.c \ - eigen/checkorth.c eigen/cksturmcnt.c eigen/mkeigvecs.c\ - eigen/eigensolve.c eigen/get_extval.c eigen/get_ritzvals.c \ - eigen/lanczos_FO.c eigen/lanczos_SO.c eigen/lanczos_SO_float.c \ - eigen/lanczos_ext.c eigen/lanczos_ext_float.c eigen/lanc_seconds.c\ - eigen/lanpause.c eigen/makeorthlnk.c eigen/mkscanlist.c \ - eigen/orthog1.c eigen/orthogonalize.c eigen/orthogvec.c \ - eigen/ql.c eigen/rqi.c eigen/rqi_ext.c eigen/scale_diag.c \ - eigen/scanmax.c eigen/scanmin.c eigen/solistout.c \ - eigen/sorthog.c eigen/splarax.c eigen/sturmcnt.c \ - eigen/Tevec.c eigen/tri_solve.c eigen/warnings.c \ - symmlq/aprod.c symmlq/msolve.c symmlq/pow_dd.c \ - symmlq/symmlq.c symmlq/symmlqblas.c \ - tinvit/tinvit.c tinvit/pythag.c tinvit/epslon.c \ - optimize/determinant.c optimize/func2d.c \ - optimize/func3d.c optimize/opt2d.c optimize/opt3d.c \ - assign/assign.c assign/assign_out.c assign/mapper.c \ - assign/median.c assign/merge_assign.c \ - assign/rec_median.c assign/rotate.c assign/y2x.c \ - bpmatch/checkbp.c bpmatch/inits2d.c bpmatch/inits3d.c \ - bpmatch/genvals2d.c bpmatch/genvals3d.c bpmatch/map2d.c \ - bpmatch/map3d.c bpmatch/movevtxs.c \ - bpmatch/sorts2d.c bpmatch/sorts3d.c \ - refine_map/compute_cube_edata.c refine_map/compute_cube_vdata.c \ - refine_map/refine_cube.c refine_map/update_cube_edata.c \ - refine_map/update_cube_vdata.c refine_map/find_edge_cube.c \ - refine_map/init_cube_edata.c refine_map/compute_mesh_edata.c \ - refine_map/compute_mesh_vdata.c refine_map/find_edge_mesh.c \ - refine_map/init_mesh_edata.c refine_map/refine_mesh.c \ - refine_map/update_mesh_edata.c refine_map/update_mesh_vdata.c \ - refine_map/refine_map.c refine_map/make_comm_graph.c \ - refine_part/refine_part.c refine_part/kl_refine.c \ - refine_part/make_maps_ref.c refine_part/make_terms_ref.c \ - internal/force_internal.c internal/improve_internal.c \ - internal/check_internal.c \ - misc/define_subcubes.c misc/define_submeshes.c \ - misc/divide_procs.c misc/merge_goals.c misc/make_term_props.c \ - misc/count.c misc/countup.c misc/countup_cube.c \ - misc/countup_mesh.c misc/make_subgoal.c \ - misc/find_maxdeg.c misc/make_maps.c misc/make_setlists.c \ - misc/sequence.c misc/perturb.c misc/simple_part.c \ - misc/time_kernels.c misc/timing_chaco.c \ - util/affirm.c util/array_alloc_2D.c util/bit_reverse.c \ - util/checkpnt.c util/cpvec.c util/dot.c \ - util/doubleout.c util/input_int.c util/gray.c \ - util/machine_params.c util/makevwsqrt.c util/mkvec.c util/norm.c \ - util/normalize.c util/mergesort.c \ - util/randomize.c util/smalloc.c util/bail.c \ - util/scadd.c util/seconds.c util/setvec.c util/shell_sort.c \ - util/strout.c util/tri_prod.c util/true_or_false.c \ - util/update.c util/vecout.c util/vecran.c \ - util/vecscale.c - -OBJ = ${SRC:.c=${OBJEXT}} -OBJX = ${SRCX:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .c .cpp - -${LIB}: ${OBJ} ${OBJX} - ${AR} ${ARFLAGS}${LIB} ${OBJ} ${OBJX} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} ${OBJX} - cp -f ${OBJ} ${OBJX} ../../lib/ - -.c${OBJEXT}: - ${CC} ${CFLAGS} ${DASH}c $< ${DASH}o ${<:.c=${OBJEXT}} - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< ${DASH}o ${<:.cpp=${OBJEXT}} - -clean: - rm -f */*.o */*.obj - -depend: - true - -# DO NOT DELETE THIS LINE diff --git a/contrib/Chaco/main/Gmsh_printf.cpp b/contrib/Chaco/main/Gmsh_printf.cpp index 7b09649d2b5ad0bda4ad18e998660def2c915ea7..2f35dd581db66346c964c759a1c848ce1c484fa8 100644 --- a/contrib/Chaco/main/Gmsh_printf.cpp +++ b/contrib/Chaco/main/Gmsh_printf.cpp @@ -27,7 +27,7 @@ extern "C" int Gmsh_printf(const char *fmt, ...) std::strcpy(buf, p); Msg::Direct(buf); // New line for each interior '\n' - while(p = std::strtok(NULL, "\n")) { + while((p = std::strtok(NULL, "\n"))) { std::strcpy(buf, p); Msg::Direct(buf); } @@ -35,4 +35,5 @@ extern "C" int Gmsh_printf(const char *fmt, ...) // If more than 1 trailing '\n', or only "\n" in the string, print a blank // line. if(*last == '\n') Msg::Direct(" "); + return 0; } diff --git a/contrib/DiscreteIntegration/CMakeLists.txt b/contrib/DiscreteIntegration/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..0a93dd05eeecb06b590c13ba773faf1d06c2d050 --- /dev/null +++ b/contrib/DiscreteIntegration/CMakeLists.txt @@ -0,0 +1,12 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + DILevelset.cpp + Integration3D.cpp + recurCut.cpp +) + +append_gmsh_src(contrib/DiscreteIntegration "${SRC}") diff --git a/contrib/DiscreteIntegration/Integration3D.cpp b/contrib/DiscreteIntegration/Integration3D.cpp index 4c3197eb07c6bda1e8a8fb170eda419d48a7960a..641c618b5a2942346d2febf4a11c1fd41faceb34 100644 --- a/contrib/DiscreteIntegration/Integration3D.cpp +++ b/contrib/DiscreteIntegration/Integration3D.cpp @@ -1773,7 +1773,7 @@ void DI_Tetra::selfSplit (const DI_Element *e, const std::vector<const gLevelset DI_Tetra t1 = DI_Tetra(pt(s1), U[0], U[1], U[2]); DI_Triangle tr = DI_Triangle(U[0], U[1], U[2], tag); //t1.print(); tr.print(); DI_Tetra t2, t3, t4; - int qual = bestQuality(U[0], U[1], U[2], pt(s2), pt(s3), pt(s4), t2, t3, t4, QError); //t2.print(); t3.print(); t4.print(); + bestQuality(U[0], U[1], U[2], pt(s2), pt(s3), pt(s4), t2, t3, t4, QError); //t2.print(); t3.print(); t4.print(); /*t2 = DI_Tetra(U[0],V[0],W[0], x(s2),y(s2),z(s2), U[1],V[1],W[1], U[2],V[2],W[2]); t3 = DI_Tetra(U[2],V[2],W[2], U[1],V[1],W[1], x(s3),y(s3),z(s3), x(s2),y(s2),z(s2)); t4 = DI_Tetra(U[2],V[2],W[2], x(s3),y(s3),z(s3), x(s4),y(s4),z(s4), x(s2),y(s2),z(s2));*/ @@ -1856,10 +1856,10 @@ void DI_Tetra::selfSplit (const DI_Element *e, const std::vector<const gLevelset DI_Tetra t1, t2, t3, t4, t5, t6; DI_Triangle tr1, tr2; - int qualt = bestQuality(U[0], U[1], U[2], U[3], tr1, tr2); + bestQuality(U[0], U[1], U[2], U[3], tr1, tr2); tr1.setLsTag(tag); tr2.setLsTag(tag); - int qualT1 = bestQuality(pt(s1), U[0], U[1], pt(s4), U[3], U[2], t1, t2, t3, QError); - int qualT2 = bestQuality(pt(s2), U[0], U[3], pt(s3), U[1], U[2], t4, t5, t6, QError); + bestQuality(pt(s1), U[0], U[1], pt(s4), U[3], U[2], t1, t2, t3, QError); + bestQuality(pt(s2), U[0], U[3], pt(s3), U[1], U[2], t4, t5, t6, QError); //tr1.print(); tr2.print(); t1.print(); t2.print(); t3.print(); t4.print(); t5.print(); t6.print(); /*t1 = DI_Tetra(U[0],V[0],W[0], x(s2),y(s2),z(s2), U[1],V[1],W[1], U[3],V[3],W[3]); t2 = DI_Tetra(U[1],V[1],W[1], U[3],V[3],W[3], x(s2),y(s2),z(s2), U[2],V[2],W[2]); diff --git a/contrib/DiscreteIntegration/Makefile b/contrib/DiscreteIntegration/Makefile deleted file mode 100644 index 105f9256c1a436eaedc0d31cc390d872e291a782..0000000000000000000000000000000000000000 --- a/contrib/DiscreteIntegration/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshDIntegration${LIBEXT} - -INC = ${DASH}I. - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = DILevelset.cpp Integration3D.cpp recurCut.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -DILevelset${OBJEXT}: DILevelset.cpp DILevelset.h -recurCut${OBJEXT}: recurCut.cpp recurCut.h Integration3D.h DILevelset.h -Integration3D${OBJEXT}: Integration3D.cpp Integration3D.h DILevelset.h recurCut.h \ - ../../Numeric/Gauss.h diff --git a/contrib/MathEval/CMakeLists.txt b/contrib/MathEval/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..dab5df3e8f776d669e417dce2c6bed6cc0c828e5 --- /dev/null +++ b/contrib/MathEval/CMakeLists.txt @@ -0,0 +1,15 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + matheval.cpp + node.cpp + scanner.yy.cpp + parser.tab.cpp + symbol_table.cpp + xmath.cpp +) + +append_gmsh_src(contrib/MathEval "${SRC}") diff --git a/contrib/MathEval/Makefile b/contrib/MathEval/Makefile deleted file mode 100644 index 0622218368382b02e0fe1cd15e696fc816903561..0000000000000000000000000000000000000000 --- a/contrib/MathEval/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshMathEval${LIBEXT} - -INC = ${DASH}I../../Common - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = matheval.cpp\ - node.cpp\ - scanner.yy.cpp\ - parser.tab.cpp\ - symbol_table.cpp\ - xmath.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -parser: - bison --output parser.tab.cpp -pme -d parser.y - if [ -r parser.tab.cpp.h ]; then mv parser.tab.cpp.h parser.tab.hpp ; fi - flex -oscanner.yy.cpp -Pme scanner.l - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -matheval${OBJEXT}: matheval.cpp common.h ../../Common/MallocUtils.h matheval.h \ - node.h symbol_table.h -node${OBJEXT}: node.cpp common.h ../../Common/MallocUtils.h node.h \ - symbol_table.h -scanner.yy${OBJEXT}: scanner.yy.cpp common.h ../../Common/MallocUtils.h node.h \ - symbol_table.h parser.tab.hpp -parser.tab${OBJEXT}: parser.tab.cpp common.h ../../Common/MallocUtils.h node.h \ - symbol_table.h -symbol_table${OBJEXT}: symbol_table.cpp common.h ../../Common/MallocUtils.h \ - symbol_table.h xmath.h -xmath${OBJEXT}: xmath.cpp xmath.h diff --git a/contrib/Metis/CMakeLists.txt b/contrib/Metis/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6489bf939a42057a9a8cfa75552552ac0a32d009 --- /dev/null +++ b/contrib/Metis/CMakeLists.txt @@ -0,0 +1,61 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + balance.c + fm.c + kwayfm.c + mcoarsen.c + minitpart2.c + mpmetis.c + pmetis.c + subdomains.c + bucketsort.c + fortran.c + kwayrefine.c + memory.c + minitpart.c + mrefine2.c + pqueue.c + timing.c + ccgraph.c + frename.c + kwayvolfm.c + mesh.c + mkmetis.c + mrefine.c + refine.c + util.c + coarsen.c + graph.c + kwayvolrefine.c + meshpart.c + mkwayfmh.c + mutil.c + separator.c + compress.c + initpart.c + match.c + mfm2.c + mkwayrefine.c + myqsort.c + sfm.c + debug.c + kmetis.c + mbalance2.c + mfm.c + mmatch.c + ometis.c + srefine.c + estmem.c + kvmetis.c + mbalance.c + mincover.c + mmd.c + parmetis.c + stat.c +) + +append_gmsh_src(contrib/Metis "${SRC}") diff --git a/contrib/Metis/Makefile b/contrib/Metis/Makefile deleted file mode 100644 index 7bf7b59da48e4a2f378b67a82479b9d04b4fa48e..0000000000000000000000000000000000000000 --- a/contrib/Metis/Makefile +++ /dev/null @@ -1,154 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshMetis${LIBEXT} - -INC = ${DASH}I. - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = balance.c \ - fm.c \ - kwayfm.c \ - mcoarsen.c \ - minitpart2.c \ - mpmetis.c \ - pmetis.c \ - subdomains.c\ - bucketsort.c \ - fortran.c \ - kwayrefine.c\ - memory.c \ - minitpart.c \ - mrefine2.c\ - pqueue.c\ - timing.c\ - ccgraph.c \ - frename.c \ - kwayvolfm.c\ - mesh.c\ - mkmetis.c\ - mrefine.c \ - refine.c \ - util.c\ - coarsen.c \ - graph.c\ - kwayvolrefine.c \ - meshpart.c \ - mkwayfmh.c \ - mutil.c \ - separator.c\ - compress.c\ - initpart.c\ - match.c\ - mfm2.c \ - mkwayrefine.c\ - myqsort.c\ - sfm.c\ - debug.c \ - kmetis.c \ - mbalance2.c\ - mfm.c \ - mmatch.c \ - ometis.c \ - srefine.c\ - estmem.c \ - kvmetis.c\ - mbalance.c \ - mincover.c \ - mmd.c \ - parmetis.c \ - stat.c - -OBJ = ${SRC:.c=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .c - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.c${OBJEXT}: - ${CC} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -balance${OBJEXT}: balance.c metis.h defs.h struct.h macros.h rename.h proto.h -fm${OBJEXT}: fm.c metis.h defs.h struct.h macros.h rename.h proto.h -kwayfm${OBJEXT}: kwayfm.c metis.h defs.h struct.h macros.h rename.h proto.h -mcoarsen${OBJEXT}: mcoarsen.c metis.h defs.h struct.h macros.h rename.h proto.h -minitpart2${OBJEXT}: minitpart2.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -mpmetis${OBJEXT}: mpmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -pmetis${OBJEXT}: pmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -subdomains${OBJEXT}: subdomains.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -bucketsort${OBJEXT}: bucketsort.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -fortran${OBJEXT}: fortran.c metis.h defs.h struct.h macros.h rename.h proto.h -kwayrefine${OBJEXT}: kwayrefine.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -memory${OBJEXT}: memory.c metis.h defs.h struct.h macros.h rename.h proto.h -minitpart${OBJEXT}: minitpart.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -mrefine2${OBJEXT}: mrefine2.c metis.h defs.h struct.h macros.h rename.h proto.h -pqueue${OBJEXT}: pqueue.c metis.h defs.h struct.h macros.h rename.h proto.h -timing${OBJEXT}: timing.c metis.h defs.h struct.h macros.h rename.h proto.h -ccgraph${OBJEXT}: ccgraph.c metis.h defs.h struct.h macros.h rename.h proto.h -frename${OBJEXT}: frename.c metis.h defs.h struct.h macros.h rename.h proto.h -kwayvolfm${OBJEXT}: kwayvolfm.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -mesh${OBJEXT}: mesh.c metis.h defs.h struct.h macros.h rename.h proto.h -mkmetis${OBJEXT}: mkmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -mrefine${OBJEXT}: mrefine.c metis.h defs.h struct.h macros.h rename.h proto.h -refine${OBJEXT}: refine.c metis.h defs.h struct.h macros.h rename.h proto.h -util${OBJEXT}: util.c metis.h defs.h struct.h macros.h rename.h proto.h -coarsen${OBJEXT}: coarsen.c metis.h defs.h struct.h macros.h rename.h proto.h -graph${OBJEXT}: graph.c metis.h defs.h struct.h macros.h rename.h proto.h -kwayvolrefine${OBJEXT}: kwayvolrefine.c metis.h defs.h struct.h macros.h \ - rename.h proto.h -meshpart${OBJEXT}: meshpart.c metis.h defs.h struct.h macros.h rename.h proto.h -mkwayfmh${OBJEXT}: mkwayfmh.c metis.h defs.h struct.h macros.h rename.h proto.h -mutil${OBJEXT}: mutil.c metis.h defs.h struct.h macros.h rename.h proto.h -separator${OBJEXT}: separator.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -compress${OBJEXT}: compress.c metis.h defs.h struct.h macros.h rename.h proto.h -initpart${OBJEXT}: initpart.c metis.h defs.h struct.h macros.h rename.h proto.h -match${OBJEXT}: match.c metis.h defs.h struct.h macros.h rename.h proto.h -mfm2${OBJEXT}: mfm2.c metis.h defs.h struct.h macros.h rename.h proto.h -mkwayrefine${OBJEXT}: mkwayrefine.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -myqsort${OBJEXT}: myqsort.c metis.h defs.h struct.h macros.h rename.h proto.h -sfm${OBJEXT}: sfm.c metis.h defs.h struct.h macros.h rename.h proto.h -debug${OBJEXT}: debug.c metis.h defs.h struct.h macros.h rename.h proto.h -kmetis${OBJEXT}: kmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -mbalance2${OBJEXT}: mbalance2.c metis.h defs.h struct.h macros.h rename.h \ - proto.h -mfm${OBJEXT}: mfm.c metis.h defs.h struct.h macros.h rename.h proto.h -mmatch${OBJEXT}: mmatch.c metis.h defs.h struct.h macros.h rename.h proto.h -ometis${OBJEXT}: ometis.c metis.h defs.h struct.h macros.h rename.h proto.h -srefine${OBJEXT}: srefine.c metis.h defs.h struct.h macros.h rename.h proto.h -estmem${OBJEXT}: estmem.c metis.h defs.h struct.h macros.h rename.h proto.h -kvmetis${OBJEXT}: kvmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -mbalance${OBJEXT}: mbalance.c metis.h defs.h struct.h macros.h rename.h proto.h -mincover${OBJEXT}: mincover.c metis.h defs.h struct.h macros.h rename.h proto.h -mmd${OBJEXT}: mmd.c metis.h defs.h struct.h macros.h rename.h proto.h -parmetis${OBJEXT}: parmetis.c metis.h defs.h struct.h macros.h rename.h proto.h -stat${OBJEXT}: stat.c metis.h defs.h struct.h macros.h rename.h proto.h diff --git a/contrib/Metis/metis.h b/contrib/Metis/metis.h index eebe40f4f4cfb0cab63a26a2e50dc659d94cbe55..afc4b9eec62fec07c561e64394079afe3e39170d 100644 --- a/contrib/Metis/metis.h +++ b/contrib/Metis/metis.h @@ -8,7 +8,7 @@ * Started 8/27/94 * George * - * $Id: metis.h,v 1.2 2008-09-22 13:23:50 geuzaine Exp $ + * $Id: metis.h,v 1.3 2009-08-14 08:25:25 geuzaine Exp $ */ @@ -29,7 +29,7 @@ #include <dmalloc.h> #endif -#include <defs.h> +#include <metisdefs.h> /* changed from <defs.h> for Gmsh, due to conflict with Chaco */ #include <struct.h> #include <macros.h> #include <rename.h> diff --git a/contrib/Metis/defs.h b/contrib/Metis/metisdefs.h similarity index 98% rename from contrib/Metis/defs.h rename to contrib/Metis/metisdefs.h index 9f69eae825a0569e90fc1e2e4af44bb684d7c042..4e705359a69ae7fe276a229d7f2df00fcc999b1a 100644 --- a/contrib/Metis/defs.h +++ b/contrib/Metis/metisdefs.h @@ -8,7 +8,7 @@ * Started 8/27/94 * George * - * $Id: defs.h,v 1.2 2007-09-04 13:47:06 remacle Exp $ + * $Id: metisdefs.h,v 1.1 2009-08-14 08:25:25 geuzaine Exp $ * */ diff --git a/contrib/NativeFileChooser/CMakeLists.txt b/contrib/NativeFileChooser/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..219dfe224e0b42def2cba75741452b9c74fe10b0 --- /dev/null +++ b/contrib/NativeFileChooser/CMakeLists.txt @@ -0,0 +1,10 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + Fl_Native_File_Chooser.cxx +) + +append_gmsh_src(contrib/NativeFileChooser "${SRC}") diff --git a/contrib/NativeFileChooser/Makefile b/contrib/NativeFileChooser/Makefile deleted file mode 100644 index a358878948746b81a03e18d4812c959cb5d335ac..0000000000000000000000000000000000000000 --- a/contrib/NativeFileChooser/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshNativeFileChooser${LIBEXT} - -INC = ${DASH}I. - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}DFLTK1 - -SRC = Fl_Native_File_Chooser.cxx -OBJ = ${SRC:.cxx=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cxx - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cxx${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Fl_Native_File_Chooser${OBJEXT}: Fl_Native_File_Chooser.cxx \ - Fl_Native_File_Chooser_MAC.cxx common.cxx FL/Fl_Native_File_Chooser.H \ - FL/Fl_Native_File_Chooser_MAC.H diff --git a/contrib/Netgen/CMakeLists.txt b/contrib/Netgen/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5504aff2c65f6f3f7b53a39b1c7dceecb232a348 --- /dev/null +++ b/contrib/Netgen/CMakeLists.txt @@ -0,0 +1,41 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(gen libsrc/general) +set(int libsrc/interface) +set(lin libsrc/linalg) +set(gpr libsrc/gprim) +set(mes libsrc/meshing) +set(opt libsrc/opti) + +set(SRC + nglib_addon.cpp + ${gen}/array.cpp ${gen}/bitarray.cpp ${gen}/hashtabl.cpp + ${gen}/symbolta.cpp ${gen}/table.cpp ${gen}/flags.cpp + ${gen}/spbita2d.cpp ${gen}/seti.cpp ${gen}/optmem.cpp ${gen}/sort.cpp + ${gen}/mystring.cpp ${gen}/parthreads.cpp ${gen}/moveablemem.cpp + ${gen}/dynamicmem.cpp ${gen}/ngexception.cpp ${gen}/profiler.cpp + ${int}/nglib.cpp + ${lin}/densemat.cpp ${lin}/polynomial.cpp + ${gpr}/geom2d.cpp ${gpr}/geom3d.cpp ${gpr}/geomtest3d.cpp ${gpr}/adtree.cpp + ${gpr}/transform3d.cpp ${gpr}/geomfuncs.cpp + ${mes}/meshclass.cpp ${mes}/adfront2.cpp ${mes}/adfront3.cpp + ${mes}/geomsearch.cpp ${mes}/global.cpp ${mes}/meshtool.cpp + ${mes}/netrule2.cpp ${mes}/netrule3.cpp ${mes}/parser2.cpp + ${mes}/parser3.cpp ${mes}/ruler2.cpp ${mes}/ruler3.cpp + ${mes}/meshtype.cpp ${mes}/improve2.cpp ${mes}/smoothing2.5.cpp + ${mes}/smoothing2.cpp ${mes}/improve3.cpp ${mes}/smoothing3.cpp + ${mes}/improve2gen.cpp ${mes}/meshing2.cpp ${mes}/meshing3.cpp + ${mes}/localh.cpp ${mes}/delaunay.cpp ${mes}/topology.cpp + ${mes}/clusters.cpp ${mes}/tetrarls.cpp ${mes}/triarls.cpp + ${mes}/quadrls.cpp ${mes}/meshfunc.cpp ${mes}/meshfunc2d.cpp + ${mes}/refine.cpp ${mes}/bisect.cpp ${mes}/boundarylayer.cpp + ${mes}/specials.cpp ${mes}/msghandler.cpp ${mes}/pyramidrls.cpp + ${mes}/pyramid2rls.cpp ${mes}/prism2rls.cpp ${mes}/curvedelems.cpp + ${mes}/curvedelems2.cpp ${mes}/curvedelems_new.cpp ${mes}/validate.cpp + ${opt}/bfgs.cpp ${opt}/linsearch.cpp ${opt}/linopt.cpp +) + +append_gmsh_src(contrib/Netgen "${SRC}") diff --git a/contrib/Netgen/Makefile b/contrib/Netgen/Makefile deleted file mode 100644 index 45bc61b7de8c420cbb48c87c04e7efd7a42574a2..0000000000000000000000000000000000000000 --- a/contrib/Netgen/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshNetgen${LIBEXT} - -INC = ${DASH}I../../Common ${DASH}Ilibsrc/include ${DASH}Ilibsrc/interface - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} ${DASH}DNO_PARALLEL_THREADS - -${LIB}: recur nglib_addon${OBJEXT} -ifneq (${UNAME},WIN32MSVC) - ${AR} ${ARFLAGS}${LIB} *${OBJEXT} libsrc/*/*${OBJEXT} -else - copy libsrc\linalg\*.obj - copy libsrc\general\*.obj - copy libsrc\gprim\*.obj - copy libsrc\meshing\*.obj - copy libsrc\opti\*.obj - copy libsrc\interface\*.obj - ${AR} ${ARFLAGS}${LIB} *${OBJEXT} -endif - ${RANLIB} ${LIB} - -cpobj: recur nglib_addon${OBJEXT} - cp -f *${OBJEXT} libsrc/*/*${OBJEXT} ../../lib/ - -recur: - @cd libsrc/linalg && ${MAKE} - @cd libsrc/general && ${MAKE} - @cd libsrc/gprim && ${MAKE} - @cd libsrc/meshing && ${MAKE} - @cd libsrc/opti && ${MAKE} - @cd libsrc/interface && ${MAKE} - -nglib_addon${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c nglib_addon.cpp - -clean: - @cd libsrc/linalg && ${MAKE} clean - @cd libsrc/general && ${MAKE} clean - @cd libsrc/gprim && ${MAKE} clean - @cd libsrc/meshing && ${MAKE} clean - @cd libsrc/opti && ${MAKE} clean - @cd libsrc/interface && ${MAKE} clean - ${RM} *.o *.obj - -depend: - true - -# DO NOT DELETE THIS LINE diff --git a/contrib/Netgen/libsrc/general/Makefile b/contrib/Netgen/libsrc/general/Makefile deleted file mode 100644 index 1a8ac9e29c130774bcb134d2e92a0674a1b8d0cf..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/general/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# -# Makefile for general purpose data types -# -src = array.cpp bitarray.cpp hashtabl.cpp symbolta.cpp table.cpp flags.cpp \ - spbita2d.cpp seti.cpp optmem.cpp sort.cpp mystring.cpp parthreads.cpp \ - moveablemem.cpp dynamicmem.cpp ngexception.cpp profiler.cpp -# -lib = gen -libpath = libsrc/general -# -include ../makefile.inc - diff --git a/contrib/Netgen/libsrc/gprim/Makefile b/contrib/Netgen/libsrc/gprim/Makefile deleted file mode 100644 index 608e522844a6a48099c593d915f4e11aa34df466..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/gprim/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# -# Makefile for geometric library -# -src = geom2d.cpp geom3d.cpp \ - geomtest3d.cpp adtree.cpp transform3d.cpp geomfuncs.cpp - -# reftrans.cpp rot3d.cpp -# -lib = gprim -libpath = libsrc/gprim -# -# -include ../makefile.inc -# diff --git a/contrib/Netgen/libsrc/interface/Makefile b/contrib/Netgen/libsrc/interface/Makefile deleted file mode 100644 index 8c8cfcc69ac4168b896925f83e74ee06ec9a638f..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/interface/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# MODIFIED FOR GMSH -#src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp writetet.cpp writedolfin.cpp readuser.cpp importsolution.cpp readtetmesh.cpp -src = nglib.cpp -# -lib = nginterface -libpath = libsrc/interface -# -include ../makefile.inc -# diff --git a/contrib/Netgen/libsrc/linalg/Makefile b/contrib/Netgen/libsrc/linalg/Makefile deleted file mode 100644 index 1fac5fdd0607be1783487e61166151265494fa69..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/linalg/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# Makefile for linear algebra library -# -src = densemat.cpp polynomial.cpp -# -lib = la -libpath = libsrc/linalg -# -# -include ../makefile.inc -# - - diff --git a/contrib/Netgen/libsrc/meshing/Makefile b/contrib/Netgen/libsrc/meshing/Makefile deleted file mode 100644 index 22c86ee98629764a6a5c347cbcfe0ea29f57d9f6..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/meshing/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# MODIFIED FOR GMSH -src = meshclass.cpp adfront2.cpp adfront3.cpp geomsearch.cpp global.cpp \ - meshtool.cpp \ - netrule2.cpp netrule3.cpp parser2.cpp parser3.cpp ruler2.cpp ruler3.cpp \ - meshtype.cpp improve2.cpp smoothing2.5.cpp smoothing2.cpp improve3.cpp smoothing3.cpp \ - improve2gen.cpp meshing2.cpp meshing3.cpp \ - localh.cpp delaunay.cpp topology.cpp clusters.cpp \ - tetrarls.cpp triarls.cpp quadrls.cpp meshfunc.cpp meshfunc2d.cpp \ - refine.cpp bisect.cpp \ - boundarylayer.cpp specials.cpp msghandler.cpp \ - pyramidrls.cpp pyramid2rls.cpp prism2rls.cpp \ - curvedelems.cpp curvedelems2.cpp curvedelems_new.cpp \ - validate.cpp -# -lib = mesh -libpath = libsrc/meshing -# -include ../makefile.inc -# diff --git a/contrib/Netgen/libsrc/opti/Makefile b/contrib/Netgen/libsrc/opti/Makefile deleted file mode 100644 index d73441553f5d206679559512e4d7c50af8b21e15..0000000000000000000000000000000000000000 --- a/contrib/Netgen/libsrc/opti/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# -# Makefile for optimisation library -# -src = bfgs.cpp linsearch.cpp linopt.cpp -# -lib = opti -libpath = libsrc/opti -# -# -include ../makefile.inc diff --git a/bin/Makefile b/contrib/Tetgen/CMakeLists.txt similarity index 67% rename from bin/Makefile rename to contrib/Tetgen/CMakeLists.txt index 275410fcb6ac356b58cf1597b8985d170263358f..e418dda62bd1cddebffc61b59f1dd29f3551fa0b 100644 --- a/bin/Makefile +++ b/contrib/Tetgen/CMakeLists.txt @@ -3,5 +3,9 @@ # See the LICENSE.txt file for license information. Please report all # bugs and problems to <gmsh@geuz.org>. -default: - true +set(SRC + tetgen.cxx + predicates.cxx +) + +append_gmsh_src(contrib/Tetgen "${SRC}") diff --git a/contrib/Tetgen/Makefile b/contrib/Tetgen/Makefile deleted file mode 100644 index f6b3590c5cb1620e7501fa295fe535a9a54210a5..0000000000000000000000000000000000000000 --- a/contrib/Tetgen/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshTetgen${LIBEXT} - -# Don't optimize Tetgen -CFLAGS = ${FLAGS} ${DASH}DTETLIBRARY - -SRC = tetgen.cxx \ - predicates.cxx - -OBJ = ${SRC:.cxx=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cxx - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cxx${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -tetgen${OBJEXT}: tetgen.cxx tetgen.h -predicates${OBJEXT}: predicates.cxx tetgen.h diff --git a/contrib/TetgenNew/CMakeLists.txt b/contrib/TetgenNew/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..36c388b2df99aa5542ff9086ec595551dabd1f06 --- /dev/null +++ b/contrib/TetgenNew/CMakeLists.txt @@ -0,0 +1,22 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + behavior.cxx + constrain.cxx + delaunay.cxx + flip.cxx + geom.cxx + io.cxx + main.cxx + memorypool.cxx + meshio.cxx + meshstat.cxx + predicates.cxx + refine.cxx + surface.cxx +) + +append_gmsh_src(contrib/TetgenNew "${SRC}") diff --git a/contrib/TetgenNew/Makefile b/contrib/TetgenNew/Makefile deleted file mode 100644 index a9109b4bceb5aaed24c8c448f1479c24d51e7c1f..0000000000000000000000000000000000000000 --- a/contrib/TetgenNew/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshTetgen${LIBEXT} - -# Don't optimize Tetgen -CFLAGS = ${FLAGS} ${DASH}DTETLIBRARY - -SRC = behavior.cxx\ - constrain.cxx\ - delaunay.cxx\ - flip.cxx\ - geom.cxx\ - io.cxx\ - main.cxx\ - memorypool.cxx\ - meshio.cxx\ - meshstat.cxx\ - predicates.cxx\ - refine.cxx\ - surface.cxx - -OBJ = ${SRC:.cxx=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cxx - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cxx${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -behavior${OBJEXT}: behavior.cxx tetgen.h -constrain${OBJEXT}: constrain.cxx tetgen.h -delaunay${OBJEXT}: delaunay.cxx tetgen.h -flip${OBJEXT}: flip.cxx tetgen.h -geom${OBJEXT}: geom.cxx tetgen.h -io${OBJEXT}: io.cxx tetgen.h -main${OBJEXT}: main.cxx tetgen.h -memorypool${OBJEXT}: memorypool.cxx tetgen.h -meshio${OBJEXT}: meshio.cxx tetgen.h -meshstat${OBJEXT}: meshstat.cxx tetgen.h -predicates${OBJEXT}: predicates.cxx tetgen.h -refine${OBJEXT}: refine.cxx tetgen.h -surface${OBJEXT}: surface.cxx tetgen.h diff --git a/doc/Makefile b/contrib/TreeBrowser/CMakeLists.txt similarity index 68% rename from doc/Makefile rename to contrib/TreeBrowser/CMakeLists.txt index 527b579d10d7a65e7d07f8cf8422d8533e94e82a..1ba08e3011b7d27d40b3682c1a6970196575a674 100644 --- a/doc/Makefile +++ b/contrib/TreeBrowser/CMakeLists.txt @@ -3,8 +3,8 @@ # See the LICENSE.txt file for license information. Please report all # bugs and problems to <gmsh@geuz.org>. -include ../variables +set(SRC + Flu_Tree_Browser.cpp +) -clean: - ${RM} *~ .*~ - cd texinfo && ${MAKE} clean +append_gmsh_src(contrib/TreeBrowser "${SRC}") diff --git a/contrib/TreeBrowser/Makefile b/contrib/TreeBrowser/Makefile deleted file mode 100644 index 17b267a18b070b6639a6f8ebff12fb1cbd1a4f54..0000000000000000000000000000000000000000 --- a/contrib/TreeBrowser/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -LIB = ../../lib/libGmshTreeBrowser${LIBEXT} - -INC = ${DASH}I. - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} - -SRC = Flu_Tree_Browser.cpp - -OBJ = ${SRC:.cpp=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .cpp - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.cpp${OBJEXT}: - ${CXX} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -Flu_Tree_Browser${OBJEXT}: Flu_Tree_Browser.cpp Flu_Tree_Browser.h diff --git a/contrib/kbipack/CMakeLists.txt b/contrib/kbipack/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7a75b9fd08ca2d60371852b89ef611d013a531f --- /dev/null +++ b/contrib/kbipack/CMakeLists.txt @@ -0,0 +1,13 @@ +# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle +# +# See the LICENSE.txt file for license information. Please report all +# bugs and problems to <gmsh@geuz.org>. + +set(SRC + gmp_normal_form.c + gmp_matrix_io.c + gmp_matrix.c + gmp_blas.c +) + +append_gmsh_src(contrib/kbipack "${SRC}") diff --git a/contrib/kbipack/Makefile b/contrib/kbipack/Makefile deleted file mode 100755 index 50e6f52bae3bfea37f0d8d918ac9f2ebea24e9e5..0000000000000000000000000000000000000000 --- a/contrib/kbipack/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -## Original Makefile by Saku Suuriniemi - -#FLAGS = -O3 -funroll-all-loops -ansi -pedantic -Wall -U DEBUG -# Flags for different diagnostics: -#FLAGS = -g -ansi -pedantic -Wall -fprofile-arcs -ftest-coverage -pg -#FLAGS = -g -ansi -pedantic -Wall -pg - -# If gmp.h is not found de facto (e.g. when it is privately intalled), -# its path should be put here -#INCL = - -#LIBS = -lgmp -#LIBDIR = . -#SRC = gmp_normal_form.c gmp_matrix_io.c gmp_matrix.c gmp_blas.c - -# The compiler options are for gcc. If it is not available, -# suitable flags must be set for the compiler -#CC = gcc -#RM = rm -f -#RANLIB = ranlib - -#libkbi.a: $(SRC) -# $(RM) *.o -# $(CC) -c $(FLAGS) $(SRC) -# ar r libkbi.a *.o -# $(RM) *.o -# $(RANLIB) libkbi.a - -#compute_normal_form: libkbi compute_normal_form.c -# $(CC) $(FLAGS) -L $(LIBDIR) $(INCL) compute_normal_form.c -o compute_normal_form -lkbi $(LIBS) -#clean: -# $(RM) compute_normal_form -# $(RM) *.o - -## Makefile for Gmsh - -include ../../variables - -LIB = ../../lib/libGmshKbi${LIBEXT} - -INC = ${DASH}I. - -CFLAGS = ${OPTIM} ${FLAGS} ${INC} ${SYSINCLUDE} -lgmp - -SRC = gmp_normal_form.c gmp_matrix_io.c gmp_matrix.c gmp_blas.c - -OBJ = ${SRC:.c=${OBJEXT}} - -.SUFFIXES: ${OBJEXT} .c - -${LIB}: ${OBJ} - ${AR} ${ARFLAGS}${LIB} ${OBJ} - ${RANLIB} ${LIB} - -cpobj: ${OBJ} - cp -f ${OBJ} ../../lib/ - -.c${OBJEXT}: - ${CC} ${CFLAGS} ${DASH}c $< - -clean: - ${RM} *.o *.obj - -depend: - (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ - ${CXX} -MM ${CFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \ - ) > Makefile.new - cp Makefile Makefile.bak - cp Makefile.new Makefile - rm -f Makefile.new - -# DO NOT DELETE THIS LINE -gmp_normal_form${OBJEXT}: gmp_normal_form.c gmp_blas.h gmp_matrix.h \ - gmp_normal_form.h -gmp_matrix_io${OBJEXT}: gmp_matrix_io.c gmp_matrix_io.h gmp_matrix.h gmp_blas.h -gmp_matrix${OBJEXT}: gmp_matrix.c gmp_matrix.h gmp_blas.h -gmp_blas${OBJEXT}: gmp_blas.c gmp_blas.h diff --git a/doc/.globalrc b/doc/.globalrc deleted file mode 100644 index 2b92f4f4cc9eba365dcd973ea8f3d385b12a7dde..0000000000000000000000000000000000000000 --- a/doc/.globalrc +++ /dev/null @@ -1,165 +0,0 @@ -# -# Copyright (c) 1998, 1999 -# Shigio Yamaguchi. All rights reserved. -# Copyright (c) 1999, 2000 -# Tama Communications Corporation. All rights reserved. -# -# This file is part of GNU GLOBAL. -# -# GNU GLOBAL is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU GLOBAL is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# * -# Configuration file for GNU GLOBAL source code tag system. -# -# GLOBAL doesn't need 'global.conf' because it has the default values in it. -# But if you have this file as '/etc/global.conf' or "$HOME/.globalrc" -# then GLOBAL system overwrite default values with the values from the file. -# -# 'global.conf' is termcap style file. -# 'default' is default target. -# You can specify target with GTAGSLABEL environment variable. -# -default:\ - :tc=gctags:tc=htags: -#--------------------------------------------------------------------- -# -# Configuration for gtags(1) -# -# format: -# Select 'standard' or 'compact'. By default, it assumes 'standard'. -# suffixes: -# Suffixes of target source file. By default, it assumes -# 'c,h,y,c++,cc,cpp,cxx,hxx,C,H,s,S,java' -# skip: -# Skip files among the target files. If the name ends with '/', -# gtags skips all files under the directory. -# By default, it assumes 'y.tab.c,y.tab.h,SCCS/,RCS/,CVS/'. -# extractmethod: -# Please see source code of gtags(1). -# GTAGS: -# Tag command for definitions. Non of default value. -# GRTAGS: -# Tag command for references. Non of default value. -# GSYMS: -# Tag command for other symbols. Non of default value. -# -# Htags(1) needs both of GTAGS and GRTAGS. Global(1)'s -s option needs GSYMS. -# -#--------------------------------------------------------------------- -common:\ - :skip=GetDP.tab.h,GetDP.tab.c,GetDP.yy.c,pvpii.c,utils/,trash/,\ - Gmsh.tab.cpp,Gmsh.tab.cpp.h,Gmsh.yy.cpp,\ - CVS/,HTML/:\ - :format=standard: -# -# [gctags] -# -# This command is distributed as part of GLOBAL. -# -gctags|tag command for GLOBAL:\ - :tc=common:\ - :suffixes=c,h,y,c++,cc,cpp,cxx,hxx,C,H,s,S,java:\ - :sort_command=sort:\ - :sed_command=sed:\ - :GTAGS=gctags %s:\ - :GRTAGS=gctags -r %s:\ - :GSYMS=gctags -s %s: -# -# [Emacs's ctags] -# -# This ctags is distributed as a part of Emacs editor. -# -# supported suffixes by etags. -# -# lisp: l,el,lsp,lisp,cl,clisp -# scheme: sm,scm,scheme,t,sch,ss,SM,SCM -# assembler: s,a,sa,asm,src,def,ins,inc -# C++: C,H,cpp,cxx,hxx,cc -# C*: cs,hs -# c,yacc: c,h,y -# pl,p,pas: pascal -# fortran: f,for -# -# [Installation] -# % cd <emacs source directory>/lib-src -# % make ctags -# # cp ctags /usr/local/bin/ctags-emacs -# -ctags-emacs|ctags based on etags|GNU Emacs ctags:\ - :tc=common:\ - :suffixes=el,s,a,sa,asm,C,H,cpp,cxx,hxx,cc,c,h,y:\ - :extractmethod:\ - :GTAGS=/usr/local/bin/ctags-emacs -x -d -T -w %s: -# -# [Exuberant Ctags] -# -# This ctags is distributed as a part of Vim editor. -# -# [Installation] -# % cd <Vim source directory>/src/ctags -# % make -# # cp ctags /usr/local/bin/ctags-exuberant -# -ctags-exuberant|Exuberant Ctags|ctags by Darren Hiebert:\ - :tc=common:\ - :suffixes=s,a,sa,asm,C,H,cpp,cxx,hxx,cc,c,h,y:\ - :extractmethod:\ - :GTAGS=/usr/local/bin/ctags-exuberant -x %s | perl -ne '\ - if (/^operator \\S+\\s+function\\s/) { s/^operator //; }\ - ($name, $type, $no, $path, $line) = split(/[ \\t]+/, $_, 5);\ - printf(STDOUT "%-16s %4d %-16s %s", $name, $no, $path, $line);': -#--------------------------------------------------------------------- -# -# Configuration for htags(1) -# Let's paint hypertext with your favorite colors! -# -# body_begin,body_end: -# body tag -# title_begin,title_end: -# title tag -# comment_begin,comment_end: -# comment tag. (/* ... */, // ...) -# sharp_begin,sharp_end: -# macro tag. (#include, #define, ...) -# brace_begin,brace_end: -# brace tag. ('{', '}') -# reserved_begin,reserved_end: -# reserved word tag. (while, if, char, ...) -# ncol: -# columns of line number. (default = 4) -# tabs: -# tab stop. (default = 8) -# full_path: -# list file names with full path in file index. -# By default, the last component of a path. -# table_list: -# list tags using table tag (<table></table>). -# normal_suffix: -# normal suffix for html file. By default, 'html'. -# gzipped_suffix: -# suffix for compressed html file. By default, 'ghtml'. -# script_alias: -# specified -s option then use this value as script alias. -# -#--------------------------------------------------------------------- -htags:\ - :body_begin=<BODY BGCOLOR="#ffffff">:body_end=</BODY>:\ - :table_begin=<TABLE>:table_end=</TABLE>:\ - :title_begin=<FONT COLOR=#cc0000>:title_end=</FONT>:\ - :comment_begin=<I><FONT COLOR=darkred>:comment_end=</FONT></I>:\ - :sharp_begin=<FONT COLOR=darkviolet>:sharp_end=</FONT>:\ - :brace_begin=<FONT COLOR=blue>:brace_end=</FONT>:\ - :reserved_begin=<FONT COLOR=green><B>:reserved_end=</B></FONT>:script_alias=/cgi-bin/:\ - :ncol#4:tabs#8:normal_suffix=html:gzipped_suffix=ghtml: diff --git a/doc/CREDITS.txt b/doc/CREDITS.txt index 38e72f286dbc8c461c7fdf4a67b99073fcc30778..4b6066438e141f7147e727fbf0e3e513e8544242 100644 --- a/doc/CREDITS.txt +++ b/doc/CREDITS.txt @@ -122,4 +122,4 @@ Bruno Frackowiak, Philip Kelleners, Romuald Conty, Renaud Sizaire, Michel Benhamou, Tom De Vuyst, Kris Van den Abeele, Simon Vun, Simon Corbin, Thomas De-Soza, Marcus Drosson, Antoine Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel Hackbarth, -Peter Wainwright, Jiri Hnidek, Thierry Thomas. +Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios. diff --git a/doc/FAQ.txt b/doc/FAQ.txt index 4027132ea4e09729354658436f6098d29017315d..2a9560bab8a97d2f7a7a54098a5efb629ef2fb31 100644 --- a/doc/FAQ.txt +++ b/doc/FAQ.txt @@ -1,4 +1,4 @@ -$Id: FAQ.txt,v 1.5 2009-03-30 06:34:13 geuzaine Exp $ +$Id: FAQ.txt,v 1.6 2009-08-14 08:25:37 geuzaine Exp $ This is the Gmsh FAQ @@ -52,16 +52,18 @@ found at http://www.mesa3d.org. * 2.3 How do I compile Gmsh from the source code? -You need a C++ compiler. On Unix-like systems just type './configure; -make; make install'. (Type './configure --help' to get the list of all -configuration options.) To compile Gmsh on Windows with Visual C++ see -doc/README.msvc. +You need cmake (http://www.cmake.org) and a C++ compiler. See the +README.txt file in the top-level source directory for more +information. -Compiling a bare-bones non-graphical version of Gmsh does not require -any extra packages. To get a usable version you will need the BLAS and -Lapack libraries. To build the graphical version you will need FLTK >= -1.1.7 (freely available from http://www.fltk.org), configured with -OpenGL support. +* 2.4 Where does Gmsh save its configuration files? + +Gmsh will attempt to save temporary files and persistent configuration +options first in the $GMSH_HOME directory, then in the $HOME, $TMP or +$TEMP directories (in that order) if the $GMSH_HOME environment +variable is not defined. If none of these variables are defined, Gmsh +will try to save/load its configuration files from the current working +directory. ******************************************************************** @@ -70,9 +72,14 @@ Section 3: General problems * 3.1 Gmsh (from a binary distribution) complains about missing libraries. -Try 'ldd gmsh' (or 'otool -L gmsh' on Mac OS X) to check if all the -required shared libraries are installed on your system. If not, -install them. If it still doesn't work, recompile Gmsh from the +On Windows, if your system complains about missing OPENGL32.DLL or +GLU32.DLL libraries, then OpenGL is not properly installed on your +machine. You can download OpenGL from Microsoft's web site, or +directly from http://www.opengl.org. + +On Unix try 'ldd gmsh' (or 'otool -L gmsh' on Mac OS X) to check if +all the required shared libraries are installed on your system. If +not, install them. If it still doesn't work, recompile Gmsh from the sources. * 3.2 Gmsh keeps re-displaying its graphics when other windows diff --git a/doc/README.cvs b/doc/README.cvs deleted file mode 100644 index bda47aa15763f683bf0d88ea8d86e9491b177204..0000000000000000000000000000000000000000 --- a/doc/README.cvs +++ /dev/null @@ -1,21 +0,0 @@ -$Id: README.cvs,v 1.6 2006-09-26 20:12:17 guzik Exp $ - -0) Set the variable CVS_RSH to ssh ('export CVS_RSH=ssh' with bash, or - 'setenv CVS_RSH ssh' with tcsh) - -1) The first time you want to download the latest full source by - CVS, type: - - cvs -d username@cvs.geuz.org:/cvsroot checkout gmsh - - where username is your login on cvs.geuz.org - -2) To update your local version to the latest and greatest, go in the - gmsh directory and type: - - cvs update -dPA - -3) To commit your changes to the central repository, go in the gmsh - directory and type: - - cvs commit diff --git a/doc/README.gui b/doc/README.gui deleted file mode 100644 index fdf8c70ba0d39fda9b404ab87035bb1b4d0c22df..0000000000000000000000000000000000000000 --- a/doc/README.gui +++ /dev/null @@ -1,33 +0,0 @@ -Some GUI guidelines: - -1) To make the interface as visually consistent as possible use the -IW, BB, BH and WB values. And examine what's already done before -adding something new... - -2) Only 'title-capitalize' titles and menus (Rules: 1. Always -capitalize the first and the last word. 2. Capitalize all nouns, -pronouns, adjectives, verbs, adverbs, and subordinate -conjunctions. 3. Lowercase all articles, coordinate conjunctions, -and prepositions, when they are other than the first or last -word. 4. Lowercase the "to" in an infinitive.) Capitalize everything -else like normal english sentences - -3) Use an ellipsis character in a menu item for -- an action that requires further user input to complete or - presents an alert allowing the user to cancel the action - Examples: Find, Go To, Open, Page Setup, and Print. -- an action that opens a settings window. Examples: Set Title, - Preferences, and Options. -Don't use en allipsis for: -- an action that requires no further user input to complete and - does not present an alert. -- an action that opens an informational, accessory, or tool window. - These windows can be implemented as either utility windows (as - in the case of a color palette) or modeless windows. These windows - provide tools that help create or manage the content in the main - window and are frequently left open to assist in accomplishing the - task of the main window. Examples: Info and Show Tools. - -4) The title of a window opened from a menu should be exactly the -same as the label of the menu item (without the ellipsis character if -there is one) diff --git a/doc/README.mac b/doc/README.mac deleted file mode 100644 index 31e6007f1211db97c013d81d284df6d265280924..0000000000000000000000000000000000000000 --- a/doc/README.mac +++ /dev/null @@ -1,66 +0,0 @@ -$Id: README.mac,v 1.6 2004-06-04 18:58:46 geuzaine Exp $ - -How to make a version recognized by the Mac Finder? - -The old way (using resource forks): - -- compile - -- append the resources to the executable: - - /Developer/Tools/Rez -t APPL -o bin/gmsh Fltk/MacRes.r - -- copy all the stuff you want to distribute (using the finder or - 'ditto'! copying with 'cp' in a shell will destroy the resources!) - to a distribution folder - -- a) use the DiskCopy utility to create a disk image (.dmg) - - b) you can also create the disk image on the command line, using - utils/misc/makedmg.sh (WARNING: modify the script to suit your needs) - -The new way: - -- use the new XML-based scheme: see 'make distrib-mac' - -- ...and just 'tar zcvf' the directory. No more crappy resources! - -******************************************************************** - -Apple Creator Registration - -Please include the line below in follow-up emails for this request. - -Follow-up: 2311056 - -Re: Creator Registration Request - -Dear Christophe Geuzaine, - -Thank you for registering your application creator information. We -appreciate your continued product development and support of Apple -Computer! The following product information has been registered: - -Company: DGR -Contact: Christophe Geuzaine -Address: **** - -Application: Gmsh -Phone: *** *** **** -EMail Address: geuz@geuz.org - -Application Signatures: -GMSH (Hex) 474D5348 - -This letter serves as your confirmation. Please keep it on -file. Additionally, you should review the information for accuracy. If -you locate discrepancies, please contact Developer Support at -devprograms@apple.com with your corrections. - -Thanks for supporting Apple! - -Best regards, - -Elisa Molson -Apple Developer Connection -Worldwide Developer Relations diff --git a/doc/README.msvc b/doc/README.msvc deleted file mode 100644 index 699a91325de066f2f3b1bd6a763a4857fc142d52..0000000000000000000000000000000000000000 --- a/doc/README.msvc +++ /dev/null @@ -1,15 +0,0 @@ -To compile Gmsh with Microsoft Visual C++ - -1) launch the Visual Studio command prompt - -2) go to the Gmsh source directory - -4) rename "utils\misc\variables.msvc" into "variables" (in the root - of the Gmsh source directory) and rename "utils\misc\GmshConfig.msvc" - into "Common\GmshConfig.h" - -5) edit "variables" to match your local installation of Gmsh and - Visual C++ (and to configure which optional Gmsh features to build) - -6) type "utils\misc\gmake.exe" - diff --git a/doc/README.occ b/doc/README.occ deleted file mode 100644 index b4f51f1941c33b84f66f6a7c90b7becd4d7b80af..0000000000000000000000000000000000000000 --- a/doc/README.occ +++ /dev/null @@ -1,91 +0,0 @@ - -How to build OpenCascade 6.3 (OCC) for Gmsh: - -- Get the source distribution of OCC and unpack it (you only need the - "ros" subdirectory). In the following <OpenCascade dir> refers to - the directory where OCC is installed (e.g ~/OpenCASCADE6.3.0) - -- OS/compiler specific stuff: - - * On Windows, use Visual C++ to compile the libraries, or use the - precompiled DLLs directly. (The MinGW compiler used to work with - OCC 6.2 but do not anymore with 6.3.) See README.msvc for - instructions on how to compile Gmsh with Visual C++. - - * on Mac OS X unfortunately you cannot build universal libs simply - by using "-arch i386 -arch ppc" (the code depends on - configure-time endinanness checks). So, first configure and build - with - - export CFLAGS="-arch i386" - export CXXFLAGS="-arch i386" - - and then do "make distclean" and configure and build again - with - - export CFLAGS="-arch ppc" - export CXXFLAGS="-arch ppc" - - after the install step, use "lipo" to merge both archs, e.g. - - lipo -create libi386.a libppc.a -output libuniversal.a - -- Go to the <OpenCascade dir>/ros directory and type - - ./configure --prefix=/usr/local/opencascade --enable-debug=no - --enable-production=yes --enable-static=yes --enable-shared=no - --disable-dependency-tracking - -- Then go to the <OpenCascade dir>/ros/adm/make/ directory and - run "make" in the following subdirectories, e.g. by running the - following bash script: - - #!/bin/bash - for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep - TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool - TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr - TKSTEP209 TKSTEP; do - cd $lib && make; cd ..; - done - - Note that this is the same as doing "make FoundationClasses", "make - ModelingData", "make ModelingAlgorithms" and part of "make - DataExchange" - -- Finally, run this other bash script in the same directory (to install - the libraries) - - #!/bin/bash - for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep - TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool - TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr - TKSTEP209 TKSTEP; do - cd $lib && make install; cd ..; - done - - and copy config.h and the <OpenCascade dir>/ros/inc/ subdirectory - to /usr/local/opencascade (This is the same as a doing a partial - 'make install') - -OpenCascade is now installed and ready to be used by Gmsh. To compile -Gmsh with OpenCascade support: - -- Go to the gmsh source directory - -- Run "./configure --enable-occ --with-occ-prefix=/usr/local/opencascade" and - then "make" - -- If you get errors like - - undefined reference to `pthread_create' - undefined reference to `pthread_detach' - ... - - edit the "variables" file and add "-pthread" to the OPTIM variable, e.g.: - - OPTIM="-g -O2 -pthread" - - and run make again - -- If compiling is successful then you are done and you can enjoy - importing IGES/STEP/BREP files into Gmsh! diff --git a/doc/README.win32 b/doc/README.win32 deleted file mode 100644 index 6ee41811626e98402d33498fe37a8c9394b7c4d2..0000000000000000000000000000000000000000 --- a/doc/README.win32 +++ /dev/null @@ -1,32 +0,0 @@ -This is Gmsh, an automatic three-dimensional finite element mesh -generator with built-in pre- and post-processing facilities. - -Gmsh is distributed under the terms of the GNU General Public -License. See the LICENSE and CREDITS files for more information. - -The tutorial/ directory contains the examples from the tutorial -chapter in the reference manual (http://geuz.org/gmsh/doc/texinfo/). -The demos/ directory contains additional examples. - -Important notes: - -1) About OPENGL32.DLL and GLU32.DLL: - -If your system complains about missing OPENGL32.DLL or GLU32.DLL -libraries, then OpenGL is not properly installed on your machine. You -can download OpenGL from Microsoft's web site, or directly from -http://www.opengl.org. - -2) About configuration files: - -Gmsh will attempt to save temporary files and persistent configuration -options first in the $GMSH_HOME directory, then in the $HOME, $TMP or -$TEMP directories (in that order) if the $GMSH_HOME environment -variable is not defined. If none of these variables are defined, Gmsh -will try to save/load its configuration files from the current working -directory. - -3) About the solver interface: - -By default, on Windows, Gmsh communicates with solvers on the TCP/IP -port 44122. You can change this in the Solver option panel. diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt index ef0252073a764d0a32c12ec480b812d11d82094e..191824ca78483622b53a1994ecda444aab5666cd 100644 --- a/doc/VERSIONS.txt +++ b/doc/VERSIONS.txt @@ -1,9 +1,10 @@ -$Id: VERSIONS.txt,v 1.47 2009-07-06 05:44:25 geuzaine Exp $ +$Id: VERSIONS.txt,v 1.48 2009-08-14 08:25:37 geuzaine Exp $ -2.4.0 (?): optionally copy transfinite mesh contraints during geometry -transformations; bumped mesh version format to 2.1 (small change in -the $PhysicalNames section, where the group dimension is now -required); ported most plugins to the new post-processing API. +2.4.0 (?): switched build system to CMake; optionally copy transfinite +mesh contraints during geometry transformations; bumped mesh version +format to 2.1 (small change in the $PhysicalNames section, where the +group dimension is now required); ported most plugins to the new +post-processing API. 2.3.1 (Mar 18, 2009): removed GSL dependency (Gmsh now simply uses Blas and Lapack); new per-window visibility; added support for diff --git a/doc/WELCOME.txt b/doc/WELCOME.txt new file mode 100644 index 0000000000000000000000000000000000000000..d9d0549e1fe913635e9cc841cc8a759449c11a2f --- /dev/null +++ b/doc/WELCOME.txt @@ -0,0 +1,10 @@ +This is Gmsh, an automatic three-dimensional finite element mesh +generator with built-in pre- and post-processing facilities. + +Gmsh is distributed under the terms of the GNU General Public +License. See the LICENSE.txt and CREDITS.txt files for more +information. + +The tutorial/ directory contains the examples from the tutorial +chapter in the reference manual (http://geuz.org/gmsh/doc/texinfo/). +The demos/ directory contains additional examples. diff --git a/doc/gmsh.html b/doc/gmsh.html index 77cafec05b6b2d95623ce8a8767fd6e5e2c26c3e..9cf8f772511a39b3149a3f42f894c608c6e5a0d0 100644 --- a/doc/gmsh.html +++ b/doc/gmsh.html @@ -25,7 +25,7 @@ generator with built-in pre- and post-processing facilities</h1> <p> <h3 align="center">Christophe Geuzaine and Jean-Fran�ois Remacle</h3> <p> -<h3 align=center>Version 2.3.1, March 18 2009</h3> +<h3 align=center>Version 2.4.0, ? 2009</h3> <p> <center> <a href="#Description">Description</a> | @@ -52,26 +52,24 @@ ASCII text files using Gmsh's own scripting language. <p> See the screencasts for a <a href="/gmsh/screencasts/">quick tour of Gmsh's graphical user interface</a>, or the reference manual for a -more thorough <a href="/gmsh/doc/texinfo/gmsh_2.html">overview of -Gmsh's capabilities</a>. +more thorough <a href="/gmsh/doc/texinfo/gmsh.html#Overview">overview +of Gmsh's capabilities</a>. <h2><a name="Download"></a>Download</h2> Gmsh is distributed under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public -License (GPL)</a>. Pre-compiled binaries<a href="#opengl-footnote" -name="opengl-footmark"><sup>1</sup></a> are available for Windows (XP -& Vista), Linux (Intel, glibc 2.3) and Mac OS X (10.5, Universal -binary). Tutorial and demos files are included in all the archives. +License (GPL)</a>. Pre-compiled binaries are available for Windows (XP +or Vista), Linux (Intel, glibc 2.3) and Mac OS X (10.5, +Intel). Tutorial and demos files are included in all the archives. <ul> <li> <strong>Current stable release</strong>: -<a href="/gmsh/bin/Windows/gmsh-2.3.1-Windows.zip"><strong>Windows</strong></a>, -<a href="/gmsh/bin/Linux/gmsh-2.3.1-Linux.tgz"><strong>Linux</strong></a>, -<a href="/gmsh/bin/MacOSX/gmsh-2.3.1-MacOSX.tgz"><strong>Mac OS X</strong></a> and -<a href="/gmsh/src/gmsh-2.3.1-source.tgz"><strong>source code</strong></a> -<a href="#build-footnote" name="build-footmark"><sup>2</sup></a> +<a href="/gmsh/bin/Windows/gmsh-2.4.0-Windows.zip"><strong>Windows</strong></a>, +<a href="/gmsh/bin/Linux/gmsh-2.4.0-Linux.tgz"><strong>Linux</strong></a>, +<a href="/gmsh/bin/MacOSX/gmsh-2.4.0-MacOSX.dmg"><strong>Mac OS X</strong></a> and +<a href="/gmsh/src/gmsh-2.4.0-source.tgz"><strong>source code</strong></a> <p> <li>Experimental versions (these might be buggy, or might not even launch: use at your own risk!): @@ -80,7 +78,7 @@ launch: use at your own risk!): (<a href="/gmsh/bin/Windows/nightly.log">build log</a>), <a href="/gmsh/bin/Linux/gmsh-nightly-Linux.tgz">Linux</a> (<a href="/gmsh/bin/Linux/nightly.log">build log</a>), -<a href="/gmsh/bin/MacOSX/gmsh-nightly-MacOSX.tgz">Mac OS X</a> +<a href="/gmsh/bin/MacOSX/gmsh-nightly-MacOSX.dmg">Mac OS X</a> (<a href="/gmsh/bin/MacOSX/nightly.log">build log</a>) <li>nightly <a href="/gmsh/src/gmsh-nightly-source.tgz">cvs source snapshot</a> @@ -116,10 +114,8 @@ questions or bug reports. <ul> <li><a href="/gmsh/doc/texinfo/gmsh.html">Reference manual</a> (also available in - <a href="/gmsh/doc/texinfo/gmsh.pdf">pdf</a>, - <a href="/gmsh/doc/texinfo/gmsh.txt">text</a> and - <a href="/gmsh/doc/texinfo/gmsh-info.tgz">info</a> formats, or as a - <a href="/gmsh/doc/texinfo/gmsh-full.html">single html file</a>) + <a href="/gmsh/doc/texinfo/gmsh.pdf">PDF</a> or in + <a href="/gmsh/doc/texinfo/gmsh.txt">plain text</a>) <li><a href="/gmsh/screencasts/">Screencasts</a> showing how to use the graphical user interface <li><a href="/gmsh/doc/FAQ.txt">Frequently asked questions (FAQ)</a> @@ -274,21 +270,6 @@ graphical user interface. alt="Make a donation with PayPal"> </form> -<hr> -<a name="opengl-footnote"></a><a href="#opengl-footmark"><sup>1</sup></a>You -need the OpenGL libraries installed on your system (and in the path of -the library loader). A free replacement for OpenGL can be found -at <a href="http://mesa3d.sourceforge.net/">http://mesa3d.sourceforge.net</a>. -Remember that you may have to reconfigure the loader (ldconfig under -Linux) or modify the LD_LIBRARY_PATH/SHLIB_PATH/etc. environment -variable in order for Gmsh to find the libraries. -<p> -<a name="build-footnote"></a><a href="#build-footmark"><sup>2</sup></a>You -need the <a href="http://www.fltk.org/">FLTK (>= 1.1.7)</a> library -and include files properly installed on your system in order to -compile the graphical version of Gmsh. Non-graphical versions can be -compiled without FLTK. - <p> Back to <a href="/">geuz.org</a> diff --git a/doc/texinfo/Makefile b/doc/texinfo/Makefile deleted file mode 100644 index ba040fa13508bef93863288ff19fb116bb350210..0000000000000000000000000000000000000000 --- a/doc/texinfo/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../variables - -dvi: - texi2dvi gmsh.texi - -ps: dvi - dvips gmsh -o - -pdf: - texi2pdf gmsh.texi - -html: - perl texi2html -init_file gmsh.t2h gmsh.texi - rm -f index.html - ln -s gmsh.html index.html - -html1: - perl texi2html -prefix gmsh-full -init_file gmsh-full.t2h gmsh.texi - -html2: - makeinfo --html gmsh.texi - -info: - makeinfo gmsh.texi - -install-info: - cp gmsh.info* /usr/info/ - install-info gmsh.info /usr/info/dir - -infoz: info - tar zcvf gmsh-info.tgz gmsh.info* - -txt: - makeinfo --no-headers gmsh.texi -o gmsh.txt - -all: pdf html html1 infoz txt - -clean: - ${RM} *.cp* *.fn* *.ky* *.pg* *.tp* *.vr* *.mv*\ - *.log *.toc *.aux *.dvi *.html *.txt\ - gmsh.ps gmsh.pdf gmsh.info* gmsh-info.tgz - diff --git a/doc/texinfo/README b/doc/texinfo/README deleted file mode 100644 index 32ca72a535fb27bfb94bf6ba9f1eb603d80d1e7d..0000000000000000000000000000000000000000 --- a/doc/texinfo/README +++ /dev/null @@ -1,21 +0,0 @@ - -This directory contains the Texinfo source files for the Gmsh -documentation. Various output formats can be created: - -To produce: Type: Requirements: --------------------------------------------------------------------- -a dvi file (TeX device make dvi TeX, Texinfo -independent file) - -a postscript file make ps TeX, Texinfo, dvips - -a pdf file make pdf pdfTeX, Texinfo - -a collection of html make html Perl -files - -the interactive info make info Texinfo -documentation - -a plain text version of make txt Texinfo -the doc diff --git a/doc/texinfo/epstopdf b/doc/texinfo/epstopdf deleted file mode 100644 index a3874c0aa8aef9817f7bfdf8806a2089cf234f52..0000000000000000000000000000000000000000 --- a/doc/texinfo/epstopdf +++ /dev/null @@ -1,280 +0,0 @@ -#!/usr/local/bin/perl - -# Change by Thomas Esser, Sept. 1998: The above lines allows us to find -# perl along $PATH rather than guessing a fixed location. The above -# construction should work with most shells. - -# A script to transform an EPS file so that: -# a) it is guarenteed to start at the 0,0 coordinate -# b) it sets a page size exactly corresponding to the BoundingBox -# This means that when Ghostscript renders it, the result needs no -# cropping, and the PDF MediaBox is correct. -# c) the result is piped to Ghostscript and a PDF version written -# -# It needs a Level 2 PS interpreter. -# If the bounding box is not right, of course, you have problems... -# -# The only thing I have not allowed for is the case of -# "%%BoundingBox: (atend)", which is more complicated. -# -# Sebastian Rahtz, for Elsevier Science -# -# now with extra tricks from Hans Hagen's texutil. -# -# History -# 1999/05/06 v2.5 (Heiko Oberdiek) -# * New options: --hires, --exact, --filter, --help. -# * Many cosmetics: title, usage, ... -# * New code for debug, warning, error -# * Detecting of cygwin perl -# * Scanning for %%{Hires,Exact,}BoundingBox. -# * Scanning only the header in order not to get a wrong -# BoundingBox of an included file. -# * (atend) supported. -# * uses strict; (earlier error detecting). -# * changed first comment from '%!PS' to '%!'; -# * corrected (atend) pattern: '\s*\(atend\)' -# * using of $bbxpat in all BoundingBox cases, -# correct the first white space to '...Box:\s*$bb...' -# * corrected first line (one line instead of two before 'if 0;'; -# - -### program identification -my $program = "epstopdf"; -my $filedate="1999/05/06"; -my $fileversion="2.5"; -my $copyright = "Copyright 1998,1999 by Sebastian Rahtz et al."; -my $title = "\U$program\E $fileversion, $filedate - $copyright\n"; - -### ghostscript command name -my $GS = "gs"; -$GS = "gswin32c" if $^O eq 'MSWin32'; -$GS = "gswin32c" if $^O =~ /cygwin/; - -### options -$::opt_help=0; -$::opt_debug=0; -$::opt_compress=1; -$::opt_gs=1; -$::opt_hires=0; -$::opt_exact=0; -$::opt_filter=0; -$::opt_outfile=""; - -### usage -my @bool = ("false", "true"); -my $usage = <<"END_OF_USAGE"; -${title}Syntax: $program [options] <eps file> -Options: - --help: print usage - --outfile=<file>: write result to <file> - --(no)filter: read standard input (default: $bool[$::opt_filter]) - --(no)gs: run ghostscript (default: $bool[$::opt_gs]) - --(no)compress: use compression (default: $bool[$::opt_compress]) - --(no)hires: scan HiresBoundingBox (default: $bool[$::opt_hires]) - --(no)exact: scan ExactBoundingBox (default: $bool[$::opt_exact]) - --(no)debug: debug informations (default: $bool[$::opt_debug]) -Examples for producing 'test.pdf': - * $program test.eps - * produce postscript | $program --filter >test.pdf - * produce postscript | $program -f -d -o=test.pdf -Example: look for HiresBoundingBox and produce corrected PostScript: - * $program -d --nogs -hires test.ps>testcorr.ps -END_OF_USAGE - -### process options -use Getopt::Long; -GetOptions ( - "help!", - "debug!", - "filter!", - "compress!", - "gs!", - "hires!", - "exact!", - "outfile=s", -) or die $usage; - -### help functions -sub debug { - print STDERR "* @_\n" if $::opt_debug; -} -sub warning { - print STDERR "==> Warning: @_!\n"; -} -sub error { - die "$title!!! Error: @_!\n"; -} -sub errorUsage { - die "$usage\n!!! Error: @_!\n"; -} - -### option help -die $usage if $::opt_help; - -### get input filename -my $InputFilename = ""; -if ($::opt_filter) { - @ARGV == 0 or - die errorUsage "Input file cannot be used with filter option"; - $InputFilename = "-"; - debug "Input file: standard input"; -} -else { - @ARGV > 0 or die errorUsage "Input filename missing"; - @ARGV < 2 or die errorUsage "Unknown option or too many input files"; - $InputFilename = $ARGV[0]; - -f $InputFilename or error "'$InputFilename' does not exist"; - debug "Input filename:", $InputFilename; -} - -### option compress -my $GSOPTS = ""; -$GSOPTS = "-dUseFlateCompression=false " unless $::opt_compress; - -### option BoundingBox types -my $BBName = "%%BoundingBox:"; -!($::opt_hires and $::opt_exact) or - error "Options --hires and --exact cannot be used together"; -$BBName = "%%HiresBoundingBox:" if $::opt_hires; -$BBName = "%%ExactBoundingBox:" if $::opt_exact; -debug "BoundingBox comment:", $BBName; - -### option outfile -my $OutputFilename = $::opt_outfile; -if ($OutputFilename eq "") { - if ($::opt_gs) { - $OutputFilename = $InputFilename; - if (!$::opt_filter) { - $OutputFilename =~ s/\.[^\.]*$//; - $OutputFilename .= ".pdf"; - } - } - else { - $OutputFilename = "-"; # standard output - } -} -if ($::opt_filter) { - debug "Output file: standard output"; -} -else { - debug "Output filename:", $OutputFilename; -} - -### option gs -if ($::opt_gs) { - debug "Ghostscript command:", $GS; - debug "Compression:", ($::opt_compress) ? "on" : "off"; -} - -### open input file -open(IN,"<$InputFilename") or error "Cannot open", - ($::opt_filter) ? "standard input" : "'$InputFilename'"; -binmode IN; - -### open output file -if ($::opt_gs) { - my $pipe = "$GS -q -sDEVICE=pdfwrite $GSOPTS " . - "-sOutputFile=$OutputFilename - -c quit"; - debug "Ghostscript pipe:", $pipe; - open(OUT,"|$pipe") or error "Cannot open Ghostscript for piped input"; -} -else { - open(OUT,">$OutputFilename") or error "Cannot write '$OutputFilename"; -} - -### scan first line -my $header = 0; -$_ = <IN>; -if (/%!/) { - # throw away binary junk before %! - s/(.*)%!/%!/o; -} -$header = 1 if /^%/; -debug "Scanning header for BoundingBox"; -print OUT; - -### variables and pattern for BoundingBox search -my $bbxpatt = '[0-9eE\.\-]'; - # protect backslashes: "\\" gets '\' -my $BBValues = "\\s*($bbxpatt+)\\s+($bbxpatt+)\\s+($bbxpatt+)\\s+($bbxpatt+)"; -my $BBCorrected = 0; - -sub CorrectBoundingBox { - my ($llx, $lly, $urx, $ury) = @_; - debug "Old BoundingBox:", $llx, $lly, $urx, $ury; - my ($width, $height) = ($urx - $llx, $ury - $lly); - my ($xoffset, $yoffset) = (-$llx, -$lly); - debug "New BoundingBox: 0 0", $width, $height; - debug "Offset:", $xoffset, $yoffset; - - print OUT "%%BoundingBox: 0 0 $width $height\n"; - print OUT "<< /PageSize [$width $height] >> setpagedevice\n"; - print OUT "gsave $xoffset $yoffset translate\n"; -} - -### scan header -if ($header) { - while (<IN>) { - - ### end of header - if (!/^%/ or /^%%EndComments/) { - print OUT; - last; - } - - ### BoundingBox with values - if (/^$BBName$BBValues/) { - CorrectBoundingBox $1, $2, $3, $4; - $BBCorrected = 1; - last; - } - - ### BoundingBox with (atend) - if (/^$BBName\s*\(atend\)/) { - debug $BBName, "(atend)"; - if ($::opt_filter) { - warning "Cannot look for BoundingBox in the trailer", - "with option --filter"; - last; - } - my $pos = tell(IN); - debug "Current file position:", $pos; - - # looking for %%BoundingBox - while (<IN>) { - # skip over included documents - if (/^%%BeginDocument/) { - while (<IN>) { - last if /^%%EndDocument/; - } - } - if (/^$BBName$BBValues/) { - CorrectBoundingBox $1, $2, $3, $4; - $BBCorrected = 1; - last; - } - } - - # go back - seek(IN, $pos, 0) or error "Cannot go back to line '$BBName (atend)'"; - last; - } - - # print header line - print OUT; - } -} - -### print rest of file -while (<IN>) { - print OUT; -} - -### close files -close(IN); -print OUT "grestore\n" if $BBCorrected; -close(OUT); -warning "BoundingBox not found" unless $BBCorrected; -debug "Ready."; -; diff --git a/doc/texinfo/gmsh-full.t2h b/doc/texinfo/gmsh-full.t2h deleted file mode 100644 index eaf00cff3221f524679af1e12e1328379fa7ba1a..0000000000000000000000000000000000000000 --- a/doc/texinfo/gmsh-full.t2h +++ /dev/null @@ -1,4 +0,0 @@ - -# The following can only be set in the init file - -$T2H_INDEX_CHAPTER = 'Concept index'; diff --git a/doc/texinfo/gmsh.t2h b/doc/texinfo/gmsh.t2h deleted file mode 100644 index 476ce80ae3bf7786fa61bba29d7837667bb23ada..0000000000000000000000000000000000000000 --- a/doc/texinfo/gmsh.t2h +++ /dev/null @@ -1,9 +0,0 @@ - -# possible de changer ceci aussi en ligne de commande - -$T2H_SPLIT = 'chapter'; -$T2H_SPLIT_INDEX = 1000; - -# The following can only be set in the init file - -$T2H_INDEX_CHAPTER = 'Concept index'; diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index f361edaaa73929e2fe8669714f743968a62b1534..970a05a5d85446d69ecf07f25e6d92fd0f364d97 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -83,7 +83,9 @@ all copies. @c Table of contents @c ========================================================================= +@ifnothtml @summarycontents +@end ifnothtml @contents @c ========================================================================= @@ -118,7 +120,7 @@ for Gmsh @value{GMSH-VERSION} (@today{}). * File formats:: Input and output file formats * Tutorial:: A step-by-step tutorial * Options:: List of all available options -* Programming notes:: Notes for developers +* Information for developers:: Info for Gmsh developers * Random tips and tricks:: Tips and tricks to make your life easier * Frequently asked questions:: The Gmsh FAQ * Version history:: Changelog @@ -241,11 +243,12 @@ Options * Solver options list:: * Post-processing options list:: -Programming notes +Information for developers -* Main code structure:: +* Getting the source:: +* Source code structure:: * Coding style:: -* Option handling:: +* Adding a new option:: @end detailmenu @end menu @@ -334,34 +337,27 @@ The mesh generation is performed in the same bottom-up flow as the geometry creation: lines are discretized first; the mesh of the lines is then used to mesh the surfaces; then the mesh of the surfaces is used to mesh the volumes. In this process, the mesh of an entity is only -constrained by the mesh of its boundary@footnote{For example, in three -dimensions: - -@itemize @bullet -@item -the triangles discretizing a surface will be forced to be faces of -tetrahedra in the final 3D mesh only if the surface is part of the -boundary of a volume; -@item -the line elements discretizing a curve will be forced to be edges of -tetrahedra in the final 3D mesh only if the curve is part of the -boundary of a surface, itself part of the boundary of a volume; -@item -a single node discretizing a point in the middle of a volume will be -forced to be a vertex of one of the tetrahedra in the final 3D mesh only -if this point is connected to a curve, itself part of the boundary of a -surface, itself part of the boundary of a volume... -@end itemize -}. This automatically assures the conformity of the mesh when, for -example, two surfaces share a common line. But this also implies that -the discretization of an ``isolated'' (@var{n}-1)-th dimensional entity +constrained by the mesh of its boundary. For example, in three +dimensions, the triangles discretizing a surface will be forced to be +faces of tetrahedra in the final 3D mesh only if the surface is part of +the boundary of a volume; the line elements discretizing a curve will be +forced to be edges of tetrahedra in the final 3D mesh only if the curve +is part of the boundary of a surface, itself part of the boundary of a +volume; a single node discretizing a point in the middle of a volume +will be forced to be a vertex of one of the tetrahedra in the final 3D +mesh only if this point is connected to a curve, itself part of the +boundary of a surface, itself part of the boundary of a volume. This +automatically assures the conformity of the mesh when, for example, two +surfaces share a common line. But this also implies that the +discretization of an ``isolated'' (@var{n}-1)-th dimensional entity inside an @var{n}-th dimensional entity does @emph{not} constrain the -@var{n}-th dimensional mesh. Every meshing step is constrained by the -characteristic length field, which can be uniform, specified by -characteristic lengths associated with points in the geometry, or -defined by general ``fields'' (a scalar field defined on another mesh -using post-processing view, threshold fields associated with point or -line ``attractors'', etc.). +@var{n}-th dimensional mesh---unless it is explicitly told to do so +(@pxref{Miscellaneous mesh commands}). Every meshing step is +constrained by the characteristic length field, which can be uniform, +specified by characteristic lengths associated with points in the +geometry, or defined by general ``fields'' (a scalar field defined on +another mesh using post-processing view, threshold fields associated +with point or line ``attractors'', etc.). For each meshing step, all structured mesh directives are executed first, and serve as additional constraints for the unstructured parts @@ -502,8 +498,9 @@ elements). @end itemize If you have the skills and some free time, feel free to join the -project! We gladly accept any code contributions (@pxref{Programming -notes}) to remedy the aforementioned (and all other) shortcomings... +project! We gladly accept any code contributions (@pxref{Information for +developers}) to remedy the aforementioned (and all other) +shortcomings... @c ------------------------------------------------------------------------- @c Bug reports @@ -579,9 +576,9 @@ built: check the `File->Save As' menu for a list of available formats. Finally, to use Gmsh at the third level (i.e., to link the Gmsh library with your own code), you will need to learn the internal Gmsh Application Programming Interface (API). No complete documentation of -this API is available yet; a good starting point is @ref{Programming -notes}, which gives a short introduction to Gmsh's internal source code -structure. Then have a look e.g. at the examples in the +this API is available yet; a good starting point is @ref{Source code +structure}, which gives a short introduction to Gmsh's internal source +code structure. Then have a look e.g. at the examples in the @file{utils/api_demos/} directory in the source code. @c ------------------------------------------------------------------------- @@ -738,9 +735,9 @@ the `Gmsh options' format in `File->Save As'. @cindex Non-interactive mode Gmsh can be run non-interactively in `batch' mode, without -GUI@footnote{If you compile Gmsh without the GUI, i.e., with -@code{./configure --disable-gui}, this is the only mode you have access -to.}. For example, to mesh the first tutorial in batch mode, just type: +GUI@footnote{If you compile Gmsh without the GUI, this is the only mode +you have access to.}. For example, to mesh the first tutorial in batch +mode, just type: @example > gmsh t1.geo -2 @@ -2220,7 +2217,7 @@ Frontal 3 2 1 For very complex curved surfaces the ``MeshAdapt'' algorithm is the best choice. When high element quality is important, the ``Frontal'' algorithm should be tried. For very large meshes of plane surfaces the -``Delaunay'' algorithm is the fatest. +``Delaunay'' algorithm is the fastest. In 3D two unstructured algorithms are available: @@ -2506,7 +2503,7 @@ Selects surfaces to be meshed with the 2D transfinite algorithm. The @var{expression-list} on the right-hand-side should contain the identification numbers of three or four points on the boundary of the surface that define the corners of the transfinite interpolation. If no -identfication numbers are given, the transfinite algorithm will try to +identification numbers are given, the transfinite algorithm will try to find the corners automatically. The optional argument specifies the way the triangles are oriented when the mesh is not recombined. @@ -2515,7 +2512,7 @@ Selects five- or six-face volumes to be meshed with the 3D transfinite algorithm. The @var{expression-list} on the right-hand-side should contain the identification numbers of the six or eight points on the boundary of the volume that define the corners of the transfinite -interpolation. If no identfication numbers are given, the transfinite +interpolation. If no identification numbers are given, the transfinite algorithm will try to find the corners automatically. @end ftable @@ -2530,6 +2527,11 @@ algorithm will try to find the corners automatically. Here is a list of all other mesh commands currently available: @ftable @code +@item Point | Line @{ @var{expression-list} @} In Surface @{ @var{expression} @}; +Embed the point(s) or line(s) in the given surface. The surface mesh +will conform to the mesh of the point(s) or lines(s). Note that embeded +lines only work with the MeshAdapt 2-D algorithm. + @item Coherence Mesh; Removes all duplicate mesh vertices. @@ -2571,7 +2573,7 @@ Shows the mesh of the entity @var{char-expression}, if @item Smoother Surface @{ @var{expression-list} @} = @var{expression}; Sets number of elliptic smoothing steps for the surfaces listed in -@var{expression-list} (smothing only applies to transfinite meshes at +@var{expression-list} (smoothing only applies to transfinite meshes at the moment). @end ftable @@ -3651,7 +3653,7 @@ higher order nodes are assumed to be equispaced on the element. This section describes Gmsh's older native file formats. Future versions of Gmsh will continue to support these formats, but we recommend that -you do not use them in new aplications. +you do not use them in new applications. @c ......................................................................... @c MSH file format version 1.0 @@ -4131,7 +4133,7 @@ system}. Screencasts that show how to use the GUI are available on @c Options @c ========================================================================= -@node Options, Programming notes, Tutorial, Top +@node Options, Information for developers, Tutorial, Top @appendix Options This appendix lists all the available options. Gmsh's default behavior @@ -4207,34 +4209,79 @@ Options' menu. @c The @code{ColorTable} is defined as a list... @c ========================================================================= -@c Programming notes +@c Information for developers @c ========================================================================= -@node Programming notes, Random tips and tricks, Options, Top -@appendix Programming notes +@node Information for developers, Random tips and tricks, Options, Top +@appendix Information for developers +@cindex Developer, information @cindex Programming, notes Gmsh is written in C++, the scripting language is parsed using Lex and Yacc (actually, Flex and Bison), and the GUI relies on OpenGL for the 3D graphics and FLTK (@uref{http://www.fltk.org}) for the widget -set. Gmsh's build system is based on autoconf. Practical notes on how to -compile Gmsh's source code are included in the distribution. See -@ref{Frequently asked questions}, for more information. - +set. Gmsh's build system is based on CMake +(@uref{http://www.cmake.org}). Practical notes on how to compile Gmsh's +source code are included in the distribution. See @ref{Frequently asked +questions}, for more information. @menu -* Main code structure:: +* Getting the source:: +* Source code structure:: * Coding style:: -* Option handling:: +* Adding a new option:: @end menu @c ------------------------------------------------------------------------- -@c Main code structure +@c Getting the source +@c ------------------------------------------------------------------------- + +@node Getting the source, Source code structure, Information for developers, Information for developers +@section Getting the source + +Stable releases and nightly source snapshots are available from +@uref{http://www.geuz.org/gmsh/src/}. + +If you have an account on cvs.geuz.org you can also access the CVS +repository directly: + +@enumerate +@item +Set the variable CVS_RSH to ssh ('export CVS_RSH=ssh' with bash, or +'setenv CVS_RSH ssh' with tcsh) +@item +The first time you want to download the latest full source by CVS, type: + +@example +cvs -d username@@cvs.geuz.org:/cvsroot checkout gmsh +@end example + +where username is your login on cvs.geuz.org +@item +To update your local version to the latest and greatest, go in the gmsh +directory and type: + +@example +cvs update -dPA +@end example + +@item +To commit your changes to the central repository, go in the gmsh +directory and type: + +@example +cvs commit +@end example + +@end enumerate + +@c ------------------------------------------------------------------------- +@c Source code structure @c ------------------------------------------------------------------------- -@node Main code structure, Coding style, Programming notes, Programming notes -@section Main code structure +@node Source code structure, Coding style, Getting the source, Information for developers +@section Source code structure Gmsh's code is structured in several libraries, roughly separated between the three main core modules (@file{Geo}, @file{Mesh}, @@ -4257,7 +4304,7 @@ views (@file{Post/PView.h}) and abstract data containers (derived from @c Coding style @c ------------------------------------------------------------------------- -@node Coding style, Option handling, Main code structure, Programming notes +@node Coding style, Adding a new option, Source code structure, Information for developers @section Coding style If you plan to contribute code to the Gmsh project, here are some easy rules @@ -4276,11 +4323,11 @@ convert all tabs to spaces. @end enumerate @c ------------------------------------------------------------------------- -@c Option handling +@c Adding a new option @c ------------------------------------------------------------------------- -@node Option handling, , Coding style, Programming notes -@section Option handling +@node Adding a new option, , Coding style, Information for developers +@section Adding a new option To add a new option in Gmsh: @@ -4312,11 +4359,110 @@ optional: create the associated widget in @file{Fltk/optionWindow.cpp}; @c * purify @c * memprof + +@c ------------------------------------------------------------------------- +@c Compiling with OpenCASCADE +@c ------------------------------------------------------------------------- + +@c @node Compiling with OpenCASCADE, , Coding style, Information for developers +@c @section Compiling with OpenCASCADE + +@c How to build OpenCascade 6.3 (OCC) for Gmsh: + +@c - Get the source distribution of OCC and unpack it (you only need the +@c "ros" subdirectory). In the following <OpenCascade dir> refers to +@c the directory where OCC is installed (e.g ~/OpenCASCADE6.3.0) + +@c - OS/compiler specific stuff: + +@c * On Windows, use Visual C++ to compile the libraries, or use the +@c precompiled DLLs directly. (The MinGW compiler used to work with +@c OCC 6.2 but do not anymore with 6.3.) + +@c * on Mac OS X unfortunately you cannot build universal libs simply +@c by using "-arch i386 -arch ppc" (the code depends on +@c configure-time endinanness checks). So, first configure and build +@c with + +@c export CFLAGS="-arch i386" +@c export CXXFLAGS="-arch i386" + +@c and then do "make distclean" and configure and build again +@c with + +@c export CFLAGS="-arch ppc" +@c export CXXFLAGS="-arch ppc" + +@c after the install step, use "lipo" to merge both archs, e.g. + +@c lipo -create libi386.a libppc.a -output libuniversal.a + +@c - Go to the <OpenCascade dir>/ros directory and type + +@c ./configure --prefix=/usr/local/opencascade --enable-debug=no +@c --enable-production=yes --enable-static=yes --enable-shared=no +@c --disable-dependency-tracking + +@c - Then go to the <OpenCascade dir>/ros/adm/make/ directory and +@c run "make" in the following subdirectories, e.g. by running the +@c following bash script: + +@c #!/bin/bash +@c for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep +@c TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool +@c TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr +@c TKSTEP209 TKSTEP; do +@c cd $lib && make; cd ..; +@c done + +@c Note that this is the same as doing "make FoundationClasses", "make +@c ModelingData", "make ModelingAlgorithms" and part of "make +@c DataExchange" + +@c - Finally, run this other bash script in the same directory (to install +@c the libraries) + +@c #!/bin/bash +@c for lib in TKernel TKMath TKAdvTools TKG2d TKG3d TKGeomBase TKBRep +@c TKGeomAlgo TKTopAlgo TKPrim TKBO TKHLR TKMesh TKShHealing TKBool +@c TKFillet TKFeat TKOffset TKXSBase TKIGES TKSTEPBase TKSTEPAttr +@c TKSTEP209 TKSTEP; do +@c cd $lib && make install; cd ..; +@c done + +@c and copy config.h and the <OpenCascade dir>/ros/inc/ subdirectory +@c to /usr/local/opencascade (This is the same as a doing a partial +@c 'make install') + +@c OpenCascade is now installed and ready to be used by Gmsh. To compile +@c Gmsh with OpenCascade support: + +@c - Go to the gmsh source directory + +@c - Run "./configure --enable-occ --with-occ-prefix=/usr/local/opencascade" and +@c then "make" + +@c - If you get errors like + +@c undefined reference to `pthread_create' +@c undefined reference to `pthread_detach' +@c ... + +@c edit the "variables" file and add "-pthread" to the OPTIM variable, e.g.: + +@c OPTIM="-g -O2 -pthread" + +@c and run make again + +@c - If compiling is successful then you are done and you can enjoy +@c importing IGES/STEP/BREP files into Gmsh! + + @c ========================================================================= @c Random tips and tricks @c ========================================================================= -@node Random tips and tricks, Frequently asked questions, Programming notes, Top +@node Random tips and tricks, Frequently asked questions, Information for developers, Top @appendix Random tips and tricks @cindex Tips diff --git a/doc/texinfo/opt_mesh.texi b/doc/texinfo/opt_mesh.texi index a135804bee8de65d026b853b056b13ed88cf553d..e1fc4133b365b8d0574cc7197d8bf76626010219 100644 --- a/doc/texinfo/opt_mesh.texi +++ b/doc/texinfo/opt_mesh.texi @@ -414,15 +414,20 @@ Ignore Physical definitions and save all elements@* Default value: @code{0}@* Saved in: @code{-} +@item Mesh.SaveElementTagType +Type of the element tag saved in mesh formats that don't support saving physical or partition ids (1=elementary, 2=physical, 3=partition)@* +Default value: @code{1}@* +Saved in: @code{General.OptionsFileName} + @item Mesh.SaveParametric Save parametric coordinates of nodes@* Default value: @code{0}@* -Saved in: @code{-} +Saved in: @code{General.OptionsFileName} @item Mesh.SaveGroupsOfNodes Save groups of nodes for each physical line and surface (UNV mesh format only)@* Default value: @code{0}@* -Saved in: @code{-} +Saved in: @code{General.OptionsFileName} @item Mesh.ScalingFactor Global scaling factor applied to the saved mesh@* diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi index 4fa743122cd70658bfed5d4f001f83743649bee0..ad85369e7e4c5b85e46d793e74cd197138cfd492 100644 --- a/doc/texinfo/opt_plugin.texi +++ b/doc/texinfo/opt_plugin.texi @@ -15,7 +15,8 @@ the position (`X',`Y'). The string is aligned according to `Align'. If `iView' < 0, the plugin is run on the current view. -Plugin(Annotate) is executed in-place. +Plugin(Annotate) is executed in-place for list-based +datasets or creates a new view for other datasets. String options: @table @code @@ -561,19 +562,19 @@ Default value: @code{"homology.msh"} @end table Numeric options: @table @code -@item 1. Physical group for domain +@item PhysicalGroupForDomain1 Default value: @code{0} -@item 2. Physical group for domain +@item PhysicalGroupForDomain2 Default value: @code{0} -@item 1. Physical group for subdomain +@item PhysicalGroupForSubdomain1 Default value: @code{0} -@item 2. Physical group for subdomain +@item PhysicalGroupForSubdomain2 Default value: @code{0} -@item Compute generators +@item ComputeGenerators Default value: @code{1} -@item Compute thick cuts +@item ComputeThickCuts Default value: @code{0} -@item Omit dimensions +@item OmitDimensions Default value: @code{1} @end table diff --git a/doc/texinfo/texi2html b/doc/texinfo/texi2html deleted file mode 100644 index f695c0a4ccfc2ec9ae3734ab721518946a9b25d7..0000000000000000000000000000000000000000 --- a/doc/texinfo/texi2html +++ /dev/null @@ -1,5497 +0,0 @@ -#! /usr/local/bin/perl -'di '; -'ig 00 '; -#+############################################################################## -# -# texi2html: Program to transform Texinfo documents to HTML -# -# modified for Gmsh -- see 'gmsh' tags -# -# Copyright (C) 1999, 2000 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#-############################################################################## - -# This requires perl version 5 or higher -require 5.0; - -#++############################################################################## -# -# NOTE FOR DEBUGGING THIS SCRIPT: -# You can run 'perl texi2html.pl' directly, provided you have -# the environment variable T2H_HOME set to the directory containing -# the texi2html.init file -# -#--############################################################################## - -# CVS version: -# $Id: texi2html,v 1.8 2007-06-03 19:03:44 geuzaine Exp $ - -# Homepage: -$T2H_HOMEPAGE = <<EOT; -http://www.mathematik.uni-kl.de/~obachman/Texi2html -EOT - -# Authors: -$T2H_AUTHORS = <<EOT; -Written by: Lionel Cons <Lionel.Cons\@cern.ch> (original author) - Karl Berry <karl\@freefriends.org> - Olaf Bachmann <obachman\@mathematik.uni-kl.de> - and many others. -Maintained by: Olaf Bachmann <obachman\@mathematik.uni-kl.de> -Send bugs and suggestions to <texi2html\@mathematik.uni-kl.de> -EOT - -# Version: set in configure.in -$THISVERSION = '1.65'; -$THISPROG = "texi2html $THISVERSION"; # program name and version - -# The man page for this program is included at the end of this file and can be -# viewed using the command 'nroff -man texi2html'. - -# Identity: - -$T2H_TODAY = &pretty_date; # like "20 September 1993" -# the eval prevents this from breaking on system which do not have -# a proper getpwuid implemented -eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i - -#+++############################################################################ -# # -# Initialization # -# Pasted content of File $(srcdir)/texi2html.init: Default initializations # -# # -#---############################################################################ - -# leave this within comments, and keep the require statement -# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init -# exists. - -# -# -*-perl-*- -###################################################################### -# File: texi2html.init -# -# Sets default values for command-line arguments and for various customizable -# procedures -# -# A copy of this file is pasted into the beginning of texi2html by -# 'make texi2html' -# -# Copy this file and make changes to it, if you like. -# Afterwards, either, load it with command-line option -init_file <your_init_file> -# -# $Id: texi2html,v 1.8 2007-06-03 19:03:44 geuzaine Exp $ - -###################################################################### -# stuff which can also be set by command-line options -# -# -# Note: values set here, overwrite values set by the command-line -# options before -init_file and might still be overwritten by -# command-line arguments following the -init_file option -# - -# T2H_OPTIONS is a hash whose keys are the (long) names of valid -# command-line options and whose values are a hash with the following keys: -# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info) -# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info) -# verbose ==> short description of option (displayed by -h) -# noHelp ==> if 1 -> for "not so important options": only print description on -h 1 -# 2 -> for obsolete options: only print description on -h 2 - -$T2H_DEBUG = 0; -$T2H_OPTIONS -> {debug} = -{ - type => '=i', - linkage => \$main::T2H_DEBUG, - verbose => 'output HTML with debuging information', -}; - -$T2H_DOCTYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'; -$T2H_OPTIONS -> {doctype} = -{ - type => '=s', - linkage => \$main::T2H_DOCTYPE, - verbose => 'document type which is output in header of HTML files', - noHelp => 1 -}; - -$T2H_CHECK = 0; -$T2H_OPTIONS -> {check} = -{ - type => '!', - linkage => \$main::T2H_CHECK, - verbose => 'if set, only check files and output all things that may be Texinfo commands', - noHelp => 1 -}; - -# -expand -# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections -# else, neither expand @iftex, @tex, nor @ifinfo sections -$T2H_EXPAND = "info"; -$T2H_OPTIONS -> {expand} = -{ - type => '=s', - linkage => \$T2H_EXPAND, - verbose => 'Expand info|tex|none section of texinfo source', -}; - -# - glossary -#if set, uses section named `Footnotes' for glossary -$T2H_USE_GLOSSARY = 0; -T2H_OPTIONS -> {glossary} = -{ - type => '!', - linkage => \$T2H_USE_GLOSSARY, - verbose => "if set, uses section named `Footnotes' for glossary", - noHelp => 1, -}; - - -# -invisible -# $T2H_INVISIBLE_MARK is the text used to create invisible destination -# anchors for index links (you can for instance use the invisible.xbm -# file shipped with this program). This is a workaround for a known -# bug of many WWW browsers, including netscape. -# For me, it works fine without it -- on the contrary: if there, it -# inserts space between headers and start of text (obachman 3/99) -$T2H_INVISIBLE_MARK = ''; -# $T2H_INVISIBLE_MARK = ' '; -$T2H_OPTIONS -> {invisible} = -{ - type => '=s', - linkage => \$T2H_INVISIBLE_MARK, - verbose => 'use text in invisble anchot', - noHelp => 1, -}; - -# -iso -# if set, ISO8859 characters are used for special symbols (like copyright, etc) -$T2H_USE_ISO = 0; -$T2H_OPTIONS -> {iso} = -{ - type => 'iso', - linkage => \$T2H_USE_ISO, - verbose => 'if set, ISO8859 characters are used for special symbols (like copyright, etc)', - noHelp => 1, -}; - -# -I -# list directories where @include files are searched for (besides the -# directory of the doc file) additional '-I' args add to this list -@T2H_INCLUDE_DIRS = ("."); -$T2H_OPTIONS -> {I} = -{ - type => '=s', - linkage => \@T2H_INCLUDE_DIRS, - verbose => 'append $s to the @include search path', -}; - -# -top_file -# uses file of this name for top-level file -# extension is manipulated appropriately, if necessary. -# If empty, <basename of document>.html is used -# Typically, you would set this to "index.html". -$T2H_TOP_FILE = ''; -$T2H_OPTIONS -> {top_file} = -{ - type => '=s', - linkage => \$T2H_TOP_FILE, - verbose => 'use $s as top file, instead of <docname>.html', -}; - - -# -toc_file -# uses file of this name for table of contents file -# extension is manipulated appropriately, if necessary. -# If empty, <basename of document>_toc.html is used -$T2H_TOC_FILE = ''; -$T2H_OPTIONS -> {toc_file} = -{ - type => '=s', - linkage => \$T2H_TOC_FILE, - verbose => 'use $s as ToC file, instead of <docname>_toc.html', -}; - -# -frames -# if set, output two additional files which use HTML 4.0 "frames". -$T2H_FRAMES = 0; -$T2H_OPTIONS -> {frames} = -{ - type => '!', - linkage => \$T2H_FRAMES, - verbose => 'output files which use HTML 4.0 frames (experimental)', - noHelp => 1, -}; - - -# -menu | -nomenu -# if set, show the Texinfo menus -$T2H_SHOW_MENU = 1; -$T2H_OPTIONS -> {menu} = -{ - type => '!', - linkage => \$T2H_SHOW_MENU, - verbose => 'ouput Texinfo menus', -}; - -# -number | -nonumber -# if set, number sections and show section names and numbers in references -# and menus -$T2H_NUMBER_SECTIONS = 1; -$T2H_OPTIONS -> {number} = -{ - type => '!', - linkage => \$T2H_NUMBER_SECTIONS, - verbose => 'use numbered sections' -}; - -# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu -# entries, instead of section names -$T2H_NODE_NAME_IN_MENU = 0; - -# if set and menu entry equals menu descr, then do not print menu descr. -# Likewise, if node name equals entry name, do not print entry name. -$T2H_AVOID_MENU_REDUNDANCY = 1; - -# -split section|chapter|none -# if set to 'section' (resp. 'chapter') create one html file per (sub)section -# (resp. chapter) and separate pages for Top, ToC, Overview, Index, -# Glossary, About. -# otherwise, create monolithic html file which contains whole document -#$T2H_SPLIT = 'section'; -$T2H_SPLIT = ''; -$T2H_OPTIONS -> {split} = -{ - type => '=s', - linkage => \$T2H_SPLIT, - verbose => 'split document on section|chapter else no splitting', -}; - -# -section_navigation|-no-section_navigation -# if set, then navigation panels are printed at the beginning of each section -# and, possibly at the end (depending on whether or not there were more than -# $T2H_WORDS_IN_PAGE words on page -# This is most useful if you do not want to have section navigation -# on -split chapter -$T2H_SECTION_NAVIGATION = 1; -$T2H_OPTIONS -> {sec_nav} = -{ - type => '!', - linkage => \$T2H_SECTION_NAVIGATION, - verbose => 'output navigation panels for each section', -}; - -# -subdir -# if set put result files in this directory -# if not set result files are put into current directory -#$T2H_SUBDIR = 'html'; -$T2H_SUBDIR = ''; -$T2H_OPTIONS -> {subdir} = -{ - type => '=s', - linkage => \$T2H_SUBDIR, - verbose => 'put HTML files in directory $s, instead of $cwd', -}; - -# -short_extn -# If this is set all HTML file will have extension ".htm" instead of -# ".html". This is helpful when shipping the document to PC systems. -$T2H_SHORTEXTN = 0; -$T2H_OPTIONS -> {short_ext} = -{ - type => '!', - linkage => \$T2H_SHORTEXTN, - verbose => 'use "htm" extension for output HTML files', -}; - - -# -prefix -# Set the output file prefix, prepended to all .html, .gif and .pl files. -# By default, this is the basename of the document -$T2H_PREFIX = ''; -$T2H_OPTIONS -> {prefix} = -{ - type => '=s', - linkage => \$T2H_PREFIX, - verbose => 'use as prefix for output files, instead of <docname>', -}; - -# -o filename -# If set, generate monolithic document output html into $filename -$T2H_OUT = ''; -$T2H_OPTIONS -> {out_file} = -{ - type => '=s', - linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, - verbose => 'if set, all HTML output goes into file $s', -}; - -# -short_ref -#if set cross-references are given without section numbers -$T2H_SHORT_REF = ''; -$T2H_OPTIONS -> {short_ref} = -{ - type => '!', - linkage => \$T2H_SHORT_REF, - verbose => 'if set, references are without section numbers', -}; - -# -idx_sum -# if value is set, then for each @prinindex $what -# $docu_name_$what.idx is created which contains lines of the form -# $key\t$ref sorted alphabetically (case matters) -$T2H_IDX_SUMMARY = 0; -$T2H_OPTIONS -> {idx_sum} = -{ - type => '!', - linkage => \$T2H_IDX_SUMMARY, - verbose => 'if set, also output index summary', - noHelp => 1, -}; - -# -def_table -# Use a table construction for @def .... stuff instead -# New Option: 27.07.2000 Karl Heinz Marbaise -$T2H_DEF_TABLE = 0; -$T2H_OPTIONS -> {def_table} = -{ - type => '!', - linkage => \$T2H_DEF_TABLE, - verbose => 'if set, \@def.. are converted using tables.', - noHelp => 1, -}; - -# -verbose -# if set, chatter about what we are doing -$T2H_VERBOSE = ''; -$T2H_OPTIONS -> {Verbose} = -{ - type => '!', - linkage => \$T2H_VERBOSE, - verbose => 'print progress info to stdout', -}; - -# -lang -# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title. -# To add a new language, supply list of titles (see $T2H_WORDS below). -# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02 -# for definitions) -# Default's to 'en' if not set or no @documentlanguage is specified -$T2H_LANG = ''; -$T2H_OPTIONS -> {lang} = -{ - type => '=s', - linkage => sub {SetDocumentLanguage($_[1])}, - verbose => 'use $s as document language (ISO 639 encoding)', -}; - -# -l2h -# if set, uses latex2html for generation of math content -$T2H_L2H = ''; -$T2H_OPTIONS -> {l2h} = -{ - type => '!', - linkage => \$T2H_L2H, - verbose => 'if set, uses latex2html for @math and @tex', -}; - -###################### -# The following options are only relevant if $T2H_L2H is set -# -# -l2h_l2h -# name/location of latex2html progam -$T2H_L2H_L2H = "latex2html"; -$T2H_OPTIONS -> {l2h_l2h} = -{ - type => '=s', - linkage => \$T2H_L2H_L2H, - verbose => 'program to use for latex2html translation', - noHelp => 1, -}; - -# -l2h_skip -# if set, skips actual call to latex2html tries to reuse previously generated -# content, instead -$T2H_L2H_SKIP = ''; -$T2H_OPTIONS -> {l2h_skip} = -{ - type => '!', - linkage => \$T2H_L2H_SKIP, - verbose => 'if set, tries to reuse previously latex2html output', - noHelp => 1, -}; - -# -l2h_tmp -# if set, l2h uses this directory for temporarary files. The path -# leading to this directory may not contain a dot (i.e., a "."), -# otherwise, l2h will fail -$T2H_L2H_TMP = ''; -$T2H_OPTIONS -> {l2h_tmp} = -{ - type => '=s', - linkage => \$T2H_L2H_TMP, - verbose => 'if set, uses $s as temporary latex2html directory', - noHelp => 1, -}; - -# if set, cleans intermediate files (they all have the prefix $doc_l2h_) -# of l2h -$T2H_L2H_CLEAN = 1; -$T2H_OPTIONS -> {l2h_clean} = -{ - type => '!', - linkage => \$T2H_L2H_CLEAN, - verbose => 'if set, do not keep intermediate latex2html files for later reuse', - noHelp => 1, -}; - -$T2H_OPTIONS -> {D} = -{ - type => '=s', - linkage => sub {$main::value{@_[1]} = 1;}, - verbose => 'equivalent to Texinfo "@set $s 1"', - noHelp => 1, -}; - -$T2H_OPTIONS -> {init_file} = -{ - type => '=s', - linkage => \&LoadInitFile, - verbose => 'load init file $s' -}; - - -############################################################################## -# -# The following can only be set in the init file -# -############################################################################## - -# if set, center @image by default -# otherwise, do not center by default -$T2H_CENTER_IMAGE = 1; - -# used as identation for block enclosing command @example, etc -# If not empty, must be enclosed in <td></td> -$T2H_EXAMPLE_INDENT_CELL = '<td> </td>'; -# same as above, only for @small -$T2H_SMALL_EXAMPLE_INDENT_CELL = '<td> </td>'; -# font size for @small -$T2H_SMALL_FONT_SIZE = '-1'; - -# if non-empty, and no @..heading appeared in Top node, then -# use this as header for top node/section, otherwise use value of -# @settitle or @shorttitle (in that order) -$T2H_TOP_HEADING = ''; - -# if set, use this chapter for 'Index' button, else -# use first chapter whose name matches 'index' (case insensitive) -$T2H_INDEX_CHAPTER = ''; - -# if set and $T2H_SPLIT is set, then split index pages at the next letter -# after they have more than that many entries -$T2H_SPLIT_INDEX = 100; - -# if set (e.g., to index.html) replace hrefs to this file -# (i.e., to index.html) by ./ -$T2H_HREF_DIR_INSTEAD_FILE = ''; - -######################################################################## -# Language dependencies: -# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash -# To redefine one word, simply do: -# $T2H_WORDS->{<language>}->{<word>} = 'whatever' in your personal init file. -# -$T2H_WORDS_EN = -{ - # titles of pages - 'ToC_Title' => 'Table of Contents', - 'Overview_Title' => 'Short Table of Contents', - 'Index_Title' => 'Index', - 'About_Title' => 'About this document', - 'Footnotes_Title' => 'Footnotes', - 'See' => 'See', - 'see' => 'see', - 'section' => 'section', -# If necessary, we could extend this as follows: -# # text for buttons -# 'Top_Button' => 'Top', -# 'ToC_Button' => 'Contents', -# 'Overview_Button' => 'Overview', -# 'Index_button' => 'Index', -# 'Back_Button' => 'Back', -# 'FastBack_Button' => 'FastBack', -# 'Prev_Button' => 'Prev', -# 'Up_Button' => 'Up', -# 'Next_Button' => 'Next', -# 'Forward_Button' =>'Forward', -# 'FastWorward_Button' => 'FastForward', -# 'First_Button' => 'First', -# 'Last_Button' => 'Last', -# 'About_Button' => 'About' -}; - -$T2H_WORD_DE = -{ - 'ToC_Title' => 'Inhaltsverzeichniss', - 'Overview_Title' => 'Kurzes Inhaltsverzeichniss', - 'Index_Title' => 'Index', - 'About_Title' => 'Über dieses Dokument', - 'Footnotes_Title' => 'Fußnoten', - 'See' => 'Siehe', - 'see' => 'siehe', - 'section' => 'Abschnitt', -}; - -$T2H_WORD_NL = -{ - 'ToC_Title' => 'Inhoudsopgave', - 'Overview_Title' => 'Korte inhoudsopgave', - 'Index_Title' => 'Index', #Not sure ;-) - 'About_Title' => 'No translation available!', #No translation available! - 'Footnotes_Title' => 'No translation available!', #No translation available! - 'See' => 'Zie', - 'see' => 'zie', - 'section' => 'sectie', -}; - -$T2H_WORD_ES = -{ - 'ToC_Title' => 'índice General', - 'Overview_Title' => 'Resumen del Contenido', - 'Index_Title' => 'Index', #Not sure ;-) - 'About_Title' => 'No translation available!', #No translation available! - 'Footnotes_Title' => 'Fußnoten', - 'See' => 'Véase', - 'see' => 'véase', - 'section' => 'sección', -}; - -$T2H_WORD_NO = -{ - 'ToC_Title' => 'Innholdsfortegnelse', - 'Overview_Title' => 'Kort innholdsfortegnelse', - 'Index_Title' => 'Indeks', #Not sure ;-) - 'About_Title' => 'No translation available!', #No translation available! - 'Footnotes_Title' => 'No translation available!', - 'See' => 'Se', - 'see' => 'se', - 'section' => 'avsnitt', -}; - -$T2H_WORD_PT = -{ - 'ToC_Title' => 'Sumário', - 'Overview_Title' => 'Breve Sumário', - 'Index_Title' => 'Índice', #Not sure ;-) - 'About_Title' => 'No translation available!', #No translation available! - 'Footnotes_Title' => 'No translation available!', - 'See' => 'Veja', - 'see' => 'veja', - 'section' => 'Seção', -}; - -$T2H_WORDS = -{ - 'en' => $T2H_WORDS_EN, - 'de' => $T2H_WORDS_DE, - 'nl' => $T2H_WORDS_NL, - 'es' => $T2H_WORDS_ES, - 'no' => $T2H_WORDS_NO, - 'pt' => $T2H_WORDS_PT -}; - -@MONTH_NAMES_EN = -( - 'January', 'February', 'March', 'April', 'May', - 'June', 'July', 'August', 'September', 'October', - 'November', 'December' -); - -@MONTH_NAMES_DE = -( - 'Januar', 'Februar', 'März', 'April', 'Mai', - 'Juni', 'Juli', 'August', 'September', 'Oktober', - 'November', 'Dezember' -); - -@MONTH_NAMES_NL = -( - 'Januari', 'Februari', 'Maart', 'April', 'Mei', - 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', - 'November', 'December' -); - -@MONTH_NAMES_ES = -( - 'enero', 'febrero', 'marzo', 'abril', 'mayo', - 'junio', 'julio', 'agosto', 'septiembre', 'octubre', - 'noviembre', 'diciembre' -); - -@MONTH_NAMES_NO = -( - - 'januar', 'februar', 'mars', 'april', 'mai', - 'juni', 'juli', 'august', 'september', 'oktober', - 'november', 'desember' -); - -@MONTH_NAMES_PT = -( - 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', - 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', - 'Novembro', 'Dezembro' -); - - -$MONTH_NAMES = -{ - 'en' => \@MONTH_NAMES_EN, - 'de' => \@MONTH_NAMES_DE, - 'es' => \@MONTH_NAMES_ES, - 'nl' => \@MONTH_NAMES_NL, - 'no' => \@MONTH_NAMES_NO, - 'pt' => \@MONTH_NAMES_PT -}; -######################################################################## -# Control of Page layout: -# You can make changes of the Page layout at two levels: -# 1.) For small changes, it is often enough to change the value of -# some global string/hash/array variables -# 2.) For larger changes, reimplement one of the T2H_DEFAULT_<fnc>* routines, -# give them another name, and assign them to the respective -# $T2H_<fnc> variable. - -# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold -# href, html-name, node-name of -# This -- current section (resp. html page) -# Top -- top page ($T2H_TOP_FILE) -# Contents -- Table of contents -# Overview -- Short table of contents -# Index -- Index page -# About -- page which explain "navigation buttons" -# First -- first node -# Last -- last node -# -# Whether or not the following hash values are set, depends on the context -# (all values are w.r.t. 'This' section) -# Next -- next node of texinfo -# Prev -- previous node of texinfo -# Up -- up node of texinfo -# Forward -- next node in reading order -# Back -- previous node in reading order -# FastForward -- if leave node, up and next, else next node -# FastBackward-- if leave node, up and prev, else prev node -# -# Furthermore, the following global variabels are set: -# $T2H_THISDOC{title} -- title as set by @setttile -# $T2H_THISDOC{fulltitle} -- full title as set by @title... -# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle -# $T2H_THISDOC{author} -- author as set by @author -# -# and pointer to arrays of lines which need to be printed by t2h_print_lines -# $T2H_OVERVIEW -- lines of short table of contents -# $T2H_TOC -- lines of table of contents -# $T2H_TOP -- lines of Top texinfo node -# $T2H_THIS_SECTION -- lines of 'This' section - -# -# There are the following subs which control the layout: -# -$T2H_print_section = \&T2H_DEFAULT_print_section; -$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header; -$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer; -$T2H_print_Top = \&T2H_DEFAULT_print_Top; -$T2H_print_Toc = \&T2H_DEFAULT_print_Toc; -$T2H_print_Overview = \&T2H_DEFAULT_print_Overview; -$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes; -$T2H_print_About = \&T2H_DEFAULT_print_About; -$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header; -$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer; -$T2H_print_misc = \&T2H_DEFAULT_print_misc; -$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header; -$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer; -$T2H_print_page_head = \&T2H_DEFAULT_print_page_head; -$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot; -$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation; -$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation; -$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img; -$T2H_print_navigation = \&T2H_DEFAULT_print_navigation; -$T2H_about_body = \&T2H_DEFAULT_about_body; -$T2H_print_frame = \&T2H_DEFAULT_print_frame; -$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame; - -######################################################################## -# Layout for html for every sections -# -sub T2H_DEFAULT_print_section -{ - my $fh = shift; - local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS; - &$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION; - my $nw = t2h_print_lines($fh); - if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION) - { - &$T2H_print_foot_navigation($fh, $nw); - } - else - { - print $fh '<HR SIZE="6">' . "\n"; - } -} - -################################################################### -# Layout of top-page I recommend that you use @ifnothtml, @ifhtml, -# @html within the Top texinfo node to specify content of top-level -# page. -# -# If you enclose everything in @ifnothtml, then title, subtitle, -# author and overview is printed -# T2H_HREF of Next, Prev, Up, Forward, Back are not defined -# if $T2H_SPLIT then Top page is in its own html file -sub T2H_DEFAULT_print_Top_header -{ - &$T2H_print_page_head(@_) if $T2H_SPLIT; - t2h_print_label(@_); # this needs to be called, otherwise no label set - &$T2H_print_head_navigation(@_); -} -sub T2H_DEFAULT_print_Top_footer -{ - &$T2H_print_foot_navigation(@_); - &$T2H_print_page_foot(@_) if $T2H_SPLIT; -} -sub T2H_DEFAULT_print_Top -{ - my $fh = shift; - - # for redefining navigation buttons use: - # local $T2H_BUTTONS = [...]; - # as it is, 'Top', 'Contents', 'Index', 'About' are printed - local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; - &$T2H_print_Top_header($fh); - if ($T2H_THIS_SECTION) - { - # if top-level node has content, then print it with extra header - print $fh "<H1>$T2H_NAME{Top}</H1>" - unless ($T2H_HAS_TOP_HEADING); - t2h_print_lines($fh, $T2H_THIS_SECTION) - } - else - { - # top-level node is fully enclosed in @ifnothtml - # print fulltitle, subtitle, author, Overview - print $fh - "<CENTER>\n<H1>" . - join("</H1>\n<H1>", split(/\n/, $T2H_THISDOC{fulltitle})) . - "</H1>\n"; - print $fh "<H2>$T2H_THISDOC{subtitle}</H2>\n" if $T2H_THISDOC{subtitle}; - print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author}; - print $fh <<EOT; -</CENTER> -<HR> -<P></P> -<H2> Overview: </H2> -<BLOCKQUOTE> -EOT - t2h_print_lines($fh, $T2H_OVERVIEW); - print $fh "</BLOCKQUOTE>\n"; - } - &$T2H_print_Top_footer($fh); -} - -################################################################### -# Layout of Toc, Overview, and Footnotes pages -# By default, we use "normal" layout -# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined -# use: local $T2H_BUTTONS = [...] to redefine navigation buttons -sub T2H_DEFAULT_print_Toc -{ - return &$T2H_print_misc(@_); -} -sub T2H_DEFAULT_print_Overview -{ - return &$T2H_print_misc(@_); -} -sub T2H_DEFAULT_print_Footnotes -{ - return &$T2H_print_misc(@_); -} -sub T2H_DEFAULT_print_About -{ - return &$T2H_print_misc(@_); -} - -sub T2H_DEFAULT_print_misc_header -{ - &$T2H_print_page_head(@_) if $T2H_SPLIT; - # this needs to be called, otherwise, no labels are set - t2h_print_label(@_); - &$T2H_print_head_navigation(@_); -} -sub T2H_DEFAULT_print_misc_footer -{ - &$T2H_print_foot_navigation(@_); - &$T2H_print_page_foot(@_) if $T2H_SPLIT; -} -sub T2H_DEFAULT_print_misc -{ - my $fh = shift; - local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; - &$T2H_print_misc_header($fh); - print $fh "<H1>$T2H_NAME{This}</H1>\n"; - t2h_print_lines($fh); - &$T2H_print_misc_footer($fh); -} - -################################################################### -# chapter_header and chapter_footer are only called if -# T2H_SPLIT eq 'chapter' -# chapter_header: after print_page_header, before print_section -# chapter_footer: after print_section of last section, before print_page_footer -# -# If you want to get rid of navigation stuff after each section, -# redefine print_section such that it does not call print_navigation, -# and put print_navigation into print_chapter_header -@T2H_CHAPTER_BUTTONS = - ( - 'FastBack', 'FastForward', ' ', - ' ', ' ', ' ', ' ', - 'Top', 'Contents', 'Index', 'About', - ); - -sub T2H_DEFAULT_print_chapter_header -{ - # nothing to do there, by default - if (! $T2H_SECTION_NAVIGATION) - { - my $fh = shift; - local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; - &$T2H_print_navigation($fh); - print $fh "\n<HR SIZE=2>\n"; - } -} - -sub T2H_DEFAULT_print_chapter_footer -{ - local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; - &$T2H_print_navigation(@_); -} -################################################################### -$T2H_TODAY = &pretty_date; # like "20 September 1993" - -sub pretty_date { - local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); - - ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); - $year += ($year < 70) ? 2000 : 1900; - # obachman: Let's do it as the Americans do - return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year); -} - - -################################################################### -# Layout of standard header and footer -# - -# Set the default body text, inserted between <BODY ... > -$T2H_BODYTEXT = ''; -# text inserted after <BODY ...> -$T2H_AFTER_BODY_OPEN = ''; -#text inserted before </BODY> -$T2H_PRE_BODY_CLOSE = 'Back to <a href="http://www.geuz.org">geuz.org</a>/<a href="http://www.geuz.org/gmsh/">gmsh</a>'; -# this is used in footer -$T2H_ADDRESS = "by <I>$T2H_USER</I> " if $T2H_USER; -$T2H_ADDRESS .= "on <I>$T2H_TODAY</I>"; -# this is added inside <HEAD></HEAD> after <TITLE> and some META NAME stuff -# can be used for <style> <script>, <meta> tags -$T2H_EXTRA_HEAD = '<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">'; -$T2H_EXTRA_HEAD .= '<LINK href="/general.css" rel="stylesheet" type="text/css">'; - -sub T2H_DEFAULT_print_page_head -{ - my $fh = shift; - my $longtitle = "$T2H_THISDOC{title}: $T2H_NAME{This}"; - print $fh <<EOT; -$T2H_DOCTYPE -<HTML> -<!-- Created on $T2H_TODAY by $THISPROG --> -<!-- -$T2H_AUTHORS ---> -<HEAD> -<TITLE>$longtitle</TITLE> - -<META NAME="description" CONTENT="$longtitle"> -<META NAME="keywords" CONTENT="$longtitle"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<META NAME="Generator" CONTENT="$THISPROG"> -$T2H_EXTRA_HEAD -</HEAD> - -<BODY $T2H_BODYTEXT> -$T2H_AFTER_BODY_OPEN -EOT -} - -sub T2H_DEFAULT_print_page_foot -{ - my $fh = shift; - print $fh <<EOT; -<BR> -$T2H_PRE_BODY_CLOSE -</BODY> -</HTML> -EOT -} - -################################################################### -# Layout of navigation panel - -# if this is set, then a vertical navigation panel is used -$T2H_VERTICAL_HEAD_NAVIGATION = 0; -sub T2H_DEFAULT_print_head_navigation -{ - my $fh = shift; - if ($T2H_VERTICAL_HEAD_NAVIGATION) - { - print $fh <<EOT; -<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0"> -<TR VALIGN="TOP"> -<TD ALIGN="LEFT"> -EOT - } - &$T2H_print_navigation($fh, $T2H_VERTICAL_HEAD_NAVIGATION); - if ($T2H_VERTICAL_HEAD_NAVIGATION) - { - print $fh <<EOT; -</TD> -<TD ALIGN="LEFT"> -EOT - } - elsif ($T2H_SPLIT eq 'section') - { - print $fh "<HR SIZE=1>\n"; - } -} - -# Specifies the minimum page length required before a navigation panel -# is placed at the bottom of a page (the default is that of latex2html) -# T2H_THIS_WORDS_IN_PAGE holds number of words of current page -$T2H_WORDS_IN_PAGE = 300; -sub T2H_DEFAULT_print_foot_navigation -{ - my $fh = shift; - my $nwords = shift; - if ($T2H_VERTICAL_HEAD_NAVIGATION) - { - print $fh <<EOT; -</TD> -</TR> -</TABLE> -EOT - } - print $fh "<HR SIZE=1>\n"; - &$T2H_print_navigation($fh) if ($nwords >= $T2H_WORDS_IN_PAGE) -} - -###################################################################### -# navigation panel -# -# specify in this array which "buttons" should appear in which order -# in the navigation panel for sections; use ' ' for empty buttons (space) -@T2H_SECTION_BUTTONS = - ( - 'Back', 'Forward', ' ', 'FastBack', 'Up', 'FastForward', - ' ', ' ', ' ', ' ', - 'Top', 'Contents', 'Index', 'About', - ); - -# buttons for misc stuff -@T2H_MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About'); - -# insert here name of icon images for buttons -# Icons are used, if $T2H_ICONS and resp. value are set -%T2H_ACTIVE_ICONS = - ( - 'Top', '', - 'Contents', '', - 'Overview', '', - 'Index', '', - 'Back', '', - 'FastBack', '', - 'Prev', '', - 'Up', '', - 'Next', '', - 'Forward', '', - 'FastForward', '', - 'About' , '', - 'First', '', - 'Last', '', - ' ', '' - ); - -# insert here name of icon images for these, if button is inactive -%T2H_PASSIVE_ICONS = - ( - 'Top', '', - 'Contents', '', - 'Overview', '', - 'Index', '', - 'Back', '', - 'FastBack', '', - 'Prev', '', - 'Up', '', - 'Next', '', - 'Forward', '', - 'FastForward', '', - 'About', '', - 'First', '', - 'Last', '', - ); - -# how to create IMG tag -sub T2H_DEFAULT_button_icon_img -{ - my $button = shift; - my $icon = shift; - my $name = shift; - return qq{<IMG SRC="$icon" BORDER="0" ALT="$button: $name" ALIGN="MIDDLE">}; -} - -# Names of text as alternative for icons -%T2H_NAVIGATION_TEXT = - ( - 'Top', 'Top', - 'Contents', 'Contents', - 'Overview', 'Overview', - 'Index', 'Index', - ' ', ' ', - 'Back', ' < ', - 'FastBack', ' << ', - 'Prev', 'Prev', - 'Up', ' Up ', - 'Next', 'Next', - 'Forward', ' > ', - 'FastForward', ' >> ', - 'About', ' ? ', - 'First', ' |< ', - 'Last', ' >| ' - ); - -sub T2H_DEFAULT_print_navigation -{ - my $fh = shift; - my $vertical = shift; - my $spacing = 1; - print $fh "<TABLE CELLPADDING=$spacing CELLSPACING=$spacing BORDER=0>\n"; - - print $fh "<TR>" unless $vertical; - for $button (@$T2H_BUTTONS) - { - print $fh qq{<TR VALIGN="TOP" ALIGN="LEFT">\n} if $vertical; - print $fh qq{<TD VALIGN="MIDDLE" ALIGN="LEFT">}; - - if (ref($button) eq 'CODE') - { - &$button($fh, $vertical); - } - elsif ($button eq ' ') - { # handle space button - print $fh - $T2H_ICONS && $T2H_ACTIVE_ICONS{' '} ? - &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{' '}) : - $T2H_NAVIGATION_TEXT{' '}; - next; - } - elsif ($T2H_HREF{$button}) - { # button is active - print $fh - $T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? # use icon ? - t2h_anchor('', $T2H_HREF{$button}, # yes - &$T2H_button_icon_img($button, - $T2H_ACTIVE_ICONS{$button}, - $T2H_NAME{$button})) - : # use text - "[" . - t2h_anchor('', $T2H_HREF{$button}, $T2H_NAVIGATION_TEXT{$button}) . - "]"; - } - else - { # button is passive - print $fh - $T2H_ICONS && $T2H_PASSIVE_ICONS{$button} ? - &$T2H_button_icon_img($button, - $T2H_PASSIVE_ICONS{$button}, - $T2H_NAME{$button}) : - - "[" . $T2H_NAVIGATION_TEXT{$button} . "]"; - } - print $fh "</TD>\n"; - print $fh "</TR>\n" if $vertical; - } - print $fh "</TR>" unless $vertical; - print $fh "</TABLE>\n"; -} - -###################################################################### -# Frames: this is from "Richard Y. Kim" <ryk@coho.net> -# Should be improved to be more conforming to other _print* functions - -sub T2H_DEFAULT_print_frame -{ - my $fh = shift; - print $fh <<EOT; -<HTML> -<HEAD><TITLE>$T2H_THISDOC{title}</TITLE></HEAD> -<FRAMESET cols="140,*"> - <FRAME name=toc src="$docu_toc_frame_file"> - <FRAME name=main src="$docu_doc"> -</FRAMESET> -</HTML> -EOT -} - -sub T2H_DEFAULT_print_toc_frame -{ - my $fh = shift; - &$T2H_print_page_head($fh); - print $fh <<EOT; -<H2>Content</H2> -EOT - print $fh map {s/HREF=/target=\"main\" HREF=/; $_;} @stoc_lines; - print $fh "</BODY></HTML>\n"; -} - -###################################################################### -# About page -# - -# T2H_PRE_ABOUT might be a function -$T2H_PRE_ABOUT = <<EOT; -This document was generated $T2H_ADDRESS -using <A HREF="$T2H_HOMEPAGE"><I>texi2html</I></A> -<P></P> -EOT -$T2H_AFTER_ABOUT = ''; - -sub T2H_DEFAULT_about_body -{ - my $about; - if (ref($T2H_PRE_ABOUT) eq 'CODE') - { - $about = &$T2H_PRE_ABOUT(); - } - else - { - $about = $T2H_PRE_ABOUT; - } - $about .= <<EOT; -The buttons in the navigation panels have the following meaning: -<P></P> -<table border = "1"> -<TR> -<TH> Button </TH> -<TH> Name </TH> -<TH> Go to </TH> -<TH> From 1.2.3 go to</TH> -</TR> -EOT - - for $button (@T2H_SECTION_BUTTONS) - { - next if $button eq ' ' || ref($button) eq 'CODE'; - $about .= <<EOT; -<TR> -<TD ALIGN="CENTER"> -EOT - $about .= - ($T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? - &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}) : - " [" . $T2H_NAVIGATION_TEXT{$button} . "] "); - $about .= <<EOT; -</TD> -<TD ALIGN="CENTER"> -$button -</TD> -<TD> -$T2H_BUTTONS_GOTO{$button} -</TD> -<TD> -$T2H_BUTTONS_EXAMPLE{$button} -</TD> -</TR> -EOT - } - - $about .= <<EOT; -</TABLE> -<P></P> -where the <STRONG> Example </STRONG> assumes that the current position -is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of -the following structure: -<UL> -<LI> 1. Section One </LI> -<UL> -<LI>1.1 Subsection One-One</LI> -<UL> -<LI> ... </LI> -</UL> -<LI>1.2 Subsection One-Two</LI> -<UL> -<LI>1.2.1 Subsubsection One-Two-One -</LI><LI>1.2.2 Subsubsection One-Two-Two -</LI><LI>1.2.3 Subsubsection One-Two-Three <STRONG> -<== Current Position </STRONG> -</LI><LI>1.2.4 Subsubsection One-Two-Four -</LI></UL> -<LI>1.3 Subsection One-Three</LI> -<UL> -<LI> ... </LI> -</UL> -<LI>1.4 Subsection One-Four</LI> -</UL> -</UL> -$T2H_AFTER_ABOUT -EOT - return $about; -} - - -%T2H_BUTTONS_GOTO = - ( - 'Top', 'cover (top) of document', - 'Contents', 'table of contents', - 'Overview', 'short table of contents', - 'Index', 'concept index', - 'Back', 'previous section in reading order', - 'FastBack', 'previous or up-and-previous section ', - 'Prev', 'previous section same level', - 'Up', 'up section', - 'Next', 'next section same level', - 'Forward', 'next section in reading order', - 'FastForward', 'next or up-and-next section', - 'About' , 'this page', - 'First', 'first section in reading order', - 'Last', 'last section in reading order', - ); - -%T2H_BUTTONS_EXAMPLE = -( - 'Top', ' ', - 'Contents', ' ', - 'Overview', ' ', - 'Index', ' ', - 'Back', '1.2.2', - 'FastBack', '1.1', - 'Prev', '1.2.2', - 'Up', '1.2', - 'Next', '1.2.4', - 'Forward', '1.2.4', - 'FastForward', '1.3', - 'About', ' ', - 'First', '1.', - 'Last', '1.2.4', -); - - -###################################################################### -# from here on, its l2h init stuff -# - -## initialization for latex2html as for Singular manual generation -## obachman 3/99 - -# -# Options controlling Titles, File-Names, Tracing and Sectioning -# -$TITLE = ''; - -$SHORTEXTN = 0; - -$LONG_TITLES = 0; - -$DESTDIR = ''; # should be overwritten by cmd-line argument - -$NO_SUBDIR = 0;# should be overwritten by cmd-line argument - -$PREFIX = ''; # should be overwritten by cmd-line argument - -$AUTO_PREFIX = 0; # this is needed, so that prefix settings are used - -$AUTO_LINK = 0; - -$SPLIT = 0; - -$MAX_LINK_DEPTH = 0; - -$TMP = ''; # should be overwritten by cmd-line argument - -$DEBUG = 0; - -$VERBOSE = 1; - -# -# Options controlling Extensions and Special Features -# -$HTML_VERSION = "3.2"; - -$TEXDEFS = 1; # we absolutely need that - -$EXTERNAL_FILE = ''; - -$SCALABLE_FONTS = 1; - -$NO_SIMPLE_MATH = 1; - -$LOCAL_ICONS = 1; - -$SHORT_INDEX = 0; - -$NO_FOOTNODE = 1; - -$ADDRESS = ''; - -$INFO = ''; - -# -# Switches controlling Image Generation -# -$ASCII_MODE = 0; - -$NOLATEX = 0; - -$EXTERNAL_IMAGES = 0; - -$PS_IMAGES = 0; - -$NO_IMAGES = 0; - -$IMAGES_ONLY = 0; - -$REUSE = 2; - -$ANTI_ALIAS = 1; - -$ANTI_ALIAS_TEXT = 1; - -# -#Switches controlling Navigation Panels -# -$NO_NAVIGATION = 1; -$ADDRESS = ''; -$INFO = 0; # 0 = do not make a "About this document..." section - -# -#Switches for Linking to other documents -# -# currently -- we don't care - -$MAX_SPLIT_DEPTH = 0; # Stop making separate files at this depth - -$MAX_LINK_DEPTH = 0; # Stop showing child nodes at this depth - -$NOLATEX = 0; # 1 = do not pass unknown environments to Latex - -$EXTERNAL_IMAGES = 0; # 1 = leave the images outside the document - -$ASCII_MODE = 0; # 1 = do not use any icons or internal images - -# 1 = use links to external postscript images rather than inlined bitmap -# images. -$PS_IMAGES = 0; -$SHOW_SECTION_NUMBERS = 0; - -### Other global variables ############################################### -$CHILDLINE = ""; - -# This is the line width measured in pixels and it is used to right justify -# equations and equation arrays; -$LINE_WIDTH = 500; - -# Used in conjunction with AUTO_NAVIGATION -$WORDS_IN_PAGE = 300; - -# Affects ONLY the way accents are processed -$default_language = 'english'; - -# The value of this variable determines how many words to use in each -# title that is added to the navigation panel (see below) -# -$WORDS_IN_NAVIGATION_PANEL_TITLES = 0; - -# This number will determine the size of the equations, special characters, -# and anything which will be converted into an inlined image -# *except* "image generating environments" such as "figure", "table" -# or "minipage". -# Effective values are those greater than 0. -# Sensible values are between 0.1 - 4. -$MATH_SCALE_FACTOR = 1.5; - -# This number will determine the size of -# image generating environments such as "figure", "table" or "minipage". -# Effective values are those greater than 0. -# Sensible values are between 0.1 - 4. -$FIGURE_SCALE_FACTOR = 1.6; - - -# If both of the following two variables are set then the "Up" button -# of the navigation panel in the first node/page of a converted document -# will point to $EXTERNAL_UP_LINK. $EXTERNAL_UP_TITLE should be set -# to some text which describes this external link. -$EXTERNAL_UP_LINK = ""; -$EXTERNAL_UP_TITLE = ""; - -# If this is set then the resulting HTML will look marginally better if viewed -# with Netscape. -$NETSCAPE_HTML = 1; - -# Valid paper sizes are "letter", "legal", "a4","a3","a2" and "a0" -# Paper sizes has no effect other than in the time it takes to create inlined -# images and in whether large images can be created at all ie -# - larger paper sizes *MAY* help with large image problems -# - smaller paper sizes are quicker to handle -$PAPERSIZE = "a4"; - -# Replace "english" with another language in order to tell LaTeX2HTML that you -# want some generated section titles (eg "Table of Contents" or "References") -# to appear in a different language. Currently only "english" and "french" -# is supported but it is very easy to add your own. See the example in the -# file "latex2html.config" -$TITLES_LANGUAGE = "english"; - -1; # This must be the last non-comment line - -# End File texi2html.init -###################################################################### - - -require "$ENV{T2H_HOME}/texi2html.init" - if ($0 =~ /\.pl$/ && - -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init"); - -#+++############################################################################ -# # -# Initialization # -# Pasted content of File $(srcdir)/MySimple.pm: Command-line processing # -# # -#---############################################################################ - -# leave this within comments, and keep the require statement -# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init -# exists. - -# -package Getopt::MySimple; - -# Name: -# Getopt::MySimple. -# -# Documentation: -# POD-style (incomplete) documentation is in file MySimple.pod -# -# Tabs: -# 4 spaces || die. -# -# Author: -# Ron Savage rpsavage@ozemail.com.au. -# 1.00 19-Aug-97 Initial version. -# 1.10 13-Oct-97 Add arrays of switches (eg '=s@'). -# 1.20 3-Dec-97 Add 'Help' on a per-switch basis. -# 1.30 11-Dec-97 Change 'Help' to 'verbose'. Make all hash keys lowercase. -# 1.40 10-Nov-98 Change width of help report. Restructure tests. -# 1-Jul-00 Modifications for Texi2html - -# -------------------------------------------------------------------------- -# Locally modified by obachman (Display type instead of env, order by cmp) -# $Id: texi2html,v 1.8 2007-06-03 19:03:44 geuzaine Exp $ - -# use strict; -# no strict 'refs'; - -use vars qw(@EXPORT @EXPORT_OK @ISA); -use vars qw($fieldWidth $opt $VERSION); - -use Exporter(); -use Getopt::Long; - -@ISA = qw(Exporter); -@EXPORT = qw(); -@EXPORT_OK = qw($opt); # An alias for $self -> {'opt'}. - -# -------------------------------------------------------------------------- - -$fieldWidth = 20; -$VERSION = '1.41'; - -# -------------------------------------------------------------------------- - -sub byOrder -{ - my($self) = @_; - - return uc($a) cmp (uc($b)); -} - -# -------------------------------------------------------------------------- - -sub dumpOptions -{ - my($self) = @_; - - print 'Option', ' ' x ($fieldWidth - length('Option') ), "Value\n"; - - for (sort byOrder keys(%{$self -> {'opt'} }) ) - { - print "-$_", ' ' x ($fieldWidth - (1 + length) ), "${$self->{'opt'} }{$_}\n"; - } - - print "\n"; - -} # End of dumpOptions. - -# -------------------------------------------------------------------------- -# Return: -# 0 -> Error. -# 1 -> Ok. - -sub getOptions -{ - push(@_, 0) if ($#_ == 2); # Default for $ignoreCase is 0. - push(@_, 1) if ($#_ == 3); # Default for $helpThenExit is 1. - - my($self, $default, $helpText, $versionText, - $helpThenExit, $versionThenExit, $ignoreCase) = @_; - - $helpThenExit = 1 unless (defined($helpThenExit)); - $versionThenExit = 1 unless (defined($versionThenExit)); - $ignoreCase = 0 unless (defined($ignoreCase)); - - $self -> {'default'} = $default; - $self -> {'helpText'} = $helpText; - $self -> {'versionText'} = $versionText; - $Getopt::Long::ignorecase = $ignoreCase; - - unless (defined($self -> {'default'}{'help'})) - { - $self -> {'default'}{'help'} = - { - type => ':i', - default => '', - linkage => sub {$self->helpOptions($_[1]); exit (0) if $helpThenExit;}, - verbose => "print help and exit" - }; - } - - unless (defined($self -> {'default'}{'version'})) - { - $self -> {'default'}{'version'} = - { - type => '', - default => '', - linkage => sub {print $self->{'versionText'}; exit (0) if versionTheExit;}, - verbose => "print version and exit" - }; - } - - for (keys(%{$self -> {'default'} }) ) - { - my $type = ${$self -> {'default'} }{$_}{'type'}; - push(@{$self -> {'type'} }, "$_$type"); - $self->{'opt'}->{$_} = ${$self -> {'default'} }{$_}{'linkage'} - if ${$self -> {'default'} }{$_}{'linkage'}; - } - - my($result) = &GetOptions($self -> {'opt'}, @{$self -> {'type'} }); - - return $result unless $result; - - for (keys(%{$self -> {'default'} }) ) - { - if (! defined(${$self -> {'opt'} }{$_})) #{ - { - ${$self -> {'opt'} }{$_} = ${$self -> {'default'} }{$_}{'default'}; - } - } - - $result; -} # End of getOptions. - -# -------------------------------------------------------------------------- - -sub helpOptions -{ - my($self) = shift; - my($noHelp) = shift; - $noHelp = 0 unless $noHelp; - my($optwidth, $typewidth, $defaultwidth, $maxlinewidth, $valind, $valwidth) - = (10, 5, 9, 78, 4, 11); - - print "$self->{'helpText'}" if ($self -> {'helpText'}); - - print ' Option', ' ' x ($optwidth - length('Option') -1 ), - 'Type', ' ' x ($typewidth - length('Type') + 1), - 'Default', ' ' x ($defaultwidth - length('Default') ), - "Description\n"; - - for (sort byOrder keys(%{$self -> {'default'} }) ) - { - my($line, $help, $option, $val); - $option = $_; - next if ${$self->{'default'} }{$_}{'noHelp'} && ${$self->{'default'} }{$_}{'noHelp'} > $noHelp; - #$line = " -$_" . ' ' x ($optwidth - (2 + length) ) . - # "${$self->{'default'} }{$_}{'type'} ". - # ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); - $line = " -$_" . "${$self->{'default'} }{$_}{'type'}". - ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); - - $val = ${$self->{'default'} }{$_}{'linkage'}; - if ($val) - { - if (ref($val) eq 'SCALAR') - { - $val = $$val; - } - else - { - $val = ''; - } - } - else - { - $val = ${$self->{'default'} }{$_}{'default'}; - } - $line .= "$val "; - $line .= ' ' x ($optwidth + $typewidth + $defaultwidth + 1 - length($line)); - - if (defined(${$self -> {'default'} }{$_}{'verbose'}) && - ${$self -> {'default'} }{$_}{'verbose'} ne '') - { - $help = "${$self->{'default'} }{$_}{'verbose'}"; - } - else - { - $help = ' '; - } - if ((length("$line") + length($help)) < $maxlinewidth) - { - print $line , $help, "\n"; - } - else - { - print $line, "\n", ' ' x $valind, $help, "\n"; - } - for $val (sort byOrder keys(%{${$self->{'default'}}{$option}{'values'}})) - { - print ' ' x ($valind + 2); - print $val, ' ', ' ' x ($valwidth - length($val) - 2); - print ${$self->{'default'}}{$option}{'values'}{$val}, "\n"; - } - } - - print <<EOT; -Note: 'Options' may be abbreviated. 'Type' specifications mean: - <none>| ! no argument: variable is set to 1 on -foo (or, to 0 on -nofoo) - =s | :s mandatory (or, optional) string argument - =i | :i mandatory (or, optional) integer argument -EOT -} # End of helpOptions. - -#------------------------------------------------------------------- - -sub new -{ - my($class) = @_; - my($self) = {}; - $self -> {'default'} = {}; - $self -> {'helpText'} = ''; - $self -> {'opt'} = {}; - $opt = $self -> {'opt'}; # An alias for $self -> {'opt'}. - $self -> {'type'} = (); - - return bless $self, $class; - -} # End of new. - -# -------------------------------------------------------------------------- - -1; - -# End MySimple.pm - -require "$ENV{T2H_HOME}/MySimple.pm" - if ($0 =~ /\.pl$/ && - -e "$ENV{T2H_HOME}/MySimple.pm" && -r "$ENV{T2H_HOME}/MySimple.pm"); - -package main; - -#+++############################################################################ -# # -# Constants # -# # -#---############################################################################ - -$DEBUG_TOC = 1; -$DEBUG_INDEX = 2; -$DEBUG_BIB = 4; -$DEBUG_GLOSS = 8; -$DEBUG_DEF = 16; -$DEBUG_HTML = 32; -$DEBUG_USER = 64; -$DEBUG_L2H = 128; - - -$BIBRE = '\[[\w\/-]+\]'; # RE for a bibliography reference -$FILERE = '[\/\w.+-]+'; # RE for a file name -$VARRE = '[^\s\{\}]+'; # RE for a variable name -$NODERE = '[^,:]+'; # RE for a node name -$NODESRE = '[^:]+'; # RE for a list of node names - -$ERROR = "***"; # prefix for errors -$WARN = "**"; # prefix for warnings - - # program home page -$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections - -$CHAPTEREND = "<!-- End chapter -->\n"; # to know where a chpater ends -$SECTIONEND = "<!-- End section -->\n"; # to know where section ends -$TOPEND = "<!-- End top -->\n"; # to know where top ends - - - -# -# pre-defined indices -# -$index_properties = -{ - 'c' => { name => 'cp'}, - 'f' => { name => 'fn', code => 1}, - 'v' => { name => 'vr', code => 1}, - 'k' => { name => 'ky', code => 1}, - 'p' => { name => 'pg', code => 1}, - 't' => { name => 'tp', code => 1} -}; - - -%predefined_index = ( - 'cp', 'c', - 'fn', 'f', - 'vr', 'v', - 'ky', 'k', - 'pg', 'p', - 'tp', 't', - ); - -# -# valid indices -# -%valid_index = ( - 'c', 1, - 'f', 1, - 'v', 1, - 'k', 1, - 'p', 1, - 't', 1, - ); - -# -# texinfo section names to level -# -%sec2level = ( - 'top', 0, - 'chapter', 1, - 'unnumbered', 1, - 'majorheading', 1, - 'chapheading', 1, - 'appendix', 1, - 'section', 2, - 'unnumberedsec', 2, - 'heading', 2, - 'appendixsec', 2, - 'appendixsection', 2, - 'subsection', 3, - 'unnumberedsubsec', 3, - 'subheading', 3, - 'appendixsubsec', 3, - 'subsubsection', 4, - 'unnumberedsubsubsec', 4, - 'subsubheading', 4, - 'appendixsubsubsec', 4, - ); - -# -# accent map, TeX command to ISO name -# -%accent_map = ( - '"', 'uml', - '~', 'tilde', - '^', 'circ', - '`', 'grave', - '\'', 'acute', - ); - -# -# texinfo "simple things" (@foo) to HTML ones -# -%simple_map = ( - # cf. makeinfo.c - "*", "<BR>", # HTML+ - " ", " ", - "\t", " ", - "-", "­", # soft hyphen - "\n", "\n", - "|", "", - 'tab', '<\/TD><TD>', - # spacing commands - ":", "", - "!", "!", - "?", "?", - ".", ".", - "-", "", - ); - -# -# texinfo "things" (@foo{}) to HTML ones -# -%things_map = ( - 'TeX', 'TeX', - 'br', '<P>', # paragraph break - 'bullet', '*', - #'copyright', '(C)', - 'copyright', '©', - 'dots', '<small>...<\/small>', - 'enddots', '<small>....<\/small>', - 'equiv', '==', - 'error', 'error-->', - 'expansion', '==>', - 'minus', '-', - 'point', '-!-', - 'print', '-|', - 'result', '=>', - 'today', $T2H_TODAY, - 'aa', 'å', - 'AA', 'Å', - 'ae', 'æ', - 'oe', 'œ', - 'AE', 'Æ', - 'OE', 'Œ', - 'o', 'ø', - 'O', 'Ø', - 'ss', 'ß', - 'l', '\/l', - 'L', '\/L', - 'exclamdown', '¡', - 'questiondown', '¿', - 'pounds', '£' - ); - -# -# texinfo styles (@foo{bar}) to HTML ones -# -%style_map = ( - 'acronym', '&do_acronym', - 'asis', '', - 'b', 'B', - 'cite', 'CITE', - 'code', 'CODE', - 'command', 'CODE', - 'ctrl', '&do_ctrl', # special case - 'dfn', 'EM', # DFN tag is illegal in the standard - 'dmn', '', # useless - 'email', '&do_email', # insert a clickable email address - 'emph', 'EM', - 'env', 'CODE', - 'file', '"TT', # will put quotes, cf. &apply_style - 'i', 'I', - 'kbd', 'KBD', - 'key', 'KBD', - 'math', '&do_math', - 'option', '"SAMP', # will put quotes, cf. &apply_style - 'r', '', # unsupported - 'samp', '"SAMP', # will put quotes, cf. &apply_style - 'sc', '&do_sc', # special case - 'strong', 'STRONG', - 't', 'TT', - 'titlefont', '', # useless - 'uref', '&do_uref', # insert a clickable URL - 'url', '&do_url', # insert a clickable URL - 'var', 'VAR', - 'w', '', # unsupported - 'H', '&do_accent', - 'dotaccent', '&do_accent', - 'ringaccent','&do_accent', - 'tieaccent', '&do_accent', - 'u','&do_accent', - 'ubaraccent','&do_accent', - 'udotaccent','&do_accent', - 'v', '&do_accent', - ',', '&do_accent', - 'dotless', '&do_accent' - ); - -# -# texinfo format (@foo/@end foo) to HTML ones -# -%format_map = ( - 'quotation', 'BLOCKQUOTE', - # lists - 'itemize', 'UL', - 'enumerate', 'OL', - # poorly supported - 'flushleft', 'PRE', - 'flushright', 'PRE', - ); - -# -# an eval of these $complex_format_map->{what}->[0] yields beginning -# an eval of these $complex_format_map->{what}->[1] yieleds end -$complex_format_map = -{ - example => - [ - q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=example><pre>"}, - q{'</pre></td></tr></table>'} - ], - smallexample => - [ - q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smallexample><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre>"}, - q{'</FONT></pre></td></tr></table>'} - ], - display => - [ - q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=display><pre " . 'style="font-family: serif">'}, - q{'</pre></td></tr></table>'} - ], - smalldisplay => - [ - q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smalldisplay><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre " . 'style="font-family: serif">'}, - q{'</pre></FONT></td></tr></table>'} - ] -}; - -$complex_format_map->{lisp} = $complex_format_map->{example}; -$complex_format_map->{smalllisp} = $complex_format_map->{smallexample}; -$complex_format_map->{format} = $complex_format_map->{display}; -$complex_format_map->{smallformat} = $complex_format_map->{smalldisplay}; - -# -# texinfo definition shortcuts to real ones -# -%def_map = ( - # basic commands - 'deffn', 0, - 'defvr', 0, - 'deftypefn', 0, - 'deftypeop', 0, - 'deftypevr', 0, - 'defcv', 0, - 'defop', 0, - 'deftp', 0, - # basic x commands - 'deffnx', 0, - 'defvrx', 0, - 'deftypefnx', 0, - 'deftypeopx', 0, - 'deftypevrx', 0, - 'defcvx', 0, - 'defopx', 0, - 'deftpx', 0, - # shortcuts - 'defun', 'deffn Function', - 'defmac', 'deffn Macro', - 'defspec', 'deffn {Special Form}', - 'defvar', 'defvr Variable', - 'defopt', 'defvr {User Option}', - 'deftypefun', 'deftypefn Function', - 'deftypevar', 'deftypevr Variable', - 'defivar', 'defcv {Instance Variable}', - 'deftypeivar', 'defcv {Instance Variable}', # NEW: FIXME - 'defmethod', 'defop Method', - 'deftypemethod', 'defop Method', # NEW:FIXME - # x shortcuts - 'defunx', 'deffnx Function', - 'defmacx', 'deffnx Macro', - 'defspecx', 'deffnx {Special Form}', - 'defvarx', 'defvrx Variable', - 'defoptx', 'defvrx {User Option}', - 'deftypefunx', 'deftypefnx Function', - 'deftypevarx', 'deftypevrx Variable', - 'defivarx', 'defcvx {Instance Variable}', - 'defmethodx', 'defopx Method', - ); - -# -# things to skip -# -%to_skip = ( - # comments - 'c', 1, - 'comment', 1, - 'ifnotinfo', 1, - 'ifnottex', 1, - 'ifhtml', 1, - 'end ifhtml', 1, - 'end ifnotinfo', 1, - 'end ifnottex', 1, - # useless - 'detailmenu', 1, - 'direntry', 1, - 'contents', 1, - 'shortcontents', 1, - 'summarycontents', 1, - 'footnotestyle', 1, - 'end ifclear', 1, - 'end ifset', 1, - 'titlepage', 1, - 'end titlepage', 1, - # unsupported commands (formatting) - 'afourpaper', 1, - 'cropmarks', 1, - 'finalout', 1, - 'headings', 1, - 'sp', 1, - 'need', 1, - 'page', 1, - 'setchapternewpage', 1, - 'everyheading', 1, - 'everyfooting', 1, - 'evenheading', 1, - 'evenfooting', 1, - 'oddheading', 1, - 'oddfooting', 1, - 'smallbook', 1, - 'vskip', 1, - 'filbreak', 1, - 'paragraphindent', 1, - # unsupported formats - 'cartouche', 1, - 'end cartouche', 1, - 'group', 1, - 'end group', 1, - ); - -#+++############################################################################ -# # -# Argument parsing, initialisation # -# # -#---############################################################################ - -# -# flush stdout and stderr after every write -# -select(STDERR); -$| = 1; -select(STDOUT); -$| = 1; - - -%value = (); # hold texinfo variables, see also -D -$use_bibliography = 1; -$use_acc = 1; - -# -# called on -init-file -sub LoadInitFile -{ - my $init_file = shift; - # second argument is value of options - $init_file = shift; - if (-f $init_file) - { - print "# reading initialization file from $init_file\n" - if ($T2H_VERBOSE); - require($init_file); - } - else - { - print "$ERROR Error: can't read init file $int_file\n"; - $init_file = ''; - } -} - -# -# called on -lang -sub SetDocumentLanguage -{ - my $lang = shift; - if (! exists($T2H_WORDS->{$lang})) - { - warn "$ERROR: Language specs for '$lang' do not exists. Reverting to '" . - ($T2H_LANG ? T2H_LANG : "en") . "'\n"; - } - else - { - print "# using '$lang' as document language\n" if ($T2H_VERBOSE); - $T2H_LANG = $lang; - } -} - -## -## obsolete cmd line options -## -$T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} = -{ - type => '!', - linkage => sub {$main::T2H_SECTION_NAVIGATION = 0;}, - verbose => 'obsolete, use -nosec_nav', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {use_acc} = -{ - type => '!', - linkage => \$use_acc, - verbose => 'obsolete', - noHelp => 2 -}; -$T2H_OBSOLETE_OPTIONS -> {expandinfo} = -{ - type => '!', - linkage => sub {$main::T2H_EXPAND = 'info';}, - verbose => 'obsolete, use "-expand info" instead', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {expandtex} = -{ - type => '!', - linkage => sub {$main::T2H_EXPAND = 'tex';}, - verbose => 'obsolete, use "-expand tex" instead', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {monolithic} = -{ - type => '!', - linkage => sub {$main::T2H_SPLIT = '';}, - verbose => 'obsolete, use "-split no" instead', - noHelp => 2 -}; -$T2H_OBSOLETE_OPTIONS -> {split_node} = -{ - type => '!', - linkage => sub{$main::T2H_SPLIT = 'section';}, - verbose => 'obsolete, use "-split section" instead', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {split_chapter} = -{ - type => '!', - linkage => sub{$main::T2H_SPLIT = 'chapter';}, - verbose => 'obsolete, use "-split chapter" instead', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {no_verbose} = -{ - type => '!', - linkage => sub {$main::T2H_VERBOSE = 0;}, - verbose => 'obsolete, use -noverbose instead', - noHelp => 2, -}; -$T2H_OBSOLETE_OPTIONS -> {output_file} = -{ - type => '=s', - linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, - verbose => 'obsolete, use -out_file instead', - noHelp => 2 -}; - -$T2H_OBSOLETE_OPTIONS -> {section_navigation} = -{ - type => '!', - linkage => \$T2H_SECTION_NAVIGATION, - verbose => 'obsolete, use -sec_nav instead', - noHelp => 2, -}; - -$T2H_OBSOLETE_OPTIONS -> {verbose} = -{ - type => '!', - linkage => \$T2H_VERBOSE, - verbose => 'obsolete, use -Verbose instead', - noHelp => 2 -}; - -# read initialzation from $sysconfdir/texi2htmlrc or $HOME/.texi2htmlrc -my $home = $ENV{HOME}; -defined($home) or $home = ''; -foreach $i ('/usr/local/etc/texi2htmlrc', "$home/.texi2htmlrc") { - if (-f $i) { - print "# reading initialization file from $i\n" - if ($T2H_VERBOSE); - require($i); - } -} - - -#+++############################################################################ -# # -# parse command-line options -# # -#---############################################################################ -$T2H_USAGE_TEXT = <<EOT; -Usage: texi2html [OPTIONS] TEXINFO-FILE -Translates Texinfo source documentation to HTML. -EOT -$T2H_FAILURE_TEXT = <<EOT; -Try 'texi2html -help' for usage instructions. -EOT -$options = new Getopt::MySimple; - -# some older version of GetOpt::Long don't have -# Getopt::Long::Configure("pass_through") -eval {Getopt::Long::Configure("pass_through");}; -$Configure_failed = $@ && <<EOT; -**WARNING: Parsing of obsolete command-line options could have failed. - Consider to use only documented command-line options (run - 'texi2html -help 2' for a complete list) or upgrade to perl - version 5.005 or higher. -EOT - -if (! $options->getOptions($T2H_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) -{ - print $Configure_failed if $Configure_failed; - die $T2H_FAILURE_TEXT; -} - -if (@ARGV > 1) -{ - eval {Getopt::Long::Configure("no_pass_through");}; - if (! $options->getOptions($T2H_OBSOLETE_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) - { - print $Configure_failed if $Configure_failed; - die $T2H_FAILURE_TEXT; - } -} - -if ($T2H_CHECK) { - die "Need file to check\n$T2H_FAILURE_TEXT" unless @ARGV > 0; - ✓ - exit; -} - -#+++############################################################################ -# # -# evaluation of cmd line options -# # -#---############################################################################ - -if ($T2H_EXPAND eq 'info') -{ - $to_skip{'ifinfo'} = 1; - $to_skip{'end ifinfo'} = 1; -} -elsif ($T2H_EXPAND eq 'tex') -{ - $to_skip{'iftex'} = 1; - $to_skip{'end iftex'} = 1; - -} - -$T2H_INVISIBLE_MARK = '<IMG SRC="invisible.xbm">' if $T2H_INVISIBLE_MARK eq 'xbm'; - -# -# file name buisness -# -die "Need exactly one file to translate\n$T2H_FAILURE_TEXT" unless @ARGV == 1; -$docu = shift(@ARGV); -if ($docu =~ /.*\//) { - chop($docu_dir = $&); - $docu_name = $'; -} else { - $docu_dir = '.'; - $docu_name = $docu; -} -unshift(@T2H_INCLUDE_DIRS, $docu_dir); -$docu_name =~ s/\.te?x(i|info)?$//; # basename of the document -$docu_name = $T2H_PREFIX if ($T2H_PREFIX); - -# subdir -if ($T2H_SUBDIR && ! $T2H_OUT) -{ - $T2H_SUBDIR =~ s|/*$||; - unless (-d "$T2H_SUBDIR" && -w "$T2H_SUBDIR") - { - if ( mkdir($T2H_SUBDIR, oct(755))) - { - print "# created directory $T2H_SUBDIR\n" if ($T2H_VERBOSE); - } - else - { - warn "$ERROR can't create directory $T2H_SUBDIR. Put results into current directory\n"; - $T2H_SUBDIR = ''; - } - } -} - -if ($T2H_SUBDIR && ! $T2H_OUT) -{ - $docu_rdir = "$T2H_SUBDIR/"; - print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); -} -else -{ - if ($T2H_OUT && $T2H_OUT =~ m|(.*)/|) - { - $docu_rdir = "$1/"; - print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); - } - else - { - print "# putting result files into current directory \n" if ($T2H_VERBOSE); - $docu_rdir = ''; - } -} - -# extension -if ($T2H_SHORTEXTN) -{ - $docu_ext = "htm"; -} -else -{ - $docu_ext = "html"; -} -if ($T2H_TOP_FILE =~ /\..*$/) -{ - $T2H_TOP_FILE = $`.".$docu_ext"; -} - -# result files -if (! $T2H_OUT && ($T2H_SPLIT =~ /section/i || $T2H_SPLIT =~ /node/i)) -{ - $T2H_SPLIT = 'section'; -} -elsif (! $T2H_OUT && $T2H_SPLIT =~ /chapter/i) -{ - $T2H_SPLIT = 'chapter' -} -else -{ - undef $T2H_SPLIT; -} - -$docu_doc = "$docu_name.$docu_ext"; # document's contents -$docu_doc_file = "$docu_rdir$docu_doc"; -if ($T2H_SPLIT) -{ - $docu_toc = $T2H_TOC_FILE || "${docu_name}_toc.$docu_ext"; # document's table of contents - $docu_stoc = "${docu_name}_ovr.$docu_ext"; # document's short toc - $docu_foot = "${docu_name}_fot.$docu_ext"; # document's footnotes - $docu_about = "${docu_name}_abt.$docu_ext"; # about this document - $docu_top = $T2H_TOP_FILE || $docu_doc; -} -else -{ - if ($T2H_OUT) - { - $docu_doc = $T2H_OUT; - $docu_doc =~ s|.*/||; - } - $docu_toc = $docu_foot = $docu_stoc = $docu_about = $docu_top = $docu_doc; -} - -$docu_toc_file = "$docu_rdir$docu_toc"; -$docu_stoc_file = "$docu_rdir$docu_stoc"; -$docu_foot_file = "$docu_rdir$docu_foot"; -$docu_about_file = "$docu_rdir$docu_about"; -$docu_top_file = "$docu_rdir$docu_top"; - -$docu_frame_file = "$docu_rdir${docu_name}_frame.$docu_ext"; -$docu_toc_frame_file = "$docu_rdir${docu_name}_toc_frame.$docu_ext"; - -# -# variables -# -$value{'html'} = 1; # predefine html (the output format) -$value{'texi2html'} = $THISVERSION; # predefine texi2html (the translator) -# _foo: internal to track @foo -foreach ('_author', '_title', '_subtitle', - '_settitle', '_setfilename', '_shorttitle') { - $value{$_} = ''; # prevent -w warnings -} -%node2sec = (); # node to section name -%sec2node = (); # section to node name -%sec2number = (); # section to number -%number2sec = (); # number to section -%idx2node = (); # index keys to node -%node2href = (); # node to HREF -%node2next = (); # node to next -%node2prev = (); # node to prev -%node2up = (); # node to up -%bib2href = (); # bibliography reference to HREF -%gloss2href = (); # glossary term to HREF -@sections = (); # list of sections -%tag2pro = (); # protected sections - -# -# initial indexes -# -$bib_num = 0; -$foot_num = 0; -$gloss_num = 0; -$idx_num = 0; -$sec_num = 0; -$doc_num = 0; -$html_num = 0; - -# -# can I use ISO8859 characters? (HTML+) -# -if ($T2H_USE_ISO) { - $things_map{'bullet'} = "•"; - $things_map{'copyright'} = "©"; - $things_map{'dots'} = "…"; - $things_map{'equiv'} = "≡"; - $things_map{'expansion'} = "→"; - $things_map{'point'} = "∗"; - $things_map{'result'} = "⇒"; -} - -# -# read texi2html extensions (if any) -# -$extensions = 'texi2html.ext'; # extensions in working directory -if (-f $extensions) { - print "# reading extensions from $extensions\n" if $T2H_VERBOSE; - require($extensions); -} -($progdir = $0) =~ s/[^\/]+$//; -if ($progdir && ($progdir ne './')) { - $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory - if (-f $extensions) { - print "# reading extensions from $extensions\n" if $T2H_VERBOSE; - require($extensions); - } -} - - -print "# reading from $docu\n" if $T2H_VERBOSE; - -######################################################################### -# -# latex2html stuff -# -# latex2html conversions consist of three stages: -# 1) ToLatex: Put "latex" code into a latex file -# 2) ToHtml: Use latex2html to generate corresponding html code and images -# 3) FromHtml: Extract generated code and images from latex2html run -# - -########################## -# default settings -# - -# defaults for files and names - -sub l2h_Init -{ - local($root) = @_; - - return 0 unless ($root); - - $l2h_name = "${root}_l2h"; - - $l2h_latex_file = "$docu_rdir${l2h_name}.tex"; - $l2h_cache_file = "${docu_rdir}l2h_cache.pm"; - $T2H_L2H_L2H = "latex2html" unless ($T2H_L2H_L2H); - - # destination dir -- generated images are put there, should be the same - # as dir of enclosing html document -- - $l2h_html_file = "$docu_rdir${l2h_name}.html"; - $l2h_prefix = "${l2h_name}_"; - return 1; -} - - -########################## -# -# First stage: Generation of Latex file -# Initialize with: l2h_InitToLatex -# Add content with: l2h_ToLatex($text) --> HTML placeholder comment -# Finish with: l2h_FinishToLatex -# - -$l2h_latex_preample = <<EOT; -% This document was automatically generated by the l2h extenstion of texi2html -% DO NOT EDIT !!! -\\documentclass{article} -\\usepackage{html} -\\begin{document} -EOT - -$l2h_latex_closing = <<EOT; -\\end{document} -EOT - -# return used latex 1, if l2h could be initalized properly, 0 otherwise -sub l2h_InitToLatex -{ - %l2h_to_latex = (); - unless ($T2H_L2H_SKIP) - { - unless (open(L2H_LATEX, ">$l2h_latex_file")) - { - warn "$ERROR Error l2h: Can't open latex file '$latex_file' for writing\n"; - return 0; - } - print "# l2h: use ${l2h_latex_file} as latex file\n" if ($T2H_VERBOSE); - print L2H_LATEX $l2h_latex_preample; - } - # open database for caching - l2h_InitCache(); - $l2h_latex_count = 0; - $l2h_to_latex_count = 0; - $l2h_cached_count = 0; - return 1; -} - -# print text (1st arg) into latex file (if not already there), return -# HTML commentary which can be later on replaced by the latex2html -# generated text -sub l2h_ToLatex -{ - my($text) = @_; - my($count); - - $l2h_to_latex_count++; - $text =~ s/(\s*)$//; - - # try whether we can cache it - my $cached_text = l2h_FromCache($text); - if ($cached_text) - { - $l2h_cached_count++; - return $cached_text; - } - - # try whether we have text already on things to do - unless ($count = $l2h_to_latex{$text}) - { - $count = $l2h_latex_count; - $l2h_latex_count++; - $l2h_to_latex{$text} = $count; - $l2h_to_latex[$count] = $text; - unless ($T2H_L2H_SKIP) - { - print L2H_LATEX "\\begin{rawhtml}\n"; - print L2H_LATEX "<!-- l2h_begin ${l2h_name} ${count} -->\n"; - print L2H_LATEX "\\end{rawhtml}\n"; - - print L2H_LATEX "$text\n"; - - print L2H_LATEX "\\begin{rawhtml}\n"; - print L2H_LATEX "<!-- l2h_end ${l2h_name} ${count} -->\n"; - print L2H_LATEX "\\end{rawhtml}\n"; - } - } - return "<!-- l2h_replace ${l2h_name} ${count} -->"; -} - -# print closing into latex file and close it -sub l2h_FinishToLatex -{ - local ($reused); - - $reused = $l2h_to_latex_count - $l2h_latex_count - $l2h_cached_count; - unless ($T2H_L2H_SKIP) - { - print L2H_LATEX $l2h_latex_closing; - close(L2H_LATEX); - } - print "# l2h: finished to latex ($l2h_cached_count cached, $reused reused, $l2h_latex_count contents)\n" if ($T2H_VERBOSE); - unless ($l2h_latex_count) - { - l2h_Finish(); - return 0; - } - return 1; -} - -################################### -# Second stage: Use latex2html to generate corresponding html code and images -# -# l2h_ToHtml([$l2h_latex_file, [$l2h_html_dir]]): -# Call latex2html on $l2h_latex_file -# Put images (prefixed with $l2h_name."_") and html file(s) in $l2h_html_dir -# Return 1, on success -# 0, otherwise -# -sub l2h_ToHtml -{ - local($call, $ext, $root, $dotbug); - - if ($T2H_L2H_SKIP) - { - print "# l2h: skipping latex2html run\n" if ($T2H_VERBOSE); - return 1; - } - - # Check for dot in directory where dvips will work - if ($T2H_L2H_TMP) - { - if ($T2H_L2H_TMP =~ /\./) - { - warn "$ERROR Warning l2h: l2h_tmp dir contains a dot. Use /tmp, instead\n"; - $dotbug = 1; - } - } - else - { - if (&getcwd =~ /\./) - { - warn "$ERROR Warning l2h: current dir contains a dot. Use /tmp as l2h_tmp dir \n"; - $dotbug = 1; - } - } - # fix it, if necessary and hope that it works - $T2H_L2H_TMP = "/tmp" if ($dotbug); - - $call = $T2H_L2H_L2H; - # use init file, if specified - $call = $call . " -init_file " . $init_file if ($init_file && -f $init_file); - # set output dir - $call .= ($docu_rdir ? " -dir $docu_rdir" : " -no_subdir"); - # use l2h_tmp, if specified - $call = $call . " -tmp $T2H_L2H_TMP" if ($T2H_L2H_TMP); - # options we want to be sure of - $call = $call ." -address 0 -info 0 -split 0 -no_navigation -no_auto_link"; - $call = $call ." -prefix ${l2h_prefix} $l2h_latex_file"; - - print "# l2h: executing '$call'\n" if ($T2H_VERBOSE); - if (system($call)) - { - warn "l2h ***Error: '${call}' did not succeed\n"; - return 0; - } - else - { - print "# l2h: latex2html finished successfully\n" if ($T2H_VERBOSE); - return 1; - } -} - -# this is directly pasted over from latex2html -sub getcwd { - local($_) = `pwd`; - - die "'pwd' failed (out of memory?)\n" - unless length; - chop; - $_; -} - - -########################## -# Third stage: Extract generated contents from latex2html run -# Initialize with: l2h_InitFromHtml -# open $l2h_html_file for reading -# reads in contents into array indexed by numbers -# return 1, on success -- 0, otherwise -# Extract Html code with: l2h_FromHtml($text) -# replaces in $text all previosuly inserted comments by generated html code -# returns (possibly changed) $text -# Finish with: l2h_FinishFromHtml -# closes $l2h_html_dir/$l2h_name.".$docu_ext" - -sub l2h_InitFromHtml -{ - local($h_line, $h_content, $count, %l2h_img); - - if (! open(L2H_HTML, "<${l2h_html_file}")) - { - print "$ERROR Error l2h: Can't open ${l2h_html_file} for reading\n"; - return 0; - } - print "# l2h: use ${l2h_html_file} as html file\n" if ($T2H_VERBOSE); - - $l2h_html_count = 0; - - while ($h_line = <L2H_HTML>) - { - if ($h_line =~ /^<!-- l2h_begin $l2h_name ([0-9]+) -->/) - { - $count = $1; - $h_content = ""; - while ($h_line = <L2H_HTML>) - { - if ($h_line =~ /^<!-- l2h_end $l2h_name $count -->/) - { - chomp $h_content; - chomp $h_content; - $l2h_html_count++; - $h_content = l2h_ToCache($count, $h_content); - $l2h_from_html[$count] = $h_content; - $h_content = ''; - last; - } - $h_content = $h_content.$h_line; - } - if ($hcontent) - { - print "$ERROR Warning l2h: l2h_end $l2h_name $count not found\n" - if ($T2H_VERBOSE); - close(L2H_HTML); - return 0; - } - } - } - print "# l2h: Got $l2h_html_count of $l2h_latex_count html contents\n" - if ($T2H_VERBOSE); - - close(L2H_HTML); - return 1; -} - -sub l2h_FromHtml -{ - local($text) = @_; - local($done, $to_do, $count); - - $to_do = $text; - - while ($to_do =~ /([^\000]*)<!-- l2h_replace $l2h_name ([0-9]+) -->([^\000]*)/) - { - $to_do = $1; - $count = $2; - $done = $3.$done; - - $done = "<!-- l2h_end $l2h_name $count -->".$done - if ($T2H_DEBUG & $DEBUG_L2H); - - $done = &l2h_ExtractFromHtml($count) . $done; - - $done = "<!-- l2h_begin $l2h_name $count -->".$done - if ($T2H_DEBUG & $DEBUG_L2H); - } - return $to_do.$done; -} - - -sub l2h_ExtractFromHtml -{ - local($count) = @_; - - return $l2h_from_html[$count] if ($l2h_from_html[$count]); - - if ($count >= 0 && $count < $l2h_latex_count) - { - # now we are in trouble - local($l_l2h, $_); - - $l2h_extract_error++; - print "$ERROR l2h: can't extract content $count from html\n" - if ($T2H_VERBOSE); - # try simple (ordinary) substition (without l2h) - $l_l2h = $T2H_L2H; - $T2H_L2H = 0; - $_ = $l2h_to_latex{$count}; - $_ = &substitute_style($_); - &unprotect_texi; - $_ = "<!-- l2h: ". __LINE__ . " use texi2html -->" . $_ - if ($T2H_DEBUG & $DEBUG_L2H); - $T2H_L2H = $l_l2h; - return $_; - } - else - { - # now we have been incorrectly called - $l2h_range_error++; - print "$ERROR l2h: Request of $count content which is out of valide range [0,$l2h_latex_count)\n"; - return "<!-- l2h: ". __LINE__ . " out of range count $count -->" - if ($T2H_DEBUG & $DEBUG_L2H); - return "<!-- l2h: out of range count $count -->"; - } -} - -sub l2h_FinishFromHtml -{ - if ($T2H_VERBOSE) - { - if ($l2h_extract_error + $l2h_range_error) - { - print "# l2h: finished from html ($l2h_extract_error extract and $l2h_range_error errors)\n"; - } - else - { - print "# l2h: finished from html (no errors)\n"; - } - } -} - -sub l2h_Finish -{ - l2h_StoreCache(); - if ($T2H_L2H_CLEAN) - { - print "# l2h: removing temporary files generated by l2h extension\n" - if $T2H_VERBOSE; - while (<"$docu_rdir$l2h_name"*>) - { - unlink $_; - } - } - print "# l2h: Finished\n" if $T2H_VERBOSE; - return 1; -} - -############################## -# stuff for l2h caching -# - -# I tried doing this with a dbm data base, but it did not store all -# keys/values. Hence, I did as latex2html does it -sub l2h_InitCache -{ - if (-r "$l2h_cache_file") - { - my $rdo = do "$l2h_cache_file"; - warn("$ERROR l2h Error: could not load $docu_rdir$l2h_cache_file: $@\n") - unless ($rdo); - } -} - -sub l2h_StoreCache -{ - return unless $l2h_latex_count; - - my ($key, $value); - open(FH, ">$l2h_cache_file") || return warn"$ERROR l2h Error: could not open $docu_rdir$l2h_cache_file for writing: $!\n"; - - - while (($key, $value) = each %l2h_cache) - { - # escape stuff - $key =~ s|/|\\/|g; - $key =~ s|\\\\/|\\/|g; - # weird, a \ at the end of the key results in an error - # maybe this also broke the dbm database stuff - $key =~ s|\\$|\\\\|; - $value =~ s/\|/\\\|/g; - $value =~ s/\\\\\|/\\\|/g; - $value =~ s|\\\\|\\\\\\\\|g; - print FH "\n\$l2h_cache_key = q/$key/;\n"; - print FH "\$l2h_cache{\$l2h_cache_key} = q|$value|;\n"; - } - print FH "1;"; - close(FH); -} - -# return cached html, if it exists for text, and if all pictures -# are there, as well -sub l2h_FromCache -{ - my $text = shift; - my $cached = $l2h_cache{$text}; - if ($cached) - { - while ($cached =~ m/SRC="(.*?)"/g) - { - unless (-e "$docu_rdir$1") - { - return undef; - } - } - return $cached; - } - return undef; -} - -# insert generated html into cache, move away images, -# return transformed html -$maximage = 1; -sub l2h_ToCache -{ - my $count = shift; - my $content = shift; - my @images = ($content =~ /SRC="(.*?)"/g); - my ($src, $dest); - - for $src (@images) - { - $dest = $l2h_img{$src}; - unless ($dest) - { - my $ext; - if ($src =~ /.*\.(.*)$/ && $1 ne $docu_ext) - { - $ext = $1; - } - else - { - warn "$ERROR: L2h image $src has invalid extension\n"; - next; - } - while (-e "$docu_rdir${docu_name}_$maximage.$ext") { $maximage++;} - $dest = "${docu_name}_$maximage.$ext"; - system("cp -f $docu_rdir$src $docu_rdir$dest"); - $l2h_img{$src} = $dest; - unlink "$docu_rdir$src" unless ($DEBUG & DEBUG_L2H); - } - $content =~ s/$src/$dest/g; - } - $l2h_cache{$l2h_to_latex[$count]} = $content; - return $content; -} - - -#+++############################################################################ -# # -# Pass 1: read source, handle command, variable, simple substitution # -# # -#---############################################################################ - -@lines = (); # whole document -@toc_lines = (); # table of contents -@stoc_lines = (); # table of contents -$curlevel = 0; # current level in TOC -$node = ''; # current node name -$node_next = ''; # current node next name -$node_prev = ''; # current node prev name -$node_up = ''; # current node up name -$in_table = 0; # am I inside a table -$table_type = ''; # type of table ('', 'f', 'v', 'multi') -@tables = (); # nested table support -$in_bibliography = 0; # am I inside a bibliography -$in_glossary = 0; # am I inside a glossary -$in_top = 0; # am I inside the top node -$has_top = 0; # did I see a top node? -$has_top_command = 0; # did I see @top for automatic pointers? -$in_pre = 0; # am I inside a preformatted section -$in_list = 0; # am I inside a list -$in_html = 0; # am I inside an HTML section -$first_line = 1; # is it the first line -$dont_html = 0; # don't protect HTML on this line -$deferred_ref = ''; # deferred reference for indexes -@html_stack = (); # HTML elements stack -$html_element = ''; # current HTML element -&html_reset; -%macros = (); # macros - -# init l2h -$T2H_L2H = &l2h_Init($docu_name) if ($T2H_L2H); -$T2H_L2H = &l2h_InitToLatex if ($T2H_L2H); - -# build code for simple substitutions -# the maps used (%simple_map and %things_map) MUST be aware of this -# watch out for regexps, / and escaped characters! -$subst_code = ''; -foreach (keys(%simple_map)) { - ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars - $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n"; -} -foreach (keys(%things_map)) { - $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n"; -} -if ($use_acc) { - # accentuated characters - foreach (keys(%accent_map)) { - if ($_ eq "`") { - $subst_code .= "s/$;3"; - } elsif ($_ eq "'") { - $subst_code .= "s/$;4"; - } else { - $subst_code .= "s/\\\@\\$_"; - } - $subst_code .= "([a-z])/&\${1}$accent_map{$_};/gi;\n"; - } -} -eval("sub simple_substitutions { $subst_code }"); - -&init_input; -INPUT_LINE: while ($_ = &next_line) { - # - # remove \input on the first lines only - # - if ($first_line) { - next if /^\\input/; - $first_line = 0; - } - # non-@ substitutions cf. texinfmt.el - # - # parse texinfo tags - # - $tag = ''; - $end_tag = ''; - if (/^\s*\@end\s+(\w+)\b/) { - $end_tag = $1; - } elsif (/^\s*\@(\w+)\b/) { - $tag = $1; - } - # - # handle @html / @end html - # - if ($in_html) { - if ($end_tag eq 'html') { - $in_html = 0; - } else { - $tag2pro{$in_html} .= $_; - } - next; - } elsif ($tag eq 'html') { - $in_html = $PROTECTTAG . ++$html_num; - push(@lines, $in_html); - next; - } - - # - # try to remove inlined comments - # syntax from tex-mode.el comment-start-skip - # - s/((^|[^\@])(\@\@)*)\@c(omment | |\{|$).*/$1/; - -# Sometimes I use @c right at the end of a line ( to suppress the line feed ) -# s/((^|[^\@])(\@\@)*)\@c(omment)?$/$1/; -# s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/; -# s/(.*)\@c{.*?}(.*)/$1$2/; -# s/(.*)\@comment{.*?}(.*)/$1$2/; -# s/^(.*)\@c /$1/; -# s/^(.*)\@comment /$1/; - - ############################################################# - # value substitution before macro expansion, so that - # it works in macro arguments - s/\@value{($VARRE)}/$value{$1}/eg; - - ############################################################# - # macro substitution - while (/\@(\w+)/g) - { - if (exists($macros->{$1})) - { - my $before = $`; - my $name = $1; - my $after = $'; - my @args; - my $args; - if ($after =~ /^\s*{(.*?[^\\])}(.*)/) - { - $args = $1; - $after = $2; - } - elsif (@{$macros->{$name}->{Args}} == 1) - { - $args = $after; - $args =~ s/^\s*//; - $args =~ s/\s*$//; - $after = ''; - } - $args =~ s|\\\\|\\|g; - $args =~ s|\\{|{|g; - $args =~ s|\\}|}|g; - if (@{$macros->{$name}->{Args}} > 1) - { - $args =~ s/(^|[^\\]),/$1$;/g ; - $args =~ s|\\,|,|g; - @args = split(/$;\s*/, $args) if (@{$macros->{$name}->{Args}} > 1); - } - else - { - $args =~ s|\\,|,|g; - @args = ($args); - } - my $macrobody = $macros->{$name}->{Body}; - for ($i=0; $i<=$#args; $i++) - { - $macrobody =~ s|\\$macros->{$name}->{Args}->[$i]\\|$args[$i]|g; - } - $macrobody =~ s|\\\\|\\|g; - $_ = $before . $macrobody . $after; - unshift @input_spool, map {$_ = $_."\n"} split(/\n/, $_); - next INPUT_LINE; - } - } # - - - # - # try to skip the line - # - if ($end_tag) { - $in_titlepage = 0 if $end_tag eq 'titlepage'; - next if $to_skip{"end $end_tag"}; - } elsif ($tag) { - $in_titlepage = 1 if $tag eq 'titlepage'; - next if $to_skip{$tag}; - last if $tag eq 'bye'; - } - if ($in_top) { - # parsing the top node - if ($tag eq 'node' || - ($sec2level{$tag} && $tag !~ /unnumbered/ && $tag !~ /heading/)) - { - # no more in top - $in_top = 0; - push(@lines, $TOPEND); - } - } - unless ($in_pre) { - s/``/\"/g; - s/''/\"/g; - s/([\w ])---([\w ])/$1--$2/g; - } - # - # analyze the tag - # - if ($tag) { - # skip lines - &skip_until($tag), next if $tag eq 'ignore'; - &skip_until($tag), next if $tag eq 'ifnothtml'; - if ($tag eq 'ifinfo') - { - &skip_until($tag), next unless $T2H_EXPAND eq 'info'; - } - if ($tag eq 'iftex') - { - &skip_until($tag), next unless $T2H_EXPAND eq 'tex'; - } - if ($tag eq 'tex') - { - # add to latex2html file - if ($T2H_EXPAND eq 'tex' && $T2H_L2H && ! $in_pre) - { - # add space to the end -- tex(i2dvi) does this, as well - push(@lines, &l2h_ToLatex(&string_until($tag) . " ")); - } - else - { - &skip_until($tag); - } - next; - } - if ($tag eq 'titlepage') - { - next; - } - # handle special tables - if ($tag =~ /^(|f|v|multi)table$/) { - $table_type = $1; - $tag = 'table'; - } - # special cases - if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) { - $in_top = 1; - $has_top = 1; - $has_top_command = 1 if $tag eq 'top'; - @lines = (); # ignore all lines before top (title page garbage) - next; - } elsif ($tag eq 'node') { - if ($in_top) - { - $in_top = 0; - push(@lines, $TOPEND); - } - warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o; - # request of "Richard Y. Kim" <ryk@ap.com> - s/^\@node\s+//; - $_ = &protect_html($_); # if node contains '&' for instance - ($node, $node_next, $node_prev, $node_up) = split(/,/); - &normalise_node($node); - &normalise_node($node_next); - &normalise_node($node_prev); - &normalise_node($node_up); - $node =~ /\"/ ? - push @lines, &html_debug("<A NAME='$node'></A>\n", __LINE__) : - push @lines, &html_debug("<A NAME=\"$node\"></A>\n", __LINE__); - next; - } elsif ($tag eq 'include') { - if (/^\@include\s+($FILERE)\s*$/o) { - $file = LocateIncludeFile($1); - if ($file && -e $file) { - &open($file); - print "# including $file\n" if $T2H_VERBOSE; - } else { - warn "$ERROR Can't find $1, skipping"; - } - } else { - warn "$ERROR Bad include line: $_"; - } - next; - } elsif ($tag eq 'verbatiminclude') { -# Added for Gmsh -# handles " < > & - - if (/^\@verbatiminclude\s+($FILERE)\s*$/o) { - $file = LocateIncludeFile($1); - if ($file && -e $file) { - print "verbatim including $file\n"; - push @lines, "<PRE>\n"; - open (GG,"<","$file") || die "Cannot open file to include"; - while(<GG>){ - s/&/&/g; - s/\"/"/g; - s/</</g; - s/>/>/g; - push @lines, $_; - } - push @lines, "</PRE>\n"; - } else { - warn "$ERROR Can't find $1, skipping"; - } - } else { - warn "$ERROR Bad verbatiminclude line: $_"; - } - next; - } elsif ($tag eq 'ifclear') { - if (/^\@ifclear\s+($VARRE)\s*$/o) { - next unless defined($value{$1}); - &skip_until($tag); - } else { - warn "$ERROR Bad ifclear line: $_"; - } - next; - } elsif ($tag eq 'ifset') { - if (/^\@ifset\s+($VARRE)\s*$/o) { - next if defined($value{$1}); - &skip_until($tag); - } else { - warn "$ERROR Bad ifset line: $_"; - } - next; - } elsif ($tag eq 'menu') { - unless ($T2H_SHOW_MENU) { - &skip_until($tag); - next; - } - &html_push_if($tag); - push(@lines, &html_debug('', __LINE__)); - } elsif ($format_map{$tag}) { - $in_pre = 1 if $format_map{$tag} eq 'PRE'; - &html_push_if($format_map{$tag}); - push(@lines, &html_debug('', __LINE__)); - $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ; -# push(@lines, &debug("<BLOCKQUOTE>\n", __LINE__)) -# if $tag =~ /example/i; - # sunshine@sunshineco.com: <PRE>bla</PRE> looks better than - # <PRE>\nbla</PRE> (at least on NeXTstep browser - push(@lines, &debug("<$format_map{$tag}>" . - ($in_pre ? '' : "\n"), __LINE__)); - next; - } - elsif (exists $complex_format_map->{$tag}) - { - my $start = eval $complex_format_map->{$tag}->[0]; - if ($@) - { - print "$ERROR: eval of complex_format_map->{$tag}->[0] $complex_format_map->{$tag}->[0]: $@"; - $start = '<pre>' - } - $in_pre = 1 if $start =~ /<pre/; - push(@lines, html_debug($start. ($in_pre ? '' : "\n"), __LINE__)); - next; - } elsif ($tag eq 'table') { - # anorland@hem2.passagen.se - # if (/^\s*\@(|f|v|multi)table\s+\@(\w+)/) { - if (/^\s*\@(|f|v|multi)table\s+\@(\w+)|(\{[^\}]*\})/) { - $in_table = $2; - unshift(@tables, join($;, $table_type, $in_table)); - if ($table_type eq "multi") { - # don't use borders -- gets confused by empty cells - push(@lines, &debug("<TABLE>\n", __LINE__)); - &html_push_if('TABLE'); - } else { - push(@lines, &debug("<DL COMPACT>\n", __LINE__)); - &html_push_if('DL'); - } - push(@lines, &html_debug('', __LINE__)); - } else { - warn "$ERROR Bad table line: $_"; - } - next; - } - elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') - { - if (/^\@$tag\s+(\w+)\s+(\w+)\s*$/) - { - my $from = $1; - my $to = $2; - my $prefix_from = IndexName2Prefix($from); - my $prefix_to = IndexName2Prefix($to); - - warn("$ERROR unknown from index name $from ind syn*index line: $_"), next - unless $prefix_from; - warn("$ERROR unknown to index name $to ind syn*index line: $_"), next - unless $prefix_to; - - if ($tag eq 'syncodeindex') - { - $index_properties->{$prefix_to}->{'from_code'}->{$prefix_from} = 1; - } - else - { - $index_properties->{$prefix_to}->{'from'}->{$prefix_from} = 1; - } - } - else - { - warn "$ERROR Bad syn*index line: $_"; - } - next; - } - elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') - { - if (/^\@$tag\s+(\w+)\s*$/) - { - my $name = $1; - $index_properties->{$name}->{name} = $name; - $index_properties->{$name}->{code} = 1 if $tag eq 'defcodeindex'; - } - else - { - warn "$ERROR Bad defindex line: $_"; - } - next; - } - elsif (/^\@printindex/) - { - push (@lines, "<!--::${section}::-->$_"); - next; - } - elsif ($tag eq 'sp') { - push(@lines, &debug("<P>\n", __LINE__)); - next; - } elsif ($tag eq 'center') { - push(@lines, &debug("<center>\n", __LINE__)); - s/\@center//; - } elsif ($tag eq 'setref') { - &protect_html; # if setref contains '&' for instance - if (/^\@$tag\s*{($NODERE)}\s*$/) { - $setref = $1; - $setref =~ s/\s+/ /g; # normalize - $setref =~ s/ $//; - $node2sec{$setref} = $name; - $sec2node{$name} = $setref; - $node2href{$setref} = "$docu_doc#$docid"; - } else { - warn "$ERROR Bad setref line: $_"; - } - next; - } elsif ($tag eq 'lowersections') { - local ($sec, $level); - while (($sec, $level) = each %sec2level) { - $sec2level{$sec} = $level + 1; - } - next; - } elsif ($tag eq 'raisesections') { - local ($sec, $level); - while (($sec, $level) = each %sec2level) { - $sec2level{$sec} = $level - 1; - } - next; - } - elsif ($tag eq 'macro' || $tag eq 'rmacro') - { - if (/^\@$tag\s*(\w+)\s*(.*)/) - { - my $name = $1; - my @args; - @args = split(/\s*,\s*/ , $1) - if ($2 =~ /^\s*{(.*)}\s*/); - - $macros->{$name}->{Args} = \@args; - $macros->{$name}->{Body} = ''; - while (($_ = &next_line) && $_ !~ /\@end $tag/) - { - $macros->{$name}->{Body} .= $_; - } - die "ERROR: No closing '\@end $tag' found for macro definition of '$name'\n" - unless (/\@end $tag/); - chomp $macros->{$name}->{Body}; - } - else - { - warn "$ERROR: Bad macro defintion $_" - } - next; - } - elsif ($tag eq 'unmacro') - { - delete $macros->{$1} if (/^\@unmacro\s*(\w+)/); - next; - } - elsif ($tag eq 'documentlanguage') - { - SetDocumentLanguage($1) if (!$T2H_LANG && /documentlanguage\s*(\w+)/); - } - elsif (defined($def_map{$tag})) { - if ($def_map{$tag}) { - s/^\@$tag\s+//; - $tag = $def_map{$tag}; - $_ = "\@$tag $_"; - $tag =~ s/\s.*//; - } - } elsif (defined($user_sub{$tag})) { - s/^\@$tag\s+//; - $sub = $user_sub{$tag}; - print "# user $tag = $sub, arg: $_" if $T2H_DEBUG & $DEBUG_USER; - if (defined(&$sub)) { - chop($_); - &$sub($_); - } else { - warn "$ERROR Bad user sub for $tag: $sub\n"; - } - next; - } - if (defined($def_map{$tag})) { - s/^\@$tag\s+//; - if ($tag =~ /x$/) { - # extra definition line - $tag = $`; - $is_extra = 1; - } else { - $is_extra = 0; - } - while (/\{([^\{\}]*)\}/) { - # this is a {} construct - ($before, $contents, $after) = ($`, $1, $'); - # protect spaces - $contents =~ s/\s+/$;9/g; - # restore $_ protecting {} - $_ = "$before$;7$contents$;8$after"; - } - @args = split(/\s+/, &protect_html($_)); - foreach (@args) { - s/$;9/ /g; # unprotect spaces - s/$;7/\{/g; # ... { - s/$;8/\}/g; # ... } - } - $type = shift(@args); - $type =~ s/^\{(.*)\}$/$1/; - print "# def ($tag): {$type} ", join(', ', @args), "\n" - if $T2H_DEBUG & $DEBUG_DEF; - $type .= ':' if (!$T2H_DEF_TABLE); # it's nicer like this - my $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - if ($is_extra) { - $_ = &debug("<DT>", __LINE__) if (!$T2H_DEF_TABLE); - $_ = &debug("", __LINE__) if ($T2H_DEF_TABLE); - #$_ = &debug("<TR TEST1>\n", __LINE__) if ($T2H_DEF_TABLE); - } else { - $_ = &debug("<DL>\n<DT>", __LINE__) if (!$T2H_DEF_TABLE); - $_ = &debug("<TABLE WIDTH=\"100%\">\n", __LINE__) if ($T2H_DEF_TABLE); - } - if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { - if ($T2H_DEF_TABLE) - { - $_ .= "<TR>\n<TD ALIGN=\"LEFT\"><B>$name</B>\n"; - $_ .= " <I>@args</I>" if @args; - $_ .= "</TD>\n"; - $_ .= "<TD ALIGN=\"RIGHT\">"; - $_ .= "$type</TD>\n</TR>\n"; - } - else - { - $_ .= "<U>$type</U> <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } - } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' - || $tag eq 'deftypeop' || $tag eq 'defcv' - || $tag eq 'defop') { - $ftype = $name; - $name = shift(@args); - $name =~ s/^\{(.*)\}$/$1/; - if ($T2H_DEF_TABLE) - { - $_ .= "<TR>\n<TD ALIGN=\"LEFT\"><B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - $_ .= "</TD>\n"; - $_ .= "<TD ALIGN=\"RIGHT\">"; - $_ .= "$type of $ftype</TD>\n</TR>\n"; - } - else - { - $_ .= "<U>$type</U> $ftype <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } - } else { - warn "$ERROR Unknown definition type: $tag\n"; - $_ .= "<U>$type</U> <B>$name</B>"; - $_ .= " <I>@args</I>" if @args; - } - $_ .= &debug("\n<DD>", __LINE__) if (!$T2H_DEF_TABLE); - ########$_ .= &debug("\n</TABLE TEST3>\n<TABLE WIDTH=\"95%\">\n", __LINE__) if ($T2H_DEF_TABLE); - $name = &unprotect_html($name); - if ($tag eq 'deffn' || $tag eq 'deftypefn') { - EnterIndexEntry('f', $name, $docu_doc, $section, \@lines); -# unshift(@input_spool, "\@findex $name\n"); - } elsif ($tag eq 'defop') { - EnterIndexEntry('f', "$name on $ftype", $docu_doc, $section, \@lines); -# unshift(@input_spool, "\@findex $name on $ftype\n"); - } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') { - EnterIndexEntry('v', $name, $docu_doc, $section, \@lines); -# unshift(@input_spool, "\@vindex $name\n"); - } else { - EnterIndexEntry('t', $name, $docu_doc, $section, \@lines); -# unshift(@input_spool, "\@tindex $name\n"); - } - $dont_html = 1; - } - } elsif ($end_tag) { - if ($format_map{$end_tag}) { - $in_pre = 0 if $format_map{$end_tag} eq 'PRE'; - $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ; - &html_pop_if('P'); - &html_pop_if('LI'); - &html_pop_if(); - push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__)); - push(@lines, &html_debug('', __LINE__)); - } - elsif (exists $complex_format_map->{$end_tag}) - { - my $end = eval $complex_format_map->{$end_tag}->[1]; - if ($@) - { - print "$ERROR: eval of complex_format_map->{$end_tag}->[1] $complex_format_map->{$end_tag}->[0]: $@"; - $end = '</pre>' - } - $in_pre = 0 if $end =~ m|</pre>|; - push(@lines, html_debug($end, __LINE__)); - } elsif ($end_tag =~ /^(|f|v|multi)table$/) { - unless (@tables) { - warn "$ERROR \@end $end_tag without \@*table\n"; - next; - } - &html_pop_if('P'); - ($table_type, $in_table) = split($;, shift(@tables)); - unless ($1 eq $table_type) { - warn "$ERROR \@end $end_tag without matching \@$end_tag\n"; - next; - } - if ($table_type eq "multi") { - push(@lines, "</TR></TABLE>\n"); - &html_pop_if('TR'); - } else { - push(@lines, "</DL>\n"); - &html_pop_if('DD'); - } - &html_pop_if(); - if (@tables) { - ($table_type, $in_table) = split($;, $tables[0]); - } else { - $in_table = 0; - } - } elsif (defined($def_map{$end_tag})) { - push(@lines, &debug("</DL>\n", __LINE__)) if (!$T2H_DEF_TABLE); - push(@lines, &debug("</TABLE>\n", __LINE__)) if ($T2H_DEF_TABLE); - } elsif ($end_tag eq 'menu') { - &html_pop_if(); - push(@lines, $_); # must keep it for pass 2 - } - next; - } - ############################################################# - # anchor insertion - while (/\@anchor\s*\{(.*?)\}/) - { - $_ = $`.$'; - my $anchor = $1; - $anchor = &normalise_node($anchor); - push @lines, &html_debug("<A NAME=\"$anchor\"></A>\n"); - $node2href{$anchor} = "$docu_doc#$anchor"; - next INPUT_LINE if $_ =~ /^\s*$/; - } - - ############################################################# - # index entry generation, after value substitutions - if (/^\@(\w+?)index\s+/) - { - EnterIndexEntry($1, $', $docu_doc, $section, \@lines); - next; - } - # - # protect texi and HTML things - &protect_texi; - $_ = &protect_html($_) unless $dont_html; - $dont_html = 0; - # substitution (unsupported things) - s/^\@exdent\s+//g; - s/\@noindent\s+//g; - s/\@refill\s+//g; - # other substitutions - &simple_substitutions; - s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 - # - # analyze the tag again - # - if ($tag) { - if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) { - if (/^\@$tag\s+(.+)$/) { - $name = $1; - $name = &normalise_node($name); - $level = $sec2level{$tag}; - # check for index - $first_index_chapter = $name - if ($level == 1 && !$first_index_chapter && - $name =~ /index/i); - if ($in_top && /heading/){ - $T2H_HAS_TOP_HEADING = 1; - $_ = &debug("<H$level>$name</H$level>\n", __LINE__); - &html_push_if('body'); - print "# top heading, section $name, level $level\n" - if $T2H_DEBUG & $DEBUG_TOC; - } - else - { - unless (/^\@\w*heading/) - { - unless (/^\@unnumbered/) - { - my $number = &update_sec_num($tag, $level); - $name = $number. ' ' . $name if $T2H_NUMBER_SECTIONS; - $sec2number{$name} = $number; - $number2sec{$number} = $name; - } - if (defined($toplevel)) - { - push @lines, ($level==$toplevel ? $CHAPTEREND : $SECTIONEND); - } - else - { - # first time we see a "section" - unless ($level == 1) - { - warn "$WARN The first section found is not of level 1: $_"; - } - $toplevel = $level; - } - push(@sections, $name); - next_doc() if ($T2H_SPLIT eq 'section' || - $T2H_SPLIT && $level == $toplevel); - } - $sec_num++; - $docid = "SEC$sec_num"; - $tocid = (/^\@\w*heading/ ? undef : "TOC$sec_num"); - # check biblio and glossary - $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i); - $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i); - # check node - if ($node) - { - warn "$ERROR Duplicate node found: $node\n" - if ($node2sec{$node}); - } - else - { - $name .= ' ' while ($node2sec{$name}); - $node = $name; - } - $name .= ' ' while ($sec2node{$name}); - $section = $name; - $node2sec{$node} = $name; - $sec2node{$name} = $node; - $node2href{$node} = "$docu_doc#$docid"; - $node2next{$node} = $node_next; - $node2prev{$node} = $node_prev; - $node2up{$node} = $node_up; - print "# node $node, section $name, level $level\n" - if $T2H_DEBUG & $DEBUG_TOC; - - $node = ''; - $node_next = ''; - $node_prev = ''; - $node_next = ''; - if ($tocid) - { - # update TOC - while ($level > $curlevel) { - $curlevel++; - push(@toc_lines, "<UL>\n"); - } - while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "</UL>\n"); - } - $_ = &t2h_anchor($tocid, "$docu_doc#$docid", $name, 1); - $_ = &substitute_style($_); - push(@stoc_lines, "$_<BR>\n") if ($level == 1); - if ($T2H_NUMBER_SECTIONS) - { - push(@toc_lines, $_ . "<BR>\n") - } - else - { - push(@toc_lines, "<LI>" . $_ ."</LI>"); - } - } - else - { - push(@lines, &html_debug("<A NAME=\"$docid\"></A>\n", - __LINE__)); - } - # update DOC - push(@lines, &html_debug('', __LINE__)); - &html_reset; - $_ = "<H$level> $name </H$level>\n<!--docid::${docid}::-->\n"; - $_ = &debug($_, __LINE__); - push(@lines, &html_debug('', __LINE__)); - } - # update DOC - foreach $line (split(/\n+/, $_)) { - push(@lines, "$line\n"); - } - next; - } else { - warn "$ERROR Bad section line: $_"; - } - } else { - # track variables - $value{$1} = Unprotect_texi($2), next if /^\@set\s+($VARRE)\s+(.*)$/o; - delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o; - # store things - $value{'_shorttitle'} = Unprotect_texi($1), next if /^\@shorttitle\s+(.*)$/; - $value{'_setfilename'} = Unprotect_texi($1), next if /^\@setfilename\s+(.*)$/; - $value{'_settitle'} = Unprotect_texi($1), next if /^\@settitle\s+(.*)$/; - $value{'_author'} .= Unprotect_texi($1)."\n", next if /^\@author\s+(.*)$/; - $value{'_subtitle'} .= Unprotect_texi($1)."\n", next if /^\@subtitle\s+(.*)$/; - $value{'_title'} .= Unprotect_texi($1)."\n", next if /^\@title\s+(.*)$/; - - # list item - if (/^\s*\@itemx?\s+/) { - $what = $'; - $what =~ s/\s+$//; - if ($in_bibliography && $use_bibliography) { - if ($what =~ /^$BIBRE$/o) { - $id = 'BIB' . ++$bib_num; - $bib2href{$what} = "$docu_doc#$id"; - print "# found bibliography for '$what' id $id\n" - if $T2H_DEBUG & $DEBUG_BIB; - $what = &t2h_anchor($id, '', $what); - } - } elsif ($in_glossary && $T2H_USE_GLOSSARY) { - $id = 'GLOSS' . ++$gloss_num; - $entry = $what; - $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; - $gloss2href{$entry} = "$docu_doc#$id"; - print "# found glossary for '$entry' id $id\n" - if $T2H_DEBUG & $DEBUG_GLOSS; - $what = &t2h_anchor($id, '', $what); - } - elsif ($in_table && ($table_type eq 'f' || $table_type eq 'v')) - { - EnterIndexEntry($table_type, $what, $docu_doc, $section, \@lines); - } - &html_pop_if('P'); - if ($html_element eq 'DL' || $html_element eq 'DD') { - if ($things_map{$in_table} && !$what) { - # special case to allow @table @bullet for instance - push(@lines, &debug("<DT>$things_map{$in_table}\n", __LINE__)); - } else { - push(@lines, &debug("<DT>\@$in_table\{$what\}\n", __LINE__)); - } - push(@lines, "<DD>"); - &html_push('DD') unless $html_element eq 'DD'; - if ($table_type) { # add also an index - unshift(@input_spool, "\@${table_type}index $what\n"); - } - } elsif ($html_element eq 'TABLE') { - push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__)); - &html_push('TR'); - } elsif ($html_element eq 'TR') { - push(@lines, &debug("</TR>\n", __LINE__)); - push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__)); - } else { - push(@lines, &debug("<LI>$what\n", __LINE__)); - &html_push('LI') unless $html_element eq 'LI'; - } - push(@lines, &html_debug('', __LINE__)); - if ($deferred_ref) { - push(@lines, &debug("$deferred_ref\n", __LINE__)); - $deferred_ref = ''; - } - next; - } elsif (/^\@tab\s+(.*)$/) { - push(@lines, "<TD>$1</TD>\n"); - next; - } - } - } - # paragraph separator - if ($_ eq "\n" && ! $in_pre) { - next if $#lines >= 0 && $lines[$#lines] eq "\n"; - if ($html_element eq 'P') { - push (@lines, &debug("<P>\n", __LINE__)); - } -# else -# { -# push(@lines, "<P></P>\n"); -# $_ = &debug("<P></P>\n", __LINE__); -# } - elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE' || $html_element eq 'DD' || $html_element eq 'LI') - { - &html_push('P'); - push(@lines, &debug("<P>\n", __LINE__)); - } - } - # otherwise - push(@lines, $_) unless $in_titlepage; - push(@lines, &debug("</center>\n", __LINE__)) if ($tag eq 'center'); -} - -# finish TOC -$level = 0; -while ($level < $curlevel) { - $curlevel--; - push(@toc_lines, "</UL>\n"); -} - -print "# end of pass 1\n" if $T2H_VERBOSE; - -SetDocumentLanguage('en') unless ($T2H_LANG); -#+++############################################################################ -# # -# Stuff related to Index generation # -# # -#---############################################################################ - -sub EnterIndexEntry -{ - my $prefix = shift; - my $key = shift; - my $docu_doc = shift; - my $section = shift; - my $lines = shift; - local $_; - - warn "$ERROR Undefined index command: $_", next - unless (exists ($index_properties->{$prefix})); - $key =~ s/\s+$//; - $_ = $key; - &protect_texi; - $key = $_; - $_ = &protect_html($_); - my $html_key = substitute_style($_); - my $id; - $key = remove_style($key); - $key = remove_things($key); - $_ = $key; - &unprotect_texi; - $key = $_; - while (exists $index->{$prefix}->{$key}) {$key .= ' '}; - if ($lines->[$#lines] =~ /^<!--docid::(.+)::-->$/) - { - $id = $1; - } - else - { - $id = 'IDX' . ++$idx_num; - push(@$lines, &t2h_anchor($id, '', $T2H_INVISIBLE_MARK, !$in_pre)); - } - $index->{$prefix}->{$key}->{html_key} = $html_key; - $index->{$prefix}->{$key}->{section} = $section; - $index->{$prefix}->{$key}->{href} = "$docu_doc#$id"; - print "# found ${prefix}index for '$key' with id $id\n" - if $T2H_DEBUG & $DEBUG_INDEX; -} - -sub IndexName2Prefix -{ - my $name = shift; - my $prefix; - - for $prefix (keys %$index_properties) - { - return $prefix if ($index_properties->{$prefix}->{name} eq $name); - } - return undef; -} - -sub GetIndexEntries -{ - my $normal = shift; - my $code = shift; - my ($entries, $prefix, $key) = ({}); - - for $prefix (keys %$normal) - { - for $key (keys %{$index->{$prefix}}) - { - $entries->{$key} = {%{$index->{$prefix}->{$key}}}; - } - } - - if (defined($code)) - { - for $prefix (keys %$code) - { - unless (exists $normal->{$keys}) - { - for $key (keys %{$index->{$prefix}}) - { - $entries->{$key} = {%{$index->{$prefix}->{$key}}}; - $entries->{$key}->{html_key} = "<CODE>$entries->{$key}->{html_key}</CODE>"; - } - } - } - } - return $entries; -} - -sub byAlpha -{ - if ($a =~ /^[A-Za-z]/) - { - if ($b =~ /^[A-Za-z]/) - { - return lc($a) cmp lc($b); - } - else - { - return 1; - } - } - elsif ($b =~ /^[A-Za-z]/) - { - return -1; - } - else - { - return lc($a) cmp lc($b); - } -} - -sub GetIndexPages -{ - my $entries = shift; - my (@Letters, $key); - my ($EntriesByLetter, $Pages, $page) = ({}, [], {}); - my @keys = sort byAlpha keys %$entries; - - for $key (@keys) - { - push @{$EntriesByLetter->{uc(substr($key,0, 1))}} , $entries->{$key}; - } - @Letters = sort byAlpha keys %$EntriesByLetter; - - $T2H_SPLIT_INDEX = 0 unless ($T2H_SPLIT); - - unless ($T2H_SPLIT_INDEX) - { - $page->{First} = $Letters[0]; - $page->{Last} = $Letters[$#Letters]; - $page->{Letters} = \@Letters; - $page->{EntriesByLetter} = $EntriesByLetter; - push @$Pages, $page; - return $Pages; - } - - if ($T2H_SPLIT_INDEX =~ /^\d+$/) - { - my $i = 0; - my ($prev_letter, $letter); - $page->{First} = $Letters[0]; - for $letter (@Letters) - { - if ($i > $T2H_SPLIT_INDEX) - { - $page->{Last} = $prev_letter; - push @$Pages, {%$page}; - $page->{Letters} = []; - $page->{EntriesByLetter} = {}; - $page->{First} = $letter; - $i=0; - } - push @{$page->{Letters}}, $letter; - $page->{EntriesByLetter}->{$letter} = [@{$EntriesByLetter->{$letter}}]; - $i += scalar(@{$EntriesByLetter->{$letter}}); - $prev_letter = $letter; - } - $page->{Last} = $Letters[$#Letters]; - push @$Pages, {%$page}; - } - return $Pages; -} - -sub GetIndexSummary -{ - my $first_page = shift; - my $Pages = shift; - my $name = shift; - my ($page, $letter, $summary, $i, $l1, $l2, $l); - - $i = 0; - $summary = '<table><tr><th valign=top>Jump to: </th><td>'; - - for $page ($first_page, @$Pages) - { - for $letter (@{$page->{Letters}}) - { - $l = t2h_anchor('', "$page->{href}#${name}_$letter", "<b>$letter</b>", - 0, 'style="text-decoration:none"') . "\n \n"; - - if ($letter =~ /^[A-Za-z]/) - { - $l2 .= $l; - } - else - { - $l1 .= $l; - } - } - } - $summary .= $l1 . "<BR>\n" if ($l1); - $summary .= $l2 . '</td></tr></table><br>'; - return $summary; -} - -sub PrintIndexPage -{ - my $lines = shift; - my $summary = shift; - my $page = shift; - my $name = shift; - - push @$lines, $summary; - - push @$lines , <<EOT; -<P></P> -<TABLE border=0> -<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR> -<TR><TD COLSPAN=3> <HR></TD></TR> -EOT - - for $letter (@{$page->{Letters}}) - { - push @$lines, "<TR><TH><A NAME=\"${name}_$letter\"></A>$letter</TH><TD></TD><TD></TD></TR>\n"; - for $entry (@{$page->{EntriesByLetter}->{$letter}}) - { - push @$lines, - "<TR><TD></TD><TD valign=top>" . - t2h_anchor('', $entry->{href}, $entry->{html_key}) . - "</TD><TD valign=top>" . - t2h_anchor('', sec_href($entry->{section}), clean_name($entry->{section})) . - "</TD></TR>\n"; - } - push @$lines, "<TR><TD COLSPAN=3> <HR></TD></TR>\n"; - } - push @$lines, "</TABLE><P></P>"; - push @$lines, $summary; -} - -sub PrintIndex -{ - my $lines = shift; - my $name = shift; - my $section = shift; - $section = 'Top' unless $section; - my $prefix = IndexName2Prefix($name); - - warn ("$ERROR printindex: bad index name: $name"), return - unless $prefix; - - if ($index_properties->{$prefix}->{code}) - { - $index_properties->{$prefix}->{from_code}->{$prefix} = 1; - } - else - { - $index_properties->{$prefix}->{from}->{$prefix}= 1; - } - - my $Entries = GetIndexEntries($index_properties->{$prefix}->{from}, - $index_properties->{$prefix}->{from_code}); - return unless %$Entries; - - if ($T2H_IDX_SUMMARY) - { - my $key; - open(FHIDX, ">$docu_rdir$docu_name" . "_$name.idx") - || die "Can't open > $docu_rdir$docu_name" . "_$name.idx for writing: $!\n"; - print "# writing $name index summary in $docu_rdir$docu_name" . "_$name.idx...\n" if $T2H_VERBOSE; - - for $key (sort keys %$Entries) - { - print FHIDX "$key\t$Entries->{$key}->{href}\n"; - } - } - - my $Pages = GetIndexPages($Entries); - my $page; - my $first_page = shift @$Pages; - my $sec_name = $section; - # remove section number - $sec_name =~ s/.*? // if $sec_name =~ /^([A-Z]|\d+)\./; - - ($first_page->{href} = sec_href($section)) =~ s/\#.*$//; - # Update tree structure of document - if (@$Pages) - { - my $sec; - my @after; - - while (@sections && $sections[$#sections] ne $section) - { - unshift @after, pop @sections; - } - - for $page (@$Pages) - { - my $node = ($page->{First} ne $page->{Last} ? - "$sec_name: $page->{First} -- $page->{Last}" : - "$sec_name: $page->{First}"); - push @sections, $node; - $node2sec{$node} = $node; - $sec2node{$node} = $node; - $node2up{$node} = $section; - $page->{href} = next_doc(); - $page->{name} = $node; - $node2href{$node} = $page->{href}; - if ($prev_node) - { - $node2next{$prev_node} = $node; - $node2prev{$node} = $prev_node; - } - $prev_node = $node; - } - push @sections, @after; - } - - my $summary = GetIndexSummary($first_page, $Pages, $name); - PrintIndexPage($lines, $summary, $first_page, $name); - for $page (@$Pages) - { - push @$lines, ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); - push @$lines, "<H2 ALIGN=\"Left\">$page->{name}</H2>\n"; - PrintIndexPage($lines, $summary, $page, $name); - } -} - - -#+++############################################################################ -# # -# Pass 2/3: handle style, menu, index, cross-reference # -# # -#---############################################################################ - -@lines2 = (); # whole document (2nd pass) -@lines3 = (); # whole document (3rd pass) -$in_menu = 0; # am I inside a menu - -while (@lines) { - $_ = shift(@lines); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@lines2, $_); - next; - } - # - # menu - # - if (/^\@menu\b/) - { - $in_menu = 1; - $in_menu_listing = 1; - push(@lines2, &debug("<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> \n", __LINE__)); - next; - } - if (/^\@end\s+menu\b/) - { - if ($in_menu_listing) - { - push(@lines2, &debug("</TABLE></BLOCKQUOTE>\n", __LINE__)); - } - else - { - push(@lines2, &debug("</BLOCKQUOTE>\n", __LINE__)); - } - $in_menu = 0; - $in_menu_listing = 0; - next; - } - if ($in_menu) - { - my ($node, $name, $descr); - if (/^\*\s+($NODERE)::/o) - { - $node = $1; - $descr = $'; - } - elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) - { - $name = $1; - $node = $2; - $descr = $'; - } - elsif (/^\*/) - { - warn "$ERROR Bad menu line: $_"; - } - else - { - if ($in_menu_listing) - { - $in_menu_listing = 0; - push(@lines2, &debug("</TABLE>\n", __LINE__)); - } - # should be like verbatim -- preseve spaces, etc - s/ /\ /g; - $_ .= "<br>\n"; - push(@lines2, $_); - } - if ($node) - { - if (! $in_menu_listing) - { - $in_menu_listing = 1; - push(@lines2, &debug("<TABLE BORDER=0 CELLSPACING=0>\n", __LINE__)); - } - # look for continuation - while ($lines[0] =~ /^\s+\w+/) - { - $descr .= shift(@lines); - } - &menu_entry($node, $name, $descr); - } - next; - } - # - # printindex - # - PrintIndex(\@lines2, $2, $1), next - if (/^<!--::(.*)::-->\@printindex\s+(\w+)/); - # - # simple style substitutions - # - $_ = &substitute_style($_); - # - # xref - # - while (/\@(x|px|info|)ref{([^{}]+)(}?)/) { - # note: Texinfo may accept other characters - ($type, $nodes, $full) = ($1, $2, $3); - ($before, $after) = ($`, $'); - if (! $full && $after) { - warn "$ERROR Bad xref (no ending } on line): $_"; - $_ = "$before$;0${type}ref\{$nodes$after"; - next; # while xref - } - if ($type eq 'x') { - $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} "; - } elsif ($type eq 'px') { - $type = "$T2H_WORDS->{$T2H_LANG}->{'see'} "; - } elsif ($type eq 'info') { - $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} Info"; - } else { - $type = ''; - } - unless ($full) { - $next = shift(@lines); - $next = &substitute_style($next); - chop($nodes); # remove final newline - if ($next =~ /\}/) { # split on 2 lines - $nodes .= " $`"; - $after = $'; - } else { - $nodes .= " $next"; - $next = shift(@lines); - $next = &substitute_style($next); - chop($nodes); - if ($next =~ /\}/) { # split on 3 lines - $nodes .= " $`"; - $after = $'; - } else { - warn "$ERROR Bad xref (no ending }): $_"; - $_ = "$before$;0xref\{$nodes$after"; - unshift(@lines, $next); - next; # while xref - } - } - } - $nodes =~ s/\s+/ /g; # remove useless spaces - @args = split(/\s*,\s*/, $nodes); - $node = $args[0]; # the node is always the first arg - $node = &normalise_node($node); - $sec = $args[2] || $args[1] || $node2sec{$node}; - $href = $node2href{$node}; - if (@args == 5) { # reference to another manual - $sec = $args[2] || $node; - $man = $args[4] || $args[3]; - $_ = "${before}${type}$T2H_WORDS->{$T2H_LANG}->{'section'} `$sec' in \@cite{$man}$after"; - } elsif ($type =~ /Info/) { # inforef - warn "$ERROR Wrong number of arguments: $_" unless @args == 3; - ($nn, $_, $in) = @args; - $_ = "${before}${type} file `$in', node `$nn'$after"; - } elsif ($sec && $href && ! $T2H_SHORT_REF) { - $_ = "${before}${type}"; - $_ .= "$T2H_WORDS->{$T2H_LANG}->{'section'} " if ${type}; - $_ .= &t2h_anchor('', $href, $sec) . $after; - } - elsif ($href) - { - $_ = "${before}${type} " . - &t2h_anchor('', $href, $args[2] || $args[1] || $node) . - $after; - } - else { - warn "$ERROR Undefined node ($node): $_"; - $_ = "$before$;0xref{$nodes}$after"; - } - } - - # replace images - s[\@image\s*{(.+?)}] - { - my @args = split (/\s*,\s*/, $1); - my $base = $args[0]; - my $image = - LocateIncludeFile("$base.png") || - LocateIncludeFile("$base.jpg") || - LocateIncludeFile("$base.gif"); - warn "$ERROR no image file for $base: $_" unless ($image && -e $image); - "<IMG SRC=\"$image\" ALT=\"$base\">"; - ($T2H_CENTER_IMAGE ? - "<CENTER><IMG SRC=\"$image\" ALT=\"$base\"></CENTER>" : - "<IMG SRC=\"$image\" ALT=\"$base\">"); - }eg; - - # - # try to guess bibliography references or glossary terms - # - unless (/^<H\d><A NAME=\"SEC\d/) { - if ($use_bibliography) { - $done = ''; - while (/$BIBRE/o) { - ($pre, $what, $post) = ($`, $&, $'); - $href = $bib2href{$what}; - if (defined($href) && $post !~ /^[^<]*<\/A>/) { - $done .= $pre . &t2h_anchor('', $href, $what); - } else { - $done .= "$pre$what"; - } - $_ = $post; - } - $_ = $done . $_; - } - if ($T2H_USE_GLOSSARY) { - $done = ''; - while (/\b\w+\b/) { - ($pre, $what, $post) = ($`, $&, $'); - $entry = $what; - $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; - $href = $gloss2href{$entry}; - if (defined($href) && $post !~ /^[^<]*<\/A>/) { - $done .= $pre . &t2h_anchor('', $href, $what); - } else { - $done .= "$pre$what"; - } - $_ = $post; - } - $_ = $done . $_; - } - } - # otherwise - push(@lines2, $_); -} -print "# end of pass 2\n" if $T2H_VERBOSE; - -# -# split style substitutions -# -while (@lines2) { - $_ = shift(@lines2); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@lines3, $_); - next; - } - # - # split style substitutions - # - $old = ''; - while ($old ne $_) { - $old = $_; - if (/\@(\w+)\{/) { - ($before, $style, $after) = ($`, $1, $'); - if (defined($style_map{$style})) { - $_ = $after; - $text = ''; - $after = ''; - $failed = 1; - while (@lines2) { - if (/\}/) { - $text .= $`; - $after = $'; - $failed = 0; - last; - } else { - $text .= $_; - $_ = shift(@lines2); - } - } - if ($failed) { - die "* Bad syntax (\@$style) after: $before\n"; - } else { - $text = &apply_style($style, $text); - $_ = "$before$text$after"; - } - } - } - } - # otherwise - push(@lines3, $_); -} -print "# end of pass 3\n" if $T2H_VERBOSE; - -#+++############################################################################ -# # -# Pass 4: foot notes, final cleanup # -# # -#---############################################################################ - -@foot_lines = (); # footnotes -@doc_lines = (); # final document -$end_of_para = 0; # true if last line is <P> - -while (@lines3) { - $_ = shift(@lines3); - # - # special case (protected sections) - # - if (/^$PROTECTTAG/o) { - push(@doc_lines, $_); - $end_of_para = 0; - next; - } - # - # footnotes - # - while (/\@footnote([^\{\s]+)\{/) { - ($before, $d, $after) = ($`, $1, $'); - $_ = $after; - $text = ''; - $after = ''; - $failed = 1; - while (@lines3) { - if (/\}/) { - $text .= $`; - $after = $'; - $failed = 0; - last; - } else { - $text .= $_; - $_ = shift(@lines3); - } - } - if ($failed) { - die "* Bad syntax (\@footnote) after: $before\n"; - } else { - $foot_num++; - $docid = "DOCF$foot_num"; - $footid = "FOOT$foot_num"; - $foot = "($foot_num)"; - push(@foot_lines, "<H3>" . &t2h_anchor($footid, "$d#$docid", $foot) . "</H3>\n"); - $text = "<P>$text" unless $text =~ /^\s*<P>/; - push(@foot_lines, "$text\n"); - $_ = $before . &t2h_anchor($docid, "$docu_foot#$footid", $foot) . $after; - } - } - # - # remove unnecessary <P> - # - if (/^\s*<P>\s*$/) { - next if $end_of_para++; - } else { - $end_of_para = 0; - } - # otherwise - push(@doc_lines, $_); -} - -print "# end of pass 4\n" if $T2H_VERBOSE; - -#+++############################################################################ -# # -# Pass 5: print things # -# # -#---############################################################################ - -$T2H_L2H = &l2h_FinishToLatex if ($T2H_L2H); -$T2H_L2H = &l2h_ToHtml if ($T2H_L2H); -$T2H_L2H = &l2h_InitFromHtml if ($T2H_L2H); - -# fix node2up, node2prev, node2next, if desired -if ($has_top_command) -{ - for $section (keys %sec2number) - { - $node = $sec2node{$section}; - $node2up{$node} = Sec2UpNode($section) unless $node2up{$node}; - $node2prev{$node} = Sec2PrevNode($section) unless $node2prev{$node}; - $node2next{$node} = Sec2NextNode($section) unless $node2next{$node}; - } -} - -# prepare %T2H_THISDOC -$T2H_THISDOC{fulltitle} = $value{'_title'} || $value{'_settitle'} || "Untitled Document"; -$T2H_THISDOC{title} = $value{'_settitle'} || $T2H_THISDOC{fulltitle}; -$T2H_THISDOC{author} = $value{'_author'}; -$T2H_THISDOC{subtitle} = $value{'_subtitle'}; -$T2H_THISDOC{shorttitle} = $value{'_shorttitle'}; -for $key (keys %T2H_THISDOC) -{ - $_ = &substitute_style($T2H_THISDOC{$key}); - &unprotect_texi; - s/\s*$//; - $T2H_THISDOC{$key} = $_; -} - -# if no sections, then simply print document as is -unless (@sections) -{ - print "# Writing content into $docu_top_file \n" if $T2H_VERBOSE; - open(FILE, "> $docu_top_file") - || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; - - &$T2H_print_page_head(\*FILE); - $T2H_THIS_SECTION = \@doc_lines; - t2h_print_lines(\*FILE); - &$T2H_print_foot_navigation(\*FILE); - &$T2H_print_page_foot(\*FILE); - close(FILE); - goto Finish; -} - -# initialize $T2H_HREF, $T2H_NAME -%T2H_HREF = - ( - 'First' , sec_href($sections[0]), - 'Last', sec_href($sections[$#sections]), - 'About', $docu_about. '#SEC_About', - ); - -# prepare TOC, OVERVIEW, TOP -$T2H_TOC = \@toc_lines; -$T2H_OVERVIEW = \@stoc_lines; -if ($has_top) -{ - while (1) - { - $_ = shift @doc_lines; - last if /$TOPEND/; - push @$T2H_TOP, $_; - } - $T2H_HREF{'Top'} = $docu_top . '#SEC_Top'; -} -else -{ - $T2H_HREF{'Top'} = $T2H_HREF{First}; -} - -$node2href{Top} = $T2H_HREF{Top}; -$T2H_HREF{Contents} = $docu_toc.'#SEC_Contents' if @toc_lines; -$T2H_HREF{Overview} = $docu_stoc.'#SEC_OVERVIEW' if @stoc_lines; - -# settle on index -if ($T2H_INDEX_CHAPTER) -{ - $T2H_HREF{Index} = $node2href{normalise_node($T2H_INDEX_CHAPTER)}; - warn "$ERROR T2H_INDEX_CHAPTER '$T2H_INDEX_CHAPTER' not found\n" - unless $T2H_HREF{Index}; -} -if (! $T2H_HREF{Index} && $first_index_chapter) -{ - $T2H_INDEX_CHAPTER = $first_index_chapter; - $T2H_HREF{Index} = $node2href{$T2H_INDEX_CHAPTER}; -} - -print "# Using '" . clean_name($T2H_INDEX_CHAPTER) . "' as index page\n" - if ($T2H_VERBOSE && $T2H_HREF{Index}); - -%T2H_NAME = - ( - 'First', clean_name($sec2node{$sections[0]}), - 'Last', clean_name($sec2node{$sections[$#sections]}), - 'About', $T2H_WORDS->{$T2H_LANG}->{'About_Title'}, - 'Contents', $T2H_WORDS->{$T2H_LANG}->{'ToC_Title'}, - 'Overview', $T2H_WORDS->{$T2H_LANG}->{'Overview_Title'}, - 'Index' , clean_name($T2H_INDEX_CHAPTER), - 'Top', clean_name($T2H_TOP_HEADING || $T2H_THISDOC{'title'} || $T2H_THISDOC{'shorttitle'}), - ); - -############################################################################# -# print frame and frame toc file -# -if ( $T2H_FRAMES ) -{ - open(FILE, "> $docu_frame_file") - || die "$ERROR: Can't open $docu_frame_file for writing: $!\n"; - print "# Creating frame in $docu_frame_file ...\n" if $T2H_VERBOSE; - &$T2H_print_frame(\*FILE); - close(FILE); - - open(FILE, "> $docu_toc_frame_file") - || die "$ERROR: Can't open $docu_toc_frame_file for writing: $!\n"; - print "# Creating toc frame in $docu_frame_file ...\n" if $T2H_VERBOSE; - &$T2H_print_toc_frame(\*FILE); - close(FILE); -} - - -############################################################################# -# print Top -# -open(FILE, "> $docu_top_file") - || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; -&$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT); - -if ($has_top) -{ - print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE; - $T2H_THIS_SECTION = $T2H_TOP; - $T2H_HREF{This} = $T2H_HREF{Top}; - $T2H_NAME{This} = $T2H_NAME{Top}; - &$T2H_print_Top(\*FILE); -} - -close(FILE) if $T2H_SPLIT; - -############################################################################# -# Print sections -# -$T2H_NODE{Forward} = $sec2node{$sections[0]}; -$T2H_NAME{Forward} = &clean_name($sec2node{$sections[0]}); -$T2H_HREF{Forward} = sec_href($sections[0]); -$T2H_NODE{This} = 'Top'; -$T2H_NAME{This} = $T2H_NAME{Top}; -$T2H_HREF{This} = $T2H_HREF{Top}; -if ($T2H_SPLIT) -{ - print "# writing " . scalar(@sections) . - " sections in $docu_rdir$docu_name"."_[1..$doc_num]" - if $T2H_VERBOSE; - $previous = ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); - undef $FH; - $doc_num = 0; -} -else -{ - print "# writing " . scalar(@sections) . " sections in $docu_top_file ..." - if $T2H_VERBOSE; - $FH = \*FILE; - $previous = ''; -} - -$counter = 0; -# loop through sections -while ($section = shift(@sections)) -{ - if ($T2H_SPLIT && ($T2H_SPLIT eq 'section' || $previous eq $CHAPTEREND)) - { - if ($FH) - { - #close previous page - &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; - &$T2H_print_page_foot($FH); - close($FH); - undef $FH; - } - } - $T2H_NAME{Back} = $T2H_NAME{This}; - $T2H_HREF{Back} = $T2H_HREF{This}; - $T2H_NODE{Back} = $T2H_NODE{This}; - $T2H_NAME{This} = $T2H_NAME{Forward}; - $T2H_HREF{This} = $T2H_HREF{Forward}; - $T2H_NODE{This} = $T2H_NODE{Forward}; - if ($sections[0]) - { - $T2H_NODE{Forward} = $sec2node{$sections[0]}; - $T2H_NAME{Forward} = &clean_name($T2H_NODE{Forward}); - $T2H_HREF{Forward} = sec_href($sections[0]); - } - else - { - undef $T2H_HREF{Forward}, $T2H_NODE{Forward}, $T2H_NAME{Forward}; - } - - $node = $node2up{$T2H_NODE{This}}; - $T2H_HREF{Up} = $node2href{$node}; - if ($T2H_HREF{Up} eq $T2H_HREF{This} || ! $T2H_HREF{Up}) - { - $T2H_NAME{Up} = $T2H_NAME{Top}; - $T2H_HREF{Up} = $T2H_HREF{Top}; - $T2H_NODE{Up} = 'Up'; - } - else - { - $T2H_NAME{Up} = &clean_name($node); - $T2H_NODE{Up} = $node; - } - - $node = $T2H_NODE{This}; - $node = $node2prev{$node}; - $T2H_NAME{Prev} = &clean_name($node); - $T2H_HREF{Prev} = $node2href{$node}; - $T2H_NODE{Prev} = $node; - - $node = $T2H_NODE{This}; - if ($node2up{$node} && $node2up{$node} ne 'Top'&& - ($node2prev{$node} eq $T2H_NODE{Back} || ! $node2prev{$node})) - { - $node = $node2up{$node}; - while ($node && $node ne $node2up{$node} && ! $node2prev{$node}) - { - $node = $node2up{$node}; - } - $node = $node2prev{$node} - unless $node2up{$node} eq 'Top' || ! $node2up{$node}; - } - else - { - $node = $node2prev{$node}; - } - $T2H_NAME{FastBack} = &clean_name($node); - $T2H_HREF{FastBack} = $node2href{$node}; - $T2H_NODE{FastBack} = $node; - - $node = $T2H_NODE{This}; - $node = $node2next{$node}; - $T2H_NAME{Next} = &clean_name($node); - $T2H_HREF{Next} = $node2href{$node}; - $T2H_NODE{Next} = $node; - - $node = $T2H_NODE{This}; - if ($node2up{$node} && $node2up{$node} ne 'Top'&& - ($node2next{$node} eq $T2H_NODE{Forward} || ! $node2next{$node})) - { - $node = $node2up{$node}; - while ($node && $node ne $node2up{$node} && ! $node2next{$node}) - { - $node = $node2up{$node}; - } - } - $node = $node2next{$node}; - $T2H_NAME{FastForward} = &clean_name($node); - $T2H_HREF{FastForward} = $node2href{$node}; - $T2H_NODE{FastForward} = $node; - - if (! defined($FH)) - { - my $file = $T2H_HREF{This}; - $file =~ s/\#.*$//; - open(FILE, "> $docu_rdir$file") || - die "$ERROR: Can't open $docu_rdir$file for writing: $!\n"; - $FH = \*FILE; - &$T2H_print_page_head($FH); - t2h_print_label($FH); - &$T2H_print_chapter_header($FH) if $T2H_SPLIT eq 'chapter'; - } - else - { - t2h_print_label($FH); - } - - $T2H_THIS_SECTION = []; - while (@doc_lines) { - $_ = shift(@doc_lines); - last if ($_ eq $SECTIONEND || $_ eq $CHAPTEREND); - push(@$T2H_THIS_SECTION, $_); - } - $previous = $_; - &$T2H_print_section($FH); - - if ($T2H_VERBOSE) - { - $counter++; - print "." if $counter =~ /00$/; - } -} -if ($T2H_SPLIT) -{ - &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; - &$T2H_print_page_foot($FH); - close($FH); -} -print "\n" if $T2H_VERBOSE; - -############################################################################# -# Print ToC, Overview, Footnotes -# -undef $T2H_HREF{Prev}; -undef $T2H_HREF{Next}; -undef $T2H_HREF{Back}; -undef $T2H_HREF{Forward}; -undef $T2H_HREF{Up}; - -if (@foot_lines) -{ - print "# writing Footnotes in $docu_foot_file...\n" if $T2H_VERBOSE; - open (FILE, "> $docu_foot_file") || die "$ERROR: Can't open $docu_foot_file for writing: $!\n" - if $T2H_SPLIT; - $T2H_HREF{This} = $docu_foot; - $T2H_NAME{This} = $T2H_WORDS->{$T2H_LANG}->{'Footnotes_Title'}; - $T2H_THIS_SECTION = \@foot_lines; - &$T2H_print_Footnotes(\*FILE); - close(FILE) if $T2H_SPLIT; -} - -if (@toc_lines) -{ - print "# writing Toc in $docu_toc_file...\n" if $T2H_VERBOSE; - open (FILE, "> $docu_toc_file") || die "$ERROR: Can't open $docu_toc_file for writing: $!\n" - if $T2H_SPLIT; - $T2H_HREF{This} = $T2H_HREF{Contents}; - $T2H_NAME{This} = $T2H_NAME{Contents}; - $T2H_THIS_SECTION = \@toc_lines; - &$T2H_print_Toc(\*FILE); - close(FILE) if $T2H_SPLIT; -} - -if (@stoc_lines) -{ - print "# writing Overview in $docu_stoc_file...\n" if $T2H_VERBOSE; - open (FILE, "> $docu_stoc_file") || die "$ERROR: Can't open $docu_stoc_file for writing: $!\n" - if $T2H_SPLIT; - - $T2H_HREF{This} = $T2H_HREF{Overview}; - $T2H_NAME{This} = $T2H_NAME{Overview}; - $T2H_THIS_SECTION = \@stoc_lines; - unshift @$T2H_THIS_SECTION, "<BLOCKQUOTE>\n"; - push @$T2H_THIS_SECTION, "\n</BLOCKQUOTE>\n"; - &$T2H_print_Overview(\*FILE); - close(FILE) if $T2H_SPLIT; -} - -if ($about_body = &$T2H_about_body()) -{ - print "# writing About in $docu_about_file...\n" if $T2H_VERBOSE; - open (FILE, "> $docu_about_file") || die "$ERROR: Can't open $docu_about_file for writing: $!\n" - if $T2H_SPLIT; - - $T2H_HREF{This} = $T2H_HREF{About}; - $T2H_NAME{This} = $T2H_NAME{About}; - $T2H_THIS_SECTION = [$about_body]; - &$T2H_print_About(\*FILE); - close(FILE) if $T2H_SPLIT; -} - -unless ($T2H_SPLIT) -{ - &$T2H_print_page_foot(\*FILE); - close (FILE); -} - -Finish: -&l2h_FinishFromHtml if ($T2H_L2H); -&l2h_Finish if($T2H_L2H); -print "# that's all folks\n" if $T2H_VERBOSE; - -exit(0); - -#+++############################################################################ -# # -# Low level functions # -# # -#---############################################################################ - -sub LocateIncludeFile -{ - my $file = shift; - my $dir; - - return $file if (-e $file && -r $file); - foreach $dir (@T2H_INCLUDE_DIRS) - { - return "$dir/$file" if (-e "$dir/$file" && -r "$dir/$file"); - } - return undef; -} - -sub clean_name -{ - local ($_); - $_ = &remove_style($_[0]); - &unprotect_texi; - return $_; -} - -sub update_sec_num { - local($name, $level) = @_; - my $ret; - - $level--; # here we start at 0 - if ($name =~ /^appendix/ || defined(@appendix_sec_num)) { - # appendix style - if (defined(@appendix_sec_num)) { - &incr_sec_num($level, @appendix_sec_num); - } else { - @appendix_sec_num = ('A', 0, 0, 0); - } - $ret = join('.', @appendix_sec_num[0..$level]); - } else { - # normal style - if (defined(@normal_sec_num)) - { - &incr_sec_num($level, @normal_sec_num); - } - else - { - @normal_sec_num = (1, 0, 0, 0); - } - $ret = join('.', @normal_sec_num[0..$level]); - } - - $ret .= "." if $level == 0; - return $ret; -} - -sub incr_sec_num { - local($level, $l); - $level = shift(@_); - $_[$level]++; - foreach $l ($level+1 .. 3) { - $_[$l] = 0; - } -} - -sub Sec2UpNode -{ - my $sec = shift; - my $num = $sec2number{$sec}; - - return '' unless $num; - return 'Top' unless $num =~ /\.\d+/; - $num =~ s/\.[^\.]*$//; - $num = $num . '.' unless $num =~ /\./; - return $sec2node{$number2sec{$num}}; -} - -sub Sec2PrevNode -{ - my $sec = shift; - my $num = $sec2number{$sec}; - my ($i, $post); - - if ($num =~ /(\w+)(\.$|$)/) - { - $num = $`; - $i = $1; - $post = $2; - if ($i eq 'A') - { - $i = $normal_sec_num[0]; - } - elsif ($i ne '1') - { - # unfortunately, -- operator is not magical - $i = chr(ord($i) + 1); - } - else - { - return ''; - } - return $sec2node{$number2sec{$num . $i . $post}} - } - return ''; -} - -sub Sec2NextNode -{ - my $sec = shift; - my $num = $sec2number{$sec}; - my $i; - - if ($num =~ /(\w+)(\.$|$)/) - { - $num = $`; - $i = $1; - $post = $2; - if ($post eq '.' && $i eq $normal_sec_num[0]) - { - $i = 'A'; - } - else - { - $i++; - } - return $sec2node{$number2sec{$num . $i . $post}} - } - return ''; -} - -sub check { - local($_, %seen, %context, $before, $match, $after); - - while (<>) { - if (/\@(\*|\.|\:|\@|\{|\})/) { - $seen{$&}++; - $context{$&} .= "> $_" if $T2H_VERBOSE; - $_ = "$`XX$'"; - redo; - } - if (/\@(\w+)/) { - ($before, $match, $after) = ($`, $&, $'); - if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address - $seen{'e-mail address'}++; - $context{'e-mail address'} .= "> $_" if $T2H_VERBOSE; - } else { - $seen{$match}++; - $context{$match} .= "> $_" if $T2H_VERBOSE; - } - $match =~ s/^\@/X/; - $_ = "$before$match$after"; - redo; - } - } - - foreach (sort(keys(%seen))) { - if ($T2H_VERBOSE) { - print "$_\n"; - print $context{$_}; - } else { - print "$_ ($seen{$_})\n"; - } - } -} - -sub open { - local($name) = @_; - - ++$fh_name; - if (open($fh_name, $name)) { - unshift(@fhs, $fh_name); - } else { - warn "$ERROR Can't read file $name: $!\n"; - } -} - -sub init_input { - @fhs = (); # hold the file handles to read - @input_spool = (); # spooled lines to read - $fh_name = 'FH000'; - &open($docu); -} - -sub next_line { - local($fh, $line); - - if (@input_spool) { - $line = shift(@input_spool); - return($line); - } - while (@fhs) { - $fh = $fhs[0]; - $line = <$fh>; - return($line) if $line; - close($fh); - shift(@fhs); - } - return(undef); -} - -# used in pass 1, use &next_line -sub skip_until { - local($tag) = @_; - local($_); - - while ($_ = &next_line) { - return if /^\@end\s+$tag\s*$/; - } - die "* Failed to find '$tag' after: " . $lines[$#lines]; -} - -# used in pass 1 for l2h use &next_line -sub string_until { - local($tag) = @_; - local($_, $string); - - while ($_ = &next_line) { - return $string if /^\@end\s+$tag\s*$/; -# $_ =~ s/hbox/mbox/g; - $string = $string.$_; - } - die "* Failed to find '$tag' after: " . $lines[$#lines]; -} - -# -# HTML stacking to have a better HTML output -# - -sub html_reset { - @html_stack = ('html'); - $html_element = 'body'; -} - -sub html_push { - local($what) = @_; - push(@html_stack, $html_element); - $html_element = $what; -} - -sub html_push_if { - local($what) = @_; - push(@html_stack, $html_element) - if ($html_element && $html_element ne 'P'); - $html_element = $what; -} - -sub html_pop { - $html_element = pop(@html_stack); -} - -sub html_pop_if { - local($elt); - - if (@_) { - foreach $elt (@_) { - if ($elt eq $html_element) { - $html_element = pop(@html_stack) if @html_stack; - last; - } - } - } else { - $html_element = pop(@html_stack) if @html_stack; - } -} - -sub html_debug { - local($what, $line) = @_; - if ($T2H_DEBUG & $DEBUG_HTML) - { - $what = "\n" unless $what; - return("<!-- $line @html_stack, $html_element -->$what") - } - return($what); -} - -# to debug the output... -sub debug { - local($what, $line) = @_; - return("<!-- $line -->$what") - if $T2H_DEBUG & $DEBUG_HTML; - return($what); -} - -sub SimpleTexi2Html -{ - local $_ = $_[0]; - &protect_texi; - &protect_html; - $_ = substitute_style($_); - $_[0] = $_; -} - -sub normalise_node { - local $_ = $_[0]; - s/\s+/ /g; - s/ $//; - s/^ //; - &protect_texi; - &protect_html; - $_ = substitute_style($_); - $_[0] = $_; -} - -sub menu_entry -{ - my ($node, $name, $descr) = @_; - my ($href, $entry); - - &normalise_node($node); - $href = $node2href{$node}; - if ($href) - { - $descr =~ s/^\s+//; - $descr =~ s/\s*$//; - $descr = SimpleTexi2Html($descr); - if ($T2H_NUMBER_SECTIONS && !$T2H_NODE_NAME_IN_MENU && $node2sec{$node}) - { - $entry = $node2sec{$node}; - $name = ''; - } - else - { - &normalise_node($name); - $entry = ($name && ($name ne $node || ! $T2H_AVOID_MENU_REDUNDANCY) - ? "$name : $node" : $node); - } - - if ($T2H_AVOID_MENU_REDUNDANCY && $descr) - { - my $clean_entry = $entry; - $clean_entry =~ s/^.*? // if ($clean_entry =~ /^([A-Z]|\d+)\.[\d\.]* /); - $clean_entry =~ s/[^\w]//g; - my $clean_descr = $descr; - $clean_descr =~ s/[^\w]//g; - $descr = '' if ($clean_entry eq $clean_descr) - } - push(@lines2,&debug('<TR><TD ALIGN="left" VALIGN="TOP">' . - &t2h_anchor('', $href, $entry) . - '</TD><TD> </TD><TD ALIGN="left" VALIGN="TOP">' . - $descr . - "</TD></TR>\n", __LINE__)); - } - elsif ($node =~ /^\(.*\)\w+/) - { - push(@lines2,&debug('<TR><TD ALIGN="left" VALIGN="TOP">' . - $entry . - '</TD><TD ALIGN="left" VALIGN="TOP">' . $descr . - "</TD></TR>\n", __LINE__)) - } - else - { - warn "$ERROR Undefined node of menu_entry ($node): $_"; - } -} - -sub do_ctrl { "^$_[0]" } - -sub do_email { - local($addr, $text) = split(/,\s*/, $_[0]); - - $text = $addr unless $text; - &t2h_anchor('', "mailto:$addr", $text); -} - -sub do_sc -{ - # l2h does this much better - return &l2h_ToLatex("{\\sc ".&unprotect_html($_[0])."}") if ($T2H_L2H); - return "\U$_[0]\E"; -} - -sub do_math -{ - return &l2h_ToLatex("\$".&unprotect_html($_[0])."\$") if ($T2H_L2H); - return "<EM>".$text."</EM>"; -} - -sub do_uref { - local($url, $text, $only_text) = split(/,\s*/, $_[0]); - - $text = $only_text if $only_text; - $text = $url unless $text; - &t2h_anchor('', $url, $text); -} - -sub do_url { &t2h_anchor('', $_[0], $_[0]) } - -sub do_acronym -{ - return '<FONT SIZE="-1">' . $_[0] . '</FONT>'; -} - -sub do_accent -{ - return "&$_[0]acute;" if $_[1] eq 'H'; - return "$_[0]." if $_[1] eq 'dotaccent'; - return "$_[0]*" if $_[1] eq 'ringaccent'; - return "$_[0]".'[' if $_[1] eq 'tieaccent'; - return "$_[0]".'(' if $_[1] eq 'u'; - return "$_[0]_" if $_[1] eq 'ubaraccent'; - return ".$_[0]" if $_[1] eq 'udotaccent'; - return "$_[0]<" if $_[1] eq 'v'; - return "&$_[0]cedil;" if $_[1] eq ','; - return "$_[0]" if $_[1] eq 'dotless'; - return undef; -} - -sub apply_style { - local($texi_style, $text) = @_; - local($style); - - $style = $style_map{$texi_style}; - if (defined($style)) { # known style - if ($style =~ /^\"/) { # add quotes - $style = $'; - $text = "\`$text\'"; - } - if ($style =~ /^\&/) { # custom - $style = $'; - $text = &$style($text, $texi_style); - } elsif ($style) { # good style - $text = "<$style>$text</$style>"; - } else { # no style - } - } else { # unknown style - $text = undef; - } - return($text); -} - -# remove Texinfo styles -sub remove_style { - local($_) = @_; - 1 while(s/\@\w+{([^\{\}]+)}/$1/g); - return($_); -} - -sub remove_things -{ - local ($_) = @_; - s|\@(\w+)\{\}|$1|g; - return $_; -} - -sub substitute_style { - local($_) = @_; - local($changed, $done, $style, $text); - - &simple_substitutions; - $changed = 1; - while ($changed) { - $changed = 0; - $done = ''; - while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) { - $text = &apply_style($1, $2); - if ($text) { - $_ = "$`$text$'"; - $changed = 1; - } else { - $done .= "$`\@$1"; - $_ = "{$2}$'"; - } - } - $_ = $done . $_; - } - return($_); -} - -sub t2h_anchor { - local($name, $href, $text, $newline, $extra_attribs) = @_; - local($result); - - $result = "<A"; - $result .= " NAME=\"$name\"" if $name; - if ($href) - { - $href =~ s|^$T2H_HREF_DIR_INSTEAD_FILE|./| - if ($T2H_HREF_DIR_INSTEAD_FILE); - $result .= ($href =~ /\"/ ? " HREF='$href'" : " HREF=\"$href\""); - } - $result .= " $extra_attribs" if $extra_attribs; - $result .= ">$text</A>"; - $result .= "\n" if $newline; - return($result); -} - -sub pretty_date { - local(@MoY, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); - - @MoY = ('January', 'February', 'March', 'April', 'May', 'June', - 'July', 'August', 'September', 'October', 'November', 'December'); - ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); - $year += ($year < 70) ? 2000 : 1900; - # obachman: Let's do it as the Americans do - return("$MoY[$mon], $mday $year"); -} - -sub doc_href { - local($num) = @_; - - return("${docu_name}_$num.$docu_ext"); -} - -sub sec_href -{ - return $node2href{$sec2node{$_[0]}}; -} - -sub next_doc { - $docu_doc = &doc_href(++$doc_num); -} - -sub t2h_print_lines { - my ($fh, $lines) = @_; - local($_); - $lines = $T2H_THIS_SECTION unless $lines; - my $cnt = 0; - for (@$lines) - { - $_ = l2h_FromHtml($_) if ($T2H_L2H); - if (/^$PROTECTTAG/o) { - $_ = $tag2pro{$_}; - } else { - &unprotect_texi; - } - print $fh $_; - $cnt += split(/\W*\s+\W*/); - } - return $cnt; -} - -sub protect_texi { - # protect @ { } ` ' - s/\@\@/$;0/go; - s/\@\{/$;1/go; - s/\@\}/$;2/go; - s/\@\`/$;3/go; - s/\@\'/$;4/go; -} - -sub protect_html { - local($what) = @_; - # protect & < > - $what =~ s/\&/\&\#38;/g; - $what =~ s/\</\&\#60;/g; - $what =~ s/\>/\&\#62;/g; - # restore anything in quotes - # this fixes my problem where I had: - # < IMG SRC="leftarrow.gif" ALT="<--" > but what if I wanted < in my ALT text ?? - # maybe byte stuffing or some other technique should be used. - $what =~ s/\"([^\&]+)\&\#60;(.*)\"/"$1<$2"/g; - $what =~ s/\"([^\&]+)\&\#62;(.*)\"/"$1>$2"/g; - $what =~ s/\"([^\&]+)\&\#38;(.*)\"/"$1&$2"/g; - # but recognize some HTML things - $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # </A> - $what =~ s/\&\#60;A ([^\&]+)\&\#62;/<A $1>/g; # <A [^&]+> - $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;/<IMG $1>/g; # <IMG [^&]+> - return($what); -} - -sub unprotect_texi { - s/$;0/\@/go; - s/$;1/\{/go; - s/$;2/\}/go; - s/$;3/\`/go; - s/$;4/\'/go; -} - -sub Unprotect_texi -{ - local $_ = shift; - &unprotect_texi; - return($_); -} - -sub unprotect_html { - local($what) = @_; - $what =~ s/\&\#38;/\&/g; - $what =~ s/\&\#60;/\</g; - $what =~ s/\&\#62;/\>/g; - return($what); -} - -sub t2h_print_label -{ - my $fh = shift; - my $href = shift || $T2H_HREF{This}; - $href =~ s/.*#(.*)$/$1/; - print $fh qq{<A NAME="$href"></A>\n}; -} - -############################################################################## - - # These next few lines are legal in both Perl and nroff. - -.00 ; # finish .ig - -'di \" finish diversion--previous line must be blank -.nr nl 0-1 \" fake up transition to first page again -.nr % 0 \" start at page 1 -'; __END__ ############# From here on it's a standard manual page ############ -.so /usr/local/man/man1/texi2html.1 diff --git a/doc/texinfo/texinfo.tex b/doc/texinfo/texinfo.tex index fb8e64d591a8f9975a58634ded2df7a8118540aa..c49e670b02db360f171da3efcfb64ee430086c0a 100644 --- a/doc/texinfo/texinfo.tex +++ b/doc/texinfo/texinfo.tex @@ -1,19 +1,18 @@ -% modified for gmsh -- see 'gmsh' tags -% % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2003-03-22.08} +\def\texinfoversion{2007-09-03.05} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007 Free Software Foundation, Inc. % -% This texinfo.tex file is free software; you can redistribute it and/or +% This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as -% published by the Free Software Foundation; either version 2, or (at -% your option) any later version. +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty @@ -21,27 +20,20 @@ % General Public License for more details. % % You should have received a copy of the GNU General Public License -% along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -% Boston, MA 02111-1307, USA. +% along with this program. If not, see <http://www.gnu.org/licenses/>. % -% In other words, you are welcome to use, share and improve this program. -% You are forbidden to forbid anyone else to use, share and improve -% what you give them. Help stamp out software-hoarding! +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex -% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) +% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex -% (and all CTAN mirrors, see http://www.ctan.org), -% and /home/gd/gnu/doc/texinfo.tex on the GNU machines. -% -% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. -% -% The texinfo.tex in any given Texinfo distribution could well be out +% (and all CTAN mirrors, see http://www.ctan.org). +% The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. -% +% % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. @@ -57,10 +49,13 @@ % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. -% +% % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + \message{Loading texinfo [version \texinfoversion]:} @@ -70,7 +65,7 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} -\message{Basics,} + \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. @@ -87,11 +82,16 @@ \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! +\let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ @@ -102,6 +102,15 @@ % starts a new line in the output. \newlinechar = `^^J +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi @@ -140,43 +149,83 @@ \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi -\ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi -\ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi -% In some macros, we cannot use the `\? notation---the left quote is -% in some cases the escape char. +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. \chardef\colonChar = `\: \chardef\commaChar = `\, +\chardef\dashChar = `\- \chardef\dotChar = `\. -\chardef\equalChar = `\= \chardef\exclamChar= `\! +\chardef\lquoteChar= `\` \chardef\questChar = `\? +\chardef\rquoteChar= `\' \chardef\semiChar = `\; -\chardef\spaceChar = `\ % \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} -% True if #1 is the empty string, i.e., called like `\ifempty{}'. -% -\def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}% -\def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}% +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. -\hyphenation{ap-pen-dix} -\hyphenation{eshell} -\hyphenation{mini-buf-fer mini-buf-fers} -\hyphenation{time-stamp} -\hyphenation{white-space} +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make @@ -201,12 +250,12 @@ \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex - \errorcontextlines\maxdimen + \errorcontextlines16 }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. -% +% \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount @@ -228,6 +277,50 @@ \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} @@ -245,7 +338,9 @@ % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% @@ -253,13 +348,17 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % - \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if - % the page break happens to be in the middle of an example. + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. - \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize @@ -284,9 +383,9 @@ \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. - % (We lessened \vsize for it in \oddfootingxxx.) + % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. - \vskip 2\baselineskip + \vskip 24pt \unvbox\footlinebox \fi % @@ -307,7 +406,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox - }% end of group with \normalturnoffactive + }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -320,7 +419,7 @@ % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 +\dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } @@ -340,132 +439,161 @@ % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % -\def\parsearg#1{% - \let\next = #1% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% \begingroup \obeylines - \futurelet\temp\parseargx -} - -% If the next token is an obeyed space (from an @example environment or -% the like), remove it and recurse. Otherwise, we're done. -\def\parseargx{% - % \obeyedspace is defined far below, after the definition of \sepspaces. - \ifx\obeyedspace\temp - \expandafter\parseargdiscardspace - \else - \expandafter\parseargline - \fi + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. } -% Remove a single space (as the delimiter token to the macro call). -{\obeyspaces % - \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} - {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. - % - % First remove any @c comment, then any @comment. - % Result of each macro is put in \toks0. - \argremovec #1\c\relax % - \expandafter\argremovecomment \the\toks0 \comment\relax % - % - % Call the caller's macro, saved as \next in \parsearg. - \expandafter\next\expandafter{\the\toks0}% + \argremovecomment #1\comment\ArgTerm% }% } -% Since all \c{,omment} does is throw away the argument, we can let TeX -% do that for us. The \relax here is matched by the \relax in the call -% in \parseargline; it could be more or less anything, its purpose is -% just to delimit the argument to the \c. -\def\argremovec#1\c#2\relax{\toks0 = {#1}} -\def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} +% First remove any @comment, then any @c comment. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} -% \argremovec{,omment} might leave us with trailing spaces, though; e.g., +% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., % @end itemize @c foo -% will have two active spaces as part of the argument with the -% `itemize'. Here we remove all active spaces from #1, and assign the -% result to \toks0. -% -% This loses if there are any *other* active characters besides spaces -% in the argument -- _ ^ +, for example -- since they get expanded. -% Fortunately, Texinfo does not define any such commands. (If it ever -% does, the catcode of the characters in questionwill have to be changed -% here.) But this means we cannot call \removeactivespaces as part of -% \argremovec{,omment}, since @c uses \parsearg, and thus the argument -% that \parsearg gets might well have any character at all in it. -% -\def\removeactivespaces#1{% - \begingroup - \ignoreactivespaces - \edef\temp{#1}% - \global\toks0 = \expandafter{\temp}% - \endgroup +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm } -% Change the active space to expand to nothing. +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarily, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. % -\begingroup +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +% +% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% favourite TeX trick. --kasal, 16nov03 + +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ \obeyspaces - \gdef\ignoreactivespaces{\obeyspaces\let =\empty} -\endgroup + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} -%% These are used to keep @begin/@end levels from running away -%% Call \inENV within environments (after a \begingroup) -\newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} -\def\ENVcheck{% -\ifENV\errmessage{Still within an environment; press RETURN to continue} -\endgroup\fi} % This is not perfect, but it should reduce lossage +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as enviroments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) -% @begin foo is the same as @foo, for now. -\newhelp\EMsimple{Press RETURN to continue.} -\outer\def\begin{\parsearg\beginxxx} +% At runtime, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty -\def\beginxxx #1{% -\expandafter\ifx\csname #1\endcsname\relax -{\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else -\csname #1\endcsname\fi} +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} -% @end foo executes the definition of \Efoo. -% -\def\end{\parsearg\endxxx} -\def\endxxx #1{% - \removeactivespaces{#1}% - \edef\endthing{\the\toks0}% - % - \expandafter\ifx\csname E\endthing\endcsname\relax - \expandafter\ifx\csname \endthing\endcsname\relax - % There's no \foo, i.e., no ``environment'' foo. - \errhelp = \EMsimple - \errmessage{Undefined command `@end \endthing'}% - \else - \unmatchedenderror\endthing - \fi +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp \else - % Everything's ok; the right environment has been started. - \csname E\endthing\endcsname + \badenverr \fi } -% There is an environment #1, but it hasn't been started. Give an error. -% -\def\unmatchedenderror#1{% +% Evironment mismatch, #1 expected: +\def\badenverr{% \errhelp = \EMsimple - \errmessage{This `@end #1' doesn't have a matching `@#1'}% + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + out of any environment% + \else + in environment \expandafter\string#1% + \fi } -% Define the control sequence \E#1 to give an unmatched @end error. +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv % -\def\defineunmatchedend#1{% - \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi } +\newhelp\EMsimple{Press RETURN to continue.} + %% Simple single-character @ commands @@ -487,7 +615,7 @@ \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux file. + % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other @@ -497,6 +625,9 @@ !gdef!rbraceatcmd[@}]% !endgroup +% @comma{} to avoid , parsing problems. +\let\comma = , + % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c @@ -506,10 +637,12 @@ \let\ubaraccent = \b \let\udotaccent = \d -% Other special characters: @questiondown @exclamdown +% Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} @@ -522,6 +655,25 @@ \fi\fi } +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% + \kern-.15em + \TeX +} + % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and @@ -544,13 +696,28 @@ \let\/=\allowbreak % @. is an end-of-sentence period. -\def\.{.\spacefactor=3000 } +\def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. -\def\!{!\spacefactor=3000 } +\def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. -\def\?{?\spacefactor=3000 } +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \fi\fi +} % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would @@ -571,63 +738,18 @@ % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). -% +% \newbox\groupbox \def\vfilllimit{0.7} % -\def\group{\begingroup - \ifnum\catcode13=\active \else +\envdef\group{% + \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi - % - % The \vtop we start below produces a box with normal height and large - % depth; thus, TeX puts \baselineskip glue before it, and (when the - % next line of text is done) \lineskip glue after it. (See p.82 of - % the TeXbook.) Thus, space below is not quite equal to space - % above. But it's pretty close. - \def\Egroup{% - \egroup % End the \vtop. - % \dimen0 is the vertical size of the group's box. - \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox - % \dimen2 is how much space is left on the page (more or less). - \dimen2 = \pageheight \advance\dimen2 by -\pagetotal - % if the group doesn't fit on the current page, and it's a big big - % group, force a page break. - \ifdim \dimen0 > \dimen2 - \ifdim \pagetotal < \vfilllimit\pageheight - \page - \fi - \fi - \copy\groupbox - \endgroup % End the \group. - }% + \startsavinginserts % \setbox\groupbox = \vtop\bgroup - % We have to put a strut on the last line in case the @group is in - % the midst of an example, rather than completely enclosing it. - % Otherwise, the interline space between the last line of the group - % and the first line afterwards is too small. But we can't put the - % strut in \Egroup, since there it would be on a line by itself. - % Hence this just inserts a strut at the beginning of each line. - \everypar = {\strut}% - % - % Since we have a strut on every line, we don't need any of TeX's - % normal interline spacing. - \offinterlineskip - % - % OK, but now we have to do something about blank - % lines in the input in @example-like environments, which normally - % just turn into \lisppar, which will insert no space now that we've - % turned off the interline space. Simplest is to make them be an - % empty paragraph. - \ifx\par\lisppar - \edef\par{\leavevmode \par}% - % - % Reset ^^M's definition to new definition of \par. - \obeylines - \fi - % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after @@ -637,6 +759,32 @@ \comment } % +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox + \prevdepth = \dimen1 + \checkinserts +} +% % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % @@ -649,10 +797,8 @@ where each line of input produces a line of output.} \newdimen\mil \mil=0.001in -\def\need{\parsearg\needx} - % Old definition--didn't work. -%\def\needx #1{\par % +%\parseargdef\need{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% @@ -660,7 +806,7 @@ where each line of input produces a line of output.} %\prevdepth=-1000pt %}} -\def\needx#1{% +\parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par @@ -699,35 +845,10 @@ where each line of input produces a line of output.} \fi } -% @br forces paragraph break +% @br forces paragraph break (and is undocumented). \let\br = \par -% @dots{} output an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in a typewriter -% font as three actual period characters. -% -\def\dots{% - \leavevmode - \hbox to 1.5em{% - \hskip 0pt plus 0.25fil minus 0.25fil - .\hss.\hss.% - \hskip 0pt plus 0.5fil minus 0.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \leavevmode - \hbox to 2em{% - \hskip 0pt plus 0.25fil minus 0.25fil - .\hss.\hss.\hss.% - \hskip 0pt plus 0.5fil minus 0.5fil - }% - \spacefactor=3000 -} - % @page forces the start of a new page. % \def\page{\par\vfill\supereject} @@ -740,13 +861,11 @@ where each line of input produces a line of output.} \newskip\exdentamount % This defn is used inside fill environments such as @defun. -\def\exdent{\parsearg\exdentyyy} -\def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. -\def\nofillexdent{\parsearg\nofillexdentyyy} -\def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount -\leftline{\hskip\leftskip{\rm#1}}}} +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion @@ -777,10 +896,10 @@ where each line of input produces a line of output.} % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). -% +% \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. - \setbox0 = \hbox{\ignorespaces #2}% + \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% @@ -798,8 +917,19 @@ where each line of input produces a line of output.} } % @include file insert text of that file as input. -% Allow normal characters that we make active in the argument (a file name). -\def\include{\begingroup +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable + \def\temp{\input #1 }% + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other @@ -808,33 +938,50 @@ where each line of input produces a line of output.} \catcode`<=\other \catcode`>=\other \catcode`+=\other - \parsearg\includezzz} -% Restore active chars for included file. -\def\includezzz#1{\endgroup\begingroup - % Read the included file in a group so nested @include's work. - \def\thisfile{#1}% - \let\value=\expandablevalue - \input\thisfile -\endgroup} + \catcode`-=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} \def\thisfile{} % @center line % outputs that line, centered. % -\def\center{\parsearg\docenter} -\def\docenter#1{{% - \ifhmode \hfil\break \fi - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{\hfil \ignorespaces#1\unskip \hfil}% - \ifhmode \break \fi -}} +\parseargdef\center{% + \ifhmode + \let\next\centerH + \else + \let\next\centerV + \fi + \next{\hfil \ignorespaces#1\unskip \hfil}% +} +\def\centerH#1{% + {% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break + }% +} +\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} % @sp n outputs n lines of vertical space -\def\sp{\parsearg\spxxx} -\def\spxxx #1{\vskip #1\baselineskip} +\parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment @@ -849,13 +996,13 @@ where each line of input produces a line of output.} % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. -% We cannot implement @paragraphindent asis, though. -% +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % -\def\paragraphindent{\parsearg\doparagraphindent} -\def\doparagraphindent#1{% +\parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else @@ -872,8 +1019,7 @@ where each line of input produces a line of output.} % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. -\def\exampleindent{\parsearg\doexampleindent} -\def\doexampleindent#1{% +\parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else @@ -885,48 +1031,97 @@ where each line of input produces a line of output.} \fi } +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent + \indent + }% + \gdef\noindent{% + \restorefirstparagraphindent + \noindent + }% + \global\everypar = {% + \kern -\parindent + \restorefirstparagraphindent + }% +} + +\gdef\restorefirstparagraphindent{% + \global \let \indent = \ptexindent + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} + + % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. -% We don't use $'s directly in the definition of \math because we need -% to set catcodes according to plain TeX first, to allow for subscripts, -% superscripts, special math chars, etc. -% -\let\implicitmath = $%$ font-lock fix % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ within @math be active (mathcode "8000), and distinguish by seeing -% if the current family is \slfam, which is what @var uses. -% -{\catcode\underChar = \active -\gdef\mathunderscore{% - \catcode\underChar=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% -}} -% +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. -% +% % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex - \mathcode`\_="8000 \mathunderscore + \mathunderscore \let\\ = \mathbackslash \mathactive - \implicitmath\finishmath} -\def\finishmath#1{#1\implicitmath\Etex} + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. -% We have to reset their definitions in case the @math was an -% argument to a command which set the catcodes (such as @item or @section). -% +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% { \catcode`^ = \active \catcode`< = \active @@ -941,8 +1136,42 @@ where each line of input produces a line of output.} } % @bullet and @minus need the same treatment as @math, just above. -\def\bullet{\implicitmath\ptexbullet\implicitmath} -\def\minus{\implicitmath-\implicitmath} +\def\bullet{$\ptexbullet$} +\def\minus{$-$} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @comma{} is so commas can be inserted into text without messing up +% Texinfo's parsing. +% +\let\comma = , % @refill is a no-op. \let\refill=\relax @@ -958,20 +1187,20 @@ where each line of input produces a line of output.} % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% + \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks - \readauxfile + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices - \fixbackslash % Turn off hack to swallow `\input texinfo'. - \global\let\setfilename=\comment % Ignore extra @setfilename cmds. + \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. - % Just to be on the safe side, close the input stream before the \input. \openin 1 texinfo.cnf - \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi - \closein1 - \temp + \ifeof 1 \else \input texinfo.cnf \fi + \closein 1 % \comment % Ignore the actual filename. } @@ -1007,119 +1236,291 @@ where each line of input produces a line of output.} \newif\ifpdf \newif\ifpdfmakepagedest +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as \undefined, +% borrowed from ifpdf.sty. \ifx\pdfoutput\undefined - \pdffalse - \let\pdfmkdest = \gobble - \let\pdfurl = \gobble - \let\endlink = \relax - \let\linkcolor = \relax - \let\pdfmakeoutlines = \relax \else - \pdftrue - \pdfoutput = 1 - \input pdfcolor - \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}% - \def\imageheight{#3}% - % without \immediate, pdftex seg faults when the same image is - % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) - \ifnum\pdftexversion < 14 - \immediate\pdfimage + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput \else - \immediate\pdfximage + \pdftrue \fi - \ifx\empty\imagewidth\else width \imagewidth \fi - \ifx\empty\imageheight\else height \imageheight \fi - \ifnum\pdftexversion<13 - #1.pdf% - \else - {#1.pdf}% - \fi - \ifnum\pdftexversion < 14 \else - \pdfrefximage \pdflastximage - \fi} - \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}} - \def\pdfmkpgn#1{#1} - \let\linkcolor = \Blue % was Cyan, but that seems light? - \def\endlink{\Black\pdfendlink} - % Adding outlines to PDF; macros for calculating structure of outlines - % come from Petr Olsak - \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% - \else \csname#1\endcsname \fi} - \def\advancenumber#1{\tempnum=\expnumber{#1}\relax - \advance\tempnum by1 - \expandafter\xdef\csname#1\endcsname{\the\tempnum}} - \def\pdfmakeoutlines{{% - \openin 1 \jobname.toc - \ifeof 1\else\begingroup - \closein 1 - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % - \def\chapentry ##1##2##3{} - \def\secentry ##1##2##3##4{\advancenumber{chap##2}} - \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} - \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} - \let\appendixentry = \chapentry - \let\unnumbchapentry = \chapentry - \let\unnumbsecentry = \secentry - \let\unnumbsubsecentry = \subsecentry - \let\unnumbsubsubsecentry = \subsubsecentry - \input \jobname.toc - \def\chapentry ##1##2##3{% - \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} - \def\secentry ##1##2##3##4{% - \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} - \def\subsecentry ##1##2##3##4##5{% - \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} - \def\subsubsecentry ##1##2##3##4##5##6{% - \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} - \let\appendixentry = \chapentry - \let\unnumbchapentry = \chapentry - \let\unnumbsecentry = \secentry - \let\unnumbsubsecentry = \subsecentry - \let\unnumbsubsubsecentry = \subsubsecentry - % - % Make special characters normal for writing to the pdf file. - % - \indexnofonts - \let\tt=\relax - \turnoffactive - \input \jobname.toc - \endgroup\fi - }} - \def\makelinks #1,{% - \def\params{#1}\def\E{END}% - \ifx\params\E - \let\nextmakelinks=\relax + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html +% (and related messages, the final outcome is that it is up to the TeX +% user to double the backslashes and otherwise make the string valid, so +% that's what we do). + +% double active backslashes. +% +{\catcode`\@=0 \catcode`\\=\active + @gdef@activebackslashdouble{% + @catcode`@\=@active + @let\=@doublebackslash} +} + +% To handle parens, we must adopt a different approach, since parens are +% not active characters. hyperref.dtx (which has the same problem as +% us) handles it with this amazing macro to replace tokens, with minor +% changes for Texinfo. It is included here under the GPL by permission +% from the author, Heiko Oberdiek. +% +% #1 is the tokens to replace. +% #2 is the replacement. +% #3 is the control sequence with the string. +% +\def\HyPsdSubst#1#2#3{% + \def\HyPsdReplace##1#1##2\END{% + ##1% + \ifx\\##2\\% \else - \let\nextmakelinks=\makelinks - \ifnum\lnkcount>0,\fi - \picknum{#1}% - \startlink attr{/Border [0 0 0]} - goto name{\pdfmkpgn{\the\pgn}}% - \linkcolor #1% - \advance\lnkcount by 1% - \endlink + #2% + \HyReturnAfterFi{% + \HyPsdReplace##2\END + }% \fi - \nextmakelinks + }% + \xdef#3{\expandafter\HyPsdReplace#3#1\END}% +} +\long\def\HyReturnAfterFi#1\fi{\fi#1} + +% #1 is a control sequence in which to do the replacements. +\def\backslashparens#1{% + \xdef#1{#1}% redefine it as its expansion; the definition is simply + % \lastnode when called from \setref -> \pdfmkdest. + \HyPsdSubst{(}{\realbackslash(}{#1}% + \HyPsdSubst{)}{\realbackslash)}{#1}% +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros based on pdfcolor.tex. + \def\cmykDarkRed{0.28 1 1 0.35} + \def\cmykBlack{0 0 0 1} + % + \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\cmykBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip } - \def\picknum#1{\expandafter\pn#1} - \def\pn#1{% - \def\p{#1}% - \ifx\p\lbrace - \let\nextpn=\ppn + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{pdf}% + \fi + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % + % without \immediate, pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \imagewidth \fi + \ifdim \wd2 >0pt height \imageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \activebackslashdouble + \makevalueexpandable + \def\pdfdestname{#1}% + \backslashparens\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\cmykDarkRed} + \def\linkcolor{\cmykDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \def\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% \else - \let\nextpn=\ppnn - \def\first{#1} + % Doubled backslashes in the name. + {\activebackslashdouble \xdef\pdfoutlinedest{#3}% + \backslashparens\pdfoutlinedest}% \fi - \nextpn + % + % Also double the backslashes in the display string. + {\activebackslashdouble \xdef\pdfoutlinetext{#1}% + \backslashparens\pdfoutlinetext}% + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } - \def\ppn#1{\pgn=#1\gobble} - \def\ppnn{\pgn=\first} - \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} - \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + % + \def\pdfmakeoutlines{% + \begingroup + % Thanh's hack / proper braces in bookmarks + \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace + \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace + % + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % xx to do this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Right + % now, I guess we'll just let the pdf reader have its way. + \indexnofonts + \setupdatafile + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces @@ -1134,25 +1535,32 @@ where each line of input produces a line of output.} \else \let \startlink \pdfstartlink \fi + % make a live url in pdf output. \def\pdfurl#1{% \begingroup - \normalturnoffactive\def\@{@}% - \let\value=\expandablevalue - \leavevmode\Red + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% - % #1 \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% - \expandafter\poptoks\the\toksA|ENDTOKS| + \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 - \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else @@ -1166,22 +1574,48 @@ where each line of input produces a line of output.} {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} + \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -\fi % \ifx\pdfoutput +\else + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput \message{fonts,} -% Font-change commands. + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. -% So we set up a \sf analogous to plain's \rm, etc. +% So we set up a \sf. \newfam\sffam -\def\sf{\fam=\sffam \tensf} +\def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. -% We don't need math for this one. -\def\ttsl{\tenttsl} +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + % Default leading. \newdimen\textleading \textleading = 13.2pt @@ -1194,8 +1628,12 @@ where each line of input produces a line of output.} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% \def\setleading#1{% - \normalbaselineskip = #1\relax + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% @@ -1204,10 +1642,277 @@ where each line of input produces a line of output.} }% } +% +% PDF CMaps. See also LaTeX's t1.cmap. +% +% \cmapOT1 +\ifpdf + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\else + \expandafter\let\csname cmapOT1\endcsname\gobble + \expandafter\let\csname cmapOT1IT\endcsname\gobble + \expandafter\let\csname cmapOT1TT\endcsname\gobble +\fi + + % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor -\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble + % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix @@ -1222,123 +1927,307 @@ where each line of input produces a line of output.} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} -%\def\ttslshape{sltt} gmsh -\def\ttslshape{ti} +\def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} -%\def\slshape{sl} gmsh -%\def\slbshape{bxsl} gmsh -\def\slshape{ti} -\def\slbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} -\newcount\mainmagstep -\ifx\bigger\relax - % not really supported. - \mainmagstep=\magstep1 - \setfont\textrm\rmshape{12}{1000} - \setfont\texttt\ttshape{12}{1000} -\else - \mainmagstep=\magstephalf - \setfont\textrm\rmshape{10}{\mainmagstep} - \setfont\texttt\ttshape{10}{\mainmagstep} -\fi -% Instead of cmb10, you may want to use cmbx10. -% cmbx10 is a prettier font on its own, but cmb10 -% looks better when embedded in a line with cmr10 -% (in Bob's opinion). -\setfont\textbf\bfshape{10}{\mainmagstep} -\setfont\textit\itshape{10}{\mainmagstep} -\setfont\textsl\slshape{10}{\mainmagstep} -\setfont\textsf\sfshape{10}{\mainmagstep} -\setfont\textsc\scshape{10}{\mainmagstep} -\setfont\textttsl\ttslshape{10}{\mainmagstep} +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} -% A few fonts for @defun, etc. -\setfont\defbf\bxshape{10}{\magstep1} %was 1314 -\setfont\deftt\ttshape{10}{\magstep1} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). -\setfont\smallrm\rmshape{9}{1000} -\setfont\smalltt\ttshape{9}{1000} -\setfont\smallbf\bfshape{10}{900} -\setfont\smallit\itshape{9}{1000} -\setfont\smallsl\slshape{9}{1000} -\setfont\smallsf\sfshape{9}{1000} -\setfont\smallsc\scshape{10}{900} -\setfont\smallttsl\ttslshape{10}{900} +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 +\def\smallecsize{0900} % Fonts for small examples (8pt). -\setfont\smallerrm\rmshape{8}{1000} -\setfont\smallertt\ttshape{8}{1000} -\setfont\smallerbf\bfshape{10}{800} -\setfont\smallerit\itshape{8}{1000} -\setfont\smallersl\slshape{8}{1000} -\setfont\smallersf\sfshape{8}{1000} -\setfont\smallersc\scshape{10}{800} -\setfont\smallerttsl\ttslshape{10}{800} +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 - -% Fonts for title page: -\setfont\titlerm\rmbshape{12}{\magstep3} -\setfont\titleit\itbshape{10}{\magstep4} -\setfont\titlesl\slbshape{10}{\magstep4} -\setfont\titlett\ttbshape{12}{\magstep3} -\setfont\titlettsl\ttslshape{10}{\magstep4} -\setfont\titlesf\sfbshape{17}{\magstep1} +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4} +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} +\def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). -\setfont\chaprm\rmbshape{12}{\magstep2} -\setfont\chapit\itbshape{10}{\magstep3} -\setfont\chapsl\slbshape{10}{\magstep3} -\setfont\chaptt\ttbshape{12}{\magstep2} -\setfont\chapttsl\ttslshape{10}{\magstep3} -\setfont\chapsf\sfbshape{17}{1000} +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm -\setfont\chapsc\scbshape{10}{\magstep3} +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} % Section fonts (14.4pt). -\setfont\secrm\rmbshape{12}{\magstep1} -\setfont\secit\itbshape{10}{\magstep2} -\setfont\secsl\slbshape{10}{\magstep2} -\setfont\sectt\ttbshape{12}{\magstep1} -\setfont\secttsl\ttslshape{10}{\magstep2} -\setfont\secsf\sfbshape{12}{\magstep1} +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep2} +\setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} % Subsection fonts (13.15pt). -\setfont\ssecrm\rmbshape{12}{\magstephalf} -\setfont\ssecit\itbshape{10}{1315} -\setfont\ssecsl\slbshape{10}{1315} -\setfont\ssectt\ttbshape{12}{\magstephalf} -\setfont\ssecttsl\ttslshape{10}{1315} -\setfont\ssecsf\sfbshape{12}{\magstephalf} +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{\magstep1} +\setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 -% The smallcaps and symbol fonts should actually be scaled \magstep1.5, -% but that is not a standard magnification. +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +% reset the current fonts +\textfonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +% reduce space between paragraphs +\divide\parskip by 2 + +% reset the current fonts +\textfonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xword{10} +\def\xiword{11} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + \wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since @@ -1353,50 +2242,81 @@ where each line of input produces a line of output.} } % The font-changing commands redefine the meanings of \tenSTYLE, instead -% of just \STYLE. We do this so that font changes will continue to work -% in math mode, where it is the current \fam that is relevant in most -% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam -% \tenbf}, for example. By redefining \tenbf, we obviate the need to -% redefine \bf itself. +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used in +% the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc - \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc - \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc - \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc - \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} -\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Set the fonts to use with the @small... environments. @@ -1405,22 +2325,21 @@ where each line of input produces a line of output.} % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 -% If we use \smallerfonts (8pt), then we can fit this many characters: +% If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. -% +% % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 -% -% I wish we used A4 paper on this side of the Atlantic. -% +% +% I wish the USA used A4 paper. % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % -\textfonts +\definetextfontsizexi % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} @@ -1430,29 +2349,42 @@ where each line of input produces a line of output.} \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bxshape{12}{1000} -\setfont\shortcontsl\slshape{12}{1000} -\setfont\shortconttt\ttshape{12}{1000} +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} +\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else + \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} +% like \smartslanted except unconditionally uses \ttsl. +% @var is set to this for defun arguments. +\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} + +% like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} + \let\i=\smartitalic +\let\slanted=\smartslanted \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic -\let\cite=\smartslanted +% @b, explicit bold. \def\b#1{{\bf #1}} \let\strong=\b +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. @@ -1463,21 +2395,27 @@ where each line of input produces a line of output.} % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. -% +% \catcode`@=11 - \def\frenchspacing{% + \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other +\def\endofsentencespacefactor{3000}% default \def\t#1{% - {\tt \rawbackslash \frenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} +\setfont\keyrm\rmshape{8}{1000}{OT1} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% @@ -1485,6 +2423,7 @@ where each line of input produces a line of output.} \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -1510,13 +2449,13 @@ where each line of input produces a line of output.} \nohyphenation % \rawbackslash - \frenchspacing + \plainfrenchspacing #1% }% \null } -% We *must* turn on hyphenation at `-' and `_' in \code. +% We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. @@ -1526,18 +2465,23 @@ where each line of input produces a line of output.} % and arrange explicitly to hyphenate at a dash. % -- rms. { - \catcode`\-=\active - \catcode`\_=\active + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active % \global\def\code{\begingroup - \catcode`\-=\active \let-\codedash - \catcode`\_=\active \let_\codeunder + \catcode\rquoteChar=\active \catcode\lquoteChar=\active + \let'\codequoteright \let`\codequoteleft + % + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\realdash + \let_\realunder + \fi \codex } - % - % If we end up with any active - characters when handling the index, - % just treat them as a normal -. - \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} @@ -1555,24 +2499,45 @@ where each line of input produces a line of output.} } \def\codex #1{\tclose{#1}\endgroup} +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \fi\fi +} + % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). -\def\kbdinputstyle{\parsearg\kbdinputstylexxx} -\def\kbdinputstylexxx#1{% - \def\arg{#1}% - \ifx\arg\worddistinct +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\arg\wordexample + \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\arg\wordcode + \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle `\arg'}% + \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} @@ -1588,8 +2553,8 @@ where each line of input produces a line of output.} \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} -% For @url, @env, @command quotes seem unnecessary, so use \code. -\let\url=\code +% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. +\let\indicateurl=\code \let\env=\code \let\command=\code @@ -1621,9 +2586,13 @@ where each line of input produces a line of output.} \endlink \endgroup} +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. -% +% %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} @@ -1662,22 +2631,139 @@ where each line of input produces a line of output.} \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font -% @acronym downcases the argument and prints in smallcaps. -\def\acronym#1{{\smallcaps \lowercase{#1}}} +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi +} -% @pounds{} is a sterling sign. +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% \def\pounds{{\it\$}} -% @registeredsymbol - R in a circle. For now, only works in text size; -% we'd have to redo the font mechanism to change the \scriptstyle and -% \scriptscriptstyle font sizes to make it look right in headings. -% Adapted from the plain.tex definition of \copyright. +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Hacks for glyphs from the EC fonts similar to \euro. We don't +% use \let for the aliases, because sometimes we redefine the original +% macro, and the alias should reflect the redefinition. +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +\def\ecfont{% + % We can't distinguish serif/sanserif and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% \def\registeredsymbol{% - $^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% }$% } +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\undefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' \message{page headings,} @@ -1696,87 +2782,103 @@ where each line of input produces a line of output.} \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -\def\shorttitlepage{\parsearg\shorttitlepagezzz} -\def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% +\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} -\def\titlepage{\begingroup \parindent=0pt \textfonts - \let\subtitlerm=\tenrm - \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% - % - \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines - \let\tt=\authortt}% - % - % Leave some space at the very top of the page. - \vglue\titlepagetopglue - % - % Now you can print the title using @title. - \def\title{\parsearg\titlezzz}% - \def\titlezzz##1{\leftline{\titlefonts\rm ##1} - % print a rule at the page bottom also. - \finishedtitlepagefalse - \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% - % No rule at page bottom unless we print one at the top with @title. - \finishedtitlepagetrue - % - % Now you can put text using @subtitle. - \def\subtitle{\parsearg\subtitlezzz}% - \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% - % - % @author should come last, but may come many times. - \def\author{\parsearg\authorzzz}% - \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi - {\authorfont \leftline{##1}}}% - % - % Most title ``pages'' are actually two pages long, with space - % at the top of the second. We don't want the ragged left on the second. - \let\oldpage = \page - \def\page{% +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% \iffinishedtitlepage\else - \finishtitlepage + \finishtitlepage \fi - \oldpage \let\page = \oldpage - \hbox{}}% -% \def\page{\oldpage \hbox{}} + \page + \null + }% } \def\Etitlepage{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - % It is important to do the page break before ending the group, - % because the headline and footline are only empty inside the group. - % If we use the new definition of \page, we always get a blank page - % after the title page, which we certainly don't want. - \oldpage - \endgroup - % - % Need this before the \...aftertitlepage checks so that if they are - % in effect the toc pages will come out with page numbers. - \HEADINGSon - % - % If they want short, they certainly want long too. - \ifsetshortcontentsaftertitlepage - \shortcontents - \contents - \global\let\shortcontents = \relax - \global\let\contents = \relax - \fi - % - \ifsetcontentsaftertitlepage - \contents - \global\let\contents = \relax - \global\let\shortcontents = \relax - \fi + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi } \def\finishtitlepage{% - \vskip4pt \hrule height 2pt width \hsize - \vskip\titlepagebottomglue - \finishedtitlepagetrue + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue } +%%% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines + \let\tt=\authortt} + +\parseargdef\title{% + \checkenv\titlepage + \leftline{\titlefonts\rm #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\authorfont \leftline{#1}}% + \fi +} + + %%% Set up page headings and footings. \let\thispage=\folio @@ -1786,7 +2888,7 @@ where each line of input produces a line of output.} \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages -% Now make Tex use those variables +% Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline @@ -1800,43 +2902,64 @@ where each line of input produces a line of output.} % @evenfooting @thisfile|| % @oddfooting ||@thisfile + \def\evenheading{\parsearg\evenheadingxxx} -\def\oddheading{\parsearg\oddheadingxxx} -\def\everyheading{\parsearg\everyheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} -\def\evenfooting{\parsearg\evenfootingxxx} -\def\oddfooting{\parsearg\oddfootingxxx} -\def\everyfooting{\parsearg\everyfootingxxx} - -{\catcode`\@=0 % - -\gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} -\gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} -\gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} -\gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% -\gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} -\gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} -\gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} -\gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. - \global\advance\pageheight by -\baselineskip - \global\advance\vsize by -\baselineskip + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt } -\gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % -}% unbind the catcode of @. +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. @@ -1850,7 +2973,7 @@ where each line of input produces a line of output.} \def\headings #1 {\csname HEADINGS#1\endcsname} -\def\HEADINGSoff{ +\def\HEADINGSoff{% \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff @@ -1859,7 +2982,7 @@ where each line of input produces a line of output.} % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. -\def\HEADINGSdouble{ +\def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} @@ -1871,7 +2994,7 @@ where each line of input produces a line of output.} % For single-sided printing, chapter title goes across top left of page, % page number on top right. -\def\HEADINGSsingle{ +\def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} @@ -1918,12 +3041,11 @@ where each line of input produces a line of output.} % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} -\def\settitle{\parsearg\settitlezzz} -\def\settitlezzz #1{\gdef\thistitle{#1}} +\def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} -% Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). +% Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in @@ -1935,7 +3057,7 @@ where each line of input produces a line of output.} % used internally for \itemindent minus \itemmargin \newdimen\itemmax -% Note @table, @vtable, and @vtable define @item, @itemx, etc., with +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). @@ -1947,22 +3069,10 @@ where each line of input produces a line of output.} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} -\def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} -\def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} - -\def\internalBkitem{\smallbreak \parsearg\kitemzzz} -\def\internalBkitemx{\itemxpar \parsearg\kitemzzz} - -\def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% - \itemzzz {#1}} - -\def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% - \itemzzz {#1}} - \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent - \setbox0=\hbox{\itemfont{#1}}% + \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % @@ -1986,17 +3096,13 @@ where each line of input produces a line of output.} % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % - % Stop a page break at the \parskip glue coming up. (Unfortunately - % we can't prevent a possible page break at the following - % \baselineskip glue.) However, if what follows is an environment - % such as @example, there will be no \parskip glue; then - % the negative vskip we just would cause the example and the item to - % crash together. So we use this bizarre value of 10001 as a signal - % to \aboveenvbreak to insert \parskip glue after all. - % (Possibly there are other commands that could be followed by - % @example which need the same treatment, but not section titles; or - % maybe section titles are the only special case and they should be - % penalty 10001...) + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -2016,92 +3122,106 @@ where each line of input produces a line of output.} \fi } -\def\item{\errmessage{@item while not in a table}} -\def\itemx{\errmessage{@itemx while not in a table}} -\def\kitem{\errmessage{@kitem while not in a table}} -\def\kitemx{\errmessage{@kitemx while not in a table}} -\def\xitem{\errmessage{@xitem while not in a table}} -\def\xitemx{\errmessage{@xitemx while not in a table}} - -% Contains a kludge to get @end[description] to work. -\def\description{\tablez{\dontindex}{1}{}{}{}{}} +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. -\def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} -{\obeylines\obeyspaces% -\gdef\tablex #1^^M{% -\tabley\dontindex#1 \endtabley}} - -\def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} -{\obeylines\obeyspaces% -\gdef\ftablex #1^^M{% -\tabley\fnitemindex#1 \endtabley -\def\Eftable{\endgraf\afterenvbreak\endgroup}% -\let\Etable=\relax}} - -\def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} -{\obeylines\obeyspaces% -\gdef\vtablex #1^^M{% -\tabley\vritemindex#1 \endtabley -\def\Evtable{\endgraf\afterenvbreak\endgroup}% -\let\Etable=\relax}} - -\def\dontindex #1{} -\def\fnitemindex #1{\doind {fn}{\code{#1}}}% -\def\vritemindex #1{\doind {vr}{\code{#1}}}% - -{\obeyspaces % -\gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% -\tablez{#1}{#2}{#3}{#4}{#5}{#6}}} - -\def\tablez #1#2#3#4#5#6{% -\aboveenvbreak % -\begingroup % -\def\Edescription{\Etable}% Necessary kludge. -\let\itemindex=#1% -\ifnum 0#3>0 \advance \leftskip by #3\mil \fi % -\ifnum 0#4>0 \tableindent=#4\mil \fi % -\ifnum 0#5>0 \advance \rightskip by #5\mil \fi % -\def\itemfont{#2}% -\itemmax=\tableindent % -\advance \itemmax by -\itemmargin % -\advance \leftskip by \tableindent % -\exdentamount=\tableindent -\parindent = 0pt -\parskip = \smallskipamount -\ifdim \parskip=0pt \parskip=2pt \fi% -\def\Etable{\endgraf\afterenvbreak\endgroup}% -\let\item = \internalBitem % -\let\itemx = \internalBitemx % -\let\kitem = \internalBkitem % -\let\kitemx = \internalBkitemx % -\let\xitem = \internalBxitem % -\let\xitemx = \internalBxitemx % +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx } +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno -\def\itemize{\parsearg\itemizezzz} +\envdef\itemize{\parsearg\doitemize} -\def\itemizezzz #1{% - \begingroup % ended by the @end itemize - \itemizey {#1}{\Eitemize} +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + \def\itemcontents{#1}% + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + \let\item=\itemizeitem } -\def\itemizey #1#2{% -\aboveenvbreak % -\itemmax=\itemindent % -\advance \itemmax by -\itemmargin % -\advance \leftskip by \itemindent % -\exdentamount=\itemindent -\parindent = 0pt % -\parskip = \smallskipamount % -\ifdim \parskip=0pt \parskip=2pt \fi% -\def#2{\endgraf\afterenvbreak\endgroup}% -\def\itemcontents{#1}% -\let\item=\itemizeitem} +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. @@ -2112,11 +3232,8 @@ where each line of input produces a line of output.} % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % -\def\enumerate{\parsearg\enumeratezzz} -\def\enumeratezzz #1{\enumeratey #1 \endenumeratey} +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% - \begingroup % ended by the @end enumerate - % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi @@ -2187,13 +3304,13 @@ where each line of input produces a line of output.} }% } -% Call itemizey, adding a period to the first argument and supplying the +% Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 - \itemizey{#1.}\Eenumerate\flushcr + \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg @@ -2204,16 +3321,6 @@ where each line of input produces a line of output.} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} -% Definition of @item while inside @itemize. - -\def\itemizeitem{% -\advance\itemno by 1 -{\let\par=\endgraf \smallbreak}% -\ifhmode \errmessage{In hmode at itemizeitem}\fi -{\parskip=0in \hskip 0pt -\hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% -\vadjust{\penalty 1200}}% -\flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 @@ -2240,24 +3347,14 @@ where each line of input produces a line of output.} % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. -% -% For those who want to use more than one line's worth of words in -% the preamble, break the line within one argument and it -% will parse correctly, i.e., -% -% @multitable {Column 1 template} {Column 2 template} {Column 3 -% template} -% Not: -% @multitable {Column 1 template} {Column 2 template} -% {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. -% @item, @tab, @multitable or @end multitable do not need to be on their -% own lines, but it will not hurt if they are. +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. % Sample multitable: @@ -2301,13 +3398,12 @@ where each line of input produces a line of output.} \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent -% #1 is the part of the @columnfraction before the decimal point, which -% is presumably either 0 or the empty string (but we don't check, we -% just throw it away). #2 is the decimal part, which we use as the -% percent of \hsize for this column. -\def\pickupwholefraction#1.#2 {% +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% \global\advance\colcount by 1 - \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } @@ -2340,18 +3436,33 @@ where each line of input produces a line of output.} \go } +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group +% of an alignment entry. Note that \everycr resets \everytab. +\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we encounter the problem it was intended to solve again. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + % @multitable ... @end multitable definitions: % -\def\multitable{\parsearg\dotable} -\def\dotable#1{\bgroup +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% \vskip\parskip - \let\item=\crcrwithfootnotes - % A \tab used to include \hskip1sp. But then the space in a template - % line is not enough. That is bad. So let's go back to just & until - % we encounter the problem it was intended to solve again. --karl, - % nathan@acm.org, 20apr99. - \let\tab=&% - \let\startfootins=\startsavedfootnote + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % \tolerance=9500 \hbadness=9500 \setmultitablespacing @@ -2359,85 +3470,93 @@ where each line of input produces a line of output.} \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 - \def\Emultitable{% - \global\setpercentfalse - \crcrwithfootnotes\crcr - \egroup\egroup + % + \everycr = {% + \noalign{% + \global\everytab={}% + \global\colcount=0 % Reset the column counter. + % Check for saved footnotes, etc. + \checkinserts + % Keeps underfull box messages off when table breaks over pages. + %\filbreak + % Maybe so, but it also creates really weird page breaks when the + % table breaks over pages. Wouldn't \vfil be better? Wait until the + % problem manifests itself, so it can be fixed for real --karl. + }% }% % + \parsearg\domultitable +} +\def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % - % \everycr will reset column counter, \colcount, at the end of - % each line. Every column entry will cause \colcount to advance by one. - % The table preamble - % looks at the current \colcount to find the correct column width. - \everycr{\noalign{% - % - % \filbreak%% keeps underfull box messages off when table breaks over pages. - % Maybe so, but it also creates really weird page breaks when the table - % breaks over pages. Wouldn't \vfil be better? Wait until the problem - % manifests itself, so it can be fixed for real --karl. - \global\colcount=0\relax}}% - % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. - \halign\bgroup&\global\advance\colcount by 1\relax - \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname - % - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns after - % the first one. - % - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % - % If the user has set preamble in terms of percent of \hsize we will - % use that dimension as the width of the column, and the \leftskip - % will keep entries from bumping into each other. Table will start at - % left margin and final column will justify at right margin. - % - % Make sure we don't inherit \rightskip from the outer environment. - \rightskip=0pt - \ifnum\colcount=1 - % The first column will be indented with the surrounding text. - \advance\hsize by\leftskip - \else - \ifsetpercent \else - % If user has not set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace. - \advance\hsize by \multitablecolspace - \fi - % In either case we will make \leftskip=\multitablecolspace: - \leftskip=\multitablecolspace - \fi - % Ignoring space at the beginning and end avoids an occasional spurious - % blank line, when TeX decides to break the line at the space before the - % box from the multistrut, so the strut ends up on a line by itself. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole country. - % Is automatically provided with highlighting sequences respectively marking - % characters. - \noindent\ignorespaces##\unskip\multistrut}\cr -} - -\def\setmultitablespacing{% test to see if user has set \multitablelinespace. -% If so, do nothing. If not, give it an appropriate dimension based on -% current baselineskip. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 -%% strut to put in table in case some entry doesn't have descenders, -%% to keep lines equally spaced -\let\multistrut = \strut -\else -%% FIXME: what is \box0 supposed to be? -\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 -width0pt\relax} \fi +\fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. @@ -2452,163 +3571,33 @@ width0pt\relax} \fi %% than skip between lines in the table. \fi} -% In case a @footnote appears inside an alignment, save the footnote -% text to a box and make the \insert when a row of the table is -% finished. Otherwise, the insertion is lost, it never migrates to the -% main vertical list. --kasal, 22jan03. -% -\newbox\savedfootnotes -% -% \dotable \let's \startfootins to this, so that \dofootnote will call -% it instead of starting the insertion right away. -\def\startsavedfootnote{% - \global\setbox\savedfootnotes = \vbox\bgroup - \unvbox\savedfootnotes -} -\def\crcrwithfootnotes{% - \crcr - \ifvoid\savedfootnotes \else - \noalign{\insert\footins{\box\savedfootnotes}}% - \fi -} \message{conditionals,} -% Prevent errors for section commands. -% Used in @ignore and in failing conditionals. -\def\ignoresections{% - \let\chapter=\relax - \let\unnumbered=\relax - \let\top=\relax - \let\unnumberedsec=\relax - \let\unnumberedsection=\relax - \let\unnumberedsubsec=\relax - \let\unnumberedsubsection=\relax - \let\unnumberedsubsubsec=\relax - \let\unnumberedsubsubsection=\relax - \let\section=\relax - \let\subsec=\relax - \let\subsubsec=\relax - \let\subsection=\relax - \let\subsubsection=\relax - \let\appendix=\relax - \let\appendixsec=\relax - \let\appendixsection=\relax - \let\appendixsubsec=\relax - \let\appendixsubsection=\relax - \let\appendixsubsubsec=\relax - \let\appendixsubsubsection=\relax - \let\contents=\relax - \let\smallbook=\relax - \let\titlepage=\relax -} - -% Used in nested conditionals, where we have to parse the Texinfo source -% and so want to turn off most commands, in case they are used -% incorrectly. -% -% We use \empty instead of \relax for the @def... commands, so that \end -% doesn't throw an error. For instance: -% @ignore -% @deffn ... -% @end deffn -% @end ignore -% -% The @end deffn is going to get expanded, because we're trying to allow -% nested conditionals. But we don't want to expand the actual @deffn, -% since it might be syntactically correct and intended to be ignored. -% Since \end checks for \relax, using \empty does not cause an error. -% -\def\ignoremorecommands{% - \let\defcodeindex = \relax - \let\defcv = \empty - \let\defcvx = \empty - \let\Edefcv = \empty - \let\deffn = \empty - \let\deffnx = \empty - \let\Edeffn = \empty - \let\defindex = \relax - \let\defivar = \empty - \let\defivarx = \empty - \let\Edefivar = \empty - \let\defmac = \empty - \let\defmacx = \empty - \let\Edefmac = \empty - \let\defmethod = \empty - \let\defmethodx = \empty - \let\Edefmethod = \empty - \let\defop = \empty - \let\defopx = \empty - \let\Edefop = \empty - \let\defopt = \empty - \let\defoptx = \empty - \let\Edefopt = \empty - \let\defspec = \empty - \let\defspecx = \empty - \let\Edefspec = \empty - \let\deftp = \empty - \let\deftpx = \empty - \let\Edeftp = \empty - \let\deftypefn = \empty - \let\deftypefnx = \empty - \let\Edeftypefn = \empty - \let\deftypefun = \empty - \let\deftypefunx = \empty - \let\Edeftypefun = \empty - \let\deftypeivar = \empty - \let\deftypeivarx = \empty - \let\Edeftypeivar = \empty - \let\deftypemethod = \empty - \let\deftypemethodx = \empty - \let\Edeftypemethod = \empty - \let\deftypeop = \empty - \let\deftypeopx = \empty - \let\Edeftypeop = \empty - \let\deftypevar = \empty - \let\deftypevarx = \empty - \let\Edeftypevar = \empty - \let\deftypevr = \empty - \let\deftypevrx = \empty - \let\Edeftypevr = \empty - \let\defun = \empty - \let\defunx = \empty - \let\Edefun = \empty - \let\defvar = \empty - \let\defvarx = \empty - \let\Edefvar = \empty - \let\defvr = \empty - \let\defvrx = \empty - \let\Edefvr = \empty - \let\clear = \relax - \let\down = \relax - \let\evenfooting = \relax - \let\evenheading = \relax - \let\everyfooting = \relax - \let\everyheading = \relax - \let\headings = \relax - \let\include = \relax - \let\item = \relax - \let\lowersections = \relax - \let\oddfooting = \relax - \let\oddheading = \relax - \let\printindex = \relax - \let\pxref = \relax - \let\raisesections = \relax - \let\ref = \relax - \let\set = \relax - \let\setchapternewpage = \relax - \let\setchapterstyle = \relax - \let\settitle = \relax - \let\up = \relax - \let\verbatiminclude = \relax - \let\xref = \relax + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 } +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} -\def\documentdescriptionword{documentdescription} \def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} \def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} @@ -2618,198 +3607,139 @@ width0pt\relax} \fi \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} -% @dircategory CATEGORY -- specify a category of the dir file -% which this file should belong to. Ignore this in TeX. -\let\dircategory = \comment - -% Ignore text until a line `@end #1'. +% Ignore text until a line `@end #1', keeping track of nested conditionals. % +% A count to remember the depth of nesting. +\newcount\doignorecount + \def\doignore#1{\begingroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define a command to swallow text until we reach `@end #1'. - % This @ is a catcode 12 token (that is the normal catcode of @ in - % this texinfo.tex file). We change the catcode of @ below to match. - \long\def\doignoretext##1@end #1{\enddoignore}% + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. - \catcode\spaceChar = 10 - % - % Ignore braces, too, so mismatched braces don't cause trouble. - \catcode`\{ = 9 - \catcode`\} = 9 + \spaceisspace % - % We must not have @c interpreted as a control sequence. - \catcode`\@ = 12 - % - \def\ignoreword{#1}% - \ifx\ignoreword\documentdescriptionword - % The c kludge breaks documentdescription, since - % `documentdescription' contains a `c'. Means not everything will - % be ignored inside @documentdescription, but oh well... - \else - % Make the letter c a comment character so that the rest of the line - % will be ignored. This way, the document can have (for example) - % @c @end ifinfo - % and the @end ifinfo will be properly ignored. - % (We've just changed @ to catcode 12.) - \catcode`\c = 14 - \fi + % Count number of #1's that we've seen. + \doignorecount = 0 % - % And now expand the command defined above. - \doignoretext -} - -% What we do to finish off ignored text. -% -\def\enddoignore{\endgroup\ignorespaces}% - -\newif\ifwarnedobs\warnedobsfalse -\def\obstexwarn{% - \ifwarnedobs\relax\else - % We need to warn folks that they may have trouble with TeX 3.0. - % This uses \immediate\write16 rather than \message to get newlines. - \immediate\write16{} - \immediate\write16{WARNING: for users of Unix TeX 3.0!} - \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} - \immediate\write16{If you are running another version of TeX, relax.} - \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} - \immediate\write16{ Then upgrade your TeX installation if you can.} - \immediate\write16{ (See ftp://ftp.gnu.org/non-gnu/TeX.README.)} - \immediate\write16{If you are stuck with version 3.0, run the} - \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} - \immediate\write16{ to use a workaround.} - \immediate\write16{} - \global\warnedobstrue - \fi + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% } -% **In TeX 3.0, setting text in \nullfont hangs tex. For a -% workaround (which requires the file ``dummy.tfm'' to be installed), -% uncomment the following line: -%%%%%\font\nullfont=dummy\let\obstexwarn=\relax - -% Ignore text, except that we keep track of conditional commands for -% purposes of nesting, up to an `@end #1' command. -% -\def\nestedignore#1{% - \obstexwarn - % We must actually expand the ignored text to look for the @end - % command, so that nested ignore constructs work. Thus, we put the - % text into a \vbox and then do nothing with the result. To minimize - % the chance of memory overflow, we follow the approach outlined on - % page 401 of the TeXbook. +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % % - \setbox0 = \vbox\bgroup - % Don't complain about control sequences we have declared \outer. - \ignoresections - % - % Define `@end #1' to end the box, which will in turn undefine the - % @end command again. - \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% - % - % We are going to be parsing Texinfo commands. Most cause no - % trouble when they are used incorrectly, but some commands do - % complicated argument parsing or otherwise get confused, so we - % undefine them. - % - % We can't do anything about stray @-signs, unfortunately; - % they'll produce `undefined control sequence' errors. - \ignoremorecommands + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. % - % Set the current font to be \nullfont, a TeX primitive, and define - % all the font commands to also use \nullfont. We don't use - % dummy.tfm, as suggested in the TeXbook, because some sites - % might not have that installed. Therefore, math mode will still - % produce output, but that should be an extremely small amount of - % stuff compared to the main input. + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% % - \nullfont - \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont - \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont - \let\tensf=\nullfont - % Similarly for index fonts. - \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont - \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont - \let\smallsf=\nullfont - % Similarly for smallexample fonts. - \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont - \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont - \let\smallersf=\nullfont + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % - % Don't complain when characters are missing from the fonts. - \tracinglostchars = 0 - % - % Don't bother to do space factor calculations. - \frenchspacing - % - % Don't report underfull hboxes. - \hbadness = 10000 - % - % Do minimal line-breaking. - \pretolerance = 10000 - % - % Do not execute instructions in @tex. - \def\tex{\doignore{tex}}% - % Do not execute macro definitions. - % `c' is a comment character, so the word `macro' will get cut off. - \def\macro{\doignore{ma}}% + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } + % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we -% didn't need it. Make sure the catcode of space is correct to avoid -% losing inside @example, for instance. +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. % -\def\set{\begingroup\catcode` =10 - \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. - \parsearg\setxxx} -\def\setxxx#1{\setyyy#1 \endsetyyy} +\parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% - \def\temp{#2}% - \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty - \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. - \fi - \endgroup + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% } -% Can't use \xdef to pre-expand #2 and save some time, since \temp or -% \next or other control sequences that we've defined might get us into -% an infinite loop. Consider `@set foo @cite{bar}'. -\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % -\def\clear{\parsearg\clearxxx} -\def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} % @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} { - \catcode`\_ = \active + \catcode`\- = \active \catcode`\_ = \active % - % We might end up with active _ or - characters in the argument if - % we're called from @code, as @code{@value{foo-bar_}}. So \let any - % such active characters to their normal equivalents. - \gdef\value{\begingroup + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other - \indexbreaks \let_\normalunderscore - \valuexxx} + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\realdash \let_\normalunderscore + } } -\def\valuexxx#1{\expandablevalue{#1}\endgroup} % We have this subroutine so that we can handle at least some @value's -% properly in indexes (we \let\value to this in \indexdummies). Ones -% whose names contain - or _ still won't work, but we can't do anything -% about that. The command has to be fully expandable (if the variable -% is set), since the result winds up in the index file. This means that -% if the variable's value contains other Texinfo commands, it's almost -% certain it will fail (although perhaps we could fix that with -% sufficient work to do a one-level expansion on the result, instead of -% complete). +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax @@ -2823,55 +3753,36 @@ width0pt\relax} \fi % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % -\def\ifset{\parsearg\doifset} -\def\doifset#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \let\next=\ifsetfail - \else - \let\next=\ifsetsucceed - \fi - \next +% To get special treatment of `@end ifset,' call \makeond and the redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next } -\def\ifsetsucceed{\conditionalsucceed{ifset}} -\def\ifsetfail{\nestedignore{ifset}} -\defineunmatchedend{ifset} +\def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % -\def\ifclear{\parsearg\doifclear} -\def\doifclear#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - \let\next=\ifclearsucceed - \else - \let\next=\ifclearfail - \fi - \next -} -\def\ifclearsucceed{\conditionalsucceed{ifclear}} -\def\ifclearfail{\nestedignore{ifclear}} -\defineunmatchedend{ifclear} - -% @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we -% read the text following, through the first @end iftex (etc.). Make -% `@end iftex' (etc.) valid only after an @iftex. +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. % -\def\iftex{\conditionalsucceed{iftex}} -\def\ifnothtml{\conditionalsucceed{ifnothtml}} -\def\ifnotinfo{\conditionalsucceed{ifnotinfo}} -\def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}} -\defineunmatchedend{iftex} -\defineunmatchedend{ifnothtml} -\defineunmatchedend{ifnotinfo} -\defineunmatchedend{ifnotplaintext} +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} -% True conditional. Since \set globally defines its variables, we can -% just start and end a group (to keep the @end definition undefined at -% the outer level). -% -\def\conditionalsucceed#1{\begingroup - \expandafter\def\csname E#1\endcsname{\endgroup}% -} +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment @@ -2881,9 +3792,8 @@ width0pt\relax} \fi % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite -% except not \outer, so it can be used within \newindex. -{\catcode`\@=11 -\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that @@ -2922,10 +3832,10 @@ width0pt\relax} \fi % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. -% +% % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. -% +% \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} @@ -2967,204 +3877,243 @@ width0pt\relax} \fi % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. -% +% \def\indexdummies{% + \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% + % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes - % braces and backslashes are used only as delimiters. + % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % - % \definedummyword defines \#1 as \realbackslash #1\space, thus - % effectively preventing its expansion. This is used only for control - % words, not control letters, because the \space would be incorrect - % for control characters, but is needed to separate the control word - % from whatever follows. + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. % - % For control letters, we have \definedummyletter, which omits the - % space. + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest % - % These can be used both for control words that take an argument and - % those that do not. If it is followed by {arg} in the input, then - % that will dutifully get written to the index (or wherever). + % The above is not enough to reproduce the bug, but it gives the flavor. % - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% - }% + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty % % Do the redefinitions. \commondummies } -% For the aux file, @ is the escape character. So we want to redefine -% everything using @ instead of \realbackslash. When everything uses -% @, this will be simpler. -% +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % - % (See comments in \indexdummies.) - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{@##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{@##1}% - }% - % % Do the redefinitions. \commondummies + \otherbackslash } -% Called from \indexdummies and \atdummies. \definedummyword and -% \definedummyletter must be defined first. -% +% Called from \indexdummies and \atdummies. +% \def\commondummies{% % - \normalturnoffactive + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control% words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. % - % Control letters and accents. - \definedummyletter{_}% - \definedummyletter{,}% - \definedummyletter{"}% - \definedummyletter{`}% - \definedummyletter{'}% - \definedummyletter{^}% - \definedummyletter{~}% - \definedummyletter{=}% - \definedummyword{u}% - \definedummyword{v}% - \definedummyword{H}% - \definedummyword{dotaccent}% - \definedummyword{ringaccent}% - \definedummyword{tieaccent}% - \definedummyword{ubaraccent}% - \definedummyword{udotaccent}% - \definedummyword{dotless}% - % - % Other non-English letters. - \definedummyword{AA}% - \definedummyword{AE}% - \definedummyword{L}% - \definedummyword{OE}% - \definedummyword{O}% - \definedummyword{aa}% - \definedummyword{ae}% - \definedummyword{l}% - \definedummyword{oe}% - \definedummyword{o}% - \definedummyword{ss}% + % For control letters, we have \definedummyletter, which omits the + % space. % - % Although these internal commands shouldn't show up, sometimes they do. - \definedummyword{bf}% - \definedummyword{gtr}% - \definedummyword{hat}% - \definedummyword{less}% - \definedummyword{sf}% - \definedummyword{sl}% - \definedummyword{tclose}% - \definedummyword{tt}% + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). % - % Texinfo font commands. - \definedummyword{b}% - \definedummyword{i}% - \definedummyword{r}% - \definedummyword{sc}% - \definedummyword{t}% - % - \definedummyword{TeX}% - \definedummyword{acronym}% - \definedummyword{cite}% - \definedummyword{code}% - \definedummyword{command}% - \definedummyword{dfn}% - \definedummyword{dots}% - \definedummyword{emph}% - \definedummyword{env}% - \definedummyword{file}% - \definedummyword{kbd}% - \definedummyword{key}% - \definedummyword{math}% - \definedummyword{option}% - \definedummyword{samp}% - \definedummyword{strong}% - \definedummyword{uref}% - \definedummyword{url}% - \definedummyword{var}% - \definedummyword{w}% + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\L + \definedummyword\OE + \definedummyword\O + \definedummyword\aa + \definedummyword\ae + \definedummyword\l + \definedummyword\oe + \definedummyword\o + \definedummyword\ss + \definedummyword\exclamdown + \definedummyword\questiondown + \definedummyword\ordf + \definedummyword\ordm + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX % % Assorted special characters. - \definedummyword{bullet}% - \definedummyword{copyright}% - \definedummyword{dots}% - \definedummyword{enddots}% - \definedummyword{equiv}% - \definedummyword{error}% - \definedummyword{expansion}% - \definedummyword{minus}% - \definedummyword{pounds}% - \definedummyword{point}% - \definedummyword{print}% - \definedummyword{result}% - % - % Handle some cases of @value -- where the variable name does not - % contain - or _, and the value does not contain any - % (non-fully-expandable) commands. - \let\value = \expandablevalue + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\expansion + \definedummyword\minus + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist % - % Normal spaces, not active ones. - \unsepspaces + \normalturnoffactive % - % No macro expansion. - \turnoffmacros + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable } -% If an index command is used in an @example environment, any spaces -% therein should become regular spaces in the raw index file, not the -% expansion of \tie (\leavevmode \penalty \@M \ ). -{\obeyspaces - \gdef\unsepspaces{\obeyspaces\let =\space}} - +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sc + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\acronym + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % -\def\indexdummytex{TeX} -\def\indexdummydots{...} -% \def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % Hopefully, all control words can become @asis. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % - \let\,=\asis - \let\"=\asis - \let\`=\asis - \let\'=\asis - \let\^=\asis - \let\~=\asis - \let\==\asis - \let\u=\asis - \let\v=\asis - \let\H=\asis - \let\dotaccent=\asis - \let\ringaccent=\asis - \let\tieaccent=\asis - \let\ubaraccent=\asis - \let\udotaccent=\asis - \let\dotless=\asis - % - % Other non-English letters. + % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% @@ -3178,146 +4127,208 @@ width0pt\relax} \fi \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% + \def\ordf{a}% + \def\ordm{o}% % - % Don't no-op \tt, since it isn't a user-level command - % and is used in the definitions of the active chars like <, >, |, etc. - % Likewise with the other plain tex font commands. - %\let\tt=\asis + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% % - % Texinfo font commands. - \let\b=\asis - \let\i=\asis - \let\r=\asis - \let\sc=\asis - \let\t=\asis - % - \let\TeX=\indexdummytex - \let\acronym=\asis - \let\cite=\asis - \let\code=\asis - \let\command=\asis - \let\dfn=\asis - \let\dots=\indexdummydots - \let\emph=\asis - \let\env=\asis - \let\file=\asis - \let\kbd=\asis - \let\key=\asis - \let\math=\asis - \let\option=\asis - \let\samp=\asis - \let\strong=\asis - \let\uref=\asis - \let\url=\asis - \let\var=\asis - \let\w=\asis + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\registeredsymbol{R}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\expansion{==>}% + \def\minus{-}% + \def\pounds{pounds}% + \def\point{.}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\result{=>}% + \def\textdegree{degrees}% + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? -% For \ifx comparisons. -\def\emptymacro{\empty} - % Most index entries go through here, but \dosubind is the general case. -% -\def\doind#1#2{\dosubind{#1}{#2}\empty} +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- -% \empty if called from \doind, as we usually are. The main exception -% is with defuns, which call us directly. +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). % \def\dosubind#1#2#3{% + \iflinks + {% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Write the entry in \toks0 to the index file: +% +\def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else - \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi - {% - \count255=\lastpenalty - {% - \indexdummies % Must do this here, since \bf, etc expand at this stage - \escapechar=`\\ - {% - \let\folio = 0% We will expand all macros now EXCEPT \folio. - \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now - % so it will be output as is; and it will print as backslash. - % - % The main index entry text. - \toks0 = {#2}% - % - % If third arg is present, precede it with space in sort key. - \def\thirdarg{#3}% - \ifx\thirdarg\emptymacro \else - % If the third (subentry) arg is present, add it to the index - % line to write. - \toks0 = \expandafter{\the\toks0 \space #3}% - \fi - % - % Process the index entry with all font commands turned off, to - % get the string to sort by. - {\indexnofonts - \edef\temp{\the\toks0}% need full expansion - \xdef\indexsorttmp{\temp}% - }% - % - % Set up the complete index entry, with both the sort key and - % the original text, including any font commands. We write - % three arguments to \entry to the .?? file (four in the - % subentry case), texindex reduces to two when writing the .??s - % sorted result. - \edef\temp{% - \write\csname#1indfile\endcsname{% - \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% - }% - % - % If a skip is the last thing on the list now, preserve it - % by backing up by \lastskip, doing the \write, then inserting - % the skip again. Otherwise, the whatsit generated by the - % \write will make \lastskip zero. The result is that sequences - % like this: - % @end defun - % @tindex whatever - % @defun ... - % will have extra space inserted, because the \medbreak in the - % start of the @defun won't see the skip inserted by the @end of - % the previous defun. - % - % But don't do any of this if we're not in vertical mode. We - % don't want to do a \vskip and prematurely end a paragraph. - % - % Avoid page breaks due to these extra skips, too. - % - \iflinks - \ifvmode - \skip0 = \lastskip - \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi - \fi - % - \temp % do the write - % - \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi - \fi - }% - }% - \penalty\count255 + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% + \temp } -% The index entry written in the file actually looks like -% \entry {sortstring}{page}{topic} -% or -% \entry {sortstring}{page}{topic}{subtopic} -% The texindex program reads in these files and writes files -% containing these kinds of lines: -% \initial {c} -% before the first topic whose initial is c -% \entry {topic}{pagelist} -% for a topic that is used without subtopics -% \primary {topic} -% for the beginning of a topic that is used with subtopics -% \secondary {subtopic}{pagelist} -% for each subtopic. +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{% +\ifhmode + #1% +\else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi +} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. @@ -3339,13 +4350,13 @@ width0pt\relax} \fi % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % -\def\printindex{\parsearg\doprintindex} -\def\doprintindex#1{\begingroup +\parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 - \indexbreaks + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains @@ -3372,7 +4383,7 @@ width0pt\relax} \fi % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. - \def\indexbackslash{\rawbackslashxx}% + \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns @@ -3394,7 +4405,10 @@ width0pt\relax} \fi \removelastskip % % We like breaks before the index initials, so insert a bonus. - \penalty -300 + \nobreak + \vskip 0pt plus 3\baselineskip + \penalty 0 + \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column @@ -3404,84 +4418,101 @@ width0pt\relax} \fi % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% - \vskip .33\baselineskip plus .1\baselineskip - % % Do our best not to break after the initial. \nobreak + \vskip .33\baselineskip plus .1\baselineskip }} -% This typesets a paragraph consisting of #1, dot leaders, and then #2 -% flush to the right margin. It is used for index and table of contents -% entries. The paragraph is indented by \leftskip. +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. % -\def\entry#1#2{\begingroup - % - % Start a new paragraph if necessary, so our assignments below can't - % affect previous text. - \par - % - % Do not fill out the last line with white space. - \parfillskip = 0in - % - % No extra space above this paragraph. - \parskip = 0in - % - % Do not prefer a separate line ending with a hyphen to fewer lines. - \finalhyphendemerits = 0 - % - % \hangindent is only relevant when the entry text and page number - % don't both fit on one line. In that case, bob suggests starting the - % dots pretty far over on the line. Unfortunately, a large - % indentation looks wrong when the entry text itself is broken across - % lines. So we use a small indentation and put up with long leaders. - % - % \hangafter is reset to 1 (which is the value we want) at the start - % of each paragraph, so we need not do anything with that. - \hangindent = 4pc %gmsh 2em - % - % When the entry text needs to be broken, just fill out the first line - % with blank space. - \rightskip = 0pt plus1fil - % - % A bit of stretch before each entry for the benefit of balancing columns. - \vskip 0pt plus1pt - % - % Start a ``paragraph'' for the index entry so the line breaking - % parameters we've set above will have an effect. - \noindent - % - % Insert the text of the index entry. TeX will do line-breaking on it. - #1% - % The following is kludged to not output a line of dots in the index if - % there are no page numbers. The next person who breaks this will be - % cursed by a Unix daemon. - \def\tempa{{\rm }}% - \def\tempb{#2}% - \edef\tempc{\tempa}% - \edef\tempd{\tempb}% - \ifx\tempc\tempd\ \else% +% A straightforward implementation would start like this: +% \def\entry#1#2{... +% But this frozes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % Do not fill out the last line with white space. + \parfillskip = 0in % - % If we must, put the page number on a line of its own, and fill out - % this line with blank space. (The \hfil is overwhelmed with the - % fill leaders glue in \indexdotfill if the page number does fit.) - \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. + % No extra space above this paragraph. + \parskip = 0in % - % The `\ ' here is removed by the implicit \unskip that TeX does as - % part of (the primitive) \par. Without it, a spurious underfull - % \hbox ensues. - \ifpdf - \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % \hangindent is only relevant when the entry text and page number + % don't both fit on one line. In that case, bob suggests starting the + % dots pretty far over on the line. Unfortunately, a large + % indentation looks wrong when the entry text itself is broken across + % lines. So we use a small indentation and put up with long leaders. + % + % \hangafter is reset to 1 (which is the value we want) at the start + % of each paragraph, so we need not do anything with that. + \hangindent = 2em + % + % When the entry text needs to be broken, just fill out the first line + % with blank space. + \rightskip = 0pt plus1fil + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus1pt + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. +} +\def\finishentry#1{% + % #1 is the page number. + % + % The following is kludged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % \else - \ #2% The page number ends the paragraph. + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ifpdf + \pdfgettoks#1.% + \ \the\toksA + \else + \ #1% + \fi \fi - \fi% - \par -\endgroup} + \par + \endgroup +} -% Like \dotfill except takes at least 1 em. +% Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} @@ -3588,9 +4619,37 @@ width0pt\relax} \fi \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } -% +% % All done with double columns. \def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. @@ -3646,6 +4705,12 @@ width0pt\relax} \fi \message{sectioning,} % Chapters, sections, etc. +% \unnumberedno is an oxymoron, of course. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 @@ -3653,9 +4718,12 @@ width0pt\relax} \fi % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ +% % \def\appendixletter{\char\the\appendixno} -% We do the following for the sake of pdftex, which needs the actual +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. +% \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% @@ -3691,13 +4759,18 @@ width0pt\relax} \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise. +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. \def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} \def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level -\newcount\secbase\secbase=0 % @raise/lowersections modify this count +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} @@ -3707,118 +4780,142 @@ width0pt\relax} \fi \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name -% Choose a numbered-heading macro -% #1 is heading level if unmodified by @raisesections or @lowersections -% #2 is text for heading -\def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \chapterzzz{#2} -\or - \seczzz{#2} -\or - \numberedsubseczzz{#2} -\or - \numberedsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \chapterzzz{#2} +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achive this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unmlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 \else - \numberedsubsubseczzz{#2} + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi \fi -\fi -} - -% like \numhead, but chooses appendix heading levels -\def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \appendixzzz{#2} -\or - \appendixsectionzzz{#2} -\or - \appendixsubseczzz{#2} -\or - \appendixsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \appendixzzz{#2} + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unmlevel + \chardef\unmlevel = \absseclevel + \fi \else - \appendixsubsubseczzz{#2} + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unmlevel + \def\headtype{U}% + \else + \chardef\unmlevel = 3 + \fi \fi -\fi -} - -% like \numhead, but chooses numberless heading levels -\def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 -\ifcase\absseclevel - \unnumberedzzz{#2} -\or - \unnumberedseczzz{#2} -\or - \unnumberedsubseczzz{#2} -\or - \unnumberedsubsubseczzz{#2} -\else - \ifnum \absseclevel<0 - \unnumberedzzz{#2} + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi \else - \unnumberedsubsubseczzz{#2} + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi \fi -\fi + \suppressfirstparagraphindent } -% @chapter, @appendix, @unnumbered. -\def\thischaptername{No Chapter Title} -\outer\def\chapter{\parsearg\chapteryyy} -\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz -\def\chapterzzz #1{% - \secno=0 \subsecno=0 \subsubsecno=0 - \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% - \chapmacro {#1}{\the\chapno}% - \gdef\thissection{#1}% - \gdef\thischaptername{#1}% - % We don't substitute the actual chapter name into \thischapter - % because we don't want its macros evaluated now. - \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% - \writetocentry{chap}{#1}{{\the\chapno}} - \donoderef +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + \message{\putwordChapter\space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } -% we use \chapno to avoid indenting back -\def\appendixbox#1{% - \setbox0 = \hbox{\putwordAppendix{} \the\chapno}% - \hbox to \wd0{#1\hss}} - -\outer\def\appendix{\parsearg\appendixyyy} -\def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz -\def\appendixzzz #1{% - \secno=0 \subsecno=0 \subsubsecno=0 - \global\advance \appendixno by 1 - \message{\putwordAppendix\space \appendixletter}% - \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% - \gdef\thissection{#1}% - \gdef\thischaptername{#1}% - \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% - \writetocentry{appendix}{#1}{{\appendixletter}} - \appendixnoderef +\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + \def\appendixnum{\putwordAppendix\space \appendixletter}% + \message{\appendixnum}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } -% @centerchap is like @unnumbered, but the heading is centered. -\outer\def\centerchap{\parsearg\centerchapyyy} -\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} - -% @top is like @unnumbered. -\outer\def\top{\parsearg\unnumberedyyy} - -\outer\def\unnumbered{\parsearg\unnumberedyyy} -\def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -\def\unnumberedzzz #1{% - \secno=0 \subsecno=0 \subsubsecno=0 +\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX @@ -3831,134 +4928,98 @@ width0pt\relax} \fi % \the<toks register> to achieve this: TeX expands \the<toks> only once, % simply yielding the contents of <toks register>. (We also do this for % the toc entries.) - \toks0 = {#1}\message{(\the\toks0)}% + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % - \unnumbchapmacro {#1}% - \gdef\thischapter{#1}\gdef\thissection{#1}% - \writetocentry{unnumbchap}{#1}{{\the\chapno}} - \unnumbnoderef \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + % Well, we could do the following in a group, but that would break + % an assumption that \chapmacro is called at the outermost level. + % Thus we are safer this way: --kasal, 24feb04 + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + % Sections. -\outer\def\numberedsec{\parsearg\secyyy} -\def\secyyy #1{\numhead1{#1}} % normally calls seczzz -\def\seczzz #1{% - \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % - \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% - \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} - \donoderef - \nobreak +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } -\outer\def\appendixsection{\parsearg\appendixsecyyy} -\outer\def\appendixsec{\parsearg\appendixsecyyy} -\def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz -\def\appendixsectionzzz #1{% - \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % - \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% - \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} - \appendixnoderef - \nobreak +\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } +\let\appendixsec\appendixsection -\outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} -\def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz -\def\unnumberedseczzz #1{% - \plainsecheading {#1}\gdef\thissection{#1}% - \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} - \unnumbnoderef - \nobreak +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. -\outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} -\def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz -\def\numberedsubseczzz #1{% - \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % - \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% - \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} - \donoderef - \nobreak +\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } -\outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} -\def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz -\def\appendixsubseczzz #1{% - \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % - \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% - \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} - \appendixnoderef - \nobreak +\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% } -\outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} -\def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -\def\unnumberedsubseczzz #1{% - \plainsubsecheading {#1}\gdef\thissection{#1}% - \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} - \unnumbnoderef - \nobreak +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. -\outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} -\def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz -\def\numberedsubsubseczzz #1{% - \gdef\thissection{#1}\global\advance \subsubsecno by 1 % - \subsubsecheading {#1} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% - \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} - \donoderef - \nobreak +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} -\def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz -\def\appendixsubsubseczzz #1{% - \gdef\thissection{#1}\global\advance \subsubsecno by 1 % - \subsubsecheading {#1} - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% - \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} - \appendixnoderef - \nobreak +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } -\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} -\def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -\def\unnumberedsubsubseczzz #1{% - \plainsubsubsecheading {#1}\gdef\thissection{#1}% - \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} - \unnumbnoderef - \nobreak +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } -% These are variants which are not "outer", so they can appear in @ifinfo. -% Actually, they should now be obsolete; ordinary section commands should work. -\def\infotop{\parsearg\unnumberedzzz} -\def\infounnumbered{\parsearg\unnumberedzzz} -\def\infounnumberedsec{\parsearg\unnumberedseczzz} -\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} -\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} - -\def\infoappendix{\parsearg\appendixzzz} -\def\infoappendixsec{\parsearg\appendixseczzz} -\def\infoappendixsubsec{\parsearg\appendixsubseczzz} -\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} - -\def\infochapter{\parsearg\chapterzzz} -\def\infosection{\parsearg\sectionzzz} -\def\infosubsection{\parsearg\subsectionzzz} -\def\infosubsubsection{\parsearg\subsubsectionzzz} - % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. -\global\let\section = \numberedsec -\global\let\subsection = \numberedsubsec -\global\let\subsubsection = \numberedsubsubsec +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading @@ -3971,23 +5032,27 @@ width0pt\relax} \fi % if justification is not attempted. Hence \raggedright. -\def\majorheading{\parsearg\majorheadingzzz} -\def\majorheadingzzz #1{% +\def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + \parsearg\chapheadingzzz +} -\def\chapheading{\parsearg\chapheadingzzz} -\def\chapheadingzzz #1{\chapbreak % +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + \rm #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} % @heading, @subheading, @subsubheading. -\def\heading{\parsearg\plainsecheading} -\def\subheading{\parsearg\plainsubsecheading} -\def\subsubheading{\parsearg\plainsubsubsecheading} +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), @@ -3996,8 +5061,6 @@ width0pt\relax} \fi %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} -\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} - %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) @@ -4005,7 +5068,20 @@ width0pt\relax} \fi \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% + \hbox to 0pt{}% + \chappager + \endgroup + \fi +} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} @@ -4020,7 +5096,7 @@ width0pt\relax} \fi \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} -\def\CHAPPAGodd{ +\def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage @@ -4028,116 +5104,275 @@ width0pt\relax} \fi \CHAPPAGon -\def\CHAPFplain{ -\global\let\chapmacro=\chfplain -\global\let\unnumbchapmacro=\unnchfplain -\global\let\centerchapmacro=\centerchfplain} - -% Plain chapter opening. -% #1 is the text, #2 the chapter number or empty if unnumbered. -\def\chfplain#1#2{% +% Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yomitfromtockeyword{Yomitfromtoc} +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % {% \chapfonts \rm - \def\chapnum{#2}% - \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright - \hangindent = \wd0 \centerparametersmaybe + \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } -% Plain opening for unnumbered. -\def\unnchfplain#1{\chfplain{#1}{}} - % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax -\def\centerchfplain#1{{% - \def\centerparametersmaybe{% - \advance\rightskip by 3\rightskip - \leftskip = \rightskip - \parfillskip = 0pt - }% - \chfplain{#1}{}% -}} +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} -\CHAPFplain % The default +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } - \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } - \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } - -\def\CHAPFopen{ -\global\let\chapmacro=\chfopen -\global\let\unnumbchapmacro=\unnchfopen -\global\let\centerchapmacro=\centerchfopen} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} -% Section titles. +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% \newskip\secheadingskip -\def\secheadingbreak{\dobreak \secheadingskip {-1000}} -\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} -\def\plainsecheading#1{\sectionheading{sec}{}{#1}} +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. -\newskip \subsecheadingskip -\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} -\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} -\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. -\let\subsubsecheadingskip = \subsecheadingskip -\let\subsubsecheadingbreak = \subsecheadingbreak -\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} -\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} -% Print any size section title. +% Print any size, any type, section title. % -% #1 is the section type (sec/subsec/subsubsec), #2 is the section -% number (maybe empty), #3 the text. -\def\sectionheading#1#2#3{% - {% - \expandafter\advance\csname #1headingskip\endcsname by \parskip - \csname #1headingbreak\endcsname - }% +% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. - \csname #1fonts\endcsname \rm + \csname #2fonts\endcsname \rm + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi % - % Only insert the separating space if we have a section number. - \def\secnum{#2}% - \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright - \hangindent = \wd0 % zero if no section number - \unhbox0 #3}% + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% }% - % Add extra space after the heading -- either a line space or a - % paragraph space, whichever is more. (Some people like to set - % \parskip to large values for some reason.) Don't allow stretch, though. - \nobreak - \ifdim\parskip>\normalbaselineskip - \kern\parskip - \else - \kern\normalbaselineskip - \fi + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) + \vskip-\parskip + % + % This is purely so the last item on the list is a known \penalty > + % 10000. This is so \startdefun can avoid allowing breakpoints after + % section headings. Otherwise, it would insert a valid breakpoint between: + % + % @section sec-whatever + % @deffn def-whatever + \penalty 10001 } @@ -4146,119 +5381,177 @@ width0pt\relax} \fi \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. -% Called from @chapter, etc. We supply {\folio} at the end of the -% argument, which will end up as the last argument to the \...entry macro. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. % -% Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. % \newif\iftocfileopened +\def\omitkeyword{omit}% +% \def\writetocentry#1#2#3{% - \iftocfileopened\else - \immediate\openout\tocfile = \jobname.toc - \global\tocfileopenedtrue - \fi - % - \iflinks - \toks0 = {#2}% - \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% - \temp + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi \fi % - % Tell \shipout to create a page destination if we're doing pdf, which - % will be the target of the links in the table of contents. We can't - % just do it on every page because the title pages are numbered 1 and - % 2 (the page numbers aren't printed), and so are the first two pages - % of the document. Thus, we'd have two destinations named `1', and - % two named `2'. - \ifpdf \pdfmakepagedesttrue \fi + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 -% Finish up the main text and prepare to read what we've written -% to \tocfile. +% Prepare to read what we've written to \tocfile. % \def\startcontents#1{% - % If @setchapternewpage on, and @headings double, the contents should - % start on an odd page, unlike chapters. Thus, we maintain - % \contentsalignmacro in parallel with \pagealignmacro. - % From: Torbjorn Granlund <tege@matematik.su.se> - \contentsalignmacro - \immediate\closeout\tocfile - % - % Don't need to put `Contents' or `Short Contents' in the headline. - % It is abundantly clear what they are. - \unnumbchapmacro{#1}\def\thischapter{}% - \savepageno = \pageno - \begingroup % Set up to handle contents files properly. - \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 - % We can't do this, because then an actual ^ in a section - % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. - %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi - \raggedbottom % Worry more about breakpoints than the bottom. - \advance\hsize by -\contentsrightmargin % Don't use the full line length. - % - % Roman numerals for page numbers. - \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund <tege@matematik.su.se> + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} % Normal (long) toc. +% \def\contents{% - \startcontents{\putwordTOC}% - \openin 1 \jobname.toc - \ifeof 1 \else - \closein 1 - \input \jobname.toc - \fi - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \pdfmakeoutlines - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% - \startcontents{\putwordShortTOC}% - % - \let\chapentry = \shortchapentry - \let\appendixentry = \shortappendixentry - \let\unnumbchapentry = \shortunnumberedentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf - \let\sl=\shortcontsl \let\tt=\shortconttt - \rm - \hyphenpenalty = 10000 - \advance\baselineskip by 1pt % Open it up a little. - \def\secentry ##1##2##3##4{} - \def\subsecentry ##1##2##3##4##5{} - \def\subsubsecentry ##1##2##3##4##5##6{} - \let\unnumbsecentry = \secentry - \let\unnumbsubsecentry = \subsecentry - \let\unnumbsubsubsecentry = \subsubsecentry - \openin 1 \jobname.toc - \ifeof 1 \else - \closein 1 - \input \jobname.toc - \fi - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno + \startcontents{\putwordShortTOC}% + % + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno } \let\shortcontents = \summarycontents -\ifpdf - \pdfcatalog{/PageMode /UseOutlines}% -\fi +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. @@ -4266,58 +5559,46 @@ width0pt\relax} \fi % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. -\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. -\def\shortchapentry#1#2#3{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. -\def\appendixentry#1#2#3{% - \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}} -% -% Appendices, in the short toc. -\let\shortappendixentry = \shortchapentry - -% Typeset the label for a chapter or appendix for the short contents. -% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter. -% We could simplify the code here by writing out an \appendixentry -% command in the toc file for appendices, instead of using \chapentry -% for both, but it doesn't seem worth it. +% Need the word Appendix, and a fixed-size box. % -\newdimen\shortappendixwidth +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} % -\def\shortchaplabel#1{% - % This space should be enough, since a single number is .5em, and the - % widest letter (M) is 1em, at least in the Computer Modern fonts. - % But use \hss just in case. - % (This space doesn't include the extra space that gets added after - % the label; that gets put in by \shortchapentry above.) - \dimen0 = 1em - \hbox to \dimen0{#1\hss}% -} +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. -\def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}} -\def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}} +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. -\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} -\def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}} +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. -\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} -\def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}} +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. -\def\subsubsecentry#1#2#3#4#5#6{% - \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} -\def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}} +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. -\newdimen\tocindent \tocindent = 2.1pc %geuz 3pc +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. @@ -4325,8 +5606,7 @@ width0pt\relax} \fi % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% - %gmsh \penalty-300 - \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% @@ -4349,17 +5629,8 @@ width0pt\relax} \fi \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} -% Final typesetting of a toc entry; we use the same \entry macro as for -% the index entries, but we want to suppress hyphenation here. (We -% can't do that in the \entry macro, since index entries might consist -% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) -\def\tocentry#1#2{\begingroup - \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks - % Do not use \turnoffactive in these arguments. Since the toc is - % typeset in cmr, characters such as _ would come out wrong; we - % have to do the usual translation tricks. - \entry{#1}{#2}% -\endgroup} +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} @@ -4369,15 +5640,15 @@ width0pt\relax} \fi \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} -\let\subsecentryfonts = \textfonts -\let\subsubsecentryfonts = \textfonts +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% +% % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % @@ -4389,18 +5660,18 @@ width0pt\relax} \fi % The @error{} command. % Adapted from the TeXbook's \boxit. -% +% \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} +\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % -\global\setbox\errorbox=\hbox to \dimen0{\hfil +\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. - \vbox{ + \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. @@ -4414,14 +5685,13 @@ width0pt\relax} \fi % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. -\def\tex{\begingroup +\envdef\tex{% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other - \catcode `\==\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other @@ -4436,20 +5706,24 @@ width0pt\relax} \fi \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext + \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% -\let\Etex=\endgroup} +} +% There is no need to define \Etex. % Define @lisp ... @end lisp. -% @lisp does a \begingroup so it can rebind things, +% @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. @@ -4460,19 +5734,6 @@ width0pt\relax} \fi % have any width. \def\lisppar{\null\endgraf} -% Make each space character in the input produce a normal interword -% space in the output. Don't allow a line break at this space, as this -% is used only in environments like @example, where each line of input -% should produce a line of output anyway. -% -{\obeyspaces % -\gdef\sepspaces{\obeyspaces\let =\tie}} - -% Define \obeyedspace to be our active space, whatever it is. This is -% for use in \parsearg. -{\sepspaces% -\global\let\obeyedspace= } - % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt @@ -4482,7 +5743,8 @@ width0pt\relax} \fi % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% - % =10000 instead of <10000 because of a special case in \itemzzz, q.v. + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf @@ -4490,7 +5752,7 @@ width0pt\relax} \fi \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... - \ifnum\lastpenalty>10000 \else \penalty-50 \fi + \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi @@ -4498,7 +5760,8 @@ width0pt\relax} \fi \let\afterenvbreak = \aboveenvbreak -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around @@ -4522,52 +5785,52 @@ width0pt\relax} \fi % \newskip\lskip\newskip\rskip -\def\cartouche{% -\par % can't be in the midst of a paragraph. -\begingroup - \lskip=\leftskip \rskip=\rightskip - \leftskip=0pt\rightskip=0pt %we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip - \advance\cartinner by-\rskip - \cartouter=\hsize - \advance\cartouter by 18.4pt % allow for 3pt kerns on either -% side, and for 6pt waste from -% each corner char, and rule thickness - \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing=\comment - \vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup - \hskip\lskip - \vrule\kern3pt - \vbox\bgroup - \hsize=\cartinner - \kern3pt - \begingroup - \baselineskip=\normbskip - \lineskip=\normlskip - \parskip=\normpskip - \vskip -\parskip +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing = t% + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of \def\group. +} \def\Ecartouche{% - \endgroup - \kern3pt - \egroup - \kern3pt\vrule - \hskip\rskip - \egroup - \cartbot - \egroup -\endgroup -}} + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \checkinserts +} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak - \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines @@ -4575,121 +5838,144 @@ width0pt\relax} \fi \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing - \let\exdent=\nofillexdent - \let\nonarrowing=\relax + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm \fi } -% Define the \E... control sequence only if we are inside the particular -% environment, so the error checking in \end will work. -% -% To end an @example-like environment, we first end the paragraph (via -% \afterenvbreak's vertical glue), and then the group. That way we keep -% the zero \parskip that the environments set -- \parskip glue will be -% inserted at the beginning of the next paragraph in the document, after -% the environment. -% -\def\nonfillfinish{\afterenvbreak\endgroup} - -% @lisp: indented, narrowed, typewriter font. -\def\lisp{\begingroup - \nonfillstart - \let\Elisp = \nonfillfinish - \tt - \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return +% We often define two environments, @foo and @smallfoo. +% Let's do it by one command: +\def\makedispenv #1#2{ + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } -% @example: Same as @lisp. -\def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} +% Define two synonyms: +\def\maketwodispenvs #1#2#3{ + \makedispenv{#1}{#3} + \makedispenv{#2}{#3} +} +% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. +% % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. -\def\smalllisp{\begingroup - \def\Esmalllisp{\nonfillfinish\endgroup}% - \def\Esmallexample{\nonfillfinish\endgroup}% - \smallexamplefonts - \lisp -} -\let\smallexample = \smalllisp - - -% @display: same as @lisp except keep current font. % -\def\display{\begingroup +\maketwodispenvs {lisp}{example}{% \nonfillstart - \let\Edisplay = \nonfillfinish - \gobble + \tt\quoteexpand + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return } +% @display/@smalldisplay: same as @lisp except keep current font. % -% @smalldisplay: @display plus smaller fonts. -% -\def\smalldisplay{\begingroup - \def\Esmalldisplay{\nonfillfinish\endgroup}% - \smallexamplefonts \rm - \display +\makedispenv {display}{% + \nonfillstart + \gobble } -% @format: same as @display except don't narrow margins. +% @format/@smallformat: same as @display except don't narrow margins. % -\def\format{\begingroup - \let\nonarrowing = t +\makedispenv{format}{% + \let\nonarrowing = t% \nonfillstart - \let\Eformat = \nonfillfinish \gobble } -% -% @smallformat: @format plus smaller fonts. -% -\def\smallformat{\begingroup - \def\Esmallformat{\nonfillfinish\endgroup}% - \smallexamplefonts \rm - \format -} -% @flushleft (same as @format). -% -\def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak % @flushright. % -\def\flushright{\begingroup - \let\nonarrowing = t +\envdef\flushright{% + \let\nonarrowing = t% \nonfillstart - \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble } +\let\Eflushright = \afterenvbreak % @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. % -\def\quotation{% - \begingroup\inENV %This group ends at the end of the @quotation body +\envdef\quotation{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt - % We have retained a nonzero parskip for the environment, since we're - % doing normal filling. So to avoid extra space below the environment... - \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing + \else \let\nonarrowing = \relax \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\undefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi } % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} -% If we want to allow any <char> as delimiter, +% If we want to allow any <char> as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % @@ -4706,7 +5992,7 @@ width0pt\relax} \fi % % [Knuth] p. 380 \def\uncatcodespecials{% - \def\do##1{\catcode`##1=12}\dospecials} + \def\do##1{\catcode`##1=\other}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font @@ -4740,6 +6026,34 @@ width0pt\relax} \fi \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else \char'22 \fi + \else \char'22 \fi +} +% \begingroup \catcode`\^^I=\active \gdef\tabexpand{% @@ -4752,13 +6066,25 @@ width0pt\relax} \fi \wd0=\dimen0 \box0 \starttabbox }% } + \catcode`\'=\active + \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% + % + \catcode`\`=\active + \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% + % + \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% \endgroup + +% start the verbatim environment. \def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand + \quoteexpand % Respect line breaks, % print special symbols as themselves, and % make each space count @@ -4767,15 +6093,15 @@ width0pt\relax} \fi \everypar{\starttabbox}% } -% Do the @verb magic: verbatim text is quoted by unique -% delimiter characters. Before first delimiter expect a +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'<char>#1<char>'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup - \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % @@ -4787,18 +6113,11 @@ width0pt\relax} \fi % % \def\doverbatim#1@end verbatim{#1} % -% For Texinfo it's a lot easier than for LaTeX, +% For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] -%% Include LaTeX hack for completeness -- never know -%% \begingroup -%% \catcode`|=0 \catcode`[=1 -%% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active -%% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ -%% #1|endgroup|def|Everbatim[]|end[verbatim]] -%% |endgroup % \begingroup \catcode`\ =\active @@ -4806,697 +6125,393 @@ width0pt\relax} \fi % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. - \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. \endgroup % -\def\verbatim{% - \def\Everbatim{\nonfillfinish\endgroup}% - \begingroup - \nonfillstart - \advance\leftskip by -\defbodyindent - \begingroup\setupverbatim\doverbatim +\envdef\verbatim{% + \setupverbatim\doverbatim } +\let\Everbatim = \afterenvbreak + % @verbatiminclude FILE - insert text of file in verbatim environment. % -% Allow normal characters that we make active in the argument (a file name). -\def\verbatiminclude{% - \begingroup - \catcode`\\=\other - \catcode`~=\other - \catcode`^=\other - \catcode`_=\other - \catcode`|=\other - \catcode`<=\other - \catcode`>=\other - \catcode`+=\other - \parsearg\doverbatiminclude -} -\def\setupverbatiminclude{% - \begingroup - \nonfillstart - \advance\leftskip by -\defbodyindent - \begingroup\setupverbatim -} +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% - % Restore active chars for included file. - \endgroup - \begingroup - \let\value=\expandablevalue - \def\thisfile{#1}% - \expandafter\expandafter\setupverbatiminclude\input\thisfile - \endgroup - \nonfillfinish - \endgroup + {% + \makevalueexpandable + \setupverbatim + \input #1 + \afterenvbreak + }% } % @copying ... @end copying. -% Save the text away for @insertcopying later. Many commands won't be -% allowed in this context, but that's ok. -% +% Save the text away for @insertcopying later. +% % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. -% -\def\copying{\begingroup - % Define a command to swallow text until we reach `@end copying'. - % \ is the escape char in this texinfo.tex file, so it is the - % delimiter for the command; @ will be the escape char when we read - % it, but that doesn't matter. - \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% - % - % We must preserve ^^M's in the input file; see \insertcopying below. - \catcode`\^^M = \active - \docopying -} - -% What we do to finish off the copying text. % -\def\enddocopying{\endgroup\ignorespaces} - -% @insertcopying. Here we must play games with ^^M's. On the one hand, -% we need them to delimit commands such as `@end quotation', so they -% must be active. On the other hand, we certainly don't want every -% end-of-line to be a \par, as would happen with the normal active -% definition of ^^M. On the third hand, two ^^M's in a row should still -% generate a \par. -% -% Our approach is to make ^^M insert a space and a penalty1 normally; -% then it can also check if \lastpenalty=1. If it does, then manually -% do \par. -% -% This messes up the normal definitions of @c[omment], so we redefine -% it. Similarly for @ignore. (These commands are used in the gcc -% manual for man page generation.) -% -% Seems pretty fragile, most line-oriented commands will presumably -% fail, but for the limited use of getting the copying text (which -% should be quite simple) inserted, we can hope it's ok. -% -{\catcode`\^^M=\active % -\gdef\insertcopying{\begingroup % - \parindent = 0pt % looks wrong on title page - \def^^M{% - \ifnum \lastpenalty=1 % - \par % - \else % - \space \penalty 1 % - \fi % - }% - % - % Fix @c[omment] for catcode 13 ^^M's. - \def\c##1^^M{\ignorespaces}% - \let\comment = \c % - % - % Don't bother jumping through all the hoops that \doignore does, it - % would be very hard since the catcodes are already set. - \long\def\ignore##1\end ignore{\ignorespaces}% - % - \copyingtext % -\endgroup}% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup } + \message{defuns,} % @defun etc. -% Allow user to change definition object font (\df) internally -\def\setdeffont#1 {\csname DEF#1\endcsname} - \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt - -\newcount\parencount - -% We want ()&[] to print specially on the defun line. -% -\def\activeparens{% - \catcode`\(=\active \catcode`\)=\active - \catcode`\&=\active - \catcode`\[=\active \catcode`\]=\active -} - -% Make control sequences which act like normal parenthesis chars. -\let\lparen = ( \let\rparen = ) - -{\activeparens % Now, smart parens don't turn on until &foo (see \amprm) - -% Be sure that we always have a definition for `(', etc. For example, -% if the fn name has parens in it, \boldbrax will not be in effect yet, -% so TeX would otherwise complain about undefined control sequence. -\global\let(=\lparen \global\let)=\rparen -\global\let[=\lbrack \global\let]=\rbrack - -\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } -\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} -% This is used to turn on special parens -% but make & act ordinary (given that it's active). -\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} - -% Definitions of (, ) and & used in args for functions. -% This is the definition of ( outside of all parentheses. -\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested - \global\advance\parencount by 1 -} -% -% This is the definition of ( when already inside a level of parens. -\gdef\opnested{\char`\(\global\advance\parencount by 1 } -% -\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. - % also in that case restore the outer-level definition of (. - \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi - \global\advance \parencount by -1 } -% If we encounter &foo, then turn on ()-hacking afterwards -\gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } -% -\gdef\normalparens{\boldbrax\let&=\ampnr} -} % End of definition inside \activeparens -%% These parens (in \boldbrax) actually are a little bolder than the -%% contained text. This is especially needed for [ and ] -\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } -\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } -\let\ampnr = \& -\def\lbrb{{\bf\char`\[}} -\def\rbrb{{\bf\char`\]}} - -% Active &'s sneak into the index arguments, so make sure it's defined. -{ - \catcode`& = \active - \global\let& = \ampnr -} - -% \defname, which formats the name of the @def (not the args). -% #1 is the function name. -% #2 is the type of definition, such as "Function". -% -\def\defname#1#2{% - % How we'll output the type name. Putting it in brackets helps - % distinguish it from the body text that may end up on the next line - % just below it. - \ifempty{#2}% - \def\defnametype{}% +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. \else - \def\defnametype{[\rm #2]}% + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a minor refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint \fi % - % Get the values of \leftskip and \rightskip as they were outside the @def... - \dimen2=\leftskip - \advance\dimen2 by -\defbodyindent - % - % Figure out values for the paragraph shape. - \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% - \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line - \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations - \parshape 2 0in \dimen0 \defargsindent \dimen1 - % - % Output arg 2 ("Function" or some such) but stuck inside a box of - % width 0 so it does not interfere with linebreaking. - \noindent - % - {% Adjust \hsize to exclude the ambient margins, - % so that \rightline will obey them. - \advance \hsize by -\dimen2 - \dimen3 = 0pt % was -1.25pc - \rlap{\rightline{\defnametype\kern\dimen3}}% - }% - % - % Allow all lines to be underfull without complaint: - \tolerance=10000 \hbadness=10000 - \advance\leftskip by -\defbodyindent - \exdentamount=\defbodyindent - {\df #1}\enskip % output function name - % \defunargs will be called next to output the arguments, if any. -} - -% Common pieces to start any @def... -% #1 is the \E... control sequence to end the definition (which we define). -% #2 is the \...x control sequence (which our caller defines). -% #3 is the control sequence to process the header, such as \defunheader. -% -\def\parsebodycommon#1#2#3{% - \begingroup\inENV - % If there are two @def commands in a row, we'll have a \nobreak, - % which is there to keep the function description together with its - % header. But if there's nothing but headers, we want to allow a - % break after all. Check for penalty 10002 (inserted by - % \defargscommonending) instead of 10000, since the sectioning - % commands insert a \penalty10000, and we don't want to allow a break - % between a section heading and a defun. - \ifnum\lastpenalty=10002 \penalty0 \fi - \medbreak - % - % Define the \E... end token that this defining construct specifies - % so that it will exit this group. - \def#1{\endgraf\endgroup\medbreak}% - % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } -% Common part of the \...x definitions. -% -\def\defxbodycommon{% - % As with \parsebodycommon above, allow line break if we have multiple - % x headers in a row. It's not a great place, though. - \ifnum\lastpenalty=10000 \penalty1000 \fi +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% % - \begingroup\obeylines -} - -% Process body of @defun, @deffn, @defmac, etc. -% -\def\defparsebody#1#2#3{% - \parsebodycommon{#1}{#2}{#3}% - \def#2{\defxbodycommon \activeparens \spacesplit#3}% - \catcode\equalChar=\active - \begingroup\obeylines\activeparens - \spacesplit#3% -} - -% #1, #2, #3 are the common arguments (see \parsebodycommon above). -% #4, delimited by the space, is the class name. -% -\def\defmethparsebody#1#2#3#4 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% - \begingroup\obeylines\activeparens - % The \empty here prevents misinterpretation of a construct such as - % @deffn {whatever} {Enharmonic comma} - % See comments at \deftpparsebody, although in our case we don't have - % to remove the \empty afterwards, since it is empty. - \spacesplit{#3{#4}}\empty + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% } +\def\gobbledefun#1\startdefun{} -% Used for @deftypemethod and @deftypeivar. -% #1, #2, #3 are the common arguments (see \defparsebody). -% #4, delimited by a space, is the class name. -% #5 is the method's return type. +% \printdefunline \deffnheader{text} % -\def\deftypemethparsebody#1#2#3#4 #5 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% - \begingroup\obeylines\activeparens - \spacesplit{#3{#4}{#5}}% -} - -% Used for @deftypeop. The change from \deftypemethparsebody is an -% extra argument at the beginning which is the `category', instead of it -% being the hardwired string `Method' or `Instance Variable'. We have -% to account for this both in the \...x definition and in parsing the -% input at hand. Thus also need a control sequence (passed as #5) for -% the \E... definition to assign the category name to. -% -\def\deftypeopparsebody#1#2#3#4#5 #6 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 ##2 ##3 {\def#4{##1}% - \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% - \begingroup\obeylines\activeparens - \spacesplit{#3{#5}{#6}}% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup } -% For @defop. -\def\defopparsebody #1#2#3#4#5 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 ##2 {\def#4{##1}% - \defxbodycommon \activeparens \spacesplit{#3{##2}}}% - \begingroup\obeylines\activeparens - \spacesplit{#3{#5}}% -} +\def\Edefun{\endgraf\medbreak} -% These parsing functions are similar to the preceding ones -% except that they do not make parens into active characters. -% These are used for "variables" since they have no arguments. +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remainnig is to define \deffnheader. % -\def\defvarparsebody #1#2#3{% - \parsebodycommon{#1}{#2}{#3}% - \def#2{\defxbodycommon \spacesplit#3}% - \catcode\equalChar=\active - \begingroup\obeylines - \spacesplit#3% -} - -% @defopvar. -\def\defopvarparsebody #1#2#3#4#5 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 ##2 {\def#4{##1}% - \defxbodycommon \spacesplit{#3{##2}}}% - \begingroup\obeylines - \spacesplit{#3{#5}}% -} - -\def\defvrparsebody#1#2#3#4 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% - \begingroup\obeylines - \spacesplit{#3{#4}}% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp } -% This loses on `@deftp {Data Type} {struct termios}' -- it thinks the -% type is just `struct', because we lose the braces in `{struct -% termios}' when \spacesplit reads its undelimited argument. Sigh. -% \let\deftpparsebody=\defvrparsebody +% \domakedefun \deffn \deffnx \deffnheader % -% So, to get around this, we put \empty in with the type name. That -% way, TeX won't find exactly `{...}' as an undelimited argument, and -% won't strip off the braces. +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. % -\def\deftpparsebody #1#2#3#4 {% - \parsebodycommon{#1}{#2}{#3}% - \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% - \begingroup\obeylines - \spacesplit{\parsetpheaderline{#3{#4}}}\empty +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% } -% Fine, but then we have to eventually remove the \empty *and* the -% braces (if any). That's what this does. -% -\def\removeemptybraces\empty#1\relax{#1} +%%% Untyped functions: -% After \spacesplit has done its work, this is called -- #1 is the final -% thing to call, #2 the type name (which starts with \empty), and #3 -% (which might be empty) the arguments. -% -\def\parsetpheaderline#1#2#3{% - #1{\removeemptybraces#2\relax}{#3}% -}% +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} -% Split up #2 (the rest of the input line) at the first space token. -% call #1 with two arguments: -% the first is all of #2 before the space token, -% the second is all of #2 after that space token. -% If #2 contains no space token, all of it is passed as the first arg -% and the second is passed as empty. -% -{\obeylines % - \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% - \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% - \ifx\relax #3% - #1{#2}{}% - \else % - #1{#2}{#3#4}% - \fi}% -} +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} -% Define @defun. +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } -% This is called to end the arguments processing for all the @def... commands. +% \deffngeneral {subind}category name args % -\def\defargscommonending{% - \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil - \endgraf - \nobreak\vskip -\parskip - \penalty 10002 % signal to \parsebodycommon. -} - -% This expands the args and terminates the paragraph they comprise. -% -\def\defunargs#1{\functionparens \sl -% Expand, preventing hyphenation at `-' chars. -% Note that groups don't affect changes in \hyphenchar. -% Set the font temporarily and use \font in case \setfont made \tensl a macro. -{\tensl\hyphenchar\font=0}% -#1% -{\tensl\hyphenchar\font=45}% -\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% - \defargscommonending +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } -\def\deftypefunargs #1{% -% Expand, preventing hyphenation at `-' chars. -% Note that groups don't affect changes in \hyphenchar. -% Use \boldbraxnoamp, not \functionparens, so that & is not special. -\boldbraxnoamp -\tclose{#1}% avoid \code because of side effects on active chars - \defargscommonending -} +%%% Typed functions: -% Do complete processing of one @defun or @defunx line already parsed. +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} -% @deffn Command forward-char nchars +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} -\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } -\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% -\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -% @defun == @deffn Function - -\def\defun{\defparsebody\Edefun\defunx\defunheader} +%%% Typed variables: -\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{\putwordDeffunc}% -\defunargs {#2}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody -} +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} -% @deftypefun int foobar (int @var{foo}, float @var{bar}) +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} -\def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } -% #1 is the data type. #2 is the name and args. -\def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} -% #1 is the data type, #2 the name, #3 the args. -\def\deftypefunheaderx #1#2 #3\relax{% -\doind {fn}{\code{#2}}% Make entry in function index -\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% -\deftypefunargs {#3}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } -% @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) - -\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} - -% \defheaderxcond#1\relax$.$ -% puts #1 in @code, followed by a space, but does nothing if #1 is null. -\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi} +%%% Untyped variables: -% #1 is the classification. #2 is the data type. #3 is the name and args. -\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} -% #1 is the classification, #2 the data type, #3 the name, #4 the args. -\def\deftypefnheaderx #1#2#3 #4\relax{% -\doind {fn}{\code{#3}}% Make entry in function index -\begingroup -\normalparens % notably, turn off `&' magic, which prevents -% at least some C++ text from working -\defname {\defheaderxcond#2\relax$.$#3}{#1}% -\deftypefunargs {#4}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody -} +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } -% @defmac == @deffn Macro +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} -\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } -\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{\putwordDefmac}% -\defunargs {#2}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody +%%% Type: +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% } -% @defspec == @deffn Special Form - -\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} -\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index -\begingroup\defname {#1}{\putwordDefspec}% -\defunargs {#2}\endgroup % -\catcode\equalChar=\other % Turn off change made in \defparsebody -} - -% @defop CATEGORY CLASS OPERATION ARG... +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. % -\def\defop #1 {\def\defoptype{#1}% -\defopparsebody\Edefop\defopx\defopheader\defoptype} +% We are followed by (but not passed) the arguments, if any. % -\def\defopheader#1#2#3{% - \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry - \begingroup - \defname{#2}{\defoptype\ \putwordon\ #1}% - \defunargs{#3}% - \endgroup +\def\defname#1#2#3{% + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % How we'll format the type name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % (plain.tex says that \dimen1 should be used only as global.) + \parshape 2 0in \dimen0 \defargsindent \dimen2 + % + % Put the type name to the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% return value type + \ifx\temp\empty\else \tclose{\temp} \fi + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. } -% @deftypeop CATEGORY CLASS TYPE OPERATION ARG... -% -\def\deftypeop #1 {\def\deftypeopcategory{#1}% - \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader - \deftypeopcategory} +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. % -% #1 is the class name, #2 the data type, #3 the operation name, #4 the args. -\def\deftypeopheader#1#2#3#4{% - \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index - \begingroup - \defname{\defheaderxcond#2\relax$.$#3} - {\deftypeopcategory\ \putwordon\ \code{#1}}% - \deftypefunargs{#4}% - \endgroup +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. + \let\var=\ttslanted + #1% + \sl\hyphenchar\font=45 } -% @deftypemethod CLASS TYPE METHOD ARG... -% -\def\deftypemethod{% - \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} +% We want ()&[] to print specially on the defun line. % -% #1 is the class name, #2 the data type, #3 the method name, #4 the args. -\def\deftypemethodheader#1#2#3#4{% - \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index - \begingroup - \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}% - \deftypefunargs{#4}% - \endgroup +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active } -% @deftypeivar CLASS TYPE VARNAME -% -\def\deftypeivar{% - \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} -% -% #1 is the class name, #2 the data type, #3 the variable name. -\def\deftypeivarheader#1#2#3{% - \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index - \begingroup - \defname{\defheaderxcond#2\relax$.$#3} - {\putwordInstanceVariableof\ \code{#1}}% - \defvarargs{#3}% - \endgroup -} +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) -% @defmethod == @defop Method -% -\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} -% -% #1 is the class name, #2 the method name, #3 the args. -\def\defmethodheader#1#2#3{% - \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index - \begingroup - \defname{#2}{\putwordMethodon\ \code{#1}}% - \defunargs{#3}% - \endgroup -} +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& -% @defcv {Class Option} foo-class foo-flag + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} -\def\defcv #1 {\def\defcvtype{#1}% -\defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} +\newcount\parencount -\def\defcvarheader #1#2#3{% - \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry - \begingroup - \defname{#2}{\defcvtype\ \putwordof\ #1}% - \defvarargs{#3}% - \endgroup +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi } - -% @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME -% -\def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} -% -\def\defivarheader#1#2#3{% - \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index - \begingroup - \defname{#2}{\putwordInstanceVariableof\ #1}% - \defvarargs{#3}% - \endgroup +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi } +\def\bfafterword#1 {#1 \bf} -% @defvar -% First, define the processing that is wanted for arguments of @defvar. -% This is actually simple: just print them in roman. -% This must expand the args and terminate the paragraph they make up -\def\defvarargs #1{\normalparens #1% - \defargscommonending +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword } - -% @defvr Counter foo-count - -\def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} - -\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% -\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} - -% @defvar == @defvr Variable - -\def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} - -\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{\putwordDefvar}% -\defvarargs {#2}\endgroup % +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 } -% @defopt == @defvr {User Option} - -\def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} - -\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index -\begingroup\defname {#1}{\putwordDefopt}% -\defvarargs {#2}\endgroup % +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 } -% @deftypevar int foobar - -\def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} - -% #1 is the data type. #2 is the name, perhaps followed by text that -% is actually part of the data type, which should not be put into the index. -\def\deftypevarheader #1#2{% -\dovarind#2 \relax% Make entry in variables index -\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% - \defargscommonending -\endgroup} -\def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} - -% @deftypevr {Global Flag} int enable - -\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} - -\def\deftypevrheader #1#2#3{\dovarind#3 \relax% -\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} - \defargscommonending -\endgroup} - -% Now define @deftp -% Args are printed in bold, a slight difference from @defvar. - -\def\deftpargs #1{\bf \defvarargs{#1}} - -% @deftp Class window height width ... - -\def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} - -\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% -\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} - -% These definitions are used if you use @defunx (etc.) -% anywhere other than immediately after a @defun or @defunx. -% -\def\defcvx#1 {\errmessage{@defcvx in invalid context}} -\def\deffnx#1 {\errmessage{@deffnx in invalid context}} -\def\defivarx#1 {\errmessage{@defivarx in invalid context}} -\def\defmacx#1 {\errmessage{@defmacx in invalid context}} -\def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} -\def\defoptx #1 {\errmessage{@defoptx in invalid context}} -\def\defopx#1 {\errmessage{@defopx in invalid context}} -\def\defspecx#1 {\errmessage{@defspecx in invalid context}} -\def\deftpx#1 {\errmessage{@deftpx in invalid context}} -\def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} -\def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} -\def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} -\def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} -\def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} -\def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} -\def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} -\def\defunx#1 {\errmessage{@defunx in invalid context}} -\def\defvarx#1 {\errmessage{@defvarx in invalid context}} -\def\defvrx#1 {\errmessage{@defvrx in invalid context}} +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} \message{macros,} @@ -5505,42 +6520,68 @@ width0pt\relax} \fi % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined - \newwrite\macscribble - \def\scanmacro#1{% - \begingroup \newlinechar`\^^M - % Undo catcode changes of \startcontents and \doprintindex - \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ - % Append \endinput to make sure that TeX does not see the ending newline. - \toks0={#1\endinput}% - \immediate\openout\macscribble=\jobname.tmp - \immediate\write\macscribble{\the\toks0}% - \immediate\closeout\macscribble - \let\xeatspaces\eatspaces - \input \jobname.tmp - \endgroup -} -\else -\def\scanmacro#1{% -\begingroup \newlinechar`\^^M -% Undo catcode changes of \startcontents and \doprintindex -\catcode`\@=0 \catcode`\\=\other \escapechar=`\@ -\let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } \fi +\def\scanmacro#1{% + \begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % ... and \example + \spaceisspace + % + % Append \endinput to make sure that TeX does not see the ending newline. + % I've verified that it is necessary both for e-TeX and for ordinary TeX + % --kasal, 29nov03 + \scantokens{#1\endinput}% + \endgroup +} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% + \temp +} + \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? -\def\macrolist{} % List of all defined macros in the form - % \do\macro1\do\macro2... + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} % Utility routines. -% Thisdoes \let #1 = #2, except with \csnames. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% \def\cslet#1#2{% -\expandafter\expandafter -\expandafter\let -\expandafter\expandafter -\csname#1\endcsname -\csname#2\endcsname} + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). @@ -5563,34 +6604,45 @@ width0pt\relax} \fi % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. + % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. -\def\macrobodyctxt{% - \catcode`\~=\other +\def\scanctxt{% + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\+=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% + \scanctxt + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% + \scanctxt \catcode`\{=\other \catcode`\}=\other - \catcode`\@=\other \catcode`\^^M=\other - \usembodybackslash} + \usembodybackslash +} \def\macroargctxt{% - \catcode`\~=\other - \catcode`\^=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\+=\other - \catcode`\@=\other - \catcode`\\=\other} + \scanctxt + \catcode`\\=\other +} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N @@ -5621,25 +6673,21 @@ width0pt\relax} \fi \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% - % Add the macroname to \macrolist - \toks0 = \expandafter{\macrolist\do}% - \xdef\macrolist{\the\toks0 - \expandafter\noexpand\csname\the\macname\endcsname}% + \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} -\def\unmacro{\parsearg\dounmacro} -\def\dounmacro#1{% +\parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax - \let\do\unmacrodo + \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else @@ -5649,12 +6697,12 @@ width0pt\relax} \fi % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. -% +% \def\unmacrodo#1{% - \ifx#1\relax + \ifx #1\relax % remove this \else - \noexpand\do \noexpand #1% + \noexpand\definedummyword \noexpand#1% \fi } @@ -5767,34 +6815,31 @@ width0pt\relax} \fi % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg - \fi \next} - -% We mant to disable all macros during \shipout so that they are not -% expanded by \write. -\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% - \edef\next{\macrolist}\expandafter\endgroup\next} + \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. -\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} +\def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} -\def\aliasyyy #1=#2\relax{\ignoreactivespaces -\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% - \expandafter\noexpand\csname#2\endcsname}% -\expandafter\endgroup\next} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} \message{cross references,} -% @xref etc. \newwrite\auxfile - \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. @@ -5803,64 +6848,68 @@ width0pt\relax} \fi \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} -% @node's job is to define \lastnode. -\def\node{\ENVcheck\parsearg\nodezzz} -\def\nodezzz#1{\nodexxx #1,\finishnodeparse} -\def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}} +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + \let\nwnode=\node -\let\lastnode=\relax - -% The sectioning commands (@chapter, etc.) call these. -\def\donoderef{% - \ifx\lastnode\relax\else - \expandafter\expandafter\expandafter\setref{\lastnode}% - {Ysectionnumberandtype}% - \global\let\lastnode=\relax - \fi -} -\def\unnumbnoderef{% - \ifx\lastnode\relax\else - \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% - \global\let\lastnode=\relax - \fi -} -\def\appendixnoderef{% - \ifx\lastnode\relax\else - \expandafter\expandafter\expandafter\setref{\lastnode}% - {Yappendixletterandtype}% - \global\let\lastnode=\relax +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty \fi } - % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister -\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} -\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} -\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an -% anchor), namely NAME-title (the corresponding @chapter/etc. name), -% NAME-pg (the page number), and NAME-snt (section number and type). -% Called from \foonoderef. -% -% We have to set \indexdummies so commands such as @code in a section -% title aren't expanded. It would be nicer not to expand the titles in -% the first place, but there's so many layers that that is hard to do. -% -% Likewise, use \turnoffactive so that punctuation chars such as underscore -% and backslash work in node names. -% -\def\setref#1#2{{% - \atdummies +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% \pdfmkdest{#1}% - % - \turnoffactive - \dosetq{#1-title}{Ytitle}% - \dosetq{#1-pg}{Ypagenumber}% - \dosetq{#1-snt}{#2}% -}} + \iflinks + {% + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout + }% + \fi +} % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed @@ -5873,105 +6922,126 @@ width0pt\relax} \fi \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% - \def\printednodename{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual}% - \setbox0=\hbox{\printednodename}% + \def\printedrefname{\ignorespaces #3}% + \setbox1=\hbox{\printedmanual\unskip}% + \setbox0=\hbox{\printedrefname\unskip}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. - \def\printednodename{\ignorespaces #1}% + \def\printedrefname{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. - \def\printednodename{\ignorespaces #1}% + \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. - \def\printednodename{\refx{#1-title}{}}% + \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. - \def\printednodename{\ignorespaces #1}% + \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. + % Make link in pdf output. \ifpdf \leavevmode \getfilename{#4}% - {\turnoffactive \otherbackslash + {\indexnofonts + \turnoffactive + % See comments at \activebackslashdouble. + {\activebackslashdouble \xdef\pdfxrefdest{#1}% + \backslashparens\pdfxrefdest}% + % \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{#1}% + goto file{\the\filename.pdf} name{\pdfxrefdest}% \else \startlink attr{/Border [0 0 0]}% - goto name{#1}% + goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% - \linkcolor + \setcolor{\linkcolor}% \fi % - \ifdim \wd1 > 0pt - \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% - \else - % _ (for example) has to be the character _ for the purposes of the - % control sequence corresponding to the node, but it has to expand - % into the usual \leavevmode...\vrule stuff for purposes of - % printing. So we \turnoffactive for the \refx-snt, back on for the - % printing, back off for the \refx-pg. - {\turnoffactive \otherbackslash - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% - \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi - }% - % output the `[mynode]' via a macro. - \xrefprintnodename\printednodename + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd0 = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi % - % But we always want a comma and a space: - ,\space + % if the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd1 > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. % - % output the `page 3'. - \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% + % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not + % insert empty discretionaries after hyphens, which means that it will + % not find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, this + % is a loss. Therefore, we give the text of the node name again, so it + % is as if TeX is seeing it for the first time. + \ifdim \wd1 > 0pt + \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% + \else + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via a macro so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, -% since not square brackets don't work in some documents. Particularly +% since square brackets don't work well in some documents. Particularly % one that Bob is working on :). -% +% \def\xrefprintnodename#1{[#1]} -% \dosetq is called from \setref to do the actual \write (\iflinks). +% Things referred to by \setref. % -\def\dosetq#1#2{% - {\let\folio=0% - \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% - \iflinks \next \fi - }% -} - -% \internalsetq{foo}{page} expands into -% CHARACTERS @xrdef{foo}{...expansion of \page...} -\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} - -% Things to be expanded by \internalsetq. -% -\def\Ypagenumber{\folio} -\def\Ytitle{\thissection} \def\Ynothing{} -\def\Ysectionnumberandtype{% +\def\Yomitfromtoc{} +\def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 @@ -5982,8 +7052,7 @@ width0pt\relax} \fi \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } - -\def\Yappendixletterandtype{% +\def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 @@ -5996,15 +7065,6 @@ width0pt\relax} \fi \fi\fi\fi } -% Use TeX 3.0's \inputlineno to get the line number, for better error -% messages, but if we're using an old version of TeX, don't do anything. -% -\ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Pre-3.0. -\else - \def\linenumber{\the\inputlineno:\space} -\fi - % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % @@ -6013,7 +7073,7 @@ width0pt\relax} \fi \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX - \csname X#1\endcsname + \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. @@ -6035,12 +7095,54 @@ width0pt\relax} \fi #2% Output the suffix in any case. } -% This is the macro invoked by entries in the aux file. +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. % -\def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} % Read the last existing aux file, if any. No error if none exists. -\def\readauxfile{\begingroup +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other @@ -6098,41 +7200,40 @@ width0pt\relax} \fi \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % - % Make the characters 128-255 be printing characters + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. {% - \count 1=128 + \count1=128 \def\loop{% - \catcode\count 1=\other - \advance\count 1 by 1 - \ifnum \count 1<256 \loop \fi + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi }% }% % - % Turn off \ as an escape so we do not lose on - % entries which were dumped with control sequences in their names. - % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ - % Reference to such entries still does not work the way one would wish, - % but at least they do not bomb out when the aux file is read in. - \catcode`\\=\other - % - % @ is our escape character in .aux files. + % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 - % - \openin 1 \jobname.aux - \ifeof 1 \else - \closein 1 - \input \jobname.aux - \global\havexrefstrue - \global\warnedobstrue - \fi - % Open the new aux file. TeX will close it automatically at exit. - \openout\auxfile=\jobname.aux +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 \endgroup} -% Footnotes. +\message{insertions,} +% including footnotes. \newcount \footnoteno @@ -6146,19 +7247,19 @@ width0pt\relax} \fi % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment -\let\ptexfootnote=\footnote - {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% + \let\indent=\ptexindent + \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty - \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip @@ -6169,17 +7270,12 @@ width0pt\relax} \fi % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % -% Oh yes, they do; otherwise, @ifset and anything else that uses -% \parseargline fail inside footnotes because the tokens are fixed when +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % -% The start of the footnote looks usually like this: -\gdef\startfootins{\insert\footins\bgroup} -% -% ... but this macro is redefined inside @multitable. -% \gdef\dofootnote{% - \startfootins + \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. @@ -6215,40 +7311,66 @@ width0pt\relax} \fi } }%end \catcode `\@=11 -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarily, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. + +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. % -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi } -% For a final copy, take out the rectangles -% that mark overfull boxes (in case you have decided -% that the text looks ok even though it passes the margin). +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % -\def\finalout{\overfullrule=0pt} +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. @@ -6258,12 +7380,12 @@ width0pt\relax} \fi % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else - \closein 1 % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi +\closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf @@ -6299,10 +7421,10 @@ width0pt\relax} \fi \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space - % above and below. + % above and below. \nobreak\vskip\parskip \nobreak - \line\bgroup\hss + \line\bgroup \fi % % Output the image. @@ -6315,45 +7437,1140 @@ width0pt\relax} \fi \epsfbox{#1.eps}% \fi % - \ifimagevmode \hss \egroup \bigbreak \fi % space after the image + \ifimagevmode \egroup \bigbreak \fi % space after the image \endgroup} +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + \message{localization,} -% and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. +% properly. Single argument is the language (de) or locale (de_DE) +% abbreviation. It would be nice if we could set up a hyphenation file. % -\def\documentlanguage{\parsearg\dodocumentlanguage} -\def\dodocumentlanguage#1{% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. - % Read the file if it exists. + % Read the file by the name they passed if it exists. + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else + \input txi-#1.tex + \fi + \closein 1 + \endgroup +\endgroup} +} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\def\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex - \ifeof1 + \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% - \let\temp = \relax \else - \def\temp{\input txi-#1.tex }% + \input txi-#1.tex \fi - \temp - \endgroup + \closein 1 } +% \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} -% @documentencoding should change something in TeX eventually, most -% likely, but for now just recognize it. -\let\documentencoding = \comment +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{~} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{~} + \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} + \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'\i} + \gdef^^ee{\^\i} + \gdef^^ef{\v d} + % + \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz -% Page size parameters. +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt @@ -6366,7 +8583,7 @@ should work if nowhere else does.} % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 -% Following George Bush, just get rid of widows and orphans. +% Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 @@ -6384,10 +8601,10 @@ should work if nowhere else does.} \fi } -% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; -% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) -% physical page width. -% +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % @@ -6413,6 +8630,10 @@ should work if nowhere else does.} \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in \fi % \setleading{\textleading} @@ -6427,19 +8648,19 @@ should work if nowhere else does.} \textleading = 13.2pt % % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}% + \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} -% Use @smallbook to reset parameters for 7x9.5 (or so) format. +% Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% - {\voffset}{.25in}% + {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % @@ -6450,12 +8671,30 @@ should work if nowhere else does.} \defbodyindent = .5cm }} +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % - % Double-side printing via postscript on Laserjet 4050 + % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then @@ -6465,7 +8704,7 @@ should work if nowhere else does.} % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex - \internalpagesizes{51\baselineskip}{160mm} + \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% @@ -6496,7 +8735,7 @@ should work if nowhere else does.} \tableindent = 12mm }} -% A specific text layout, 24x15cm overall, intended for A4 paper. +% A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% @@ -6522,8 +8761,7 @@ should work if nowhere else does.} % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % -\def\pagesizes{\parsearg\pagesizesxxx} -\def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 @@ -6531,7 +8769,7 @@ should work if nowhere else does.} \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % - \dimen0 = #1 + \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize @@ -6570,8 +8808,8 @@ should work if nowhere else does.} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix -% This macro is used to make a character print one way in ttfont -% where it can probably just be output, and another way in other fonts, +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print @@ -6603,6 +8841,7 @@ should work if nowhere else does.} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } @@ -6619,46 +8858,49 @@ should work if nowhere else does.} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix -% Set up an active definition for =, but don't enable it most of the time. -{\catcode`\==\active -\global\def={{\tt \char 61}}} - -\catcode`+=\active -\catcode`\_=\active - % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + \catcode`\@=0 -% \rawbackslashxx outputs one backslash character in current font, +% \backslashcurfont outputs one backslash character in current font, % as in \char`\\. -\global\chardef\rawbackslashxx=`\\ +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work -% \rawbackslash defines an active \ to do \rawbackslashxx. -% \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. -{\catcode`\\=\active - @gdef@rawbackslash{@let\=@rawbackslashxx} - @gdef@otherbackslash{@let\=@realbackslash} -} - -% \realbackslash is an actual character `\' with catcode other. -{\catcode`\\=\other @gdef@realbackslash{\}} - -% \normalbackslash outputs one backslash in fixed width font. -\def\normalbackslash{{\tt\rawbackslashxx}} +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. \catcode`\\=\active +@def@normalbackslash{{@tt@backslashcurfont}} +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash + +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -@def@turnoffactive{% +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +@def@normalturnoffactive{% + @let\=@normalbackslash @let"=@normaldoublequote - @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @@ -6667,14 +8909,9 @@ should work if nowhere else does.} @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix + @unsepspaces } -% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. (Thus, \ is not expandable when this is in -% effect.) -% -@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} - % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive @@ -6687,9 +8924,9 @@ should work if nowhere else does.} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix +% the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. -% Also back turn on active characters that might appear in the input +% Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @@ -6701,15 +8938,11 @@ should work if nowhere else does.} % Say @foo, not \foo, in error messages. @escapechar = `@@ -% These look ok in all fonts, so just make them not special. +% These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other -@c Set initial fonts. -@textfonts -@rm - @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @@ -6718,3 +8951,9 @@ should work if nowhere else does.} @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/lib/Makefile b/lib/Makefile index 46958cd53c67265b409a98bb04220a7fa795864b..dea48025420011c504f89f504f0010c42b584ad8 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,10 +1,6716 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.6 -include ../variables +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canoncical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /opt/local/bin/cmake + +# The command to remove a file. +RM = /opt/local/bin/cmake -E remove -f + +# The program to use to edit the cache. +CMAKE_EDIT_COMMAND = /opt/local/bin/ccmake + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /Users/geuzaine/src/gmsh + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /Users/geuzaine/src/gmsh/lib + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /opt/local/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /opt/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /opt/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /opt/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: install/local +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /opt/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: install/strip +.PHONY : install/strip/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target package +package: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool..." + /opt/local/bin/cpack --config ./CPackConfig.cmake +.PHONY : package + +# Special rule for the target package +package/fast: package +.PHONY : package/fast + +# Special rule for the target package_source +package_source: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Run CPack packaging tool for source..." + /opt/local/bin/cpack --config ./CPackSourceConfig.cmake /Users/geuzaine/src/gmsh/lib/CPackSourceConfig.cmake +.PHONY : package_source + +# Special rule for the target package_source +package_source/fast: package_source +.PHONY : package_source/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /opt/local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /Users/geuzaine/src/gmsh/lib/CMakeFiles /Users/geuzaine/src/gmsh/lib/CMakeFiles/progress.make + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /Users/geuzaine/src/gmsh/lib/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: - ${RM} *.a *.lib + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named clean_doc + +# Build rule for target. +clean_doc: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 clean_doc +.PHONY : clean_doc + +# fast build rule for target. +clean_doc/fast: + $(MAKE) -f CMakeFiles/clean_doc.dir/build.make CMakeFiles/clean_doc.dir/build +.PHONY : clean_doc/fast + +#============================================================================= +# Target rules for targets named doc + +# Build rule for target. +doc: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 doc +.PHONY : doc + +# fast build rule for target. +doc/fast: + $(MAKE) -f CMakeFiles/doc.dir/build.make CMakeFiles/doc.dir/build +.PHONY : doc/fast + +#============================================================================= +# Target rules for targets named gmsh + +# Build rule for target. +gmsh: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gmsh +.PHONY : gmsh + +# fast build rule for target. +gmsh/fast: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/build +.PHONY : gmsh/fast + +#============================================================================= +# Target rules for targets named html + +# Build rule for target. +html: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 html +.PHONY : html + +# fast build rule for target. +html/fast: + $(MAKE) -f CMakeFiles/html.dir/build.make CMakeFiles/html.dir/build +.PHONY : html/fast + +#============================================================================= +# Target rules for targets named info + +# Build rule for target. +info: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 info +.PHONY : info + +# fast build rule for target. +info/fast: + $(MAKE) -f CMakeFiles/info.dir/build.make CMakeFiles/info.dir/build +.PHONY : info/fast + +#============================================================================= +# Target rules for targets named lib + +# Build rule for target. +lib: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 lib +.PHONY : lib + +# fast build rule for target. +lib/fast: + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/build +.PHONY : lib/fast + +#============================================================================= +# Target rules for targets named parser + +# Build rule for target. +parser: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 parser +.PHONY : parser + +# fast build rule for target. +parser/fast: + $(MAKE) -f CMakeFiles/parser.dir/build.make CMakeFiles/parser.dir/build +.PHONY : parser/fast + +#============================================================================= +# Target rules for targets named pdf + +# Build rule for target. +pdf: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 pdf +.PHONY : pdf + +# fast build rule for target. +pdf/fast: + $(MAKE) -f CMakeFiles/pdf.dir/build.make CMakeFiles/pdf.dir/build +.PHONY : pdf/fast + +#============================================================================= +# Target rules for targets named purge + +# Build rule for target. +purge: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 purge +.PHONY : purge + +# fast build rule for target. +purge/fast: + $(MAKE) -f CMakeFiles/purge.dir/build.make CMakeFiles/purge.dir/build +.PHONY : purge/fast + +#============================================================================= +# Target rules for targets named txt + +# Build rule for target. +txt: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 txt +.PHONY : txt + +# fast build rule for target. +txt/fast: + $(MAKE) -f CMakeFiles/txt.dir/build.make CMakeFiles/txt.dir/build +.PHONY : txt/fast + +Common/CommandLine.o: Common/CommandLine.cpp.o +.PHONY : Common/CommandLine.o + +# target to build an object file +Common/CommandLine.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CommandLine.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CommandLine.cpp.o +.PHONY : Common/CommandLine.cpp.o + +Common/CommandLine.i: Common/CommandLine.cpp.i +.PHONY : Common/CommandLine.i + +# target to preprocess a source file +Common/CommandLine.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CommandLine.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CommandLine.cpp.i +.PHONY : Common/CommandLine.cpp.i + +Common/CommandLine.s: Common/CommandLine.cpp.s +.PHONY : Common/CommandLine.s + +# target to generate assembly for a file +Common/CommandLine.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CommandLine.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CommandLine.cpp.s +.PHONY : Common/CommandLine.cpp.s + +Common/Context.o: Common/Context.cpp.o +.PHONY : Common/Context.o + +# target to build an object file +Common/Context.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Context.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Context.cpp.o +.PHONY : Common/Context.cpp.o + +Common/Context.i: Common/Context.cpp.i +.PHONY : Common/Context.i + +# target to preprocess a source file +Common/Context.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Context.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Context.cpp.i +.PHONY : Common/Context.cpp.i + +Common/Context.s: Common/Context.cpp.s +.PHONY : Common/Context.s + +# target to generate assembly for a file +Common/Context.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Context.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Context.cpp.s +.PHONY : Common/Context.cpp.s + +Common/CreateFile.o: Common/CreateFile.cpp.o +.PHONY : Common/CreateFile.o + +# target to build an object file +Common/CreateFile.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CreateFile.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CreateFile.cpp.o +.PHONY : Common/CreateFile.cpp.o + +Common/CreateFile.i: Common/CreateFile.cpp.i +.PHONY : Common/CreateFile.i + +# target to preprocess a source file +Common/CreateFile.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CreateFile.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CreateFile.cpp.i +.PHONY : Common/CreateFile.cpp.i + +Common/CreateFile.s: Common/CreateFile.cpp.s +.PHONY : Common/CreateFile.s + +# target to generate assembly for a file +Common/CreateFile.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/CreateFile.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/CreateFile.cpp.s +.PHONY : Common/CreateFile.cpp.s + +Common/Gmsh.o: Common/Gmsh.cpp.o +.PHONY : Common/Gmsh.o + +# target to build an object file +Common/Gmsh.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Gmsh.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Gmsh.cpp.o +.PHONY : Common/Gmsh.cpp.o + +Common/Gmsh.i: Common/Gmsh.cpp.i +.PHONY : Common/Gmsh.i + +# target to preprocess a source file +Common/Gmsh.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Gmsh.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Gmsh.cpp.i +.PHONY : Common/Gmsh.cpp.i + +Common/Gmsh.s: Common/Gmsh.cpp.s +.PHONY : Common/Gmsh.s + +# target to generate assembly for a file +Common/Gmsh.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Gmsh.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Gmsh.cpp.s +.PHONY : Common/Gmsh.cpp.s + +Common/GmshDaemon.o: Common/GmshDaemon.cpp.o +.PHONY : Common/GmshDaemon.o + +# target to build an object file +Common/GmshDaemon.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshDaemon.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshDaemon.cpp.o +.PHONY : Common/GmshDaemon.cpp.o + +Common/GmshDaemon.i: Common/GmshDaemon.cpp.i +.PHONY : Common/GmshDaemon.i + +# target to preprocess a source file +Common/GmshDaemon.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshDaemon.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshDaemon.cpp.i +.PHONY : Common/GmshDaemon.cpp.i + +Common/GmshDaemon.s: Common/GmshDaemon.cpp.s +.PHONY : Common/GmshDaemon.s + +# target to generate assembly for a file +Common/GmshDaemon.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshDaemon.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshDaemon.cpp.s +.PHONY : Common/GmshDaemon.cpp.s + +Common/GmshMessage.o: Common/GmshMessage.cpp.o +.PHONY : Common/GmshMessage.o + +# target to build an object file +Common/GmshMessage.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshMessage.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshMessage.cpp.o +.PHONY : Common/GmshMessage.cpp.o + +Common/GmshMessage.i: Common/GmshMessage.cpp.i +.PHONY : Common/GmshMessage.i + +# target to preprocess a source file +Common/GmshMessage.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshMessage.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshMessage.cpp.i +.PHONY : Common/GmshMessage.cpp.i + +Common/GmshMessage.s: Common/GmshMessage.cpp.s +.PHONY : Common/GmshMessage.s + +# target to generate assembly for a file +Common/GmshMessage.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/GmshMessage.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/GmshMessage.cpp.s +.PHONY : Common/GmshMessage.cpp.s + +Common/ListUtils.o: Common/ListUtils.cpp.o +.PHONY : Common/ListUtils.o + +# target to build an object file +Common/ListUtils.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/ListUtils.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/ListUtils.cpp.o +.PHONY : Common/ListUtils.cpp.o + +Common/ListUtils.i: Common/ListUtils.cpp.i +.PHONY : Common/ListUtils.i + +# target to preprocess a source file +Common/ListUtils.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/ListUtils.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/ListUtils.cpp.i +.PHONY : Common/ListUtils.cpp.i + +Common/ListUtils.s: Common/ListUtils.cpp.s +.PHONY : Common/ListUtils.s + +# target to generate assembly for a file +Common/ListUtils.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/ListUtils.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/ListUtils.cpp.s +.PHONY : Common/ListUtils.cpp.s + +Common/Main.o: Common/Main.cpp.o +.PHONY : Common/Main.o + +# target to build an object file +Common/Main.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Main.cpp.o +.PHONY : Common/Main.cpp.o + +Common/Main.i: Common/Main.cpp.i +.PHONY : Common/Main.i + +# target to preprocess a source file +Common/Main.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Main.cpp.i +.PHONY : Common/Main.cpp.i + +Common/Main.s: Common/Main.cpp.s +.PHONY : Common/Main.s + +# target to generate assembly for a file +Common/Main.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Main.cpp.s +.PHONY : Common/Main.cpp.s + +Common/MallocUtils.o: Common/MallocUtils.cpp.o +.PHONY : Common/MallocUtils.o + +# target to build an object file +Common/MallocUtils.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/MallocUtils.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/MallocUtils.cpp.o +.PHONY : Common/MallocUtils.cpp.o + +Common/MallocUtils.i: Common/MallocUtils.cpp.i +.PHONY : Common/MallocUtils.i + +# target to preprocess a source file +Common/MallocUtils.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/MallocUtils.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/MallocUtils.cpp.i +.PHONY : Common/MallocUtils.cpp.i + +Common/MallocUtils.s: Common/MallocUtils.cpp.s +.PHONY : Common/MallocUtils.s + +# target to generate assembly for a file +Common/MallocUtils.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/MallocUtils.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/MallocUtils.cpp.s +.PHONY : Common/MallocUtils.cpp.s + +Common/OS.o: Common/OS.cpp.o +.PHONY : Common/OS.o + +# target to build an object file +Common/OS.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OS.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OS.cpp.o +.PHONY : Common/OS.cpp.o + +Common/OS.i: Common/OS.cpp.i +.PHONY : Common/OS.i + +# target to preprocess a source file +Common/OS.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OS.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OS.cpp.i +.PHONY : Common/OS.cpp.i + +Common/OS.s: Common/OS.cpp.s +.PHONY : Common/OS.s + +# target to generate assembly for a file +Common/OS.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OS.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OS.cpp.s +.PHONY : Common/OS.cpp.s + +Common/Octree.o: Common/Octree.cpp.o +.PHONY : Common/Octree.o + +# target to build an object file +Common/Octree.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Octree.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Octree.cpp.o +.PHONY : Common/Octree.cpp.o + +Common/Octree.i: Common/Octree.cpp.i +.PHONY : Common/Octree.i + +# target to preprocess a source file +Common/Octree.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Octree.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Octree.cpp.i +.PHONY : Common/Octree.cpp.i + +Common/Octree.s: Common/Octree.cpp.s +.PHONY : Common/Octree.s + +# target to generate assembly for a file +Common/Octree.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Octree.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Octree.cpp.s +.PHONY : Common/Octree.cpp.s + +Common/OctreeInternals.o: Common/OctreeInternals.cpp.o +.PHONY : Common/OctreeInternals.o + +# target to build an object file +Common/OctreeInternals.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OctreeInternals.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OctreeInternals.cpp.o +.PHONY : Common/OctreeInternals.cpp.o + +Common/OctreeInternals.i: Common/OctreeInternals.cpp.i +.PHONY : Common/OctreeInternals.i + +# target to preprocess a source file +Common/OctreeInternals.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OctreeInternals.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OctreeInternals.cpp.i +.PHONY : Common/OctreeInternals.cpp.i + +Common/OctreeInternals.s: Common/OctreeInternals.cpp.s +.PHONY : Common/OctreeInternals.s + +# target to generate assembly for a file +Common/OctreeInternals.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OctreeInternals.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OctreeInternals.cpp.s +.PHONY : Common/OctreeInternals.cpp.s + +Common/OpenFile.o: Common/OpenFile.cpp.o +.PHONY : Common/OpenFile.o + +# target to build an object file +Common/OpenFile.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OpenFile.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OpenFile.cpp.o +.PHONY : Common/OpenFile.cpp.o + +Common/OpenFile.i: Common/OpenFile.cpp.i +.PHONY : Common/OpenFile.i + +# target to preprocess a source file +Common/OpenFile.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OpenFile.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OpenFile.cpp.i +.PHONY : Common/OpenFile.cpp.i + +Common/OpenFile.s: Common/OpenFile.cpp.s +.PHONY : Common/OpenFile.s + +# target to generate assembly for a file +Common/OpenFile.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/OpenFile.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/OpenFile.cpp.s +.PHONY : Common/OpenFile.cpp.s + +Common/Options.o: Common/Options.cpp.o +.PHONY : Common/Options.o + +# target to build an object file +Common/Options.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Options.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Options.cpp.o +.PHONY : Common/Options.cpp.o + +Common/Options.i: Common/Options.cpp.i +.PHONY : Common/Options.i + +# target to preprocess a source file +Common/Options.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Options.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Options.cpp.i +.PHONY : Common/Options.cpp.i + +Common/Options.s: Common/Options.cpp.s +.PHONY : Common/Options.s + +# target to generate assembly for a file +Common/Options.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/Options.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/Options.cpp.s +.PHONY : Common/Options.cpp.s + +Common/SmoothData.o: Common/SmoothData.cpp.o +.PHONY : Common/SmoothData.o + +# target to build an object file +Common/SmoothData.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/SmoothData.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/SmoothData.cpp.o +.PHONY : Common/SmoothData.cpp.o + +Common/SmoothData.i: Common/SmoothData.cpp.i +.PHONY : Common/SmoothData.i + +# target to preprocess a source file +Common/SmoothData.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/SmoothData.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/SmoothData.cpp.i +.PHONY : Common/SmoothData.cpp.i + +Common/SmoothData.s: Common/SmoothData.cpp.s +.PHONY : Common/SmoothData.s + +# target to generate assembly for a file +Common/SmoothData.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/SmoothData.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/SmoothData.cpp.s +.PHONY : Common/SmoothData.cpp.s + +Common/StringUtils.o: Common/StringUtils.cpp.o +.PHONY : Common/StringUtils.o + +# target to build an object file +Common/StringUtils.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/StringUtils.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/StringUtils.cpp.o +.PHONY : Common/StringUtils.cpp.o + +Common/StringUtils.i: Common/StringUtils.cpp.i +.PHONY : Common/StringUtils.i + +# target to preprocess a source file +Common/StringUtils.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/StringUtils.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/StringUtils.cpp.i +.PHONY : Common/StringUtils.cpp.i + +Common/StringUtils.s: Common/StringUtils.cpp.s +.PHONY : Common/StringUtils.s + +# target to generate assembly for a file +Common/StringUtils.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/StringUtils.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/StringUtils.cpp.s +.PHONY : Common/StringUtils.cpp.s + +Common/TreeUtils.o: Common/TreeUtils.cpp.o +.PHONY : Common/TreeUtils.o + +# target to build an object file +Common/TreeUtils.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/TreeUtils.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/TreeUtils.cpp.o +.PHONY : Common/TreeUtils.cpp.o + +Common/TreeUtils.i: Common/TreeUtils.cpp.i +.PHONY : Common/TreeUtils.i + +# target to preprocess a source file +Common/TreeUtils.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/TreeUtils.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/TreeUtils.cpp.i +.PHONY : Common/TreeUtils.cpp.i + +Common/TreeUtils.s: Common/TreeUtils.cpp.s +.PHONY : Common/TreeUtils.s + +# target to generate assembly for a file +Common/TreeUtils.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/TreeUtils.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/TreeUtils.cpp.s +.PHONY : Common/TreeUtils.cpp.s + +Common/VertexArray.o: Common/VertexArray.cpp.o +.PHONY : Common/VertexArray.o + +# target to build an object file +Common/VertexArray.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/VertexArray.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/VertexArray.cpp.o +.PHONY : Common/VertexArray.cpp.o + +Common/VertexArray.i: Common/VertexArray.cpp.i +.PHONY : Common/VertexArray.i + +# target to preprocess a source file +Common/VertexArray.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/VertexArray.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/VertexArray.cpp.i +.PHONY : Common/VertexArray.cpp.i + +Common/VertexArray.s: Common/VertexArray.cpp.s +.PHONY : Common/VertexArray.s + +# target to generate assembly for a file +Common/VertexArray.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/VertexArray.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/VertexArray.cpp.s +.PHONY : Common/VertexArray.cpp.s + +Common/avl.o: Common/avl.cpp.o +.PHONY : Common/avl.o + +# target to build an object file +Common/avl.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/avl.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/avl.cpp.o +.PHONY : Common/avl.cpp.o + +Common/avl.i: Common/avl.cpp.i +.PHONY : Common/avl.i + +# target to preprocess a source file +Common/avl.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/avl.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/avl.cpp.i +.PHONY : Common/avl.cpp.i + +Common/avl.s: Common/avl.cpp.s +.PHONY : Common/avl.s + +# target to generate assembly for a file +Common/avl.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Common/avl.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Common/avl.cpp.s +.PHONY : Common/avl.cpp.s + +Geo/CellComplex.o: Geo/CellComplex.cpp.o +.PHONY : Geo/CellComplex.o + +# target to build an object file +Geo/CellComplex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/CellComplex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/CellComplex.cpp.o +.PHONY : Geo/CellComplex.cpp.o + +Geo/CellComplex.i: Geo/CellComplex.cpp.i +.PHONY : Geo/CellComplex.i + +# target to preprocess a source file +Geo/CellComplex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/CellComplex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/CellComplex.cpp.i +.PHONY : Geo/CellComplex.cpp.i + +Geo/CellComplex.s: Geo/CellComplex.cpp.s +.PHONY : Geo/CellComplex.s + +# target to generate assembly for a file +Geo/CellComplex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/CellComplex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/CellComplex.cpp.s +.PHONY : Geo/CellComplex.cpp.s + +Geo/ChainComplex.o: Geo/ChainComplex.cpp.o +.PHONY : Geo/ChainComplex.o + +# target to build an object file +Geo/ChainComplex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ChainComplex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ChainComplex.cpp.o +.PHONY : Geo/ChainComplex.cpp.o + +Geo/ChainComplex.i: Geo/ChainComplex.cpp.i +.PHONY : Geo/ChainComplex.i + +# target to preprocess a source file +Geo/ChainComplex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ChainComplex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ChainComplex.cpp.i +.PHONY : Geo/ChainComplex.cpp.i + +Geo/ChainComplex.s: Geo/ChainComplex.cpp.s +.PHONY : Geo/ChainComplex.s + +# target to generate assembly for a file +Geo/ChainComplex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ChainComplex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ChainComplex.cpp.s +.PHONY : Geo/ChainComplex.cpp.s + +Geo/ExtrudeParams.o: Geo/ExtrudeParams.cpp.o +.PHONY : Geo/ExtrudeParams.o + +# target to build an object file +Geo/ExtrudeParams.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ExtrudeParams.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ExtrudeParams.cpp.o +.PHONY : Geo/ExtrudeParams.cpp.o + +Geo/ExtrudeParams.i: Geo/ExtrudeParams.cpp.i +.PHONY : Geo/ExtrudeParams.i + +# target to preprocess a source file +Geo/ExtrudeParams.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ExtrudeParams.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ExtrudeParams.cpp.i +.PHONY : Geo/ExtrudeParams.cpp.i + +Geo/ExtrudeParams.s: Geo/ExtrudeParams.cpp.s +.PHONY : Geo/ExtrudeParams.s + +# target to generate assembly for a file +Geo/ExtrudeParams.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/ExtrudeParams.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/ExtrudeParams.cpp.s +.PHONY : Geo/ExtrudeParams.cpp.s + +Geo/GEdge.o: Geo/GEdge.cpp.o +.PHONY : Geo/GEdge.o + +# target to build an object file +Geo/GEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdge.cpp.o +.PHONY : Geo/GEdge.cpp.o + +Geo/GEdge.i: Geo/GEdge.cpp.i +.PHONY : Geo/GEdge.i + +# target to preprocess a source file +Geo/GEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdge.cpp.i +.PHONY : Geo/GEdge.cpp.i + +Geo/GEdge.s: Geo/GEdge.cpp.s +.PHONY : Geo/GEdge.s + +# target to generate assembly for a file +Geo/GEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdge.cpp.s +.PHONY : Geo/GEdge.cpp.s + +Geo/GEdgeCompound.o: Geo/GEdgeCompound.cpp.o +.PHONY : Geo/GEdgeCompound.o + +# target to build an object file +Geo/GEdgeCompound.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeCompound.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeCompound.cpp.o +.PHONY : Geo/GEdgeCompound.cpp.o + +Geo/GEdgeCompound.i: Geo/GEdgeCompound.cpp.i +.PHONY : Geo/GEdgeCompound.i + +# target to preprocess a source file +Geo/GEdgeCompound.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeCompound.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeCompound.cpp.i +.PHONY : Geo/GEdgeCompound.cpp.i + +Geo/GEdgeCompound.s: Geo/GEdgeCompound.cpp.s +.PHONY : Geo/GEdgeCompound.s + +# target to generate assembly for a file +Geo/GEdgeCompound.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeCompound.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeCompound.cpp.s +.PHONY : Geo/GEdgeCompound.cpp.s + +Geo/GEdgeLoop.o: Geo/GEdgeLoop.cpp.o +.PHONY : Geo/GEdgeLoop.o + +# target to build an object file +Geo/GEdgeLoop.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeLoop.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeLoop.cpp.o +.PHONY : Geo/GEdgeLoop.cpp.o + +Geo/GEdgeLoop.i: Geo/GEdgeLoop.cpp.i +.PHONY : Geo/GEdgeLoop.i + +# target to preprocess a source file +Geo/GEdgeLoop.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeLoop.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeLoop.cpp.i +.PHONY : Geo/GEdgeLoop.cpp.i + +Geo/GEdgeLoop.s: Geo/GEdgeLoop.cpp.s +.PHONY : Geo/GEdgeLoop.s + +# target to generate assembly for a file +Geo/GEdgeLoop.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEdgeLoop.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEdgeLoop.cpp.s +.PHONY : Geo/GEdgeLoop.cpp.s + +Geo/GEntity.o: Geo/GEntity.cpp.o +.PHONY : Geo/GEntity.o + +# target to build an object file +Geo/GEntity.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEntity.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEntity.cpp.o +.PHONY : Geo/GEntity.cpp.o + +Geo/GEntity.i: Geo/GEntity.cpp.i +.PHONY : Geo/GEntity.i + +# target to preprocess a source file +Geo/GEntity.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEntity.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEntity.cpp.i +.PHONY : Geo/GEntity.cpp.i + +Geo/GEntity.s: Geo/GEntity.cpp.s +.PHONY : Geo/GEntity.s + +# target to generate assembly for a file +Geo/GEntity.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GEntity.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GEntity.cpp.s +.PHONY : Geo/GEntity.cpp.s + +Geo/GFace.o: Geo/GFace.cpp.o +.PHONY : Geo/GFace.o + +# target to build an object file +Geo/GFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFace.cpp.o +.PHONY : Geo/GFace.cpp.o + +Geo/GFace.i: Geo/GFace.cpp.i +.PHONY : Geo/GFace.i + +# target to preprocess a source file +Geo/GFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFace.cpp.i +.PHONY : Geo/GFace.cpp.i + +Geo/GFace.s: Geo/GFace.cpp.s +.PHONY : Geo/GFace.s + +# target to generate assembly for a file +Geo/GFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFace.cpp.s +.PHONY : Geo/GFace.cpp.s + +Geo/GFaceCompound.o: Geo/GFaceCompound.cpp.o +.PHONY : Geo/GFaceCompound.o + +# target to build an object file +Geo/GFaceCompound.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFaceCompound.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFaceCompound.cpp.o +.PHONY : Geo/GFaceCompound.cpp.o + +Geo/GFaceCompound.i: Geo/GFaceCompound.cpp.i +.PHONY : Geo/GFaceCompound.i + +# target to preprocess a source file +Geo/GFaceCompound.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFaceCompound.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFaceCompound.cpp.i +.PHONY : Geo/GFaceCompound.cpp.i + +Geo/GFaceCompound.s: Geo/GFaceCompound.cpp.s +.PHONY : Geo/GFaceCompound.s + +# target to generate assembly for a file +Geo/GFaceCompound.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GFaceCompound.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GFaceCompound.cpp.s +.PHONY : Geo/GFaceCompound.cpp.s + +Geo/GModel.o: Geo/GModel.cpp.o +.PHONY : Geo/GModel.o + +# target to build an object file +Geo/GModel.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModel.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModel.cpp.o +.PHONY : Geo/GModel.cpp.o + +Geo/GModel.i: Geo/GModel.cpp.i +.PHONY : Geo/GModel.i + +# target to preprocess a source file +Geo/GModel.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModel.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModel.cpp.i +.PHONY : Geo/GModel.cpp.i + +Geo/GModel.s: Geo/GModel.cpp.s +.PHONY : Geo/GModel.s + +# target to generate assembly for a file +Geo/GModel.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModel.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModel.cpp.s +.PHONY : Geo/GModel.cpp.s + +Geo/GModelIO_CGNS.o: Geo/GModelIO_CGNS.cpp.o +.PHONY : Geo/GModelIO_CGNS.o + +# target to build an object file +Geo/GModelIO_CGNS.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_CGNS.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_CGNS.cpp.o +.PHONY : Geo/GModelIO_CGNS.cpp.o + +Geo/GModelIO_CGNS.i: Geo/GModelIO_CGNS.cpp.i +.PHONY : Geo/GModelIO_CGNS.i + +# target to preprocess a source file +Geo/GModelIO_CGNS.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_CGNS.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_CGNS.cpp.i +.PHONY : Geo/GModelIO_CGNS.cpp.i + +Geo/GModelIO_CGNS.s: Geo/GModelIO_CGNS.cpp.s +.PHONY : Geo/GModelIO_CGNS.s + +# target to generate assembly for a file +Geo/GModelIO_CGNS.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_CGNS.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_CGNS.cpp.s +.PHONY : Geo/GModelIO_CGNS.cpp.s + +Geo/GModelIO_Fourier.o: Geo/GModelIO_Fourier.cpp.o +.PHONY : Geo/GModelIO_Fourier.o + +# target to build an object file +Geo/GModelIO_Fourier.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Fourier.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Fourier.cpp.o +.PHONY : Geo/GModelIO_Fourier.cpp.o + +Geo/GModelIO_Fourier.i: Geo/GModelIO_Fourier.cpp.i +.PHONY : Geo/GModelIO_Fourier.i + +# target to preprocess a source file +Geo/GModelIO_Fourier.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Fourier.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Fourier.cpp.i +.PHONY : Geo/GModelIO_Fourier.cpp.i + +Geo/GModelIO_Fourier.s: Geo/GModelIO_Fourier.cpp.s +.PHONY : Geo/GModelIO_Fourier.s + +# target to generate assembly for a file +Geo/GModelIO_Fourier.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Fourier.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Fourier.cpp.s +.PHONY : Geo/GModelIO_Fourier.cpp.s + +Geo/GModelIO_Geo.o: Geo/GModelIO_Geo.cpp.o +.PHONY : Geo/GModelIO_Geo.o + +# target to build an object file +Geo/GModelIO_Geo.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Geo.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Geo.cpp.o +.PHONY : Geo/GModelIO_Geo.cpp.o + +Geo/GModelIO_Geo.i: Geo/GModelIO_Geo.cpp.i +.PHONY : Geo/GModelIO_Geo.i + +# target to preprocess a source file +Geo/GModelIO_Geo.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Geo.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Geo.cpp.i +.PHONY : Geo/GModelIO_Geo.cpp.i + +Geo/GModelIO_Geo.s: Geo/GModelIO_Geo.cpp.s +.PHONY : Geo/GModelIO_Geo.s + +# target to generate assembly for a file +Geo/GModelIO_Geo.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Geo.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Geo.cpp.s +.PHONY : Geo/GModelIO_Geo.cpp.s + +Geo/GModelIO_MED.o: Geo/GModelIO_MED.cpp.o +.PHONY : Geo/GModelIO_MED.o + +# target to build an object file +Geo/GModelIO_MED.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_MED.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_MED.cpp.o +.PHONY : Geo/GModelIO_MED.cpp.o + +Geo/GModelIO_MED.i: Geo/GModelIO_MED.cpp.i +.PHONY : Geo/GModelIO_MED.i + +# target to preprocess a source file +Geo/GModelIO_MED.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_MED.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_MED.cpp.i +.PHONY : Geo/GModelIO_MED.cpp.i + +Geo/GModelIO_MED.s: Geo/GModelIO_MED.cpp.s +.PHONY : Geo/GModelIO_MED.s + +# target to generate assembly for a file +Geo/GModelIO_MED.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_MED.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_MED.cpp.s +.PHONY : Geo/GModelIO_MED.cpp.s + +Geo/GModelIO_Mesh.o: Geo/GModelIO_Mesh.cpp.o +.PHONY : Geo/GModelIO_Mesh.o + +# target to build an object file +Geo/GModelIO_Mesh.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Mesh.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Mesh.cpp.o +.PHONY : Geo/GModelIO_Mesh.cpp.o + +Geo/GModelIO_Mesh.i: Geo/GModelIO_Mesh.cpp.i +.PHONY : Geo/GModelIO_Mesh.i + +# target to preprocess a source file +Geo/GModelIO_Mesh.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Mesh.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Mesh.cpp.i +.PHONY : Geo/GModelIO_Mesh.cpp.i + +Geo/GModelIO_Mesh.s: Geo/GModelIO_Mesh.cpp.s +.PHONY : Geo/GModelIO_Mesh.s + +# target to generate assembly for a file +Geo/GModelIO_Mesh.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_Mesh.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_Mesh.cpp.s +.PHONY : Geo/GModelIO_Mesh.cpp.s + +Geo/GModelIO_OCC.o: Geo/GModelIO_OCC.cpp.o +.PHONY : Geo/GModelIO_OCC.o + +# target to build an object file +Geo/GModelIO_OCC.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_OCC.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_OCC.cpp.o +.PHONY : Geo/GModelIO_OCC.cpp.o + +Geo/GModelIO_OCC.i: Geo/GModelIO_OCC.cpp.i +.PHONY : Geo/GModelIO_OCC.i + +# target to preprocess a source file +Geo/GModelIO_OCC.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_OCC.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_OCC.cpp.i +.PHONY : Geo/GModelIO_OCC.cpp.i + +Geo/GModelIO_OCC.s: Geo/GModelIO_OCC.cpp.s +.PHONY : Geo/GModelIO_OCC.s + +# target to generate assembly for a file +Geo/GModelIO_OCC.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GModelIO_OCC.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GModelIO_OCC.cpp.s +.PHONY : Geo/GModelIO_OCC.cpp.s + +Geo/GRegion.o: Geo/GRegion.cpp.o +.PHONY : Geo/GRegion.o + +# target to build an object file +Geo/GRegion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegion.cpp.o +.PHONY : Geo/GRegion.cpp.o + +Geo/GRegion.i: Geo/GRegion.cpp.i +.PHONY : Geo/GRegion.i + +# target to preprocess a source file +Geo/GRegion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegion.cpp.i +.PHONY : Geo/GRegion.cpp.i + +Geo/GRegion.s: Geo/GRegion.cpp.s +.PHONY : Geo/GRegion.s + +# target to generate assembly for a file +Geo/GRegion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegion.cpp.s +.PHONY : Geo/GRegion.cpp.s + +Geo/GRegionCompound.o: Geo/GRegionCompound.cpp.o +.PHONY : Geo/GRegionCompound.o + +# target to build an object file +Geo/GRegionCompound.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegionCompound.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegionCompound.cpp.o +.PHONY : Geo/GRegionCompound.cpp.o + +Geo/GRegionCompound.i: Geo/GRegionCompound.cpp.i +.PHONY : Geo/GRegionCompound.i + +# target to preprocess a source file +Geo/GRegionCompound.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegionCompound.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegionCompound.cpp.i +.PHONY : Geo/GRegionCompound.cpp.i + +Geo/GRegionCompound.s: Geo/GRegionCompound.cpp.s +.PHONY : Geo/GRegionCompound.s + +# target to generate assembly for a file +Geo/GRegionCompound.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GRegionCompound.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GRegionCompound.cpp.s +.PHONY : Geo/GRegionCompound.cpp.s + +Geo/GVertex.o: Geo/GVertex.cpp.o +.PHONY : Geo/GVertex.o + +# target to build an object file +Geo/GVertex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GVertex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GVertex.cpp.o +.PHONY : Geo/GVertex.cpp.o + +Geo/GVertex.i: Geo/GVertex.cpp.i +.PHONY : Geo/GVertex.i + +# target to preprocess a source file +Geo/GVertex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GVertex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GVertex.cpp.i +.PHONY : Geo/GVertex.cpp.i + +Geo/GVertex.s: Geo/GVertex.cpp.s +.PHONY : Geo/GVertex.s + +# target to generate assembly for a file +Geo/GVertex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GVertex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GVertex.cpp.s +.PHONY : Geo/GVertex.cpp.s + +Geo/Geo.o: Geo/Geo.cpp.o +.PHONY : Geo/Geo.o + +# target to build an object file +Geo/Geo.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Geo.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Geo.cpp.o +.PHONY : Geo/Geo.cpp.o + +Geo/Geo.i: Geo/Geo.cpp.i +.PHONY : Geo/Geo.i + +# target to preprocess a source file +Geo/Geo.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Geo.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Geo.cpp.i +.PHONY : Geo/Geo.cpp.i + +Geo/Geo.s: Geo/Geo.cpp.s +.PHONY : Geo/Geo.s + +# target to generate assembly for a file +Geo/Geo.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Geo.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Geo.cpp.s +.PHONY : Geo/Geo.cpp.s + +Geo/GeoInterpolation.o: Geo/GeoInterpolation.cpp.o +.PHONY : Geo/GeoInterpolation.o + +# target to build an object file +Geo/GeoInterpolation.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoInterpolation.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoInterpolation.cpp.o +.PHONY : Geo/GeoInterpolation.cpp.o + +Geo/GeoInterpolation.i: Geo/GeoInterpolation.cpp.i +.PHONY : Geo/GeoInterpolation.i + +# target to preprocess a source file +Geo/GeoInterpolation.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoInterpolation.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoInterpolation.cpp.i +.PHONY : Geo/GeoInterpolation.cpp.i + +Geo/GeoInterpolation.s: Geo/GeoInterpolation.cpp.s +.PHONY : Geo/GeoInterpolation.s + +# target to generate assembly for a file +Geo/GeoInterpolation.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoInterpolation.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoInterpolation.cpp.s +.PHONY : Geo/GeoInterpolation.cpp.s + +Geo/GeoStringInterface.o: Geo/GeoStringInterface.cpp.o +.PHONY : Geo/GeoStringInterface.o + +# target to build an object file +Geo/GeoStringInterface.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoStringInterface.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoStringInterface.cpp.o +.PHONY : Geo/GeoStringInterface.cpp.o + +Geo/GeoStringInterface.i: Geo/GeoStringInterface.cpp.i +.PHONY : Geo/GeoStringInterface.i + +# target to preprocess a source file +Geo/GeoStringInterface.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoStringInterface.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoStringInterface.cpp.i +.PHONY : Geo/GeoStringInterface.cpp.i + +Geo/GeoStringInterface.s: Geo/GeoStringInterface.cpp.s +.PHONY : Geo/GeoStringInterface.s + +# target to generate assembly for a file +Geo/GeoStringInterface.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeoStringInterface.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeoStringInterface.cpp.s +.PHONY : Geo/GeoStringInterface.cpp.s + +Geo/GeomMeshMatcher.o: Geo/GeomMeshMatcher.cpp.o +.PHONY : Geo/GeomMeshMatcher.o + +# target to build an object file +Geo/GeomMeshMatcher.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeomMeshMatcher.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeomMeshMatcher.cpp.o +.PHONY : Geo/GeomMeshMatcher.cpp.o + +Geo/GeomMeshMatcher.i: Geo/GeomMeshMatcher.cpp.i +.PHONY : Geo/GeomMeshMatcher.i + +# target to preprocess a source file +Geo/GeomMeshMatcher.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeomMeshMatcher.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeomMeshMatcher.cpp.i +.PHONY : Geo/GeomMeshMatcher.cpp.i + +Geo/GeomMeshMatcher.s: Geo/GeomMeshMatcher.cpp.s +.PHONY : Geo/GeomMeshMatcher.s + +# target to generate assembly for a file +Geo/GeomMeshMatcher.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/GeomMeshMatcher.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/GeomMeshMatcher.cpp.s +.PHONY : Geo/GeomMeshMatcher.cpp.s + +Geo/Homology.o: Geo/Homology.cpp.o +.PHONY : Geo/Homology.o + +# target to build an object file +Geo/Homology.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Homology.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Homology.cpp.o +.PHONY : Geo/Homology.cpp.o + +Geo/Homology.i: Geo/Homology.cpp.i +.PHONY : Geo/Homology.i + +# target to preprocess a source file +Geo/Homology.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Homology.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Homology.cpp.i +.PHONY : Geo/Homology.cpp.i + +Geo/Homology.s: Geo/Homology.cpp.s +.PHONY : Geo/Homology.s + +# target to generate assembly for a file +Geo/Homology.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/Homology.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/Homology.cpp.s +.PHONY : Geo/Homology.cpp.s + +Geo/MElement.o: Geo/MElement.cpp.o +.PHONY : Geo/MElement.o + +# target to build an object file +Geo/MElement.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElement.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElement.cpp.o +.PHONY : Geo/MElement.cpp.o + +Geo/MElement.i: Geo/MElement.cpp.i +.PHONY : Geo/MElement.i + +# target to preprocess a source file +Geo/MElement.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElement.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElement.cpp.i +.PHONY : Geo/MElement.cpp.i + +Geo/MElement.s: Geo/MElement.cpp.s +.PHONY : Geo/MElement.s + +# target to generate assembly for a file +Geo/MElement.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElement.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElement.cpp.s +.PHONY : Geo/MElement.cpp.s + +Geo/MElementCut.o: Geo/MElementCut.cpp.o +.PHONY : Geo/MElementCut.o + +# target to build an object file +Geo/MElementCut.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElementCut.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElementCut.cpp.o +.PHONY : Geo/MElementCut.cpp.o + +Geo/MElementCut.i: Geo/MElementCut.cpp.i +.PHONY : Geo/MElementCut.i + +# target to preprocess a source file +Geo/MElementCut.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElementCut.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElementCut.cpp.i +.PHONY : Geo/MElementCut.cpp.i + +Geo/MElementCut.s: Geo/MElementCut.cpp.s +.PHONY : Geo/MElementCut.s + +# target to generate assembly for a file +Geo/MElementCut.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MElementCut.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MElementCut.cpp.s +.PHONY : Geo/MElementCut.cpp.s + +Geo/MFace.o: Geo/MFace.cpp.o +.PHONY : Geo/MFace.o + +# target to build an object file +Geo/MFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MFace.cpp.o +.PHONY : Geo/MFace.cpp.o + +Geo/MFace.i: Geo/MFace.cpp.i +.PHONY : Geo/MFace.i + +# target to preprocess a source file +Geo/MFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MFace.cpp.i +.PHONY : Geo/MFace.cpp.i + +Geo/MFace.s: Geo/MFace.cpp.s +.PHONY : Geo/MFace.s + +# target to generate assembly for a file +Geo/MFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MFace.cpp.s +.PHONY : Geo/MFace.cpp.s + +Geo/MHexahedron.o: Geo/MHexahedron.cpp.o +.PHONY : Geo/MHexahedron.o + +# target to build an object file +Geo/MHexahedron.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MHexahedron.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MHexahedron.cpp.o +.PHONY : Geo/MHexahedron.cpp.o + +Geo/MHexahedron.i: Geo/MHexahedron.cpp.i +.PHONY : Geo/MHexahedron.i + +# target to preprocess a source file +Geo/MHexahedron.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MHexahedron.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MHexahedron.cpp.i +.PHONY : Geo/MHexahedron.cpp.i + +Geo/MHexahedron.s: Geo/MHexahedron.cpp.s +.PHONY : Geo/MHexahedron.s + +# target to generate assembly for a file +Geo/MHexahedron.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MHexahedron.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MHexahedron.cpp.s +.PHONY : Geo/MHexahedron.cpp.s + +Geo/MLine.o: Geo/MLine.cpp.o +.PHONY : Geo/MLine.o + +# target to build an object file +Geo/MLine.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MLine.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MLine.cpp.o +.PHONY : Geo/MLine.cpp.o + +Geo/MLine.i: Geo/MLine.cpp.i +.PHONY : Geo/MLine.i + +# target to preprocess a source file +Geo/MLine.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MLine.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MLine.cpp.i +.PHONY : Geo/MLine.cpp.i + +Geo/MLine.s: Geo/MLine.cpp.s +.PHONY : Geo/MLine.s + +# target to generate assembly for a file +Geo/MLine.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MLine.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MLine.cpp.s +.PHONY : Geo/MLine.cpp.s + +Geo/MPrism.o: Geo/MPrism.cpp.o +.PHONY : Geo/MPrism.o + +# target to build an object file +Geo/MPrism.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPrism.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPrism.cpp.o +.PHONY : Geo/MPrism.cpp.o + +Geo/MPrism.i: Geo/MPrism.cpp.i +.PHONY : Geo/MPrism.i + +# target to preprocess a source file +Geo/MPrism.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPrism.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPrism.cpp.i +.PHONY : Geo/MPrism.cpp.i + +Geo/MPrism.s: Geo/MPrism.cpp.s +.PHONY : Geo/MPrism.s + +# target to generate assembly for a file +Geo/MPrism.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPrism.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPrism.cpp.s +.PHONY : Geo/MPrism.cpp.s + +Geo/MPyramid.o: Geo/MPyramid.cpp.o +.PHONY : Geo/MPyramid.o + +# target to build an object file +Geo/MPyramid.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPyramid.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPyramid.cpp.o +.PHONY : Geo/MPyramid.cpp.o + +Geo/MPyramid.i: Geo/MPyramid.cpp.i +.PHONY : Geo/MPyramid.i + +# target to preprocess a source file +Geo/MPyramid.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPyramid.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPyramid.cpp.i +.PHONY : Geo/MPyramid.cpp.i + +Geo/MPyramid.s: Geo/MPyramid.cpp.s +.PHONY : Geo/MPyramid.s + +# target to generate assembly for a file +Geo/MPyramid.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MPyramid.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MPyramid.cpp.s +.PHONY : Geo/MPyramid.cpp.s + +Geo/MQuadrangle.o: Geo/MQuadrangle.cpp.o +.PHONY : Geo/MQuadrangle.o + +# target to build an object file +Geo/MQuadrangle.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MQuadrangle.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MQuadrangle.cpp.o +.PHONY : Geo/MQuadrangle.cpp.o + +Geo/MQuadrangle.i: Geo/MQuadrangle.cpp.i +.PHONY : Geo/MQuadrangle.i + +# target to preprocess a source file +Geo/MQuadrangle.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MQuadrangle.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MQuadrangle.cpp.i +.PHONY : Geo/MQuadrangle.cpp.i + +Geo/MQuadrangle.s: Geo/MQuadrangle.cpp.s +.PHONY : Geo/MQuadrangle.s + +# target to generate assembly for a file +Geo/MQuadrangle.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MQuadrangle.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MQuadrangle.cpp.s +.PHONY : Geo/MQuadrangle.cpp.s + +Geo/MTetrahedron.o: Geo/MTetrahedron.cpp.o +.PHONY : Geo/MTetrahedron.o + +# target to build an object file +Geo/MTetrahedron.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTetrahedron.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTetrahedron.cpp.o +.PHONY : Geo/MTetrahedron.cpp.o + +Geo/MTetrahedron.i: Geo/MTetrahedron.cpp.i +.PHONY : Geo/MTetrahedron.i + +# target to preprocess a source file +Geo/MTetrahedron.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTetrahedron.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTetrahedron.cpp.i +.PHONY : Geo/MTetrahedron.cpp.i + +Geo/MTetrahedron.s: Geo/MTetrahedron.cpp.s +.PHONY : Geo/MTetrahedron.s + +# target to generate assembly for a file +Geo/MTetrahedron.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTetrahedron.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTetrahedron.cpp.s +.PHONY : Geo/MTetrahedron.cpp.s + +Geo/MTriangle.o: Geo/MTriangle.cpp.o +.PHONY : Geo/MTriangle.o + +# target to build an object file +Geo/MTriangle.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTriangle.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTriangle.cpp.o +.PHONY : Geo/MTriangle.cpp.o + +Geo/MTriangle.i: Geo/MTriangle.cpp.i +.PHONY : Geo/MTriangle.i + +# target to preprocess a source file +Geo/MTriangle.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTriangle.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTriangle.cpp.i +.PHONY : Geo/MTriangle.cpp.i + +Geo/MTriangle.s: Geo/MTriangle.cpp.s +.PHONY : Geo/MTriangle.s + +# target to generate assembly for a file +Geo/MTriangle.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MTriangle.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MTriangle.cpp.s +.PHONY : Geo/MTriangle.cpp.s + +Geo/MVertex.o: Geo/MVertex.cpp.o +.PHONY : Geo/MVertex.o + +# target to build an object file +Geo/MVertex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MVertex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MVertex.cpp.o +.PHONY : Geo/MVertex.cpp.o + +Geo/MVertex.i: Geo/MVertex.cpp.i +.PHONY : Geo/MVertex.i + +# target to preprocess a source file +Geo/MVertex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MVertex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MVertex.cpp.i +.PHONY : Geo/MVertex.cpp.i + +Geo/MVertex.s: Geo/MVertex.cpp.s +.PHONY : Geo/MVertex.s + +# target to generate assembly for a file +Geo/MVertex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MVertex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MVertex.cpp.s +.PHONY : Geo/MVertex.cpp.s + +Geo/MZone.o: Geo/MZone.cpp.o +.PHONY : Geo/MZone.o + +# target to build an object file +Geo/MZone.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZone.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZone.cpp.o +.PHONY : Geo/MZone.cpp.o + +Geo/MZone.i: Geo/MZone.cpp.i +.PHONY : Geo/MZone.i + +# target to preprocess a source file +Geo/MZone.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZone.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZone.cpp.i +.PHONY : Geo/MZone.cpp.i + +Geo/MZone.s: Geo/MZone.cpp.s +.PHONY : Geo/MZone.s + +# target to generate assembly for a file +Geo/MZone.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZone.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZone.cpp.s +.PHONY : Geo/MZone.cpp.s + +Geo/MZoneBoundary.o: Geo/MZoneBoundary.cpp.o +.PHONY : Geo/MZoneBoundary.o + +# target to build an object file +Geo/MZoneBoundary.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZoneBoundary.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZoneBoundary.cpp.o +.PHONY : Geo/MZoneBoundary.cpp.o + +Geo/MZoneBoundary.i: Geo/MZoneBoundary.cpp.i +.PHONY : Geo/MZoneBoundary.i + +# target to preprocess a source file +Geo/MZoneBoundary.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZoneBoundary.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZoneBoundary.cpp.i +.PHONY : Geo/MZoneBoundary.cpp.i + +Geo/MZoneBoundary.s: Geo/MZoneBoundary.cpp.s +.PHONY : Geo/MZoneBoundary.s + +# target to generate assembly for a file +Geo/MZoneBoundary.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/MZoneBoundary.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/MZoneBoundary.cpp.s +.PHONY : Geo/MZoneBoundary.cpp.s + +Geo/OCCEdge.o: Geo/OCCEdge.cpp.o +.PHONY : Geo/OCCEdge.o + +# target to build an object file +Geo/OCCEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCEdge.cpp.o +.PHONY : Geo/OCCEdge.cpp.o + +Geo/OCCEdge.i: Geo/OCCEdge.cpp.i +.PHONY : Geo/OCCEdge.i + +# target to preprocess a source file +Geo/OCCEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCEdge.cpp.i +.PHONY : Geo/OCCEdge.cpp.i + +Geo/OCCEdge.s: Geo/OCCEdge.cpp.s +.PHONY : Geo/OCCEdge.s + +# target to generate assembly for a file +Geo/OCCEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCEdge.cpp.s +.PHONY : Geo/OCCEdge.cpp.s + +Geo/OCCFace.o: Geo/OCCFace.cpp.o +.PHONY : Geo/OCCFace.o + +# target to build an object file +Geo/OCCFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCFace.cpp.o +.PHONY : Geo/OCCFace.cpp.o + +Geo/OCCFace.i: Geo/OCCFace.cpp.i +.PHONY : Geo/OCCFace.i + +# target to preprocess a source file +Geo/OCCFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCFace.cpp.i +.PHONY : Geo/OCCFace.cpp.i + +Geo/OCCFace.s: Geo/OCCFace.cpp.s +.PHONY : Geo/OCCFace.s + +# target to generate assembly for a file +Geo/OCCFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCFace.cpp.s +.PHONY : Geo/OCCFace.cpp.s + +Geo/OCCRegion.o: Geo/OCCRegion.cpp.o +.PHONY : Geo/OCCRegion.o + +# target to build an object file +Geo/OCCRegion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCRegion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCRegion.cpp.o +.PHONY : Geo/OCCRegion.cpp.o + +Geo/OCCRegion.i: Geo/OCCRegion.cpp.i +.PHONY : Geo/OCCRegion.i + +# target to preprocess a source file +Geo/OCCRegion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCRegion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCRegion.cpp.i +.PHONY : Geo/OCCRegion.cpp.i + +Geo/OCCRegion.s: Geo/OCCRegion.cpp.s +.PHONY : Geo/OCCRegion.s + +# target to generate assembly for a file +Geo/OCCRegion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCRegion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCRegion.cpp.s +.PHONY : Geo/OCCRegion.cpp.s + +Geo/OCCVertex.o: Geo/OCCVertex.cpp.o +.PHONY : Geo/OCCVertex.o + +# target to build an object file +Geo/OCCVertex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCVertex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCVertex.cpp.o +.PHONY : Geo/OCCVertex.cpp.o + +Geo/OCCVertex.i: Geo/OCCVertex.cpp.i +.PHONY : Geo/OCCVertex.i + +# target to preprocess a source file +Geo/OCCVertex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCVertex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCVertex.cpp.i +.PHONY : Geo/OCCVertex.cpp.i + +Geo/OCCVertex.s: Geo/OCCVertex.cpp.s +.PHONY : Geo/OCCVertex.s + +# target to generate assembly for a file +Geo/OCCVertex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCCVertex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCCVertex.cpp.s +.PHONY : Geo/OCCVertex.cpp.s + +Geo/OCC_Connect.o: Geo/OCC_Connect.cpp.o +.PHONY : Geo/OCC_Connect.o + +# target to build an object file +Geo/OCC_Connect.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCC_Connect.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCC_Connect.cpp.o +.PHONY : Geo/OCC_Connect.cpp.o + +Geo/OCC_Connect.i: Geo/OCC_Connect.cpp.i +.PHONY : Geo/OCC_Connect.i + +# target to preprocess a source file +Geo/OCC_Connect.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCC_Connect.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCC_Connect.cpp.i +.PHONY : Geo/OCC_Connect.cpp.i + +Geo/OCC_Connect.s: Geo/OCC_Connect.cpp.s +.PHONY : Geo/OCC_Connect.s + +# target to generate assembly for a file +Geo/OCC_Connect.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/OCC_Connect.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/OCC_Connect.cpp.s +.PHONY : Geo/OCC_Connect.cpp.s + +Geo/SOrientedBoundingBox.o: Geo/SOrientedBoundingBox.cpp.o +.PHONY : Geo/SOrientedBoundingBox.o + +# target to build an object file +Geo/SOrientedBoundingBox.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/SOrientedBoundingBox.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/SOrientedBoundingBox.cpp.o +.PHONY : Geo/SOrientedBoundingBox.cpp.o + +Geo/SOrientedBoundingBox.i: Geo/SOrientedBoundingBox.cpp.i +.PHONY : Geo/SOrientedBoundingBox.i + +# target to preprocess a source file +Geo/SOrientedBoundingBox.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/SOrientedBoundingBox.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/SOrientedBoundingBox.cpp.i +.PHONY : Geo/SOrientedBoundingBox.cpp.i + +Geo/SOrientedBoundingBox.s: Geo/SOrientedBoundingBox.cpp.s +.PHONY : Geo/SOrientedBoundingBox.s + +# target to generate assembly for a file +Geo/SOrientedBoundingBox.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/SOrientedBoundingBox.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/SOrientedBoundingBox.cpp.s +.PHONY : Geo/SOrientedBoundingBox.cpp.s + +Geo/STensor3.o: Geo/STensor3.cpp.o +.PHONY : Geo/STensor3.o + +# target to build an object file +Geo/STensor3.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/STensor3.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/STensor3.cpp.o +.PHONY : Geo/STensor3.cpp.o + +Geo/STensor3.i: Geo/STensor3.cpp.i +.PHONY : Geo/STensor3.i + +# target to preprocess a source file +Geo/STensor3.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/STensor3.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/STensor3.cpp.i +.PHONY : Geo/STensor3.cpp.i + +Geo/STensor3.s: Geo/STensor3.cpp.s +.PHONY : Geo/STensor3.s + +# target to generate assembly for a file +Geo/STensor3.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/STensor3.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/STensor3.cpp.s +.PHONY : Geo/STensor3.cpp.s + +Geo/discreteEdge.o: Geo/discreteEdge.cpp.o +.PHONY : Geo/discreteEdge.o + +# target to build an object file +Geo/discreteEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteEdge.cpp.o +.PHONY : Geo/discreteEdge.cpp.o + +Geo/discreteEdge.i: Geo/discreteEdge.cpp.i +.PHONY : Geo/discreteEdge.i + +# target to preprocess a source file +Geo/discreteEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteEdge.cpp.i +.PHONY : Geo/discreteEdge.cpp.i + +Geo/discreteEdge.s: Geo/discreteEdge.cpp.s +.PHONY : Geo/discreteEdge.s + +# target to generate assembly for a file +Geo/discreteEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteEdge.cpp.s +.PHONY : Geo/discreteEdge.cpp.s + +Geo/discreteFace.o: Geo/discreteFace.cpp.o +.PHONY : Geo/discreteFace.o + +# target to build an object file +Geo/discreteFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteFace.cpp.o +.PHONY : Geo/discreteFace.cpp.o + +Geo/discreteFace.i: Geo/discreteFace.cpp.i +.PHONY : Geo/discreteFace.i + +# target to preprocess a source file +Geo/discreteFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteFace.cpp.i +.PHONY : Geo/discreteFace.cpp.i + +Geo/discreteFace.s: Geo/discreteFace.cpp.s +.PHONY : Geo/discreteFace.s + +# target to generate assembly for a file +Geo/discreteFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteFace.cpp.s +.PHONY : Geo/discreteFace.cpp.s + +Geo/discreteRegion.o: Geo/discreteRegion.cpp.o +.PHONY : Geo/discreteRegion.o + +# target to build an object file +Geo/discreteRegion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteRegion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteRegion.cpp.o +.PHONY : Geo/discreteRegion.cpp.o + +Geo/discreteRegion.i: Geo/discreteRegion.cpp.i +.PHONY : Geo/discreteRegion.i + +# target to preprocess a source file +Geo/discreteRegion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteRegion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteRegion.cpp.i +.PHONY : Geo/discreteRegion.cpp.i + +Geo/discreteRegion.s: Geo/discreteRegion.cpp.s +.PHONY : Geo/discreteRegion.s + +# target to generate assembly for a file +Geo/discreteRegion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/discreteRegion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/discreteRegion.cpp.s +.PHONY : Geo/discreteRegion.cpp.s + +Geo/findLinks.o: Geo/findLinks.cpp.o +.PHONY : Geo/findLinks.o + +# target to build an object file +Geo/findLinks.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/findLinks.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/findLinks.cpp.o +.PHONY : Geo/findLinks.cpp.o + +Geo/findLinks.i: Geo/findLinks.cpp.i +.PHONY : Geo/findLinks.i + +# target to preprocess a source file +Geo/findLinks.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/findLinks.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/findLinks.cpp.i +.PHONY : Geo/findLinks.cpp.i + +Geo/findLinks.s: Geo/findLinks.cpp.s +.PHONY : Geo/findLinks.s + +# target to generate assembly for a file +Geo/findLinks.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/findLinks.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/findLinks.cpp.s +.PHONY : Geo/findLinks.cpp.s + +Geo/fourierEdge.o: Geo/fourierEdge.cpp.o +.PHONY : Geo/fourierEdge.o + +# target to build an object file +Geo/fourierEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierEdge.cpp.o +.PHONY : Geo/fourierEdge.cpp.o + +Geo/fourierEdge.i: Geo/fourierEdge.cpp.i +.PHONY : Geo/fourierEdge.i + +# target to preprocess a source file +Geo/fourierEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierEdge.cpp.i +.PHONY : Geo/fourierEdge.cpp.i + +Geo/fourierEdge.s: Geo/fourierEdge.cpp.s +.PHONY : Geo/fourierEdge.s + +# target to generate assembly for a file +Geo/fourierEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierEdge.cpp.s +.PHONY : Geo/fourierEdge.cpp.s + +Geo/fourierFace.o: Geo/fourierFace.cpp.o +.PHONY : Geo/fourierFace.o + +# target to build an object file +Geo/fourierFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierFace.cpp.o +.PHONY : Geo/fourierFace.cpp.o + +Geo/fourierFace.i: Geo/fourierFace.cpp.i +.PHONY : Geo/fourierFace.i + +# target to preprocess a source file +Geo/fourierFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierFace.cpp.i +.PHONY : Geo/fourierFace.cpp.i + +Geo/fourierFace.s: Geo/fourierFace.cpp.s +.PHONY : Geo/fourierFace.s + +# target to generate assembly for a file +Geo/fourierFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierFace.cpp.s +.PHONY : Geo/fourierFace.cpp.s + +Geo/fourierProjectionFace.o: Geo/fourierProjectionFace.cpp.o +.PHONY : Geo/fourierProjectionFace.o + +# target to build an object file +Geo/fourierProjectionFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierProjectionFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierProjectionFace.cpp.o +.PHONY : Geo/fourierProjectionFace.cpp.o + +Geo/fourierProjectionFace.i: Geo/fourierProjectionFace.cpp.i +.PHONY : Geo/fourierProjectionFace.i + +# target to preprocess a source file +Geo/fourierProjectionFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierProjectionFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierProjectionFace.cpp.i +.PHONY : Geo/fourierProjectionFace.cpp.i + +Geo/fourierProjectionFace.s: Geo/fourierProjectionFace.cpp.s +.PHONY : Geo/fourierProjectionFace.s + +# target to generate assembly for a file +Geo/fourierProjectionFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/fourierProjectionFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/fourierProjectionFace.cpp.s +.PHONY : Geo/fourierProjectionFace.cpp.s + +Geo/gmshEdge.o: Geo/gmshEdge.cpp.o +.PHONY : Geo/gmshEdge.o + +# target to build an object file +Geo/gmshEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshEdge.cpp.o +.PHONY : Geo/gmshEdge.cpp.o + +Geo/gmshEdge.i: Geo/gmshEdge.cpp.i +.PHONY : Geo/gmshEdge.i + +# target to preprocess a source file +Geo/gmshEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshEdge.cpp.i +.PHONY : Geo/gmshEdge.cpp.i + +Geo/gmshEdge.s: Geo/gmshEdge.cpp.s +.PHONY : Geo/gmshEdge.s + +# target to generate assembly for a file +Geo/gmshEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshEdge.cpp.s +.PHONY : Geo/gmshEdge.cpp.s + +Geo/gmshFace.o: Geo/gmshFace.cpp.o +.PHONY : Geo/gmshFace.o + +# target to build an object file +Geo/gmshFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshFace.cpp.o +.PHONY : Geo/gmshFace.cpp.o + +Geo/gmshFace.i: Geo/gmshFace.cpp.i +.PHONY : Geo/gmshFace.i + +# target to preprocess a source file +Geo/gmshFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshFace.cpp.i +.PHONY : Geo/gmshFace.cpp.i + +Geo/gmshFace.s: Geo/gmshFace.cpp.s +.PHONY : Geo/gmshFace.s + +# target to generate assembly for a file +Geo/gmshFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshFace.cpp.s +.PHONY : Geo/gmshFace.cpp.s + +Geo/gmshRegion.o: Geo/gmshRegion.cpp.o +.PHONY : Geo/gmshRegion.o + +# target to build an object file +Geo/gmshRegion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshRegion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshRegion.cpp.o +.PHONY : Geo/gmshRegion.cpp.o + +Geo/gmshRegion.i: Geo/gmshRegion.cpp.i +.PHONY : Geo/gmshRegion.i + +# target to preprocess a source file +Geo/gmshRegion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshRegion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshRegion.cpp.i +.PHONY : Geo/gmshRegion.cpp.i + +Geo/gmshRegion.s: Geo/gmshRegion.cpp.s +.PHONY : Geo/gmshRegion.s + +# target to generate assembly for a file +Geo/gmshRegion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshRegion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshRegion.cpp.s +.PHONY : Geo/gmshRegion.cpp.s + +Geo/gmshSurface.o: Geo/gmshSurface.cpp.o +.PHONY : Geo/gmshSurface.o + +# target to build an object file +Geo/gmshSurface.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshSurface.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshSurface.cpp.o +.PHONY : Geo/gmshSurface.cpp.o + +Geo/gmshSurface.i: Geo/gmshSurface.cpp.i +.PHONY : Geo/gmshSurface.i + +# target to preprocess a source file +Geo/gmshSurface.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshSurface.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshSurface.cpp.i +.PHONY : Geo/gmshSurface.cpp.i + +Geo/gmshSurface.s: Geo/gmshSurface.cpp.s +.PHONY : Geo/gmshSurface.s + +# target to generate assembly for a file +Geo/gmshSurface.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshSurface.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshSurface.cpp.s +.PHONY : Geo/gmshSurface.cpp.s + +Geo/gmshVertex.o: Geo/gmshVertex.cpp.o +.PHONY : Geo/gmshVertex.o + +# target to build an object file +Geo/gmshVertex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshVertex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshVertex.cpp.o +.PHONY : Geo/gmshVertex.cpp.o + +Geo/gmshVertex.i: Geo/gmshVertex.cpp.i +.PHONY : Geo/gmshVertex.i + +# target to preprocess a source file +Geo/gmshVertex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshVertex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshVertex.cpp.i +.PHONY : Geo/gmshVertex.cpp.i + +Geo/gmshVertex.s: Geo/gmshVertex.cpp.s +.PHONY : Geo/gmshVertex.s + +# target to generate assembly for a file +Geo/gmshVertex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Geo/gmshVertex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Geo/gmshVertex.cpp.s +.PHONY : Geo/gmshVertex.cpp.s + +Graphics/Iso.o: Graphics/Iso.cpp.o +.PHONY : Graphics/Iso.o + +# target to build an object file +Graphics/Iso.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Iso.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Iso.cpp.o +.PHONY : Graphics/Iso.cpp.o + +Graphics/Iso.i: Graphics/Iso.cpp.i +.PHONY : Graphics/Iso.i + +# target to preprocess a source file +Graphics/Iso.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Iso.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Iso.cpp.i +.PHONY : Graphics/Iso.cpp.i + +Graphics/Iso.s: Graphics/Iso.cpp.s +.PHONY : Graphics/Iso.s + +# target to generate assembly for a file +Graphics/Iso.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Iso.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Iso.cpp.s +.PHONY : Graphics/Iso.cpp.s + +Graphics/ReadImg.o: Graphics/ReadImg.cpp.o +.PHONY : Graphics/ReadImg.o + +# target to build an object file +Graphics/ReadImg.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/ReadImg.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/ReadImg.cpp.o +.PHONY : Graphics/ReadImg.cpp.o + +Graphics/ReadImg.i: Graphics/ReadImg.cpp.i +.PHONY : Graphics/ReadImg.i + +# target to preprocess a source file +Graphics/ReadImg.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/ReadImg.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/ReadImg.cpp.i +.PHONY : Graphics/ReadImg.cpp.i + +Graphics/ReadImg.s: Graphics/ReadImg.cpp.s +.PHONY : Graphics/ReadImg.s + +# target to generate assembly for a file +Graphics/ReadImg.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/ReadImg.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/ReadImg.cpp.s +.PHONY : Graphics/ReadImg.cpp.s + +Graphics/Trackball.o: Graphics/Trackball.cpp.o +.PHONY : Graphics/Trackball.o + +# target to build an object file +Graphics/Trackball.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Trackball.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Trackball.cpp.o +.PHONY : Graphics/Trackball.cpp.o + +Graphics/Trackball.i: Graphics/Trackball.cpp.i +.PHONY : Graphics/Trackball.i + +# target to preprocess a source file +Graphics/Trackball.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Trackball.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Trackball.cpp.i +.PHONY : Graphics/Trackball.cpp.i + +Graphics/Trackball.s: Graphics/Trackball.cpp.s +.PHONY : Graphics/Trackball.s + +# target to generate assembly for a file +Graphics/Trackball.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/Trackball.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/Trackball.cpp.s +.PHONY : Graphics/Trackball.cpp.s + +Graphics/drawAxes.o: Graphics/drawAxes.cpp.o +.PHONY : Graphics/drawAxes.o + +# target to build an object file +Graphics/drawAxes.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawAxes.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawAxes.cpp.o +.PHONY : Graphics/drawAxes.cpp.o + +Graphics/drawAxes.i: Graphics/drawAxes.cpp.i +.PHONY : Graphics/drawAxes.i + +# target to preprocess a source file +Graphics/drawAxes.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawAxes.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawAxes.cpp.i +.PHONY : Graphics/drawAxes.cpp.i + +Graphics/drawAxes.s: Graphics/drawAxes.cpp.s +.PHONY : Graphics/drawAxes.s + +# target to generate assembly for a file +Graphics/drawAxes.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawAxes.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawAxes.cpp.s +.PHONY : Graphics/drawAxes.cpp.s + +Graphics/drawContext.o: Graphics/drawContext.cpp.o +.PHONY : Graphics/drawContext.o + +# target to build an object file +Graphics/drawContext.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawContext.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawContext.cpp.o +.PHONY : Graphics/drawContext.cpp.o + +Graphics/drawContext.i: Graphics/drawContext.cpp.i +.PHONY : Graphics/drawContext.i + +# target to preprocess a source file +Graphics/drawContext.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawContext.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawContext.cpp.i +.PHONY : Graphics/drawContext.cpp.i + +Graphics/drawContext.s: Graphics/drawContext.cpp.s +.PHONY : Graphics/drawContext.s + +# target to generate assembly for a file +Graphics/drawContext.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawContext.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawContext.cpp.s +.PHONY : Graphics/drawContext.cpp.s + +Graphics/drawGeom.o: Graphics/drawGeom.cpp.o +.PHONY : Graphics/drawGeom.o + +# target to build an object file +Graphics/drawGeom.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGeom.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGeom.cpp.o +.PHONY : Graphics/drawGeom.cpp.o + +Graphics/drawGeom.i: Graphics/drawGeom.cpp.i +.PHONY : Graphics/drawGeom.i + +# target to preprocess a source file +Graphics/drawGeom.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGeom.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGeom.cpp.i +.PHONY : Graphics/drawGeom.cpp.i + +Graphics/drawGeom.s: Graphics/drawGeom.cpp.s +.PHONY : Graphics/drawGeom.s + +# target to generate assembly for a file +Graphics/drawGeom.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGeom.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGeom.cpp.s +.PHONY : Graphics/drawGeom.cpp.s + +Graphics/drawGlyph.o: Graphics/drawGlyph.cpp.o +.PHONY : Graphics/drawGlyph.o + +# target to build an object file +Graphics/drawGlyph.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGlyph.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGlyph.cpp.o +.PHONY : Graphics/drawGlyph.cpp.o + +Graphics/drawGlyph.i: Graphics/drawGlyph.cpp.i +.PHONY : Graphics/drawGlyph.i + +# target to preprocess a source file +Graphics/drawGlyph.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGlyph.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGlyph.cpp.i +.PHONY : Graphics/drawGlyph.cpp.i + +Graphics/drawGlyph.s: Graphics/drawGlyph.cpp.s +.PHONY : Graphics/drawGlyph.s + +# target to generate assembly for a file +Graphics/drawGlyph.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGlyph.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGlyph.cpp.s +.PHONY : Graphics/drawGlyph.cpp.s + +Graphics/drawGraph2d.o: Graphics/drawGraph2d.cpp.o +.PHONY : Graphics/drawGraph2d.o + +# target to build an object file +Graphics/drawGraph2d.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGraph2d.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGraph2d.cpp.o +.PHONY : Graphics/drawGraph2d.cpp.o + +Graphics/drawGraph2d.i: Graphics/drawGraph2d.cpp.i +.PHONY : Graphics/drawGraph2d.i + +# target to preprocess a source file +Graphics/drawGraph2d.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGraph2d.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGraph2d.cpp.i +.PHONY : Graphics/drawGraph2d.cpp.i + +Graphics/drawGraph2d.s: Graphics/drawGraph2d.cpp.s +.PHONY : Graphics/drawGraph2d.s + +# target to generate assembly for a file +Graphics/drawGraph2d.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawGraph2d.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawGraph2d.cpp.s +.PHONY : Graphics/drawGraph2d.cpp.s + +Graphics/drawMesh.o: Graphics/drawMesh.cpp.o +.PHONY : Graphics/drawMesh.o + +# target to build an object file +Graphics/drawMesh.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawMesh.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawMesh.cpp.o +.PHONY : Graphics/drawMesh.cpp.o + +Graphics/drawMesh.i: Graphics/drawMesh.cpp.i +.PHONY : Graphics/drawMesh.i + +# target to preprocess a source file +Graphics/drawMesh.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawMesh.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawMesh.cpp.i +.PHONY : Graphics/drawMesh.cpp.i + +Graphics/drawMesh.s: Graphics/drawMesh.cpp.s +.PHONY : Graphics/drawMesh.s + +# target to generate assembly for a file +Graphics/drawMesh.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawMesh.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawMesh.cpp.s +.PHONY : Graphics/drawMesh.cpp.s + +Graphics/drawPost.o: Graphics/drawPost.cpp.o +.PHONY : Graphics/drawPost.o + +# target to build an object file +Graphics/drawPost.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawPost.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawPost.cpp.o +.PHONY : Graphics/drawPost.cpp.o + +Graphics/drawPost.i: Graphics/drawPost.cpp.i +.PHONY : Graphics/drawPost.i + +# target to preprocess a source file +Graphics/drawPost.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawPost.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawPost.cpp.i +.PHONY : Graphics/drawPost.cpp.i + +Graphics/drawPost.s: Graphics/drawPost.cpp.s +.PHONY : Graphics/drawPost.s + +# target to generate assembly for a file +Graphics/drawPost.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawPost.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawPost.cpp.s +.PHONY : Graphics/drawPost.cpp.s + +Graphics/drawScales.o: Graphics/drawScales.cpp.o +.PHONY : Graphics/drawScales.o + +# target to build an object file +Graphics/drawScales.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawScales.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawScales.cpp.o +.PHONY : Graphics/drawScales.cpp.o + +Graphics/drawScales.i: Graphics/drawScales.cpp.i +.PHONY : Graphics/drawScales.i + +# target to preprocess a source file +Graphics/drawScales.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawScales.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawScales.cpp.i +.PHONY : Graphics/drawScales.cpp.i + +Graphics/drawScales.s: Graphics/drawScales.cpp.s +.PHONY : Graphics/drawScales.s + +# target to generate assembly for a file +Graphics/drawScales.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/drawScales.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/drawScales.cpp.s +.PHONY : Graphics/drawScales.cpp.s + +Graphics/gl2gif.o: Graphics/gl2gif.cpp.o +.PHONY : Graphics/gl2gif.o + +# target to build an object file +Graphics/gl2gif.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2gif.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2gif.cpp.o +.PHONY : Graphics/gl2gif.cpp.o + +Graphics/gl2gif.i: Graphics/gl2gif.cpp.i +.PHONY : Graphics/gl2gif.i + +# target to preprocess a source file +Graphics/gl2gif.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2gif.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2gif.cpp.i +.PHONY : Graphics/gl2gif.cpp.i + +Graphics/gl2gif.s: Graphics/gl2gif.cpp.s +.PHONY : Graphics/gl2gif.s + +# target to generate assembly for a file +Graphics/gl2gif.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2gif.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2gif.cpp.s +.PHONY : Graphics/gl2gif.cpp.s + +Graphics/gl2jpeg.o: Graphics/gl2jpeg.cpp.o +.PHONY : Graphics/gl2jpeg.o + +# target to build an object file +Graphics/gl2jpeg.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2jpeg.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2jpeg.cpp.o +.PHONY : Graphics/gl2jpeg.cpp.o + +Graphics/gl2jpeg.i: Graphics/gl2jpeg.cpp.i +.PHONY : Graphics/gl2jpeg.i + +# target to preprocess a source file +Graphics/gl2jpeg.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2jpeg.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2jpeg.cpp.i +.PHONY : Graphics/gl2jpeg.cpp.i + +Graphics/gl2jpeg.s: Graphics/gl2jpeg.cpp.s +.PHONY : Graphics/gl2jpeg.s + +# target to generate assembly for a file +Graphics/gl2jpeg.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2jpeg.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2jpeg.cpp.s +.PHONY : Graphics/gl2jpeg.cpp.s + +Graphics/gl2png.o: Graphics/gl2png.cpp.o +.PHONY : Graphics/gl2png.o + +# target to build an object file +Graphics/gl2png.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2png.cpp.o +.PHONY : Graphics/gl2png.cpp.o + +Graphics/gl2png.i: Graphics/gl2png.cpp.i +.PHONY : Graphics/gl2png.i + +# target to preprocess a source file +Graphics/gl2png.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2png.cpp.i +.PHONY : Graphics/gl2png.cpp.i + +Graphics/gl2png.s: Graphics/gl2png.cpp.s +.PHONY : Graphics/gl2png.s + +# target to generate assembly for a file +Graphics/gl2png.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2png.cpp.s +.PHONY : Graphics/gl2png.cpp.s + +Graphics/gl2ppm.o: Graphics/gl2ppm.cpp.o +.PHONY : Graphics/gl2ppm.o + +# target to build an object file +Graphics/gl2ppm.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ppm.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ppm.cpp.o +.PHONY : Graphics/gl2ppm.cpp.o + +Graphics/gl2ppm.i: Graphics/gl2ppm.cpp.i +.PHONY : Graphics/gl2ppm.i + +# target to preprocess a source file +Graphics/gl2ppm.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ppm.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ppm.cpp.i +.PHONY : Graphics/gl2ppm.cpp.i + +Graphics/gl2ppm.s: Graphics/gl2ppm.cpp.s +.PHONY : Graphics/gl2ppm.s + +# target to generate assembly for a file +Graphics/gl2ppm.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ppm.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ppm.cpp.s +.PHONY : Graphics/gl2ppm.cpp.s + +Graphics/gl2ps.o: Graphics/gl2ps.cpp.o +.PHONY : Graphics/gl2ps.o + +# target to build an object file +Graphics/gl2ps.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ps.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ps.cpp.o +.PHONY : Graphics/gl2ps.cpp.o + +Graphics/gl2ps.i: Graphics/gl2ps.cpp.i +.PHONY : Graphics/gl2ps.i + +# target to preprocess a source file +Graphics/gl2ps.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ps.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ps.cpp.i +.PHONY : Graphics/gl2ps.cpp.i + +Graphics/gl2ps.s: Graphics/gl2ps.cpp.s +.PHONY : Graphics/gl2ps.s + +# target to generate assembly for a file +Graphics/gl2ps.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2ps.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2ps.cpp.s +.PHONY : Graphics/gl2ps.cpp.s + +Graphics/gl2yuv.o: Graphics/gl2yuv.cpp.o +.PHONY : Graphics/gl2yuv.o + +# target to build an object file +Graphics/gl2yuv.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2yuv.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2yuv.cpp.o +.PHONY : Graphics/gl2yuv.cpp.o + +Graphics/gl2yuv.i: Graphics/gl2yuv.cpp.i +.PHONY : Graphics/gl2yuv.i + +# target to preprocess a source file +Graphics/gl2yuv.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2yuv.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2yuv.cpp.i +.PHONY : Graphics/gl2yuv.cpp.i + +Graphics/gl2yuv.s: Graphics/gl2yuv.cpp.s +.PHONY : Graphics/gl2yuv.s + +# target to generate assembly for a file +Graphics/gl2yuv.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Graphics/gl2yuv.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Graphics/gl2yuv.cpp.s +.PHONY : Graphics/gl2yuv.cpp.s + +Mesh/BDS.o: Mesh/BDS.cpp.o +.PHONY : Mesh/BDS.o + +# target to build an object file +Mesh/BDS.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BDS.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BDS.cpp.o +.PHONY : Mesh/BDS.cpp.o + +Mesh/BDS.i: Mesh/BDS.cpp.i +.PHONY : Mesh/BDS.i + +# target to preprocess a source file +Mesh/BDS.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BDS.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BDS.cpp.i +.PHONY : Mesh/BDS.cpp.i + +Mesh/BDS.s: Mesh/BDS.cpp.s +.PHONY : Mesh/BDS.s + +# target to generate assembly for a file +Mesh/BDS.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BDS.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BDS.cpp.s +.PHONY : Mesh/BDS.cpp.s + +Mesh/BackgroundMesh.o: Mesh/BackgroundMesh.cpp.o +.PHONY : Mesh/BackgroundMesh.o + +# target to build an object file +Mesh/BackgroundMesh.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BackgroundMesh.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BackgroundMesh.cpp.o +.PHONY : Mesh/BackgroundMesh.cpp.o + +Mesh/BackgroundMesh.i: Mesh/BackgroundMesh.cpp.i +.PHONY : Mesh/BackgroundMesh.i + +# target to preprocess a source file +Mesh/BackgroundMesh.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BackgroundMesh.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BackgroundMesh.cpp.i +.PHONY : Mesh/BackgroundMesh.cpp.i + +Mesh/BackgroundMesh.s: Mesh/BackgroundMesh.cpp.s +.PHONY : Mesh/BackgroundMesh.s + +# target to generate assembly for a file +Mesh/BackgroundMesh.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BackgroundMesh.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BackgroundMesh.cpp.s +.PHONY : Mesh/BackgroundMesh.cpp.s + +Mesh/BoundaryLayers.o: Mesh/BoundaryLayers.cpp.o +.PHONY : Mesh/BoundaryLayers.o + +# target to build an object file +Mesh/BoundaryLayers.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BoundaryLayers.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BoundaryLayers.cpp.o +.PHONY : Mesh/BoundaryLayers.cpp.o + +Mesh/BoundaryLayers.i: Mesh/BoundaryLayers.cpp.i +.PHONY : Mesh/BoundaryLayers.i + +# target to preprocess a source file +Mesh/BoundaryLayers.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BoundaryLayers.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BoundaryLayers.cpp.i +.PHONY : Mesh/BoundaryLayers.cpp.i + +Mesh/BoundaryLayers.s: Mesh/BoundaryLayers.cpp.s +.PHONY : Mesh/BoundaryLayers.s + +# target to generate assembly for a file +Mesh/BoundaryLayers.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/BoundaryLayers.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/BoundaryLayers.cpp.s +.PHONY : Mesh/BoundaryLayers.cpp.s + +Mesh/DivideAndConquer.o: Mesh/DivideAndConquer.cpp.o +.PHONY : Mesh/DivideAndConquer.o + +# target to build an object file +Mesh/DivideAndConquer.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/DivideAndConquer.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/DivideAndConquer.cpp.o +.PHONY : Mesh/DivideAndConquer.cpp.o + +Mesh/DivideAndConquer.i: Mesh/DivideAndConquer.cpp.i +.PHONY : Mesh/DivideAndConquer.i + +# target to preprocess a source file +Mesh/DivideAndConquer.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/DivideAndConquer.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/DivideAndConquer.cpp.i +.PHONY : Mesh/DivideAndConquer.cpp.i + +Mesh/DivideAndConquer.s: Mesh/DivideAndConquer.cpp.s +.PHONY : Mesh/DivideAndConquer.s + +# target to generate assembly for a file +Mesh/DivideAndConquer.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/DivideAndConquer.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/DivideAndConquer.cpp.s +.PHONY : Mesh/DivideAndConquer.cpp.s + +Mesh/Field.o: Mesh/Field.cpp.o +.PHONY : Mesh/Field.o + +# target to build an object file +Mesh/Field.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Field.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Field.cpp.o +.PHONY : Mesh/Field.cpp.o + +Mesh/Field.i: Mesh/Field.cpp.i +.PHONY : Mesh/Field.i + +# target to preprocess a source file +Mesh/Field.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Field.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Field.cpp.i +.PHONY : Mesh/Field.cpp.i + +Mesh/Field.s: Mesh/Field.cpp.s +.PHONY : Mesh/Field.s + +# target to generate assembly for a file +Mesh/Field.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Field.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Field.cpp.s +.PHONY : Mesh/Field.cpp.s + +Mesh/Generator.o: Mesh/Generator.cpp.o +.PHONY : Mesh/Generator.o + +# target to build an object file +Mesh/Generator.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Generator.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Generator.cpp.o +.PHONY : Mesh/Generator.cpp.o + +Mesh/Generator.i: Mesh/Generator.cpp.i +.PHONY : Mesh/Generator.i + +# target to preprocess a source file +Mesh/Generator.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Generator.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Generator.cpp.i +.PHONY : Mesh/Generator.cpp.i + +Mesh/Generator.s: Mesh/Generator.cpp.s +.PHONY : Mesh/Generator.s + +# target to generate assembly for a file +Mesh/Generator.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/Generator.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/Generator.cpp.s +.PHONY : Mesh/Generator.cpp.s + +Mesh/HighOrder.o: Mesh/HighOrder.cpp.o +.PHONY : Mesh/HighOrder.o + +# target to build an object file +Mesh/HighOrder.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/HighOrder.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/HighOrder.cpp.o +.PHONY : Mesh/HighOrder.cpp.o + +Mesh/HighOrder.i: Mesh/HighOrder.cpp.i +.PHONY : Mesh/HighOrder.i + +# target to preprocess a source file +Mesh/HighOrder.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/HighOrder.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/HighOrder.cpp.i +.PHONY : Mesh/HighOrder.cpp.i + +Mesh/HighOrder.s: Mesh/HighOrder.cpp.s +.PHONY : Mesh/HighOrder.s + +# target to generate assembly for a file +Mesh/HighOrder.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/HighOrder.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/HighOrder.cpp.s +.PHONY : Mesh/HighOrder.cpp.s + +Mesh/gmshSmoothHighOrder.o: Mesh/gmshSmoothHighOrder.cpp.o +.PHONY : Mesh/gmshSmoothHighOrder.o + +# target to build an object file +Mesh/gmshSmoothHighOrder.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/gmshSmoothHighOrder.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/gmshSmoothHighOrder.cpp.o +.PHONY : Mesh/gmshSmoothHighOrder.cpp.o + +Mesh/gmshSmoothHighOrder.i: Mesh/gmshSmoothHighOrder.cpp.i +.PHONY : Mesh/gmshSmoothHighOrder.i + +# target to preprocess a source file +Mesh/gmshSmoothHighOrder.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/gmshSmoothHighOrder.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/gmshSmoothHighOrder.cpp.i +.PHONY : Mesh/gmshSmoothHighOrder.cpp.i + +Mesh/gmshSmoothHighOrder.s: Mesh/gmshSmoothHighOrder.cpp.s +.PHONY : Mesh/gmshSmoothHighOrder.s + +# target to generate assembly for a file +Mesh/gmshSmoothHighOrder.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/gmshSmoothHighOrder.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/gmshSmoothHighOrder.cpp.s +.PHONY : Mesh/gmshSmoothHighOrder.cpp.s + +Mesh/meshGEdge.o: Mesh/meshGEdge.cpp.o +.PHONY : Mesh/meshGEdge.o + +# target to build an object file +Mesh/meshGEdge.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdge.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdge.cpp.o +.PHONY : Mesh/meshGEdge.cpp.o + +Mesh/meshGEdge.i: Mesh/meshGEdge.cpp.i +.PHONY : Mesh/meshGEdge.i + +# target to preprocess a source file +Mesh/meshGEdge.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdge.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdge.cpp.i +.PHONY : Mesh/meshGEdge.cpp.i + +Mesh/meshGEdge.s: Mesh/meshGEdge.cpp.s +.PHONY : Mesh/meshGEdge.s + +# target to generate assembly for a file +Mesh/meshGEdge.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdge.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdge.cpp.s +.PHONY : Mesh/meshGEdge.cpp.s + +Mesh/meshGEdgeExtruded.o: Mesh/meshGEdgeExtruded.cpp.o +.PHONY : Mesh/meshGEdgeExtruded.o + +# target to build an object file +Mesh/meshGEdgeExtruded.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdgeExtruded.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdgeExtruded.cpp.o +.PHONY : Mesh/meshGEdgeExtruded.cpp.o + +Mesh/meshGEdgeExtruded.i: Mesh/meshGEdgeExtruded.cpp.i +.PHONY : Mesh/meshGEdgeExtruded.i + +# target to preprocess a source file +Mesh/meshGEdgeExtruded.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdgeExtruded.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdgeExtruded.cpp.i +.PHONY : Mesh/meshGEdgeExtruded.cpp.i + +Mesh/meshGEdgeExtruded.s: Mesh/meshGEdgeExtruded.cpp.s +.PHONY : Mesh/meshGEdgeExtruded.s + +# target to generate assembly for a file +Mesh/meshGEdgeExtruded.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGEdgeExtruded.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGEdgeExtruded.cpp.s +.PHONY : Mesh/meshGEdgeExtruded.cpp.s + +Mesh/meshGFace.o: Mesh/meshGFace.cpp.o +.PHONY : Mesh/meshGFace.o + +# target to build an object file +Mesh/meshGFace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFace.cpp.o +.PHONY : Mesh/meshGFace.cpp.o + +Mesh/meshGFace.i: Mesh/meshGFace.cpp.i +.PHONY : Mesh/meshGFace.i + +# target to preprocess a source file +Mesh/meshGFace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFace.cpp.i +.PHONY : Mesh/meshGFace.cpp.i + +Mesh/meshGFace.s: Mesh/meshGFace.cpp.s +.PHONY : Mesh/meshGFace.s + +# target to generate assembly for a file +Mesh/meshGFace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFace.cpp.s +.PHONY : Mesh/meshGFace.cpp.s + +Mesh/meshGFaceBDS.o: Mesh/meshGFaceBDS.cpp.o +.PHONY : Mesh/meshGFaceBDS.o + +# target to build an object file +Mesh/meshGFaceBDS.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceBDS.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceBDS.cpp.o +.PHONY : Mesh/meshGFaceBDS.cpp.o + +Mesh/meshGFaceBDS.i: Mesh/meshGFaceBDS.cpp.i +.PHONY : Mesh/meshGFaceBDS.i + +# target to preprocess a source file +Mesh/meshGFaceBDS.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceBDS.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceBDS.cpp.i +.PHONY : Mesh/meshGFaceBDS.cpp.i + +Mesh/meshGFaceBDS.s: Mesh/meshGFaceBDS.cpp.s +.PHONY : Mesh/meshGFaceBDS.s + +# target to generate assembly for a file +Mesh/meshGFaceBDS.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceBDS.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceBDS.cpp.s +.PHONY : Mesh/meshGFaceBDS.cpp.s + +Mesh/meshGFaceDelaunayInsertion.o: Mesh/meshGFaceDelaunayInsertion.cpp.o +.PHONY : Mesh/meshGFaceDelaunayInsertion.o + +# target to build an object file +Mesh/meshGFaceDelaunayInsertion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceDelaunayInsertion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceDelaunayInsertion.cpp.o +.PHONY : Mesh/meshGFaceDelaunayInsertion.cpp.o + +Mesh/meshGFaceDelaunayInsertion.i: Mesh/meshGFaceDelaunayInsertion.cpp.i +.PHONY : Mesh/meshGFaceDelaunayInsertion.i + +# target to preprocess a source file +Mesh/meshGFaceDelaunayInsertion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceDelaunayInsertion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceDelaunayInsertion.cpp.i +.PHONY : Mesh/meshGFaceDelaunayInsertion.cpp.i + +Mesh/meshGFaceDelaunayInsertion.s: Mesh/meshGFaceDelaunayInsertion.cpp.s +.PHONY : Mesh/meshGFaceDelaunayInsertion.s + +# target to generate assembly for a file +Mesh/meshGFaceDelaunayInsertion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceDelaunayInsertion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceDelaunayInsertion.cpp.s +.PHONY : Mesh/meshGFaceDelaunayInsertion.cpp.s + +Mesh/meshGFaceExtruded.o: Mesh/meshGFaceExtruded.cpp.o +.PHONY : Mesh/meshGFaceExtruded.o + +# target to build an object file +Mesh/meshGFaceExtruded.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceExtruded.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceExtruded.cpp.o +.PHONY : Mesh/meshGFaceExtruded.cpp.o + +Mesh/meshGFaceExtruded.i: Mesh/meshGFaceExtruded.cpp.i +.PHONY : Mesh/meshGFaceExtruded.i + +# target to preprocess a source file +Mesh/meshGFaceExtruded.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceExtruded.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceExtruded.cpp.i +.PHONY : Mesh/meshGFaceExtruded.cpp.i + +Mesh/meshGFaceExtruded.s: Mesh/meshGFaceExtruded.cpp.s +.PHONY : Mesh/meshGFaceExtruded.s + +# target to generate assembly for a file +Mesh/meshGFaceExtruded.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceExtruded.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceExtruded.cpp.s +.PHONY : Mesh/meshGFaceExtruded.cpp.s + +Mesh/meshGFaceOptimize.o: Mesh/meshGFaceOptimize.cpp.o +.PHONY : Mesh/meshGFaceOptimize.o + +# target to build an object file +Mesh/meshGFaceOptimize.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceOptimize.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceOptimize.cpp.o +.PHONY : Mesh/meshGFaceOptimize.cpp.o + +Mesh/meshGFaceOptimize.i: Mesh/meshGFaceOptimize.cpp.i +.PHONY : Mesh/meshGFaceOptimize.i + +# target to preprocess a source file +Mesh/meshGFaceOptimize.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceOptimize.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceOptimize.cpp.i +.PHONY : Mesh/meshGFaceOptimize.cpp.i + +Mesh/meshGFaceOptimize.s: Mesh/meshGFaceOptimize.cpp.s +.PHONY : Mesh/meshGFaceOptimize.s + +# target to generate assembly for a file +Mesh/meshGFaceOptimize.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceOptimize.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceOptimize.cpp.s +.PHONY : Mesh/meshGFaceOptimize.cpp.s + +Mesh/meshGFaceQuadrilateralize.o: Mesh/meshGFaceQuadrilateralize.cpp.o +.PHONY : Mesh/meshGFaceQuadrilateralize.o + +# target to build an object file +Mesh/meshGFaceQuadrilateralize.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceQuadrilateralize.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceQuadrilateralize.cpp.o +.PHONY : Mesh/meshGFaceQuadrilateralize.cpp.o + +Mesh/meshGFaceQuadrilateralize.i: Mesh/meshGFaceQuadrilateralize.cpp.i +.PHONY : Mesh/meshGFaceQuadrilateralize.i + +# target to preprocess a source file +Mesh/meshGFaceQuadrilateralize.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceQuadrilateralize.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceQuadrilateralize.cpp.i +.PHONY : Mesh/meshGFaceQuadrilateralize.cpp.i + +Mesh/meshGFaceQuadrilateralize.s: Mesh/meshGFaceQuadrilateralize.cpp.s +.PHONY : Mesh/meshGFaceQuadrilateralize.s + +# target to generate assembly for a file +Mesh/meshGFaceQuadrilateralize.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceQuadrilateralize.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceQuadrilateralize.cpp.s +.PHONY : Mesh/meshGFaceQuadrilateralize.cpp.s + +Mesh/meshGFaceTransfinite.o: Mesh/meshGFaceTransfinite.cpp.o +.PHONY : Mesh/meshGFaceTransfinite.o + +# target to build an object file +Mesh/meshGFaceTransfinite.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceTransfinite.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceTransfinite.cpp.o +.PHONY : Mesh/meshGFaceTransfinite.cpp.o + +Mesh/meshGFaceTransfinite.i: Mesh/meshGFaceTransfinite.cpp.i +.PHONY : Mesh/meshGFaceTransfinite.i + +# target to preprocess a source file +Mesh/meshGFaceTransfinite.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceTransfinite.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceTransfinite.cpp.i +.PHONY : Mesh/meshGFaceTransfinite.cpp.i + +Mesh/meshGFaceTransfinite.s: Mesh/meshGFaceTransfinite.cpp.s +.PHONY : Mesh/meshGFaceTransfinite.s + +# target to generate assembly for a file +Mesh/meshGFaceTransfinite.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGFaceTransfinite.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGFaceTransfinite.cpp.s +.PHONY : Mesh/meshGFaceTransfinite.cpp.s + +Mesh/meshGRegion.o: Mesh/meshGRegion.cpp.o +.PHONY : Mesh/meshGRegion.o + +# target to build an object file +Mesh/meshGRegion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegion.cpp.o +.PHONY : Mesh/meshGRegion.cpp.o + +Mesh/meshGRegion.i: Mesh/meshGRegion.cpp.i +.PHONY : Mesh/meshGRegion.i + +# target to preprocess a source file +Mesh/meshGRegion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegion.cpp.i +.PHONY : Mesh/meshGRegion.cpp.i + +Mesh/meshGRegion.s: Mesh/meshGRegion.cpp.s +.PHONY : Mesh/meshGRegion.s + +# target to generate assembly for a file +Mesh/meshGRegion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegion.cpp.s +.PHONY : Mesh/meshGRegion.cpp.s + +Mesh/meshGRegionCarveHole.o: Mesh/meshGRegionCarveHole.cpp.o +.PHONY : Mesh/meshGRegionCarveHole.o + +# target to build an object file +Mesh/meshGRegionCarveHole.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionCarveHole.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionCarveHole.cpp.o +.PHONY : Mesh/meshGRegionCarveHole.cpp.o + +Mesh/meshGRegionCarveHole.i: Mesh/meshGRegionCarveHole.cpp.i +.PHONY : Mesh/meshGRegionCarveHole.i + +# target to preprocess a source file +Mesh/meshGRegionCarveHole.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionCarveHole.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionCarveHole.cpp.i +.PHONY : Mesh/meshGRegionCarveHole.cpp.i + +Mesh/meshGRegionCarveHole.s: Mesh/meshGRegionCarveHole.cpp.s +.PHONY : Mesh/meshGRegionCarveHole.s + +# target to generate assembly for a file +Mesh/meshGRegionCarveHole.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionCarveHole.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionCarveHole.cpp.s +.PHONY : Mesh/meshGRegionCarveHole.cpp.s + +Mesh/meshGRegionDelaunayInsertion.o: Mesh/meshGRegionDelaunayInsertion.cpp.o +.PHONY : Mesh/meshGRegionDelaunayInsertion.o + +# target to build an object file +Mesh/meshGRegionDelaunayInsertion.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionDelaunayInsertion.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionDelaunayInsertion.cpp.o +.PHONY : Mesh/meshGRegionDelaunayInsertion.cpp.o + +Mesh/meshGRegionDelaunayInsertion.i: Mesh/meshGRegionDelaunayInsertion.cpp.i +.PHONY : Mesh/meshGRegionDelaunayInsertion.i + +# target to preprocess a source file +Mesh/meshGRegionDelaunayInsertion.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionDelaunayInsertion.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionDelaunayInsertion.cpp.i +.PHONY : Mesh/meshGRegionDelaunayInsertion.cpp.i + +Mesh/meshGRegionDelaunayInsertion.s: Mesh/meshGRegionDelaunayInsertion.cpp.s +.PHONY : Mesh/meshGRegionDelaunayInsertion.s + +# target to generate assembly for a file +Mesh/meshGRegionDelaunayInsertion.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionDelaunayInsertion.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionDelaunayInsertion.cpp.s +.PHONY : Mesh/meshGRegionDelaunayInsertion.cpp.s + +Mesh/meshGRegionExtruded.o: Mesh/meshGRegionExtruded.cpp.o +.PHONY : Mesh/meshGRegionExtruded.o + +# target to build an object file +Mesh/meshGRegionExtruded.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionExtruded.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionExtruded.cpp.o +.PHONY : Mesh/meshGRegionExtruded.cpp.o + +Mesh/meshGRegionExtruded.i: Mesh/meshGRegionExtruded.cpp.i +.PHONY : Mesh/meshGRegionExtruded.i + +# target to preprocess a source file +Mesh/meshGRegionExtruded.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionExtruded.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionExtruded.cpp.i +.PHONY : Mesh/meshGRegionExtruded.cpp.i + +Mesh/meshGRegionExtruded.s: Mesh/meshGRegionExtruded.cpp.s +.PHONY : Mesh/meshGRegionExtruded.s + +# target to generate assembly for a file +Mesh/meshGRegionExtruded.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionExtruded.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionExtruded.cpp.s +.PHONY : Mesh/meshGRegionExtruded.cpp.s + +Mesh/meshGRegionLocalMeshMod.o: Mesh/meshGRegionLocalMeshMod.cpp.o +.PHONY : Mesh/meshGRegionLocalMeshMod.o + +# target to build an object file +Mesh/meshGRegionLocalMeshMod.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionLocalMeshMod.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionLocalMeshMod.cpp.o +.PHONY : Mesh/meshGRegionLocalMeshMod.cpp.o + +Mesh/meshGRegionLocalMeshMod.i: Mesh/meshGRegionLocalMeshMod.cpp.i +.PHONY : Mesh/meshGRegionLocalMeshMod.i + +# target to preprocess a source file +Mesh/meshGRegionLocalMeshMod.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionLocalMeshMod.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionLocalMeshMod.cpp.i +.PHONY : Mesh/meshGRegionLocalMeshMod.cpp.i + +Mesh/meshGRegionLocalMeshMod.s: Mesh/meshGRegionLocalMeshMod.cpp.s +.PHONY : Mesh/meshGRegionLocalMeshMod.s + +# target to generate assembly for a file +Mesh/meshGRegionLocalMeshMod.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionLocalMeshMod.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionLocalMeshMod.cpp.s +.PHONY : Mesh/meshGRegionLocalMeshMod.cpp.s + +Mesh/meshGRegionTransfinite.o: Mesh/meshGRegionTransfinite.cpp.o +.PHONY : Mesh/meshGRegionTransfinite.o + +# target to build an object file +Mesh/meshGRegionTransfinite.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionTransfinite.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionTransfinite.cpp.o +.PHONY : Mesh/meshGRegionTransfinite.cpp.o + +Mesh/meshGRegionTransfinite.i: Mesh/meshGRegionTransfinite.cpp.i +.PHONY : Mesh/meshGRegionTransfinite.i + +# target to preprocess a source file +Mesh/meshGRegionTransfinite.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionTransfinite.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionTransfinite.cpp.i +.PHONY : Mesh/meshGRegionTransfinite.cpp.i + +Mesh/meshGRegionTransfinite.s: Mesh/meshGRegionTransfinite.cpp.s +.PHONY : Mesh/meshGRegionTransfinite.s + +# target to generate assembly for a file +Mesh/meshGRegionTransfinite.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshGRegionTransfinite.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshGRegionTransfinite.cpp.s +.PHONY : Mesh/meshGRegionTransfinite.cpp.s + +Mesh/meshPartition.o: Mesh/meshPartition.cpp.o +.PHONY : Mesh/meshPartition.o + +# target to build an object file +Mesh/meshPartition.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshPartition.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshPartition.cpp.o +.PHONY : Mesh/meshPartition.cpp.o + +Mesh/meshPartition.i: Mesh/meshPartition.cpp.i +.PHONY : Mesh/meshPartition.i + +# target to preprocess a source file +Mesh/meshPartition.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshPartition.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshPartition.cpp.i +.PHONY : Mesh/meshPartition.cpp.i + +Mesh/meshPartition.s: Mesh/meshPartition.cpp.s +.PHONY : Mesh/meshPartition.s + +# target to generate assembly for a file +Mesh/meshPartition.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshPartition.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshPartition.cpp.s +.PHONY : Mesh/meshPartition.cpp.s + +Mesh/meshRefine.o: Mesh/meshRefine.cpp.o +.PHONY : Mesh/meshRefine.o + +# target to build an object file +Mesh/meshRefine.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshRefine.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshRefine.cpp.o +.PHONY : Mesh/meshRefine.cpp.o + +Mesh/meshRefine.i: Mesh/meshRefine.cpp.i +.PHONY : Mesh/meshRefine.i + +# target to preprocess a source file +Mesh/meshRefine.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshRefine.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshRefine.cpp.i +.PHONY : Mesh/meshRefine.cpp.i + +Mesh/meshRefine.s: Mesh/meshRefine.cpp.s +.PHONY : Mesh/meshRefine.s + +# target to generate assembly for a file +Mesh/meshRefine.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/meshRefine.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/meshRefine.cpp.s +.PHONY : Mesh/meshRefine.cpp.s + +Mesh/qualityMeasures.o: Mesh/qualityMeasures.cpp.o +.PHONY : Mesh/qualityMeasures.o + +# target to build an object file +Mesh/qualityMeasures.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/qualityMeasures.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/qualityMeasures.cpp.o +.PHONY : Mesh/qualityMeasures.cpp.o + +Mesh/qualityMeasures.i: Mesh/qualityMeasures.cpp.i +.PHONY : Mesh/qualityMeasures.i + +# target to preprocess a source file +Mesh/qualityMeasures.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/qualityMeasures.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/qualityMeasures.cpp.i +.PHONY : Mesh/qualityMeasures.cpp.i + +Mesh/qualityMeasures.s: Mesh/qualityMeasures.cpp.s +.PHONY : Mesh/qualityMeasures.s + +# target to generate assembly for a file +Mesh/qualityMeasures.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Mesh/qualityMeasures.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Mesh/qualityMeasures.cpp.s +.PHONY : Mesh/qualityMeasures.cpp.s + +Numeric/EigSolve.o: Numeric/EigSolve.cpp.o +.PHONY : Numeric/EigSolve.o + +# target to build an object file +Numeric/EigSolve.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/EigSolve.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/EigSolve.cpp.o +.PHONY : Numeric/EigSolve.cpp.o + +Numeric/EigSolve.i: Numeric/EigSolve.cpp.i +.PHONY : Numeric/EigSolve.i + +# target to preprocess a source file +Numeric/EigSolve.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/EigSolve.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/EigSolve.cpp.i +.PHONY : Numeric/EigSolve.cpp.i + +Numeric/EigSolve.s: Numeric/EigSolve.cpp.s +.PHONY : Numeric/EigSolve.s + +# target to generate assembly for a file +Numeric/EigSolve.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/EigSolve.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/EigSolve.cpp.s +.PHONY : Numeric/EigSolve.cpp.s + +Numeric/FunctionSpace.o: Numeric/FunctionSpace.cpp.o +.PHONY : Numeric/FunctionSpace.o + +# target to build an object file +Numeric/FunctionSpace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/FunctionSpace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/FunctionSpace.cpp.o +.PHONY : Numeric/FunctionSpace.cpp.o + +Numeric/FunctionSpace.i: Numeric/FunctionSpace.cpp.i +.PHONY : Numeric/FunctionSpace.i + +# target to preprocess a source file +Numeric/FunctionSpace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/FunctionSpace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/FunctionSpace.cpp.i +.PHONY : Numeric/FunctionSpace.cpp.i + +Numeric/FunctionSpace.s: Numeric/FunctionSpace.cpp.s +.PHONY : Numeric/FunctionSpace.s + +# target to generate assembly for a file +Numeric/FunctionSpace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/FunctionSpace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/FunctionSpace.cpp.s +.PHONY : Numeric/FunctionSpace.cpp.s + +Numeric/GaussLegendreSimplex.o: Numeric/GaussLegendreSimplex.cpp.o +.PHONY : Numeric/GaussLegendreSimplex.o + +# target to build an object file +Numeric/GaussLegendreSimplex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussLegendreSimplex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussLegendreSimplex.cpp.o +.PHONY : Numeric/GaussLegendreSimplex.cpp.o + +Numeric/GaussLegendreSimplex.i: Numeric/GaussLegendreSimplex.cpp.i +.PHONY : Numeric/GaussLegendreSimplex.i + +# target to preprocess a source file +Numeric/GaussLegendreSimplex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussLegendreSimplex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussLegendreSimplex.cpp.i +.PHONY : Numeric/GaussLegendreSimplex.cpp.i + +Numeric/GaussLegendreSimplex.s: Numeric/GaussLegendreSimplex.cpp.s +.PHONY : Numeric/GaussLegendreSimplex.s + +# target to generate assembly for a file +Numeric/GaussLegendreSimplex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussLegendreSimplex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussLegendreSimplex.cpp.s +.PHONY : Numeric/GaussLegendreSimplex.cpp.s + +Numeric/GaussQuadratureHex.o: Numeric/GaussQuadratureHex.cpp.o +.PHONY : Numeric/GaussQuadratureHex.o + +# target to build an object file +Numeric/GaussQuadratureHex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureHex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureHex.cpp.o +.PHONY : Numeric/GaussQuadratureHex.cpp.o + +Numeric/GaussQuadratureHex.i: Numeric/GaussQuadratureHex.cpp.i +.PHONY : Numeric/GaussQuadratureHex.i + +# target to preprocess a source file +Numeric/GaussQuadratureHex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureHex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureHex.cpp.i +.PHONY : Numeric/GaussQuadratureHex.cpp.i + +Numeric/GaussQuadratureHex.s: Numeric/GaussQuadratureHex.cpp.s +.PHONY : Numeric/GaussQuadratureHex.s + +# target to generate assembly for a file +Numeric/GaussQuadratureHex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureHex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureHex.cpp.s +.PHONY : Numeric/GaussQuadratureHex.cpp.s + +Numeric/GaussQuadratureLin.o: Numeric/GaussQuadratureLin.cpp.o +.PHONY : Numeric/GaussQuadratureLin.o + +# target to build an object file +Numeric/GaussQuadratureLin.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureLin.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureLin.cpp.o +.PHONY : Numeric/GaussQuadratureLin.cpp.o + +Numeric/GaussQuadratureLin.i: Numeric/GaussQuadratureLin.cpp.i +.PHONY : Numeric/GaussQuadratureLin.i + +# target to preprocess a source file +Numeric/GaussQuadratureLin.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureLin.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureLin.cpp.i +.PHONY : Numeric/GaussQuadratureLin.cpp.i + +Numeric/GaussQuadratureLin.s: Numeric/GaussQuadratureLin.cpp.s +.PHONY : Numeric/GaussQuadratureLin.s + +# target to generate assembly for a file +Numeric/GaussQuadratureLin.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureLin.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureLin.cpp.s +.PHONY : Numeric/GaussQuadratureLin.cpp.s + +Numeric/GaussQuadratureQuad.o: Numeric/GaussQuadratureQuad.cpp.o +.PHONY : Numeric/GaussQuadratureQuad.o + +# target to build an object file +Numeric/GaussQuadratureQuad.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureQuad.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureQuad.cpp.o +.PHONY : Numeric/GaussQuadratureQuad.cpp.o + +Numeric/GaussQuadratureQuad.i: Numeric/GaussQuadratureQuad.cpp.i +.PHONY : Numeric/GaussQuadratureQuad.i + +# target to preprocess a source file +Numeric/GaussQuadratureQuad.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureQuad.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureQuad.cpp.i +.PHONY : Numeric/GaussQuadratureQuad.cpp.i + +Numeric/GaussQuadratureQuad.s: Numeric/GaussQuadratureQuad.cpp.s +.PHONY : Numeric/GaussQuadratureQuad.s + +# target to generate assembly for a file +Numeric/GaussQuadratureQuad.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureQuad.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureQuad.cpp.s +.PHONY : Numeric/GaussQuadratureQuad.cpp.s + +Numeric/GaussQuadratureTet.o: Numeric/GaussQuadratureTet.cpp.o +.PHONY : Numeric/GaussQuadratureTet.o + +# target to build an object file +Numeric/GaussQuadratureTet.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTet.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTet.cpp.o +.PHONY : Numeric/GaussQuadratureTet.cpp.o + +Numeric/GaussQuadratureTet.i: Numeric/GaussQuadratureTet.cpp.i +.PHONY : Numeric/GaussQuadratureTet.i + +# target to preprocess a source file +Numeric/GaussQuadratureTet.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTet.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTet.cpp.i +.PHONY : Numeric/GaussQuadratureTet.cpp.i + +Numeric/GaussQuadratureTet.s: Numeric/GaussQuadratureTet.cpp.s +.PHONY : Numeric/GaussQuadratureTet.s + +# target to generate assembly for a file +Numeric/GaussQuadratureTet.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTet.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTet.cpp.s +.PHONY : Numeric/GaussQuadratureTet.cpp.s + +Numeric/GaussQuadratureTri.o: Numeric/GaussQuadratureTri.cpp.o +.PHONY : Numeric/GaussQuadratureTri.o + +# target to build an object file +Numeric/GaussQuadratureTri.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTri.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTri.cpp.o +.PHONY : Numeric/GaussQuadratureTri.cpp.o + +Numeric/GaussQuadratureTri.i: Numeric/GaussQuadratureTri.cpp.i +.PHONY : Numeric/GaussQuadratureTri.i + +# target to preprocess a source file +Numeric/GaussQuadratureTri.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTri.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTri.cpp.i +.PHONY : Numeric/GaussQuadratureTri.cpp.i + +Numeric/GaussQuadratureTri.s: Numeric/GaussQuadratureTri.cpp.s +.PHONY : Numeric/GaussQuadratureTri.s + +# target to generate assembly for a file +Numeric/GaussQuadratureTri.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GaussQuadratureTri.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GaussQuadratureTri.cpp.s +.PHONY : Numeric/GaussQuadratureTri.cpp.s + +Numeric/GmshMatrix.o: Numeric/GmshMatrix.cpp.o +.PHONY : Numeric/GmshMatrix.o + +# target to build an object file +Numeric/GmshMatrix.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshMatrix.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshMatrix.cpp.o +.PHONY : Numeric/GmshMatrix.cpp.o + +Numeric/GmshMatrix.i: Numeric/GmshMatrix.cpp.i +.PHONY : Numeric/GmshMatrix.i + +# target to preprocess a source file +Numeric/GmshMatrix.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshMatrix.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshMatrix.cpp.i +.PHONY : Numeric/GmshMatrix.cpp.i + +Numeric/GmshMatrix.s: Numeric/GmshMatrix.cpp.s +.PHONY : Numeric/GmshMatrix.s + +# target to generate assembly for a file +Numeric/GmshMatrix.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshMatrix.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshMatrix.cpp.s +.PHONY : Numeric/GmshMatrix.cpp.s + +Numeric/GmshPredicates.o: Numeric/GmshPredicates.cpp.o +.PHONY : Numeric/GmshPredicates.o + +# target to build an object file +Numeric/GmshPredicates.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshPredicates.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshPredicates.cpp.o +.PHONY : Numeric/GmshPredicates.cpp.o + +Numeric/GmshPredicates.i: Numeric/GmshPredicates.cpp.i +.PHONY : Numeric/GmshPredicates.i + +# target to preprocess a source file +Numeric/GmshPredicates.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshPredicates.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshPredicates.cpp.i +.PHONY : Numeric/GmshPredicates.cpp.i + +Numeric/GmshPredicates.s: Numeric/GmshPredicates.cpp.s +.PHONY : Numeric/GmshPredicates.s + +# target to generate assembly for a file +Numeric/GmshPredicates.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/GmshPredicates.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/GmshPredicates.cpp.s +.PHONY : Numeric/GmshPredicates.cpp.s + +Numeric/Numeric.o: Numeric/Numeric.cpp.o +.PHONY : Numeric/Numeric.o + +# target to build an object file +Numeric/Numeric.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/Numeric.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/Numeric.cpp.o +.PHONY : Numeric/Numeric.cpp.o + +Numeric/Numeric.i: Numeric/Numeric.cpp.i +.PHONY : Numeric/Numeric.i + +# target to preprocess a source file +Numeric/Numeric.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/Numeric.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/Numeric.cpp.i +.PHONY : Numeric/Numeric.cpp.i + +Numeric/Numeric.s: Numeric/Numeric.cpp.s +.PHONY : Numeric/Numeric.s + +# target to generate assembly for a file +Numeric/Numeric.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/Numeric.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/Numeric.cpp.s +.PHONY : Numeric/Numeric.cpp.s + +Numeric/gmshConvexCombination.o: Numeric/gmshConvexCombination.cpp.o +.PHONY : Numeric/gmshConvexCombination.o + +# target to build an object file +Numeric/gmshConvexCombination.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshConvexCombination.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshConvexCombination.cpp.o +.PHONY : Numeric/gmshConvexCombination.cpp.o + +Numeric/gmshConvexCombination.i: Numeric/gmshConvexCombination.cpp.i +.PHONY : Numeric/gmshConvexCombination.i + +# target to preprocess a source file +Numeric/gmshConvexCombination.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshConvexCombination.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshConvexCombination.cpp.i +.PHONY : Numeric/gmshConvexCombination.cpp.i + +Numeric/gmshConvexCombination.s: Numeric/gmshConvexCombination.cpp.s +.PHONY : Numeric/gmshConvexCombination.s + +# target to generate assembly for a file +Numeric/gmshConvexCombination.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshConvexCombination.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshConvexCombination.cpp.s +.PHONY : Numeric/gmshConvexCombination.cpp.s + +Numeric/gmshElasticity.o: Numeric/gmshElasticity.cpp.o +.PHONY : Numeric/gmshElasticity.o + +# target to build an object file +Numeric/gmshElasticity.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshElasticity.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshElasticity.cpp.o +.PHONY : Numeric/gmshElasticity.cpp.o + +Numeric/gmshElasticity.i: Numeric/gmshElasticity.cpp.i +.PHONY : Numeric/gmshElasticity.i + +# target to preprocess a source file +Numeric/gmshElasticity.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshElasticity.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshElasticity.cpp.i +.PHONY : Numeric/gmshElasticity.cpp.i + +Numeric/gmshElasticity.s: Numeric/gmshElasticity.cpp.s +.PHONY : Numeric/gmshElasticity.s + +# target to generate assembly for a file +Numeric/gmshElasticity.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshElasticity.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshElasticity.cpp.s +.PHONY : Numeric/gmshElasticity.cpp.s + +Numeric/gmshHelmholtz.o: Numeric/gmshHelmholtz.cpp.o +.PHONY : Numeric/gmshHelmholtz.o + +# target to build an object file +Numeric/gmshHelmholtz.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshHelmholtz.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshHelmholtz.cpp.o +.PHONY : Numeric/gmshHelmholtz.cpp.o + +Numeric/gmshHelmholtz.i: Numeric/gmshHelmholtz.cpp.i +.PHONY : Numeric/gmshHelmholtz.i + +# target to preprocess a source file +Numeric/gmshHelmholtz.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshHelmholtz.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshHelmholtz.cpp.i +.PHONY : Numeric/gmshHelmholtz.cpp.i + +Numeric/gmshHelmholtz.s: Numeric/gmshHelmholtz.cpp.s +.PHONY : Numeric/gmshHelmholtz.s + +# target to generate assembly for a file +Numeric/gmshHelmholtz.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshHelmholtz.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshHelmholtz.cpp.s +.PHONY : Numeric/gmshHelmholtz.cpp.s + +Numeric/gmshLaplace.o: Numeric/gmshLaplace.cpp.o +.PHONY : Numeric/gmshLaplace.o + +# target to build an object file +Numeric/gmshLaplace.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLaplace.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLaplace.cpp.o +.PHONY : Numeric/gmshLaplace.cpp.o + +Numeric/gmshLaplace.i: Numeric/gmshLaplace.cpp.i +.PHONY : Numeric/gmshLaplace.i + +# target to preprocess a source file +Numeric/gmshLaplace.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLaplace.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLaplace.cpp.i +.PHONY : Numeric/gmshLaplace.cpp.i + +Numeric/gmshLaplace.s: Numeric/gmshLaplace.cpp.s +.PHONY : Numeric/gmshLaplace.s + +# target to generate assembly for a file +Numeric/gmshLaplace.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLaplace.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLaplace.cpp.s +.PHONY : Numeric/gmshLaplace.cpp.s + +Numeric/gmshLinearSystemCSR.o: Numeric/gmshLinearSystemCSR.cpp.o +.PHONY : Numeric/gmshLinearSystemCSR.o + +# target to build an object file +Numeric/gmshLinearSystemCSR.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLinearSystemCSR.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLinearSystemCSR.cpp.o +.PHONY : Numeric/gmshLinearSystemCSR.cpp.o + +Numeric/gmshLinearSystemCSR.i: Numeric/gmshLinearSystemCSR.cpp.i +.PHONY : Numeric/gmshLinearSystemCSR.i + +# target to preprocess a source file +Numeric/gmshLinearSystemCSR.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLinearSystemCSR.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLinearSystemCSR.cpp.i +.PHONY : Numeric/gmshLinearSystemCSR.cpp.i + +Numeric/gmshLinearSystemCSR.s: Numeric/gmshLinearSystemCSR.cpp.s +.PHONY : Numeric/gmshLinearSystemCSR.s + +# target to generate assembly for a file +Numeric/gmshLinearSystemCSR.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshLinearSystemCSR.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshLinearSystemCSR.cpp.s +.PHONY : Numeric/gmshLinearSystemCSR.cpp.s + +Numeric/gmshProjection.o: Numeric/gmshProjection.cpp.o +.PHONY : Numeric/gmshProjection.o + +# target to build an object file +Numeric/gmshProjection.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshProjection.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshProjection.cpp.o +.PHONY : Numeric/gmshProjection.cpp.o + +Numeric/gmshProjection.i: Numeric/gmshProjection.cpp.i +.PHONY : Numeric/gmshProjection.i + +# target to preprocess a source file +Numeric/gmshProjection.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshProjection.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshProjection.cpp.i +.PHONY : Numeric/gmshProjection.cpp.i + +Numeric/gmshProjection.s: Numeric/gmshProjection.cpp.s +.PHONY : Numeric/gmshProjection.s + +# target to generate assembly for a file +Numeric/gmshProjection.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Numeric/gmshProjection.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Numeric/gmshProjection.cpp.s +.PHONY : Numeric/gmshProjection.cpp.s + +Parser/FunctionManager.o: Parser/FunctionManager.cpp.o +.PHONY : Parser/FunctionManager.o + +# target to build an object file +Parser/FunctionManager.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/FunctionManager.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/FunctionManager.cpp.o +.PHONY : Parser/FunctionManager.cpp.o + +Parser/FunctionManager.i: Parser/FunctionManager.cpp.i +.PHONY : Parser/FunctionManager.i + +# target to preprocess a source file +Parser/FunctionManager.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/FunctionManager.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/FunctionManager.cpp.i +.PHONY : Parser/FunctionManager.cpp.i + +Parser/FunctionManager.s: Parser/FunctionManager.cpp.s +.PHONY : Parser/FunctionManager.s + +# target to generate assembly for a file +Parser/FunctionManager.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/FunctionManager.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/FunctionManager.cpp.s +.PHONY : Parser/FunctionManager.cpp.s + +Parser/Gmsh.tab.o: Parser/Gmsh.tab.cpp.o +.PHONY : Parser/Gmsh.tab.o + +# target to build an object file +Parser/Gmsh.tab.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.tab.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.tab.cpp.o +.PHONY : Parser/Gmsh.tab.cpp.o + +Parser/Gmsh.tab.i: Parser/Gmsh.tab.cpp.i +.PHONY : Parser/Gmsh.tab.i + +# target to preprocess a source file +Parser/Gmsh.tab.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.tab.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.tab.cpp.i +.PHONY : Parser/Gmsh.tab.cpp.i + +Parser/Gmsh.tab.s: Parser/Gmsh.tab.cpp.s +.PHONY : Parser/Gmsh.tab.s + +# target to generate assembly for a file +Parser/Gmsh.tab.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.tab.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.tab.cpp.s +.PHONY : Parser/Gmsh.tab.cpp.s + +Parser/Gmsh.yy.o: Parser/Gmsh.yy.cpp.o +.PHONY : Parser/Gmsh.yy.o + +# target to build an object file +Parser/Gmsh.yy.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.yy.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.yy.cpp.o +.PHONY : Parser/Gmsh.yy.cpp.o + +Parser/Gmsh.yy.i: Parser/Gmsh.yy.cpp.i +.PHONY : Parser/Gmsh.yy.i + +# target to preprocess a source file +Parser/Gmsh.yy.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.yy.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.yy.cpp.i +.PHONY : Parser/Gmsh.yy.cpp.i + +Parser/Gmsh.yy.s: Parser/Gmsh.yy.cpp.s +.PHONY : Parser/Gmsh.yy.s + +# target to generate assembly for a file +Parser/Gmsh.yy.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Parser/Gmsh.yy.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Parser/Gmsh.yy.cpp.s +.PHONY : Parser/Gmsh.yy.cpp.s + +Plugin/Annotate.o: Plugin/Annotate.cpp.o +.PHONY : Plugin/Annotate.o + +# target to build an object file +Plugin/Annotate.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Annotate.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Annotate.cpp.o +.PHONY : Plugin/Annotate.cpp.o + +Plugin/Annotate.i: Plugin/Annotate.cpp.i +.PHONY : Plugin/Annotate.i + +# target to preprocess a source file +Plugin/Annotate.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Annotate.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Annotate.cpp.i +.PHONY : Plugin/Annotate.cpp.i + +Plugin/Annotate.s: Plugin/Annotate.cpp.s +.PHONY : Plugin/Annotate.s + +# target to generate assembly for a file +Plugin/Annotate.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Annotate.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Annotate.cpp.s +.PHONY : Plugin/Annotate.cpp.s + +Plugin/Curl.o: Plugin/Curl.cpp.o +.PHONY : Plugin/Curl.o + +# target to build an object file +Plugin/Curl.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Curl.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Curl.cpp.o +.PHONY : Plugin/Curl.cpp.o + +Plugin/Curl.i: Plugin/Curl.cpp.i +.PHONY : Plugin/Curl.i + +# target to preprocess a source file +Plugin/Curl.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Curl.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Curl.cpp.i +.PHONY : Plugin/Curl.cpp.i + +Plugin/Curl.s: Plugin/Curl.cpp.s +.PHONY : Plugin/Curl.s + +# target to generate assembly for a file +Plugin/Curl.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Curl.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Curl.cpp.s +.PHONY : Plugin/Curl.cpp.s + +Plugin/CutGrid.o: Plugin/CutGrid.cpp.o +.PHONY : Plugin/CutGrid.o + +# target to build an object file +Plugin/CutGrid.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutGrid.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutGrid.cpp.o +.PHONY : Plugin/CutGrid.cpp.o + +Plugin/CutGrid.i: Plugin/CutGrid.cpp.i +.PHONY : Plugin/CutGrid.i + +# target to preprocess a source file +Plugin/CutGrid.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutGrid.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutGrid.cpp.i +.PHONY : Plugin/CutGrid.cpp.i + +Plugin/CutGrid.s: Plugin/CutGrid.cpp.s +.PHONY : Plugin/CutGrid.s + +# target to generate assembly for a file +Plugin/CutGrid.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutGrid.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutGrid.cpp.s +.PHONY : Plugin/CutGrid.cpp.s + +Plugin/CutMap.o: Plugin/CutMap.cpp.o +.PHONY : Plugin/CutMap.o + +# target to build an object file +Plugin/CutMap.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutMap.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutMap.cpp.o +.PHONY : Plugin/CutMap.cpp.o + +Plugin/CutMap.i: Plugin/CutMap.cpp.i +.PHONY : Plugin/CutMap.i + +# target to preprocess a source file +Plugin/CutMap.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutMap.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutMap.cpp.i +.PHONY : Plugin/CutMap.cpp.i + +Plugin/CutMap.s: Plugin/CutMap.cpp.s +.PHONY : Plugin/CutMap.s + +# target to generate assembly for a file +Plugin/CutMap.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutMap.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutMap.cpp.s +.PHONY : Plugin/CutMap.cpp.s + +Plugin/CutParametric.o: Plugin/CutParametric.cpp.o +.PHONY : Plugin/CutParametric.o + +# target to build an object file +Plugin/CutParametric.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutParametric.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutParametric.cpp.o +.PHONY : Plugin/CutParametric.cpp.o + +Plugin/CutParametric.i: Plugin/CutParametric.cpp.i +.PHONY : Plugin/CutParametric.i + +# target to preprocess a source file +Plugin/CutParametric.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutParametric.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutParametric.cpp.i +.PHONY : Plugin/CutParametric.cpp.i + +Plugin/CutParametric.s: Plugin/CutParametric.cpp.s +.PHONY : Plugin/CutParametric.s + +# target to generate assembly for a file +Plugin/CutParametric.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutParametric.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutParametric.cpp.s +.PHONY : Plugin/CutParametric.cpp.s + +Plugin/CutPlane.o: Plugin/CutPlane.cpp.o +.PHONY : Plugin/CutPlane.o + +# target to build an object file +Plugin/CutPlane.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutPlane.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutPlane.cpp.o +.PHONY : Plugin/CutPlane.cpp.o + +Plugin/CutPlane.i: Plugin/CutPlane.cpp.i +.PHONY : Plugin/CutPlane.i + +# target to preprocess a source file +Plugin/CutPlane.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutPlane.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutPlane.cpp.i +.PHONY : Plugin/CutPlane.cpp.i + +Plugin/CutPlane.s: Plugin/CutPlane.cpp.s +.PHONY : Plugin/CutPlane.s + +# target to generate assembly for a file +Plugin/CutPlane.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutPlane.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutPlane.cpp.s +.PHONY : Plugin/CutPlane.cpp.s + +Plugin/CutSphere.o: Plugin/CutSphere.cpp.o +.PHONY : Plugin/CutSphere.o + +# target to build an object file +Plugin/CutSphere.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutSphere.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutSphere.cpp.o +.PHONY : Plugin/CutSphere.cpp.o + +Plugin/CutSphere.i: Plugin/CutSphere.cpp.i +.PHONY : Plugin/CutSphere.i + +# target to preprocess a source file +Plugin/CutSphere.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutSphere.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutSphere.cpp.i +.PHONY : Plugin/CutSphere.cpp.i + +Plugin/CutSphere.s: Plugin/CutSphere.cpp.s +.PHONY : Plugin/CutSphere.s + +# target to generate assembly for a file +Plugin/CutSphere.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/CutSphere.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/CutSphere.cpp.s +.PHONY : Plugin/CutSphere.cpp.s + +Plugin/Divergence.o: Plugin/Divergence.cpp.o +.PHONY : Plugin/Divergence.o + +# target to build an object file +Plugin/Divergence.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Divergence.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Divergence.cpp.o +.PHONY : Plugin/Divergence.cpp.o + +Plugin/Divergence.i: Plugin/Divergence.cpp.i +.PHONY : Plugin/Divergence.i + +# target to preprocess a source file +Plugin/Divergence.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Divergence.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Divergence.cpp.i +.PHONY : Plugin/Divergence.cpp.i + +Plugin/Divergence.s: Plugin/Divergence.cpp.s +.PHONY : Plugin/Divergence.s + +# target to generate assembly for a file +Plugin/Divergence.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Divergence.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Divergence.cpp.s +.PHONY : Plugin/Divergence.cpp.s + +Plugin/Eigenvalues.o: Plugin/Eigenvalues.cpp.o +.PHONY : Plugin/Eigenvalues.o + +# target to build an object file +Plugin/Eigenvalues.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvalues.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvalues.cpp.o +.PHONY : Plugin/Eigenvalues.cpp.o + +Plugin/Eigenvalues.i: Plugin/Eigenvalues.cpp.i +.PHONY : Plugin/Eigenvalues.i + +# target to preprocess a source file +Plugin/Eigenvalues.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvalues.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvalues.cpp.i +.PHONY : Plugin/Eigenvalues.cpp.i + +Plugin/Eigenvalues.s: Plugin/Eigenvalues.cpp.s +.PHONY : Plugin/Eigenvalues.s + +# target to generate assembly for a file +Plugin/Eigenvalues.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvalues.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvalues.cpp.s +.PHONY : Plugin/Eigenvalues.cpp.s + +Plugin/Eigenvectors.o: Plugin/Eigenvectors.cpp.o +.PHONY : Plugin/Eigenvectors.o + +# target to build an object file +Plugin/Eigenvectors.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvectors.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvectors.cpp.o +.PHONY : Plugin/Eigenvectors.cpp.o + +Plugin/Eigenvectors.i: Plugin/Eigenvectors.cpp.i +.PHONY : Plugin/Eigenvectors.i + +# target to preprocess a source file +Plugin/Eigenvectors.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvectors.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvectors.cpp.i +.PHONY : Plugin/Eigenvectors.cpp.i + +Plugin/Eigenvectors.s: Plugin/Eigenvectors.cpp.s +.PHONY : Plugin/Eigenvectors.s + +# target to generate assembly for a file +Plugin/Eigenvectors.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Eigenvectors.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Eigenvectors.cpp.s +.PHONY : Plugin/Eigenvectors.cpp.s + +Plugin/Evaluate.o: Plugin/Evaluate.cpp.o +.PHONY : Plugin/Evaluate.o + +# target to build an object file +Plugin/Evaluate.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Evaluate.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Evaluate.cpp.o +.PHONY : Plugin/Evaluate.cpp.o + +Plugin/Evaluate.i: Plugin/Evaluate.cpp.i +.PHONY : Plugin/Evaluate.i + +# target to preprocess a source file +Plugin/Evaluate.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Evaluate.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Evaluate.cpp.i +.PHONY : Plugin/Evaluate.cpp.i + +Plugin/Evaluate.s: Plugin/Evaluate.cpp.s +.PHONY : Plugin/Evaluate.s + +# target to generate assembly for a file +Plugin/Evaluate.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Evaluate.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Evaluate.cpp.s +.PHONY : Plugin/Evaluate.cpp.s + +Plugin/Extract.o: Plugin/Extract.cpp.o +.PHONY : Plugin/Extract.o + +# target to build an object file +Plugin/Extract.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Extract.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Extract.cpp.o +.PHONY : Plugin/Extract.cpp.o + +Plugin/Extract.i: Plugin/Extract.cpp.i +.PHONY : Plugin/Extract.i + +# target to preprocess a source file +Plugin/Extract.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Extract.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Extract.cpp.i +.PHONY : Plugin/Extract.cpp.i + +Plugin/Extract.s: Plugin/Extract.cpp.s +.PHONY : Plugin/Extract.s + +# target to generate assembly for a file +Plugin/Extract.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Extract.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Extract.cpp.s +.PHONY : Plugin/Extract.cpp.s + +Plugin/ExtractEdges.o: Plugin/ExtractEdges.cpp.o +.PHONY : Plugin/ExtractEdges.o + +# target to build an object file +Plugin/ExtractEdges.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractEdges.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractEdges.cpp.o +.PHONY : Plugin/ExtractEdges.cpp.o + +Plugin/ExtractEdges.i: Plugin/ExtractEdges.cpp.i +.PHONY : Plugin/ExtractEdges.i + +# target to preprocess a source file +Plugin/ExtractEdges.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractEdges.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractEdges.cpp.i +.PHONY : Plugin/ExtractEdges.cpp.i + +Plugin/ExtractEdges.s: Plugin/ExtractEdges.cpp.s +.PHONY : Plugin/ExtractEdges.s + +# target to generate assembly for a file +Plugin/ExtractEdges.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractEdges.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractEdges.cpp.s +.PHONY : Plugin/ExtractEdges.cpp.s + +Plugin/ExtractElements.o: Plugin/ExtractElements.cpp.o +.PHONY : Plugin/ExtractElements.o + +# target to build an object file +Plugin/ExtractElements.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractElements.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractElements.cpp.o +.PHONY : Plugin/ExtractElements.cpp.o + +Plugin/ExtractElements.i: Plugin/ExtractElements.cpp.i +.PHONY : Plugin/ExtractElements.i + +# target to preprocess a source file +Plugin/ExtractElements.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractElements.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractElements.cpp.i +.PHONY : Plugin/ExtractElements.cpp.i + +Plugin/ExtractElements.s: Plugin/ExtractElements.cpp.s +.PHONY : Plugin/ExtractElements.s + +# target to generate assembly for a file +Plugin/ExtractElements.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ExtractElements.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ExtractElements.cpp.s +.PHONY : Plugin/ExtractElements.cpp.s + +Plugin/FieldView.o: Plugin/FieldView.cpp.o +.PHONY : Plugin/FieldView.o + +# target to build an object file +Plugin/FieldView.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FieldView.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FieldView.cpp.o +.PHONY : Plugin/FieldView.cpp.o + +Plugin/FieldView.i: Plugin/FieldView.cpp.i +.PHONY : Plugin/FieldView.i + +# target to preprocess a source file +Plugin/FieldView.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FieldView.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FieldView.cpp.i +.PHONY : Plugin/FieldView.cpp.i + +Plugin/FieldView.s: Plugin/FieldView.cpp.s +.PHONY : Plugin/FieldView.s + +# target to generate assembly for a file +Plugin/FieldView.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FieldView.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FieldView.cpp.s +.PHONY : Plugin/FieldView.cpp.s + +Plugin/FiniteElement.o: Plugin/FiniteElement.cpp.o +.PHONY : Plugin/FiniteElement.o + +# target to build an object file +Plugin/FiniteElement.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FiniteElement.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FiniteElement.cpp.o +.PHONY : Plugin/FiniteElement.cpp.o + +Plugin/FiniteElement.i: Plugin/FiniteElement.cpp.i +.PHONY : Plugin/FiniteElement.i + +# target to preprocess a source file +Plugin/FiniteElement.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FiniteElement.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FiniteElement.cpp.i +.PHONY : Plugin/FiniteElement.cpp.i + +Plugin/FiniteElement.s: Plugin/FiniteElement.cpp.s +.PHONY : Plugin/FiniteElement.s + +# target to generate assembly for a file +Plugin/FiniteElement.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/FiniteElement.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/FiniteElement.cpp.s +.PHONY : Plugin/FiniteElement.cpp.s + +Plugin/GSHHS.o: Plugin/GSHHS.cpp.o +.PHONY : Plugin/GSHHS.o + +# target to build an object file +Plugin/GSHHS.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/GSHHS.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/GSHHS.cpp.o +.PHONY : Plugin/GSHHS.cpp.o + +Plugin/GSHHS.i: Plugin/GSHHS.cpp.i +.PHONY : Plugin/GSHHS.i + +# target to preprocess a source file +Plugin/GSHHS.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/GSHHS.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/GSHHS.cpp.i +.PHONY : Plugin/GSHHS.cpp.i + +Plugin/GSHHS.s: Plugin/GSHHS.cpp.s +.PHONY : Plugin/GSHHS.s + +# target to generate assembly for a file +Plugin/GSHHS.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/GSHHS.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/GSHHS.cpp.s +.PHONY : Plugin/GSHHS.cpp.s + +Plugin/Gradient.o: Plugin/Gradient.cpp.o +.PHONY : Plugin/Gradient.o + +# target to build an object file +Plugin/Gradient.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Gradient.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Gradient.cpp.o +.PHONY : Plugin/Gradient.cpp.o + +Plugin/Gradient.i: Plugin/Gradient.cpp.i +.PHONY : Plugin/Gradient.i + +# target to preprocess a source file +Plugin/Gradient.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Gradient.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Gradient.cpp.i +.PHONY : Plugin/Gradient.cpp.i + +Plugin/Gradient.s: Plugin/Gradient.cpp.s +.PHONY : Plugin/Gradient.s + +# target to generate assembly for a file +Plugin/Gradient.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Gradient.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Gradient.cpp.s +.PHONY : Plugin/Gradient.cpp.s + +Plugin/HarmonicToTime.o: Plugin/HarmonicToTime.cpp.o +.PHONY : Plugin/HarmonicToTime.o + +# target to build an object file +Plugin/HarmonicToTime.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HarmonicToTime.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HarmonicToTime.cpp.o +.PHONY : Plugin/HarmonicToTime.cpp.o + +Plugin/HarmonicToTime.i: Plugin/HarmonicToTime.cpp.i +.PHONY : Plugin/HarmonicToTime.i + +# target to preprocess a source file +Plugin/HarmonicToTime.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HarmonicToTime.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HarmonicToTime.cpp.i +.PHONY : Plugin/HarmonicToTime.cpp.i + +Plugin/HarmonicToTime.s: Plugin/HarmonicToTime.cpp.s +.PHONY : Plugin/HarmonicToTime.s + +# target to generate assembly for a file +Plugin/HarmonicToTime.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HarmonicToTime.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HarmonicToTime.cpp.s +.PHONY : Plugin/HarmonicToTime.cpp.s + +Plugin/HomologyComputation.o: Plugin/HomologyComputation.cpp.o +.PHONY : Plugin/HomologyComputation.o + +# target to build an object file +Plugin/HomologyComputation.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HomologyComputation.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HomologyComputation.cpp.o +.PHONY : Plugin/HomologyComputation.cpp.o + +Plugin/HomologyComputation.i: Plugin/HomologyComputation.cpp.i +.PHONY : Plugin/HomologyComputation.i + +# target to preprocess a source file +Plugin/HomologyComputation.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HomologyComputation.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HomologyComputation.cpp.i +.PHONY : Plugin/HomologyComputation.cpp.i + +Plugin/HomologyComputation.s: Plugin/HomologyComputation.cpp.s +.PHONY : Plugin/HomologyComputation.s + +# target to generate assembly for a file +Plugin/HomologyComputation.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/HomologyComputation.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/HomologyComputation.cpp.s +.PHONY : Plugin/HomologyComputation.cpp.s + +Plugin/Integrate.o: Plugin/Integrate.cpp.o +.PHONY : Plugin/Integrate.o + +# target to build an object file +Plugin/Integrate.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Integrate.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Integrate.cpp.o +.PHONY : Plugin/Integrate.cpp.o + +Plugin/Integrate.i: Plugin/Integrate.cpp.i +.PHONY : Plugin/Integrate.i + +# target to preprocess a source file +Plugin/Integrate.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Integrate.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Integrate.cpp.i +.PHONY : Plugin/Integrate.cpp.i + +Plugin/Integrate.s: Plugin/Integrate.cpp.s +.PHONY : Plugin/Integrate.s + +# target to generate assembly for a file +Plugin/Integrate.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Integrate.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Integrate.cpp.s +.PHONY : Plugin/Integrate.cpp.s + +Plugin/Lambda2.o: Plugin/Lambda2.cpp.o +.PHONY : Plugin/Lambda2.o + +# target to build an object file +Plugin/Lambda2.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Lambda2.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Lambda2.cpp.o +.PHONY : Plugin/Lambda2.cpp.o + +Plugin/Lambda2.i: Plugin/Lambda2.cpp.i +.PHONY : Plugin/Lambda2.i + +# target to preprocess a source file +Plugin/Lambda2.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Lambda2.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Lambda2.cpp.i +.PHONY : Plugin/Lambda2.cpp.i + +Plugin/Lambda2.s: Plugin/Lambda2.cpp.s +.PHONY : Plugin/Lambda2.s + +# target to generate assembly for a file +Plugin/Lambda2.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Lambda2.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Lambda2.cpp.s +.PHONY : Plugin/Lambda2.cpp.s + +Plugin/Levelset.o: Plugin/Levelset.cpp.o +.PHONY : Plugin/Levelset.o + +# target to build an object file +Plugin/Levelset.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Levelset.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Levelset.cpp.o +.PHONY : Plugin/Levelset.cpp.o + +Plugin/Levelset.i: Plugin/Levelset.cpp.i +.PHONY : Plugin/Levelset.i + +# target to preprocess a source file +Plugin/Levelset.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Levelset.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Levelset.cpp.i +.PHONY : Plugin/Levelset.cpp.i + +Plugin/Levelset.s: Plugin/Levelset.cpp.s +.PHONY : Plugin/Levelset.s + +# target to generate assembly for a file +Plugin/Levelset.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Levelset.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Levelset.cpp.s +.PHONY : Plugin/Levelset.cpp.s + +Plugin/LongitudeLatitude.o: Plugin/LongitudeLatitude.cpp.o +.PHONY : Plugin/LongitudeLatitude.o + +# target to build an object file +Plugin/LongitudeLatitude.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/LongitudeLatitude.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/LongitudeLatitude.cpp.o +.PHONY : Plugin/LongitudeLatitude.cpp.o + +Plugin/LongitudeLatitude.i: Plugin/LongitudeLatitude.cpp.i +.PHONY : Plugin/LongitudeLatitude.i + +# target to preprocess a source file +Plugin/LongitudeLatitude.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/LongitudeLatitude.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/LongitudeLatitude.cpp.i +.PHONY : Plugin/LongitudeLatitude.cpp.i + +Plugin/LongitudeLatitude.s: Plugin/LongitudeLatitude.cpp.s +.PHONY : Plugin/LongitudeLatitude.s + +# target to generate assembly for a file +Plugin/LongitudeLatitude.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/LongitudeLatitude.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/LongitudeLatitude.cpp.s +.PHONY : Plugin/LongitudeLatitude.cpp.s + +Plugin/MakeSimplex.o: Plugin/MakeSimplex.cpp.o +.PHONY : Plugin/MakeSimplex.o + +# target to build an object file +Plugin/MakeSimplex.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/MakeSimplex.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/MakeSimplex.cpp.o +.PHONY : Plugin/MakeSimplex.cpp.o + +Plugin/MakeSimplex.i: Plugin/MakeSimplex.cpp.i +.PHONY : Plugin/MakeSimplex.i + +# target to preprocess a source file +Plugin/MakeSimplex.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/MakeSimplex.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/MakeSimplex.cpp.i +.PHONY : Plugin/MakeSimplex.cpp.i + +Plugin/MakeSimplex.s: Plugin/MakeSimplex.cpp.s +.PHONY : Plugin/MakeSimplex.s + +# target to generate assembly for a file +Plugin/MakeSimplex.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/MakeSimplex.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/MakeSimplex.cpp.s +.PHONY : Plugin/MakeSimplex.cpp.s + +Plugin/ModulusPhase.o: Plugin/ModulusPhase.cpp.o +.PHONY : Plugin/ModulusPhase.o + +# target to build an object file +Plugin/ModulusPhase.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ModulusPhase.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ModulusPhase.cpp.o +.PHONY : Plugin/ModulusPhase.cpp.o + +Plugin/ModulusPhase.i: Plugin/ModulusPhase.cpp.i +.PHONY : Plugin/ModulusPhase.i + +# target to preprocess a source file +Plugin/ModulusPhase.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ModulusPhase.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ModulusPhase.cpp.i +.PHONY : Plugin/ModulusPhase.cpp.i + +Plugin/ModulusPhase.s: Plugin/ModulusPhase.cpp.s +.PHONY : Plugin/ModulusPhase.s + +# target to generate assembly for a file +Plugin/ModulusPhase.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/ModulusPhase.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/ModulusPhase.cpp.s +.PHONY : Plugin/ModulusPhase.cpp.s + +Plugin/Plugin.o: Plugin/Plugin.cpp.o +.PHONY : Plugin/Plugin.o + +# target to build an object file +Plugin/Plugin.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Plugin.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Plugin.cpp.o +.PHONY : Plugin/Plugin.cpp.o + +Plugin/Plugin.i: Plugin/Plugin.cpp.i +.PHONY : Plugin/Plugin.i + +# target to preprocess a source file +Plugin/Plugin.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Plugin.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Plugin.cpp.i +.PHONY : Plugin/Plugin.cpp.i + +Plugin/Plugin.s: Plugin/Plugin.cpp.s +.PHONY : Plugin/Plugin.s + +# target to generate assembly for a file +Plugin/Plugin.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Plugin.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Plugin.cpp.s +.PHONY : Plugin/Plugin.cpp.s + +Plugin/PluginManager.o: Plugin/PluginManager.cpp.o +.PHONY : Plugin/PluginManager.o + +# target to build an object file +Plugin/PluginManager.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/PluginManager.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/PluginManager.cpp.o +.PHONY : Plugin/PluginManager.cpp.o + +Plugin/PluginManager.i: Plugin/PluginManager.cpp.i +.PHONY : Plugin/PluginManager.i + +# target to preprocess a source file +Plugin/PluginManager.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/PluginManager.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/PluginManager.cpp.i +.PHONY : Plugin/PluginManager.cpp.i + +Plugin/PluginManager.s: Plugin/PluginManager.cpp.s +.PHONY : Plugin/PluginManager.s + +# target to generate assembly for a file +Plugin/PluginManager.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/PluginManager.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/PluginManager.cpp.s +.PHONY : Plugin/PluginManager.cpp.s + +Plugin/Probe.o: Plugin/Probe.cpp.o +.PHONY : Plugin/Probe.o + +# target to build an object file +Plugin/Probe.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Probe.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Probe.cpp.o +.PHONY : Plugin/Probe.cpp.o + +Plugin/Probe.i: Plugin/Probe.cpp.i +.PHONY : Plugin/Probe.i + +# target to preprocess a source file +Plugin/Probe.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Probe.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Probe.cpp.i +.PHONY : Plugin/Probe.cpp.i + +Plugin/Probe.s: Plugin/Probe.cpp.s +.PHONY : Plugin/Probe.s + +# target to generate assembly for a file +Plugin/Probe.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Probe.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Probe.cpp.s +.PHONY : Plugin/Probe.cpp.s + +Plugin/Remove.o: Plugin/Remove.cpp.o +.PHONY : Plugin/Remove.o + +# target to build an object file +Plugin/Remove.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Remove.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Remove.cpp.o +.PHONY : Plugin/Remove.cpp.o + +Plugin/Remove.i: Plugin/Remove.cpp.i +.PHONY : Plugin/Remove.i + +# target to preprocess a source file +Plugin/Remove.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Remove.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Remove.cpp.i +.PHONY : Plugin/Remove.cpp.i + +Plugin/Remove.s: Plugin/Remove.cpp.s +.PHONY : Plugin/Remove.s + +# target to generate assembly for a file +Plugin/Remove.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Remove.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Remove.cpp.s +.PHONY : Plugin/Remove.cpp.s + +Plugin/Skin.o: Plugin/Skin.cpp.o +.PHONY : Plugin/Skin.o + +# target to build an object file +Plugin/Skin.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Skin.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Skin.cpp.o +.PHONY : Plugin/Skin.cpp.o + +Plugin/Skin.i: Plugin/Skin.cpp.i +.PHONY : Plugin/Skin.i + +# target to preprocess a source file +Plugin/Skin.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Skin.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Skin.cpp.i +.PHONY : Plugin/Skin.cpp.i + +Plugin/Skin.s: Plugin/Skin.cpp.s +.PHONY : Plugin/Skin.s + +# target to generate assembly for a file +Plugin/Skin.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Skin.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Skin.cpp.s +.PHONY : Plugin/Skin.cpp.s + +Plugin/Smooth.o: Plugin/Smooth.cpp.o +.PHONY : Plugin/Smooth.o + +# target to build an object file +Plugin/Smooth.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Smooth.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Smooth.cpp.o +.PHONY : Plugin/Smooth.cpp.o + +Plugin/Smooth.i: Plugin/Smooth.cpp.i +.PHONY : Plugin/Smooth.i + +# target to preprocess a source file +Plugin/Smooth.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Smooth.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Smooth.cpp.i +.PHONY : Plugin/Smooth.cpp.i + +Plugin/Smooth.s: Plugin/Smooth.cpp.s +.PHONY : Plugin/Smooth.s + +# target to generate assembly for a file +Plugin/Smooth.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Smooth.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Smooth.cpp.s +.PHONY : Plugin/Smooth.cpp.s + +Plugin/SphericalRaise.o: Plugin/SphericalRaise.cpp.o +.PHONY : Plugin/SphericalRaise.o + +# target to build an object file +Plugin/SphericalRaise.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/SphericalRaise.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/SphericalRaise.cpp.o +.PHONY : Plugin/SphericalRaise.cpp.o + +Plugin/SphericalRaise.i: Plugin/SphericalRaise.cpp.i +.PHONY : Plugin/SphericalRaise.i + +# target to preprocess a source file +Plugin/SphericalRaise.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/SphericalRaise.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/SphericalRaise.cpp.i +.PHONY : Plugin/SphericalRaise.cpp.i + +Plugin/SphericalRaise.s: Plugin/SphericalRaise.cpp.s +.PHONY : Plugin/SphericalRaise.s + +# target to generate assembly for a file +Plugin/SphericalRaise.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/SphericalRaise.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/SphericalRaise.cpp.s +.PHONY : Plugin/SphericalRaise.cpp.s + +Plugin/StreamLines.o: Plugin/StreamLines.cpp.o +.PHONY : Plugin/StreamLines.o + +# target to build an object file +Plugin/StreamLines.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/StreamLines.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/StreamLines.cpp.o +.PHONY : Plugin/StreamLines.cpp.o + +Plugin/StreamLines.i: Plugin/StreamLines.cpp.i +.PHONY : Plugin/StreamLines.i + +# target to preprocess a source file +Plugin/StreamLines.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/StreamLines.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/StreamLines.cpp.i +.PHONY : Plugin/StreamLines.cpp.i + +Plugin/StreamLines.s: Plugin/StreamLines.cpp.s +.PHONY : Plugin/StreamLines.s + +# target to generate assembly for a file +Plugin/StreamLines.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/StreamLines.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/StreamLines.cpp.s +.PHONY : Plugin/StreamLines.cpp.s + +Plugin/Transform.o: Plugin/Transform.cpp.o +.PHONY : Plugin/Transform.o + +# target to build an object file +Plugin/Transform.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Transform.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Transform.cpp.o +.PHONY : Plugin/Transform.cpp.o + +Plugin/Transform.i: Plugin/Transform.cpp.i +.PHONY : Plugin/Transform.i + +# target to preprocess a source file +Plugin/Transform.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Transform.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Transform.cpp.i +.PHONY : Plugin/Transform.cpp.i + +Plugin/Transform.s: Plugin/Transform.cpp.s +.PHONY : Plugin/Transform.s + +# target to generate assembly for a file +Plugin/Transform.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Transform.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Transform.cpp.s +.PHONY : Plugin/Transform.cpp.s + +Plugin/Triangulate.o: Plugin/Triangulate.cpp.o +.PHONY : Plugin/Triangulate.o + +# target to build an object file +Plugin/Triangulate.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Triangulate.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Triangulate.cpp.o +.PHONY : Plugin/Triangulate.cpp.o + +Plugin/Triangulate.i: Plugin/Triangulate.cpp.i +.PHONY : Plugin/Triangulate.i + +# target to preprocess a source file +Plugin/Triangulate.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Triangulate.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Triangulate.cpp.i +.PHONY : Plugin/Triangulate.cpp.i + +Plugin/Triangulate.s: Plugin/Triangulate.cpp.s +.PHONY : Plugin/Triangulate.s + +# target to generate assembly for a file +Plugin/Triangulate.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Triangulate.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Triangulate.cpp.s +.PHONY : Plugin/Triangulate.cpp.s + +Plugin/Warp.o: Plugin/Warp.cpp.o +.PHONY : Plugin/Warp.o + +# target to build an object file +Plugin/Warp.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Warp.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Warp.cpp.o +.PHONY : Plugin/Warp.cpp.o + +Plugin/Warp.i: Plugin/Warp.cpp.i +.PHONY : Plugin/Warp.i + +# target to preprocess a source file +Plugin/Warp.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Warp.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Warp.cpp.i +.PHONY : Plugin/Warp.cpp.i + +Plugin/Warp.s: Plugin/Warp.cpp.s +.PHONY : Plugin/Warp.s + +# target to generate assembly for a file +Plugin/Warp.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Plugin/Warp.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Plugin/Warp.cpp.s +.PHONY : Plugin/Warp.cpp.s + +Post/ColorTable.o: Post/ColorTable.cpp.o +.PHONY : Post/ColorTable.o + +# target to build an object file +Post/ColorTable.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/ColorTable.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/ColorTable.cpp.o +.PHONY : Post/ColorTable.cpp.o + +Post/ColorTable.i: Post/ColorTable.cpp.i +.PHONY : Post/ColorTable.i + +# target to preprocess a source file +Post/ColorTable.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/ColorTable.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/ColorTable.cpp.i +.PHONY : Post/ColorTable.cpp.i + +Post/ColorTable.s: Post/ColorTable.cpp.s +.PHONY : Post/ColorTable.s + +# target to generate assembly for a file +Post/ColorTable.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/ColorTable.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/ColorTable.cpp.s +.PHONY : Post/ColorTable.cpp.s + +Post/OctreePost.o: Post/OctreePost.cpp.o +.PHONY : Post/OctreePost.o + +# target to build an object file +Post/OctreePost.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/OctreePost.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/OctreePost.cpp.o +.PHONY : Post/OctreePost.cpp.o + +Post/OctreePost.i: Post/OctreePost.cpp.i +.PHONY : Post/OctreePost.i + +# target to preprocess a source file +Post/OctreePost.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/OctreePost.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/OctreePost.cpp.i +.PHONY : Post/OctreePost.cpp.i + +Post/OctreePost.s: Post/OctreePost.cpp.s +.PHONY : Post/OctreePost.s + +# target to generate assembly for a file +Post/OctreePost.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/OctreePost.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/OctreePost.cpp.s +.PHONY : Post/OctreePost.cpp.s + +Post/PView.o: Post/PView.cpp.o +.PHONY : Post/PView.o + +# target to build an object file +Post/PView.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PView.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PView.cpp.o +.PHONY : Post/PView.cpp.o + +Post/PView.i: Post/PView.cpp.i +.PHONY : Post/PView.i + +# target to preprocess a source file +Post/PView.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PView.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PView.cpp.i +.PHONY : Post/PView.cpp.i + +Post/PView.s: Post/PView.cpp.s +.PHONY : Post/PView.s + +# target to generate assembly for a file +Post/PView.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PView.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PView.cpp.s +.PHONY : Post/PView.cpp.s + +Post/PViewData.o: Post/PViewData.cpp.o +.PHONY : Post/PViewData.o + +# target to build an object file +Post/PViewData.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewData.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewData.cpp.o +.PHONY : Post/PViewData.cpp.o + +Post/PViewData.i: Post/PViewData.cpp.i +.PHONY : Post/PViewData.i + +# target to preprocess a source file +Post/PViewData.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewData.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewData.cpp.i +.PHONY : Post/PViewData.cpp.i + +Post/PViewData.s: Post/PViewData.cpp.s +.PHONY : Post/PViewData.s + +# target to generate assembly for a file +Post/PViewData.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewData.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewData.cpp.s +.PHONY : Post/PViewData.cpp.s + +Post/PViewDataGModel.o: Post/PViewDataGModel.cpp.o +.PHONY : Post/PViewDataGModel.o + +# target to build an object file +Post/PViewDataGModel.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModel.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModel.cpp.o +.PHONY : Post/PViewDataGModel.cpp.o + +Post/PViewDataGModel.i: Post/PViewDataGModel.cpp.i +.PHONY : Post/PViewDataGModel.i + +# target to preprocess a source file +Post/PViewDataGModel.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModel.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModel.cpp.i +.PHONY : Post/PViewDataGModel.cpp.i + +Post/PViewDataGModel.s: Post/PViewDataGModel.cpp.s +.PHONY : Post/PViewDataGModel.s + +# target to generate assembly for a file +Post/PViewDataGModel.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModel.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModel.cpp.s +.PHONY : Post/PViewDataGModel.cpp.s + +Post/PViewDataGModelIO.o: Post/PViewDataGModelIO.cpp.o +.PHONY : Post/PViewDataGModelIO.o + +# target to build an object file +Post/PViewDataGModelIO.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModelIO.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModelIO.cpp.o +.PHONY : Post/PViewDataGModelIO.cpp.o + +Post/PViewDataGModelIO.i: Post/PViewDataGModelIO.cpp.i +.PHONY : Post/PViewDataGModelIO.i + +# target to preprocess a source file +Post/PViewDataGModelIO.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModelIO.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModelIO.cpp.i +.PHONY : Post/PViewDataGModelIO.cpp.i + +Post/PViewDataGModelIO.s: Post/PViewDataGModelIO.cpp.s +.PHONY : Post/PViewDataGModelIO.s + +# target to generate assembly for a file +Post/PViewDataGModelIO.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataGModelIO.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataGModelIO.cpp.s +.PHONY : Post/PViewDataGModelIO.cpp.s + +Post/PViewDataIO.o: Post/PViewDataIO.cpp.o +.PHONY : Post/PViewDataIO.o + +# target to build an object file +Post/PViewDataIO.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataIO.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataIO.cpp.o +.PHONY : Post/PViewDataIO.cpp.o + +Post/PViewDataIO.i: Post/PViewDataIO.cpp.i +.PHONY : Post/PViewDataIO.i + +# target to preprocess a source file +Post/PViewDataIO.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataIO.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataIO.cpp.i +.PHONY : Post/PViewDataIO.cpp.i + +Post/PViewDataIO.s: Post/PViewDataIO.cpp.s +.PHONY : Post/PViewDataIO.s + +# target to generate assembly for a file +Post/PViewDataIO.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataIO.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataIO.cpp.s +.PHONY : Post/PViewDataIO.cpp.s + +Post/PViewDataList.o: Post/PViewDataList.cpp.o +.PHONY : Post/PViewDataList.o + +# target to build an object file +Post/PViewDataList.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataList.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataList.cpp.o +.PHONY : Post/PViewDataList.cpp.o + +Post/PViewDataList.i: Post/PViewDataList.cpp.i +.PHONY : Post/PViewDataList.i + +# target to preprocess a source file +Post/PViewDataList.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataList.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataList.cpp.i +.PHONY : Post/PViewDataList.cpp.i + +Post/PViewDataList.s: Post/PViewDataList.cpp.s +.PHONY : Post/PViewDataList.s + +# target to generate assembly for a file +Post/PViewDataList.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataList.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataList.cpp.s +.PHONY : Post/PViewDataList.cpp.s + +Post/PViewDataListIO.o: Post/PViewDataListIO.cpp.o +.PHONY : Post/PViewDataListIO.o + +# target to build an object file +Post/PViewDataListIO.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataListIO.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataListIO.cpp.o +.PHONY : Post/PViewDataListIO.cpp.o + +Post/PViewDataListIO.i: Post/PViewDataListIO.cpp.i +.PHONY : Post/PViewDataListIO.i + +# target to preprocess a source file +Post/PViewDataListIO.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataListIO.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataListIO.cpp.i +.PHONY : Post/PViewDataListIO.cpp.i + +Post/PViewDataListIO.s: Post/PViewDataListIO.cpp.s +.PHONY : Post/PViewDataListIO.s + +# target to generate assembly for a file +Post/PViewDataListIO.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewDataListIO.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewDataListIO.cpp.s +.PHONY : Post/PViewDataListIO.cpp.s + +Post/PViewIO.o: Post/PViewIO.cpp.o +.PHONY : Post/PViewIO.o + +# target to build an object file +Post/PViewIO.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewIO.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewIO.cpp.o +.PHONY : Post/PViewIO.cpp.o + +Post/PViewIO.i: Post/PViewIO.cpp.i +.PHONY : Post/PViewIO.i + +# target to preprocess a source file +Post/PViewIO.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewIO.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewIO.cpp.i +.PHONY : Post/PViewIO.cpp.i + +Post/PViewIO.s: Post/PViewIO.cpp.s +.PHONY : Post/PViewIO.s + +# target to generate assembly for a file +Post/PViewIO.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewIO.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewIO.cpp.s +.PHONY : Post/PViewIO.cpp.s + +Post/PViewOptions.o: Post/PViewOptions.cpp.o +.PHONY : Post/PViewOptions.o + +# target to build an object file +Post/PViewOptions.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewOptions.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewOptions.cpp.o +.PHONY : Post/PViewOptions.cpp.o + +Post/PViewOptions.i: Post/PViewOptions.cpp.i +.PHONY : Post/PViewOptions.i + +# target to preprocess a source file +Post/PViewOptions.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewOptions.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewOptions.cpp.i +.PHONY : Post/PViewOptions.cpp.i + +Post/PViewOptions.s: Post/PViewOptions.cpp.s +.PHONY : Post/PViewOptions.s + +# target to generate assembly for a file +Post/PViewOptions.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/PViewOptions.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/PViewOptions.cpp.s +.PHONY : Post/PViewOptions.cpp.s + +Post/adaptiveData.o: Post/adaptiveData.cpp.o +.PHONY : Post/adaptiveData.o + +# target to build an object file +Post/adaptiveData.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/adaptiveData.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/adaptiveData.cpp.o +.PHONY : Post/adaptiveData.cpp.o + +Post/adaptiveData.i: Post/adaptiveData.cpp.i +.PHONY : Post/adaptiveData.i + +# target to preprocess a source file +Post/adaptiveData.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/adaptiveData.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/adaptiveData.cpp.i +.PHONY : Post/adaptiveData.cpp.i + +Post/adaptiveData.s: Post/adaptiveData.cpp.s +.PHONY : Post/adaptiveData.s + +# target to generate assembly for a file +Post/adaptiveData.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/adaptiveData.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/adaptiveData.cpp.s +.PHONY : Post/adaptiveData.cpp.s + +Post/shapeFunctions.o: Post/shapeFunctions.cpp.o +.PHONY : Post/shapeFunctions.o + +# target to build an object file +Post/shapeFunctions.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/shapeFunctions.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/shapeFunctions.cpp.o +.PHONY : Post/shapeFunctions.cpp.o + +Post/shapeFunctions.i: Post/shapeFunctions.cpp.i +.PHONY : Post/shapeFunctions.i + +# target to preprocess a source file +Post/shapeFunctions.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/shapeFunctions.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/shapeFunctions.cpp.i +.PHONY : Post/shapeFunctions.cpp.i + +Post/shapeFunctions.s: Post/shapeFunctions.cpp.s +.PHONY : Post/shapeFunctions.s + +# target to generate assembly for a file +Post/shapeFunctions.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/Post/shapeFunctions.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/Post/shapeFunctions.cpp.s +.PHONY : Post/shapeFunctions.cpp.s + +contrib/ANN/src/ANN.o: contrib/ANN/src/ANN.cpp.o +.PHONY : contrib/ANN/src/ANN.o + +# target to build an object file +contrib/ANN/src/ANN.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/ANN.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/ANN.cpp.o +.PHONY : contrib/ANN/src/ANN.cpp.o + +contrib/ANN/src/ANN.i: contrib/ANN/src/ANN.cpp.i +.PHONY : contrib/ANN/src/ANN.i + +# target to preprocess a source file +contrib/ANN/src/ANN.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/ANN.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/ANN.cpp.i +.PHONY : contrib/ANN/src/ANN.cpp.i + +contrib/ANN/src/ANN.s: contrib/ANN/src/ANN.cpp.s +.PHONY : contrib/ANN/src/ANN.s + +# target to generate assembly for a file +contrib/ANN/src/ANN.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/ANN.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/ANN.cpp.s +.PHONY : contrib/ANN/src/ANN.cpp.s + +contrib/ANN/src/bd_fix_rad_search.o: contrib/ANN/src/bd_fix_rad_search.cpp.o +.PHONY : contrib/ANN/src/bd_fix_rad_search.o + +# target to build an object file +contrib/ANN/src/bd_fix_rad_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_fix_rad_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_fix_rad_search.cpp.o +.PHONY : contrib/ANN/src/bd_fix_rad_search.cpp.o + +contrib/ANN/src/bd_fix_rad_search.i: contrib/ANN/src/bd_fix_rad_search.cpp.i +.PHONY : contrib/ANN/src/bd_fix_rad_search.i + +# target to preprocess a source file +contrib/ANN/src/bd_fix_rad_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_fix_rad_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_fix_rad_search.cpp.i +.PHONY : contrib/ANN/src/bd_fix_rad_search.cpp.i + +contrib/ANN/src/bd_fix_rad_search.s: contrib/ANN/src/bd_fix_rad_search.cpp.s +.PHONY : contrib/ANN/src/bd_fix_rad_search.s + +# target to generate assembly for a file +contrib/ANN/src/bd_fix_rad_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_fix_rad_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_fix_rad_search.cpp.s +.PHONY : contrib/ANN/src/bd_fix_rad_search.cpp.s + +contrib/ANN/src/bd_pr_search.o: contrib/ANN/src/bd_pr_search.cpp.o +.PHONY : contrib/ANN/src/bd_pr_search.o + +# target to build an object file +contrib/ANN/src/bd_pr_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_pr_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_pr_search.cpp.o +.PHONY : contrib/ANN/src/bd_pr_search.cpp.o + +contrib/ANN/src/bd_pr_search.i: contrib/ANN/src/bd_pr_search.cpp.i +.PHONY : contrib/ANN/src/bd_pr_search.i + +# target to preprocess a source file +contrib/ANN/src/bd_pr_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_pr_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_pr_search.cpp.i +.PHONY : contrib/ANN/src/bd_pr_search.cpp.i + +contrib/ANN/src/bd_pr_search.s: contrib/ANN/src/bd_pr_search.cpp.s +.PHONY : contrib/ANN/src/bd_pr_search.s + +# target to generate assembly for a file +contrib/ANN/src/bd_pr_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_pr_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_pr_search.cpp.s +.PHONY : contrib/ANN/src/bd_pr_search.cpp.s + +contrib/ANN/src/bd_search.o: contrib/ANN/src/bd_search.cpp.o +.PHONY : contrib/ANN/src/bd_search.o + +# target to build an object file +contrib/ANN/src/bd_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_search.cpp.o +.PHONY : contrib/ANN/src/bd_search.cpp.o + +contrib/ANN/src/bd_search.i: contrib/ANN/src/bd_search.cpp.i +.PHONY : contrib/ANN/src/bd_search.i + +# target to preprocess a source file +contrib/ANN/src/bd_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_search.cpp.i +.PHONY : contrib/ANN/src/bd_search.cpp.i + +contrib/ANN/src/bd_search.s: contrib/ANN/src/bd_search.cpp.s +.PHONY : contrib/ANN/src/bd_search.s + +# target to generate assembly for a file +contrib/ANN/src/bd_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_search.cpp.s +.PHONY : contrib/ANN/src/bd_search.cpp.s + +contrib/ANN/src/bd_tree.o: contrib/ANN/src/bd_tree.cpp.o +.PHONY : contrib/ANN/src/bd_tree.o + +# target to build an object file +contrib/ANN/src/bd_tree.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_tree.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_tree.cpp.o +.PHONY : contrib/ANN/src/bd_tree.cpp.o + +contrib/ANN/src/bd_tree.i: contrib/ANN/src/bd_tree.cpp.i +.PHONY : contrib/ANN/src/bd_tree.i + +# target to preprocess a source file +contrib/ANN/src/bd_tree.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_tree.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_tree.cpp.i +.PHONY : contrib/ANN/src/bd_tree.cpp.i + +contrib/ANN/src/bd_tree.s: contrib/ANN/src/bd_tree.cpp.s +.PHONY : contrib/ANN/src/bd_tree.s + +# target to generate assembly for a file +contrib/ANN/src/bd_tree.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/bd_tree.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/bd_tree.cpp.s +.PHONY : contrib/ANN/src/bd_tree.cpp.s + +contrib/ANN/src/brute.o: contrib/ANN/src/brute.cpp.o +.PHONY : contrib/ANN/src/brute.o + +# target to build an object file +contrib/ANN/src/brute.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/brute.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/brute.cpp.o +.PHONY : contrib/ANN/src/brute.cpp.o + +contrib/ANN/src/brute.i: contrib/ANN/src/brute.cpp.i +.PHONY : contrib/ANN/src/brute.i + +# target to preprocess a source file +contrib/ANN/src/brute.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/brute.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/brute.cpp.i +.PHONY : contrib/ANN/src/brute.cpp.i + +contrib/ANN/src/brute.s: contrib/ANN/src/brute.cpp.s +.PHONY : contrib/ANN/src/brute.s + +# target to generate assembly for a file +contrib/ANN/src/brute.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/brute.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/brute.cpp.s +.PHONY : contrib/ANN/src/brute.cpp.s + +contrib/ANN/src/kd_dump.o: contrib/ANN/src/kd_dump.cpp.o +.PHONY : contrib/ANN/src/kd_dump.o + +# target to build an object file +contrib/ANN/src/kd_dump.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_dump.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_dump.cpp.o +.PHONY : contrib/ANN/src/kd_dump.cpp.o + +contrib/ANN/src/kd_dump.i: contrib/ANN/src/kd_dump.cpp.i +.PHONY : contrib/ANN/src/kd_dump.i + +# target to preprocess a source file +contrib/ANN/src/kd_dump.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_dump.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_dump.cpp.i +.PHONY : contrib/ANN/src/kd_dump.cpp.i + +contrib/ANN/src/kd_dump.s: contrib/ANN/src/kd_dump.cpp.s +.PHONY : contrib/ANN/src/kd_dump.s + +# target to generate assembly for a file +contrib/ANN/src/kd_dump.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_dump.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_dump.cpp.s +.PHONY : contrib/ANN/src/kd_dump.cpp.s + +contrib/ANN/src/kd_fix_rad_search.o: contrib/ANN/src/kd_fix_rad_search.cpp.o +.PHONY : contrib/ANN/src/kd_fix_rad_search.o + +# target to build an object file +contrib/ANN/src/kd_fix_rad_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_fix_rad_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_fix_rad_search.cpp.o +.PHONY : contrib/ANN/src/kd_fix_rad_search.cpp.o + +contrib/ANN/src/kd_fix_rad_search.i: contrib/ANN/src/kd_fix_rad_search.cpp.i +.PHONY : contrib/ANN/src/kd_fix_rad_search.i + +# target to preprocess a source file +contrib/ANN/src/kd_fix_rad_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_fix_rad_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_fix_rad_search.cpp.i +.PHONY : contrib/ANN/src/kd_fix_rad_search.cpp.i + +contrib/ANN/src/kd_fix_rad_search.s: contrib/ANN/src/kd_fix_rad_search.cpp.s +.PHONY : contrib/ANN/src/kd_fix_rad_search.s + +# target to generate assembly for a file +contrib/ANN/src/kd_fix_rad_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_fix_rad_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_fix_rad_search.cpp.s +.PHONY : contrib/ANN/src/kd_fix_rad_search.cpp.s + +contrib/ANN/src/kd_pr_search.o: contrib/ANN/src/kd_pr_search.cpp.o +.PHONY : contrib/ANN/src/kd_pr_search.o + +# target to build an object file +contrib/ANN/src/kd_pr_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_pr_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_pr_search.cpp.o +.PHONY : contrib/ANN/src/kd_pr_search.cpp.o + +contrib/ANN/src/kd_pr_search.i: contrib/ANN/src/kd_pr_search.cpp.i +.PHONY : contrib/ANN/src/kd_pr_search.i + +# target to preprocess a source file +contrib/ANN/src/kd_pr_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_pr_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_pr_search.cpp.i +.PHONY : contrib/ANN/src/kd_pr_search.cpp.i + +contrib/ANN/src/kd_pr_search.s: contrib/ANN/src/kd_pr_search.cpp.s +.PHONY : contrib/ANN/src/kd_pr_search.s + +# target to generate assembly for a file +contrib/ANN/src/kd_pr_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_pr_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_pr_search.cpp.s +.PHONY : contrib/ANN/src/kd_pr_search.cpp.s + +contrib/ANN/src/kd_search.o: contrib/ANN/src/kd_search.cpp.o +.PHONY : contrib/ANN/src/kd_search.o + +# target to build an object file +contrib/ANN/src/kd_search.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_search.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_search.cpp.o +.PHONY : contrib/ANN/src/kd_search.cpp.o + +contrib/ANN/src/kd_search.i: contrib/ANN/src/kd_search.cpp.i +.PHONY : contrib/ANN/src/kd_search.i + +# target to preprocess a source file +contrib/ANN/src/kd_search.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_search.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_search.cpp.i +.PHONY : contrib/ANN/src/kd_search.cpp.i + +contrib/ANN/src/kd_search.s: contrib/ANN/src/kd_search.cpp.s +.PHONY : contrib/ANN/src/kd_search.s + +# target to generate assembly for a file +contrib/ANN/src/kd_search.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_search.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_search.cpp.s +.PHONY : contrib/ANN/src/kd_search.cpp.s + +contrib/ANN/src/kd_split.o: contrib/ANN/src/kd_split.cpp.o +.PHONY : contrib/ANN/src/kd_split.o + +# target to build an object file +contrib/ANN/src/kd_split.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_split.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_split.cpp.o +.PHONY : contrib/ANN/src/kd_split.cpp.o + +contrib/ANN/src/kd_split.i: contrib/ANN/src/kd_split.cpp.i +.PHONY : contrib/ANN/src/kd_split.i + +# target to preprocess a source file +contrib/ANN/src/kd_split.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_split.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_split.cpp.i +.PHONY : contrib/ANN/src/kd_split.cpp.i + +contrib/ANN/src/kd_split.s: contrib/ANN/src/kd_split.cpp.s +.PHONY : contrib/ANN/src/kd_split.s + +# target to generate assembly for a file +contrib/ANN/src/kd_split.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_split.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_split.cpp.s +.PHONY : contrib/ANN/src/kd_split.cpp.s + +contrib/ANN/src/kd_tree.o: contrib/ANN/src/kd_tree.cpp.o +.PHONY : contrib/ANN/src/kd_tree.o + +# target to build an object file +contrib/ANN/src/kd_tree.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_tree.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_tree.cpp.o +.PHONY : contrib/ANN/src/kd_tree.cpp.o + +contrib/ANN/src/kd_tree.i: contrib/ANN/src/kd_tree.cpp.i +.PHONY : contrib/ANN/src/kd_tree.i + +# target to preprocess a source file +contrib/ANN/src/kd_tree.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_tree.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_tree.cpp.i +.PHONY : contrib/ANN/src/kd_tree.cpp.i + +contrib/ANN/src/kd_tree.s: contrib/ANN/src/kd_tree.cpp.s +.PHONY : contrib/ANN/src/kd_tree.s + +# target to generate assembly for a file +contrib/ANN/src/kd_tree.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_tree.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_tree.cpp.s +.PHONY : contrib/ANN/src/kd_tree.cpp.s + +contrib/ANN/src/kd_util.o: contrib/ANN/src/kd_util.cpp.o +.PHONY : contrib/ANN/src/kd_util.o + +# target to build an object file +contrib/ANN/src/kd_util.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_util.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_util.cpp.o +.PHONY : contrib/ANN/src/kd_util.cpp.o + +contrib/ANN/src/kd_util.i: contrib/ANN/src/kd_util.cpp.i +.PHONY : contrib/ANN/src/kd_util.i + +# target to preprocess a source file +contrib/ANN/src/kd_util.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_util.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_util.cpp.i +.PHONY : contrib/ANN/src/kd_util.cpp.i + +contrib/ANN/src/kd_util.s: contrib/ANN/src/kd_util.cpp.s +.PHONY : contrib/ANN/src/kd_util.s + +# target to generate assembly for a file +contrib/ANN/src/kd_util.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/kd_util.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/kd_util.cpp.s +.PHONY : contrib/ANN/src/kd_util.cpp.s + +contrib/ANN/src/perf.o: contrib/ANN/src/perf.cpp.o +.PHONY : contrib/ANN/src/perf.o + +# target to build an object file +contrib/ANN/src/perf.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/perf.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/perf.cpp.o +.PHONY : contrib/ANN/src/perf.cpp.o + +contrib/ANN/src/perf.i: contrib/ANN/src/perf.cpp.i +.PHONY : contrib/ANN/src/perf.i + +# target to preprocess a source file +contrib/ANN/src/perf.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/perf.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/perf.cpp.i +.PHONY : contrib/ANN/src/perf.cpp.i + +contrib/ANN/src/perf.s: contrib/ANN/src/perf.cpp.s +.PHONY : contrib/ANN/src/perf.s + +# target to generate assembly for a file +contrib/ANN/src/perf.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/ANN/src/perf.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/ANN/src/perf.cpp.s +.PHONY : contrib/ANN/src/perf.cpp.s + +contrib/DiscreteIntegration/DILevelset.o: contrib/DiscreteIntegration/DILevelset.cpp.o +.PHONY : contrib/DiscreteIntegration/DILevelset.o + +# target to build an object file +contrib/DiscreteIntegration/DILevelset.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/DILevelset.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/DILevelset.cpp.o +.PHONY : contrib/DiscreteIntegration/DILevelset.cpp.o + +contrib/DiscreteIntegration/DILevelset.i: contrib/DiscreteIntegration/DILevelset.cpp.i +.PHONY : contrib/DiscreteIntegration/DILevelset.i + +# target to preprocess a source file +contrib/DiscreteIntegration/DILevelset.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/DILevelset.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/DILevelset.cpp.i +.PHONY : contrib/DiscreteIntegration/DILevelset.cpp.i + +contrib/DiscreteIntegration/DILevelset.s: contrib/DiscreteIntegration/DILevelset.cpp.s +.PHONY : contrib/DiscreteIntegration/DILevelset.s + +# target to generate assembly for a file +contrib/DiscreteIntegration/DILevelset.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/DILevelset.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/DILevelset.cpp.s +.PHONY : contrib/DiscreteIntegration/DILevelset.cpp.s + +contrib/DiscreteIntegration/Integration3D.o: contrib/DiscreteIntegration/Integration3D.cpp.o +.PHONY : contrib/DiscreteIntegration/Integration3D.o + +# target to build an object file +contrib/DiscreteIntegration/Integration3D.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/Integration3D.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/Integration3D.cpp.o +.PHONY : contrib/DiscreteIntegration/Integration3D.cpp.o + +contrib/DiscreteIntegration/Integration3D.i: contrib/DiscreteIntegration/Integration3D.cpp.i +.PHONY : contrib/DiscreteIntegration/Integration3D.i + +# target to preprocess a source file +contrib/DiscreteIntegration/Integration3D.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/Integration3D.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/Integration3D.cpp.i +.PHONY : contrib/DiscreteIntegration/Integration3D.cpp.i + +contrib/DiscreteIntegration/Integration3D.s: contrib/DiscreteIntegration/Integration3D.cpp.s +.PHONY : contrib/DiscreteIntegration/Integration3D.s + +# target to generate assembly for a file +contrib/DiscreteIntegration/Integration3D.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/Integration3D.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/Integration3D.cpp.s +.PHONY : contrib/DiscreteIntegration/Integration3D.cpp.s + +contrib/DiscreteIntegration/recurCut.o: contrib/DiscreteIntegration/recurCut.cpp.o +.PHONY : contrib/DiscreteIntegration/recurCut.o + +# target to build an object file +contrib/DiscreteIntegration/recurCut.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/recurCut.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/recurCut.cpp.o +.PHONY : contrib/DiscreteIntegration/recurCut.cpp.o + +contrib/DiscreteIntegration/recurCut.i: contrib/DiscreteIntegration/recurCut.cpp.i +.PHONY : contrib/DiscreteIntegration/recurCut.i + +# target to preprocess a source file +contrib/DiscreteIntegration/recurCut.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/recurCut.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/recurCut.cpp.i +.PHONY : contrib/DiscreteIntegration/recurCut.cpp.i + +contrib/DiscreteIntegration/recurCut.s: contrib/DiscreteIntegration/recurCut.cpp.s +.PHONY : contrib/DiscreteIntegration/recurCut.s + +# target to generate assembly for a file +contrib/DiscreteIntegration/recurCut.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/DiscreteIntegration/recurCut.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/DiscreteIntegration/recurCut.cpp.s +.PHONY : contrib/DiscreteIntegration/recurCut.cpp.s + +contrib/MathEval/matheval.o: contrib/MathEval/matheval.cpp.o +.PHONY : contrib/MathEval/matheval.o + +# target to build an object file +contrib/MathEval/matheval.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/matheval.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/matheval.cpp.o +.PHONY : contrib/MathEval/matheval.cpp.o + +contrib/MathEval/matheval.i: contrib/MathEval/matheval.cpp.i +.PHONY : contrib/MathEval/matheval.i + +# target to preprocess a source file +contrib/MathEval/matheval.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/matheval.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/matheval.cpp.i +.PHONY : contrib/MathEval/matheval.cpp.i + +contrib/MathEval/matheval.s: contrib/MathEval/matheval.cpp.s +.PHONY : contrib/MathEval/matheval.s + +# target to generate assembly for a file +contrib/MathEval/matheval.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/matheval.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/matheval.cpp.s +.PHONY : contrib/MathEval/matheval.cpp.s + +contrib/MathEval/node.o: contrib/MathEval/node.cpp.o +.PHONY : contrib/MathEval/node.o + +# target to build an object file +contrib/MathEval/node.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/node.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/node.cpp.o +.PHONY : contrib/MathEval/node.cpp.o + +contrib/MathEval/node.i: contrib/MathEval/node.cpp.i +.PHONY : contrib/MathEval/node.i + +# target to preprocess a source file +contrib/MathEval/node.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/node.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/node.cpp.i +.PHONY : contrib/MathEval/node.cpp.i + +contrib/MathEval/node.s: contrib/MathEval/node.cpp.s +.PHONY : contrib/MathEval/node.s + +# target to generate assembly for a file +contrib/MathEval/node.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/node.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/node.cpp.s +.PHONY : contrib/MathEval/node.cpp.s + +contrib/MathEval/parser.tab.o: contrib/MathEval/parser.tab.cpp.o +.PHONY : contrib/MathEval/parser.tab.o + +# target to build an object file +contrib/MathEval/parser.tab.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/parser.tab.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/parser.tab.cpp.o +.PHONY : contrib/MathEval/parser.tab.cpp.o + +contrib/MathEval/parser.tab.i: contrib/MathEval/parser.tab.cpp.i +.PHONY : contrib/MathEval/parser.tab.i + +# target to preprocess a source file +contrib/MathEval/parser.tab.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/parser.tab.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/parser.tab.cpp.i +.PHONY : contrib/MathEval/parser.tab.cpp.i + +contrib/MathEval/parser.tab.s: contrib/MathEval/parser.tab.cpp.s +.PHONY : contrib/MathEval/parser.tab.s + +# target to generate assembly for a file +contrib/MathEval/parser.tab.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/parser.tab.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/parser.tab.cpp.s +.PHONY : contrib/MathEval/parser.tab.cpp.s + +contrib/MathEval/scanner.yy.o: contrib/MathEval/scanner.yy.cpp.o +.PHONY : contrib/MathEval/scanner.yy.o + +# target to build an object file +contrib/MathEval/scanner.yy.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/scanner.yy.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/scanner.yy.cpp.o +.PHONY : contrib/MathEval/scanner.yy.cpp.o + +contrib/MathEval/scanner.yy.i: contrib/MathEval/scanner.yy.cpp.i +.PHONY : contrib/MathEval/scanner.yy.i + +# target to preprocess a source file +contrib/MathEval/scanner.yy.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/scanner.yy.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/scanner.yy.cpp.i +.PHONY : contrib/MathEval/scanner.yy.cpp.i + +contrib/MathEval/scanner.yy.s: contrib/MathEval/scanner.yy.cpp.s +.PHONY : contrib/MathEval/scanner.yy.s + +# target to generate assembly for a file +contrib/MathEval/scanner.yy.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/scanner.yy.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/scanner.yy.cpp.s +.PHONY : contrib/MathEval/scanner.yy.cpp.s + +contrib/MathEval/symbol_table.o: contrib/MathEval/symbol_table.cpp.o +.PHONY : contrib/MathEval/symbol_table.o + +# target to build an object file +contrib/MathEval/symbol_table.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/symbol_table.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/symbol_table.cpp.o +.PHONY : contrib/MathEval/symbol_table.cpp.o + +contrib/MathEval/symbol_table.i: contrib/MathEval/symbol_table.cpp.i +.PHONY : contrib/MathEval/symbol_table.i + +# target to preprocess a source file +contrib/MathEval/symbol_table.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/symbol_table.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/symbol_table.cpp.i +.PHONY : contrib/MathEval/symbol_table.cpp.i + +contrib/MathEval/symbol_table.s: contrib/MathEval/symbol_table.cpp.s +.PHONY : contrib/MathEval/symbol_table.s + +# target to generate assembly for a file +contrib/MathEval/symbol_table.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/symbol_table.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/symbol_table.cpp.s +.PHONY : contrib/MathEval/symbol_table.cpp.s + +contrib/MathEval/xmath.o: contrib/MathEval/xmath.cpp.o +.PHONY : contrib/MathEval/xmath.o + +# target to build an object file +contrib/MathEval/xmath.cpp.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/xmath.cpp.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/xmath.cpp.o +.PHONY : contrib/MathEval/xmath.cpp.o + +contrib/MathEval/xmath.i: contrib/MathEval/xmath.cpp.i +.PHONY : contrib/MathEval/xmath.i + +# target to preprocess a source file +contrib/MathEval/xmath.cpp.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/xmath.cpp.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/xmath.cpp.i +.PHONY : contrib/MathEval/xmath.cpp.i + +contrib/MathEval/xmath.s: contrib/MathEval/xmath.cpp.s +.PHONY : contrib/MathEval/xmath.s + +# target to generate assembly for a file +contrib/MathEval/xmath.cpp.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/MathEval/xmath.cpp.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/MathEval/xmath.cpp.s +.PHONY : contrib/MathEval/xmath.cpp.s + +contrib/Tetgen/predicates.o: contrib/Tetgen/predicates.cxx.o +.PHONY : contrib/Tetgen/predicates.o + +# target to build an object file +contrib/Tetgen/predicates.cxx.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/predicates.cxx.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/predicates.cxx.o +.PHONY : contrib/Tetgen/predicates.cxx.o + +contrib/Tetgen/predicates.i: contrib/Tetgen/predicates.cxx.i +.PHONY : contrib/Tetgen/predicates.i + +# target to preprocess a source file +contrib/Tetgen/predicates.cxx.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/predicates.cxx.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/predicates.cxx.i +.PHONY : contrib/Tetgen/predicates.cxx.i + +contrib/Tetgen/predicates.s: contrib/Tetgen/predicates.cxx.s +.PHONY : contrib/Tetgen/predicates.s + +# target to generate assembly for a file +contrib/Tetgen/predicates.cxx.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/predicates.cxx.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/predicates.cxx.s +.PHONY : contrib/Tetgen/predicates.cxx.s + +contrib/Tetgen/tetgen.o: contrib/Tetgen/tetgen.cxx.o +.PHONY : contrib/Tetgen/tetgen.o + +# target to build an object file +contrib/Tetgen/tetgen.cxx.o: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/tetgen.cxx.o + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/tetgen.cxx.o +.PHONY : contrib/Tetgen/tetgen.cxx.o + +contrib/Tetgen/tetgen.i: contrib/Tetgen/tetgen.cxx.i +.PHONY : contrib/Tetgen/tetgen.i + +# target to preprocess a source file +contrib/Tetgen/tetgen.cxx.i: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/tetgen.cxx.i + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/tetgen.cxx.i +.PHONY : contrib/Tetgen/tetgen.cxx.i + +contrib/Tetgen/tetgen.s: contrib/Tetgen/tetgen.cxx.s +.PHONY : contrib/Tetgen/tetgen.s + +# target to generate assembly for a file +contrib/Tetgen/tetgen.cxx.s: + $(MAKE) -f CMakeFiles/gmsh.dir/build.make CMakeFiles/gmsh.dir/contrib/Tetgen/tetgen.cxx.s + $(MAKE) -f CMakeFiles/lib.dir/build.make CMakeFiles/lib.dir/contrib/Tetgen/tetgen.cxx.s +.PHONY : contrib/Tetgen/tetgen.cxx.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... clean_doc" + @echo "... doc" + @echo "... edit_cache" + @echo "... gmsh" + @echo "... html" + @echo "... info" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... lib" + @echo "... list_install_components" + @echo "... package" + @echo "... package_source" + @echo "... parser" + @echo "... pdf" + @echo "... purge" + @echo "... rebuild_cache" + @echo "... txt" + @echo "... Common/CommandLine.o" + @echo "... Common/CommandLine.i" + @echo "... Common/CommandLine.s" + @echo "... Common/Context.o" + @echo "... Common/Context.i" + @echo "... Common/Context.s" + @echo "... Common/CreateFile.o" + @echo "... Common/CreateFile.i" + @echo "... Common/CreateFile.s" + @echo "... Common/Gmsh.o" + @echo "... Common/Gmsh.i" + @echo "... Common/Gmsh.s" + @echo "... Common/GmshDaemon.o" + @echo "... Common/GmshDaemon.i" + @echo "... Common/GmshDaemon.s" + @echo "... Common/GmshMessage.o" + @echo "... Common/GmshMessage.i" + @echo "... Common/GmshMessage.s" + @echo "... Common/ListUtils.o" + @echo "... Common/ListUtils.i" + @echo "... Common/ListUtils.s" + @echo "... Common/Main.o" + @echo "... Common/Main.i" + @echo "... Common/Main.s" + @echo "... Common/MallocUtils.o" + @echo "... Common/MallocUtils.i" + @echo "... Common/MallocUtils.s" + @echo "... Common/OS.o" + @echo "... Common/OS.i" + @echo "... Common/OS.s" + @echo "... Common/Octree.o" + @echo "... Common/Octree.i" + @echo "... Common/Octree.s" + @echo "... Common/OctreeInternals.o" + @echo "... Common/OctreeInternals.i" + @echo "... Common/OctreeInternals.s" + @echo "... Common/OpenFile.o" + @echo "... Common/OpenFile.i" + @echo "... Common/OpenFile.s" + @echo "... Common/Options.o" + @echo "... Common/Options.i" + @echo "... Common/Options.s" + @echo "... Common/SmoothData.o" + @echo "... Common/SmoothData.i" + @echo "... Common/SmoothData.s" + @echo "... Common/StringUtils.o" + @echo "... Common/StringUtils.i" + @echo "... Common/StringUtils.s" + @echo "... Common/TreeUtils.o" + @echo "... Common/TreeUtils.i" + @echo "... Common/TreeUtils.s" + @echo "... Common/VertexArray.o" + @echo "... Common/VertexArray.i" + @echo "... Common/VertexArray.s" + @echo "... Common/avl.o" + @echo "... Common/avl.i" + @echo "... Common/avl.s" + @echo "... Geo/CellComplex.o" + @echo "... Geo/CellComplex.i" + @echo "... Geo/CellComplex.s" + @echo "... Geo/ChainComplex.o" + @echo "... Geo/ChainComplex.i" + @echo "... Geo/ChainComplex.s" + @echo "... Geo/ExtrudeParams.o" + @echo "... Geo/ExtrudeParams.i" + @echo "... Geo/ExtrudeParams.s" + @echo "... Geo/GEdge.o" + @echo "... Geo/GEdge.i" + @echo "... Geo/GEdge.s" + @echo "... Geo/GEdgeCompound.o" + @echo "... Geo/GEdgeCompound.i" + @echo "... Geo/GEdgeCompound.s" + @echo "... Geo/GEdgeLoop.o" + @echo "... Geo/GEdgeLoop.i" + @echo "... Geo/GEdgeLoop.s" + @echo "... Geo/GEntity.o" + @echo "... Geo/GEntity.i" + @echo "... Geo/GEntity.s" + @echo "... Geo/GFace.o" + @echo "... Geo/GFace.i" + @echo "... Geo/GFace.s" + @echo "... Geo/GFaceCompound.o" + @echo "... Geo/GFaceCompound.i" + @echo "... Geo/GFaceCompound.s" + @echo "... Geo/GModel.o" + @echo "... Geo/GModel.i" + @echo "... Geo/GModel.s" + @echo "... Geo/GModelIO_CGNS.o" + @echo "... Geo/GModelIO_CGNS.i" + @echo "... Geo/GModelIO_CGNS.s" + @echo "... Geo/GModelIO_Fourier.o" + @echo "... Geo/GModelIO_Fourier.i" + @echo "... Geo/GModelIO_Fourier.s" + @echo "... Geo/GModelIO_Geo.o" + @echo "... Geo/GModelIO_Geo.i" + @echo "... Geo/GModelIO_Geo.s" + @echo "... Geo/GModelIO_MED.o" + @echo "... Geo/GModelIO_MED.i" + @echo "... Geo/GModelIO_MED.s" + @echo "... Geo/GModelIO_Mesh.o" + @echo "... Geo/GModelIO_Mesh.i" + @echo "... Geo/GModelIO_Mesh.s" + @echo "... Geo/GModelIO_OCC.o" + @echo "... Geo/GModelIO_OCC.i" + @echo "... Geo/GModelIO_OCC.s" + @echo "... Geo/GRegion.o" + @echo "... Geo/GRegion.i" + @echo "... Geo/GRegion.s" + @echo "... Geo/GRegionCompound.o" + @echo "... Geo/GRegionCompound.i" + @echo "... Geo/GRegionCompound.s" + @echo "... Geo/GVertex.o" + @echo "... Geo/GVertex.i" + @echo "... Geo/GVertex.s" + @echo "... Geo/Geo.o" + @echo "... Geo/Geo.i" + @echo "... Geo/Geo.s" + @echo "... Geo/GeoInterpolation.o" + @echo "... Geo/GeoInterpolation.i" + @echo "... Geo/GeoInterpolation.s" + @echo "... Geo/GeoStringInterface.o" + @echo "... Geo/GeoStringInterface.i" + @echo "... Geo/GeoStringInterface.s" + @echo "... Geo/GeomMeshMatcher.o" + @echo "... Geo/GeomMeshMatcher.i" + @echo "... Geo/GeomMeshMatcher.s" + @echo "... Geo/Homology.o" + @echo "... Geo/Homology.i" + @echo "... Geo/Homology.s" + @echo "... Geo/MElement.o" + @echo "... Geo/MElement.i" + @echo "... Geo/MElement.s" + @echo "... Geo/MElementCut.o" + @echo "... Geo/MElementCut.i" + @echo "... Geo/MElementCut.s" + @echo "... Geo/MFace.o" + @echo "... Geo/MFace.i" + @echo "... Geo/MFace.s" + @echo "... Geo/MHexahedron.o" + @echo "... Geo/MHexahedron.i" + @echo "... Geo/MHexahedron.s" + @echo "... Geo/MLine.o" + @echo "... Geo/MLine.i" + @echo "... Geo/MLine.s" + @echo "... Geo/MPrism.o" + @echo "... Geo/MPrism.i" + @echo "... Geo/MPrism.s" + @echo "... Geo/MPyramid.o" + @echo "... Geo/MPyramid.i" + @echo "... Geo/MPyramid.s" + @echo "... Geo/MQuadrangle.o" + @echo "... Geo/MQuadrangle.i" + @echo "... Geo/MQuadrangle.s" + @echo "... Geo/MTetrahedron.o" + @echo "... Geo/MTetrahedron.i" + @echo "... Geo/MTetrahedron.s" + @echo "... Geo/MTriangle.o" + @echo "... Geo/MTriangle.i" + @echo "... Geo/MTriangle.s" + @echo "... Geo/MVertex.o" + @echo "... Geo/MVertex.i" + @echo "... Geo/MVertex.s" + @echo "... Geo/MZone.o" + @echo "... Geo/MZone.i" + @echo "... Geo/MZone.s" + @echo "... Geo/MZoneBoundary.o" + @echo "... Geo/MZoneBoundary.i" + @echo "... Geo/MZoneBoundary.s" + @echo "... Geo/OCCEdge.o" + @echo "... Geo/OCCEdge.i" + @echo "... Geo/OCCEdge.s" + @echo "... Geo/OCCFace.o" + @echo "... Geo/OCCFace.i" + @echo "... Geo/OCCFace.s" + @echo "... Geo/OCCRegion.o" + @echo "... Geo/OCCRegion.i" + @echo "... Geo/OCCRegion.s" + @echo "... Geo/OCCVertex.o" + @echo "... Geo/OCCVertex.i" + @echo "... Geo/OCCVertex.s" + @echo "... Geo/OCC_Connect.o" + @echo "... Geo/OCC_Connect.i" + @echo "... Geo/OCC_Connect.s" + @echo "... Geo/SOrientedBoundingBox.o" + @echo "... Geo/SOrientedBoundingBox.i" + @echo "... Geo/SOrientedBoundingBox.s" + @echo "... Geo/STensor3.o" + @echo "... Geo/STensor3.i" + @echo "... Geo/STensor3.s" + @echo "... Geo/discreteEdge.o" + @echo "... Geo/discreteEdge.i" + @echo "... Geo/discreteEdge.s" + @echo "... Geo/discreteFace.o" + @echo "... Geo/discreteFace.i" + @echo "... Geo/discreteFace.s" + @echo "... Geo/discreteRegion.o" + @echo "... Geo/discreteRegion.i" + @echo "... Geo/discreteRegion.s" + @echo "... Geo/findLinks.o" + @echo "... Geo/findLinks.i" + @echo "... Geo/findLinks.s" + @echo "... Geo/fourierEdge.o" + @echo "... Geo/fourierEdge.i" + @echo "... Geo/fourierEdge.s" + @echo "... Geo/fourierFace.o" + @echo "... Geo/fourierFace.i" + @echo "... Geo/fourierFace.s" + @echo "... Geo/fourierProjectionFace.o" + @echo "... Geo/fourierProjectionFace.i" + @echo "... Geo/fourierProjectionFace.s" + @echo "... Geo/gmshEdge.o" + @echo "... Geo/gmshEdge.i" + @echo "... Geo/gmshEdge.s" + @echo "... Geo/gmshFace.o" + @echo "... Geo/gmshFace.i" + @echo "... Geo/gmshFace.s" + @echo "... Geo/gmshRegion.o" + @echo "... Geo/gmshRegion.i" + @echo "... Geo/gmshRegion.s" + @echo "... Geo/gmshSurface.o" + @echo "... Geo/gmshSurface.i" + @echo "... Geo/gmshSurface.s" + @echo "... Geo/gmshVertex.o" + @echo "... Geo/gmshVertex.i" + @echo "... Geo/gmshVertex.s" + @echo "... Graphics/Iso.o" + @echo "... Graphics/Iso.i" + @echo "... Graphics/Iso.s" + @echo "... Graphics/ReadImg.o" + @echo "... Graphics/ReadImg.i" + @echo "... Graphics/ReadImg.s" + @echo "... Graphics/Trackball.o" + @echo "... Graphics/Trackball.i" + @echo "... Graphics/Trackball.s" + @echo "... Graphics/drawAxes.o" + @echo "... Graphics/drawAxes.i" + @echo "... Graphics/drawAxes.s" + @echo "... Graphics/drawContext.o" + @echo "... Graphics/drawContext.i" + @echo "... Graphics/drawContext.s" + @echo "... Graphics/drawGeom.o" + @echo "... Graphics/drawGeom.i" + @echo "... Graphics/drawGeom.s" + @echo "... Graphics/drawGlyph.o" + @echo "... Graphics/drawGlyph.i" + @echo "... Graphics/drawGlyph.s" + @echo "... Graphics/drawGraph2d.o" + @echo "... Graphics/drawGraph2d.i" + @echo "... Graphics/drawGraph2d.s" + @echo "... Graphics/drawMesh.o" + @echo "... Graphics/drawMesh.i" + @echo "... Graphics/drawMesh.s" + @echo "... Graphics/drawPost.o" + @echo "... Graphics/drawPost.i" + @echo "... Graphics/drawPost.s" + @echo "... Graphics/drawScales.o" + @echo "... Graphics/drawScales.i" + @echo "... Graphics/drawScales.s" + @echo "... Graphics/gl2gif.o" + @echo "... Graphics/gl2gif.i" + @echo "... Graphics/gl2gif.s" + @echo "... Graphics/gl2jpeg.o" + @echo "... Graphics/gl2jpeg.i" + @echo "... Graphics/gl2jpeg.s" + @echo "... Graphics/gl2png.o" + @echo "... Graphics/gl2png.i" + @echo "... Graphics/gl2png.s" + @echo "... Graphics/gl2ppm.o" + @echo "... Graphics/gl2ppm.i" + @echo "... Graphics/gl2ppm.s" + @echo "... Graphics/gl2ps.o" + @echo "... Graphics/gl2ps.i" + @echo "... Graphics/gl2ps.s" + @echo "... Graphics/gl2yuv.o" + @echo "... Graphics/gl2yuv.i" + @echo "... Graphics/gl2yuv.s" + @echo "... Mesh/BDS.o" + @echo "... Mesh/BDS.i" + @echo "... Mesh/BDS.s" + @echo "... Mesh/BackgroundMesh.o" + @echo "... Mesh/BackgroundMesh.i" + @echo "... Mesh/BackgroundMesh.s" + @echo "... Mesh/BoundaryLayers.o" + @echo "... Mesh/BoundaryLayers.i" + @echo "... Mesh/BoundaryLayers.s" + @echo "... Mesh/DivideAndConquer.o" + @echo "... Mesh/DivideAndConquer.i" + @echo "... Mesh/DivideAndConquer.s" + @echo "... Mesh/Field.o" + @echo "... Mesh/Field.i" + @echo "... Mesh/Field.s" + @echo "... Mesh/Generator.o" + @echo "... Mesh/Generator.i" + @echo "... Mesh/Generator.s" + @echo "... Mesh/HighOrder.o" + @echo "... Mesh/HighOrder.i" + @echo "... Mesh/HighOrder.s" + @echo "... Mesh/gmshSmoothHighOrder.o" + @echo "... Mesh/gmshSmoothHighOrder.i" + @echo "... Mesh/gmshSmoothHighOrder.s" + @echo "... Mesh/meshGEdge.o" + @echo "... Mesh/meshGEdge.i" + @echo "... Mesh/meshGEdge.s" + @echo "... Mesh/meshGEdgeExtruded.o" + @echo "... Mesh/meshGEdgeExtruded.i" + @echo "... Mesh/meshGEdgeExtruded.s" + @echo "... Mesh/meshGFace.o" + @echo "... Mesh/meshGFace.i" + @echo "... Mesh/meshGFace.s" + @echo "... Mesh/meshGFaceBDS.o" + @echo "... Mesh/meshGFaceBDS.i" + @echo "... Mesh/meshGFaceBDS.s" + @echo "... Mesh/meshGFaceDelaunayInsertion.o" + @echo "... Mesh/meshGFaceDelaunayInsertion.i" + @echo "... Mesh/meshGFaceDelaunayInsertion.s" + @echo "... Mesh/meshGFaceExtruded.o" + @echo "... Mesh/meshGFaceExtruded.i" + @echo "... Mesh/meshGFaceExtruded.s" + @echo "... Mesh/meshGFaceOptimize.o" + @echo "... Mesh/meshGFaceOptimize.i" + @echo "... Mesh/meshGFaceOptimize.s" + @echo "... Mesh/meshGFaceQuadrilateralize.o" + @echo "... Mesh/meshGFaceQuadrilateralize.i" + @echo "... Mesh/meshGFaceQuadrilateralize.s" + @echo "... Mesh/meshGFaceTransfinite.o" + @echo "... Mesh/meshGFaceTransfinite.i" + @echo "... Mesh/meshGFaceTransfinite.s" + @echo "... Mesh/meshGRegion.o" + @echo "... Mesh/meshGRegion.i" + @echo "... Mesh/meshGRegion.s" + @echo "... Mesh/meshGRegionCarveHole.o" + @echo "... Mesh/meshGRegionCarveHole.i" + @echo "... Mesh/meshGRegionCarveHole.s" + @echo "... Mesh/meshGRegionDelaunayInsertion.o" + @echo "... Mesh/meshGRegionDelaunayInsertion.i" + @echo "... Mesh/meshGRegionDelaunayInsertion.s" + @echo "... Mesh/meshGRegionExtruded.o" + @echo "... Mesh/meshGRegionExtruded.i" + @echo "... Mesh/meshGRegionExtruded.s" + @echo "... Mesh/meshGRegionLocalMeshMod.o" + @echo "... Mesh/meshGRegionLocalMeshMod.i" + @echo "... Mesh/meshGRegionLocalMeshMod.s" + @echo "... Mesh/meshGRegionTransfinite.o" + @echo "... Mesh/meshGRegionTransfinite.i" + @echo "... Mesh/meshGRegionTransfinite.s" + @echo "... Mesh/meshPartition.o" + @echo "... Mesh/meshPartition.i" + @echo "... Mesh/meshPartition.s" + @echo "... Mesh/meshRefine.o" + @echo "... Mesh/meshRefine.i" + @echo "... Mesh/meshRefine.s" + @echo "... Mesh/qualityMeasures.o" + @echo "... Mesh/qualityMeasures.i" + @echo "... Mesh/qualityMeasures.s" + @echo "... Numeric/EigSolve.o" + @echo "... Numeric/EigSolve.i" + @echo "... Numeric/EigSolve.s" + @echo "... Numeric/FunctionSpace.o" + @echo "... Numeric/FunctionSpace.i" + @echo "... Numeric/FunctionSpace.s" + @echo "... Numeric/GaussLegendreSimplex.o" + @echo "... Numeric/GaussLegendreSimplex.i" + @echo "... Numeric/GaussLegendreSimplex.s" + @echo "... Numeric/GaussQuadratureHex.o" + @echo "... Numeric/GaussQuadratureHex.i" + @echo "... Numeric/GaussQuadratureHex.s" + @echo "... Numeric/GaussQuadratureLin.o" + @echo "... Numeric/GaussQuadratureLin.i" + @echo "... Numeric/GaussQuadratureLin.s" + @echo "... Numeric/GaussQuadratureQuad.o" + @echo "... Numeric/GaussQuadratureQuad.i" + @echo "... Numeric/GaussQuadratureQuad.s" + @echo "... Numeric/GaussQuadratureTet.o" + @echo "... Numeric/GaussQuadratureTet.i" + @echo "... Numeric/GaussQuadratureTet.s" + @echo "... Numeric/GaussQuadratureTri.o" + @echo "... Numeric/GaussQuadratureTri.i" + @echo "... Numeric/GaussQuadratureTri.s" + @echo "... Numeric/GmshMatrix.o" + @echo "... Numeric/GmshMatrix.i" + @echo "... Numeric/GmshMatrix.s" + @echo "... Numeric/GmshPredicates.o" + @echo "... Numeric/GmshPredicates.i" + @echo "... Numeric/GmshPredicates.s" + @echo "... Numeric/Numeric.o" + @echo "... Numeric/Numeric.i" + @echo "... Numeric/Numeric.s" + @echo "... Numeric/gmshConvexCombination.o" + @echo "... Numeric/gmshConvexCombination.i" + @echo "... Numeric/gmshConvexCombination.s" + @echo "... Numeric/gmshElasticity.o" + @echo "... Numeric/gmshElasticity.i" + @echo "... Numeric/gmshElasticity.s" + @echo "... Numeric/gmshHelmholtz.o" + @echo "... Numeric/gmshHelmholtz.i" + @echo "... Numeric/gmshHelmholtz.s" + @echo "... Numeric/gmshLaplace.o" + @echo "... Numeric/gmshLaplace.i" + @echo "... Numeric/gmshLaplace.s" + @echo "... Numeric/gmshLinearSystemCSR.o" + @echo "... Numeric/gmshLinearSystemCSR.i" + @echo "... Numeric/gmshLinearSystemCSR.s" + @echo "... Numeric/gmshProjection.o" + @echo "... Numeric/gmshProjection.i" + @echo "... Numeric/gmshProjection.s" + @echo "... Parser/FunctionManager.o" + @echo "... Parser/FunctionManager.i" + @echo "... Parser/FunctionManager.s" + @echo "... Parser/Gmsh.tab.o" + @echo "... Parser/Gmsh.tab.i" + @echo "... Parser/Gmsh.tab.s" + @echo "... Parser/Gmsh.yy.o" + @echo "... Parser/Gmsh.yy.i" + @echo "... Parser/Gmsh.yy.s" + @echo "... Plugin/Annotate.o" + @echo "... Plugin/Annotate.i" + @echo "... Plugin/Annotate.s" + @echo "... Plugin/Curl.o" + @echo "... Plugin/Curl.i" + @echo "... Plugin/Curl.s" + @echo "... Plugin/CutGrid.o" + @echo "... Plugin/CutGrid.i" + @echo "... Plugin/CutGrid.s" + @echo "... Plugin/CutMap.o" + @echo "... Plugin/CutMap.i" + @echo "... Plugin/CutMap.s" + @echo "... Plugin/CutParametric.o" + @echo "... Plugin/CutParametric.i" + @echo "... Plugin/CutParametric.s" + @echo "... Plugin/CutPlane.o" + @echo "... Plugin/CutPlane.i" + @echo "... Plugin/CutPlane.s" + @echo "... Plugin/CutSphere.o" + @echo "... Plugin/CutSphere.i" + @echo "... Plugin/CutSphere.s" + @echo "... Plugin/Divergence.o" + @echo "... Plugin/Divergence.i" + @echo "... Plugin/Divergence.s" + @echo "... Plugin/Eigenvalues.o" + @echo "... Plugin/Eigenvalues.i" + @echo "... Plugin/Eigenvalues.s" + @echo "... Plugin/Eigenvectors.o" + @echo "... Plugin/Eigenvectors.i" + @echo "... Plugin/Eigenvectors.s" + @echo "... Plugin/Evaluate.o" + @echo "... Plugin/Evaluate.i" + @echo "... Plugin/Evaluate.s" + @echo "... Plugin/Extract.o" + @echo "... Plugin/Extract.i" + @echo "... Plugin/Extract.s" + @echo "... Plugin/ExtractEdges.o" + @echo "... Plugin/ExtractEdges.i" + @echo "... Plugin/ExtractEdges.s" + @echo "... Plugin/ExtractElements.o" + @echo "... Plugin/ExtractElements.i" + @echo "... Plugin/ExtractElements.s" + @echo "... Plugin/FieldView.o" + @echo "... Plugin/FieldView.i" + @echo "... Plugin/FieldView.s" + @echo "... Plugin/FiniteElement.o" + @echo "... Plugin/FiniteElement.i" + @echo "... Plugin/FiniteElement.s" + @echo "... Plugin/GSHHS.o" + @echo "... Plugin/GSHHS.i" + @echo "... Plugin/GSHHS.s" + @echo "... Plugin/Gradient.o" + @echo "... Plugin/Gradient.i" + @echo "... Plugin/Gradient.s" + @echo "... Plugin/HarmonicToTime.o" + @echo "... Plugin/HarmonicToTime.i" + @echo "... Plugin/HarmonicToTime.s" + @echo "... Plugin/HomologyComputation.o" + @echo "... Plugin/HomologyComputation.i" + @echo "... Plugin/HomologyComputation.s" + @echo "... Plugin/Integrate.o" + @echo "... Plugin/Integrate.i" + @echo "... Plugin/Integrate.s" + @echo "... Plugin/Lambda2.o" + @echo "... Plugin/Lambda2.i" + @echo "... Plugin/Lambda2.s" + @echo "... Plugin/Levelset.o" + @echo "... Plugin/Levelset.i" + @echo "... Plugin/Levelset.s" + @echo "... Plugin/LongitudeLatitude.o" + @echo "... Plugin/LongitudeLatitude.i" + @echo "... Plugin/LongitudeLatitude.s" + @echo "... Plugin/MakeSimplex.o" + @echo "... Plugin/MakeSimplex.i" + @echo "... Plugin/MakeSimplex.s" + @echo "... Plugin/ModulusPhase.o" + @echo "... Plugin/ModulusPhase.i" + @echo "... Plugin/ModulusPhase.s" + @echo "... Plugin/Plugin.o" + @echo "... Plugin/Plugin.i" + @echo "... Plugin/Plugin.s" + @echo "... Plugin/PluginManager.o" + @echo "... Plugin/PluginManager.i" + @echo "... Plugin/PluginManager.s" + @echo "... Plugin/Probe.o" + @echo "... Plugin/Probe.i" + @echo "... Plugin/Probe.s" + @echo "... Plugin/Remove.o" + @echo "... Plugin/Remove.i" + @echo "... Plugin/Remove.s" + @echo "... Plugin/Skin.o" + @echo "... Plugin/Skin.i" + @echo "... Plugin/Skin.s" + @echo "... Plugin/Smooth.o" + @echo "... Plugin/Smooth.i" + @echo "... Plugin/Smooth.s" + @echo "... Plugin/SphericalRaise.o" + @echo "... Plugin/SphericalRaise.i" + @echo "... Plugin/SphericalRaise.s" + @echo "... Plugin/StreamLines.o" + @echo "... Plugin/StreamLines.i" + @echo "... Plugin/StreamLines.s" + @echo "... Plugin/Transform.o" + @echo "... Plugin/Transform.i" + @echo "... Plugin/Transform.s" + @echo "... Plugin/Triangulate.o" + @echo "... Plugin/Triangulate.i" + @echo "... Plugin/Triangulate.s" + @echo "... Plugin/Warp.o" + @echo "... Plugin/Warp.i" + @echo "... Plugin/Warp.s" + @echo "... Post/ColorTable.o" + @echo "... Post/ColorTable.i" + @echo "... Post/ColorTable.s" + @echo "... Post/OctreePost.o" + @echo "... Post/OctreePost.i" + @echo "... Post/OctreePost.s" + @echo "... Post/PView.o" + @echo "... Post/PView.i" + @echo "... Post/PView.s" + @echo "... Post/PViewData.o" + @echo "... Post/PViewData.i" + @echo "... Post/PViewData.s" + @echo "... Post/PViewDataGModel.o" + @echo "... Post/PViewDataGModel.i" + @echo "... Post/PViewDataGModel.s" + @echo "... Post/PViewDataGModelIO.o" + @echo "... Post/PViewDataGModelIO.i" + @echo "... Post/PViewDataGModelIO.s" + @echo "... Post/PViewDataIO.o" + @echo "... Post/PViewDataIO.i" + @echo "... Post/PViewDataIO.s" + @echo "... Post/PViewDataList.o" + @echo "... Post/PViewDataList.i" + @echo "... Post/PViewDataList.s" + @echo "... Post/PViewDataListIO.o" + @echo "... Post/PViewDataListIO.i" + @echo "... Post/PViewDataListIO.s" + @echo "... Post/PViewIO.o" + @echo "... Post/PViewIO.i" + @echo "... Post/PViewIO.s" + @echo "... Post/PViewOptions.o" + @echo "... Post/PViewOptions.i" + @echo "... Post/PViewOptions.s" + @echo "... Post/adaptiveData.o" + @echo "... Post/adaptiveData.i" + @echo "... Post/adaptiveData.s" + @echo "... Post/shapeFunctions.o" + @echo "... Post/shapeFunctions.i" + @echo "... Post/shapeFunctions.s" + @echo "... contrib/ANN/src/ANN.o" + @echo "... contrib/ANN/src/ANN.i" + @echo "... contrib/ANN/src/ANN.s" + @echo "... contrib/ANN/src/bd_fix_rad_search.o" + @echo "... contrib/ANN/src/bd_fix_rad_search.i" + @echo "... contrib/ANN/src/bd_fix_rad_search.s" + @echo "... contrib/ANN/src/bd_pr_search.o" + @echo "... contrib/ANN/src/bd_pr_search.i" + @echo "... contrib/ANN/src/bd_pr_search.s" + @echo "... contrib/ANN/src/bd_search.o" + @echo "... contrib/ANN/src/bd_search.i" + @echo "... contrib/ANN/src/bd_search.s" + @echo "... contrib/ANN/src/bd_tree.o" + @echo "... contrib/ANN/src/bd_tree.i" + @echo "... contrib/ANN/src/bd_tree.s" + @echo "... contrib/ANN/src/brute.o" + @echo "... contrib/ANN/src/brute.i" + @echo "... contrib/ANN/src/brute.s" + @echo "... contrib/ANN/src/kd_dump.o" + @echo "... contrib/ANN/src/kd_dump.i" + @echo "... contrib/ANN/src/kd_dump.s" + @echo "... contrib/ANN/src/kd_fix_rad_search.o" + @echo "... contrib/ANN/src/kd_fix_rad_search.i" + @echo "... contrib/ANN/src/kd_fix_rad_search.s" + @echo "... contrib/ANN/src/kd_pr_search.o" + @echo "... contrib/ANN/src/kd_pr_search.i" + @echo "... contrib/ANN/src/kd_pr_search.s" + @echo "... contrib/ANN/src/kd_search.o" + @echo "... contrib/ANN/src/kd_search.i" + @echo "... contrib/ANN/src/kd_search.s" + @echo "... contrib/ANN/src/kd_split.o" + @echo "... contrib/ANN/src/kd_split.i" + @echo "... contrib/ANN/src/kd_split.s" + @echo "... contrib/ANN/src/kd_tree.o" + @echo "... contrib/ANN/src/kd_tree.i" + @echo "... contrib/ANN/src/kd_tree.s" + @echo "... contrib/ANN/src/kd_util.o" + @echo "... contrib/ANN/src/kd_util.i" + @echo "... contrib/ANN/src/kd_util.s" + @echo "... contrib/ANN/src/perf.o" + @echo "... contrib/ANN/src/perf.i" + @echo "... contrib/ANN/src/perf.s" + @echo "... contrib/DiscreteIntegration/DILevelset.o" + @echo "... contrib/DiscreteIntegration/DILevelset.i" + @echo "... contrib/DiscreteIntegration/DILevelset.s" + @echo "... contrib/DiscreteIntegration/Integration3D.o" + @echo "... contrib/DiscreteIntegration/Integration3D.i" + @echo "... contrib/DiscreteIntegration/Integration3D.s" + @echo "... contrib/DiscreteIntegration/recurCut.o" + @echo "... contrib/DiscreteIntegration/recurCut.i" + @echo "... contrib/DiscreteIntegration/recurCut.s" + @echo "... contrib/MathEval/matheval.o" + @echo "... contrib/MathEval/matheval.i" + @echo "... contrib/MathEval/matheval.s" + @echo "... contrib/MathEval/node.o" + @echo "... contrib/MathEval/node.i" + @echo "... contrib/MathEval/node.s" + @echo "... contrib/MathEval/parser.tab.o" + @echo "... contrib/MathEval/parser.tab.i" + @echo "... contrib/MathEval/parser.tab.s" + @echo "... contrib/MathEval/scanner.yy.o" + @echo "... contrib/MathEval/scanner.yy.i" + @echo "... contrib/MathEval/scanner.yy.s" + @echo "... contrib/MathEval/symbol_table.o" + @echo "... contrib/MathEval/symbol_table.i" + @echo "... contrib/MathEval/symbol_table.s" + @echo "... contrib/MathEval/xmath.o" + @echo "... contrib/MathEval/xmath.i" + @echo "... contrib/MathEval/xmath.s" + @echo "... contrib/Tetgen/predicates.o" + @echo "... contrib/Tetgen/predicates.i" + @echo "... contrib/Tetgen/predicates.s" + @echo "... contrib/Tetgen/tetgen.o" + @echo "... contrib/Tetgen/tetgen.i" + @echo "... contrib/Tetgen/tetgen.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system diff --git a/utils/api_demos/Makefile b/utils/api_demos/Makefile index e1c23fd92217b0b62eec68b30ae7e79e9b7a3107..024bbe3631c0d1671f8ca77fce0672585b5d9cd8 100644 --- a/utils/api_demos/Makefile +++ b/utils/api_demos/Makefile @@ -1,32 +1,29 @@ -# -# how to build a standalone 64 bit gmsh graphics lib on OSX: -# -# export CC="gcc -m64" -# export CXX="g++ -m64" -# ./configure --disable-gui --disable-netgen --disable-fm --disable-kbipack\ -# --disable-occ --enable-graphics --disable-med --disable-chaco\ -# --disable-metis --prefix=$HOME/src/gmsh/utils/api_demos -# make install-lib -# -GMSHLIBDIR = $(DEVROOT)/gmshLib -GMSHINCDIR = $(DEVROOT)/gmsh/include +LIB = -L/usr/local/lib -lGmsh -L. +INC = -I/usr/local/include -I. +FLAGS = -g -O2 + +mainSimple: mainSimple.cpp + g++ ${FLAGS} -o mainSimple ${INC} mainSimple.cpp ${LIB}\ + -llapack -lblas -lm mainAntTweakBar: mainAntTweakBar.cpp - g++ -g -m64 -o mainAntTweakBar -Iinclude mainAntTweakBar.cpp -Llib\ - -lGmsh -lAntTweakBar -framework OpenGL -framework GLUT -framework Cocoa\ + g++ ${FLAGS} -o mainAntTweakBar ${INC} mainAntTweakBar.cpp ${LIB}\ + -lAntTweakBar -framework OpenGL -framework GLUT -framework Cocoa\ -framework ApplicationServices -llapack -lblas -lz -lm mainGlut: mainGlut.cpp - g++ -g -m64 -o mainGlut -Iinclude mainGlut.cpp -Llib -lGmsh\ + g++ ${FLAGS} -o mainGlut ${INC} mainGlut.cpp ${LIB}\ -framework OpenGL -framework GLUT -framework Cocoa\ -framework ApplicationServices -llapack -lblas -lz -lm mainPost: mainPost.cpp - g++ -g -o mainPost -Iinclude mainPost.cpp -Llib -lGmsh\ - -framework ApplicationServices -llapack -lblas -lz -lm + g++ ${FLAGS} -o mainPost -Iinclude mainPost.cpp ${LIB}\ + -framework ApplicationServices -llapack -lblas -lm -levelset: mainLevelset.cpp - g++ -g -I${GMSHINCDIR} -DHAVE_GSL -DHAVE_GLEVELSETS -DHAVE_GMM -DHAVE_SPARSKIT \ - -o levelset mainLevelset.cpp -L${GMSHLIBDIR} -lGmsh -lgsl -lgslcblas -llapack -lblas +mainLevelset: mainLevelset.cpp + g++ ${FLAGS} -o mainLevelset mainLevelset.cpp ${LIB} -llapack -lblas +clean: + rm -rf mainSimple mainAntTweakBar mainGlut mainPost mainLevelset\ + *.dSYM *.msh *.pos diff --git a/utils/api_demos/mainAntTweakBar.cpp b/utils/api_demos/mainAntTweakBar.cpp index ece37a37bdb64b9ce34091c9c2fbb4e87ceda0e5..c6455bbac65c0ec1df4640614e3799bcd7b59ccf 100644 --- a/utils/api_demos/mainAntTweakBar.cpp +++ b/utils/api_demos/mainAntTweakBar.cpp @@ -30,9 +30,8 @@ double GetStringWidth(const char *str) { return glutBitmapLength(GLUT_BITMAP_HELVETICA_18, (const unsigned char*)str); } int GetStringHeight(){ return 18; } int GetStringDescent(){ return 6; } -void DrawString(const char *str) -{ for (int i = 0; i < strlen(str); i++) - glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, str[i]); } +void DrawString(const char *str){ for (int i = 0; i < strlen(str); i++) + glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, str[i]); } // GLUT callbacks void display() @@ -219,55 +218,64 @@ int main(int argc, char **argv) TwGLUTModifiersFunc(glutGetModifiers); TwBar *bar = TwNewBar("Options"); - TwDefine(" Options size='200 400' color='50 50 50' alpha=128"); + TwDefine("Options size='200 400' color='50 50 50' alpha=128"); { TwEnumVal axesEV[6] = { {0, "None"}, {1, "Simple axes"}, {2, "Box"}, {3, "Full grid"}, {4, "Open grid"}, {5, "Ruler"} }; TwType axesType = TwDefineEnum("AxesType", axesEV, 6); - TwAddVarCB(bar, "Axes", axesType, SetInt32CB, GetInt32CB, (void*)"General.Axes", - " group='General' help='Change axes.' "); - TwAddVarCB(bar, "LightDir", TW_TYPE_DIR3D, SetLightDirCB, GetLightDirCB, 0, - " group='General' label='Light direction' close help='Change light direction.' "); + TwAddVarCB(bar, "Axes", axesType, SetInt32CB, GetInt32CB, + (void*)"General.Axes", "group='General' help='Change axes.' "); + TwAddVarCB(bar, "LightDir", TW_TYPE_DIR3D, SetLightDirCB, GetLightDirCB, + 0, "group='General' label='Light direction' close help='Change " + "light direction.' "); { - TwAddVarCB(bar, "Background", TW_TYPE_COLOR32, SetColorCB, GetColorCB, (void*)"General.Background", - " group='GeneralColor' label='Background color' "); - TwAddVarCB(bar, "BackgroundGradient", TW_TYPE_COLOR32, SetColorCB, GetColorCB, (void*)"General.BackgroundGradient", - " group='GeneralColor' label='Background gradient color' "); - TwDefine(" Options/GeneralColor label='Colors' close group='General' "); + TwAddVarCB(bar, "Background", TW_TYPE_COLOR32, SetColorCB, GetColorCB, + (void*)"General.Background", "group='GeneralColor' " + "label='Background color' "); + TwAddVarCB(bar, "BackgroundGradient", TW_TYPE_COLOR32, SetColorCB, GetColorCB, + (void*)"General.BackgroundGradient", "group='GeneralColor' " + "label='Background gradient color' "); + TwDefine("Options/GeneralColor label='Colors' close group='General' "); } - TwDefine(" Options/General close "); + TwDefine("Options/General close "); } { - TwAddVarCB(bar, "Points", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Geometry.Points", - " group='Geometry' help='Draw points.' "); - TwAddVarCB(bar, "Lines", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Geometry.Lines", - " group='Geometry' help='Draw lines.' "); - TwAddVarCB(bar, "Surfaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Geometry.Surfaces", - " group='Geometry' help='Draw surfaces.' "); - TwAddVarCB(bar, "Volumes", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Geometry.Volumes", - " group='Geometry' help='Draw volumes.' "); + TwAddVarCB(bar, "Points", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Geometry.Points", "group='Geometry' help='Draw points.' "); + TwAddVarCB(bar, "Lines", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Geometry.Lines", "group='Geometry' help='Draw lines.' "); + TwAddVarCB(bar, "Surfaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Geometry.Surfaces", "group='Geometry' help='Draw surfaces.' "); + TwAddVarCB(bar, "Volumes", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Geometry.Volumes", "group='Geometry' help='Draw volumes.' "); } { - TwAddVarCB(bar, "Vertices", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.Points", - " group='Mesh' help='Draw mesh vertices.' "); - TwAddVarCB(bar, "MeshLines", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.Lines", - " group='Mesh' label='Lines' help='Draw line mesh.' "); - TwAddVarCB(bar, "SurfaceEdges", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.SurfaceEdges", - " group='Mesh' label='Surface edges' help='Draw surface mesh edges.' "); - TwAddVarCB(bar, "SurfaceFaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.SurfaceFaces", - " group='Mesh' label='Surface faces' help='Draw surface mesh faces.' "); - TwAddVarCB(bar, "VolumeEdges", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.VolumeEdges", - " group='Mesh' label='Volume edges' help='Draw volume mesh edges.' "); - TwAddVarCB(bar, "VolumeFaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, (void*)"Mesh.VolumeFaces", - " group='Mesh' label='Volume faces' help='Draw volume mesh faces.' "); - TwAddVarCB(bar, "Explode", TW_TYPE_DOUBLE, SetDoubleCB, GetDoubleCB, (void*)"Mesh.Explode", - " group='Mesh' label='Explode factor' min=0 max=1 step=0.01 help='Explode mesh.' "); - TwAddVarCB(bar, "SizeFactor", TW_TYPE_DOUBLE, SetDoubleCB, GetDoubleCB, (void*)"Mesh.CharacteristicLengthFactor", - " group='Mesh' label='Element size factor' min=0.01 max=100 step=0.01 "); + TwAddVarCB(bar, "Vertices", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.Points", "group='Mesh' help='Draw mesh vertices.' "); + TwAddVarCB(bar, "MeshLines", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.Lines", "group='Mesh' label='Lines' help='Draw line mesh.' "); + TwAddVarCB(bar, "SurfaceEdges", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.SurfaceEdges", "group='Mesh' label='Surface edges' " + "help='Draw surface mesh edges.' "); + TwAddVarCB(bar, "SurfaceFaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.SurfaceFaces", "group='Mesh' label='Surface faces' " + "help='Draw surface mesh faces.' "); + TwAddVarCB(bar, "VolumeEdges", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.VolumeEdges", "group='Mesh' label='Volume edges' " + "help='Draw volume mesh edges.' "); + TwAddVarCB(bar, "VolumeFaces", TW_TYPE_BOOL32, SetInt32CB, GetInt32CB, + (void*)"Mesh.VolumeFaces", "group='Mesh' label='Volume faces' " + "help='Draw volume mesh faces.' "); + TwAddVarCB(bar, "Explode", TW_TYPE_DOUBLE, SetDoubleCB, GetDoubleCB, + (void*)"Mesh.Explode", "group='Mesh' label='Explode factor' " + "min=0 max=1 step=0.01 help='Explode mesh.' "); + TwAddVarCB(bar, "SizeFactor", TW_TYPE_DOUBLE, SetDoubleCB, GetDoubleCB, + (void*)"Mesh.CharacteristicLengthFactor", "group='Mesh' " + "label='Element size factor' min=0.01 max=100 step=0.01 "); } TwBar *menubar = TwNewBar("Menu"); - TwDefine(" Menu size='200 400' position='500 30' iconified='true' "); + TwDefine("Menu size='200 400' position='500 30' iconified='true' "); TwAddButton(menubar, "Elementary entities", MenuCB, (void*)"Elementary", 0); TwAddButton(menubar, "Physical groups", MenuCB, (void*)"Physical", 0); TwAddButton(menubar, "Edit", MenuCB, (void*)"Edit", 0); diff --git a/utils/api_demos/mainSimple.cpp b/utils/api_demos/mainSimple.cpp index 46e927deb2510acf70502a8c5df966462465b43d..bbeae799428bfd397cb623e11a916aed1fe5bfba 100644 --- a/utils/api_demos/mainSimple.cpp +++ b/utils/api_demos/mainSimple.cpp @@ -1,10 +1,3 @@ -// configure, compile and install Gmsh as a library with -// -// ./configure --disable-gui -// make install-lib -// -// Then compile this driver with "g++ driver.cpp -lGmsh -llapack -lblas" - #include <stdio.h> #include <gmsh/Gmsh.h> #include <gmsh/GModel.h> diff --git a/utils/api_demos/qt/CMakeLists.txt b/utils/api_demos/qt/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..61001f9ea1e31c784aeda3d876a7a931b8f18049 --- /dev/null +++ b/utils/api_demos/qt/CMakeLists.txt @@ -0,0 +1,27 @@ +project(qtgmsh) + +cmake_minimum_required(VERSION 2.4.0) + +find_package(Qt4 REQUIRED) # find and setup Qt4 for this project + +set(QT_USE_QTOPENGL TRUE) +include(${QT_USE_FILE}) + +set(qtgmsh_SRCS + glwidget.cpp + main.cpp + window.cpp +) +set(qtgmsh_MOC_HDRS + glwidget.h + window.h +) +qt4_wrap_cpp(qtgmsh_MOC_SRCS ${qtgmsh_MOC_HDRS}) +add_executable(qtgmsh ${qtgmsh_SRCS} ${qtgmsh_MOC_SRCS}) +include_directories(../include) +find_library(GMSH_LIBRARIES Gmsh ../lib) +target_link_libraries(qtgmsh ${QT_LIBRARIES} ${GMSH_LIBRARIES} -llapack -lblas) + +#install(TARGETS qtproject DESTINATION bin) +# tell cmake to process CMakeLists.txt in that subdirectory +# add_subdirectory(src) diff --git a/utils/api_demos/qt/glwidget.cpp b/utils/api_demos/qt/glwidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55cef8dfe5c63cabb6790ddc0dfcbf5b0dee5016 --- /dev/null +++ b/utils/api_demos/qt/glwidget.cpp @@ -0,0 +1,87 @@ +#include <QtGui> +#include <QtOpenGL> +#include <math.h> +#include "glwidget.h" + +drawContext *GLWidget::_ctx = 0; + +// Gmsh redefinitions (reimplement stuff in Fltk/Draw.h) +void Draw(){ GLWidget::_ctx->draw3d(); GLWidget::_ctx->draw2d(); } +void DrawCurrentOpenglWindow(bool make_current){} +void DrawPlugin(void (*draw)(void *context)){} +int GetFontIndex(const char *fontname){ return 0; } +int GetFontEnum(int index){ return 0; } +const char *GetFontName(int index){ return "Helvetica"; } +int GetFontAlign(const char *alignstr){ return 0; } +int GetFontSize(){ return 18; } +void SetFont(int fontid, int fontsize){} +double GetStringWidth(const char *str){ return 0; } +int GetStringHeight(){ return 18; } +int GetStringDescent(){ return 6; } +void DrawString(const char *str){ } + +GLWidget::GLWidget(QWidget *parent) + : QGLWidget(parent) +{ + _ctx = new drawContext(); +} + +GLWidget::~GLWidget() +{ + makeCurrent(); + delete _ctx; +} + +QSize GLWidget::minimumSizeHint() const +{ + return QSize(50, 50); +} + +QSize GLWidget::sizeHint() const +{ + return QSize(400, 400); +} + +void GLWidget::setXRotation(int angle) +{ + emit xRotationChanged(angle); + updateGL(); +} + +void GLWidget::initializeGL() +{ +} + +void GLWidget::paintGL() +{ + glViewport(_ctx->viewport[0], _ctx->viewport[1], + _ctx->viewport[2], _ctx->viewport[3]); + glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); + Draw(); +} + +void GLWidget::resizeGL(int width, int height) +{ + _ctx->viewport[2] = width; + _ctx->viewport[3] = height; +} + +void GLWidget::mousePressEvent(QMouseEvent *event) +{ +} + +void GLWidget::mouseMoveEvent(QMouseEvent *event) +{ + /* + int dx = event->x() - lastPos.x(); + int dy = event->y() - lastPos.y(); + if (event->buttons() & Qt::LeftButton) { + setXRotation(xRot + 8 * dy); + setYRotation(yRot + 8 * dx); + } else if (event->buttons() & Qt::RightButton) { + setXRotation(xRot + 8 * dy); + setZRotation(zRot + 8 * dx); + } + lastPos = event->pos(); + */ +} diff --git a/utils/api_demos/qt/glwidget.h b/utils/api_demos/qt/glwidget.h new file mode 100644 index 0000000000000000000000000000000000000000..78f6ad766a8611c78231ed58c29a2570acba6a1e --- /dev/null +++ b/utils/api_demos/qt/glwidget.h @@ -0,0 +1,31 @@ +#ifndef GLWIDGET_H +#define GLWIDGET_H + +#include <QGLWidget> + +#include <gmsh/Gmsh.h> +#include <gmsh/drawContext.h> + +class GLWidget : public QGLWidget +{ + Q_OBJECT + private: + public: + static drawContext *_ctx; + GLWidget(QWidget *parent = 0); + ~GLWidget(); + QSize minimumSizeHint() const; + QSize sizeHint() const; + public slots: + void setXRotation(int angle); + signals: + void xRotationChanged(int angle); + protected: + void initializeGL(); + void paintGL(); + void resizeGL(int width, int height); + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); +}; + +#endif diff --git a/utils/api_demos/qt/main.cpp b/utils/api_demos/qt/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0bc55c821954ff557c01ee7c720b3940255973ac --- /dev/null +++ b/utils/api_demos/qt/main.cpp @@ -0,0 +1,17 @@ +#include <QApplication> + +#include <gmsh/Gmsh.h> + +#include "window.h" + +int main(int argc, char *argv[]) +{ + GmshInitialize(argc, argv); + GmshSetOption("General", "Terminal", 1.); + for(int i = 1; i < argc; i++) GmshMergeFile(argv[i]); + + QApplication app(argc, argv); + Window window; + window.show(); + return app.exec(); +} diff --git a/utils/api_demos/qt/window.cpp b/utils/api_demos/qt/window.cpp new file mode 100644 index 0000000000000000000000000000000000000000..363ea9946d49b7deba9d7b6e6bd8bdbda517e2ce --- /dev/null +++ b/utils/api_demos/qt/window.cpp @@ -0,0 +1,26 @@ +#include <QtGui> +#include "glwidget.h" +#include "window.h" + +Window::Window() +{ + glWidget = new GLWidget; + + xSlider = new QSlider(Qt::Vertical); + xSlider->setRange(0, 360 * 16); + xSlider->setSingleStep(16); + xSlider->setPageStep(15 * 16); + xSlider->setTickInterval(15 * 16); + xSlider->setTickPosition(QSlider::TicksRight); + xSlider->setValue(15 * 16); + + connect(xSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXRotation(int))); + connect(glWidget, SIGNAL(xRotationChanged(int)), xSlider, SLOT(setValue(int))); + + QHBoxLayout *mainLayout = new QHBoxLayout; + mainLayout->addWidget(glWidget); + mainLayout->addWidget(xSlider); + setLayout(mainLayout); + + setWindowTitle(tr("QtGmsh")); +} diff --git a/utils/api_demos/qt/window.h b/utils/api_demos/qt/window.h new file mode 100644 index 0000000000000000000000000000000000000000..bc20e1f1a33d639cb69b6b956e9fd08b1151d8fb --- /dev/null +++ b/utils/api_demos/qt/window.h @@ -0,0 +1,19 @@ +#ifndef WINDOW_H +#define WINDOW_H + +#include <QWidget> + +class QSlider; +class GLWidget; + +class Window : public QWidget +{ + Q_OBJECT + private: + GLWidget *glWidget; + QSlider *xSlider; + public: + Window(); +}; + +#endif diff --git a/utils/converters/autocad/Makefile b/utils/converters/autocad/Makefile deleted file mode 100644 index 0b1c061ee6eb2c3a69578b22fe28e0c1c0571594..0000000000000000000000000000000000000000 --- a/utils/converters/autocad/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $Id: Makefile,v 1.4 2008-06-07 17:20:58 geuzaine Exp $ -# -# Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Please report all bugs and problems to <gmsh@geuz.org>. - -include ../../../variables - -dxf2geo: dxf2geo.cpp - ${CXX} ${OPTIM} -o ../../../bin/dxf2geo dxf2geo.cpp -lm - -clean: - rm -f *.o - -depend: - true diff --git a/utils/misc/GmshConfig.depend b/utils/misc/GmshConfig.depend deleted file mode 100644 index 97d6437e2883d10f99386093bd86baeb0b120d52..0000000000000000000000000000000000000000 --- a/utils/misc/GmshConfig.depend +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _GMSH_CONFIG_H_ -#define _GMSH_CONFIG_H_ - -#define HAVE_ANN -#define HAVE_BLAS -#define HAVE_CHACO -#define HAVE_FLTK -#define HAVE_LAPACK -#define HAVE_METIS - -#endif diff --git a/utils/misc/GmshConfig.msvc b/utils/misc/GmshConfig.msvc deleted file mode 100644 index 28675f120c4d91db8bef109d8b188af3e84ddede..0000000000000000000000000000000000000000 --- a/utils/misc/GmshConfig.msvc +++ /dev/null @@ -1,14 +0,0 @@ -// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -// -// See the LICENSE.txt file for license information. Please report all -// bugs and problems to <gmsh@geuz.org>. - -#ifndef _GMSH_CONFIG_H_ -#define _GMSH_CONFIG_H_ - -// This file is empty on purpose: with MSVC we define everything in -// the FLAGS variable (in the 'variables' file) - -#define GMSH_CONFIG_OPTIONS "" - -#endif diff --git a/utils/misc/gmake.exe b/utils/misc/gmake.exe deleted file mode 100755 index d75c793a22419ef6fdd08b8ef4379e94f2d12924..0000000000000000000000000000000000000000 Binary files a/utils/misc/gmake.exe and /dev/null differ diff --git a/utils/misc/gmsh.spec b/utils/misc/gmsh.spec deleted file mode 100644 index 35663d0a89a12ba6be4e2041ad1b9b30eb7f28a0..0000000000000000000000000000000000000000 --- a/utils/misc/gmsh.spec +++ /dev/null @@ -1,56 +0,0 @@ -Summary: A 3D mesh generator with pre- and post-processing facilities -Name: gmsh -# Version: 1.0 -Version: %{gmshversion} -Source: gmsh-%{version}.tar.gz -Release: 1 -Copyright: GPL -Group: Applications/Engineering -URL: http://www.geuz.org/gmsh/ -Packager: geuz@geuz.org -Prereq: /sbin/install-info -Buildroot: /var/tmp/%{name}-buildroot -Requires: Mesa >= 3.2 -Prefix: /usr - -%description -Gmsh is an automatic three-dimensional finite element mesh generator -with built-in pre- and post-processing facilities. Its primal design -goal is to provide a simple meshing tool for academic test cases with -parametric input and up to date visualization capabilities. - -Install Gmsh if you need a simple 3D finite element mesh generator -and/or post-processor. - -%prep - -%setup -c -q - -%build -make distrib-unix -make doc-info -strip bin/gmsh -rm -rf CVS */CVS */*/CVS - -%install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/bin -mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 -mkdir -p $RPM_BUILD_ROOT/usr/share/info - -install -m 755 bin/gmsh $RPM_BUILD_ROOT/usr/bin/gmsh -install -m 644 doc/gmsh.1 $RPM_BUILD_ROOT/usr/share/man/man1/gmsh.1 -install -m 644 doc/texinfo/gmsh.info* $RPM_BUILD_ROOT/usr/share/info/ - -%post -/sbin/install-info /usr/share/info/gmsh.info /usr/share/info/dir - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%doc doc/LICENSE.txt doc/VERSIONS.txt doc/FAQ.txt doc/CREDITS.txt demos tutorial -/usr/bin/gmsh -/usr/share/man/man1/gmsh* -/usr/share/info/gmsh* diff --git a/utils/misc/gmsh_bundle.sh b/utils/misc/gmsh_bundle.sh new file mode 100755 index 0000000000000000000000000000000000000000..5314b991af4e6048581feb073f2d04020aae2037 --- /dev/null +++ b/utils/misc/gmsh_bundle.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +GMSH_BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/Gmsh//'`" +GMSH_RESOURCES="$GMSH_BUNDLE/Contents/Resources" +exec $GMSH_RESOURCES/bin/gmsh diff --git a/utils/misc/purge.sh b/utils/misc/purge.sh new file mode 100755 index 0000000000000000000000000000000000000000..a9f0b4fba751b275a4fe31a29b88021262304fca --- /dev/null +++ b/utils/misc/purge.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +to_delete=`find . -name "*~" -o -name "*~~" -o -name ".gmsh-errors"\ + -o -name "\#*" -o -name ".\#*" -o -name ".DS_Store"\ + -o -name "gmon.out" -o -name ".gdb_history" -o -name "debug?.pos"\ + -o -name "*.bak"` +rm -f ${to_delete} diff --git a/utils/misc/variables.iphone b/utils/misc/variables.iphone deleted file mode 100644 index 6b656533993437adb06a99910c5029d1fbb07e57..0000000000000000000000000000000000000000 --- a/utils/misc/variables.iphone +++ /dev/null @@ -1,74 +0,0 @@ -# 1) Build the framework for the iPhone simulator with: -# ./configure --enable-minimal --enable-universal -# make clean -# make framework -# -# 2) Build the lib for the real iPhone (arm cpu) and add it to the framework -# cp utils/misc/variables.iphone variables -# make clean -# make lib -# cp Gmsh.framework/Versions/A/Gmsh lib/libGmshUniversal.a -# lipo -create lib/libGmsh.a lib/libGmshUniversal.a -# -output Gmsh.framework/Versions/A/Gmsh -# 3) You can now use the framework to develop on any mac platform, -# including the iPhone - -# OS and host -UNAME=Darwin -HOSTNAME=mbp.local - -IPHONE=/Developer/Platforms/iPhoneOS.platform/Developer -SDK=${IPHONE}/SDKs/iPhoneOS2.0.sdk - -# The names of the C and C++ compilers -CC=${IPHONE}/usr/bin/arm-apple-darwin9-gcc-4.0.1 -CXX=${IPHONE}/usr/bin/arm-apple-darwin9-g++-4.0.1 - -# If you need to link to dynamic libraries installed in non-standard -# locations and are using the GNU linker, you may want to add -# '-Wl,--rpath,/path/to/dynamic/library' to the 'LINKER' variable -# below. Alternatively, you could edit the 'LD_LIBARY_PATH' -# environement variable or use the 'ldconfig' program. -LINKER=${CXX} - -# All compiler flags except optimization flags -FLAGS=-DHAVE_NO_DLL -DHAVE_NO_PARSER -DHAVE_NO_POST -I${IPHONE}/usr/include -I${IPHONE}/usr/lib/gcc/arm-apple-darwin9/4.0.1/include -I${SDK}/usr/include -I${SDK}/usr/include/c++/4.0.0 -I${SDK}/usr/include/c++/4.0.0/arm-apple-darwin9 - -# Additional system includes -SYSINCLUDE= - -# Compiler optimization flags -OPTIM=-Os - -# Gmsh subdirectories -GMSH_DIRS=Common Geo Mesh Numeric contrib/NR - -# Gmsh libraries -GMSH_LIBS=-Llib Common/Main.o -lGmshCommon -lGmshGeo -lGmshMesh -lGmshCommon -lGmshNumeric -lGmshNR -lm -framework ApplicationServices - -# How you create a static library on this machine -AR=${IPHONE}/usr/bin/libtool -o -ARFLAGS= -RANLIB=true - -# The symbol used in front of compiler flags -DASH=- - -# The extension to use for object files, libraries and executables -OBJEXT=.o -LIBEXT=.a -EXEEXT= - -# File handling commands -RM=rm -f - -# Installation directories -prefix=/usr/local -exec_prefix=${prefix} -bindir=${exec_prefix}/bin -datadir=${datarootdir} -datarootdir=${prefix}/share -includedir=${prefix}/include -libdir=${exec_prefix}/lib -mandir=${datarootdir}/man -infodir=${datarootdir}/info diff --git a/utils/misc/variables.msvc b/utils/misc/variables.msvc deleted file mode 100644 index e80932c6f9dc1537dc351ac516d7df450da756af..0000000000000000000000000000000000000000 --- a/utils/misc/variables.msvc +++ /dev/null @@ -1,181 +0,0 @@ -# This is a pre-filled variables file for building Gmsh with Microsoft -# Visual C++ (MSVC) 2005 and 2008. -# -# See doc/README.msvc for building instructions. - -################################################################## - -# Change this if you want to use a posix shell (e.g. in cygwin) instead -# of the windows cmd shell -USE_WINDOWS_CMD_SHELL=1 - -ifeq (${USE_WINDOWS_CMD_SHELL},1) - # Change this to match where the gmsh sources are installed - MAKE="E:/src/gmsh/utils/misc/gmake.exe" - UNAME=WIN32MSVC - RM=erase - MV=move -else - # If you don't have all the MSVC variables defined in your POSIX shell - # you can use this to compile: 'cmd.exe /c "vcvars32.bat && make"' - MAKE=make - UNAME=WIN32 - RM=rm -f - MV=mv -f -endif - -# Change the following to select which version to build: -ENABLE_GUI=0 -ENABLE_BLAS_LAPACK=1 -ENABLE_PARSER=1 -ENABLE_POSTPRO=1 -ENABLE_TETGEN=1 -ENABLE_NETGEN=0 -ENABLE_METIS=0 -ENABLE_OCC=0 -ENABLE_MED=0 - -# If you selected ENABLE_GUI, specify where FLTK is installed -FLTK_PREFIX="E:/src/fltk-1.1.9" - -# If you selected ENABLE_BLAS_LAPACK, specify where Blas/Lapack are installed -BLAS_LAPACK_PREFIX="E:/src/blaslapack" - -# If you selected ENABLE_OCC, specify where OpenCASCADE is installed -ifneq ($(CASROOT),) - OCC_PREFIX="${CASROOT}" -else - OCC_PREFIX="E:/src/OpenCASCADE6.3.0/ros" -endif - -# If you selected ENABLE_MED, specify where MED and HDF5 are installed -MED_PREFIX="E:/src/med-2.3.4" -HDF5_PREFIX="E:/src/hdf5-1.6.6" - -################################################################## - -# hostname -HOSTNAME=localhost - -# The names of the C and C++ compilers -CC=cl /nologo /MT -CXX=cl /EHsc /nologo /GR /MT - -# Debug/Release Single/Multi-threaded Lib/Dll flags: -# Rel-Sin-Lib: /ML -# Deb-Sin-Lib: /MLd -# Rel-Mul-Lib: /MT -# Deb-Mul-Lib: /MTd -# Rel-Mul-Dll: /MD -# Deb-Mul-Dll: /MDd - -# append different suffix for release or debug version of library -ifneq (,${findstring MTd,${CXX}}) - LIBSUFFIX=_d -else - LIBSUFFIX=_r -endif - -# increase stack size to 16Mb to avoid stack overflows in recursive -# tet classification for large 3D Delaunay grids -LINKER=cl /F16777216 - -# All compiler flags except optimization flags -FLAGS=/DWIN32 /D_USE_MATH_DEFINES /DNOMINMAX /D_CRT_SECURE_NO_DEPRECATE -FLAGS+=/DHAVE_NO_DLL /DHAVE_ANN /DHAVE_MATH_EVAL - -# Additional system includes ($INCLUDE is automatically defined by MSVC when -# you launch the MSVC command prompt) -SYSINCLUDE=/I"${INCLUDE}" - -# Compiler optimization flags -OPTIM=/O2 - -# Gmsh subdirectories -GMSH_DIRS=Common Geo Mesh Numeric contrib/ANN contrib/MathEval - -# Optional stuff -ifeq (${ENABLE_PARSER},1) - GMSH_DIRS+=Parser -else - FLAGS+=/DHAVE_NO_PARSER -endif -ifeq (${ENABLE_POSTPRO},1) - GMSH_DIRS+=Post Plugin -else - FLAGS+=/DHAVE_NO_POST -endif -ifeq (${ENABLE_NETGEN},1) - FLAGS+=/DHAVE_NETGEN - GMSH_DIRS+=contrib/Netgen -endif -ifeq (${ENABLE_TETGEN},1) - FLAGS+=/DHAVE_TETGEN - GMSH_DIRS+=contrib/Tetgen -endif -ifeq (${ENABLE_METIS},1) - FLAGS+=/DHAVE_METIS - GMSH_DIRS+=contrib/Metis -endif - -ifeq (${ENABLE_BLAS_LAPACK},1) - FLAGS+=/DHAVE_BLAS /DHAVE_LAPACK - GMSH_LIBS+=${BLAS_LAPACK_PREFIX}/liblapack.a - GMSH_LIBS+=${BLAS_LAPACK_PREFIX}/libblas.a - GMSH_LIBS+=${BLAS_LAPACK_PREFIX}/libg2c.a - GMSH_LIBS+=${BLAS_LAPACK_PREFIX}/libgcc.a -endif - -ifeq (${ENABLE_OCC},1) - FLAGS+=/DHAVE_OCC /DHAVE_NO_OCC_CONFIG_H /DWNT /I${OCC_PREFIX}/inc - GMSH_LIBS+=${OCC_PREFIX}/win32/bin/*.lib -endif -ifeq (${ENABLE_MED},1) - FLAGS+=/DHAVE_MED /I${HDF5_PREFIX}/include /I${MED_PREFIX}/include - GMSH_LIBS+=${MED_PREFIX}/lib/med.lib - GMSH_LIBS+=${HDF5_PREFIX}/lib/hdf5.lib ${HDF5_PREFIX}/lib/szlib.lib -endif - -ifeq (${ENABLE_GUI},1) - GMSH_DIRS+=Graphics Fltk contrib/NativeFileChooser contrib/TreeBrowser - FLAGS+=/DHAVE_FLTK /I${FLTK_PREFIX} /I${FLTK_PREFIX}/FL/images - FLAGS+=/DHAVE_LIBZ /DHAVE_LIBPNG /DHAVE_LIBJPEG - FLAGS+=/DHAVE_NATIVE_FILE_CHOOSER /DHAVE_TREE_BROWSER - GMSH_LIBS+=Fltk/Main.obj lib/*.lib ${FLTK_PREFIX}/lib/fltk*.lib - GMSH_LIBS+=glu32.lib opengl32.lib advapi32.lib gdi32.lib user32.lib - GMSH_LIBS+=shell32.lib ole32.lib comctl32.lib comdlg32.lib ws2_32.lib - GMSH_LIBS+=Fltk/Win32Icon.res - GMSH_LIBS+=/link /manifest:no /NODEFAULTLIB:msvcrt.lib - GMSH_LIBS+=/SUBSYSTEM:WINDOWS -else - GMSH_LIBS+=Common/Main.obj lib/*.lib - GMSH_LIBS+=ws2_32.lib - ifeq (${ENABLE_OCC},1) - GMSH_LIBS+=advapi32.lib user32.lib - endif - GMSH_LIBS+=/link /manifest:no /NODEFAULTLIB:msvcrt.lib -endif - -# How you create a static library on this machine -AR=LIB -ARFLAGS=/OUT: -RANLIB=echo - -# The symbol used in front of compiler flags -DASH=/ - -# The extension to use for object files, libraries and executables -OBJEXT=.obj -LIBEXT=.lib -EXEEXT=.exe - -# Installation directories -prefix="S:\Lib\gmsh" -exec_prefix=${prefix} -bindir=${exec_prefix}\bin -datadir=${datarootdir} -datarootdir=${prefix}\share -includedir=${prefix}\include -libdir=${exec_prefix}\lib -mandir=${datarootdir}\man -infodir=${datarootdir}\info diff --git a/utils/nightly/Makefile b/utils/nightly/Makefile deleted file mode 100644 index 0e26c6f3d7cc44544760b1ddcacfbe79f06fc92d..0000000000000000000000000000000000000000 --- a/utils/nightly/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -# makefile to create the nightly builds - -# finish the rules even if we encounter errors? -# .IGNORE: - -# be quiet? -.SILENT: gmsh-update gmsh-windows-nightly gmsh-linux-nightly gmsh-mac-nightly - -GMSH=${HOME}/src/gmsh -LOG=${GMSH}/nightly.log -WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin - -gmsh-update: - rm -f ${LOG} - rm -f ${GMSH}/Makefile* - rm -rf ${GMSH}/gmsh-*cvs* - echo "BUILD BEGIN: `date`" > ${LOG} - cd ${GMSH} && export CVS_RSH=ssh && cvs update -dPA >> ${LOG} 2>&1 - cd ${GMSH} && ./configure --enable-universal --disable-fm --disable-kbipack\ - --with-occ-prefix=/usr/local/opencascade\ - --with-fltk-prefix=/usr/local >> ${LOG} 2>&1 - cd ${GMSH} && make clean >> ${LOG} 2>&1 - -gmsh-windows-nightly: gmsh-update - cd ${GMSH} && make distrib-win-nightly >> ${LOG} 2>&1 - echo "BUILD END: `date`" >> ${LOG} - scp -C ${GMSH}/gmsh-*cvs*.zip ${WEB_BIN}/Windows/gmsh-nightly-Windows.zip - scp -C ${LOG} ${WEB_BIN}/Windows/ - -gmsh-linux-nightly: gmsh-update - cd ${GMSH} && make distrib-unix-nightly >> ${LOG} 2>&1 - echo "BUILD END: `date`" >> ${LOG} - scp ${GMSH}/gmsh-*cvs*.tgz ${WEB_BIN}/Linux/gmsh-nightly-Linux.tgz - scp ${LOG} ${WEB_BIN}/Linux/ - -gmsh-mac-nightly: gmsh-update - cd ${GMSH} && make distrib-mac-nightly >> ${LOG} 2>&1 - echo "BUILD END: `date`" >> ${LOG} - scp ${GMSH}/gmsh-*cvs*.tgz ${WEB_BIN}/MacOSX/gmsh-nightly-MacOSX.tgz - scp ${LOG} ${WEB_BIN}/MacOSX/ diff --git a/utils/nightly/crontab.linux b/utils/nightly/crontab.linux deleted file mode 100644 index 34625ed442f6c9a687bd0d4aec826e5fe2b4a1bb..0000000000000000000000000000000000000000 --- a/utils/nightly/crontab.linux +++ /dev/null @@ -1,4 +0,0 @@ -# -# this will launch a new build every night at 1h01 -# -1 1 * * * cd ${HOME}/src/gmsh/utils/nightly && make gmsh-linux-nightly diff --git a/utils/nightly/crontab.mac b/utils/nightly/crontab.mac deleted file mode 100644 index 2487f7c0b8b128917910889d2f5939252beea88c..0000000000000000000000000000000000000000 --- a/utils/nightly/crontab.mac +++ /dev/null @@ -1,4 +0,0 @@ -# -# this will launch a new build every night at 0h01 -# -1 0 * * * cd ${HOME}/src/gmsh/utils/nightly && make gmsh-mac-nightly diff --git a/utils/nightly/linux.crontab b/utils/nightly/linux.crontab new file mode 100644 index 0000000000000000000000000000000000000000..77ab9cfd23f0a31480980c5c8e789d17c3a042a3 --- /dev/null +++ b/utils/nightly/linux.crontab @@ -0,0 +1,4 @@ +# +# this will launch a new build every night at 1h01 +# +1 1 * * * ${HOME}/src/gmsh/utils/nightly/linux.sh diff --git a/utils/nightly/linux.sh b/utils/nightly/linux.sh new file mode 100755 index 0000000000000000000000000000000000000000..08fc1df9fd2672fef1f5ff4cb6f1e3091de5c9fa --- /dev/null +++ b/utils/nightly/linux.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +GMSH=${HOME}/src/gmsh +LOG=${GMSH}/nightly.log +WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/Linux + +rm -f ${LOG} +rm -rf ${GMSH}/build +echo "BUILD BEGIN: `date`" > ${LOG} +cd ${GMSH} && export CVS_RSH=ssh && cvs update -dPA >> ${LOG} 2>&1 +cd ${GMSH}/build && \ + cmake -DGMSH_EXTRA_VERSION="-cvs"\ + -DCMAKE_PREFIX_PATH:path="/usr/local;/usr/local/opencascade"\ + -DENABLE_NATIVE_FILE_CHOOSER:bool=FALSE\ + ${GMSH} >> ${LOG} 2>&1 +cd ${GMSH}/build && make package >> ${LOG} 2>&1 +echo "BUILD END: `date`" >> ${LOG} +scp -C ${GMSH}/build/gmsh-*cvs*.tar.gz ${WEB_BIN}/gmsh-nightly-Linux.tgz +scp -C ${LOG} ${WEB_BIN}/ + diff --git a/utils/nightly/mac.crontab b/utils/nightly/mac.crontab new file mode 100644 index 0000000000000000000000000000000000000000..814e58681ee9f2c15033318881a96536d1334293 --- /dev/null +++ b/utils/nightly/mac.crontab @@ -0,0 +1,4 @@ +# +# this will launch a new build every night at 0h01 +# +1 0 * * * ${HOME}/src/gmsh/utils/nightly/mac.sh diff --git a/utils/nightly/mac.sh b/utils/nightly/mac.sh new file mode 100755 index 0000000000000000000000000000000000000000..c73fc89c0cad08b1a967c98f503c7fa16232b4dc --- /dev/null +++ b/utils/nightly/mac.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +GMSH=${HOME}/src/gmsh +LOG=${GMSH}/nightly.log +WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/MacOSX + +rm -f ${LOG} +rm -rf ${GMSH}/build +echo "BUILD BEGIN: `date`" > ${LOG} +cd ${GMSH} && export CVS_RSH=ssh && cvs update -dPA >> ${LOG} 2>&1 +cd ${GMSH}/build && \ + cmake -DGMSH_EXTRA_VERSION="-cvs"\ + -DCMAKE_PREFIX_PATH:path="/usr/local;/usr/local/opencascade"\ + ${GMSH} >> ${LOG} 2>&1 +cd ${GMSH}/build && make package >> ${LOG} 2>&1 +echo "BUILD END: `date`" >> ${LOG} +scp -C ${GMSH}/build/gmsh-*cvs*.dmg ${WEB_BIN}/gmsh-nightly-MacOSX.dmg +scp -C ${LOG} ${WEB_BIN}/ + + diff --git a/utils/nightly/windows.bat b/utils/nightly/windows.bat new file mode 100755 index 0000000000000000000000000000000000000000..bd44b546e624134092f5c1a1840c7333cd33aff3 --- /dev/null +++ b/utils/nightly/windows.bat @@ -0,0 +1,6 @@ +@echo off + +C: +chdir C:\cygwin\bin + +bash --login C:\cygwin\home\Administrator\src\gmsh\utils\nightly\windows.sh diff --git a/utils/nightly/windows.sh b/utils/nightly/windows.sh new file mode 100755 index 0000000000000000000000000000000000000000..4b2a67edc7b10fe13143f08e09c76fd4065d4b61 --- /dev/null +++ b/utils/nightly/windows.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +GMSH=${HOME}/src/gmsh +LOG=${GMSH}/nightly.log +WEB_BIN=geuzaine@geuz.org:/home/www/geuz.org/gmsh/bin/Windows + +rm -f ${LOG} +rm -rf ${GMSH}/build +echo "BUILD BEGIN: `date`" > ${LOG} +cd ${GMSH} && export CVS_RSH=ssh && cvs update -dPA >> ${LOG} 2>&1 +cd ${GMSH}/build && \ + cmake -DCMAKE_CXX_FLAGS="-mno-cygwin"\ + -DCMAKE_C_FLAGS="-mno-cygwin"\ + -DGMSH_EXTRA_VERSION="-cvs"\ + -DCMAKE_PREFIX_PATH:path="/usr/local;/usr/local/opencascade"\ + ${GMSH} >> ${LOG} 2>&1 +cd ${GMSH}/build && make package >> ${LOG} 2>&1 +echo "BUILD END: `date`" >> ${LOG} +scp -C ${GMSH}/build/gmsh-*cvs*.zip ${WEB_BIN}/gmsh-nightly-Windows.zip +scp -C ${LOG} ${WEB_BIN}/ diff --git a/utils/nightly/windows_nightly.bat b/utils/nightly/windows_nightly.bat deleted file mode 100755 index ce180d80d97fe7b68bf89b92f3391032f757f420..0000000000000000000000000000000000000000 --- a/utils/nightly/windows_nightly.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -C: -chdir C:\cygwin\bin - -bash --login C:\cygwin\home\Administrator\windows_nightly.sh - diff --git a/utils/nightly/windows_nightly.sh b/utils/nightly/windows_nightly.sh deleted file mode 100644 index c80179027175c5ae6c3879562528059dc4d93041..0000000000000000000000000000000000000000 --- a/utils/nightly/windows_nightly.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd ${HOME}/src/gmsh/utils/nightly && make gmsh-windows-nightly -cd ${HOME}/src/getdp/utils/nightly && make getdp-windows-nightly diff --git a/utils/solvers/c++/Makefile b/utils/solvers/c++/Makefile deleted file mode 100644 index 75980d9b89db51f0f49c4719f6227ae7aa2e0b6f..0000000000000000000000000000000000000000 --- a/utils/solvers/c++/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $Id: Makefile,v 1.7 2006-02-24 22:07:08 geuzaine Exp $ -# -# Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# Please report all bugs and problems to <gmsh@geuz.org>. - -include ../../../variables - -all: solver.exe interactive.exe - -win: solver.cpp - ${CXX} ${FLAGS} ${OPTIM} -o solver.exe solver.cpp -lwsock32 - -solver.exe: solver.cpp - ${CXX} ${FLAGS} ${OPTIM} -o solver.exe solver.cpp - -interactive.exe: interactive.cpp - ${CXX} ${FLAGS} ${OPTIM} -o interactive.exe interactive.cpp -lreadline -ltermcap - -clean: - rm -f *.o *.exe *.pos - -depend: - true diff --git a/utils/solvers/c/Makefile b/utils/solvers/c/Makefile deleted file mode 100644 index c50169f7c4f54ff1678d47e7a3b73bc4a1e37ef0..0000000000000000000000000000000000000000 --- a/utils/solvers/c/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle -# -# See the LICENSE.txt file for license information. Please report all -# bugs and problems to <gmsh@geuz.org>. - -include ../../../variables - -solver.exe: solver.c GmshClient.c - ${CC} ${FLAGS} ${OPTIM} -o solver.exe solver.c GmshClient.c - -clean: - rm -f *.o *.exe *.pos - -depend: - true