pax_global_header00006660000000000000000000000064122640541550014516gustar00rootroot0000000000000052 comment=490aae4da4d3c2352e7318f6eb527148326446fa trunk-1.07.0/000077500000000000000000000000001226405415500127465ustar00rootroot00000000000000trunk-1.07.0/.gitignore000066400000000000000000000011561226405415500147410ustar00rootroot00000000000000tags .project VERSION yade.1 debian/changelog debian/control doc/epydoc doc/sphinx/WallStresses doc/sphinx/_build/ doc/sphinx/_publications.bib doc/sphinx/abc.xml doc/sphinx/modules.rst doc/sphinx/publications.rst doc/sphinx/references.rst doc/sphinx/yade.eudoxos.rst doc/sphinx/yade.export.rst doc/sphinx/yade.linterpolation.rst doc/sphinx/yade.log.rst doc/sphinx/yade.pack.rst doc/sphinx/yade.plot.rst doc/sphinx/yade.post2d.rst doc/sphinx/yade.qt.rst doc/sphinx/yade.timing.rst doc/sphinx/yade.utils.rst doc/sphinx/yade.wrapper.rst doc/sphinx/yade.ymport.rst doc/sphinx/yade.polyhedra_utils.rst .kdev4/ *.kdev4 *.pyc trunk-1.07.0/CMakeLists.txt000066400000000000000000000532711226405415500155160ustar00rootroot00000000000000# The YADE has the following parameters to configure: # INSTALL_PREFIX: path, where Yade will be installed (/usr/local by default) # LIBRARY_OUTPUT_PATH: path to install libraries (lib by default) # DEBUG: compile in debug-mode (OFF by default) # CMAKE_VERBOSE_MAKEFILE: output additional information during compiling (OFF by default) # SUFFIX: suffix, added after binary-names (version number by default) # NOSUFFIX: do not add a suffix after binary-name (OFF by default) # YADE_VERSION: explicitely set version number (is defined from git-directory by default) # ENABLE_GUI: enable GUI option (ON by default) # ENABLE_CGAL: enable CGAL option (ON by default) # ENABLE_VTK: enable VTK-export option (ON by default) # ENABLE_OPENMP: enable OpenMP-parallelizing option (ON by default) # ENABLE_GTS: enable GTS-option (ON by default) # ENABLE_GL2PS: enable GL2PS-option (ON by default) # ENABLE_LINSOLV: enable LINSOLV-option (ON by default) # ENABLE_PFVFLOW: enable PFVFLOW-option, FlowEngine (ON by default) # runtimePREFIX: used for packaging, when install directory is not the same is runtime directory (/usr/local by default) # CHUNKSIZE: set >1, if you want several sources to be compiled at once. Increases compilation speed and RAM-consumption during it (1 by default). project(Yade C CXX) cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake") INCLUDE(FindPythonLibs) INCLUDE(FindPythonInterp) INCLUDE(FindOpenMP) INCLUDE(FindQt4) INCLUDE(FindVTK) INCLUDE(FindPkgConfig) INCLUDE(GetVersion) INCLUDE(FindOpenGL) INCLUDE(FindGTS) INCLUDE(FindGL2PS) INCLUDE(FindCGAL) INCLUDE(FindNumPy) INCLUDE(FindLoki) INCLUDE(FindPythonModule) INCLUDE(GNUInstallDirs) #=========================================================== # HACK!!! If the version of gcc is 4.8 or greater, we add -ftrack-macro-expansion=0 # and -save-temps into compiler to reduce the memory consumption during compilation. # See http://bugs.debian.org/726009 for more information # Can be removed later, if gcc fixes its regression # Taken from http://stackoverflow.com/questions/4058565/check-gcc-minor-in-cmake EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) IF (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) MESSAGE(STATUS "GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 and -save-temps") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0 -save-temps") ENDIF() #=========================================================== IF ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-512") ENDIF() #=========================================================== ADD_DEFINITIONS(" -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast ") IF (CMAKE_CXX_FLAGS) #If flags are set, add only neccessary flags IF (DEBUG) SET(CMAKE_VERBOSE_MAKEFILE 1) SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS("-DYADE_DEBUG") ELSE (DEBUG) SET(CMAKE_BUILD_TYPE Release) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") ENDIF (DEBUG) ELSE (CMAKE_CXX_FLAGS) #If flags are not set, add all useful flags IF (DEBUG) SET(CMAKE_VERBOSE_MAKEFILE 1) SET(CMAKE_BUILD_TYPE Debug) ADD_DEFINITIONS("-DYADE_DEBUG") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security") ELSE (DEBUG) SET(CMAKE_BUILD_TYPE Release) SET(CMAKE_CXX_FLAGS "-Wall -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -s") ENDIF (DEBUG) ENDIF (CMAKE_CXX_FLAGS) #=========================================================== # Add possibility to use local boost installation (e.g. -DLocalBoost=1.46.1) FIND_PACKAGE(Boost ${LocalBoost} COMPONENTS python thread date_time filesystem iostreams regex serialization system REQUIRED) INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) # for checking purpose MESSAGE("-- Boost_VERSION: " ${Boost_VERSION}) MESSAGE("-- Boost_LIB_VERSION: " ${Boost_LIB_VERSION}) MESSAGE("-- Boost_INCLUDE_DIRS: " ${Boost_INCLUDE_DIRS}) MESSAGE("-- Boost_LIBRARIES: " ${Boost_LIBRARIES}) #=========================================================== FIND_PACKAGE(NumPy REQUIRED) INCLUDE_DIRECTORIES(${NUMPY_INCLUDE_DIRS}) FIND_PACKAGE(Loki REQUIRED) INCLUDE_DIRECTORIES(${LOKI_INCLUDE_DIR}) FIND_PACKAGE(Eigen3 REQUIRED) FIND_PACKAGE(BZip2 REQUIRED) FIND_PACKAGE(ZLIB REQUIRED) #=========================================================== SET(DEFAULT ON CACHE INTERNAL "Default value for enabled by default options") SET(LINKLIBS "") SET(CONFIGURED_FEATS "") SET(DISABLED_FEATS "") OPTION(ENABLE_VTK "Enable VTK" ${DEFAULT}) OPTION(ENABLE_OPENMP "Enable OpenMP" ${DEFAULT}) OPTION(ENABLE_GTS "Enable GTS" ${DEFAULT}) OPTION(ENABLE_GUI "Enable GUI" ${DEFAULT}) OPTION(ENABLE_CGAL "Enable CGAL" ${DEFAULT}) OPTION(ENABLE_GL2PS "Enable GL2PS" ${DEFAULT}) OPTION(ENABLE_LINSOLV "Enable direct solver for the flow engines (experimental)" ${DEFAULT}) OPTION(ENABLE_PFVFLOW "Enable flow engine (experimental)" ${DEFAULT}) #=========================================================== # Use Eigen3 by default IF (EIGEN3_FOUND) INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR}) MESSAGE(STATUS "Found Eigen3") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} Eigen3") ENDIF(EIGEN3_FOUND) #=========================================================== INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS}) SET(LINKLIBS "${LINKLIBS};${BZIP2_LIBRARIES};${ZLIB_LIBRARIES};") #=========================================================== IF(ENABLE_VTK) FIND_PACKAGE(VTK) IF(VTK_FOUND) INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) LINK_DIRECTORIES( ${VTK_LIBRARY_DIRS} ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_VTK") SET(features "${features} vtk") MESSAGE(STATUS "Found VTK") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} VTK") ELSE(VTK_FOUND) MESSAGE(STATUS "VTK NOT found") SET(ENABLE_VTK OFF) SET(DISABLED_FEATS "${DISABLED_FEATS} VTK") ENDIF(VTK_FOUND) ELSE(ENABLE_VTK) SET(DISABLED_FEATS "${DISABLED_FEATS} VTK") ENDIF(ENABLE_VTK) #=========================================================== IF(ENABLE_OPENMP) FIND_PACKAGE(OpenMP) IF(OPENMP_FOUND) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_OPENMP ${OpenMP_CXX_FLAGS}") MESSAGE(STATUS "Found OpenMP") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} OpenMP") SET(features "${features} openmp") ELSE(OPENMP_FOUND) MESSAGE(STATUS "OpenMP NOT found") SET(ENABLE_OPENMP OFF) SET(DISABLED_FEATS "${DISABLED_FEATS} OPENMP") ENDIF(OPENMP_FOUND) ELSE(ENABLE_OPENMP) SET(DISABLED_FEATS "${DISABLED_FEATS} OPENMP") ENDIF(ENABLE_OPENMP) #=========================================================== IF(ENABLE_GTS) FIND_PACKAGE(GTS) FIND_PACKAGE(glib2) IF(GTS_FOUND AND GLIB2_FOUND) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_GTS ${CMAKE_GTS_CXX_FLAGS}") SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} ${GTS_LIBRARIES}") INCLUDE_DIRECTORIES(${GTS_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) MESSAGE(STATUS "Found GTS") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} GTS") SET(features "${features} gts") ELSE(GTS_FOUND AND GLIB2_FOUND) MESSAGE(STATUS "GTS NOT found") SET(DISABLED_FEATS "${DISABLED_FEATS} GTS") SET(ENABLE_GTS OFF) ENDIF(GTS_FOUND AND GLIB2_FOUND) ELSE(ENABLE_GTS) SET(DISABLED_FEATS "${DISABLED_FEATS} GTS") ENDIF(ENABLE_GTS) #=========================================================== IF(ENABLE_GUI) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL) FIND_PACKAGE(OpenGL) FIND_PACKAGE(GLUT) FIND_PACKAGE(glib2) FIND_PACKAGE(QGLVIEWER) IF(QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND) SET(GUI_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${QGLVIEWER_LIBRARIES}) SET(GUI_SRC_LIB "lib/opengl/GLUtils.cpp") SET(features "${features} qt4 opengl") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_OPENGL") INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${QT_INCLUDES}) MESSAGE(STATUS "Found GUI-LIBS") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} GUI") ELSE(QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND) MESSAGE(STATUS "GUI-LIBS NOT found") SET(DISABLED_FEATS "${DISABLED_FEATS} GUI") SET(ENABLE_GUI OFF) ENDIF(QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND) ELSE(ENABLE_GUI) SET(DISABLED_FEATS "${DISABLED_FEATS} GUI") ENDIF(ENABLE_GUI) #=========================================================== # This one will automatically enable CGAL IF(ENABLE_PFVFLOW) IF (NOT ENABLE_CGAL) MESSAGE(STATUS "PFVFLOW depends on CGAL, attempting to turn ENABLE_CGAL ON") SET(ENABLE_CGAL ON) ENDIF (NOT ENABLE_CGAL) ENDIF(ENABLE_PFVFLOW) #=========================================================== IF(ENABLE_CGAL) INCLUDE(FindGMP) FIND_PACKAGE(CGAL) FIND_PACKAGE(GMP) IF(CGAL_FOUND AND GMP_FOUND AND (NOT("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang"))) #Check for clang should be removed, when CGAL will be compilable by clang #INCLUDE_DIRECTORIES(${CGAL_INCLUDE_DIR}) #INCLUDE_DIRECTORIES(${GMP_INCLUDE_DIR}) #INCLUDE_DIRECTORIES(${GMPXX_INCLUDE_DIR}) FILE(GLOB CGAL_SRC_LIB "lib/triangulation/*.cpp") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CGAL_DEFINITIONS} -DYADE_CGAL") SET(LINKLIBS "${LINKLIBS};${CGAL_LIBRARIES};${GMP_LIBRARIES};${GMPXX_LIBRARIES};") MESSAGE(STATUS "Found CGAL") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} CGAL") IF(ENABLE_PFVFLOW) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFLOW_ENGINE") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} PFVflow") ELSE(ENABLE_PFVFLOW) SET(DISABLED_FEATS "${DISABLED_FEATS} PFVflow") ENDIF(ENABLE_PFVFLOW) ELSE(CGAL_FOUND AND GMP_FOUND AND (NOT("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang"))) MESSAGE(STATUS "CGAL NOT found") SET(DISABLED_FEATS "${DISABLED_FEATS} CGAL") SET(ENABLE_CGAL OFF) IF(ENABLE_PFVFLOW) SET(DISABLED_FEATS "${DISABLED_FEATS} PFVflow") MESSAGE(STATUS "CGAL NOT found: PFVFLOW disabled") ENDIF(ENABLE_PFVFLOW) ENDIF(CGAL_FOUND AND GMP_FOUND AND (NOT("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang"))) ELSE(ENABLE_CGAL) SET(DISABLED_FEATS "${DISABLED_FEATS} CGAL") ENDIF(ENABLE_CGAL) #=========================================================== IF(ENABLE_LINSOLV) FIND_PACKAGE(Cholmod) FIND_PACKAGE(OpenBlas) FIND_PACKAGE(Metis) IF(CHOLMOD_FOUND AND OPENBLAS_FOUND AND METIS_FOUND) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CGAL_DEFINITIONS} -DLINSOLV -DFLOW_ENGINE") SET(LINKLIBS "${LINKLIBS};${CHOLMOD_LIBRARIES};${AMD_LIBRARY};${CAMD_LIBRARY};${COLAMD_LIBRARY};${CCOLAMD_LIBRARY};${OPENBLAS_LIBRARY};${METIS_LIBRARY}") INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIR} ${CHOLMOD_INCLUDE_DIR}) MESSAGE(STATUS "Found Cholmod") MESSAGE(STATUS "Found OpenBlas") MESSAGE(STATUS "Found Metis") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} LinSolv") ELSE(CHOLMOD_FOUND AND OPENBLAS_FOUND AND METIS_FOUND) MESSAGE(STATUS "Missing dependency for LINSOLV, disabled") SET(DISABLED_FEATS "${DISABLED_FEATS} LinSolv") SET(ENABLE_LINSOLV OFF) ENDIF(CHOLMOD_FOUND AND OPENBLAS_FOUND AND METIS_FOUND) ELSE(ENABLE_LINSOLV) SET(DISABLED_FEATS "${DISABLED_FEATS} LinSolv") ENDIF(ENABLE_LINSOLV) #=============================================== IF(ENABLE_GL2PS) FIND_PACKAGE(GL2PS) IF(GL2PS_FOUND) INCLUDE_DIRECTORIES(${GL2PS_INCLUDE_DIR}) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_GL2PS") SET(LINKLIBS "${LINKLIBS};${GL2PS_LIBRARIES};") MESSAGE(STATUS "Found GL2PS") SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} GL2PS") ELSE(GL2PS_FOUND) MESSAGE(STATUS "GL2PS NOT found") SET(DISABLED_FEATS "${DISABLED_FEATS} GL2PS") SET(ENABLE_GL2PS OFF) ENDIF(GL2PS_FOUND) ELSE(ENABLE_GL2PS) SET(DISABLED_FEATS "${DISABLED_FEATS} GL2PS") ENDIF(ENABLE_GL2PS) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/floating_point_utilities_v3) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) #=========================================================== IF (NOT INSTALL_PREFIX) SET(CMAKE_INSTALL_PREFIX "/usr/local") MESSAGE("Yade will be installed to default path ${CMAKE_INSTALL_PREFIX}, if you want to override it use -DINSTALL_PREFIX option.") ELSE (NOT INSTALL_PREFIX) GET_FILENAME_COMPONENT(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} ABSOLUTE) MESSAGE("Yade will be installed to ${CMAKE_INSTALL_PREFIX}") ENDIF (NOT INSTALL_PREFIX) IF (NOT SUFFIX) SET (SUFFIX "-${YADE_VERSION}") ENDIF (NOT SUFFIX) IF(NOSUFFIX) #For packaging SET (SUFFIX "") ENDIF(NOSUFFIX) #For packaging IF(NOT LIBRARY_OUTPUT_PATH) #For packaging SET (LIBRARY_OUTPUT_PATH ${CMAKE_INSTALL_LIBDIR}) ENDIF(NOT LIBRARY_OUTPUT_PATH) #For packaging IF (NOT runtimePREFIX) SET (runtimePREFIX ${CMAKE_INSTALL_PREFIX}) ENDIF (NOT runtimePREFIX) MESSAGE (STATUS "Suffix is set to " ${SUFFIX}) MESSAGE (STATUS "LIBRARY_OUTPUT_PATH is set to " ${LIBRARY_OUTPUT_PATH}) MESSAGE (STATUS "runtimePREFIX is set to " ${runtimePREFIX}) #=========================================================== SET(YADE_LIB_PATH ${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}/yade${SUFFIX}) SET(YADE_EXEC_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}) SET(YADE_PY_PATH ${YADE_LIB_PATH}/py) SET(YADE_DOC_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/doc/yade${SUFFIX}) SET(YADE_MAN_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}) SET(CMAKE_SKIP_BUILD_RPATH FALSE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) SET(CMAKE_INSTALL_RPATH "${YADE_LIB_PATH};${YADE_PY_PATH};${YADE_PY_PATH}/yade/;${YADE_PY_PATH}/yade/qt;${YADE_PY_PATH}/gts") SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) #=========================================================== IF(ENABLE_GUI) ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/gui") ENDIF(ENABLE_GUI) ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/py") #=========================================================== # this is only a temporary hack, headers should be installed in the build-dir directly # perhaps there is a proper way, have to ask IF(NOT EXISTS "${CMAKE_BINARY_DIR}/yade") EXECUTE_PROCESS(COMMAND ln -s ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/yade) ENDIF () #=========================================================== FILE(GLOB SRC_CORE "core/*.cpp") FILE(GLOB_RECURSE SRC_PKG "pkg/*.cpp") FILE(GLOB SRC_LIB "lib/*.cpp") SET(SRC_LIB "${SRC_LIB};lib/base/Math.cpp;lib/factory/ClassFactory.cpp;lib/factory/DynLibManager.cpp;lib/multimethods/Indexable.cpp;lib/serialization/Serializable.cpp;lib/pyutil/gil.cpp;core/main/pyboot.cpp;${GUI_SRC_LIB};${CGAL_SRC_LIB}") #=========================================================== IF (CHUNKSIZE) INCLUDE(CombineSources) COMBINE_SOURCES(${CMAKE_BINARY_DIR}/core "${SRC_CORE}" ${CHUNKSIZE}) FILE(GLOB SRC_CORE_COMBINED "${CMAKE_BINARY_DIR}/core.*.cpp") COMBINE_SOURCES(${CMAKE_BINARY_DIR}/pkg "${SRC_PKG}" ${CHUNKSIZE}) FILE(GLOB SRC_PKG_COMBINED "${CMAKE_BINARY_DIR}/pkg.*.cpp") COMBINE_SOURCES(${CMAKE_BINARY_DIR}/lib "${SRC_LIB}" ${CHUNKSIZE}) FILE(GLOB SRC_LIB_COMBINED "${CMAKE_BINARY_DIR}/lib.*.cpp") ADD_LIBRARY(yade SHARED ${SRC_LIB_COMBINED} ${SRC_CORE_COMBINED} ${SRC_PKG_COMBINED}) ELSE (CHUNKSIZE) ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB}) ENDIF (CHUNKSIZE) #=========================================================== find_python_module(minieigen) IF (PY_minieigen) MESSAGE(STATUS "Use system minieigen version") ELSE (PY_minieigen) MESSAGE(STATUS "Use embedded version of minieigen. Please, consider installing the corresponding package") ENDIF (PY_minieigen) find_python_module(Tkinter REQUIRED) #=========================================================== ADD_LIBRARY(boot SHARED ${CMAKE_CURRENT_SOURCE_DIR}/core/main/pyboot.cpp) SET_TARGET_PROPERTIES(boot PROPERTIES PREFIX "") TARGET_LINK_LIBRARIES(yade ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${LINKLIBS} ${LOKI_LIBRARY} -lrt) TARGET_LINK_LIBRARIES(boot yade) IF(ENABLE_VTK) IF(${VTK_MAJOR_VERSION} EQUAL 6) TARGET_LINK_LIBRARIES(yade ${VTK_LIBRARIES}) ADD_DEFINITIONS("-DYADE_VTK6") ELSE(${VTK_MAJOR_VERSION} EQUAL 6) TARGET_LINK_LIBRARIES(yade vtkHybrid) ENDIF(${VTK_MAJOR_VERSION} EQUAL 6) ENDIF(ENABLE_VTK) IF(ENABLE_GUI) TARGET_LINK_LIBRARIES(yade _GLViewer ${GUI_LIBS}) ENDIF(ENABLE_GUI) #==================================== IF (NOT (PY_minieigen)) ADD_LIBRARY(miniEigen SHARED py/mathWrap/miniEigen.cpp) SET_TARGET_PROPERTIES(miniEigen PROPERTIES PREFIX "") TARGET_LINK_LIBRARIES(miniEigen ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) INSTALL(TARGETS miniEigen DESTINATION ${YADE_PY_PATH}) ENDIF (NOT (PY_minieigen)) #==================================== #Back compatibility with scons SET (realVersion ${YADE_VERSION}) SET (version ${YADE_VERSION}) SET (pyExecutable ${PYTHON_EXECUTABLE}) SET (profile "default") SET (sourceRoot "${CMAKE_CURRENT_SOURCE_DIR}") #==================================== CONFIGURE_FILE(core/main/yade-batch.in "${CMAKE_BINARY_DIR}/bins/yade${SUFFIX}-batch") CONFIGURE_FILE(core/main/main.py.in "${CMAKE_BINARY_DIR}/bins/yade${SUFFIX}") CONFIGURE_FILE(py/config.py.in "${CMAKE_BINARY_DIR}/config.py") CONFIGURE_FILE(py/__init__.py.in "${CMAKE_BINARY_DIR}/__init__.py") #=========================================================== INSTALL(PROGRAMS "${CMAKE_BINARY_DIR}/bins/yade${SUFFIX}-batch" DESTINATION ${YADE_EXEC_PATH}/) INSTALL(PROGRAMS "${CMAKE_BINARY_DIR}/bins/yade${SUFFIX}" DESTINATION ${YADE_EXEC_PATH}/) INSTALL(FILES "${CMAKE_BINARY_DIR}/config.py" DESTINATION ${YADE_PY_PATH}/yade/) INSTALL(FILES "${CMAKE_BINARY_DIR}/__init__.py" DESTINATION ${YADE_PY_PATH}/yade/) FILE(GLOB filesPYChecks "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checks-and-tests/checks/*.py") INSTALL(FILES ${filesPYChecks} DESTINATION ${YADE_PY_PATH}/yade/tests/checks) FILE(GLOB filesPYChecksData "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checks-and-tests/checks/data/*") INSTALL(FILES ${filesPYChecksData} DESTINATION ${YADE_PY_PATH}/yade/tests/checks/data) INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/yade-logo-note.png" DESTINATION "${YADE_DOC_PATH}/img") INSTALL(TARGETS boot DESTINATION "${YADE_PY_PATH}/yade/") INSTALL(TARGETS yade DESTINATION ${YADE_LIB_PATH}) #=========================================================== MESSAGE(STATUS "===========================================================") MESSAGE(STATUS "Yade configured with following features:${CONFIGURED_FEATS}") MESSAGE(STATUS "Disabled features:${DISABLED_FEATS}") IF (DEBUG) MESSAGE(STATUS "Debug build") SET (debugbuild " (debug build)") ELSE (DEBUG) MESSAGE(STATUS "Optimized build") ENDIF (DEBUG) IF (CHUNKSIZE) MESSAGE(STATUS "CHUNKSIZE is set to " ${CHUNKSIZE}) ENDIF (CHUNKSIZE) MESSAGE(STATUS "===========================================================") #=========================================================== #Building doc ADD_CUSTOM_TARGET(doc) FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc) FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc/sphinx) ADD_CUSTOM_COMMAND( TARGET doc PRE_BUILD COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/sphinx/_build COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/doc/* ${CMAKE_BINARY_DIR}/doc COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/doc/sphinx ${YADE_EXEC_PATH}/yade${SUFFIX} yadeSphinx.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/sphinx DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} ) ADD_CUSTOM_COMMAND( TARGET doc POST_BUILD COMMAND xelatex Yade.tex COMMAND xelatex Yade.tex WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex/Yade.tex ) ADD_CUSTOM_COMMAND( TARGET doc POST_BUILD COMMAND rm -rf ${YADE_DOC_PATH}/html COMMAND mv ${CMAKE_BINARY_DIR}/doc/sphinx/_build/html ${YADE_DOC_PATH}/html COMMAND mv ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex/Yade.pdf ${YADE_DOC_PATH}/ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex/Yade.tex ) ADD_CUSTOM_COMMAND( TARGET doc POST_BUILD COMMAND mv ${CMAKE_BINARY_DIR}/doc/sphinx/_build/epub/Yade.epub ${YADE_DOC_PATH}/ || true WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} ${CMAKE_BINARY_DIR}/doc/sphinx/_build/latex/Yade.tex ) #=========================================================== #Building manpage ADD_CUSTOM_TARGET(manpage) ADD_CUSTOM_COMMAND( TARGET manpage POST_BUILD COMMAND help2man ${YADE_EXEC_PATH}/yade${SUFFIX} > yade${SUFFIX}.1 COMMAND help2man ${YADE_EXEC_PATH}/yade${SUFFIX}-batch > yade${SUFFIX}-batch.1 COMMAND mkdir -p ${YADE_MAN_PATH} COMMAND mv *.1 ${YADE_MAN_PATH} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} /usr/bin/help2man ) #=========================================================== #Execute standard checks ADD_CUSTOM_TARGET(check) ADD_CUSTOM_COMMAND( TARGET check POST_BUILD COMMAND ${YADE_EXEC_PATH}/yade${SUFFIX} --test COMMAND ${YADE_EXEC_PATH}/yade${SUFFIX} --check WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS ${YADE_EXEC_PATH}/yade${SUFFIX} ) #=========================================================== trunk-1.07.0/ChangeLog000066400000000000000000022113761226405415500145340ustar00rootroot00000000000000================================================== yade-1.07.0 Fri, 10 Jan 2014 21:23:33 +0100 Anton Gladky (37): Remove RELEASE file. Add -ftrack-macro-expansion=0, if gcc>=4.8 Provide VTK6-support. Use ADD_DEFINITIONS instead of adding those directly in CXX_FLAGS. Remove information about yade-stable from Readme. Add BicyclePedalEngine as a new kinematic motion. Add -save-temps if GCC-4.8 is used. Split Grid into Grid and Grid_GUI. Add information about missing packages in documentation and external PPA. Closes: LP:1250928 Add notice about using libqglviewer-qt4-dev instead of libqglviewer-dev on older Ubuntu versions. Add script to create PPA-packages. (Not finished) Use othermirror for some ubuntu versions. Add stl-gts example. Add qt.View() to clumps-example. Add one more check-script to check the functionality of ViscoElastic PM. Consider massMultiply-parameter, calculating parameters in ViscoElasticPM. Add functions to save and load clumps. Set the higher pripority in sys.path to self-compiled modules. Closes LP:1254708 Fix volume calculation. Closes LP:1261415 Set the higher pripority in sys.path to self-compiled modules in yade-batch. Update scripts for PPA. Add configuration files, needed for PPA. Minor update of PPA scripts. Update information about yadedaily prebuilt packages. Add support for qglviewer>=2.5.0. Open GUI in packs/packs.py after 1 step to show all elements. Raise warning, if no spheres are produced by regular* commands. Update information about daily-packages. Set one more paramter -ftemplate-depth-512 for clang Prevent attraction forces in ViscPM due to viscosity Add some more steps to checkWeight-script. Minor formatting in references. Remove cout accidentally added in a prev. commit. Minor change of setFromTwoVectors in utils.py. Rename createtar.py to buildppa.py. Minor fix in docs. Add RELEASE-file. Bruno Chareyre (17): a function to increase the size of a single sphere (~>Thomas swelling) easier manipulation of state files in TesselationWrapper restore the python wrapping of utils.growParticles() as it was before fb02a74 (changed by mistake, sorry Christian) give unique identifiers to trangulation's cells FlowEngine::nCells retruns the number of finite cells; FlowEngine::getVertices returns the vertices of a cell defined by its id make cmake output more consistent when missing dependency for LinSolv Fix the behavior of FlowEngine.updateTriangulation=True FlowEngine: increment a counter correctly small changes in the installation section regarding suitesparse and related libs installation.rst: smallfix in indentation remove a not necessary sorting in FlowEngine, as it triggers a critical bug in the STL (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800) correct target values of the DEM-PFV checktest Fix paths to online and packaged documentation (fix url error with GUI's hyperlinks) DEM Background chapter: a note on the semantic strain vs. displacement for contact kinematics Merge branch 'master' of github.com:yade/trunk fix undefined "key" in triax-tutorial/script-session1.py +1 published paper Christian Jakob (1): small fix in an example script tetra/oneTetra.py Francois (3): Fix missing REGISTER_CLASS_INDEX(...) into ViscElPhys. This macro is essential for a right law dispatch ! Corrected a minor mistake in code comments : k=2*r*E Allow the contact between (coh)frictMat and viscElMat as frictPhys. Almost everything was done by inheritance, just had to convert stiffnesses to modulus and modulus to stiffnesses to ensure material compatibility. Note that for the moment the timeStepper cannot handle this kind of simulations -> will be fixed soon. Jan Stransky (4): Modified error message if not yade.runtime.hasDisplay (bug #1241817) fixed SyntaxError from previous commit uncomment and modify utils.forcesOnCoordPlane function corrected mistake in examples/test/triax.py Jerome Duriez (15): - Introducing (uncommenting in fact) tens/shearBreakRel variables in JCFpmState : relative part of broken interactions per body (instead of absolute number). - Few changes in some doc of JCFpm variables. Quite important changes in JCFpm code Modifying JCFpm example scripts so that they still work after previous commit Re-put some commented lines, after discussion of this thread (https://lists.launchpad.net/yade-dev/msg10185.html), thanks Anton. The comments solution is (at the moment ?) finally still used to avoid putting a new variable in VTKRecorder.. A script example for JCFpm : two rock parts with one joint in the middle, like in laboratory experiments Some forgotten corrections in some example scripts, so that they still work after changes of today in JCFpm Some corrections in the JCFpm doc (hyperlinks...) (Hopefully) Fixing some rst links in DEM Background doc Some changes in the doc of getStress() function, to be consistent with the source code (https://answers.launchpad.net/yade/+question/239919) Merge branch 'master' of github.com:yade/trunk Idem as previous commit Restoring the 2d version of growParticle previously erased by mistake.. Some hyperlinks in JCFpm doc corrected Typos and hyperlinks corrected in Peri3dController doc Correction of a link in TesselationWrapper() doc Klaus Thoeni (1): add CGAL link and delete libgmp3 from install list Raphael Maurin (1): Change in the calculation of the normal and tangential stiffness and damping. The change affects only the behavior when one of the two parameters is zero, e.g. for two particles with different stiffness k1 and k2, the contact stiffness will always be k = k1*k2/(k1+k2). Before it gave the same except when k2 = 0 (respectively k1 = 0), where it gave k = k1 (resp. k=k2). This is done to ensure continuity in the behavior when one of the two parameter tend to zero. Add a function contactParameterCalculation in Ip2_ViscElMat_ViscElMat_ViscElPhys to avoid code duplication. ================================================== yade-1.05.0 Mon, Oct 28 19:49:48 2013 +0200 Anton Gladky (19): Add system-component of boost to be linked. Fix typo in equations in getViscoelasticFromSpheresInteraction (documentation). Thanks to Medack (TU Freiberg). Explicitly link BZip2-library Explicitly link ZLIB-library Update installation docs, add libbz2-dev zlib1g-dev. Fix LudingPM. Rename variables in LudingPM (Theta->Delta). Fix k2-calculation in LudingPM. Update script for LudingPM. Split gui/qt4/GLViewer.cpp. Remove pkg/dem/DomainLimiter.* Recover DomainLimiter (LawTester should be moved somewhere). Remove some warnings. Update numpy_boost.hpp from svn. Remove executes bit on py, cpp and h-files. Split Shop.cpp on Shop_01.cpp and Shop_02.cpp Fix compilation. Remove stable-PPA reference from documentation. Replace all libboost-*-dev by libboost-all-dev. Christian Jakob (19): complete description of clump methods in users manual fix a bug in inertia tensor approximation scheme fix some links in users manual and Scene doc fix description of default material in users manual fixing/updating refs and links in users manual - part 1 removed SpherePadder description from users manual fixing/updating refs and links in users manual - part 2 (finished) adapt buoyancy example with new O.forces.addF() method and make it look nicer update in Clump::updateProperties: included new bool integrateInertia and int discretization and adapt clump(), appendClumpend(), addToClump(), releaseFromClump(), replaceByClumps() and growParticles() create links to some example scripts in wrapper increase initialization speed of examples/packs/packs.py (fix https://bugs.launchpad.net/yade/+bug/1229783) try to fix (still broken) refs in users manual Merge branch 'master' of github.com:yade/trunk make getRoundness() more flexible: empty excludeList is no more needed as input argument; adapt replaceByClumps-example.py and associated part in users manual small fix in users manual fix a link in TesselationWrapper fix a link in TesselationWrapper (second try) fix buoyancy example for clumps removed typenames from Polyhedra.cpp, make gcc < version 4.7 happy Donia (4): Save the relative velocities of particles. Compute edgesSurfaces if viscousShear is true. Save the interactions only between spheres into a vector. get the shear and normal viscous stress in each interaction. Jan Stransky (10): marginal modifications Merge branch 'master' of github.com:yade/trunk Added periodic cell VTK export (to VTKRecorder and export.VTKExporter) Merge branch 'master' of github.com:yade/trunk added forgotten example file fixed bug in export.VTKExporter from one previous commits Merge branch 'master' of github.com:yade/trunk Polyhedra implementation + examples (Contributed by Jan Elias). adding examples with tetrehadron modeled by new Polyhedron class CombinedKinematicEngine will not call its 'dead' subengines (question #237437) Jerome Duriez (6): Correction of typo in comment Proposal of new (similar but more compact) examples using JCFpm classes. A choice can be made one day after some feedback ? Some changes in JCFpm documentation (add of external references, and removal of cross reference towards the CFpm model which does not exist anymore). In cpp, some commented lines to add (in the future ?) some post-pro features that could maybe break current saves of (existing ??) current users Commiting changes discussed briefly in https://lists.launchpad.net/yade-dev/msg09979.html. Mainly written by L. Scholtes, they allow to vizualize with paraview some features of JCFpm classes. It adds then 2 recorders, "jcfpm" and "cracks", that are separated mainly for historical reasons.. They are anyway now documented Add of pylab.ion() in plotNumInteractionsHistogram() and plotDirections() so that yade does not hang anymore after launch of these functions (even after closing the plot window, here). Still thanks to Vaclav ! (http://stackoverflow.com/questions/9753885/pylab-matplotlib-show-waits-until-window-closes) Anecdotic changes in an example script Klaus Thoeni (2): resolve problem with mask in GridConnection ignore local kdevelope specific files on git ================================================== yade-1.00.0 Sun, Sep 29 23:10:48 2013 +0200 Anton Gladky (64): Remove release file. Add documentation, how to render particle with ParaView`s PointSprite plugin. Fix spelling errors. Add Changelog. Add different capillar models into ViscoElasticPM. Add links to equations, consider not only monodisperse particles. Fix s parameter for Willet-formulation of capillar. Add one more critical-calculation to capillar model. Cleanings in viscoelastic capillar modell. Move capillar calculation into another function not to overload VPM. Modify Weigart`s model. Update equations for Weigart`s capillar model. Update capillar equations and names of schemas. Move references to a references.bib. Add comment on liquid bridges. Fix some warnings (clang). Fix compilation. Implement rotational resistance in ViscoElasticPM. Add massMultiply-parameter to ViscoElasticPM to have an opportunity to set kn, kt, cn and ct without multiplication on mass. Implement Rabinovich`s capillar model. Fix wrong calculation of the average rotational resistance. Split ViscoelasticPM on capillar and dry parts. Prevent devision by 0 in capillar Rabinovich model. Prepare for flowengine compilation. Merge libplugins, libsupport and libcore in libyade. Fix FindCholmod.cmake. Fix compilation of FlowBoundingSphere.ipp Replace Cholmod-Feature by LinSolv. Minor fix in CMakeList (FlowEnginge). Implement PID controller to have a servo-engine. Fix tests due to failing clumps-autotests. Use combinedengine for ServoPIDController. Fix hopefully clumps-autotests. Add LudingPM. Merge branch 'ndyck' Add an example for LudingPM. Use libyade again. Revert Bruno`s revert. Fix configuration issue with CHUNKSIZE>0. Drop RockPM. Remove ParticleSizeDistrbutionRPMRecorder. Remove CohesiveStateRPMRecorder. Show PFVflow and LinSolv in disabled features, if they are disabled. Include loki-library dirs and link against them. Fixes compilation on HPC TU Freiberg. Set LinSolv and PFVFLOW ON by default. Add recommended build-dependency for LinSolv and PFVFlow into documentation. Replace ifndef/define-constructions by "#pragma once" in lib/triangulation, where it is possible. Minor fix in capillary models in ViscoelasticPM. Add [Pournin2001] into the description of ViscoelasticPM. Minor fix in calculation s_crit in ViscoelasticPM. Add information about github-hosting into the main page. Add a notification to the screen, whether the current build is debugbuild. Remove explicit linking of libstdcxx. Use skipScripts variable to skip some scripts on check-tests. Skip temporarly DEM-PFV-check.py to let daily-builds packages be built. Remove kde-files from the trunk. Minor fix in installation section of documentation. Remove Fedora list package from documentation. The list is unsupported. Add Antypov2011 reference and some links in Hertz-Mindlin model. Fix some compilation warnings (GCC). Replace libqglviewer-qt4-dev on libqglviewer-dev in installation section. Fix errors in ForceContainer, detected by clang. Fix compilation error. Add export into LIGGGHTS-format. 1.00.0 Bruno Chareyre (68): +1 journal article Add the color of the periodic cell a registered attribute. - fix a bug that would let the capillary tables empty when postLoad was not triggered Add function getCapillaryStress(), equivalent of getStress() but for capillary forces -code cleaning fix a latex equation FlowEngine: exclude corner cases when listing constrictions sizes along the void path +1 article -fix url of an article +4 journal papers +1 journal article - add "LINSOLV" source code for DEM-PFV coupling with direct sparse solvers add strainRate attribute to TriaxialStressController + fix bug in example script Revert "Merge libplugins, libsupport and libcore in libyade." Cause: the new cmake system breaks buildbot and does not work for chunkSize>0 - add getSceneAsString() to pass scenes between instances without going through the hard drive fix CMakeList for chunkSize>=1 - enable load/save from/to python strings with O.sceneToString and O.stringToScene (for communication between parallel instances of yade) -fix the return type of stringToScene() clean the flow code (part 1) cleaning the flow code (smallfix of part 1) cleaning the flow code (part2) cleaning the flow code (part3 and last) -first example script for the fluid coupling with the DEM-PFV method - new conference and journal papers fixed reference +1 PhD thesis - more documentation of TesselationWrapper, with a section in user manual and pointer to published equations. git ignore changes to .gitignore undo previous change in gitignore, not the right way to fix Turn a LOG_DEBUG into LOG_ERROR/return, to escape segfault. (ref: https://bugs.launchpad.net/bugs/1208878) Add an optional argument to O.forces.f() and O.forces.t() to get correct forces on clumps. doc improvement and more cross-links for TesselationWrapper and FlowEngine -enable user defined forces on bodies applying permanently (with updated user manual) +1 conference paper -workaround https://bugs.launchpad.net/yade/+bug/1183402#3, allowing startup imports with optional argument example: $yade -lscipy.interpolate -fix '-l' command line option (no import lib was crashing) fix uninitialized member of ForceContainer fix compile warnings (unused variables) - smallfixes in documentation fix FlowEngine docstring fix duplicate bib reference small fix in bib entries remove duplicate bib reference commit small fix and update in bib files make default FlowEngine::permeabilityFactor less absurd (crashing by default sucks) regression (check-)test for FlowEngine remove Dem3Dof form Yade (also eudoxos module, mostly based on Dem3Dof) - remove Dem3Dof from documentation remove eudoxos from build system (+ remove from VTKRecorder, that was left behind) remove Dem3Dof from a docstring remove Dem3Dof from alias various fixes and improvements in checkTests - increase verbosity of DEM-PFV checkTest remove some debugging code left in chekList.py make sure FlowEngine has been compiled before trying the checkTest DEM-PFV, as suggested by Klaus make the DEM-PFV checktest fully determinist with a data file for initial positions new attributes in FlowEngine to access low level cholmod/metis data \#include in FlowEngine.cpp (why is it not needed on lucid?!) add #ifdef LINSOLV guards in appropriate places in case someone (e.g. buildbot) compiles without cholmod one more #ifdef LINSOLV guard add a cmake path for metis.h on wheezy Return a warning at startup if X rendering is unavailable despite gui is required. User manual: correct the meaning of body.dynamic + remove utils. prefixes Typo fix in prog.rst Fix sphinx warning (no :gui: role) yadeSphinx.py: remove eudoxos module from the build list -remove empty section of doc: External modules revert 3d7ca8577 (doc/current hyperlink), see also https://lists.launchpad.net/yade-dev/msg10035.html. Chiara Modenese (1): Prevent the normal force become negative when viscous damping is applied. Christian Jakob (23): added new example showing implementation of buoyancy small fix in new example from previous commit small fix of description in new buoyancy example include integration scheme for inertia tensors of clumps; inertia/masses/volumes of clumps are updated automatically by call of updateProperties method; removed adaptClumpMasses method and example script Merge branch 'master' of github.com:yade/trunk make getRoundness() faster shorten the code of Clump.cpp: switched getClumpVolumeAndAdaptInertia() method into updateProperties() small fix of a comment small fix in an example script Merge branch 'master' of github.com:yade/trunk remove unused #include in Clump.cpp limit number of cubes for clump inertia integration scheme to 1000000; avoids worst case scenario with R_clump_member(s)< iterator 2. Clean an horrible block of code (not only ugly, it was also slow) - introduce a position buffer for faster updates of volumes Use retriangulation conditions more consistently. The solvers are not swapped before a given fraction of the permutation interval now, to reduce overheads. small change in the initialization logic, now defining the two position buffers if "first" make ompThread an attribute of Engine, as it likely to be used more and more in the future. It is then inherited by InteractionLoop and ParallelEngine Parallelize volume updates and the computation of fluid forces fix a typo introduced in previous commit, giving compile error in FlowEngine remove traces of the SpherePadder module, which is broken and unmaintained (with author's agreement) make grids periodic use EpsVolPercent_RTRG consistently in periodic flow: negative value is ignored, just like the non-periodic case Adapt setContactProperties to pass argument in radians to Shop::setContactFriction -fix conversion mistake (radian/degree) update variable names to denote the unit of friction angle (rad), and make this explicit in the documentation - include elasticity in the normal lubrication force - fix ompThreads assignment in flow engine, resulting in numThreads=-1 by default, then "libgomp: Out of memory" Fix the F9-F12 keys binding for IPython>=0.12 -add the correct prefactor in normal lubrication relation -overlap the two triangulations during one iteration in order to have the "previous" forces defined in the normal lubrication equation Update the documentation of the ompThreads attribute. - fix again the offset of ids in SpherePack.toSimulation (previous fix was assuming two bodies per clump) - fix https://bugs.launchpad.net/yade/+bug/923929 again, as shown by François it could still happen in some cases (see example in the bug report) - remove the check/throw when generating aperiodic 2D packings, since the algorithm actually support that. Define O.engine with a default list at startup, with example script and notes in the documentation. remove utils prefix - Updates and improvements in the triax-tutorial material - smallfix in a note in introduction.rst fixed version of the triax script for clumps Remove first iteration form "--performance" option measurements -transfer the normal lubrication force correctly when retriangulating -doc fix -fix the sign of the normal lubrication force in the periodic case fix compile warning (actually fix the functions as well, as they were not returning results at all!) - doc fix -remove remaining debug lines periodic update of publications fix a typo in bibtex file, +1 ref - one fix in articles, yet more references in conferences fix/add Tran's reference - use "orientation" parameter in utils.box (fix bug/1111514) - improved version of TriaxialStressController, controling not onlt stress but also strain rate - making the interface more similar (but still not exactly like) PeriTriaxController. - TriaxialCompressionEngine and ThreeDTriaxialEngine become almost useless - reflected in the example script which now uses only TriaxialStressController -micro-fix (no need to define an initial timestep) -code cleaning - fix the default value of orientation in utils.box. [1,0,0,0] is NOT a quaternion. -add a few python bindings to the periodic engine for manipulations of the internal tesselation -fix the detection of (not) already computed tesselation -make volume() functional also when PeriodicFlow is actually in use uncouple the compilation of flow code and linsolv, so that it is possible to effectively compile the flow engines without cholmod remove useless "sigma_iso" and "isAxisymetric" members from TTController - make an old engine deprecated, not compiled now, to be removed later more #ifdef guards, to allow flow engine without linsolv remove sigma_iso from the triax example script fix syntax error in a doc string (blocking the buildbot https://yade-dem.org/buildbot/builders/yade-full/builds/1741/steps/shell_3/logs/stdio) -deprecation warnings in ThreeD and TriaxialCompression engines -change the default value of FlowEngine::pressureForce, a flow engine is supposed to compute a flow by default... smallfix in example script - 3 new references - add "Open Source Discrete Element Method" explicitely in the home page, google has to find us nicer documentation of equations for stiffness definition remove useless #define - ship a copy of ipython_directive.py from ipython/HEAD for ipython 0.13 ipython version was checked in two different places, forgot the second one. Still no confirmation of the fix. - some lines comited by mistake, sorry for that. - escape crash on non-iterable __doc__ (some qt class) - define new attributes needed for ipython_directives.py >= 0.13 - fix existing *.rst to use strictly 3 blank spaces in multiline directives (i.e. " ...:") - reference name Tran2012a appearing twice -> renaming Tran2012b - re-introduce the @supress of Christian (removed during experiments) Christian Jakob (21): add addToClump() method in yadeWrapper improvements in clump logic - part 1 Improvements in clump logic - part 2 Added new example script, that show usage of addToClump() and releaseFromClump() Improvements in clump logic - part 3 + 4. shorten the code of replaceByClumps() add a check of python input for replaceByClumps() method further improvements in clump logic some fixes in documentation of wrapper and state fix documentation of clumpTemplate in utils.py Merge remote branch 'upstream/master' let replaceByClumps return a list of tuples with new clump ids and associated sphere ids Merge remote branch 'upstream/master' avgNumInteractions now takes care of clumps some improvements for previous commit doc fix in utils.py and exclude unused Clump.hpp in _utils.cpp updated documentation of clumps in user manual and small fixes in doc in yadeWrapper Merge branch 'master' of github.com:yade/trunk bug fix in replaceByClumps, that could lead to set negative masses on bodies and shorten the code yet another doc improvement in wrapper and user manual concerning replaceByClumps method replaced errors by warnings in addToClump and releaseFromClump in wrapper Donia Marzougui (5): Fix the computation of viscous forces by using the correct positions of bodies (updated in buildTriangulation), and fix some variable names. Remove fictious spheres from the computation of edge surfaces (employed in the computation of viscous forces) Correct the computation of the viscous and normal stress per particle. Correct the sign of some parameters in the computation of the viscous forces. Correct the normal lubrication force. Francois Kneib (24): Continue the implementation of grids : - add GridConnexion Aabb - add GridNode-GridNode Ig2 functor : Ig2_GridNode_GridNode_GridNodeGeom6D - add GridNode-GridNode contact geometry : GridNodeGeom6D - add an example script : examples/grids/Simple_Grid_Falling.py - update utils.py (minor change) Add the possibility of avoiding the contact detection between a group of particle. -> the vector "avoidSelfInteractionMasks" contains a list of masks : all particles having the same mask will not collide if this mask is inside this list. -> the "mayCollide" method now check this too. -> avoidSelfInteractionMasks can be set in python with a list of int. Add the Sphere-GridConnection frictionnal contact : -> new contact geometry : ScGridCoGeom -> new Ig2 : Ig2_Sphere_GridConnection_ScGridCoGeom -> new Law2 : Law2_ScGridCoGeom_FrictPhys_CundallStrack -> update utils.py to handle the new contact type (using avoidSelfInteractionMasks) Merge branch 'master' of github.com:yade/trunk Add the contact following and avoid multiple contact when a sphere is sliding on a grid. -Grids : Fix some minor bugs in Ig2_Sphere_GridConnection_ScGridCoGeom::go(...). -Collider : Change the vector of masks "avoidSelfInteractionMasks" to a single mask "avoidSelfInteractionMask". Create and correct documentation. Grids : - modify the rendering. - Apply correct DEM laws in utils.py to set right kn, ks, kr, and ktw. Now the grid behavior no longer depends on the spacial discretization you make. Modified setContactFriction method. Now it has to be used with an angle in radian unit, no longer in degrees. Try to fix documentation in this files, everywere "yref" appears in the online documentation. Fix Grid periodicity, and allow periodic sphere-grid contacts. Disable a boring warning into the grid construction. Fix a bug in SpherePack.toSimulation. There was a big problem when you tried to add clumped SpherePack (with makeClumpCloud() for example). Corrected toSimulation() (for the last time I hope :-) ). Fix a bug in growParticles(...) method. Growing a clump is now really homothetic. Before that, growing clumps seemed to be homothetic but at the next timestep the original position of members was reseted. Add Inelastic ChainedCylinder behavior law (by Ignacio Olmedo). Create inelastic material and related physics, Ip2 and Law2. Example script and complete documentation will come soon. Add the ability to save to a file a SpherePack containing some Clumps. Into SpherePack : now the toFile method writes a fifth column containing the clump number (-1 if the sphere isn't clumped). The fromFile method uses the new information to append clumped Spheres. Into Shop : loadSpheresFromFile method is modified to read and return the fifth column. Old files with 4 columns are still compatible. Into CapillaryTriaxialTest and CohesiveTriaxialTest : Shop::loadSpheresFromFile is sometimes used here, so remove the clumpId information to match the "BasicSphere" typedef. getStress(...) method : exclude gridNode-gridNode contacts for the stress computing. growParticles(...) method : avoid growing gridNode and gridConnection. Fix some Grids bugs. A minor spelling correction. Add a little class summary and explanations into Grid.hpp. Fix a bug into utils.py when creating a Grid in a non-periodic scene. In the sphinx documentation, add the https GitHub read-only method : git clone https://github.com/yade/trunk.git Avoid GridNode-GridNode contact stiffnesses (kn and ks) to be changed when the growParticles(...) method is used. (GridNodes are not concerned by this method). Add a missing space in the dependencies code lines. François Kneib (1): Correct a remaining bug into the toSimulation() python function. Jan Stransky (9): little modifications added example script for CombinedKinematicEngine little modifications of ConcretePM modification of ConcretePM, improved utils.intrsOfEachBody function improved yade executable: optparse->argparse, yade executable is now loadable as python module modified yade executable, fixing bug 1134422 complete optparse->argparse, --generate-manpage should work improvement of ConcretePM, remover warnings in pack module (randomDensePack and randomPeriPack functions) modified ConcretePM, corrected Peri3dController related examples Jan Stránský (1): minor changes françois (1): makeClumpCloud(...) now takes a "seed" parameter to generate always the same pack. ================================================== yade-0.90.0 Sat, Oct 13 15:16:55 2012 +0200 Anton Gladky (142): Remove RELEASE file. Fix cmake-file to compile. Fix paths in core-files. Update CMakeLists.txt. Fix pygts module. Fix standalone compilation of InteractionLoop.hpp. Enable pymodules on cmake-build. Add version definition to cmake-build. Fix suffix and runtimeprefix in cmake-build. Fix compilation error with gcc-4.7 Fix facetBox generation with height=0. Fix permissions on main.py.in file. Fix installation of binaries in cmake-build. Remove log4cxx from scons-file. Fix binary installation at cmake-build. Remove an explicit defining and importing of listdcxx. Install some py-files for cmake-build. Install glviewer in cmake-build. Fix path install in cmake-build. Update CmakeLists. Return explicite defining of libstdcxx. Causes error. Use rpath for lib-installation. Fix linking of core-libraries. Fix some more linkings in cmake-build. Reinitilize interactions after adding a body. Closes LP:1001194 Move gui-cmake to gui-folder Move cmake for python modules to py-folder. Separate python modules in cmake-build Fix some liking in cmake-build Some fixes in cmake-build. Add autotest to check bug LP:1001194 Give the newly created body an id, which is the size of bodyContainer. Remove lowestFree. Nicer fix for LP:1001194 Add scene->doSort variable. One more fix for LP:1001194. Thanks to Bruno. Fix linking of opengl in cmake-build Fix vtk-linking in cmake-build Install pack.py for cmake-build Add notice about python-demgengeo Add URLs on python-demgengeo package. Fix links. Fix some more linking problems in cmake-build Fix plugin search path in cmake-build Cosmetic changes in cmake-build Fix performance tests. Fix overlinking in cmale-build Make vtk mandatory. Fix -batch binary in cmake-build Partly fix QT in cmake-build. Still not functional yet. Return vtk-feature, but not use it Fix gui in cmake-build. Minor fix in cmake-build Add 2 dependencies to install-section for cmake-build. Enable "options" for cmake-build. Remove technical output during cmake-build. Fix compilation error during non-gui cmake-build Revert vtk-feature. Not mandatory again. Add debug-build to cmake. Use Predicate functions, only when gts is enabled. Place -lrt flag into the right place. Fix rpath issue Remove combine_sources function. Fix header definitions in openmp-accu Fix check-test during no_gts build Fix import libstdcxx on old systems Display information about disabled features Add NOSUFFIX option for packaging. Add lrt to linking on cmake-build Fix linking problem of cgal libraries in cmake-build Fix "typo" in VTKRecorder. Thanks to Vaclav. Remove path to python in some scripts. Move all main libs to usr/lib/yade folder Move minieigen to py-folder Add doSort-option to InsertionSortCollider for forced resorting of interactions. Minor fix in cmake-build Link miniEigen with boost-python libs. Thanks to Klaus Thoeni. Fix version definition for git and bzr. Enable use of custom Boost-libraries. Thanks to Klaus Thoeni. Try to fix cgal compilation. Add possibility to set the lib-path. Fix libpath, if it is non-standard. Fix CGAL-feature for cmake-build. Fix libpath with scons. Replace LIBPATHINST by LIBRARY_OUTPUT_PATH. Fix version definition and generation of pdf. Change Version option to YADE_VERSION. Add option description into CMakeList file. Start to update installation documentation. Start to update documentation on installation. Describe compilation and installation processes with cmake. Minor fix in instalaltion section. Remove scons from documentation. Remove compilation instruction for Gentoo. Check, whether newly added bodies to a clump are already members of the existing clump. Closes LP:1017367 Fix handling ipython 0.13 version. Return CHUNKSIZE option. Update documentation on installation. Better fix for ipython-versions. Hopefully the ipython-interface will not be broken in a future. Remove some bzr-notes from documentation. Remove scons. Minor fix in documentation. Add chainId parameter to body. Implement stopAtTime parameter. Add iterBorn and timeBorn parameters to interactions. Rename chainId to chain. Add python-wrapper to utils.facet Remove timeBorn option in interactions. Remove debug and rebuild options from docs and starting scripts (not functional with cmake) Fix execution error. Use vtkQuad for exporting boxes in vtk-format. (Closes: LP:1026474) Let to use relative paths in INSTALL_PREFIX variable. Remove clumps, if no bodies are present there. Fixes LP:1031644. Remove clump members from clumps during body erase. Move Clump.* files to core/ Add "make doc" command for easier documentation build. Fix some warnings. Add bodiesHandling.facetsDimensions function to get parameters of group of facets. Replace the variables "max" and "min" on "minVal" and "maxVal" in spheresPackDimensions to escape coincidence withi function names Add README.rst file for github Add getBodyIdsContacts to get the list of bodies, contacting with the checked one. Keep pointers of interactions for all bodies, not only where otherId>Id. Add ENABLE_FIXBUGINTRS option. Fix an error in interaction container. Add checkIntrs flag into body to escape useless checks of interaction. Fix segfault with FIXBUGINTRS enbled. Add regression test to check the erasing of bodies, which are in contact. One more step to fix bug of facet-sphere mass interaction. Add function to disable some interactions, if the sphere contacts with several facaets of the same chain. Prevent errors in facetCylinder, if height=0.0 Move fixbugintrs stuff from Newtonintegrator to shop.cpp and constitutive law. Move fixbugintrs stuff into viscoelasticpm, for a quicker compilation. Integrate some ideas into RockPM Some minor fixes in eigen-macroses. Remove testcode for fixing LP:850864 Fix serialize-template for matrix6r. Fix version read from RELEASE file. Fix version number output at Yade start. Fix some compilation warnings. Fix warning due to mix class/struct definition. Honor the flags, which are set in environment. Fix compilation warning »_POSIX_C_SOURCE« redefiniert." Disable CGAL, if compilator is clang. Add information, how to compile Yade with Clang-compiler. Fix batch-mode on platforms, where cpuinfo is not available. Remove rebuild-option from batch-mode. Remove old testing macros in VTKRecorder. Remove accidentally added file in examples. Add normalVel parameter for SpheresFactory to set explicitely direction of velocity for newly generated particles. Backward compatibility is saved. Add RELEASE file for 0.90.0 version. Bruno Chareyre (61): - Direct solver used for periodic BCs and/or compressible fluid - saveVTK for periodic BCs - fix rare but possible junk permeability values (define max/min) -FlowEngine uses boost::thread to precompute triangulation and Cholesky factor while yade is running - interplate using barycenters of old trangulation, instead of voro-center of new triangulation, avoids inconsistencies - make sure voidVolume is positive (FIXME: hardcoded number a.t.m.) - normalize the definition of minimum void volume -add a simple getStress function (periodic or not) move an insert in a more logical place A new contact law adding creep (Standard Material Model) to CundallStrack -missing in previous commit restore the option to NOT homomDeform in periodic BCs (may be rarely used, e.g. when veru big bodies are part of the simulation) restore the option to NOT homoDeform (see previous commit too) - let PeriTriaxController accept very large bodies in the simulation. This change makes it possible to simulate bi-periodic BCs with 2 large planes bounding one coordinate. Example script comming soon. - remove junk output left after debugging work - compatibility of the 6D cohesive-moment law with periodic BCs. - add a simpler way to turn contacts cohesive one by one via an Ip::flag -fix force application in cohesive law (was breaking chained cylinder and sent buildbot error) replace Dem3Dof by ScGeom where CundallStrack is used -remove a series of contact laws as discussed in https://blueprints.launchpad.net/yade/+spec/cleancontactlaws remove contact laws (again), as discussed in https://blueprints.launchpad.net/yade/+spec/cleancontactlaws - Implement multithread solving for the periodic flow - Start implementing CHOLMOD solver using Eigen3 support - Fix flow engine compilation with cmake (some variable with multiple definitions breaking per-file compilation) - CHOLMOD handling in cmake - be quiet when cholmod is disabled remove some "cerr" -reset initCohesion flag for each contact after initializing (else it's rested at each step...) -add functions to export network constrictions and normal and track a point in the triangulation using secondary flow engine (Bruno+Wenrui) - better parameter (vector > 3 doubles) - use cell handles vector instead of CGAL's cell iterators for faster loops - make mirror permeabilities i->j vs. j->i exactly equal in the periodic cases to avoid non-positive definite matrices - fix a few mistakes in permeabillity min/max bounding (permeabilityFactor was not included, and the min was way too high, changing 50% of the values) - make multithread run possible also in the periodic case smallfix in documentation Fix compile warnings. - add export functions for writing system matrix to files reverts commit afa59f17d59a90d3049b9c51c41d28e29fc9081e, which messed up flow code. -fix conflict Document Tesselation wrapper a bit more. Add a complete example script. small optimizations in PeriodicFlow, start implementing matrix-based froce computation (commented blocks) documentation here and there Documentation documentaion fix - a unique function for fluid velocity in cells for both periodic and non-periodic - make fluid velocity computed correctly even on boundary cells with imposed pressure - the boundary are now included in computation average velocity in the simulation - A new function to get total flux through a boundary - Simplify the usage of GSTiemeStepper: no need to set dt at all as soon as GST is present, and setting dt manualy will not disable the timestepper. - Introduce density scaling example script for timestepper and density scaling Small change in the logic of cylinder-cylinder interactions sort exemple scripts documentation fix adapt the interface to the new timestepper logic doc hyperlink for density scaling fix compile error (sorry, it was working with chunksize>1) - remove a loop in Newton as suggested by Anton (Thanks) - update example script - adjustents of strain rate in ex. script Still smallfixes in density scaling Revert "Fix the computation of the shear lubrication force and add the torque of the viscous shear force applied on particles." This commit erased some of the previous changes. Please Donia double-check what you commit everytime. fix two compile warnings The \` are displayed correctly by sphinx. Get them back (at the price of many warnings?...) - remove some "invertSign" in stress functions - add a utils::function to change friction without the need to instantiate a TTCompression engine - make use of Shop::setContactFriction() make warning conditional or it will flood my terminal... example script for cohesive and/or rotational law some updates in this example script make autostop possible again (but still disabled by default) -enable 0-thickness bounding boxes example script for triax+clumps -A new function to grow particles and clumps cleaning script clean sources Chiara Modenese (3): Check the body existence before creating an interaction. (Closes: LP:803774) Add a new entry to yade-conference.bib. Add some entries into yade-conferences.bib Christian Jakob (9): improvements in Law2_ScGeom_CapillaryPhys_Capillarity Fix memory leak in capillary law and make isBroken flag compatible with fusionDetection include calm function fix mask bug in calm function export boxes with vtkrecorder (not tested, boxesCells missing) export boxes with vtkrecorder (visualization works, but is not ok) fix uniax.py and periodic.py example scripts fix and improvements of some example scripts delete unneeded file Donia (2): Fix the computation of the shear torque. Fix the computation of the torque and rename some variables. Donia Marzougui (12): Add spheres' rotation to the computation of the viscous shear force. Compute the viscous shear bulk stress. small fix in min Y Merge branch 'master' of github.com:yade/trunk Add the normal and tangential lubrication force Compute the viscous shear stress for each body Add rotation of spheres in the computation of velocity, Compute the viscous and normal stresses applied on each body, add the normal and shear lubrication forces Fix the names and tests of forces and stresses applied on particles Merge branch 'master' of github.com:yade/trunk Fix the computation of the shear lubrication force and add the torque of the viscous shear force applied on particles. Fix the computation of the shear lubrication force and add the torque of the shear viscous force applied on particles. Fix the computation of the shear lubrication force. Fix the computation of the normal lubrication force remove the computation of some characteristics lengths for two fictious spheres. Francois Kneib (5): Add the contact between two different ChainedCylinders. -> add new contact geometry : "ChCylGeom6D" -> modified "Ig2_ChainedCylinder_ChainedCylinder_ScGeom6D()" to instantiate the new contact geometry when it is necessary -> add new law : "Law2_ChCylGeom6D_CohFrictPhys_CohesionMoment()" -> add new CohFrictMat parameters : "CohFrictMat.cylCylNormalCoh" and "CohFrictMat.cylCylShearCoh". They are used to set the cohesion between two different ChainedCylinders ("CohFrictMat.normalCohesion" and "CohFrictMat.shearCohesion" was already used inside a ChainedCylinder). Fix bugs into "Ig2_Sphere_ChainedCylinder_CylScGeom6D" and "Ig2_Sphere_ChainedCylinder_CylScGeom" Fix an ScGeom6D bug : declare the cylCyl boolean variable as hidden in the YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY instead of in the ScGeom6D class core. Merge branch 'master' of github.com:yade/trunk -python function for handling grid objetcs Create new classes to add grid simulations. Grid are made of GridNodes and GridConnection (two new shapes inheriting from Sphere) Jan Stránský (15): added periodic cell's deformation and strain measures improvement of Cell documentation Cell class improvement made stressTensorOfPeriodicCell deprecated Fixed bug in export.VTKExporter, corrected some docstrings little more fixes in export module docstrings Added Law2_ScGeom_CpmPhys_Cpm class other modifications of CpmMat related classes Added Ip2_FrictMat_CpmMat_FrictPhys functor corrected mistake from previous commit Fixed compilation issues in ConcretePM.cpp reported by Anton Added utils.setNewVerticesOfFacet function improved documentation (corrected some warnings and errors during building docs, added inherited-members directive) improvement of ymport.unv and export.VTKExporter add example file for previous commit fixed small bug in export.VTKExporter.exportFacetsAsMesh add geom.facetSphere another bug fix of export.VTKExporter.exportFacetsAsMesh Klaus Thoeni (1): - add possibility to use local boost installation (e.g. -DLocalBoost=1.46.1) ================================================== yade-0.80.0 Wed, May 2 21:05:12 2012 +0200 Anton Gladky (81): Add forgotten format to ymport.textExt Replace python-numeric on python-numpy in installation section of documentation Fix --test Add check on body existance in GlobalStiffnessTimeStepper. Fixes LP:891540 Fix closeGap for side walls of cylinders and cones Return back fix from r2961. Bruno, please, make a check before commit. Add VTK-5.8 to header search path Fix compilation with VTK-5.8. Remove vtksqlite. Make the code workable with ipython 0.11 Hopefully fix compilation error on clean environment. Do not let PWaveTimeStep return "infinity" Add maxMass parameter to Spheresfactory Update description of maxMass Fix compilation with boost >=1.47 DomainLimiter: * Delete spheres only * Add mass calculation * Add volume calculation * Add mask-parameter Add mass-parameter to VTKRecorder. Add eigen2-option into scons to force compiling with eigen2. Fix eigen2 compiling, when "eigen2=False" by default. Check newly created spheres on intersection with spheres, which were created in one iteration in SpheresFactory. Hopefully fixes "jumping sphere" problem, discussed here [1] Minor changes for ipython 0.11 and 0.12 Add speed-parameter to Scene and Omega Fix calculation speed show in batch-system Fix prediction of finish time in batch-mode. Fix compilation warnings on Ubuntu Precise. Use gravity inside of NewtonIntegrator in examples and in tests. Return the average speed of calculation from the last 10 iterations instead of current speed for the last step. Hopefully makes prediction of finish-time in batch-mode more accurate. 1. Fix a compilation error with eigen2 2. Add a variable to define number of steps, which are taken into account by speed calculation. Rename .bzrignore to .gitignore. Merge pull request #1 from gladk/master Start to update main sphinx page. Merge pull request #2 from gladk/master Fix --check and --performance tests after moving testing scripts. Add deleted by mistake update of main sphinx page. Update of the main sphinx page. Fix version defininition with git. Ignore *.pyc files. Merge pull request #4 from jakob-ifgt/master Fix version number for gits. Caused error during doc-build. ResetRandomPosition should be a child of PeriodicEngine, not GlobalEngine. Fix some examples. Reenable gts-scripts. Let facetBunker.hBunker be zero. Add parameters body::iterBorn and body::timeBorn to track the moment, when the particle was added to simulation. Fix link to a wiki-page. Add libboost-program-options-dev to installation section. Add gtk2-engines-pixbuf to installation section. Escapes "Gtk-WARNING **: Im Modulpfad »pixmap« konnte keine Themen-Engine gefunden werden". Escape warning due to ipython 0.12. Do not output a false backtrace with ipython >= 0.10 due to log4cxx crash. Add python-bibtex to installation section of documentation. Remove useless check of ipython version. Now all systems must have >=10. Do not redeclare cundallInteractionPhysics and mindlinInteractionPhysics in local scopes, as they should be global. Fixes crash LP:966186. Add gmp for linking, when cgal-feature is activated. Fixes LP:968188 Fix unicode characters. Parse Yade.tex and remove empty verbatim-blocks. Happens on Precise. Add ipython_directive for ipython 0.12. Some adjustments to build docs on Precise-systems. Prevent cross-importing of yade modules. Closes LP:980000 Make nice output in ipython 0.12 like it was in 0.11. Make main.py.in more readable. Remove accidentally added ipython_directive012 extensions for all ipython versions. Remove log4cxx support and yade.log module. Fix compilation error on Debian Sid due to changed API of python-git module. Minor update of examples. Add isActive parameter to Interactions. Merge branch 'master' of github.com:yade/trunk Let isActive flag be changeble. Remove "never_use_this_one" option from scons. Remove "sphere-padder" option from scons. Fix autotest "rotation matrix from quaternion". Remove subdomains feature. Fix compilation warnings. Initialize angle* variables. Add geom.facetParallelepiped function. Remove executable-flag from scripts. Remove executable line in some examples (it cannot be in /usr/local folder on all machines). Fix some typos. Change default value in Real-variables from NULL to -1.0. Fox compilation warnings. Fix compilation warnings. Fix some typos. Add RELEASE file for 0.80.0 version. Bruno Chareyre (72): - (failed) attempt to fix the documentation of export.py - fix doc generation for the export module. Still some fixes needed concerning doc convention (wrong parameter declaration for some functions) - makeCloud can now generate spheres on a plane (see https://answers.launchpad.net/yade/+question/175606) remove unused bool "is2D". - makeCloud handles periodic 2D clouds with uniform distribution and psd - yet more fixes. The auto-setting of cell.size was not correct (typo in components) - code cleaning - Documentation of the capillary law (warn users on distanceFactor and neverErase flags, as in http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg07391.html. - 2 additional references - make body iterators jump empty slots, as suggested and discussed here: http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg07406.html - revert the (now useless) fix of r2961, similar tests can be removed in many places after the change in pointer logic is well tested. - remove a script, as agreed by Christian (https://answers.launchpad.net/yade/+question/178830) - add/use the "neverErase" flag in Hertz laws. - back to ordinary vector<>:iterator for bodyContainer - smart body pointers again, also fixing the erase(0) case inside begin(). - remove the if(body) test in GSTS loop. - attempt to fix https://bugs.launchpad.net/yade/+bug/897237 - small fix in the theoretical background Should finally fix https://bugs.launchpad.net/yade/+bug/897237 - capillary model: nullify Fcap and volume when P changes from something to zero - remove the if(!b) test in a few important places (proof of concept + don't waste time doing the same test twice) - fix wrong shape type testing that was giving wronf solid volume. - update publications - fix one bug mentionned in https://bugs.launchpad.net/yade/+bug/901146 (makeCloud with undefined num and psd) - more articles - normalize psdCumm2 after the scaling, not before (since the scaling is determined from absolute psdCumm2). - make it possible to include bodies larger than period conditionally, using allowLargerThanPeriod flag (as discussed in https://answers.launchpad.net/yade/+question/181411, thanks Giulia for the scipt) - document undocumented parameters of bodies creation (in utils.sphere) - enable interaction of two larger-than period bodies (e.g. cylinder vs. box) in addition to previous commit. - point to the "allowBiggerThanPeriod" flag in the LOG_FATAL message. - improvements in TW interface so that one can save and load "state" files to be used for defining deformations (this will actually be used by E. Ando for analyzing experimental data!) - code cleaning - make deformation analysis possible for arbitrary simulations (no longer depends on TriaxialEngine for defining the bounds) - fixed undefined variable when Triaxial engine is not present - erase bodies before adding spheres from file - Fix typo (thanks for pointing out Klaus, actually the "i" was correct: elastic-plastic means that the law is incrementaly elastic OR plastic, while elasto-plastic laws can be both at the same time) - big reorganization of the triangulation lib, which becomes a template library. Usage of different "info" classes for different engines is now possible, so that TWrapper doesn't have to instantiate useless variables inherited from the flow problem, and vice-versa. Will also worj for periodic flow model coming soon. - general code cleaning and removal of old files - a few hyperlinks fixed in *.bib's - remove custom dependencies breaking compilation Merge the "collide" branch to trunk (branch history at https://code.launchpad.net/~bruno-chareyre/yade/collide2) - missing reference update - remove the velocityBins lines in tests since velocityBins are removed from trunk - Draft version of the periodic fluid model from Donia Marzougui smallfix in flow model - fix a bracket mistake triggering ghosts definition after each insertion in periodic::triangulate() - add tests on boundary ids (<0?) before doing anything on them. - account for sweepLength in bounds comparisons of Collider::probeVolume() - removed unused file - Collider: fix the probe function (account for current body's position + typo in one comparison) - Newton: remove the useless "force" from damping2nd parameters, don't apply meanfield vel when not periodic (only diff is it avoids a multiplication of null matrix and vector), make gravity attribute work correctly - GravityEngine: add LOG_ERROR on deprecation (LOG_WARNING are not displayed in prebuilt package right?), better use Newton::gravity to save cpu time. - Clump.hpp: fix the template function that was using the old saveMaximaVelocity, use the new saveMaximaDisplacement instead - PeriIsoCompressor: never pause() in some c++ code, since it resuults in stuck GUI without a chance to run more timesteps - dispatching: don't make bboxes larger for static bodies - gravity : deprec. warning - collider: try and fix Anton's crash (https://lists.launchpad.net/yade-dev/msg08256.html and next in the thread) - Newton: workaround the resetForce bug in OMP build (https://bugs.launchpad.net/yade/+bug/923929) - small changes left behind in a previous commit (fix the "undefined IPCells") problem - include periodic PeriodicFlow in the triangulation lib - Compute the critical timestep correctly when clumps are present. - make the "smoothing" of strain rate evolution configurable via a registered attribute (default=unchanged behavior) - tell more explicitely that Young/Poisson is interpreted differently in different functors in their respective doc - make the LWStress function return pyList instead of tuple - documentation in makeCloud - default stiffness are zero, not NaN - TWrapper: python binding for local deformations - Flow: fixes in the periodic BCs - Flow: improvements in BCs handling and imposed fluxes, toward per-step update of the RHS + code cleaning - Periodic flow: support for optimized solvers (not in trunk) by introducing cells indexes - Periodic flow: optimization of periodicity by precomputed Hsize[k]*gradP products - SpherePack: more code documentation in makeCloud - missing in previous commit (sorry) - fix periodicity of interactions when large bodies are present. Demo script comming soon. - implement the compatibility between periodic fluid model and large bodies in PBCs using the "boundary" objects - Make unbalancedForce() account for Newton::gravity (and my first git commit!) - mirroring bzr3038 + bzr3039 - example script for large bodies in periodic BCs compile error; remove warnings; add last diffs from Donia Smallfix in index.html - fix doc string in the SpherePack.toSimulation function (crashing my terminal...) - update one reference Merge branch 'master' of github.com:yade/trunk - fix bug https://answers.launchpad.net/yade/+question/192152 in SpherePack.toSimulation() - fix a documentation bug (https://bugs.launchpad.net/yade/+bug/978234) fix a warning in DomainLimiter make periodic triax engine ScGeom friendly (a few scripts to be fixed in next commits) - remove reversedForces flag and/or use ScGeom in the example scripts for periodicity Merge branch 'master' of github.com:yade/trunk - add the possibility of updating only the RHS in the fluid problem, without rebuilding the triangulation+matrix Fix bugs introduced by incomplete addition of Real dt in some functions signature (messing virtual inheritance) Merge branch 'master' of github.com:yade/trunk Fix the problem of null pressure measured after retriangulation. Bind a measurePressure() method for the periodic flow engine allow BCs update without retriangulation via Flow::updateBCs() Fix a bug in PeriodicVertexInfo::ghostShift Merge branch 'master' of github.com:yade/trunk Fix a few bugs discovered with Luc: Fluid forces splitted between particles and their images in PBC, and others. Implement the updateBCs feature for PBCs. Enable pressure interpolation in periodic coupling The documentation now reflects the recent changes in collider's logic. Christian Jakob (11): Law2_ScGeom_CapillaryPhys_Capillarity can now be used with Ip2_FrictMat_FrictMat_MindlinCapillaryPhys for hertz model Add forgotten files Added new example script (examples/generate-psd-with-poro-example.py) Fixed examples in example folder, new folder called not-working move all model examples to example folder, fixed all examples, that are not in test folder moving checks and tests to scripts/checks-and-tests and fixing some examples in examples/test moving checks and tests to scripts/checks-and-tests and fixing some examples in examples/test moving checks and tests to scripts/checks-and-tests and fixing some examples in examples/test fixed all examples Improvements in Law2_ScGeom_CapillaryPhys_Capillarity.cpp (included isBroken flag and updated checkFusion) make fusionDetection and isBroken flag compatible Francois Kneib (4): Added the interaction between cohesive sphere and cohesive chained cylinder. Created Ig2_Sphere_ChainedCylinder_CylScGeom6D and Law2_CylScGeom6D_CohFrictPhys_CohesionMoment in Cylinder.cpp. Created CylScGeom6D in CylScGeom6D.cpp. Moved CylScGeom from Cylinder.cpp to CylScGeom6D.cpp Interaction test between a cohesive sphere and a cylinder. Fixed some bugs in Ig2_Sphere_ChainedCylinder_CylScGeom6D() and Ig2_Sphere_ChainedCylinder_CylScGeom(). Now the contact is rightly followed when a sphere move along a chained cylinder. It works with frictional cohesive or frictional contacts. Fixed some bugs in Ig2_Sphere_ChainedCylinder_CylScGeom6D() and Ig2_Sphere_ChainedCylinder_CylScGeom(). Now the contact is rightly followed when a sphere move along a chained cylinder. It works with frictional cohesive and frictional contacts. Jan Stránský (6): 1) modification of CpmState class 2) some changes in py/pack/pack.py Added Matrix6 Added damageTensor to CpmState Fixed bug 922744 (export module) Fixed SpherePack and _getMemoizeDb incompatibility with periodic boundary conditions Corrected assert(Matrix3) in Math.hpp O and wrapper.Omega made part of __builtin__ (equivalent to global variables). Should solve problem of question 182459 Omaga can contain more Scene instances Fix of previous commit Klaus Thoeni (3): 1. delete line which was commented out by Anton 2. derive WirePhys from NormShearPhys in order to use implemented functions which just support NormShearPhys (NormPhys is not supported, however, in the future if more contact laws with normal force only are implemented it might be better to introduce a boolean or so) 1. fix some typos 2. derive WirePhys from FrictPhys 3. compute limitFactor for WirePM 4. add limitFactor and normal force of wires to wpm in VTKRecorder - add capability to deactivate the damping in NewtonIntegrator for individual particle via O.bodies[id].state.isDamped=False - use this new property in examples/WireMatPM/wirecontacttest.py Luc Scholtes (7): add compressibility to fluid flow scheme delete obsolete line in flowEngine.hpp resolve bug 983888 add compressibility to periodic flow engine cleaning pack.py clean FlowBoundingSphere.ipp file Apply changes from Luc Sholtes. Luc Sibille (1): Update some publication references Rémi Cailletaud (4): Added google analytics script to sphinx doc Build infrastructure - removed r0calcul8 from builbot nodes (hardware issues) buildbot now builds two times, with eigen2 and eigen3 now uses xvfb for doc generation (for qt part) buildbot home on slaves changed reenabling r0calcul8 ================================================== yade-0.70.0 Sun, Oct 23 16:49:34 2011 +0200 Anton Gladky (129): 1. Prediction of simulation finish time is added to HTTP-batch server. 1. Fix of a previous commmit. Wrong prediction time. 1. HarmonicMotionEngine is added with example. 1. HarmonicMotionEngine update. 1. HarmonicRotationEngine is added including example in regular-sphere-pack.py 2. TranslationEngine is parallelized with OpenMP. 3. Translation and Rotation engines are working with Dynamic-bodies properly (temporal solution). 1. Regression tests for translation and rotation engines are added (not fully tested yet, but "all tests passed") 1. Changes from 0.60 (debian packaging). 1. scripts/debian-prep creates orig.tar.gz and removes .bzr directory 1. debian-prep creates version number with "1" at the end 1. Backporting changed from 0.60 branch 1. qt4 is "on" by default 2. Syntax fix in documentation. 3. export.text is disabled in regular-sphere-pack example 1. Initial yade.spec is added for RPM packaging 1. Fix bug in VTKRecorder (Thanks, Vaclav) 2. Cohesive-chain test disabled (please, fix it, who can...), https://yade-dem.org/buildbot/builders/yade-full/builds/127 1. Changes in .spec file 1. Some preparation to dpkg ver3. 1. Deleted isDynamic from Translation Engine 1. Commented SubdomainBalancer packs.py to make it workable with default compilation. 1. Partly fixes 692759 1. debian/copyright is changed according to debian requirements. 2. control-template is changed to make the package "lintian clean" 1. Fixed warnings in packs.py->utils.py 2. Created geom.py module for generating geometrical forms from facets. 3. utils.facetBox and utils.facetCylinder have been moved to geom.facetBox and geom.facetCylinder respectively. Backward compatibility is saved. Examples are fixed. 4. closeGap in utils.facetCylinder and utils.facetCone works now only when |anglRange|>math.pi 5. geom.facetBunker is added with corresponding example in pack.py 1. python-imaging is added to installation section of sphinx-docs as well as to debian-dependency 2. geom.facetHelix and facetPolygon are added with examples 1. Closes #702296, if somebody uses rotationengines, please, update! 1. regression tests of kinematic engines are updated and activated. 1. Updated regression tests. Rotation engines. 1. HelixEngine updated, dublicated code deleted. 2. HelixEngine is added to regression tests. 1. Extra Quaternionr q() definition is deleted from RotationEngine (thanks, Bruno) 1. Shop::getStressForEachBody() is now returning stresses for FrictPhys+ScGeom combination; not only NormShearPhys+Dem3DofGeom 1. Added debian/watch to track new yade versions. 2. Some small modifications in debian/control-template to escape lintian warnings. 1. vtk-5.6 path is added to SConstruct to make it compilable with Debain experimental 2. Fixing spelling mistakes in documentation. 3. debian/ -directory changes. 1. Fix lintian warnings in manpages. 1. jquery.js in documentation is now symlink to a packaged jquery, if it is available. 1. Debian-directory cleaning and modifying (checked with lintian -IE --pedantic, no warnings at all). 1. openmp-feature is added into the debian-build options. 1. Hopefully fixes previous error on building PDF (not checked yet). 1. One more try to fix tex-failure. 1. Missing files and licenses are added to debian/copyright 1. yade-support plugin is added to lib/SConscript as described here https://bugs.launchpad.net/yade/+bug/707966/comments/2 1. Hopefully fixes bug 707966, additional libraries are added for linking in shared libraries (vtk*) 1. Small fixes in debian/copyright to escape lintian-warnings. 1. debian/ is moved to scripts directory 2. scripts/debian-prep scripts copies ./scripts/debian/ to ./debian/ 1. Regression test of yade.plot.addAutoData() is partly disabled is due to https://bugs.launchpad.net/yade/+bug/715739 1. Build-script and buildbot-config are moved to scripts/build-infrastructure 1. Updated installation instructions 2. Updated spec-file for RPM-packaging 1. Added a patch to escape -rpath (an ugly and "very" experimental) 1. Fixed Tutorial link in documentation (taken from https://www.yade-dem.org/sphinx/tutorial.html) 2. Some small fixes in documentation 3. Changes in spec-file for RPM-packaging 1. LOG_INFO and LOG_WARN are disabled when log4cxx feature is disabled. 1. Added shop.py. Like shop.cpp but in python not to make yade.utils too crowd 2. Added yade.geom and yade.shop to sphinx 3. Some fixes in docs 4. yade.shop.spheresPackDimensions is added with corresponding example in packs.py 1. scripts/debian-prep does not insert now distribution name into the version number. Update of spec-file for RPM packaging 1. vtkNetCDF was deleted from vtk-libs due to absence in libvtk5.6-dev. Seems functionality is not corrupted. 1. python-sphinx dependency for Debian is changed to >=1.069 1. Added python-imaging to Debian packaging rules. 2. Fix spelling in documentation. 3. Debian-Template yade-doc file is fixed (0.60 version was hard-coded) 1. Update installation information in documentation. Fix in installation documentation 1. RPM-spec file update 2. Old yade.spec was moved from the root directory to scripts/RPM_packaging 1. Fixed some docs 2. shop.spheresPackDimensions can accept now a list of bodies, not only the list of their id's 1. yade.shop module is renamed to yade.bodiesHandling to get more adequate name 2. added bodiesHandling.spheresModify to modify a pack of spheres. Corresponding example is in examples/packs/packs.py 3. added bodiesHandling.sphereDuplicate to make a copy of sphere 1. Renaming shop.py to bodiesHandling.py 1. ForceRecorder renamed to ForceTorqueRecorder 2. TorqueRecorder is added 1. Changed yade.spec file. Seems, working now. INSTALL_PREFIX option is added to CMakeLists.txt CHUNKSIZE option is added to CMakeLists LIB_EIGEN_PATH is added to CMakeLists.txt Typo fix in previous commit Fix formula displaying in utils.getViscoelasticFromSpheresInteraction "mask" parameter is added to GravitiEngines to make it more flexible. 1. ForceRecorder.totalForce and TorqueRecorder.totalTorque are now accessible from python interface 2. Fix in TorqueRecorder: getTorque is added 1. Fix TorqueRecorder calculation utils.shiftBodies function is added to move bodies without velocity update. 1. in utils.sumTorques and utils.sumForces py::tuple has been changed to py::list. I think it is more convinient. 2. added RuntimeError() to checkTestTriax.py. Bruno, are you agree? 1. Added new checkWeight test to --check scripts 2. It is not neccessary now to add the script name into the checkList.py, just drop a new script into the scripts/test/checks directory 1. Updated build-farm script (building Debian and Ubuntu packages for different distributions). 2. Updated installation section of documentation (Gentoo installation). 1. Some changes in installation section (Gentoo) 2. Check tests are now running like --test, returning error code if something went wrong. 1. Performance test is added. Initial script. 1. Small changes in installation section. 2. voxelPorosityTriaxial doctests are transformed to a simple source code demonstration due to results instability (candidate to --checks section http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg06635.html ) 3. Added initial sqlite database of performances on different machines. 1. Fixes bug #724396. Thanks Sergei and Vaclav. 1. Make trunk compilable with Eigen3 (coming soon). No performance test results yet. 1. Color output for --performance tests is added. 1. Fix doc generation of the previous commit. 2. Added a link to revision archive on yade-dem.org Color output in --performance tests is deleted. Add Eigen3 transparent support: if eigen3 persists in the system, it will be used by default, otherwise - eigen2 Fix Eigen3-Eigen2 detection variables. Fixes 748943. Thanks Bruno for pointing out Add "stop" button at the batch-panel Fix spelling errors: allows to... 1. Replace "subscribedBodies" to "ids" almost everywhere in the code. 2. Fix a couple of examples. 1. Move Dragengine from SphereFactory to ForceEngine. 2. Fixes in ForceEngine (crashed, when force applied to non existing body) Add LinearDragEngine 1. Fix a crash, which appears, when force is read from non-existing body. 2. Fix warning in CohesiveFrictionalContactLaw 1. --check tests are now copying into the libDir/py/yade/tests/checks folder to make it available in packaged yade version. 2. Rename "dataTriax" folder to "data" to make this folder and for other tests suitable. Added syncSizesOfContainers to forceContainer::reset() for the case of not using NewtonIntegrator in scripts Remove PressTestEngine, because python-variant works much better Fix an error, when spheresPackDimensions tried to get states of non-existent bodies Skip empty ids in KinematicEngine Fixes nans in ViscoelasticPM, when kn=0 or ks=0. Fixes 804650 Fixes crash, causing by saving-loading simulation with erased bodies. Fixes #803774 Add one more --check scripts to check GravityEngine and NewtonIntegrator Change the number of steps for checkGravity.py Add O.wait() at the end of checkGravity-test. Hopefully will fix the buildbot-error. Add utils.getSpheresMass Add mask-option to SpheresFactory Add ids-parameter to SphereFactory to get the ids of newly created bodies Add utils.psd(). First try Add mask-parameter to utils.getSpheresVolume and utils.getSpheresMass Fix (hopefully) simulation abort, when an interaction::erase is trying to delete an interaction, where one of bodies is already removed from simulation (id2) 1. Add PSD-support to SpheresFactory (not finished, but already working) 2. Add exception in utils.psd(), if all particles have the same diameter Simplify utils.psd() Add forgotten PSDuse-variable initialization in SpheresFactory Add comment on doubtful check of b2 in InteractionContainer::erase Simplify PSD-input data for SpheresFactory Fix file-creation error in yade-batch, when name of log-file is longer, than 255 symbols. The name cuts off now. Add exactDiam flag to SpheresFactory 1. Add example of SpheresFactory into packs.py 2. Add stopIfFailed flag to SpheresFactory. -Remove dublicating item in references Fix some errors during doc-generation Fix crash in capillary law (removed bodies were not checked) Add mask-parameter for spheresPackDimensions Fix mask-check in several places Fix in spheresPackDimensions. The bug appeared, when only mask was inputted Add mask-parameter to spheresModify. Fix a default parameter for ids in spheresPackDimensions Add some more parameters to spheresPackDimensions 1. Remove "consider" parameter from textExp function 2. Add "mask" parameter into textExp function 3. Add one more format for output. Delete all corresponding iterations explicitely, when the body is erased Fix compilation error during debug-mode Move not-working examples into the corresponding folder. Update news Fix link to installation page 0.70.0 Bruno Chareyre (130): - Rename Cohesive law functor with "6D" as in "ScGeom6D" - Same for chanedCylinder's Ig2 functor. - update scripts. - Fix compile crashers due to bad include paths. - Keep robust kernel the default. - re-enable cohesive chain test - declare deprecated names (part of r2543) - revert experimental parameters previously commited by mistake in cylinder script - Make TriaxialTest behave correctly by default - as it used to, i.e. generate the correct number of particles in a cube of size 1. - disable the last comparison on velocities (see https://lists.launchpad.net/yade-dev/msg06178.html) - add the mandatory "bool periodic" parameter for makeCloud. - Prepare linear solver usage in FlowEngine. - Some cleaning. - Add inexes to triangulation cells fro vectorization. - remove a warning in Tesselation.cpp - fix FlowBonding sphere for first iteration and a few other things - make GaussSeidel virtual in FBS - handle different solvers. - small optimization on dt divisions. - FlowEngine : rewrite updateVolume so that cell volumes are not computed twice. - Remove irrelevant remark in SCPE - Some missing "6D" here and ther in decorations (could affect only devirtualized build) - Implement tensile plasticity and add the corresponding parameters in CohFrictPhys. - recent commits broke or modified something in cohesive law. The reg. test points it out. - restore default CohFrict behaviour - PeriTriax : remove the constant-distance approximation in stress definition, using wrapped coordinates instead of radii. - Get back standalone energy tracing in ECL. - Cylinders : handle cylinder-sphere contacts with a fictious state representing interpolated motion between nodes and passed to ScGeom - Cylinders : implement CundallStrack for interaction between 3 bodies (1 body + 2 nodes) - Cylinders : a number of fixes - no more bugs it seems - Cylinders : handle zero-sized element for terminating chains - Cylinders : update scripts; add example script chained-cylinder-roots.py, with cylinders, spheres, and boxes - Ig2_Box_Sphere_ScGeom : small class name fixes ("6D") - utils.py : adapt cylinders linking - ElasticContactLaw : don't use Body::byId when possible - ScGeom6D : put quaternion normalization between #ifdef guards (debug only) - clean the script. - recommit 2608 with fixed reg test (making ratcheting correction negligeable with dist=.999999999999999999*size) - also fix the compile errors - r2608 again, sorry. Local tests are invalidated by last changes in setDynamic, but the commit is correct. - finish implementation of contacts tracking on chained cylinders. - some cleaning and doc update Fix : mistake in prev. commit while cleaning cylinder code. - recommit 2617 without the autoformating from kbibtex. - Doc : give precise references for triaxial algorithms. - Deeper integration of isDynamic semantic : skip velocity integration, damping, DOFs blocking, and exact spherical rotations, when !isDynamic. 0-density bodies should be safe. - Partial DOFs blocking is not implemented yet. - ratcheting documentation : improve and unify source and inline versions. - As in r2615 : skip velocity update, damping, DOFs blocking, and exact spherical rotations, when !isDynamic. 0-density bodies should be safe. This is a merging r2615 with the per-DOF blocking and clump handling from r2621. - updated FIXME, it seems we do the same thing twice -Fix kinetic energy definition. - Fix stripes display - Add secondary light and register light parameters - define specular exponent for smoother display - define and use GL display lists - review and update of documentation in a series of class - adapt TSC and TCE to new non-dynamic behaviour (more changes and cleaning planned) - remove prevNormal and frictionAngle from FrictPhys - Add temporary FrictPhysTransitory for compatibility of old laws - Rename Ip2_2xCohFrictMat_CohFrictPhys for names consistency, as suggested by Janek -As in r2615 and r2622 (both reverted), and partialy in r2626 : skip acceleration, per-dof blocking, damping, and velocity update for bodies and clumps in case of DOF_ALL blocking (per DOF operations are useless in such case). Please don't revert unless there is a reason to compute DOF_ALL's acceleration and it is guaranteed bug-free (see list). Discussion more than welcome, of course. - Fix one mistake in previous commit (incrementing angVel even for asphericals), sorry. - Move clump damping after the foreach(member) loop, so that it will damp the total acceleration at clump's level. - Don't damp clump members. Instead, compute undamped acceleration and damp it at the clump's level. - Similar mechanism implemented for DOF's blocking : compute unblocked accelerations and block at the end (remember blocking one DOF triggers tests and divisions). - Still possible optimizations (especially for spherical rotations and translations), see https://blueprints.launchpad.net/yade/+spec/clump-forces. - One FIXME : aspherical damping is not correct a.t.m. since it uses torque where angAccel should be provided (suggested fix in sources). - Probably fixes a few inconsistencies in previous commits. - Missing in last commit (fix builbot failure) -Fix sphere rendering for closing/opening qtview (closing was deleting existing display lists, new view was empty) -Make quality apply for striped spheres as well -Make it possible to turn duplicated spheres on/off in periodic BC -Separate GLUT and striped spheres functions for clarity -Optimize stripes rendering with GL_TRIANGLE_STRIP - A checkTest for triaxial simulations. - Add a function (and python wrapper) computing the exact mean stress in each sphere. -fix compile error in prev commit. - Integrate check tests in yade options (see README). - Handle PBCs in Shop::getStressLWForEachBody (not tested) - uncouple Hsize and trsf, add setters for attributes Cell::trsf and Cell::refSize, update all scripts. (see http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg06101.html and next in thread). - Fix some temporary stuff left behind (safe but useless) + get back one line of comment removed by mistake. - update periodicity documentation - rename Hsize->hSize to be consistent with names convention. - remove a duplicated ref and add a CGAL ref - one file left behind in last commit, sorry. - Add resetTrsf() to set trsf without side effects. - minor updates of attributes doc to be consistent with recent changes. -Don't maintain refSize in setHsize, in hope that we will not drag it forever, as suggested in https://lists.launchpad.net/yade-dev/msg06836.html. - Fic classname and give working example. - update bodyStressTensor doc. makecloud update (recommit after fix) - Fix psd transformation from mass distrib to number distrib. - Make sure the function will always return the number of particles required by the user as soon as it is psecified. - If num is specified, generate sizes the deterministic way by descending order. - make porosity parameter optional and give it a default value. - update doc and script. - make Cell.size read/write for faster hSize setting. - improve and simplify documentation (the older method is no longer documented) small typo in property name ("sizes" instead of "size") - Move older or redundant interface between #ifdef CELL_BACKW_COMPAT guards. - Replace refSize by current size in PeriTriax - forget adding the "s" in "cell.sizes", since existing scripts are already using "cell.size" -> fix sphinx doc about this. - some more Cell doc. After typing the paragraph on display, I realize w'd better not update refHSize when trsf=s-------------- This line and the following will be ignored -------------- - some more cell doc. As discussed on the list: - Don't update refHSize when trsf is defined - Update it when hSize (like before) or size are assigned - use current size in PeriEngine - remove unneccesary cell attributes - replace setBox by size - update doc (atributes and header) consistently - Forgot to save Cell.h before committing : updated header doc. Yet more cleaning in cell (sorry). - remove FrictPhysTransitory - A few changes in Cell as discussed in the list. - Updated doc. - Attempt to fix buildbot output in triaxCheckTest (LOG_INFO are disabled by default on my machine but the buildbot has a different behavior it seems, which gives lots of junk lines) in the log. - Add a script demonstrating use of inclined initial cell and reseting trsf - Small doc or formatting fixes here and there - add hSize parameter to makeCloud so that it can generate arbitrary parallelepipeds (previously working only by luck on a few special geometries) - documentation - usage in script, which uses now more funny shape (try it!) - Preparation for citation (wiki won't accept text file uploads => commiting to trunk) - Include Yade citation page in doc, and add links in different places. - Add 'InCollection' keyword in bib2rst - One missing file + updated links to individual pdf's in pub.rst.in Missing in previous commits (the most important file...) - Fixing a few links. - more fixes... - A typo left in index.html. Changes in this file are not reflected in documentation built localy, and erasing the _built dir breaks sphinx builds. It makes changes in sphinx main difficult. -link to discussion of citation model - run "xelatex Yade.tex" twice, so that the content table is generated correctly. - Small fix in makeCloud (hSize not passed correctly in recursive calls) Format check tests output better. Small fix in unbalancedForce doc. - per-point imposed pressure mechanism. - per-point imposed pressure mechanism - one fix in permeabilites along boundaries - remove save_vtk flag and add python wrapping - Add functions for constrictions sizes statistics. - Remove a few compile warnings. -fix accents and reference name in Catalano's entries -Update clumps forces and torques in Newton, as in https://blueprints.launchpad.net/yade/+spec/clump-forces. -Update Shop::unbalancedForce accordingly -Remove the old unbalancedForce code from TSController and make it point to the Shop version. - re-fix fluid area definition - some cleaning here and there (Donia+Bruno) - fix fluidArea correction (S0) - Optimal computations by storing fluid/total ratio in cells info - handle changes in cell's volumes sign - add converters from Eigen vectors to CGAL vectors - small fixes in references - cell volume update was disabled -> enable again - Fix the behavior of bodies moved with the mouse with respect to the new isDynamic behaviour. - The velocity is now defined correctly so that contacts on the moved object are computed correctly - use same ordering convention for boundaries in triax and in aabbBoxes. - removed useless variable - correct initialisation of compression axis - Set default values of walls ids - Fix cells volume functions - Add a vertex accessor Tesselation.vertex(body_id) - Various improvements - fix the action condition (was it never tested?) - invert x and y axis for getting stress (the convention changed in r2830) A section on devpt tools and check tests in programmer manual. - doc smallfix - improved section on regression test - fix (in fact workaround...) bad display of double minus (--) in sphinx. - typos End a sentence... (thanks Jerome) - more explicit notes on citing (I realized it was not clear while reviewing a paper citing yade ;-)) - again small fixes in the "development tools" section - remove many warnings - handle viscous shear force gracefully - don't exit the checkList when one checkTest fails, we want all of them tested in all cases - move unstable test out of checks - add Ohloh widget to main page - small fixes in the example script (so that it actually works). - add setImposedPressure that let the p value be modified -shift returned p index - import pack and utils at startup Make accents more bibtex-user-friendly in bibtex entries. typos fixing - fix problems again, sorry - standardize the first page of yade doc and add metadata to the pdf, so that online scanners will identify it correctly (not title:"Smilauer", author: "Catalano"...) - fix a few references - Feng Chen PhD + paper (thanks Feng!) - some small updates - fix typo (thanks Remi) - change sections ordering - an attempt to fix builbot-side compile error in the html version of "formulation" chapter (compile ok locally) - A few fixes on deprecated attributes. Small fix in shear stiffness averaging (thanks Emanuele) code cleaning only (including example usage of stringstream for Ema) - One more entry in PhDs (Jerier) - fix documentation (missing factor in an equation) - fix bug 2) found by chiara (https://answers.launchpad.net/yade/+question/169689) - link to libgmpcxx explicitey if cgal in features. Solves runtime undefined symbol on natty. - Include the material from the school in Grenoble in a subfolder of /scripts Remove files added by mistake. - Add material from the "discrete mechanics" school in Grenoble 2011. - fix the "homoDeform" bug https://bugs.launchpad.net/yade/+bug/836867, and adapt regression tests so they don't test homoDeform=1 - add gravity to Newton - tune front page of the documentation to be more google-scholar-friendly - include gravity a bit differently in Newton, so that it's reflected in scene->forces and accounted in the unbalanced force definition. - one more PhD done with Yade - remove Ohloh widget since it's never clicked and suggest an underestimated number of users - small addition in TSC documentation - fix Newton::gravity usage. Weight is g*mass, not just g... master thesis on yade-fluid coupling uploaded on wiki and added to references. - fix typo - remove the bibtex entry "Yade DEM" without authorship. It could only be misleading and make people use inadequate reference. - fix https://bugs.launchpad.net/yade/+bug/693505 - don't crash the TSRecorder when bodies are removed Chiara Modenese (19): 1. Move alphas parameters to FrictMat as discussed with Bruno (harmonic-average of them is introduced in Ip2 functor). 2. Forgot one inequality when plasticity is applied (maybe I do not like tests so much :-) Sorry, anyway). - Adjust definition of maximum strength for rolling resistance (thanks to Bruno for suggestion). - Get rid of prevNormal (MindlinPhys inherits again from FrictPhys) - Small changes to HM (I added the code for the moment rotation but using quaternions, work in progress to use the incremental formulation instead of that) - Add incremental formulation for the moment rotation (bending only) to HM law (it is very similar to the code for the shear part as written in ScGeom - it has been tested but feedbacks are welcome). PS Let me know if you are interested to have it also in "Law2_ScGeom6D_CohFrictPhys_CohesionMoment" where actually the total formulation is already present. @Bruno: maybe in ScGeom we could add this incremental formulation too? - Add relAngVel function to ScGeom (a similar version can be called from python as done for incidentVel) @Bruno: I would like to add the incremental formulation to CFLaw, how do you suggest to do that? Maybe I can use a bool something like (useIncrementalForm)? - Add the possibility to calculate bending and twisting moments using the incremental formulation in both CFLaw and HMLaw; - Add maximum elastic torsional moment in CFLaw (it should be computed using normal force, I will see how to compute it somehow); - Fix mistake in mindlin.py example script. - Add a seed parameter to makeCloud, particleSD and particleSD2 functions. The parameter is used to initialize the random number generator. - Add calculation of fabric tensor for periodic cell as according to Satake (bib is updated too). The tensor can also be spit into two different parts each of them related to strong and weak contact forces respectively. - Small changes in HM. - Calculation of fabric tensor takes care of the sign of normal force (I think this is the way to do it if we have cohesive forces but I will check again in the existing literature). Also the tensor can be split into two parts according to the mean contact force or a threshold value if this is going to be specified (thanks Vincent for suggestion). - Add a function to HMLaw which computes the ratio of sliding contacts. - Adjust the sign convention in the computation of the fabric tensor. Now the tensor can also be split into tensile and compressive part (simply setting the threshold value equal to 0 - added documentation about that). - Rename (for the fabric tensor function only) compressionPositive to revertSign (that is the meaning indeed - work in progress to use the scene flag and make automatic distinction whichever law is used). - Average stress tensor of periodic cell can also be spit into two contributions, given a threshold value (mean force by default). - Forgot the reference (sorry). Fix doc. - Add formulation for determination of time step for elastic spheres according to Rayleigh wave speed. Fix small bug in HM (only in case of viscous damping). - Wrap Eigen function to get eigenvalues and eigenvectors of a Matrix3r in py - Small fix in HM - For now, add 2d version of particleSD (discrete distribution) - for other type of distributions (like the one generated by makeCloud), something similar can be done. - Fix color map in shop (thanks Vaclav). - Fix bug in Periodic Boundary. scene->cell->prevVelGrad was never updated. It was equivalent to apply homoDeform=2 in place of homoDeform=3. (Thanks, Vaclav) - fix bug 1) as discussed in (https://answers.launchpad.net/yade/+question/169689) Donia Marzougui (1): - Add viscous shear force definition (disabled by default) (Donia+Bruno) Emanuele Catalano (19): - Retriangulation controlled by a volumetric deformation threshold - Substituted pkg-dem in pkg/dem (and similar) to included files - Removed #define flow_engine line from def_type, definition is moved to the scons profile - Reorganized debuggin' - Found and corrected a error in boundary creator - Changed names of .h files - new function for adding bounding planes - Update flow code. - Fixed compilation errors - Fluid velocity calculation takes into account of facets velocities - Update flow code - Update flow code - Correction on facet fluid/solid surfaces calculation - Fixed calculation of fluid velocity in cells - re-fix fluidArea correction (S0) by Donia - Fix error in Volume_cell function. - Fix retriangulation issue - Fixed two warnings in FlowEngine - Changed link to deprecated utils.encodeVideoFromFrames with utils.makeVideo (hope i did it properly, first time I modify docs) - Reordering new function for viscous force calculation - Added computation of average cell permeability for visualization - Removed correction on smallest permeabilities - Porosity computation neglects boundaries - New functions ImposeFlux() and GetFlux() for one-point fluid injection - FlowEngine does not depend on TriaxialCompressionEngine anymore - Clean of useless variables - Consolidation files writers move to python scripts (Flow functions MeasurePorePressure and MeasurePressureProfile do what is needed) - Removed superfluous variables - Fix segfault due to uninitialised normal to walls - Add function to measure slice-averaged pressure values Jan Stránský (5): Little changes in CpmStateUpdater 1. Changes in ConcretePM.cpp 2. added yade.ymport.unv function 3. added yade.export.VTKExporter class 4. added method outer to Vector3 in Python Small changes in yade.ymport.unv and corresponding example Change of CpmMat.relDuctility to CpmMat.crackOpening (making Cpm model more particle size independent) rotation of facets taken into account in yade.export.VTKExporter Janek Kozicki (10): plot.py: added `legendPosition` and `legendPositionSecondary` so we can decide where the legend should be placed, by default it is 'upper left' and 'upper right' Added yade.utils.voxelPorosity and yade.utils.voxelPorosityTriaxial. It allows calculating porosity at any arbitrary sub-volume of a whole sample. See included documentation. small documentation fix standalone example almost works. I still have some problem with sample randomness, and exact answers. Added another variation of simple scene - this one is for energy tracking added nice legend to the plots more flexibility, few more parameters on the top of the script. better default parameters, use dict(...) to read O.energy.items() last correction for simple scene energy tracking example - I forgot to commit changes in CohesiveFrictionalContactLaw but in fact maybe better if those methods for calculating elastic normal & shear energy would be moved somewhere else, maybe to shop? I'm not sure. fix warning, add plastic dissipation tracking Jerome Duriez (17): Details Fixes https://bugs.launchpad.net/yade/+bug/672473 (an error in the script finally...) Details changes in comments of Vector3r forcesOnPlane(..), after http://www.mail-archive.com/yade-users@lists.launchpad.net/msg02610.html. Hoping you agree, Vaclav (if not, do not hesitate to revert !) Few typos corrected in doc, and pack.py. Changes in "normalInelasticity" files suggested by http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg06011.html Fixes https://bugs.launchpad.net/yade/+bug/706937 Minor changes - typos in programmer doc - removal of useless backward compability in system.py - removal or english translations of comments in the three c++ files - some changes in normalInelasticity-test - add of a check version of this script - add of a sentence about these check tests in prog.rst - changes of deprecated function in tutorial scripts - typo in some other rst - add of a note about plot.plot in plot.py - beginning changes in SimpleShear preprocessor - initialization of many variables in Law2_Normal.... - relative difference considered in check test, instead of absolute one - add of some hyperlinks in doc - changes in scripts. At the moment I can run ~20 times the proposed checkTest without fails (did not make more than ~20). Fails occured when interaction disappeared. Wait however a bit... - still small changes in doc mainly - add of a "by" in doc - re let work the .py, modifiying definition of state.blockedDOFS - maintaining of SimpleShear FileGenerator - checkTestNormalInelasticity.py again among check tests. I launched it more than 20 times without crash here Let spheres of SimpleShear be wiser (reducing GSTS->defaultDt) - changes in simpleShear.py - correction of small error in doc (I think) Few changes in doc (sphinx and Sconstruct's one) after https://answers.launchpad.net/yade/+question/169042 - In Law2... add of a requestErase of the interactions with un<0, which was missing. Could help https://bugs.launchpad.net/yade/+bug/810056 ? Klaus Thoeni (11): New implementation of a particle model for wires and rockfall meshes (initial state) 1. Fixed problem in postLoad (regression tests should work now) 2. Add some examples for testing the new WirePM with 2 particles update scripts for the WireMatPM 1. implement packing for the WireMatPM 2. add some examples for the WireMatPM 1. correct affiliation in doc/sphinx/conf.py 2. derive WirePM from FrictMat 3. add value which indicates how far interactions are from normal failing (currently just used in WirePM) 1. move value which indicates how far interactions are from normal failing to WirePhys since only WirePM is using it 1. update WirePM scripts in scripts/test/WireMatPM 2. add a simple example for interaction of FrictMat and WireMat: examples/WireMatPM/wirecontacttest.py 1. add some more comments 1. add some more comments 2. correct some typos 1. fix problem (segmentation fault) for save/load simulations with WireMat 2. correct some typos 1. update scripts 2. add unbalancedForce to diagram in wirecontacttest.py Rémi Cailletaud (5): Added buildbot master.cfg file in scripts dir - removed log4cxx from build options beacause of wrong exit status (https://bugs.launchpad.net/yade/+bug/410250) buildbot now creates a source targz Build infrastructure : buildot script modified after an update of nagios probes modifiied buildbot configuration to fix tarball build Sergei Dorofeenko (15): fix Bug 672623; fix some examples merge with trunk 1.Add silent switcher to NozzleFactory; 2.Fix examples merge with trunk 1.Fix RotationEngine for new meaning non-dynamic bodies 2.Fix STLImporter 3.!!! Set aspherical=False for a facets. Need more consideration. 4.!!! blockedDOFs for leapfrogAsphericalRotate need more consideration. fix bug [Bug 692452] 1. ViscoelasticPM: release from prevNormal; 2.Small fixes merge with trunk 1. Rename NozzleFactory to SpheresFactory; add derived CircularFactory and QuadroFactory. Example is scripts/test/spheresFactory.py 2. small fixes fix examples 1. Rename QuadroFactory to BoxFactory; some fixing SpheresFactory 2. Rename facet->nf to facet->normal; access to the facet's normal from python 3. Fix examples typo fix and more typo fix fix bug #721107 1.Add utils.trackPerfomance; 2.Small fix Unknown (2): Modify CohFrict* classes as discussed with Bruno on the list. 1. Move alphas parameters to FrictMat as discussed with Bruno (harmonic-average of them is introduced in Ip2 functor). 2. Forgot one inequality when plasticity is applied (maybe I do not like tests so much :-) Sorry, anyway). Václav Šmilauer (75): 1. Fix Clump compilation in debug mode small fixes in scons 1. Replace includes {lib,pkg}-* with {lib,pkg}/*; compiles (no full compilation tested) 1. Implement an initial version of generating loose clump packings of predefined configuration with SpherePack (TODO: do not recompute clump properties when adding them using toSimulation for each of them separately, but use those precomputed on given configurations). See scripts/test/clumpPack.py 2. Make selection of clump member highlight the whole clump in OpenGL 2. Add Dong2010 article to articles done with yade (authors contacted for fulltext) 1. Fix particle highlighting bug introduced lastly 2. Enhance the SpherePack.makeClumpCloud routine to be much more efficient (uses bounding spheres) 3. Add Ig2_Wall_Sphere_ScGeom 4. Enhance scripts/test/clumpPack.py Some experiments with cmake 1. Add optional MatchMaker to Ip2_FrictMat_FrictMat_FrictPhys to decide how to compute contact friction angle. 1. Fix include paths pkg-common to pkg/common etc, merge other changes. 1. Allow O.engines to be modified inside the loop from python 2. Fix include dir creation (thanks, buildbot) 3. Fix Ip2_FrictMat_FrictMat_FrictPhys failure (inversed conditional) 4. Add tests for substepping, modification of O.engines and Engine.dead 5. Remove O.initializers 1. Add energy tracking to GravityEngine, NewtonIntegrator, PeriIsoCompressor (the last one not tested yet) 2. Update scripts/test/energy.py 3. DISABLE cohesive-chain test, since it was already broken by previous Bruno's commits 1. Add detailed docs for plot.saveDataTxt 2. Do not add dissipated energy if zero in Law2_ScGeom_FrictPhys_CundallStrack 3. Set friction to zero in scripts/test/energy.py 1. Do not enable draggable legent if not supported by matplotlib (thansk, buildbot) 1. Fix erroneous assert in the integrator (energy & clumps) 2. Fix bug in distance computation in SpherePack.makeClumpCloud 3. Make scripts/test/energy.py use clumps (and no friction) to have rotations, as Bruno suggested. 1. Fix chunkSize=1 builds (bug introduced by changing include paths) 2. Add octree visualization engine (for debugging clump computation) 3. Make editor of sequence of serializables resize more intelligently 1. Simplify InteractionContainer, move interactions inside bodies (NOT useful for getting all interactions of a body) 2. Advance with cmake a little bit (nothing functional yet) 3. Remove YADE_REQUIRE_FEATURE, use plain #ifdefs instead (empty files will be compiled, oh well) 4. Remove a few files that were apparently not compiled for a very long time. 1. Fix compilation pb with cgal (sorry, cgal does not compile with clang, so does not get much coverage from me). Thanks to Ema for reporting. 1. Initial subdomain support, which includes NewtonIntegrator, GravityEngine, InteractionLoop; new SubdomainOptimizer to put bodies to subdomains. 1. SubdomainOptimizer now splits domain and adjusts later so that there is similar number of particles in all domains 2. Add --cores option, defining CPU affinity; based on some tests, it actually hurts performance... :-| 3. #define likely/unlikely (like in Linux kernel) and use it in a few conditions in loops to help the compiler 4. Fix a strainge numerical "bug" in InsertionSortCollider where the same id has inversion with itself (min>max?) 5. Add pack.inParallelepiped predicate (not yet tested) 6. pack.filterSpherePack now returns SpherePack (the other routines are still to be made consistent...) -- see https://lists.launchpad.net/yade-users/msg03887.html 1. Backport doc generation crash (picked from subdomains) Remove extra asserts to make Anton happier (sorry, forgotten stuff) 1. Add timing statistics to yade-batch 2. Make cmake closer to functional build 3. Fix xmlrpc error in the window between job start and xmlrpc-readiness 4. Add a few options to batch, make cpu affinity optional 5. Add subdomain mask to OpenGLRenderer 6. add unlikely to some conditionals in loops 1. Fix requestErase of erased interaction (thanks to Anton for reporting) Fix INteractionContainer bug, enhance the timing table for batch. 1. Assume cache line size 64 bytes in OpenMPAccumulator, if sysconf reports zero (should fix startup FPU exception reported by Giulia) 1. Merge the subdomain branch, enable subdomains feature to enable 2. Delete some obsolete code in scons 1. Add access to clump member from python 2. Fix Clump i/o (clumpId was not saved) 3. Rename regular-sphere-pack to packs 4. Fix a few bugs (thanks, Anton) 5. Fix SubdomainOptimizer behavior in some corner cases 6. Add some checks to qt4 1. Fix L3Geom, add Sphere+Wall interactions, plus some benchmark scripts 2. Add NewtonIntegrator.kinSplit, to track translational and rotational energy separately 3. Add --randomize option to batch, for running jobs in arbitrary order 4. Make Body::setDynamic() (un)block State.blockedDOFs (for future compat) 5. Add Serializable::cast static casting method 6. Several fixes in utils, plot etc 1. Add MatchMaker(Real) ctor 2. Adjust timing report format for batch (precision) 1. Fixes in L3Geom, L6Geom & friends 2. Add scripts/test/beam-l6geom.py to demonstrate L6Geom 3. Fix LawTester so that ti works with all 6 dofs reliably now 1. Add Gl1_L6Geom, and a few params to Gl1_L3Geom as well 2. Add movie to scripts/test/beam-l6geom.py 1. Remove some obsolete files, update INSTALL and NEWS 2. Make qt._GLViewer properly documented with sphinx Fix compilation error introduced lastly, sorry. 1. yade-batch can run a single job (without parameter table) 2. Avoid some exceptions in plot 1. Make the i/o regression test quiet by adding quiet flag to saveTmp/loadTmp 2. Facet has NaN vertices by default, and Facet.postLoad returns without warning in such case 3. LawTester now has most data as Vector6r instead of 2xVector3r. The syntax changed (backwards-compat with warnings, sorry), path should be disPath, ptOurs, ptGeom, rotOurs, rotGeom is now in uGeom and uTest 4. Add Vector6.head() and Vector6.tail() to return first/second triplet as Vector3 in python (corresponds to start<3>() and end<3>() in eigen2 and head<3>()/tail<3>() in eigen3) 5. Make the qt4 interface display Vector6 properly 1. Fix batch script (thanks, Anton) 2. Fix MatchMaker docscring format 1. Add support for ScGeom6D to LawTester (not tested...) 1. Fix orientation of rotations for ScGeom6D in LawTester 1. Remove Body::flags/FLAG_DYNAMIC, setDynamic now merely sets state->blockedDOFs=State::DOF_ALL etc. 2. Remove some deprecated code chunks 1. Add documentation for Ig2_Sphere_Sphere_L3Geom_Inc 2. Add regression tests for PBC & L3Geom 3. Fix syntax in other docs as necessary 1. Add docs for LawTester, and fix docs elsewhere as well. 1. remove devirt-functors (unused) 2. rename SubdomainOptimizer to SubdomainBalancer 3. remove Dem3DofGeom::scaleDisplacementT (unused) 4. remove Law2_ScGeom_CpmPhys_Cpm (malfunctioning, unused) 5. remove SConscript-mono (unused) 1. Fix NewtonIntegrator (not skipping particles with all DOFs blocked) 2. Disable Translation/RotationEngine tests, non-dynamic bodies changed their meaning and the tests fail. 1. Make batch accept multiple scripts on the command line (see --help) 2. Change syntax for blockedDOFs to be 'xyZ' rather than ['x','y','rz'] (assigning is backwards-compatible with warning) 3. Remove rests of devirt-functors; I thought I've done it already... 1. Create abstract KinematicEngine, allow kinematic engine composition with + (thanks to Jan for suggesting that) 2. Move all KinematicEngine's to pkg/common/KinematicEngines.{hpp,cpp} 3. Change accels in GLViewer so that x,X,y,Y,z,Z make rhe respective axis point upwards etc 4. Change g/G to enable/disable grid (or selectively enable if pressed multiple times) 5. Remove button images in the qt4 ui, use unicode symbols instead 6. Make batch referesh once in 30s by default instead of 5s to avoid congestion on slow uplinks 1. Add forgotten KinematicEngines.{c,h}pp files 2. Remove GroupRelationData & mgpost (is now at https://code.launchpad.net/~yade-dev/yade/mgpost) 1. Fix accidental typo, sorry... 1. Make middle-click paste path to variable in the ui 2. Clean up newton integrator; aspherical integration not called for things with 0 in inertia to avoid nans; this also fixed the problem of inverted normal with Wall 1. Fix NewtonIntegrator for clumps, blockedDOFs &c; msg will be sent to yade-dev 2. Make static attributes properly hyperlinked and documented in the ui 3. Fix yref in L3Geom 1. Clean up NewtonIntegrator following the discussion on the list; adds 1st order damping for aspherical particles; comments welcome. 2. Add Body.intrs() in python 1. Fix an error in Law2_L3Geom_FrictPhys_ElPerfPl (forces were applied at the step the interaction broke); results are now identical to ScGeom/CundallStrack (in the normal sense at least) 2. Add the possibility to specify y-data as functions returning y-data names themselves (see scripts/tests/energy.py) 3. Merge 2 consecutive loops in NewtonIntegrator for clumps 4. Rename plot.legendPosition, plot.legendPositionSecondary to plot.legendLoc (tuple of 2 values), to make it consistent with matplotlib terminology (pylab.legend(...,loc=...)) 1. utils.{sphere,facet,wall} funcs take fixed=True|False now (instead of dynamic=False|True, which gives warning now and will be removed) 2. Make space in the 3d recenter scene 3. x,y,z (X,Y,Z) now set up axis (see help of the 3d), grid is toggled with g only 4. Remove Shop::defaults and few other obsolete funcs 5. Fix bug in torsionweighting in LawTester 6. Rename Ig2_*_L3Geom_Inc to Ig2_*_L3Geom, update .py scripts 7. Rationalize Ig2_*_L3Geom functors, add Sphere+Facet 1. Add some data so that Hertz-Mindlin will work with L3Geom 2. Automatically compute "mass" of cell in PeriTriaxController, if not setFocus 3. Fix auto-plotting of energies in case the simulation is reloaded 4. Fix middle-click on attributes in inspector 1. set color_cycle in matplotlib only when it is supported (fixes test failure) 1. Fix i386 (?) live plot issue 1. Add function checking argument types inside FUNCTOR1D and FUNCTOR2D (requires to include full dispatched type definition in headers) 2. Reorganize the integrator so that its logic is understandable. Functionality not changed. 3. Move most clump code from integrator to clump methods 4. Automtically used InsertionSortCollider::verletDist if possible (used to be sweepLength) 5. Add --refresh param to batch, controlling refresh rate of web summary, logs etc (30s by default) 6. Fix gnuplot export with callable data specifiers 7. Put BodyCallback in #ifdef, since buggy; will be removed shortly, unless gets fixed. 8. Fix unbalanced force computation for clumps. 9. Remove accel and angAccel from state, since it is only used locally in the integrator. Add missing includes, thanks to Klaus for reporting. 1. Better integration of NewtonIntegrator into Clump, avoiding linking cycle with chunkSize=1 1. Fix State.rot() mistake (was returning displacement instead) 2. Add qt.SnapshoeEngine.plot for adding snapshot name to plot.imgData automatically 3. Add plot.savePlotSequence for making movies with plots 4. Rename utils.makeVideo bps to kbps (is really kb/s, not b/s) 5. Rename OpenGLRenderer.displayGhosts to ghosts (shorter, sufficient -- sorry, Bruno) Fix cache line size in OpenMPArrayAccumulator 1. Unbreak the periodic cell. Add the dresden course to sphinx docs. 1. Add a more straightforward SpherePack.ParticleSD2 method, adjust the tutorial 1. Add scene flags about local coordinate systems and force sign convention (not yet used) 2. Fix many things around L3Geom (most importantly, re-normalization was never done, resulting in instabilities), merge code for different particle shapes in a general function handleSpheresLikeContact 3. Fix incorrect import of gts surface due to LC_NUMERIC 4. Add OpenGL-related stuff to yade-support, which might fix linking issues with natty 5. Move Cell::invTrsf and Cell::refSize to private part, so that it 1. Make yade and yade-batch run single-threaded simulations 2. Add warning when specifying -j/--threads/--cores when lacking OpenMP support 1. Change Cell behavior as explained on the list -- trsf can be changed freely, without side-effects; assigning refSize is deprecated (use new O.cell.setBox(...) function for that) 2. SpherePack.toSimulation sets identity transformation, but rotated hSize (if requested) 3. PeriTriaxController uses norms of hSize columns (with inverse transformaiton) as reference lengths ;; TODO (?): it should check that hSize is diagonal, otherwise it will probably behave erroneously 1. Revert some "cleanups" in Cell (LOL, Bruno, we are overwriting each other's work again :-)) 2. Add some regression tests of PBC 3. Make plot.addData aceept vectors and matrices, creating columns for individual components 4. Make compilation of SpherePadder only optional (feature sphere-padder) 1. Add plot.autoAddData with docs. A limitation is that "=" should not be in names of data columns anymore. 2. Add Strong/weak fabric distinction to Gl1_NormPhys (not tested) 3. Degrade VelocityBin's initialization message to debug 4. Add .items() method to EnergyTracker, for fast conversion to list of tuples. 1. Fix plots with line specifiers 2. Fix peri-triax example (sweepDist->verletDist) 1. An attempt to fix OpenMPArrayAccumulator initialization (not tested) 1. Update affiliation 1. Fix OpenMPArrayAccumulator initial zeroing, re-enable plot test 2. Add Matrix3 ctor from Quaternion and vice versa in Python 3. Fix some bugs in L3Geom initial axes orientation 4. Plots now display pointed triangles instead of circles to mark current position (and orientation); plot part after the current point is transparent Nicer fix for 721107 (should work) oops, sorry 1. Invalidate persistent collider data when interactions are cleared (not tested yet) 2. Add renderer pointer to scene, so that functors can find display attributes 3. Gl1_NormPhys honors displacement scaling now 4. Fix scalarOnColorScale bug 5. Add RadialForceEngine, fix AxialGravityEngine fix error in last commit ================================================== yade-0.60.0 Sun, Nov 7 09:55:43 2010 +0100 Anton Gladky (54): 1. utils.facetCylinder and utils.facetBox orientations are changed according to https://lists.launchpad.net/yade-dev/msg04886.html 1. Orientation in ymport module is changed according to https://lists.launchpad.net/yade-dev/msg04886.html 1. Some small fixes 1. Docs small modifications 1. Some bibtex references added from WIKI 1. Some references into bibtex-format migration 1. Moving references to bibtex format is finished. 1. Engine for particle size distribution analyzes is added. (not finished) 1. Engine for PSD-analyze is finished, need testing. 1. Added forgotten include, caused a compilation errorin 2331 1. Changed warning message in case, when installer cant find libraries. http://www.mail-archive.com/yade-users@lists.launchpad.net/msg02202.html 2. Installation instructions were moved from Wiki to Sphinx Documentation. regular-sphere-pack.py fix. It works again. 1. Comments to ParticleSizeDistrbutionRPMRecorder are added. 1. RockPM update. RockPM fix 1. Recorder has new feature "addIterNum" which adds Iteration number to the end of file name. Off by default. 2. Clean ParticleSizeDistrbutionRPMRecorder Fix compillation error Packages names needed for qt4 are added to 'installation' section of documentation. 1. Analyze of specimen diametr is added to PSD engine. VTK and Rock were updated relatively. 1. Added materialId analyze to PSD-engine 2. Changed chmod of CohesiveFrictionalPM 1. Some modifications in PSD-recorder for material analyze 1. Added updating volume specimen variable in rpmState 1. Small but necessary fix One more field added to PSD engine 1. 626409 fix. Thanks to Sergei for spotting that. 1. Fix export.textExt function according to http://www.mail-archive.com/yade-users@lists.launchpad.net/msg02413.html Fix compilation warning in SpherePack::particleSD 1. Fixes issue, described in http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg05009.html 1. Some changes for compilation in Fedora 1. One more fix for compiling in Fedora 1. Some small fixes in debian/ 2. Warning fixes in shop.cpp 1. debian-prep now can accept RELEASE file without version number to create yade-bzr version 1. Changed required version of python-sphinx in debian/control-template to make the trunk builded in Maverick. 1. Fixed wrong MaxDiam determinition, when specimen consists on 1 particle. 2. Added maxX, maxY and maxZ parameter into outputed psd-file for geometry analyze. 1. chunkSize is changed in debian/rules from 2 to 1 1. Fixes an issue, indicated here http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg05162.html ; combined-files in SConstruct during Debian build. 1. Changes in debian/rules due to new conception of debug-build http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg05182.html 1. Changes in debian/rules http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg05185.html 1. scripts/debian now takes the name of person from DEBFULLNAME and DEBEMAIL environment varaibles. 1. Added initial scripts/build-fabric 2. scripts/debian-prep now smoothly handles absenting DEBEMAIL and DBFULLNAME variables 1. build-fabric now builds packages for maverick and lucid for 2 platforms "automatically" Fixed an error in debian-prep 1. build-bot with the main functionality is reasy for testing. 1. Yade menu should appear in respective sections in main menu in Debian-based systems (not tested yet) 2. build-farm should build packages without root priveleges 1. Returning "sudo " to build-farm 1. Command-line parameters are added to build-farm script 1. Fixed pixmap copying in debian/rules 1. Warning blocked in DomainLimiter.cpp:63 1. Some notes on Eigen3 migration 1. Eigen3 compiles now (seems). Vaclav, sorry, I needed to change your template, because it gave an error on Eigen3. 1. Again some changes for Eigen3 compilation 1. Yade now compiles with Eigen3 and with OpenGL feature enabled 1. In PSD-engine wrong maxX, ..Y and ..Z calculation fixed 0.60.0 Bruno Chareyre (45): Local sphinx build : I made it! :) Fixing the command in readme. - give path more clearly, the previous commit was assuming same relative path as mine. revert yade path - Add files for kdev4. - Fix ambiguities in contact geometry and time-step parts. - Add stress getter and python wrapper (replacing reverted r2314). - Add definition of work input from boundaries (resp. macro strain) in TriaxialStressController (resp. PeriTriaxController). - Remove useless spheresVolume (redundant with TriaxialStressController::spheresVolume) - Some cleaning in ScGeom. - Implement precomputed quantities (#define IGCACHE for compiling them). - Experiment precomputation with ElasticContactLaw (#ifdef IGCACHE), other laws should not be impacted yet whatever IGCACHE. - Make authors consistent (Galizzi never touched ElasticContactLaw). - Remove some debugging/commented code left in 2336, sorry. - Update authors again (forgot to "save" before commit...) - More changes in stability section. (we need PFC manual in bibtex references...) - More small fixes. - miniEigen : memory leak source suspected (FIXME added) - ScGeom : #define IGCACHE by default, and keep behaviour unchanged for older functions (still some cleaning to do in this class, after all Law2's have been adapted). - CohFrictLaw : Eigen is returning nan quaternions after trivial operations, it is workarounded in the law. - cylinder : a new shape, first step in experiments for tracking interactions jumping over chained elements. - utils.py : a demo script for chained cylinders - make the example more fun. - Revert last doc change and fix the original. (please don't modify documentation if you are not sure. I can't double-check all commits.) - Implement the distinction between node orientation (integrated in Newton) and beam orientation (always oriented as line between adjacent node). It fixes the starcases appearing in display for large stretch. - Fix path to fulltext. - restore Gl1_ChainedCylinder - kdev4 : I failoed to commit this file apparently. - Cylinder, update contact point consistently with current segment definition. - Fix the poisson=0 case (was returning undefined Ks for division by 0...) - This commit enables wire-like behaviour without moment when ks=0 - Last change in contact plane makes script unstable. Restore stable (but wrong?...) equations. - Cylinder : fix segment orientation, use correct contact point, and clean code. - ScGeom : last step before removing old code, some functors adapted (others are using even older duplicated code apparently) - Small sphinx fixes. - Use precomputed geometry everywhere in functors and remove older code. - Make Dem3DofGeom inherit from ScGeom rather than GenericSphereContact and remove (comment) the latest. - Missing in last commit sorry. - Revert r2365 as a whole (and r2367). - All changes in ScGeom and related functors will be commited again when I have time. - restore virgin yade.kdev4 and add kdev files to bzrignore. - publications update. Restore the part of r2367 concerning ScGeom (+ some more improvments). - restore project file for kdevelop3. -Update functor->momentLaw in the global engine. - More documention in the 2 constitutive laws. - Some code cleaning and test redundancy fix in CohFrictPhys.cpp+CohesiveFrictionalContactLaw.cpp. - adds references cited in the previous commit. - Include a comment on "welltestedness" of ElasticContactLaw. - rename classes : Law2_ScGeom_CohFrictPhys_ElasticPlastic -> Law2_ScGeom_CohFrictPhys_CohesionMoment Law2_Dem3DofGeom_FrictPhys_Basic -> Law2_Dem3DofGeom_FrictPhys_CundallStrack Law2_ScGeom_FrictPhys_Basic -> Law2_ScGeom_FrictPhys_CundallStrack - remove useless attributes, - fix class name in TTest. - Add new IG class ScGeom6D precomputing relative rotations, and associated Ig functors. - Update related classes (CFLaw) - add kdev4 configuration for starting debug from kdevelop -Includes a regression test on dynamic beam flexion. -Move cohesion and moment parameters from functors to bodies and interactions, and define them in Ip2_2xCohFrictMat_... - Fix cylinder reg. test with respect to r2509(2510). - Add output for nan quaternion products #ifdef Q_DEBUG. - Document some flags in Ip2_2xCohFrictMat_CohFrictPhys.hpp. - more debug info for quaternions with nan angle. - Convert ScGeom to ScGeom6D in Ig2_Sphere_Sphere_ScGeom6D::go(), using ScGeom::operator= - Optimize distance check for existing interactions in Ig2_Sphere_Sphere_ScGeom::go() - Implement Ig2_Box_Sphere_ScGeom6D (same conversion to ScGeom6D) - Adapt CohesiveTriaxialTest. - Fix a typo (and test some launchpad+bazar logging feature...) - Add python wrapping for python use of TesselationWrapper (+ a few fixes and formating) - add example commands in docstring. - Remove scene pointer from TW function parameters - sphere-cylinder Ig2 functor (some old uncommited code - still bugged) - TW : really check if body geometry is sphere in the insertion loop (instead of isDynamic). - FE : use the faster insert(begin,end) from TW for triangulation, and move area/volume definition to addBoundary(). Chiara Modenese (22): 1) Add contact damping into HM law. 2) Add functions getIncidentVel (both for periodic and non-periodic case) and rotateShear to ScGeom. 3) Add py script to demonstrate and test the effect of contact damping. Rename rotateShear() to rotate() in ScGeom. 1. Add Engine::dead attribute; if set, the engine will not be run at all (unless explicitly called via () from python or ::action from c++). Useful for temporarily (de)activating engines without having to modify O.engines 2. PeriodicPythonRunner renamed to PyRunner as it is used so often. 3. Add Cell.getVolume() and utils.porosity 4. Check for force&torque NaNs in NewtonIntegrator in debug builds 5. Add --rebuild option which will launch scons before running the simulation itself 6. Some fixes in the HertzMindlin law 7. The qt4 interface will try to open packaged docs, then docs in the source dir and online docs as the last resort. 8. Some fixes in PeriTriaxController (the servo-mechanism) and probably a bug fix in TriaxialStressController (will ask Bruno on the list to confirm the correctness) 1. Add an alternative implementation of PSD-based particle generation; likely to be merged to makeCloud in the future (micro-fix for a spurious startup message) 1. Improved summary http page for yade-multi, includes (clickable) plots and hyperlink to the log (with auth cookie removed) 2. Deprecate PartialEngine::subsribedBodies in favor of ids 3. Remove triangulation lib from ctags dirs (so that tag Facet goes to yade::Facet) 4. The qt controller computes simulation speed locally now 5. Fixes in Hertz-Mindlin 6. Add an alternative SpherePack::particleSD function 7. Make axis labels, highlighted axes etc settable in yade.plot 8. Add yade.plot.saveDataTxt 9. Fix plot names with spaces (so that multiple plots with the same x-axis can be specified) 1. The mindlin law now prevents granular ratcheting by default. 2. Ig2_Sphere_Sphere_ScGeom has now avoidGranularRatcheting bool (true by default, which was the hardcoded value till now as well); add documentation from the source to the real doc, add a few references on that. 3. SpherePack no longer saves vectors as tuples; this also fixes memoization issues with pack.random{Dense,Peri}Pack 4. Add Law2_ScGeom_MindlinPhys_HertzWithLinearShear used for testing differences between linear and non-linear law. (Antons changes) 1. angleRange parameter is added to facetCylinder to create "semi-cylinders", "quarter-cylinders" etc. 2. Prepare Sconstruct for compiling in Fedora (partly) 1. Rename yade-multi to yade-batch; documentation updated 2. Make batch save plots when all jobs are done 3. Add tags d.id and id.d (description and id put together) 1. Re-apply removal of Mathr, sorry Anton, the fault was local. 1. Avoid adding useless lines of nans in plot for unknown variables, add only their column instead 2. Save job figure as soon as the job finishes in the batch 3. Fi O.tags['id.d'] and O.tags['d.id'] tag order 1. Make batch commands clickable; fix encoding issues when the batch page sends job script/table 2. add utils.maxOverlapRatio for sphere-sphere contacts 3. add reinitialization counter to InsertionSortCollider 4. Add VTKRecorder.ascii so that saved XML data might be human-readable (false by default) 1. Resurrect SnapshotEngine 2. Add Gl1_NormPhys for displaying interaction network (http://beta.arcig.cz/~eudoxos/temp/Gl1_NormPhys.avi) 3. Make VTKRecroder work nicely with periodic boundary conditions (repeating interaction on both sides if it crosses the cell boundary using a few hacks) 4. Add Shop::normalShearStressTensors for computing (once more) stress tensor, but normal and shear contributions separately 5. Allow specify particle counts for SpherePack.particleSD 6. utils.makeVideo now uses mencoder (and works, unlike the older gstreamer-based thing, which would not work anymore) 7. Add Matrix3.diagonal() 8. Integrate regression tests suite in the main program (yade --test) 9. Set plot.scientific==True only if the version of pylab installed supports it (thanks to Anton for reporting) 1. Add scripts/test/force-network-video.py 2. Rename attribute flags (Attr::readonly, Attr::triggerPostLoad etc) 3. Detect whether display is available and store it in yade.runtime.hasDisplay (false by default); that restores the behavior of yade.qt, which raises ImportError at no display, and makes yade.plot consistent with tha variable as well 4. Fix total running time for batches 5. Do not send 0 refresh for finished job files (refreshes as frequently as possible, whereas no refresh was desired) 6. Debian package depends on mencoder now 7. qt.SnapshotEngine open the view automatically if needed (not very reliable, though) 8. Add scripts/test/force-network-video.py 9. Fixes in the OpenGLRenderer that avoid crashes; drawWithNames should draw shapes in the same place as draw witout names, making the selection consistent with what is seen (periodic boundaries etc) 10. Move {ScGeom,Dem3DofGeom}::contactPoint to GenericSpheresContact 11. Initial (not yet functional) implementation of the partial slip solution for Hertz-Mindlin (Mindlin-Deresiewitz) 1. Introduce a class for returning or computing scalar values based on combination of 2 ids. [experimental, don't use or ask questions about it now] 1. Rename InteractionDispatchers to InteractionLoop; backwards-compat for python as usual, typedef with deprecated warning in c++; update all scripts and docs to reflect that. 2. Add NozzleFactory, which might be in the future generalized to a generic factory object and a numebr of derived classes with different parameters (such as factory area shape, specification of sphere parameters etc); see scripts/test/shots.py 3. Fix many crashers in the OpenGL code; unbreak particle selection 4. Finalize the MatchMaker class, with convertor from python floats to specify fixed value. 5. MatchMaker is used to specify different coefficients of restitution for different material couples in Ip2_FrictMat_FrictMat_MindlinPhys; viscous constants moved away from Law2_ScGeom_MindlinPhys_Mindlin into MindlinPhys instead. 6. Fix compilation errors caused by unintelligedn 3rd-party Combine builder to scons -- save sombined files to an external file, force refresh of all combined files if the md5 changes. Does not increase compilation time. 7. Add DomainLimiter engine for deleting particles that go ouside some domain (see scripts/test/shots.py) 8. Add DragForceApplier (not yet tested); thans to Stefano for the suggestion. 1. Add #pragma once to MatchMaker (thanks, Remi) 2. Remove a few useless scripts. 1. Make the debug build installed in the same directory as the release build; it is compiled with debug=1 (or True); there is only a single yade executable for both, and the debug plugins are loaded with --debug. I tried to adjust packaging rules a bit, I hope it will not introduce additional errors. --debug and --rebuild work fine together. 2. Add --debug option to yade-batch, which runs yade with --debug. 1. Add LawTester class for prescribing displacements on interactions precisely, see scripts/test/law-test.py 2. plot now displays the last point as a bullet 3. Rename Interaction{Geometry,Physics} to I{Geom,Phys}; rename related classes as well (functors etc) 4. Rename Interaction::interaction{Geometry,Physics} to Interaction::{geom,phys} 5. Add Vector3.normalized() to the eigen wrapper 6. Add framework for arbitrary rendering hooks (GLDrawExtra) run from OpenGLRenderer at the end of the rendering routine (not yet fully tested) 1. Do not return Attr::hidden attributes in dict(); that makes them invisible in the UI as well. 1. Fix batch script with debug builds, thanks to Anton for reporting. 1. Fix a few malformed formulas (my bad) so that LaTeX does not choke on them. Emanuele Catalano (12): - Wide code maintainance - Removed isSuperior/Inferior/Lateral attribute, inside/fictious remain, Localize function removed - FlowEngine is able to receive as input boundary conditions (flow/pressure) to be applied to walls - Oedometer test can be performed via python scripting - A new force calculation scheme (facet scheme) had been implemented - Forgot def_types.h in previous commit (sorry Tieng!) - Added function to compute average cell velocity - Added function to apply sinusoidal external fluid pressures - Solved retriangulation problems in seabed simulations - Code maintenance - Solved compilation errors - Added average_cell and average_grain velocity computation - Updated vtk_file creator function - Moved functions and variables related to geometry in Network.cpp/.h - Update other files to these changes - Code maintenance - Commented flow_engine definition, sorry Sergei - Really solved compilation problem with 'cgal' feature, sorry again - Update flowEngine files - Added missing #ifdef FlowEngine condition - Fixed compilation error Jan Stránský (3): 1. add function yade.utils.stressTensorOfPeriodicCell 2. removed BoundDispatcher from pack.randomDensePack 1. correct some misprints and do some actualization in user's manual. 2. correct mistakes in Shop::stressTensorOfPeriodicCell() 1. modification of Vector6 2. change of Peri3dController (+docs and examples) Janek Kozicki (11): making TriaxialStressController more python friendly. revert last commit fix two typos, replace Real strain[3] with Vector3r strain fix two small typos in docs, add spheresVolume python wrapper for TriaxialStressController. (I need it to calculate void_ratio=voids/sphresVolume) Sphinx documentation for plotting + color plotting. Added missing comment in TriaxialCompressionEngine Let TriaxialStressController calculate sphereVolume for clumps correctly. A trivial fix for exceptions when drawing data that is being modified right now refer to matplotlib manual remove duplicated part about pyplot Added pdf figs (not .svg, they are 5MB big!). added info about TeX usage of plot.labels. small fixes Added a throw condition if two spheres have zero distance. Works in #ifdef YADE_DEBUG only. Jerome Duriez (7): - Re-write of SimpleShear PreProcessor with YADE_CLASS_... macro - Creation of KinemSimpleShearBox, new class containing the features common to the various Kinem...Engines, and from which these Engines inherit now. - Replace of .isDynamic (deprecated) by .dynamic in some python scripts - the script simpleShear.py (renamed from SimpleShear.py) allows now to illustrate/test the various Kinem...Engines - Documentation typos/formatting in few files Few modifications in the doc of NormalInelasticityLaw (class Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity), following the request done http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg05207.html. Not sure it is perfect, but hope it is at least better... Re-write of "NormalInelasticityLaw" with use of ScGeom6D for what concerns rotations. => Rename of the corresponding Law2... Luc Scholtes (1): publication list update Sergei Dorofeenko (6): Viscoelastic basic particle model: move mass of particles from material to interaction Fix bug666246. See https://bugs.launchpad.net/yade/+bug/666246 merge with trunk Fix STLImporter; fix some examples 1. Fix ViscElBasic law to handle periodicity; 2. Add some regression tests Fix bug in Ip2_ViscElMat_ViscElMat_ViscElPhys Václav Šmilauer (88): 1. Docs update 2. Remove Dispatcher::add(string) (only accept functor objects instead) 1. Update documentation (backported to 0.50) 2. Remove the long deprecated object['attribute'] syntax. 1. Update docs 2. add some yade publications in bibtex 1. Port packaging changes from the 0.50 branch 1. Remove dem6dof related classes 2. add a few more publications to the bibtex db 1. Remove old io code in Omega 2. Update yade.eudoxos 3. Fix bug in pack.randomDensePack loading memoized scaled periodic packing from (backported to 0.50 as well) 1. Fix some spiral projection functions 2. Add manpage generation to yade and yade-multi 3. Add manpages to debian packaging, including alternatives (man yade -> man yade-bzr2284 etc) 1. Bugs in Cell (!!! no yet fixed: see scripts/test/peri8.py !!!) 2. Add optional devirtualized functors (experimental) 3. Adjust Peri3dController for large strains and test (modulo the cell bug) 4. doc fixes 1. Fix multiple authors syntax in bibtex (multiple authors MUST be separated by "and", not by comma!!!) 2. Add doctests of all modules, fix where failing 3. Add SpherePack.toSimulation Minor documentation fixes. 1. Split publications in articles, conferences, theses 2. Fix problem with scons 2.0, now it works out of the box 3. Add a better error message for VelocityBins with NaN velocity 1. Add show Paraview documentation to the postprocessing section 2. Fix at least partially the rotated cell bug in shift2 (https://bugs.launchpad.net/yade/+bug/601866), still some issues elsewhere, though. 1. Fix stale potential interactions -- we've been dragging this bug since april, I will backport it to 0.50. You are strongly recommended to update!!! The bug was, in the end, not in the collider, but in the container; it had <= instead of >= in one condition. Sorry. Fix Facet AABB computation in periodic scenes (another important update!) 1. LIVE PLOTTING (thanks to Janek for the idea and the suggestion of mtTkinter). Report bugs. 1. Fix InteractionGeometryDispatcher (in case someone still uses it). 1. Move triaxial documentation from the wiki to sphinx 1. Make utils.saveVars, utils.loadVars and utils.readParamsFromTable synthesize modules in yade.params.* to avoid name clashes in builtins (see docs and user's manual, you have to adapt your code if you use those) 2. Rewrite the installation page in sphinx (sorry, Anton, I hope it is a little more readable now) 3. Fix several undefined xrefs in the docs. 4. Disable wm3-compatibility in eigen wrapper (Vector3.UNIT_X etc) 5. Rename utils.chCylinder to utils.chainedCylinder, update docs there (sorry, Bruno, but chCylinder is really not a self-explanatory name) 1. Fix dispatch-torture scripts/test/dispatcher-torture.py 2. Remove wm3-compat code 3. Escape \d in the doc (must be \\d in c literals) 1. Make GL dispatchers proper classes exposed to python 2. Make State and derived classes indexable 3. Update scripts/test/dispatcher-torture.py 1. Fix compilation error due to free-standing function out (remember: NO FREE FUNCTIONS, everything must be inside classes, otherwise there is the risk of name clashes.) 1. Fix the GL dispatch (was enumerating child classes non-recursively, and your Gl1_ChainedCylinder did not inherit directly from GlShapeFunctor) 2. Do not use '|||' to separate plot axes, use None instead (||| is deprecated) 3. Move the Gl1_ChainedCylinder functor inside #ifdef YADE_OPENGL (please pay attention to that) 1. Add noqt3 feature (still keeps OpenGL available), run qt4 app at the beginning (emits warning) 2. Make GLUtils independent of QGLViewer 3. Add some metadata to attribute docstrings 4. Add scripts to render scene to pyQGLViewer and to show basic serialization interface in PyQt4. 5. Make static attributes non-static in python (enables docstrings) 1. Make static attributes documented (xrefs still not working, though) 2. Add section on the Material-State association to the Programmer's manual 3. Fix syntax error in qt4-attributes.py Fix docs 1. Do not uselessly pass Scene* pointer to Law2 functors (already in LawFunctor) 2. Attempt at Law2_ScGeom_CpmPhys_Cpm (not tested) 1. Add the possibility of custom constructors to python (not a hack as it used to be) 2. Add cached functors to explicitly created interactions (not saved, though) 3. Improve the ScGeom-based Cpm law 4. Change interface of StepDisplacer to specify mov and rot separately (old interface with deltaSe3 works, but warns) 5. Add scripts/test/cpm-dem3dof-scgeom.py to show some differences between the 2 geometry formulations. 1. Turn many fatal warnings in UniaxialStrainer to exceptions, remove some guess-logic 2. Automatically disable live plots in batches. 3. the concrete uniaxial test now has the scGeom switch 1. Some VTK recorder fixes. 2. cpm fixes (untested) 1. Save interaction as vtkPolyData rather than vtkUnstructuredGrid (to allow the Tube filter to operate on it). 1. add noShow to uytils.plotDirections 2. Some fixes for ScGeom+Cpm (still problematic) 1. Preliminary version of PyQt4 interface (3d viewer flickers, reason unknown). Config checks largely absent. 1. Remove linkStrategy option. Specifying chunkSize=1 provides the per-plugin linkage. 2. Add qt4 feature, which conflicts qt3. Qt3 must be now explicitly defined. QT4DIR must be defined (defaults to /usr/share/qt4, which works for debian) 3. Add checks for python modules and prettify boost checks. 4. Remove a lot of legacy code, so that the qt4 build avoids yade::serialization completely 5. Add live inspection and modification of arbitrary sequences, for a showcase see the Inspect button on the simulation tab (Body/Interaction inspection will be rather easy as well) 6. Add common handling of number arrays (Vector3, Matrix3, Quaternion) 7. Add to-python converters for vector> and list (only needed in Dispatchers, avoids tome exceptions) 8. Rename OpenGLRenderingEngine to OpenGLRenderer Path hotfix. 1. Dispatchers cleanup (will continue) 1. Remake inheritance tree for Dispatchers, so that functors are really of the right type. Involves some macro ugliness. 2. Add rudimentary (but working) inspection interface for engines, bodies, interactions 3. Fix compilation without qt3 (will be removed soon, completely) (forgotten file) 1. Make types and attributes in all editors clickable 2. Add editor for Se3, Vector3i, Vector2, Vector2i 3. Fix bugs in eigen's wrapper for Vector2i and Vector3i 1. Fix static properties of Eigen objects (return values, not references - see http://www.mail-archive.com/yade-users@lists.launchpad.net/msg02339.html) 1. SpherePack.makeCloud can distribute grains based on their mass (rather than count) along arbitrary PSD or uniformly if rMean is given (the default behavior is unchanged) 2. SpherePack.psd() function for generating particle size distribution, either based on particle count or their volume (mass) 3. A few fixes in the UI 4. Fix facet "coincident vertices" warning 1. Add script demonstrating mass-based and size-based particle size distributions (PSD) and how to specify and arbitrary function for PSD when generating random loose packing with SpherePack.makeCloud 1. Disable (experimental and malfunctioning) multiblock files with vtk<5.2 (did not exist) 1. Remove qt3 interface 2. Remove yade::serialization and related otherwise useless files 3. Remove lib/loki, use the official Loki library (in /usr/include/loki, package libloki-dev) instead, except for (highly incompatible) Singleton, which was moved to lib/base. merge noqt3 branch 1. Body flags instead of bools + isBounded/setBounded flag. 2. Move body_id_t to Body.hpp 1. Change body_id_t to Body::id_t 2. Assign Body.bounded in py/utils.py funcs (in prep for making BoundDispatcher 1d) 1. Make Bo1 functors really 1D 2. add Body::isBounded/setBounded so that there is a way to ask for a body to not have bound created by BoundDispatcher 3. Change bool Body::dynamic into a bit inside Body::flags 4. Change body_id_t to Body::id_t since boost::serialization can handle class-defined types gracefully 1. Integrate BoundDispatcher into Collider, its python ctor takes list of BoundFunctors now 2. Warning and help if BoundDispatcher is used directly (more precisely: if Collider has no BoundFunctors defined and there is BoundDispatcher in O.engines) 3. Remove Body(id,mask) ctor as it bypasses default value initializers 4. Adjust preprocessors to the previous item 1. Remove BoundDispatcher from O.engines in examples, scripts and sphinx (accidental typos possible, sorry) 1. Remove outputFilename from FileGenerator, pass that as argument directly; remove message as FileGenerator's member; FileGenerator is no longer ThreadWorker (was not used) 2. Remove all variables named 'rootBody' in generators (detail: make SeqSerializable number nicer) 1. Rename some stuff in Omega and Scene to make it consistent with python: Scene::currentIteration->Scene::iter Scene::getSimulationTime()->Scene::time Scene::getComputation...Time()->Scene::getComputationTime() Scene::stopAtIteration->Scene::stopAtIter etc. 2. Fix bug with per-class compilation (thanks to Sega for reporting) 1. Adjust docs for changes in the last commit 2. Add version requirement for python-sphinx to debian/control-template (Anton: that's the reason why the build fails in maverick; I uploaded 1.0~hg... into yade-users/external so it should build fine in a few hours; there is no use uploading 0.6 which is in maverick already) 1. replace {pre,post}ProcessAttributes by {pre,post}{Save,Load} (not virtual) 2. change attribute specification adding and additional attribute flags (read-only from python, not saved, should call postLoad after changing value from python) 3. Macros cleanup in Serializable 4. Support clang for compilation (more than 2x faster) https://yade-dem.org/wiki/Compilation_with_LLVM/clang (documentation not yet update to reflect those changes fully, sorry) 1. Add sub-stepping functionality (step by engines rather than by whole iterations) 2. Expose Scene in python properly (not very well tested yet...) 3. Update documentation about attribute flags 4. Remove some 3rd party files no longer needed 1. Add foce, torque etc display in the body tab of the inspector 2. Make force, torque etc access from python not require thread synchronization (sums up threads on demand) 1. When disabling sub-stepping when the last step is done only partially, all remaining substeps are run at the next step. 1. Fix bugs related to 3d views (centering, secondary views, closing views). Thanks to Sega for reporting. 1. Consistently use SUFFIX for what is the same for debug and non-debug version, and libDir for plugin installation directory. Hopefully that cleans the mess we've had. That should also fix startup problems with --debug that Anton reported 2. Do not #define PREFIX and SUFFIX as macros, since they are not used in the c++ code anymore (and should not be) 1. Link to the standard libstdc++.so.6 (which is instaleld everywhere) instead of libstdc++.so, which is only in the devel package of gcc 2. Full support for compilation with clang (packaged for lucid and maverick now), as explained at https://www.yade-dem.org/wiki/Compilation_with_LLVM/clang#Building_yade (openmp and optimizations do not work) 3. Add function to ScGeom to compute incident velocity from python. 1. Fix QT4CXX key error, thanks to Anton for reporting. 1. Fix startup error with debug-only builds. Sorry, Anton. 1. Enhance the gl-drawer for LawTester. 1. Fix both rotation and shear in LawTester. Signs are now consistent are correspond to displacements as defined on classical beam (x is the axis, y and z are in the shear plane) 1. Clear erro message when running debug-only build without --debug 1. Make number in qt4 show the left-most part if the text field is narrower, rather than the left part 2. Run the debug version if optimized is not available, even without --debug 3. Add the possibility of running the monolithig compilation (mono=True); not fully functional yet. 4. Add warning when using march with clang, which leads to crashes (optimizations are not the cause, in the end) 1. Flattening the file hierarchy, as mentioned previously. No changes to #include paths so far. 2. Change the directory where to install headers to not include yade version 1. Add OpenGLRenderer to DomainLimiter, that should fix the linking issue reported by Janek. 1. Fix debian linkage with MatchMaker (hopefully) 2. Add preliminary and experimental L3Geom class (do not use, do not ask etc -- yet). 1. Make forgotten class members public (sorry, Anton) 1. Enhance LawTester to work with L3Geom, fix some bugs 2. Add uN and uT references inside L3Geom, for respective components of the deformation vector 1. Add Vector6r wrapper (both c++ and python) 2. Fix prefix bug in initialization braking debian packages 3. Fix renames in py/test which made regression tests fail 4. Update LawTester and L3Geom for 6 dofs (not yet tested, please do not use now) 1. Add menu entry for the dbg package (yes, it really does not show up, dunno why either) 2. Add plasticity to Law2_L3Geom_FrictPhys_ElPerfPl, add convenience function to apply local forces 1. Clean up Vector6 and friends 2. Create Matrix_computeUnitaryPositive template to be compat between eigen2 and eigen3 (in the future) 1. undefine pi in MindlinPhys 2. Add isAspherical() flag to Body 3. Adjust kineticEnergy with PBC (not yet fully tested) 4. Make createInteraction work with PBC 5. Fix getIncidentVelocity with PBC and !avoidGranularRatcheting 6. Add some regression tests related to Cell (not yet fully done) 1. syntax hotfix for batch -- thanks, Ema. 1. Fix kinetic energy in PBC 2. Add tests to check PBC: Ek, incident velocity with ScGeom (with and without ratcheting), homothetic resize 3. Make it possible to set O.dt=0, for reasons of testing. 1. Deprecate NewtonIntegrator::homotheticCellResize in favor of Cell::homoDeform (compatibility interface with warning) 2. Add the possibility of homothetically changing positions rather than velocities; avoid the meanfield/fluctuation velocity jazz at the expense of vel not being time derivative of pos 3. Add PBC tests for the previous variant 4. Add defThreads arg to scons, which, if specified, gives default number of threads for simulations, if not overridden with -j 5. Fix a few example scripts, more work ahead come (please help!) 6. Add regression tests for saving/loading yade objects; on maverick, this makes the unregistered class to re-surface (!!) 1. Update the dispatch-torture script. 1. Fix laoding of unitialized LawTester 1. Disable debug messages from ScGeom in both debug and non-debug (!!) builds 1. Fix boost::sertialization class export (changed slightly in boost 1.42, which broke our case); that also solves the issues at maverick 2. Add framework for tracking energies (will be documented at some point), added to Law2_ScGeom_FrictPhys_CundallStrack, see scripts/test/energy.py 3. Convert energy trackers in Hertz-Mindlin to OpenMPAccumulator 4. Make OpenMPAccumulator align storage so that each thread uses one cache line (should be faster) 5. Make OpenMPAccumulator not require zero value pointer (is handled via ZeroInitializer template in lib/base/Math.hpp 6. Make OpenMPAccumulator work transparently with python (it can be used as a regular attribute now), make it boost::serializable as well; it appears transparently as a number in python. 7. Add OpenMPArrayAccumulator, for linear array of values (used in EnergyTracker) 8. Make deprecated attributes with non-g++ compilers (clang); previously, only g++>=4.3 was supported 9. Fix a few example script (not completed) 1. (hopefully) fix build with boost::serialization<1.42 broken by previous commit. 1. Add warning for missing ForceResetter in NewtonIntegrator (based step forces were last reset) 2. Rename *Spiral* to *Helix* (suggested by Jan, thanks!) 3. Generalize the post2d module to handle interactions (not just particles) 1. Fix intiialization problem in Shop::kineticEnergy (thanks, Anton) 2. Several enhancements of the post2d module 3. Fix a few crashers with deleted particles. 4. Improve utils.facetCylinder 1. Add HdapsGravityEngine which reads acceleration from real accelerometer in thinkpads (toy engine) 2. Fix bug in qt4 interface where multi-number entries (Vector3r etc) might have some values zeroed due to wrong order of initial update and signal connects. 1. Make clumps subclass of Shape (instead of Body) 2. Favicon in the batch web interface 3. Fix for clang compilation 1. Fix examples, delete a few other ones 2. Fix a bug in post2d ================================================== yade-0.50.0 Wed, Jun 9 08:30:02 2010 +0200 Anton Gladky (77): Added an example of VTK-recorder using. Thanks Sergei Doroffenko aka Sega Changes in facetBox function to get other facet normals Added import_mesh_geometry function to import mesh files into facets Function import_LSMGenGeo_geometry is added to import into the simulation .geo files, generated by LSMGenGeo libraries. Example is added in ./scripts/test/regular-sphere-pack.py and ./scripts/test/genCylLSM.py Fixes import_LSMGenGeo_geometry and its example Adaptation RockPM and PressTestEngine for material and state classes PressTestEngine is temporarily disabled as it causes YADE crash on start 1. TranslationEngine and PressTestEngines are activated 2. regular-sphere-pack.py is updated according to new material class 1.VTKRecorder is activated, except REC_CPM 1. scale factor is added to ymport.gengeo 1. Trivial change scale factor in regular-sphere-pack.py CohesiveStateRPMRecorder base templates are added. This Engine is for calculating cohesive contacts in the RPM model. 1. Created yade.ymport.gengeo() function for importing LSMGenGeo geometry directly to the YADE simulation without intermediate files. See ./scripts/test/genCylLSM.py 2. yade.ymport.gengeo() (import .geo-files function) was renamed to yade.ymport.gengeoFile() 3. CohesiveStateRPMRecorder is now working. (thanks Vaclav) 1. "Patch" to fix 490223 1. CohesiveStateRPMRecorder now derives from the Recorder 1. REC_INTR in VTK changed to save interaction data not only for CPM model. Very trivial fix in utils.py 1. In utils.facetBox added 'Defence from zero dimensions' 2. regular-sphere-pack.py is updated due to new names 1. Added moveTo und scale parameters for ymport.gmsh function Some syntax fixes: moveTo has been renamed to shift in utils.py and ymport.py ymport.gmsh function was renamed to ymport.mesh one ymport.mesh was renamed back to ymport.gmsh Trivial bug fix 318439 1. gmsh.ymport function is fixes to be more universal 2. "Bad" bug #505783 fix Fix bug 505783 1. Added utils.facetCylinder function to create arbitrarily-aligned cylinder composed of facets 2. utils.facetCylinder example is added to ./scripts/tests/regular-sphere-pack.py 3. RotationEngine example is added to ./scripts/tests/regular-sphere-pack.py 1. utils.facetBox() and utils.facetCylinder() function description where changed according to Epytext format. utils.facetBox() and utils.facetCylinder() description has been formatted to reStructuredText-format. 1. vtk-feature is on by default now 2. Added eigen library like a feature 1. Eigen check library fix. Thanks Bruno 1. Added some more Eigen headers to check in SConstruct 2. Commented the string in py/SConscript which made an error during compiling 3. Added yadeEigen.hpp to make a wrapper for Eigen 1. yadeEigen.hpp is added 1. Some changes for Eigen migration 2. TranslationEngineEigen to test Eigen library 1. Some changes in utils.facetCylinder function 1. Convert a RockPM class to YADE_CLASS_BASE_DOC_ATTRS 1. Convert Recorder class to YADE_CLASS_BASE_DOC_ATTRS 1. Removed TranslationEngineEigen 2. TranslationEngine and PressTestEngine were updated according to a new register standard 2. In SConstruct were added some more Eigen headers to check. 1. YADE_CLASS_BASE_DOC_ATTRDECL_CTOR_PY for CohesiveStateRPMRecorder is added, but not activated. 1. ForceRecorder added. 2. Some minor changes. initRun=true added to ForceRecorder 1. spheresToFile() has been fixed and moved to export file. Do we need "consider=lambda id: True" there? 2. ymport.ascii() was renamed to spheresFromFile; wenjieFormat was deleted there. The function is rewritten, comments are available now. 3. Added export.spheresToFile() and ymport.ascii() examples to regular-sphere-pack.py. 4. In timing.py InteractionDispatcher->InteractionDispatchers 5. Some default values in scons were changed to make YADE compilable with "standard" Ubuntu machine with 4GB RAM: chunkSize=7, jobs=2 Rotate function is added to manualWrap RotationEngine parallelized GravityEngine parallelized Some scons changes. Vaclav`s patch 1. penetrationDepth() is added to DemXDofGeom 1. penetrationDepth() declaration fixed. Thanks to Vaclav. 1. NewtonIntegrator - fixes of normalizing null-vectors 2. penetrationDepth() has been deleted from DemXDofGeom Adaptation to Eigen Library Previous commit correction. Thanks to Vaclav. Fix compilation error Orientation parameter is added for ymport.gmsh() function Small changes in ymport.gmsh() Some changes in utils.ymport module due to new Sphinx requirements. Some examples clean Examples cleaning Trivial genCylLSM.py fix Ubuntu 10.04LTS has GMSH version, where medit-mesh format is changed. It fixes wrong import of newly formatted files. Back compatibility is saved. 1. Quaterion.Rotate() wrapper is added 2. mill.py fixed 1. Examples cleaning 2. Code adopting to Eigen library `materialID` property is added to VTKRecorder VTKRecorder changes: 1. clumpIds recorder changed to clumpId 2. materialID recorder changed to materialId 3. ids recorder changed to id 4. Syntax cleaning 5. Default parameter 'all' is added subscribedBodies parameter is added to VTKRecorder Some fixes in VTKRecorder 1. Parameter groupMask is added to utils.sphere and utils.facet 2. VTKRecorder. subscribedBodies mechanism was changed to VtkRecorder changes: 1. Velocities of particles are now exported as Vector3 and Length component separately. 2. Added 'force' parameter for facets and spheres (sorry, not good tested yet) Force calculation mechanism is changed in VTKRecorder (Thanks to Vaclav). Experimental. VTKRecorder. force->stress. But only for Dem3DofGeom now 1. Some warnings were commented (please, don't leave unused variables!) 2. In Shop created getStressForEachBody method to clean up VTKRecorder a little bit (not tested yet, but compiles) 1. VTKRecorder is static now. 2. function ymport.testExt and export.testExt are added Comment parameter is added to export.textExt groupMask parameter of bodies is now exported to VTK-output as `mask` Blocking the crashing string in ElasticContactLaw in ./examples/rotatingCylinder.py encoding is fixed Some changes in examples 1. Fixes crash in VTKRecorder, when some bodies are erased 0.50.0 Boon Chiaweng (17): BasicPM.cpp hpp BasicPMTest.py in pkg/dem/meta BasicPM @ pkg/dem/meta BasicPM @ pkg/dem BasicPM @ pkg/dem meta local commit local commit Removed BasicPM.cpp and added CundallStrack.cpp. It is a duplication of Law2_Dem3Dof_Elastic_Elastic but written in meta style like RockPM. It is therefore cleaner and more friendly to a beginner. Comment local commit local local committing files which were not uploaded in last commit committing files which were not uploaded in last commit local Cohesionless Moment Rotation LLaw as implemented by Plassiard et al (2009). Verified changed Cohesionless Rotation Law to be cleaner added instructions on how to use ContactLaw with TriaxialTest Bruno Chareyre (102): A flag "neverErase" is added to the contact law to define if it can erase interactions. This flag can be turned on when another constitutive law (e.g. capillaryCohesiveLaw) is in charge of erasing interactions. - fix wrong usage of "neverErase" in TTWater - synchronise versions of ECLaw Fix the path in the warning. Please, never make me do that again!! A (little) bit of cleaning. Fix warnings. And one more back. - fix segfault in test.cpp (testing the triangulation functions) - adapt the collider to state/material State/Mat fix. Fixed : 2 "unused variable" warnings. - fix the bug on bodies type in CFTriaxialTest - rename CohesiveFrictionalBodyParameters => CohesiveFrictionalMat - fix the bias in cloud generation (try and position a sphere of constant radius) - some more cleanup of the code - update of the documentation Add the missing #include AABB Code using the velocity gradient to define periodic deformations (experimental) + script to test it. Needs compilation with #defined VELGRAD (currently needs uncommenting "#define VELGRAD" in 4 files in total). Fix some warnings. -Restore default behaviour even with #define VELGRAD, restore default homotheticCellResize=0 and register it. All py scripts should work whatever VELGRAD, except periodic-triax-velgrad.py (throw without VELGRAD for homotheticCellResize=1). -Clean code -Fix mail adress E.C. Make non-proportional scripts really work with VELGRAD : -Update Hsize when refsize is modified once (this is ugly! needs a cleaner way) -Adapt size control by periodic engines. Sorry for this new change in Cell.h. It will not change for a while now, next commits will be in engines. Add a new periodic compressor engine (candidate for replacing/merging with PeriTriaxController). Most important changes : - stress control using mass - defines the full stress tensor (not only normal stress for each axis) - defines strain with logarithm for comparison with goals and postprocessings - merge stiffness/inertia control in PeriTriaxEngine and remove periEngine - show usage of inertia (commented out) in py script A funny script, and no crash! -Fix the loading path, this example shows how shear create rotations. -A commented suggestion for dispatchers -Get back r1932 in PIC -Fix a wrong assignment of max vels in StressController that was causing non-isotropic compression (introduced a while ago when Luc Si. implemented 3D independant controls probably) Optional porosity in makeCloud, giving a value discards rMean (avoid guessing rMean when you know size and number). -Fix messed comment (save before commit!). Comments. - Rename Poison -> KsOnKn in some preprocessors. Not project-wide : I don't know what laws are used in PHYSPAR'ed files. - some cleaning in TT code - Add CGAL excpetion in GNU GPL license. rename KsOnKn -> KsDivKn. Revert weird changes from JFJ in TWrapper interface (min/max should not be mandatory in any functions!). I managed to remove the variable while adding the comment. Glad nobody noticed yet... - Remove old files - add insert(Scene& scene) to tesselation wrapper (faster) - move TWrapper out of namespace CGT and make it a YADE plugin - move TWrapper sources to pkd-dem/globalEngine, keep different (uncompiled) versions in lib for possible out of tree builds - some more documentation in TWrapper.hpp - missing files in previous commit - fix a member's name in TW - Fix : old names used in #includes and code - Add a function KLA::DefToFile() writing the triangulation and deformations to a file - Use it in MMAnalyser. - Fix read/write details in TriaxialState and few other small fixes - MMA is now fully operational for strain maps - switch some spaces/endlines Fix compile errors in VTKWritter and KLA. - Fix size range in makeCloud. It was generating an interval twice smaller than expected. Update the documentation. Used with uniform distribution, makeCloud now generates radii between mean-rRelFuzz and mean+rRelFuzz. 1. Remove lib/triangulation/TesselationWrapper. No need to keep in Yade files used only for out-of-tree builds + it was confusing to have the same file names twice. 2. Reformat vtk output. 3. Implement more methods to control the input/output of TesselationWrapper, access MicroMacroAnalyser methods via TWrapper interface, return all data in a python array (still commented). 1- move subdivideTriangle in the glNewList section. No reason to do that elsewhere. 2- Suggest using glList even when stripes=false (commented code) for better performance. Both changes affected by this bug for now : https://bugs.launchpad.net/yade/+bug/509084. - Remove the part of the code that was only a hack to display bodies with broken contacts, and remove some spaces. - Uncomment the line assigning deformation values in python::dict get(). - Add MATRIX3R_TO_NUMPY macro in numpy.hpp -Add missing members declarations (forgot to commit the header with a previous commit) Fix a compile error when openMP is not in features. - Global update of the triangulation lib. - Fix some compile errors. - Re-implement arbitrary boudaries ids. - Generalize boundary conditions. - Clean the code. -disable the independant GL display. - Fix compile errors with cgal in features. - Fix compile error (forgot this one in lastr commit) Flow: - Implement bz2 read/write for TriaxialStates - 3rd method for hydraulic force and some optimizations in FlowBS (Ema, I'll let you remove unused code) - new data in cell_info - Mostly some formatting. - Compute the new tesselation in Interpolate(). - remove files not used in yade. - Comment the includes pointing to out of tree files to prevent compile errors with implicit link. - Fix the bug (r2025 probably) in GSTimeStepper (test of line 28). - Register timeSteppers. - numpy : comment and new line at EOF - TW : fix a warning. - PTCollider : remove a "using namespace std" in the header. Some changes in the TCE behaviour. Save the state before stopping simulation, and start compression for reloaded files with autoCompression=true. Please keep intact the behaviour even when the code looks strange, there are reasons behind. I ran 1 week simulations, expecting saved xml at the end, but got nothing... I've included a fews comments about this. - A few more comments and code cleaning. - Fix an error in max_vel's definition. - Register attributes of the stress controller and of derived classes. - Make them "global" engines instead of "partial" (and replace "applyCondition" by "action") - Add a function computing the solid volume of a sphere packing in Shop. - py wrapping for getSpheresVolume (usage : O.getSpheresVolume) - Missing in previous commit and creating compile error, sorry for that. - Some documentation and code cleaning. - Fix syntax error + small changes in the documentation. Fix compile error ifndef YADE_OPENPM. -Register and code cleaning. -Link to the wiki page for general instructions and files download. -One more initialisation in ctor (strain). - Fix : wrong assignnment of friction for boxes. compactFrictionDeg was used in place of boxFrictionDegree. No idea when it was introduced. - Register TriaxialTest (yes!!). - Remove useless transition returning a LOG_ERROR. - More registering! - Remove unused unregistered engine. - Register, rename, clean code, doccument some attributes. - New names in Attic files (follow-up of r2156, more to come). - Add a "cohesiveFrictional" functor for usage in interaction dispatching (functionally replace the global engine CohesiveFrictionalContactLaw, which is still here and used in cohesive preprocessor). - Register "cohesiveFrictional" classes and rename them. - Some cleaning and a fix in the law for brittle failure. -Use new names. - Some fixes in triangulation. Python array still crashing in TW. - Use new names. - Remove SCG_SCHEAR, clean code and documentation a little bit more. - Take "fuzz" into account for the definition of rMean in the generated distribution. - Update the link to capillary files. - Make the radius of fictious sphere equal to the one of real sphere in box-sphere geometry. - Implement energy tracing in ElasticContactLaw - Remove some "#ifdef SCG_SHEAR" - Remove equilibriumDistance and initialEquilibriumDistance from FrictPhys and inheriting code. - Remove rotationBlocked from TriaxialTest. - Fix documentation (backticks in pkg/dem/PreProcessor/TriaxialTest.hpp, pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp, pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp). - Fix cohesiveFrictional crasher - Initialise saveSImulation correctly in TCE - Remove initialKn/Ks assignment Ip2_2xCohFrictMat_CohFrictPhys - Put back Vector3r::Zero() py wrapping for shop::getSpheresVolume(). Used e.g. for computing porosity in a periodic cell. - Use Shop::kineticEnergy in the recorder (adds the rotational term). - Fix strainRate comparisons for the case dynCell=true. - Simplify the code, removing cellGrow totaly and using gradVel everywhere instead (its time derivative). - Rmk : I suspect some of those changes have been commited before, then reverted, but I couldn't really spot when/why. Actually, the revert attempt broke the "dynCell" behavior. This commit should not change anything for dynCell=false. Let me now if you see a difference. - Fix the distance correction in plastic slip. - Compile error (sorry) : matrix(i,k) instead of matrix[i][k]... (couldn't we overload simply define [][] operator for Eigen matrices?) - Simplify equations inside plastic condition of Dem3Dof (1 sqrt instead of 3, less norm()), add a new function that uses a multiplier instead of maxDisp to take advantage of this new formulation (Vaclav, could you review and tell if we should merge maxDisp/multiplier in one single function with a bool? I didn't want to break any other part so I didn't touch the previous function). - Fix a wrong equation in shop::unbalanced force (max is for body force, not contact force). - hardcode tensor product in PeriIso, as this is instanciating a matrix and it is done for each contact at each step. - Remove one more norm(), return 0 for compatibility. - Fix the plastic dissipation equation in ElasticContactLaw and make plasticDissipation a OpenMPaccumulator. - Fix the name scaleDisplacementT(Real multiplier), handle the case force=0 correctly (thanks Vaclav). - Fix mail adress. - Implement scaleDisplacementT(multiplier) for all functors derived from Dem3DOF. This function is only used in Law2_Dem3DOFGeom_FrictPhys_basic at the moment. - Fix the undefined scene pointer in ElasticContactLaw. - Register TTWater correctly. - Update documentation of some classes, reformat a little, and fix (again) some email adresses. 1 - stress definition in PeriIsoCompressor was wrong for ScGeom (sign mistake due to double-reverse); Missing files in r2249. This commit complete the implementation of periodicity for incremental formulation, with updated relative velocity across periods. It has been tested carefully in periodic triaxial tests. 1. updateShearForce is renamed rotateAndGetShear and DOES NOT update shear force any more : this is Law2's job. Two versions are available, for resp. periodic and non-periodic case so that people don't have to worry about the additional "shift" in function parameters. 2. put the line fs+=ks*dus in laws using the former ScGeom::updateShearForce. 3. Put back Hsize in Cell (I need that each time I write a line in periodicity, really, please don't remove it). 4. The rest is details (fix wm3 incompatibilies, formating, documentation, etc.). - Fix compile error, sorry. - Fix Wm3 build in Dem3DofGeom_FacetSphere.cpp, the Real*Vector had not been reverted in that file. - Workaround https://bugs.launchpad.net/bugs/585898. - Implement Cundall-style positions scaling when (homotheticCellResize=2). - Rename Water=>Capillary (more accurate) - Register CFTTest. Chiara Modenese (5): Added constitutive law with Hertz formulation for contact stiffnesses Make penetrationDepth directly accessible through python Removing variable timeStepOutputInterval from the TT, it was useless. Add tangential values for the stiffnesses in HM law so that GSTS can be used (anyway contact forces are computed from the secant stiffness values to avoid numerical approximations). Avoid to store trialFs to the physics functor as it is already referenced. Correct a banal mistake in failure criterion. - Small changes in HM to handle PBC if scene is periodic (same logic as in ElasticContactLaw.cpp) Emanuele Catalano (16): Add code for flow problem resolution. Updated flow engine files. Made some correction in flowengine files. - Made corrections on flow code - Class registration via new macros introduced Few corrections in flow files. Forgot to delete some line. - Modified the type of some function in FlowBoundingSphere - Adapted FlowEngine to that modifications - Adjusted the use of "currentTes" in FlowEngine - Introduced timing information from engines and functors - Reorganized the code and cleaned from useless stuff - Verified properly re-triangulation - Made corrections on Gauss-Seidel break criterion - Assigned more severe tolerance to permeability computation - Fixed some error due to pointer scene* deletion - Added functions to write Mplotlib files - Adjustments to the code - Fixed retriangulation problems - Flow Code Maintenance - Introduced local permeabilities' correction agent - Fixed retriangulation problems - Walls proper identification is no more ID dependent - New output files for fluid pressure and settlement evolution - Fixed some warning came out with new compiler version - Fixed errors in walls' identification Janek Kozicki (4): fixes #571674 don't segfault when TriaxialStressController is facing clumps Scene.hpp -> remove obsolete comment QtGUIGenerator -> wider view on vector fields TriaxialStateRecorder and TriaxialCompressionEngine -> it was segfaulting with clumps: fix it. was not compiling with wm3 Jerome Duriez (26): Beginning of adapting code about simple shear (to train with bzr almost) - There are still indeed the YADE_REQUIRE_FEATURE(PHYS_PAR) lines which prevent these files to be compiled. - There is only one change that will be detected by your news compilings : change of a line in ElasticContactLaw. I corrected a link towards an URL corresponding to "old wiki" Renaming of all (normally) linked with this famous "ContactLaw1". Thanks to Vaclav for his scripts ! Dplt de SimpleShear hors de attic Re-activation (suppression de YADE_REQ...(PHYS_PAR) ) de RockJointPhys, et RockJointLawRelationships - "SimpleShear" was re-introduced in pkg/, instead of attic/ (Last ?) renaming of classes linked with "my" contact law. The normal inelasticity is now emphasized in the name, because it is what is specific to these classes. NB : this contact law takes also into account a moment transfer. Re-writing of classes CinemCNCEngine, NormalInelastictiyLaw (and those linked : NormalInelasticityPhys and Ip2_2xCohFrictMat_NormalInelasticityPhys) according to the macros replacing former REGISTER_ATTRIBUTES... Move of the line YADE_PLUGIN((...)) of CinemCNCEngine : it was before the "include...", and for Emmanuele it did not compile thus. Moved after the "include". Re-write of CinemKNCEngine according to new macros. Anecdotic changes in CinemCNCEngine Suppressing of commented lines Renaming of Cinem...Engine in an english way : - CNC = Constant Normal Load => CNL - KNC = Constant Normal Stifness => CNS - DNC = Constant Normal Displacement => CND - DTC = Constant Tangential Displacement => CTD - Correct writing of Disp2DPropLoadEngine : in order to perform tests on a shear box, piloted by dispNormal + k*dispTangential = 0 Compilation enabled by the way. - Minor syntax changes of doc of KinemCNSEngine - Suppression of CinemCisEngine, which even me almost never used. - Add of KinemCTDEngine: performs constant tangential displacement (=oedometrical) compressions on the simple shear box - move of KinemCND from pkg/common to pkg/dem. This Engine does not use really any DEM-specific concept, but I guess it will always be used in DEM simulations, so I thought it will be more adequate in dem/ - modify of corresponding "include"... - rewrite of KinemCNDEngine.hpp, with "good" macros - Use of YADE_CLASS_BASE_DOC_* macro family in KinemCNDENgine (it was not in r2082, contrary to what was previously said) - Rename of NormalInelasticityLaw into Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity (I accept sincerely any proposal of shorter file names...) In fact it is not yet a functor, but I want to try to write it in a more proper way... - Corresponding changes in affected files - Details in other files - Rename of NormalInelasticityLaw into Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity (I accept sincerely any proposal of shorter file names...) In fact it is not yet a functor, but I want to try to write it in a more proper way... - Corresponding changes in affected files - Details in other files ANECDOTIC COMMIT - fix typo in Engine.hpp : "fron" corrected by "from" I commit this alone, with no other changes, to make clear to everyone that this change to a central part of Yade is really anecdotic... - the code concerning the inelastic normal law is now in files named NormalInelasticityLaw.* instead of Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity.* The class itself has still the same name (Law2...), but I changed the name of the files for practical reasons, as it seem other people do (files HertzMindlin, CohesiveFrictionalPM for ex). Tell me if this is problematic Re-write of CohesiveFrictionalMat with YADE_BASE... macro. It is not one of "my" files but I wanted to use it with Python, so I did it. I hope noone will be offensed. - Add of a script NormalInelasticityTest to test ... the NormalInelasticityLaw (Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity) Moreover my python problems I had difficulties to obtain "perfect results". I think it is linked to the way un is computed in Ig2_Sphere_Sphere_ScGeom (see for example this "shift2"). Why not making penetrationDepth directly accessible through python ?? - Change of Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity into a real functor instead of an Engine (compilation checked, and that's all) - Run of NormalInelasticityTest, now Law2...NormalInelasticity is a functor => same results as before it seems - Change of .Length() in .norm() in other scripts, as .Length() seems to be deprecated - One more change of .Length() in .norm() - check in NormalInelasticityTest.py that the curves are perfect ! **** "My" files ***** - Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity is now a functor as it should. - Related changes in few files - The script NormalInelasticityTest tests now the tangential component also, and it will normaly soon check the MomentLaw. It illustrates also the various ways of controlling disp$ Fix of https://bugs.launchpad.net/yade/+bug/589516 (sorry, the compilation did not crash on my computer when I tried) - Cleaning changes in NormalInelasticityFiles... =>Add of a new Material storing the info for differences between loading and unloading (related changes) Luc Scholtes (13): - correction of thickness computation in TriaxialStressController - submission of an updated version of cohesiveFrictionalContactLaw called cohesiveFrictionalPM (more details in CohesiveFrictionalPM.hpp). Tried to follow the new rules for variables declaration with documentation... NEW TRY to add the updated version of cohesiveFrictionalContactLaw called cohesiveFrictionalPM (see revision 2068) SORRY FOR THE REDUNDANCY... updated comments in cohesiveFrictionalPM.hpp to be consistent with the computation correction of few bugs in CohesiveFrictionalPM fix almost all of the classes related to CapillaryCohesiveLaw (except TriaxialtestWater) to suit YADE_CLASS_BASE_DOC_* macros. Everything compiles but the efficiency of the code needs to be tested. This version fixes a bug which produced FATAL ERROR when 2100 version was launched. SORRY. Removed CapillaryRecorder and ContactStressRecorder. Renamed SimpleElasticRelationshipsWater to Ip2_FrictMat_FrictMat_CapillaryLawPhys (can probably be removed as it is identical to Ip2_Frictmat_FrictMat_FrictPhys...) and CapillaryCohesiveLaw to CapillaryLaw. Modified all Capillary related files. some updates of capillary files. Rk: all must be tested! -updates for capillary files (doc in Law2_..._Capillarity and changes in CapillaryStressRecorder)\n\n -add a feature to CohesiveFrictionalPM (creation of CFpmState to stock number of broken bonds) fix compiling error in previous rev (but some warnings linked to TriaxialStressController.hpp) new line added at the end of CohesiveFrictionalPM to avoid corresponding warning + cleaning some updates in CohesiveFrictionalPM. Unfortunately, the law still does not work in macroscale simulations... CohesiveFrictionalPM update - add normalization of a quaternion + other few changes Luc Sibille (2): I added the (updated) ThreeDTriaxialEngine, and it is also to see if we managed to make bzr working through an ssh tunnel - update of ThreeDTriaxialEngine with YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY \n - modified ThreeDTriaxialEngine to be able to perform internal compaction (growing particles) \n - modified TriaxialStateRecorder to be able to use it with ThreeDTriaxialEngine Sergei Dorofeenko (37): 1. virtual facets don't have a BoundingVolume (flag noBoundingVolume in utils.facet) 2. new engine ResetRandomPosition (another name?). This engine reset the body position to a random position in specifed (by virtual facets) region. 3. example of using of ResetRandomPosition engine: scripts/test/ResetRandomPosition.py Fix [Bug 485209] 1. adapt VTKRecorder to body removing 2. fix bug with colon separated paths in a profiles. fix bug in scons.profile*: now CPPPATH and LIBPATH is a simple string (not a list) with colon separated paths. Adaptation of viscoelastic model classes and some others to new material/state classes: 1. Add a meta package ViscoelasticPM, which now contains all classes for viscoelastic model. 2. Fix STLImporter, getViscoelasticFromSpheresInteraction 3. Fix bug in utils.sphere, utils._commonBodySetup Adaptation examples/STLImporterTest.py for new viscoelastic classes. Adaptation NewtonDampedLaw to material/state classes Add to NewtonDampedLaw a modified leap-frog algorithm for accurate integration of rotation equation. This is intermideate commit: new algo seems to work, but needs some coupling with previous code. merge clump branch with trunk Add some tests for clumps Fix bug with import facets from stl small optimization of acc.rot.alg; fix velocity and add angVel in VTKRecorder." 1. handle DOFs for new rotation alg.; 2. add new clump-hopper-viscoelastic script merge with clump branch: 1. handle DOFs for new rotation alg.; 2. add new clump-hopper-viscoelastic script; 3. small optimization of acc.rot.alg; fix velocity and add angVel in VTKRecorder. Intergate new acc.rot.alg. to code. Intermediate commit. Rename prevAngMom to angMom revert NewtonDampedLaw to r1817 and rename prevAngMom to angMom Integrate new rotate alg. into code. Intermideate commit integrate a new acc.rot.alg to NewtonDampledLaw framework remove log_trace from NewtonDampedLaw::lfRigidBodyRotate Integrate new rotate integrator into the NewtonDampedLaw framework NewtonDampledLaw: rename functions and remove duplicate code as suggest Vaclav (thanks!) 1. NewtonDampedLaw: rename functions and remove duplicate code as Vaclav suggest (thanks!) 2. Add spheres ids to VTKRecorder 1.fix link with GLU for QGLViewer; 2.fix header for Shop; 3.Add clumpids to VTKRecorder Update ResetRandomPosition STLImporter returns a vector imported facets instead of adding them directly utils._commonBodySetup does not reset body id. small update examples/STLImportedTest.py Fix bug #531394 refixing bug #531394 Reanimation of some examples; fix bug in ymport.stl fix bug in utils.py; consistent signs in ViscoelasticPM fix typo small modify of STLImporterTest.py Fix shear direction damping as Chiara Modenese suggest. And more fixing damping shear direction yet more fixing ViscoelasticPM Add doc for utils.getViscoelasticFromSpheresInteraction Unknown (5): 1. Make all paths given to scons on the command line COLON separated rather than space separated. BACKWARDS INCOMPATIBLE if you used scons in scripts (doesn't affect saved profiles). (Rationale: impossible to save the option in shell and later use it due to quoting issues) 2. Optionally set PATH as argument to scons (you can use scons PATH=$PATH as well) 3. Enhance VTKRecorder to record interactions andsome data on them. 1. Fixes in scons for qt path (hopefully OK now); remove VTKINCDIR, use CPPPATH which alread exists 2. Improve yade-multi web interface (keep it running if --http-wait specified; show total time at the end) 3. Fixed in VTKRecorder and CPM 1. Enhance yade-multi to query running jobs for status (percentage, step number etc), to keep connections, allow more fine-grained thread number control 2. Add some more cpm data (like sigma, sigmaMean, tau) 3. Enhance vtkrecorder to save those cpm data 4. Don't set matplotlib backend in yade.plot automatically, since ti breaks in headless environments 5. Add O.tags.has_key A typo in SConstruct. getClassIndexStatic() member turned to public. Vincent Richefeu (2): - Increase DISTANCE_MAX - use gcc-4.0 (4.3 doesn't work correctly on mac snow leopard) Rewrite KinematicLocalisationAnalyser::DefToFile for vtk format. Václav Šmilauer (264): 1. Hopefully fix vtk libs in SConstruct (?) 2. Add compress parameter to VTKRecorder (doesn't seem to make any difference in the output files, however...?) 3. Add CPM damage to VTKRecorder 4. Move spiralProject to Shop, to be usable from within c++ 5. Add a 2 functions to compute 2d and 3d stresses to yade.eudoxos 1. Enhance VTKRecorder to save more CPM data 2. Add confinement storage to CpmMat; CpmStateUpdater now computes that. 3. Add method to get aabb of Gauss-smoothed domain. 1. Update examples/concrete/uniax.py and add CpmPhysDamageColorizer to renamed classes dictionary with warning. 1. Use colon as separator to all path parameters to scons (PATH, CPPPATH etc), to avoid shell escaping insaneness. NOT BACKWARDS COMPATIBLE if you call scons from scripts with multiple paths. Scons.profile-* files will work. 2. Add PATH parameter to scons, for things like pkg-config that we call during the configure stage (you can propagate whole path by saying scons PATH=$PATH) 3. Extend VTKRecorder to record interactions as well; add some cpm-related parameters. 4. avgStress is now Vector3r 5. Fix openGL-less builds (missing parenthesis in core/SConscript) 1. Remove VTKINCDIR (duplicates already existing CPPPATH) 2. Fix handling of QTDIR (hopefully?) 3. Yade multi now displays total time at the end, takes --jobs (long option for -j), and the http server keeps running as long as the summary page is requested if run with --http-wait 4. Fix computation of sxx, syy, szz in cpm Yade-multi, VTKRecorder enhancements, &c 1. Fix compilation on nfs (unable to delete .nfs* files) 2. remove debug message from the info socket 3. Make SpiralEngine assign velocities to (nondynamic) bodies so that when velocityBins are used, contacts are not missed. 1. Add example of generating randomly-packed tunnel-like scene (6 lines of python code). 2. Add explicit check for physics dispatchers in InteractionDispatcher even in the optimized build. Fix what seems like bug in is2is4scg... 1. Set timeout on infosocket 2. Add velocity bins to uniax.py example 1. New yade.post2d module for 2d post-processing (raw/smooth scalar/vector field plots), with docs and examples 2. Add epydoc brief documentation to all python modules 3. Change constructor of GaussAverage in python to take always the relThreshold parameter 1. New BodyVector written from scratch: supports body removal, intelligently allocates new ids at insertion. Is now default; a few pecent faster than BodyRedirectionVector which will be removed after a while. 2. Remove BodyAssocVector 3. Remove mass-spring for good 4. Add body removal support to InsertionSortCollider 5. Add empty body support to NewtonsDampedLaw, GravityEngine, OpenGLRenderingEngine and a few others 6. Wrap body removal from python 7. scripts/test/remove-body.py to demonstrate continuous dynamic body addition/removal. 1. Remove InteractionHashMap Add 'deprecated' feature which guards code pending removal. To compile those, you have to add 'deprecated' to features. 1. Add infinite axis-aligned planes (Walls), interacting with spheres; I would like to deprecate Boxes soon. scripts/test/wall.py show the functionality, utils.wall create ready-made body. 2. Add Walls to triaxial test as an option to facets and boxes. 3. Unbreak ef2_Spheres_Elastic_ElasticLaw (passing neverErase broke virtual function resolution -> exception) 4. Make Simulation controller always open, closing it quits yade. Generator accessible from controller; player must be accessed from controller by opening generator, closing it (where by main window apprears), then opening player. 5. Change prototype for InteractingGeometry functors, to get some information about the openGL context (scene radius and center, ATM). 1. Remove all deprecated classes as described in the last commit. 2. Start flagging code needing GeometricalModel by YADE_REQUIRE_FEATURE(shape). Once it compiles without shape, affected classes will be removed. Remove GeometricalModel from everywhere, unless you compile with the 'shape' features. Many classes had to be disabled; those who care about them are expected to fix them so that they don't rely on GeometricalModel. I will post on the mailing list on how to do that. Trivial fix. But shape feature is no longer supported, fix such things yourself next time, if you need them. 1. For each interaction, save when it was last seen by the collider. Adapt SpatialQuickSortCollider for that (remove Interaction::cycle), it saves 2 loops over interactions. The deletion is triggered in InteractionDispatcher/InteractionGeometryDispatcher afterwards. This infrastructure is neede for the grid collider. 1. Flatten file hierarchy a little bit. 2. Add MetaEngine{1,2}D and EngineUnit{1,2}D to the MetaEngine.hpp and EngineUnit.hpp instead of having them in separate headers. Remove 'deprecated' features from SCons files since they're not in the codebase anymore. 1. Change syntax of python docstrings to restructured text instead of epytext (for future compatibility) 2. Workaround CPPPATH error saving option 3. Make SpatialQuickSortCollider skip boundless bodies 4. Fix rendering bodies with names (i.e. selectables) Initial commit of new Material and State classes that will replace PhysicalParameters in the future. No changes in functionality. 1. Fix crash when removing bodies with velocityBins and MetaInteractingGeometry2AABB 2. Add option to draw normals for InteractingFacet (off by default); see scripts/test/remove-body.py (commented) Fix compile error introduced in last commit. Rollback point for adding YADE_REQUIRE_FEATURE(physpar) everywhere. rollback point 2 Build core only OK (no gui,python,extra) NewtonsDampedLaw, Clumps, SpatialQuickSortCollider compile. Checkpoint before replacing PhysicalParametersMetaEngine and friends REMOVED PhysicalParameters, add Material and State classes. DISABLED many (most) plugins, I ask the respective authors/users to fix them. 1. A few small leftovers. 1. Initialize dnesity to 4800 in CpmMat 2. Add warning if passing obsolete physParamsClass to utils.{sphere,facet,box,wall} 3. Add Material.cpp to ensure virtual functions work properly (not sure if they didn't, but now they do) 4. Fix uniax.py 1. shared materials; see scripts/test/facet-sphere.py and also py/tests/omega.py. 2. added some regression tests for Omega 3. python iterator over O.bodies silently skips erased bodies now 4. finally rename all MetaBody::transientInteractions to MetaBody::interactions 1. Fix uninitialized memebrs in Material (thans Anton) 2. Add equivalent of dispSe3 to OpenGLRenderingEngine directly 3. Fix pack.py 1. Make the optimized build default (as per Sega's suggestion); it also sets linkStrategy to monolithic (is that OK?) 2. Add some vtk dirs to default CPPPATH 3. Fix periodic boundaries in OpenGL & remove some YADE_SHAPE stuff from there. 4. Fix some warnings 5. Fix pack.randomDensePack **kw 6. Adapt examples/concrete/uniax.py to shared materials 1. Add Material::newAssocState creating State instance that is supposed to go along with given material; wrapped in python. It is used by utils.{sphere,facet,box,wall} functions now (hence by most or all body-construction things in python) 2. Fix py/post2d.py and examples/concrete/uniax-post.py 3. Fix crash for material-less bodies in scripts/test/regular-sphere-pack.py 1. Move import functions from utils to yade.ymport (sorry, import is python keyword and cannot be used ;-) ). yade.utils contains proxy function that warn and call the implementation in ymport. 2. Added virtual book Material::stateTypeOk(State*). 2. MetaBody checks that material--state couples are OK at the first run (like initializers, but not listed among initializers...); throws on error. Added this to regression tests. 3. O.step() now calls MetaBody::moveToNextTimeStep() directly, instead of spawning worker for 1 iteration. 4. Adapt stl import test to yade.ymport (the facets look weird, though?) (forgotten: remove prototypes for incrementCurrentIteration and incrementSimulationTime that are no longer used from Omega.hpp) Regression check that NULL state throws (if there is a material) as well. 1. Merge PeriodicInsertionSortCollider into InsertionSortCollider (periodicity detected automatically); PeriIsoCompressor moved to a separate file. 2. Initialize GranularMat properties (such as posisson't ratio) to arbitrary but non-zero values (avoids NaN's and disappearing bodies, bug #488100) 3. Re-enable clump logic in NewtonsDampedLaw (was #ifdef'd out), fixes bug #488100 4. Change prototypes of Shop::sphere and other methods, to take advantage of shared materials. 5. Change Collider::probeBoundingVolume prototype to return vector instead of storing it in the collider itself. 1. Enable velocityBins in pack.randomDensePack for periodic compression, speedup of about 13% (quite small?) 1. Fix Bruno's compile error pkg/dem/meta/Shop.cpp:281: error: operands to ?: have different types 'boost::shared_ptr' and 'boost::shared_ptr' 2. Fix warning's from out-of-order initializer in State. 1. add #error to DataRecorder so that people don't use it, with explanation. 2. Add Recorder, deriving from PeriodicEngine and taking care of opening file. 3. Derive TriaxialStateRecorder from Recorder. (Anton: do the same for CohesiveStateRPMRecorder, I don't want to edit it since the version would probably diverge if you work on it now) 4. Fix PositionOrientationRecorder (is that one being used at all?) 5. Rewrite Singleton (to work accross different translation units) 6. Remove qt3 from 'exclude'. Enabling opengl requires qt3 automatically now. 7. Remove lib/sqlite3x, which was only used in noew-removed SQLiteRecorder 8. Experimental main in python (not fully functionaly for now) 1. Re-enable temporarily commented code. 1. Re-enable PeriodicPythonEngine and a few other YADE_REQUIRE_FEATURE(PYTHON) that I overlooked 2. Make the python main program work with plugins (RTLD_GLOBAL in both DynLibManager and python); doesn't work with openmp and opengl (investigation ongoing), looks promising otherwise. The program is called yade-trunk-dbg-py and such; not all options of the c++ main is implemented (yet?). 3. (In previous commit) Remove loading preferences.xml, just use QtGUI if possible and enabled, otherwise "only" python console. 1. Remove rests of Preferences. 2. Remove HUP emergency saving (was disabled since long anyway) 1. Add chunkSize option that determines how many plugins will be compiled together. (orthogonal to linkStrategy, that one determines how many will be linked to together). Should avoid issue with monolithic link on machines with less RAM; allows parallel compilation of plugins on machines with lots of RAM. Defaults to 20. 1. Re-enable crash warning in pyboot.cpp 1. Remove implementation of global functions from Tetra.hpp to Tetra.cpp (gave errors on linking multiple objects including that same header.) 2. Add Body().geom as alias for (now deprecated?) Body().mold Make YADE_DEBUG work as expected (set debug leverl with log4cxx); avoid possible crash when logging during early log4cxx initialization. 1. Change prototype for InteractionGeometryMetaEngine to receive const State& instead of const Se3r&. Add const Vector3r& shift2 for peroioditiy (ZERO by default). 1. Fix Sega's and Anton's bug which was introduced in r1820 (keeping return from older version, instead of continue :-| ) 1. Rename EngineUnits to Functors, MetaEngines to Dispatchers (only the 4 types that we will keep). Python scripts should not be affected, except for raising deprecation warnings for the old names 2. Fix corner cases in deprecated names logic in python 1. Rename MetaBody to World (it had to be done at some point, regardless of what the name is) 2. Add Engine::world, set before every call in moveToNextTimestep 3. Change names of a few related methods 1. Fix "rootBody" in FileGenerator saver. 1. Add scan&replace scons builder 2. Get libstdc++ path from the compiler, embed it in main.py; it runs fine 3. Fix temporary filename in Omega (forgotten dir separator) (doesn't compile, will fix in a few minutes; need to transfer between computers now) cleanup of python boot code 1. Add yade.system module containing most startup things 2. yade-trunk-py usable now; startup is _much_ faster than the c++ main :-) (lazy linkage?). If everything works well, the c++ main will be deprecated soon (though still functional) 1. Add YADE_LINK_EXTRA_LIB so that plugin can request to be linked with additional library (used in MicroMacroAnalyser) 2. Add -frounding-math when compiling with CGAL 3. Lot of reorganization of python code. Yade is now fully usable (it seems) with the python main (yade-trunk-py), and also lodable from pure python 1. Fix assertion failure in NewtonsDampedLaw triggered by clumps in debug mode (typo) 2. Fix periodicity for Dem3Dof classes 3. Don't put things to __builtins__ in python, from yade import * will import wrappers as necessary into current global scope instead. 4. Expose Omega as yade.wrapper.O instance in the c++ code directly. 1. Error out if adding the same body twice from python 2. First steps for user tutorial (please do not edit now) 1. Move TesselationWrapper to lib/triangulation. 2. Main program (e.g. yade-trunk) is now in python; the old is yade-trunk-cxx. Most functionality should be the same, but please do report undesired behavior. 3. Adjust ipython configuration to be more friendly. 4. Improve default log4cxx output format 5. rename yade.PythonTCPServer to yade.remote 6. Remove annoying "INFO: sanitize failed" warnings 7. SimulationController now closes on escape or any function key. 1. Rename World to Scene, as Bruno suggested. It feels better, we are no gods to create worlds... 2. Rename BoundingVolume to Bound; BoundingVolumeDispatcher to BoundDispatcher; dtto for Functor 3. The 'shape' feature was renamed to 'geometricalmodel' feature to not conflict with the following: 4. Rename InteractingGeometry to Shape 5. Rename ef2_*_Sphere_Dem3DofGeom to Ig2_*_Sphere_Dem3DofGeom 6. Rename ConstitutiveLaw to LawFunctor, ConstitutiveLawDispatcher to LawDispatcher 1. Fix many warnings in various parts of python code related to renaming. 1. Rename data members to follow types: Body::boundingVolume → Body::bound, Body::interactingGeometry → Body::shape. Old names are still present as references with deprecation warning by the compiler. Regression tests passing. 1. make realVersion to be bzr revision 2. Re-enable Controller at startup always 3. Always rebuild python template files invisibly, since they wouldn't spot revision change otherwise (very fast) 1. Fix the plot example. 1. Add PeriTriaxController, with sample script in scripts/test/periodic-triax.py; works perfectly 2. Fix stress sign in PeriIsoCompressor (summing abs stresses still broken) 3. Handle periodic boundary moves with velocityBins 4. Rename ncb to scene in NewtonsDampedLaw (gradual change) 1. Fix (hopefully) an issue with log4cxx 0.9 reported by build robot. (Python 2.5 fix for robot) 1. Enhance PeriTriaxController for controlling strain/stress in periodic simulations; stress and strains appear to be physically correct now (however, see https://bugs.launchpad.net/yade/+bug/493102) 2. Add examples/concrete/periodic.py, showing uniaxial/biaxial periodic loading. Results are awesome. 3. Fix stiffness computation for Cpm. 4. Add (unpolished) pack.randomPeriPack for generating periodic packings. 5. Add some sphinx doc files (no contents, just skeleton). 1. Change prototype to InterationGeometryFunctor (see https://www.yade-dem.org/index.php/API_Changes) 1. Write some docs 1. Fix PeriTriaxController example 1. Refactor parameter table support (one reader class) 2. Fix yade-multi, add detection of regular exit with log4cxx crash at exit 3. Add --nice option to main.py 4. Make O.exitNoBacktrace output either "Yade: normal exit." (magic for OK exit, detected by yade-multi for instance) or "Yade: error exit". Fix reading parameters from table (thanks Anton for patience) Hopefully fix yade-multi https://bugs.launchpad.net/yade/+bug/493686 now? Please confirm. 1. Add Scene* Functor::scene, update it from all dispatchers at every step. 2. Add NewtonsDampedLaw::homotheticCellResize (0,1,2 for disabled, velocity or position update) (not tested at all) 3. Start removing Scene* ncb and Scene* rootBody etc from Engine::action as I stumble accross them. Please do the same, Engine::scene can be always used instead. 1. Renames as discussed on yade-dev: NewtonsDampedLaw -> NewtonIntegrator, StandAloneEngine -> GlobalEngine, DeusExMachina -> PartialEngine. Regression tests ok. 2. Rename the confusing scons 'pretty' option to 'brief'. Profiles will be updated automatically, both options are valid for now. 1. Finish renaming DeusExMachina -> PartialEngine 1. Enable search engine in doxygen. 1. Fix https://bugs.launchpad.net/bugs/495358 (seems like concurrent access with Anton ;-) ) 2. Add mask check to the collider 3. Initialize Body::id with Body::ID_NONE rather than -1 4. First attempt at doctest (for utils.sphere) 1. Don't call CreateIndex in Materia::Material (see https://bugs.launchpad.net/yade/+bug/495437) 2. Add dipl and rot methods to body, for querying displacement and rotation relative to reference position and orientation (moved from the python wrapper). 3. Add .classIndices to return list of class indices from the instance up to the top-level indexable from python. 1. Rename Sphere (as GeometricalModel) to SphereModel (to facilitate InteractingSphere -> Sphere soon) 2. Initialized density to 1000 in Material, to avoid weird explosions 3. Add scripts/tests/triax-basic.py, a TriaxialTest in python 1. A few renames: Facet → FacetModel, Box → BoxModel, GLDrawSphere → GLDrawSphereModel, GLDrawBox → GLDrawBoxModel 2. Remove shadowVolume functors, since they were not used anywhere in OpenGLRenderingEngine 1. Rename GLDraw* to Gl1_* 2. Scene no longer inherits from Body, some of its properties are "emulated" (bound, shape). Not sure if Shape is really needed, perhaps for periodicity things etc in one place? It can be in the class itself just as well. 3. Remove MetaInteractingGeometry2AABB from all files (no longer needed); backwards-compatibility with python assured. Hotfix for twice-renamed Bo1_SceneShape_Aabb. 1. Add some introspection interfaces to Indexables and dispatchers, as needed for Programmer's manual (https://yade-dem.org/sphinx/prog.html#multiple-dispatch), remove dead code, some cleanups. 1. Move lib/triangulation stuff to CGT namespace as suggested by Bruno in https://lists.launchpad.net/yade-dev/msg02658.html 1. Rename SpheresContactGeometry to ScGeom 2. Rename corresponding functors: InteractingBox2InteractingSphere4SpheresContactGeometry -> Ig2_Box_Sphere_ScGeom InteractingFacet2InteractingSphere4SpheresContactGeometry -> Ig2_Facet_Sphere_ScGeom InteractingSphere2InteractingSphere4SpheresContactGeometry -> Ig2_Sphere_Sphere_ScGeom 1. Rename InteractingBox -> Box, InteractingSphere->Sphere, InteractingFacet->Facet. 1. Fix renaming conflict (InteractingSphere->Sphere shadowed by older Sphere->SphereModel) 1. use stderr for standard startup messages 2. add scripts/test/dispatch-torture.py for visualizing dispatch matrices in html. Add support HTML.py module from the web. 3. call cleanupTemps if exiting; we should leave cruft in /tmp/yade-* only if crashing before trying to exit (unusual) 1. Make MetaInteractingGeometry2AABB warning more descriptive. 1. Remove Scene::{cellMin,cellMax}, use just Scene::cellSize; update all related code and scripts 2. Change python interface: Omega.periodicCell=Vector3 (only size, no more min/max) 3. Add (not yet used) core/Cell.hpp header. Will be accessible as Scene::cell, once used. 1. call centerScene() in GLViewer ctor, bind C to centerScene if no body is selected (was deactivated most likely by mistake, bzr annotate thinks it was me...!?). This should fix bug reported by Chiara for TriaxialTest with UpperCorner=Vector3(12,12,12) Fix missing import in py/post2d.py 1. Use Scene::cell instead of Scene::cellSize; update all code 2. Have O.cellSize (instead of O.periodicCell; add wrapper with warning) and add O.cellShear 3. Add scripts/test/periodic-shear.py (purely for showing the display things, no interactions etc yet!) Do pending renames: * AABB → Aabb * Interacting{Box,Sphere,Facet}2AABB → Bo1_{Box,Sphere,Facet}_Aabb * Wall2AABB → Bo1_Wall_Aabb * GLDrawAABB → Gl1_Aabb 1. Finish implementation of sheared periodic space. 2. Fix bug which might have caused missed asymetric (Facet - Sphere, for instance) in periodic space, when interaction order was reversed. 3. Add possiblity to pass a callable to utils.spheres' material parameter, to avoid shared material properties when called indirectly (pac.randomDensePack) 4. Remove Aabb::{center,halfSize}, since they were used only rarely and were redundant. 1. Remove abstract RenderingEngine 2. Remove SceneShape and related classes 1. Add python2.5 relative module import workaround (hope it works) 2. Move some python accessors from yadeWrapper to their respective classes 3. Half work on periodic cell scaling in the OpenGL renderer 1. Add ctor priorities, but only for gcc >= 4.3 (for early logging and plugins; necessary for the next point) 2. Register Functor core class in the factory (will be done for the rest soon, see https://bugs.launchpad.net/yade/+bug/498337) 3. Wrap Matrix3 class in python, write unit tests for it. 4. Re-enable ForceEngine and FacetTopologyAnalyzer 5. Update a few scripts in test/scripts 1. Implement arbitrary strain for periodic cell (see scripts/test/periodic-shear.py). Most code adapted accordingly. 2. ClassFactory now logs to cerr if YADE_DEBUG env var is defined, not otherwise. This avoids initialization order of plugins vs. ClassFactory itself 1. Fix weird behavior reported by Luc at https://lists.launchpad.net/yade-dev/msg02794.html (numerical issue) 2. Fix crash at body selection (wrong dispatcher arguments) 3. Add warnings about what Luc observed, should it happen again. 1. Allow spaces after YADE_REQUIRE_FEATURE (before parenthesis) and around its argument inside parentheses. 1. Fix https://bugs.launchpad.net/yade/+bug/499697 (sorry, Luc) 1. Rename BexContainer to ForceContainer, O.bex to O.forces etc. Mostly backwards-compatible in python. 2. Add Shop::flipCell which changes shear without affecting interactions (by integral steps), demonstrated in scripts/test/periodic-shear.py (not yet fully tested, but doesn't crash ;-) ) [BROKEN due to recent VELGRAD changed] 3. Add InteractionsContainer::eraseNonReal (Fix unsignificant hasShear mistake in Cell, clean old code there) 1. Make python interaction iterator return only real interactions. (TODO: regression test & check scripts for compat) 1. Add cell strain rate integration to the Scene loop. 2. Remove Cell::Hsize and friends, remove VELGRAD; unify both approaches. 3. Update some scripts, fix Shop::flipCell (demo in scripts/test/periodic-triax-velgrad.py) 1. Use Cell::trsf instead of Cell::strain (which really meant trsf-Id) 2. NewtonIntegrator now precomputes cellTrsfInc for the current step, instead of using Cell::getTrsfInc getting increment from the previous step (!?) 3. Update scripts and other code. 1. fix size computation in cell 2. Save history at exit, incremental history search with arrows up/down 3. Don't return false in Ig2_Box_Sphere_ScGeom for existing intr 1. Separate rotation&shear from scaling in cell. Fix possible error (but also possibly not?) error in collider. Spheres' Aabb's are still probably not correctly enlarged. 1. Forgotten new file. 1. Re-enable error check in InsertionSortCollider, make the explanation clearer 2. Fix sphere's Aabb (hopefully) (Bruno, could you check that?) 3. Worker thread now catches exception from simulation and O.wait() (or O.run()) will rethrow it; avoids crashes from exceptions. 1. Preliminary attempt at https://blueprints.launchpad.net/yade/+spec/c++-numpy-arrays (for postprocessing and similar), example in eudoxos.testNumpy 2. SpherePack::makeCloud can be asked for negative number of spheres (= as much as possible) 1. May fixes for errors found when running larger simulation. 2. Move material properties from Ip2_CpmMat_CpmMat_CpmPhys to CpmMat itself. 3. Some reverts in PeriIsoCompressor (log strain and usage of refSize) 1. Add clone function to python objects, taking optinal python dictionary with changed attributes 2. Fix PeriIsoCompressor for examples/concrete/periodic.py 3. GaussAverage relThreshold argument is now optional in python, as it is in c++ (again) 1. Fix examples/concrete/periodic.py 2. Fix (partially) scaling of periodic cell resize in OpenGL Implement https://blueprints.launchpad.net/yade/+spec/sphere-gl-stripes (weird lighting things). Must be enabled via "Gl1_Sphere(stripes=True)" in python. 1. Fix SpherePack().makeCloud() in python 1. Remove some old docs 2. Attempt at update-alternatives 3. packaging updates 1. FIx core class registration in the factory (fixes inheritance info in python for such classes) 2. Fix debian packaging, use update-alternatives Bulk of consistency renames (hopefully last for long time to come): * ElasticMat → ElastMat * GranularMat → FrictMat * NormalInteraction → NormPhys * NormalShearInteraction → NormShearPhys * ElasticContactInteraction → FrictPhys * SimpleElasticRelationships → Ip2_FrictMat_FrictMat_FrictPhys * ef2_Spheres_Elastic_ElasticLaw → Law2_ScGeom_FrictPhys_Basic * Law2_Dem3Dof_Elastic_Elastic → Law2_Dem3Dof_FrictPhys_Basic 1. Document PeriodicEngine (doxygen comment in the header) 2. Fix runtimePREFIX vs. PREFIX in yade-multi (only affects packages, not regular builds) 1. Fix epydoc generation with python main (thansk Anton for th yade-cxx hint!) 2. Expose O.tmpFilename returning unique filename in temporary dir that is deleted at exit 3. Do not import yade.plot at startup, since it initialized matplotlib to TkAgg, which needs $DISPLAY (and fails later if no $DISPLAY exists, i.e. for headless simulations) 4. Fix shear stress computation in CpmStateUpdater 1. Fix numpy_boost and TesselationWrapper 2. Start moving python registration code inside classes themselves. That should allow proper class hierarchy in python as well as (faster) object.attribute access instead of hacky object['attribute']. Please report errors you might encounter. 3. Resurrect Dem6DofGeom, doesn't work for now. 1. Add new-style python wrapper to most classes that were previously wrapped in yadeWrapper.cpp. Let me know if this breaks something for you. 1. Add YADE_CLASS_BASE_DOC_ATTRS and YADE_CLASS_BASE_DOC_ATTRS_PY macros for python wrapping, including documentation (e.g. https://yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.Body). All classes should be converted in the future. 2. Remove global functions (diagDiv, componentMinVector, ...) from the wm3 wrapper 1. Add new python wrapper to a few more classes. 2. Make python's executable have real python path in the #! line at the beginning (that is, the same python interpreter used for running scons) 1. Fix body_id_t typedef (add includes) 2. Check body id when accessing ForceContainer from python 3. Override prefix in config.py already if YADE_PREFIX is set 1. Fix python docstring options for boost <=1.35 (hopefully) 1. Classes now warn at startup if they don't register &document attributes with YADE_CLASS_BASE_DOC_ATTRS & friends. 2. Add YADE_CLASS_BASE_DOC_ATTRDECL_CTOR_PY macro that declares, documents and initializes data members. 3. Add NaN to lib/base/yadeWm3Extra.hpp, which is std::numeric_limits::signalingNaN() 4. Fix syntax in a few python modules, away from the old obj['attr'] to obj.attr 1. Add detection & mention workaround for https://bugs.launchpad.net/ubuntu/+source/boost1.38/+bug/457688 1. Convert a few more classes to YADE_CLASS_BASE_DOC_ATTRS 1. Re-disable CInem{CNC,KNC}Engines (sorry, Jerome) 2. don't compile cxx main anymore; delete the executable from installation if present 3. Add help for --threads equali with OMP_NUM_THREADS 1. Moved all (most) unused files to attic/* (such as those that have YADE_REQUIRE_FEATURE(PHYSPAR);). We will not keep them there indefinitely (they are in the history), though. If you want to re-enable some classes, fix them and move them back (using bzr mv) to pkg/*. If I inconsciously moved some file that was being used, please fix it yourself (it is unlikely, though). Get rid of physpas a geometricalshape relicts in non-attic code. 1. Fix class registration macro without attributes (remove "cap" in Rpm LawFunctor as well) 2. Remove StretchPeriodicEngine, it was probably too complicated to be really used; remove yade.plot data reduction which was relying on StretchPeriodicEngine 3. Properly expose PeriodicEngine, PythonPeriodicRunner, VTKRecorder, FileGenerator to python 1. Fix python registration of CohesiveStateRPMRecorder (YADE_PLUGIN was missing for PeriodicEngine and Recorder, it seems). Thanks Anton. 1. Wrap many classes using YADE_CLASS_BASE_DOC_ATTRDECL_CTOR_PY and friends. 2. "Fix" problems with features=all (is rejected now, features must be written by hand) 3. Add |ystatic| sphinx role (for static data memebers) 4. Rename GLDrawCpmPhys to Gl1_CpmPhys 1. Wrap yet more classes with YADE_CLASS_BASE_DOC_ATTRS and friends. I strongly ask people to do the same for "their" classes (like Bruno for TriaxialTest and so on); I will not and it might make those classes unfunctional in the future. 2. Add documentation here and there, where it was lacking 1. Remove wm3 includes from everywhere, use lib/base/Math.hpp instead (in preparation to the eigen switch). Regression tests passed. 1. Remove a few forgotten files. 1. Fix empty display (improperly initialized drawMask) 1. Catch io exceptions in the gui 2. Detect io error and throw in IOFormatManager 3. Set config dir at startup, enabling use of logging.conf etc 4. Fix display issues we had. When not running script/xml from command line, yade doesn't display the controller (press F12 to have it). Let me know if this is OK or not. 5. Fix OpenGL initialization code. 1. Add bin with 0 interactions to _utils.bodyNumInteractionsHistogram, hereby fixing utils.avgNumInteractions as well (thanks, Luc) 1. Update comments in scripts/simple-scene-plot.py (thanks, Chiara) Document registration macros (will move to Programmer's manual later) (Add 2 more hyperlinks to ElasticContactLaw, once it serves as example for docs) 1. Remove some garbage 2. Make code partially compile with the wm3-eigen glue. (more fixes for wm3-eigen compat) 1. Fix compilation for per-class builds 2. Add manual wrapper for wm3 classes instead of the auto-generated one, to ease transition to eigen. Let me know if it broke something. Fix compilation error introduced in last commit; sorry. Fix setting # of OpenMP threads via -j switch 1. do not build miniWm3 at all if not needed 1. Document a few classes. Register TimeStepper with YADE_PLUGIN as it should be (that's the reason it wasn't reported as not being registered with YADE_BASE_DOC_* -- thanks Bruno for pointing that out) 1. Add #ifndef YADE_* feature handling to implicit build scanner (till now, it was only supporting #ifdef YADE_*) rename sphere{From,To}File to {ymport,export}.text for consistency. 1. Add scene->forces.sync() to several places Fix typo (Scene::force vs. Scene::forces). Sorry. Thanks to Chiara for reporting. 1. Add no-alignment macros to compiler command line directly, this fixes compilation with eigen, including the tt.py test and scripts/regression-testss.py 1. Fix plugin registration for CinemCNCEngine, remove some cruft, fix formatting, add hyperlinks. 1. Fix quaternion/vector initializers in NormalInelasticityPhys 2. Fix some eigen related macros 1. Add eudoxos.InteractionLocator and eudoxos.IntrSmooth3 for 3d smoothing of arbitrary quantities defined on interactions. 2. Adjust some docstring formatting 1. Doc fixes 2. Change prototype for Funtor::getFunctor, since it doesn't seem to work from python now (perhaps it's that Functors don't inherit from Functor in python universe, actually?!) 3. Fix some stuff with class indices for GenericSpheresContact. (It doesn't seem to help, though, either) 1. Fix instruction set (march) for debian packages 2. chunkSize=∞ if <= 0 1. Add docs at several places 2. Update debian/rules to run tests 3. Add funnel.py scripts/test/CundallStrackTest.py 4. Add more formats to SnapshotEngine (don't seem to work, though) 1. Add IntrCallback and BodyCallback (not yet really documented), for hooking into interaction loop in InteractionDispatchers and body loop in NewtonIntegrator (suggested by Bruno). Two real callbacks are defined, to compute summary (hence also mean) forces on interactions and bodies. Sample script is scripts/test/callbacks.py, but currently it crashes for reasons beyond my comprehension. 2. Remove Scene* ncb and similar stuff from everywhere, since all Engines have scene declared in the base Engine class and don't need it pass as arguments. Later, the prototype will be changed (Engine::action(void) etc). 3. Add docs here and there. 1. Eninge::action and Engine::isActivated no longer takes Scene* pointer. It must be set beforehand by the caller (done e.g. in moveToNextTimeStep). Please check for suspicious crashes. 2. Remove PartialEngine::applyCondition, replace by action just like other engines (https://blueprints.launchpad.net/yade/+spec/remove-partial-engine-apply-condition) 3. Resurrect JumpChangeSe3 engine 4. add py/_extraDocs.py for documentation of c++ classes/function written conveniently in python strings rather than c++ string literals. 5. Fix bug in Dem3DofGeom_SphereSphere, introduced when avoiding normalization of (0,0,0) vector; is OK now. 1. devirtualize BodyContainer and InteractionContainer (they use implementation from BodyVector and InteractionVecMap). There is some speedup. I ask people (you) to run some simulation with the older and current version and report what they observe on the ML. I had more than 2x faster in some cases (in debug mode, though). 2. Fix chunkSize=-1 linkage (is like setting it to infinity) 1. Set docstring format for yade.qt 1. Code cleanups, docs 2. Make sure we are able to compile with boost::serialization (loading/saving works now as well, but no compression yet; about 3x faster for saving and even more for loading) 3. Enable boost-serialization feature for debian builds 1. Don't create python proxy classes for those not using YADE_CLASS_BASE_DOC_* 2. Remove few deprecated things like O.bex and such. 3. Warn about object['attribute'] syntax 4. Add yade --update option, which will do in-place replace for deprecated class names. Run on scripts/test/*.py 5. Wrap ResetRandomPosition and PositionOrientationRecorder 6. Remove some olden scripts 1. Move SpherePadder from extra to py/pack/SpherePadder 2. Add py/pack directory, to avoid too many files in py 3. Other small fixes 1. Fix crasher in Ip2_FrictMat_FrictMat_FrictPhys (??) 2. Cleanup python code 3. Add feature gl2ps, hitting 'v' in the GL view will save PDF (seems to freeze on large scenes, but works nice on small ones) 4. Add special syntax for deprecated attributes. For testing, renamed Shape::diffuseColor to Shape::color. 1. Fix gl2ps, works even for larger scenes now. 1. Rename many attributes in OpenGLRenderingEngine, using the deprecated attribute framework 2. Add pickling support to Serializables (useless) 3. Fixes of docstrings here and there 1. Disable deprecated attributes handling for gcc<=4.2, which gives errors on that code. 1. Use BSP sort in gl2ps only if len(O.bodies)<100 2. Remove ClumpMemberMover, no longer used anywhere 3. Fix pack.regularHexa bug, reported by Nasibeh http://www.mail-archive.com/yade-users@lists.launchpad.net/msg01424.html 1. Uniformize accumulator interface for open and openmp-less builds. 1. Fix compilation of deprecated attributes for gcc 4.3 (thanks Jerome for reporting) 2. Re-add facet rendering code. 3. Add docs to predicates. 1. TriaixalStressController: originally compilation fix, but Luc was faster; Bruno, I tried to replace on c-array with boost::array; if that works, you could use it for other c-arrays as well 2. Add yield surface query function from python to Law2_..._Cpm 3. Make plot support label translation via yade.plot.labels 4. make chunkSize very small for debian; add strip for the optimized build 1. Fix action(Scene*) vs. action() virtuals (mass replace in attic as well), in TranslationEngine. Thanks to Nasibeh Moradi for reporting. 1. Add doc/references.bib, which can be references from docstring using [Author2008]_ syntax (note the underscore). 2. Added a few bibliography items to test, and changed relevant docstrings -- see e.g. https://www.yade-dem.org/sphinx/yade.wrapper.html#yade.wrapper.NewtonIntegrator.damping Add doc to SimpleViscoelasticPhys, add Jean-Francois' paper to both bibtex and SpherePadder's docs 1. add axis parameter to utils.uniaxialTestFeatures, to force strain direction 1. Import yade.plot when showing graph 2. Fix bibtex entry 3. Handle unseen interaction in InteractionDispatchers differently than with requestErase, as that will not work with certain colliders 4. Add from yade import utils to utils.py docstrings, and show full utils.sphere instead of sphere in session transcripts (thanks to Jerome for pointing that out) 1. Add toy grid-based collider (very slow) 1. Rename viscoelastic classes as discussed on the mailing list 2. FIx some docstrings. Fix weird crash http://www.mail-archive.com/yade-users@lists.launchpad.net/msg01482.html in glGetError() (disable error check) 1. Reorganize engines a little bit, as discussed in http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg03337.html and other messages in the thread (trivial to change, though) 2. Small fixes at different places 1. Fix https://bugs.launchpad.net/yade/+bug/539562 (thanks, Luc) 2. Fix import warning in yade.remote Fix monolithic build (#pragma once for BoundaryController and FieldApplier), sorry 1. Add importing native SpherePadder meshes 2. Fix LSMGenGeo interaction with our own type Sphere (in yade itself and in SpherePadder (HACK!!) 3. Fix sample scripts for GenGeo and SpherePadder 4. Allow both gengeo and GenGeo imports 5. Fix ymport.gengeo (shift vs. moveto) 1. Start filling NEWS for upcoming 0.5: do the same if you have some big things in mind 2. Fix hyperlinks in Gl1_Sphere doc 1. Make python return Vector2r, Vector2r, Vector3i, Vector3r, Quaternionr and Matrix3r by reference rather than by value; fixes http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg03406.html and was introduced by fixing https://bugs.launchpad.net/yade/+bug/539562. See explanation in Serializable.hpp. 1. Replace the ugliest code I've ever written by something more sensible. Still ashamed, though, please forgive me. 1. Completely remove HydraulicForceEngine which didn't exist in sources (removed by Bruno in previous commit) 2. Experimental binary io using boost::serialization 3. Some function in yade.eudoxos 1. Some preliminary work to make boost:;serialization work (MUCH faster) 1. Fix calling {pre,post}ProcessAttribute multiple times with boost::serialization. Fix unchanged name (Bruno, do you use scripts/rename-class.py, right? https://www.yade-dem.org/sphinx/prog.html#renaming-class) 1. Skip yade::ObjectIO for boost::serialization-less builds. (thanks Nasibeh for reporting) Fix Jerome's problem with boost 1.35 (don't compile code uselessly) 1. Fix cached values for cell and facet when modified from python 2. Fix table parsing for lines with 1 character onlyDynamic 1. Clarify error message i Law2 functor is not found (thanks, Chiara) 2. Make static attributes initialized by values provided in YADE_CLASS_BASE_DOC_STATICATTRS 3. documentation fixes here and there 1. Fix yade.plot broken in last commit 2. adjust interpolating-force example script 1. Adjust interpolating-force.py script; present for Chia 1. Fix boost::serialization and postProcessAttributes 2. Add scripts/test/serialization-benchmark.py for comparing serialization time/size (http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg03496.html) 3. Fix bug #557124 (hopefully) 4. Don't call postProcessAttributes on Facet in utils.facet, as that is called automatically when setting vertices now. Some eigen compatibility stuff Some more replaces After some text replaces (IDENTITY etc); removed MarchingCube 1. Replace things for eigen compatibility. See https://www.yade-dem.org/wiki/Wm3%E2%86%92Eigen for details. Code should not be changed functionally. Report if it is. 2. Remove PositionOrientationRecorder from everywhere. 3. Make the timestep entry behave differently: only when enter is pressed, it will change timestep. Fixes bug #394687 1. Forgotten fixes. REALLY fix bad end iterator on InteractionContainer (since r2092!!). UPDATE your code, this makes simulations little wrong (some interaction might be processed twice in one step). (Remove unnecessary aseerts in InteractionContainer.) 1. Remove some ToAxisAngle and FromAxisAngle as per https://www.yade-dem.org/wiki/Wm3%E2%86%92Eigen 2. Fix NewtonIntegrator using [i] on quaternions. 2. Add docs for VTKRecorder 1. Make controller a little more compact 2. JumpChangeSe3->StepDisplacer (does it sound ok, Chia?), MomentEngine->TorqueEngine 3. Fix a few docs 4. Disable building of CapillaryPressureEngine, it cannot work. 1. Change Wm3 interface so that it is eigen-compatible. Please let me know if there are regressions. 2. Fix body selection with python when no onBodySelect callback is defined 1. Some garbage removal 2. Fix assertion in NewtonIntegrator 1. Fixes for Eigen compatibility (compile with features eigen,nowm3) 1. Add forgotten file 1. Add docs for kineticEnergy 2. Complete wrapper for Eigen in Python (will be renamed from miniWm3Wrap to yade.math or similar later), passes scripts/regression-test.py now 1. Rename miniWm3Wrap module to miniEigen. Let me know in case of regressions (shouldn't be, unless you imported that module directly) 2. Add documentation to the eigen wrapper, document operators (https://www.yade-dem.org/sphinx/external.html#module-miniEigen) 3. Add custom converters from sequences for all supported vector types 1. Fix bug with facet import Luc reported (thanks) 2. Add None to separate y1 and y2 axis (instead of |||, which will still work, but is not documented anymore) 3. Add the possibility to plot multiple x axes with the save variable by adding spaces to the name in yade.plots 4. Rename TestWm3Wrapper to TestEigenWrapper 1. Add backward-compat to Cpm model if from external files 2. Complete the eigen wrapper 3. Fix some docstrings. Fix inplace operators. 1. Add Pournin article to references.bib 2. Fix some docstrings (still not clear) Fix DOI for Luc's article 1. Make yade compile with eigen by default. Use 'wm3' feature to compile with Wm3 instead (beware, you still need eigen installed) 2. Disable the possibility of ocmpiling with external wm3. 3. Add Identity, Ones, Zero, Unit{X,Y,Z} to old wm3 wrapper so that they can be used in python. 1. Fix O.tags with keys with spaces (historical relics) 1. Add forgotten ctor with kwargs to classes with static attrs (such as GL functors) 2. Update scripts/test/Dem3DofGeom.py 1. Fix facet wall vertices addition in TriaxialTest. 1. Fix O.tags tag update. Thanks to Anton for spotting the problem. 1. Change O.dt semantics (negative value activates TimeStepper) 2. Rename O.usesTimeStepper to O.dynDt 3. Remove several Omega wrapper functions that really pertain to Scene, adapt code accordingly. 4. Remove bunch of useless files from attic (mostly seem to have equivalents in our tree, or are obsolete WRT code structure) 1. Change O.dt as per http://www.mail-archive.com/yade-users@lists.launchpad.net/msg01767.html + update docs 1. Remove some old garbage code 2. Make Material::id read-only from python 1. Forgotten Scene #include in StepDisplacer, sorry. 1. Partial fix for clump eigen decomposition 1. Fix apparent clumps problems, spheres in the dogbone were getting through. 1. Rename groupMask to mask, change its default value to match that of Body::Body ctor (Bodies with 0 mask would not collide!!!!!!!!!!!!) and add to to waoll and box as well (please keep the interface the same for all 4: sphere, facet, wall, box). 1. Remove old sphinx docs before adding new ones. 1. Merge sphinx docs from https://launchpad.net/~eudoxos/+junk/ydoc/ 1. remove sdecGroupMask from functors (handled by the collider already) -- thanks to Chiara for pointing it out. Fix compilation error (Bruno, you must have been terribly tired today) 1. add explicit qt dependencies. 1. Fix scene pointer in CohesiveFrictionalContactLaw 2. add doc to utils.avgNumContacts. 1. Fix timestepper selection 2. Disable debuggin in Eigen (for higher performance with debug builds) 1. compile with package QGLViewer, if installed (package libqglviewer-qt3-dev) 1. Add Peri3dController, done by Jan and me during a rainy day 2. Implement memoizeDb for pack.randomPeriPack 3. add polar decomposition to Matrix3 in python 4. make the 3d view update even if there are no bodies 1. Fix bibliography path in generated docs 2. Fix bug #582679 hopefully (compile error with clean builds) 3. Add import gts to gts related function in yade.pack, to make the error message more informative 4. Rewrite scripts/debian-prep in python instead of shell 5. Add qglviewer to some versions in debian/control-template 1. Remove pause time from omega, avoids negative realtime 2. Fix some scripts in scripts/test 1. Avoid recompilation of the UI when already compiled 1. Tentative fix for the clumps bug 1. Re-enable PeriIsoCompressor and PeriTriaxController 1. Update docs for Peri3dController 2. Fix compiler warning 1. Adjust debian-related packaging files 2. Remove NullGUI for good 3. Remove non-DISPATCH_CACHE code (not used) 1. Fix a non-critical typo in the script 1. packaging fixes 1. Remove attic (use bzr co lp:yade -r2280 to get it) 2. Remove QGLViewer 3. Remove miniWm3 1. Remove wm3 sources 2. Remove #ifdefs pertaining to Wm3 1. make Body::isDynamic a method (and Body::setDynamic to change it), in preparation towards making dynamic equivalent to State::blockDOFs==State::DOF_ALL 2. make YADE_BOOST_SERIALIZATION and YADE_SERIALIZE_USING_BOOST #defined in all builds (will be removed later once the switch is complete) 1. Replace wm3-compatibility functions (component{Min,Max}Vector, angleAxisFromQuat, diag{Mult,Div}) with their eigen equivalents. 1. Fix stl import with different material ================================================== yade-0.20.2 Sat, Sep 19 21:41:52 2009 +0200 Anton Gladky (34): 1. This is my first test commit 2. Added some initial files for mining rocks classes simulation 1. Some changes in RockPM, still does not work good 1. Some small changes on RockPM.* files 2. Test SVN_2_email 1. Test 2. RockPM.* updated Changes on RockPM.* files 1. RockPM, first variant of "destruction mechanism" 1. Deleted euclid.py 1. delete euclid.py (fised Sconscript) 1. In utils.py alignedFacetBox has been changed to facetBox. It is now possible to create arbitrarily-aligned box composed of facets 2. Updated regular-sphere-pack.py 3. Some small changes on RockPM.cpp 1. RockPM update. Added simple "destruction mechanism" 2. Added scripts/installOnUbuntu.sh to make "oneButton-checkout+compile+install+doxygen+epydoc" script. Not tested yet. Requires corrections. 1. Updated some scripts according to new syntax 1. Added PressTestEngine for simulating presses. Can be used and for PointLoadTest simulations. 1. Updated simple-scene-graph.py according to a new syntax 2. Updated simple-scene-video.py according to a new syntax 1. Changes on PressTestEngine. Now it defines the destruction moment more precisely 2. YADE CONSOLE emblem shows now without upper row shifted. 1. Some small changes 1. All variables initialize in PressTestEngine and RockPm Some changes on News Fix compile error 1. Partly fixed 1. Almost fixed https://bugs.launchpad.net/yade/+bug/412892 Just 1 warning: Some changes in INSTALL file because of migrating to BZR Some changes on one-click-install script Added "warning" in one-click-install script 1. Fixes compiling error without openmp feature. 1. 418107, I guess it is more correctly. Some nonessential changes Blocked some warnings in RockPM.cpp Small changes Press Engine and RockPM changes Added demonstration of buldozer simulation "Thanks" and Thanks to Janek :) Fixes VTK-librabry dependencies for Ubuntu Some small changes on Buldozer 0.20.2 Bruno Chareyre (22): A wrong comment on contact laws in PFC3D is removed. svn update - no real change (in principle) - recovering from erased local file - Fix conflicts and prepare next implementation of isotropic compression - Few files missing in the previous commit. - Add a new class for computing/recording micromechanical data based on tesselation Still recovering from conflicted files... I hope this is the last one. A class with algorithm for analysing contacts-forces-displacements statistics. Using the triangulation lib. 1. Fixed a critical bug in ElasticContactInteraction (kn, was not registered and left undefined after loading a simulation). 2. Test if fn!=0 (i.e. contact exists) before adding kn/ks to the global stiffness. 1. "Water" classes are updated based on the code developped locally (but not commited for a while) by Luc Scholtes. 2. Triangulation code updated as well (not compiled by default). 1. Add a missing class (for the capillarity model), this fixes a compilation error in the previous commit due to the missing files. The "stopSimulation" command in the compression engine is now optional, as sometimes you don't want it to stop at all(1). The default behaviour of the compressionEngine is not affected, with autoStopSimulation=true by default. However, the TriaxialTest IS affected : it sets autoStopSimulation=false by default. 1. Update capillary files and add a new engine for them. 2. Prepare for removing old useless classes (typically some variants of engines with "water" at the end) Remove useless dependency. -Avoid crash when computing fusion number (it was using pointers to deleted interractions) FIXME : no distant meniscii for now due to deletion by the contact law. Base class for the solid-fluid coupling (E. Catalano PhD). -Register "thickness" so that sample dimensions are computed correctly (and not with 0 thickness) Dimensions could be 0 when "updateParameters" was called from TriaxialCompressionEngine before TTController::action Missing declarations in r1836. - cleanup : removing unused (and useless) "water" variants of engines - some cleanup in recorders too Update of the read/write functions for the connection with comsol. (coupling via Berkeley<->Grenoble mail servers! ;)) Missing declarations of member variables. Set default read/write behaviour as in Andrea's version. Feng Chen (1): This is viscous force damping, equation similar to http://en.wikipedia.org/wiki/Damping, damping parameters are controlled by betaNormal and betaShear, it is sometimes more realistic than the non-viscous (or say, local) damping. While using this code, please make a reference to: Janek Kozicki (54): ouch, forgot to mark INSTALL file as outdated. We need to update it. some cleanup in the files fix crashes of this->parentWidget()->parentWidget() in UI yade.cpp: more detailed info about compilation flags. LatticeExample: added material parameters bond zone between steel fibres and cement matrix update to use latest scons 1.0.0 don't refresh display when there's nothing to refresh support for generating multiple file with single NullGUI call add to SimulationController buttons for looking in different directions. The default view direction is now down along the direction of gravity. improved generation of steel fibres in lattice fixed snaphotNames in NullGUI for .xml.gz more configurable MakeItFlat, TriaxialTest can be now a biaxial test as well. small fixes in UIs make it compile with boost 1.35 (I wonder what 1.36 will bring) Fixed OpenGL problems with displaying spheres, which - never occurred on my desktop - I've seen them sometimes on other peoples computers, but never could reproduce them - but finally have appeared on my laptop. up direction on Y release 0.12.1 created nearly empty snow package: pkg-snow Snow stuff - generate grains made of layers according to voxel data read from file. And daraw it. forgot some files - make it compile with boost 1.34 - some snow improvements - another fix. now it really compiles with boost 1.34 1. TriaxialStressController reads radius from interactingGeometry Code wasn't compiling because of #include MicroMacroAnalyser - comment it out. 1. argh, guys. svn HEAD must compile. You didn't check your commits and then I waste 1h to fix that. See this commit, to check what I had to comment out about WATER - added keyboard shortcut '.' that toggles grid subdivision by 10 - fixed error with grid step - grid step is now shown in gl window small snow update another small snow update 1. small snow update 2. fix compilation error by Vaclav (hey, you didn't compile again before commit! ;p ) rename file to avoid case conflict with directory 1. GLViewer - when sth. is selected don't move it to 0,0,0 position, but use its original position. This is done by delaying assignment to the next call of draw() - added extensive comments to the polyhedron code which will be used for collisions small snow update maybe spheres won't disappear anymore? a placeholder for drawing snow interactions changed guards to #pragma once postpone creating a 3d view, until a file is loaded. That should hopefully fix the problem with the primary view being empty. added AUTHORS file, for the purpose of updating file headers. This was copied from http://yade.wikia.com/wiki/Authors Why do I have the impression that I'm adding this file a second time? After all it's referred to in almost all source files "See file LICENSE for details.", right? sort people in alphabetical order sorry for bumping up revisions.... Snow, as it is finished by me. Further work on it will to be done by next post-doc researcher who wants money from EU for working on this :) fix miniwm3 / full wm3 compilation error I forgot to add those, sorry. (I wonder how it could stay unnoticed for so long ;) add option for horizontal or vertical wires in fibre reinforced concrete. 1. correct display of lattice rods on 0th iteration 2. on/off switch for using different stiffness for tension and compression in lattice 3. fixed a bug in BodyRedirectionVector related to deleting of bodies 4. two more lattice examples 5. few more safety checks in lattice code 1. NullGUI was still usin .gz while thay are not supported anymore 2. small lattice update sanitize stupid numers in QtGUI, eg. 0.1299999999999 becomes 0.13 small fix after isNew and isReal are removed I'll update the code to use new contact logic. Add an option to display DOFs and body IDs in the OpenGL window - Lattice uses DOFs now - old implementation is still accessible by setting a flag backward_compatible, so that hundreds of my old FileGenerator files will still work - some improvements to recording strains and forces - fix all my warnings - lattice generator improvements wrt concrete with steel fibres - some improvements wrt to generation of densely packed aggregates and steel fibres in the concrete structure - testing command "bzr commit --fixes lp:414868" - fixing bug 414868 Fix stupid error introduced when we have migrated to bex container 1. get snow code to run, albeit still buggy 2. why dynamic_casts stopped working everywhere, that's a mystery to me 3. interactions isNew doesn't exist anymore, snow code needs update for this Jerome Duriez (9): Added : - Engines for simulating shear tests at constant normal displacement, normal stress or normal rigidity (CinemDNCEngine, CinemCNCEngine and CinemKNCEngine) for samples deriving from SimpleShear PreProcessor (added also, former DirectShearCis) - ContactLaw1 : a contact law with Moment Transfer and inelastic behaviour in compression : see comments. With correspondant Relationships and type of Interactions. NB : sorry for the name : i didn't search too long for a more explicit one but I think personly that the comments in the files (and I tried to put some) are far much better than the one - Add of the paragraph for the CL1Relationships, which was forgotten, in the corresponding SConscript A (last ?) error concerning last revision in the paragraph CL1Relationships : "CL1Interaction" does not exist, that's ContactLaw1Interaction -ContactLaw1 : correction of prototype of action() : it needed a body, whereas now action methods of Engines need a Metabody. This led the simulation to crash and is now fixed - SimpleShear : now all is normaly done so that this preprocessor could be used (with success) with this ContactLaw. Moreover it is now linked to the GlobalStifnessTimeStepper (instead of the ElasticOne) Suppress of some useful comments (sorry for the extra mail) (At last) The good Sconscript file - The GlobalStifnessCounter engine (for correct use of GlobalStifnessTimeStepper) was forgotten in the preprocessor SimpleShear... - Correction of the headers of two files "ContactLaw1Interaction" which were commited by me and not by Bruno - Some features of ContactLaw1Interaction were declared in ElasticContactInteraction. This was a mistake totally not planned (and the fact it was in svn also was not noticed) and is now corrected - End of the job by suppressing also the corresponding lines in .cpp... Luc Sibille (1): I added a new engine "ThreeDTriaxialEngine" to perform triaxial simulations with an independant control in stress or in strain in the three space directions respectively. In this goal, the TriaxialStressControlEngine has been sligtly modified to impose a different stress value or strainrate in each space direction. I hope I have broken nothing! Sergei Dorofeenko (32): 1. A new algorithm for facets. It use only a class Facet, so classes Vertex and Edge are deprecated and has been removed. 2. Add functions to python gui for import geometry from stl and for creating facets. 3. Add Shop::inscribedCircleCenter for calculate position of center of triangle inscribed circle (use it for set facet's se3.position). 4. ForceRecorder now take cary about old data files and renaming them. 5. SimulationPlayer now allow wire body form view tab. 1. ResetPositionEngine is now inherited from PeriodicEngine. 2. Add examples/rod_penetration model and geometry. small fixes 1. New random-access interaction container InteractionVecMap (rewrited from InteractionVecSet) 2. Fixes: default initialization some attributes in SCG and IS2IS4SCG Intermediate commit for SpheresFactory. Don't work yet. 1. New engine SpheresFactory 2. Add function engineByLabel to MetaBody 3. Add members to BroadInteractor. 1.First worked version of SpheresFactory engine. Example in examples/SpheresFactory 2.Added PersistentSAPCollider::probeBoundingVolume function (for using with SpheresFactory) 3.InteractionGeometryMetaEngine::explicitAction has been modified to remove artifical (as me seems) asserts. 4.python import_stl_geometry now return list of body ids instead only their number. 5.import stl geometry now allows import facets without BoundingVolume and InteractingGeometry. 6.Fixed dynamic_cast for BroadInteractor. 1. SpheresFactory allows now to create spheres in a convex volume. 2. SimulationController estimates total simulation time if stopAtIteration>0. 1. SimulationPlayer now allows to reload filters without reloading all simulation. 2. ColorizedVelocityFilter now allows to setup minValue,maxValue without reloading the filter. Fixed bug in RotationEngine: rotationAxis now normalized in action(), not in postProcessAttributes() ColorizedVelocityFilter counts a scale for each frame, without using previous min,max values. Class SimpleViscoelasticInteraction is renamed to ViscoelasticInteraction and is inherited from ElasticContactInteraction now. 1. Convert SimpleViscoelasticContactLaw to ConstitutiveLaw engine unit (Spheres_Viscoelastic_SimpleViscoelasticContactLaw). 2. SimulatonPlayer have now Display tab as one in SimulationController. 1. The experimental widget for drawing a color scale for colorized velocity filter. 2. Convenient python function utils.ColorizedVelocityFilter. Merging utils.*_v2 functions with their "first" analogs. Add two new filters: ColorizedTimeFilter and PythonRunnerFilter Migrate GravityEngines and ConstitutiveLaw to BEX_CONTAINER Convert STLImporterTest to ConstitutiveLaw (SimpleViscoelastic contact model) and NewtonsDampedLaw engine. Fix bug in serialization for ViscoelasticInteraction. Fix compilation error for InteractionHashMap Update contact logic for SpatialQuickSortCollider (hope, it's correct) Fix typo in PersistentSAPCollider 1. Remove zeroPoint 2. Add prefix ef2_ to Spheres_Viscoelastic_SimpleViscoelasticContactLaw Fix link errors fixed and updated some examples in keeping with last modifications Realise InsertionSortCollider::probeBoundingVolume() so SpheresFactory now works SpheresFactory now can create a spheres by python function. See scripts/test/SpheresFactory/model.py for example. Add export python module with VTKWriter class (very initial) to export data from YADE to VTK-based post-processing tools Added a c++ VTKRecorder (for spheres and facets) and new feature 'vtk' needed for it. Add colors rec to VTKRecorder Add default path for VTK Fix VTKRecorder headers Fix VTKRecorder headers Add VTKINCDIR to configure options for directories where to look for VTK headers Unknown (3): I added a new state at the triaxial compression test in order to realize isotropic compression by the walls displacement until a indicated porosity value. These modifications can be seen with generator file "TriaxialCompression" in the last three parameters (added). I corrected my errors on the triaxialtest files.Moreover, i added comments in the TriaxialCompressionEngine.hpp. The isotropic compaction into the TraxialTest is activated: 1)I have deleted the translationspeed parameter (now the translation speed of walls is the strainRate parameter) 2)I have activated the porosity parameter in the TriaxailStressController.cpp file Vincent Richefeu (42): - initialize radius in InteractingSphere constructor. - add new plugins used for membrane modelling. - add GLDraw plugin for BssSweptSphereLineSegment displaying - 'Membrane' (in fact geogrid) has been improved but still doesn't work... - the class GroupRelationData has been add (not used yet) to define interacting parameters such as coefficient of friction or restitution that have nothing to do in the bodies parameters (in my opinion) - forgotten files - add the soft mgpost for DEM simulation post-processing and visualization. - set menus in english mode A very quick guide for mgpost (usage and XML format) a forgotten file in mgpost/doc - add a new tool for sphere packing (still in dev) - some enhancement in mgpost interface - SpherePadder devel... SpherePadder devel... SpherePadder (devel: 5 steps ok) - SpherePadder update - add a basic 'user friend' interface for sphere packing generation. The module can of course be used without this interface. Speed enhacement for the SpherePadder algorithm. Add possibility to make PNG screenshots (using libpng) Add a DataRecoder that generate MGP files (only for Spheres for the moment). The MGP files can then be read with mgpost. - add a class based on CGAL for 3D triangulation. - Packing method enhanced (place 380000 spheres in less than 2 min) Fix some bugs and enhance the display of positive and negative forces Fix some bugs Begin devel. of densification process 2 files that were forgotten Simplify sphere shapes when if there number is increased Bug corrections (min and max radii) - overlap with spheres inserted by user -> bug fixed - Densification begins to work Increase the number of colors for the display of body's groupMasks from 6 to 10 We can now make the packing denser with a stop criterion based on the solid fraction or total number of spheres. Add BasicViscoelasticRelationships: an alternative to SimpleViscoelasticRelationships. It accounts for the effective mass of each contact and considere the parameter cn as a dimensionless ponderation of its critical value (computed for each contact). Parameter cs is set to zero for the moment. Add a boost.python wrapper (module packing) Add a function to SpherePadder_wrapper to pass the result back to python. As Vaclav suggested, it is a list of (x,y,z,R) tuples. (Complet integration into yade is not done yet) - Add 'HistoryRecorder' to save the sample and network state with a given time-step interval. - Correct a small bug due to the fact that a Clump cannot be casted into a GeometricalModel (and I don't know why!) Use the clump mass instead of clump-member mass for the determination of the effective mass. Ooops! There was a bug Add the function NormalRestitution2DampingRate. Add sphere reading for gdm-tk format Remove default linkage with libtiff (png is now prefered) Add an example of python script for SpherePadder Add GroupRelationData serialization (not used yet in *Relationships classes) This class serves to manage parameters between bodies depending on their groupMasks. Here is an example of 'command stream' in xml file to set the parameters: Just try to use GroupRelationData with BasicViscolelasticRelationships. Cast size_t to int in pow(double,int) function to avoid ambiguity for gcc (compilation failled on one of my computer) Some tiny modifications for Mac OS X compatibility (Does not compil yet). Some forgotten tasks replace gcc-3.3 by gcc in the Makefile.macosx of mgpost Václav Šmilauer (313): Move big news to NEWS, ready for release finally (?) Update INSTALL file from wiki (brief instructions only). 1. Reimplement some loop-intensive functions from yade.utils in c++ for better performance (as yade._utils, imported into yade.utils automatically - transparent to the user) 2. Add poisson's ratio and Young's modulus estimation in yade.eudoxos based on linear regressions of position→displacement mapping along different axes 3. Rename Shop::ElasticWaveTimestepEstimate to Shop::PWaveTimeStep, wrapped in yade.utils 1. Add python interface for blocking DOFs: b.phys.blockedDOFs=['z','rx','ry'] It is friendlier than b.phys['blockedDOFs']=1<<2|1<<3|1<<4. The property is read-write. 1. Add code for computing histogram of interaction directions in given plane in _utils. 2. This is code is used by yade.eudoxos.plotDirections() to create the actual (nice) figure. 1. Skip (almost) exactly zero projections, implement masking of bodies. 1. poisson and young estimator now works on a fractional part of the speciment 2. do not switch ui automatically if selected explcitly 3. body::maskOK to check mask 1. eudoxos module cleanups, young estimator arg chages 2. fix harmless compiler warning in _utils.cpp 1. add utility function to compute elastic energy within a volume (the dynamic_cast to NormalShearInteraction still fails; what is going on?) 2. add utils.fractionalBox, an AABB reduced to its fraction 3. fix fixmes in Force and Momentum about unused functions about to be deleted 4. plotting interaction direction histogram now works on contrained volume (to study boundary influence on the distribution) 1. Beginning hijacking SpheresContactGeometry to hold more elaborate geometry characteristics, such as relative shear displacement. By default, those parameters are neither calculated nor displated (exactRot==False; must be set to True in ISphere2ISphere4SpheresContactGeometry to enable it). Test script is in scripts/exact-rot.py 2. Remove deprecated code from UniaxialStrainController 3. Add GLUtils to draw lines, text, numbers -- copid over from Shop 4. Add operator<< for Quatrnions (axis angle) 5. Fix energy calculation in volume (in _utils.cpp) 6. Other fixes here and there... 1. The exactRot code is reasonably verified now to be functional, including rolling correction (SpheresContactGeometry::relocateContactPoints) and will used in brefcom soon. 2. Updated the "testing" script scripts/exact-rot.py, as a showcase as well. 1. Remove GL things from Shop, moved to lib/opengl/GLUtils.hpp 2. Cleanup of SpheresContactGeometry code, rename exactRot to hasShear (I thought most of this was already commited?!) 1. Delete unused IS2IS4DistantSpheresContactGeometry (merged with IS2IS4SCG), adapt existing code 2. Adapt new facet code to updated SpheresContactGeometry (only superficially tested) so that they can interact using BrefcomLaw; add scripts/exact-rot-facet.py to show that. 3. Fix a few missing loggers in others' commits. 4. SimulationController redraws if iteration changes (the +1 button would otherwise not cause redraw) 5. Remove cruft from Brefcom. 6. Fix inheritance (dynamic casts) of NormalShearInteraction and of BrefcomPhysParams 7. Remove cruft from UniaxialStrainer 8. Add some python code to compute stress from stored elastic energy. 1. Move interaction direction distribution pie histograms to utils 2. Add plotting histogram of number of contacts to plotDirections() 1. Omega().bodies.append can take list of bodies now (instead of just one body), returning list of added id's 2. utils.facet can take both tuples and lists for vertex coordinates 1. Add NormalInteraction::normalForce and NormalShearInteraction::normalForce (moved up the hierarchy from ElasticContactInteraction) so that unbalancedForce can be calculated on any subclassed interaction type. 2. Adapt Brefcom for this. 3. Add Shop::unbalancedForce and utils.unbalancedForce 4. Add workaround for saving ipython history as suggested by http://lists.ipython.scipy.org/pipermail/ipython-user/2008-September/005839.html 5. Fix AxialGravityEngine to register parent class attributes. 1. Avoid compiler warning in optimized builds from pyOmega 2. Body containers now allocate the lowest possible ID for each added body. The old behavior was to allocate the first free ID greater than the ID of the body, if it was already set. Please let me know if this is critical for someone. We can do things like: 1. 3d view now has by default a OSD with iteration number, simulation time and virtual time. This can be toggled (all combinations) by pressing 'D' (which used to mean toggling d+ynamic flag...?) and set also from python with GLView.timeMask='rvi' (Real,Virtual,Iteration) and so on. 2. Simulation player displays real time and wall clock loaded from db (insted of bogus values of system clock when the player is being run) 3. new periodic SnapshotEngine that takes snapshots of any GL view to numbered PNG files. 4. new function qt.makeSimulationVideo that makes video _while running the simulation_. 5. qt.createVideo renamed to qt.makePlayerVideo 6. Added Omega method to query computation duration. 7. An example of using qt.makeSimulationVideo is in new file scripts/simple-scene-video.py 1. Add forgotten SnapshotEngine 2. BodyRedirectionVector always really find the lowest unused ID (the same for BodyAssocVector) 3. add Omega().interactions.clear() in python 4. Move the "Less than 500 bodies, moving possible" to LOG_INFO instead of on-screen since it disturbs videos taken during simulation... A few fixes in TriaxialTest: 1. radiusStdDev is a registered attribute parameter 2. skip unloading phase if sigmaLateralConfinement==sigmaIsoCompaction 3. new bool autoUnload, that controls automaticity of going from compaction to unloading; autocompressionActivation controls from unloading to loading. Note: IFacet2IS4SCG is broken, but not yet fixed. 1. TriaxialTest now takes readiusMean argument (by default negative, i.e. disabled); if >0, box size is scaled so that both requested porosity and mean size can be preserved. 2. Attempt to fix computation of stress from stored elastic energy. 1. Fix adding empty engine if record wall stress interval <= 0 in TriaxialTest (bug introduced yesterday) 1. Add Interaction::swapOrder(), for use in EngineUnits that want to avoid calling goReverse() 2. SnapshotEngine can sleep specified number of msecs after shot, which probably can avoid some hw problems (make_current failed in mesa, freezes etc) 3. InteractingFacet2IS4SCG now works "correctly" (not exactly physically, though) with shear 4. DynLibDispatcher should report names of classes if dispatch fails. 1. Add InteractionGeometryMetaEngine::explicitAction and InteractionPhysicsMetaEngine::explicitAction for creating contacts manually using the dispatcher 2. add utils.createInteraction(id1,id2) that requests explicit transient interaction creation 3. Add sample ElasticContactLaw2 (in ElasticContactLaw.cpp) that uses new SpheresContactGeometry code and can be used for "persistent" (transient but not deleted by the collider) contacts. 4. Add Shop::applyForceAtContactPoint (applies contact force at contact point to both bodies (reversed for body2) and moments acting on their cenroids as well) 5. All the previous new functionality is demonstrated in scripts/chain-distant-interactions.py. 1. Add Omega().reload() 2. Create map Omega::memSavedSimulations, where simulations are saved if they begin with special sequence ":memory:" and can be loaded again, within lifetime of Omega. 3. Add Omega().tmpLoad() and Omega().tmpSave() that use the above mentioned thing. 4. add utils.readParamsFromTable that reads any python variables from text file (useful for automatic parametric studies) 5. Add less expensive routine for sontact point relocation in SpheresContactGeometry 1. Separate player into two windows (controller and the 3d view); the controller may be hidden with ::hide() (and ::show()) or with Alt-H from the 3d view. This allows for correctly restoring 3d view size. Closing any of the two closes the player. Please log crashes, if any. 2. Update QtGUI-python.cpp: runPlayerSession 1. Yade now runs TCP server at the first free port above 9000 (accessible from localhost only), which simulates python console. (let me know if you need this over network -- it is DANGEROUS, since someone can delete all your files etc without any authentication). The interpreter has its own namespace. 1. Fix crasher (under special circumstances) in PersistentSAPCollider (deletion invalidating iterator) 2. PeriodicEngine now takes nDo and nDone attributes, limitng number of activations 3. Fix minor things is BrefcomDamageColorizer, add normalized damage to BrefcomPhysParams 4. Fix some indents in Triaxial Fix stupid sign mistake when applying contact force in brefcom. 1. PythonTCPServer now generates random 6-letter cookie (password) at startup and authenticates all connections by that cookie. It can be retrieved from yade.runtime.cookie 1. Add Body().mask in python 2. Add PhysicalParameters().pos and .ori instead of ugly pp['se3'][:3] and pp['se3'][3:] 3. Add dmgPlane plot in brefcom 4. Do not delete renderer if we close the last view (loses all renderer settings) 1. Add a quick implementation of bending and torsion code to SpheresContactGeometry 2. Update ElasticContactLaw2 to use that code; stiffnesses are hard-coded for now. 3. Update scripts/chain-distant-interactions.py to show that that code really works 4. Plot residual strength instead of damage in brefcom 5. Add some functions for spiral projections (not correctly working yet) 6. Fix missing std:: in DisplayParameters 1. Add 2d weighted average smoothing abstract class and its specialization on symmetric gaussian kernel, with python glue of course. 2. Remove .gz support. 3. Fix some bugs in the spiral projection code. 1. Fix errors preventing compilation due to missing TesselationWrapper. !! IMPORTANT !! Introduced new dependency on "python-numpy" package (numpy/ndarrayobject.h header), which is now checked for by scons. Tell me if this is not OK! 1. Add initializers for all SpheresContactGeometry members, to avoid nan's in the .xml file 2. Add code for saving arbitrary python variables within the .xml file, see documentation on utils.saveVars() and utils.loadVars() 3. Fix error (hopefully) caused by dangling symlinks in the symlinked buildDir/include tree 1. Fix algebraic typo in max distance check. 1. Commit simple parametric study interface, documented at http://yade.wikia.com/index.php?title=ScriptParametricStudy and wrapper script to queue jobs, which is installed as yade-trunk-multi, yade-trunk-opt-multi and so on. 2. Examples of such parametric "study" added in scripts/multi.py and scripts/multi.table 3. MetaBody now create Omega().tags['id'] at initialization like '20081028T102950p15498' (date, time, pid) that is unique 1. Changed colors to be random by default on utils.{sphere,box,facet} 1. Make our intelligence-challenged deserializer finally gracefully handle nan, inf, -inf (arbitrary lower-upper case). 2. Fix crash in MembraneTest (leftover in the commit from testing, oh well) 3. Add TriaxialTest::fixedBoxDims to not scale selected box dimensions if sphere mean radius is given (example underway). 1. experimental support for Real==long double (#defines QUAD_PRECISION, scons quad=1). long double is not necessarily quadruple precision (not on IA32, at least) though, but is still more precise than double. (search "long double" on wikipedia) 2. Some preparation to compile with -std=c++0x (not yet functional) WRT and boost::shared_ptr vs. and std::shared_ptr 3. Fixed in yade-multi. 4. New direct oofenm exporter in yade.eudoxos. 5. Don't fiddle with termios in non-interactive sessions. 1. Add INTEGER (besides FLOAT) to the list of wrapped c++ types in python. Fix type detection for long double 2. Fix Real->double conversions in GLDrawBssSweptSphereLineSegment.cpp 1. Body().phys.refPos is directly accessible now (old way Body().phys['refSe3'[0:3]] still works, though) 2. Labeled engines are at load-time or when Omega().engines are modified assigned to variables __builtins__.label; for example Add forgotten file. 1. Add linear templated interpolation function working on 2 lists, t and values 2. Add InterpolatingRotationEngine that changes rotation speed as given by value table 3. Lower info about starting python thread to debug message only. 1. Rename REGISTER_SERIALIZABLE(class,bool) to REGISTER_SERIALIZABLE_GENERIC, add two macros REGISTER_SERIALIZABLE and REGISTER_SERIALIZABLE_FUNDAMENTAL. Changed all uses accordingly. 2. Added REGISTER_CLASS_AND_BASE(class,base) which performs REGISTER_CLASS_NAME and REGISTER_BASE_CLASS_NAME at once. 3. Added REGISTER_ATTRIBUTES (not trailing 'S'), expanding to void registerAttributes(){...}, and REGISTER_ATTRIBUTES_WITH_BASE, which prepends call to baseClass::registerAttributes() (specified as the first argument). 1. Added Se3Interpolator engine, with scripts/test/Se3Interpolator.py 2. Added from math import * to PythonUI_rc.py so that math functions are readily accessible everywhere 3. Implemented stopStrain in UniaxialStrainControlledTest 4. other small fixes 1. Modify REGISTER_ATTRIBUTES macro so that it work with or without base class given. Change all headers in core to use that. It should help us if we ever make the transition to boost::serialization. 2. User REGISTER_CLASS_AND_BASE instead of REGISTER_CLASS_NAME and REGISTER_BASE_CLASS in core and at a few other places. 1. Removed cerr garbage from glviewer (use LOG_DEBUG if needed) 1. Fix warnings in GLViewer 2. Add (35.4%)-style counter if stopAtIteration is set to the OSD in gl view 3. Add utils.downCast to downcast object to its derived class and copying all attributes. 4. Add utils.SpherePWaveTimeStep to compute critical dt from a few parameters only 5. Add routine to compute overall kinetic energy to Shop (indirectly to utils as well) 6. Add routine to sum torque (momentum) with respect to an axis from forces and torques on given set of bodies. Fix typo (compilation error in debug mode) in Shop::kineticEnergy 1. Fix a bug in rotation ode in SpheresContactGeometry. Now the code gives the same results as almost-for-sure-correct FEM code regarding strain computation. 2. Add label attribute to StandAloneEngine (inherits from Engine) omg (code cleanup, no functional changes) Exit once the simulation finishes; do not rely on simulation exiting itself. 1. SpiralEngine that does both rotation and translation along the same axis 2. InterpolatingSpiralEngine for variable rotation+translation speed (replaces InterpolationgRotationEngine) 3. scripts/test-spiral.py for rudimentary functionality testing. 1. Un-disallow (bug) having all dimensions scalable in triaxial if particle radius is fixed. 2. Don't record anything by default to file in UniaxialStrainer (only useful for debugging) 1. Add a few functions for integrating piecewise-linear functions in new module yade.linterpolation 1. fix damage colorizer (removed dynamic_cast causing segfaults on non-spheres) 2. InterpolatingSpiralEngine now takes bool wrap rather than Real period. 3. qt.makePlayerVideo takse startWait argument, which waits for Backspace before starting (useful for setting up the view manually); postLoadHook gets run afterwards now. 1. Add algorithm for pushing sphere always to the same side when in contact with facet, even under extreme stress where the sphere geometrically passes to the other side. 2. Add bool SpheresContactGeometry::initContactOnPositiveFacetSide for that 3. Add test/demo script for that. 4. Re-enabled GLDrawSphere::glutUse (cosurgi?) 5. Renamed yade.runtime.args to argv, to be consistent with sys.argv 6. Allow passing sys.argv (arguments to scripts) through QtGUI as well 1. Fix clip plane orientation inversion as well as wheel normal movement. 2. Clip planes not displayed at all unless one of the clip planes is being manupulated. 1. Unbreak bad type (list) for sys.argv[0], broken recently 2. Color bodies by residual strength rather than damage parameter (smoother) 3. Make player messages (maybe) better formatted omg... 1. Make player reuse existing renderer if there is one (allows setting Draw_mask etc before running player) 2. Add initRun parameter to PeriodicEngine (false by default), to run at the very fist run. 1. Make BrefcomDamageColorizer run at 0th iteration as well 2. Make player set stopAtIter to last iteration in db so that percentage is displayed in the output. Fix previous commit, overlooked. sorry. 1. Number lines in parameter table for multijobs from 1 (as text editors do) 2. Print short summary at the end of job log (when started, when finished, exit status, duration, commandline) 1. Fix logic typo in QtGUI (warning when there shouldn't be and vice versa) 1. logarithmic strain for Brefcom. 2. change sphere-facet algorithm such that it works on corners. Maybe no longer necessary, but it doesn't hurt now. scripts/test-sphere-facet-corner.py as provided by sega demonstrates that. 3. "from __future__ import division" in python init such that 3/2==1.5 and 3//2=1 (is default since python 2.6) 4. Global GL lock to avoid crashes/freezes with GL accessed from multiple threads concurrently. scripts/gl-test.py (which used to crash) now works with one view; 5. Properly lock/unlock on all gl ops in QtGUI-python.cpp, like setting view direction, resizing etc. 6. Fix wrong assertion in SQLite player 7. add Omega().resetTime to reset iteration number, virtual and real time. 8. Changed utils.loadVars/saveVars code to be more reliable. 9. Added utils.aabbExtrema2d 1. Lock GL when closing view. Seems to fix crashes / delays at exit 1. Contact sphere-facet must be deleted by the constitutive law once created. Let me know if that is a problem -- I think it is the way it should be in the future everywhere, though. 2. Fixes for boost 1.37 (boost::thread not fully compatible) 3. utils.basidDEMEngines (not tested yet) 4. Fix warning in GroupRelationData 5. add march switch to scons ('native' is default, but not supported by older compilers) 6. Prepend default CXXFLAGS so that user-defined ones (like warning suppression) come after the default ones and override those. 1. Tentative fix for newer scons, which links empty files (dummy plugins) with plain gcc and doesn't find default c++ libs to link with. 1. File not needed. 1. Beautify no-debug code in main 2. SpiralEngine now saves angle it has turned so far 3. Remove failing assertion from IFacet2ISphere4SCG (why it fails? it was a (I->isReal&&I->interactionGeometry)||(!I->isReal&&!I->interactionGeometry)...) 4. Improve the utils.spiralproject function to specify period (moderately tested, but seems to work) 5. Adjust locks in GLViewer. Fixes my crashes on nvidia for both player and 3d view (didn't dare to try 2nd view). Next step will be to move this lock to Omega and lock it when loading/resetting simulation etc. 6. Change theora video quality to 63 (maximum) instead of medium 32 in utils.encodeVideoFromFrames. Makes the video about 3x bigger. Two BIG changes: 1. Add ef2_Spheres_Brefcom_BrefcomLaw, is faster (!) 2. Fix locking in Omega, we don't get crashes when loading simulation with the 3D view enabled anymore (please report any further crashes in OpenGLRenderingEngine, that should be fixed) 3. Automatic update of Doxygen configuration file 4. Dem3DofContactGeometry, which should be in near future parent of SpheresContactGeometry and other new geometries providing normal and shear strains (SphereFacetContactGeometry, in my mind) 5. Add convenience function to apply force to contact point between two particles. (remove no-warn for c++0x since that flag is not known to gcc-3.4) 1. Add possibility to change container types from python (for benchmarks) -- code not yet tested! 2. Possible optimization in PhysicalActionVectorVector, now disabled. collider mistake hotfix 1. Make triaxial stop if !autoCompressionActivation and already unloaded. If this breaks something, please let me know, we can do it otherwise, but, for Cundall's sake, can we keep the same behavior for at least 6 months?? 2. SpatialQuickSortCollider will not delete real contacts, even if bodies don't collide. 3. Remove redundant attribute registration from SpheresContactGeometry fix typo in collider 1. removed persistentInteraction from most places; they are still present in MetaBody, but not serialized any more, most importantly (avoids warnings) and not GL-drawn. 2. Plugin loading loginc completely changes, the underlying macro YADE_PLUGIN has still the same interface. We used __attribute__((constructor)), __attribute__((visibility("internal"))) and anonymous namespace magic to get there. This will make it possible to put multiple plugins to a single shared library without touching the source, only fiddling with SConscript's. 3. PythonUI is interactive by default (it was not?? weird.) 1. Add new non-generic Bex container. For non-optimized build, it increased the speed by about 11% (9:35 vs. 8:49) as compared to PhysicalActionVectorVector. Users willling to go with the slower PhysicalActionContainer can compile with scons CXXFLAGS=-DNO_BEX now to get the old behavior. 1. Adapted TriaxialTest and ElasticContactLaw to BexContainer (switchable at compile-time). 2. Adapter GlobalStiffnessTimeStepper to BexContainer (GlobalStiffnessCounter code put to a function inside this one, hence that engine is not needed anymore). 3. Adapted Shop::Bex to BexContainer (probably not needed anymore?) 4. Exception is thrown in PhysicalActionVectorVector is used && built with BEX_CONTAINER (would most likely crash anyway). 5. transientInteractions and persistentInteractions are only references to MetaBody::interactions now. Removed extra loops in InteractionPhysicsMetaEngine and InteractionGeometryMetaEngine. 6. Remove including qglviewer into miniWm3, as it breaks compilation if using miniWm3 separately from yade (for testing purposes). 1. Define Janek's functions to convert from/to QGLViewer vector where they are used. 1. Add BexContainer (same interface, but separate implementation) in openMP flavor. 2. openmp=0 is the default for scons now (for some time), since openMP BexContainer gives about 7% slowdown and thus is not useful before at least some engines are parallelized as well. 3. Removed getting references to Force/Torque from BexContainer, since that breaks concurrency. Instead, addForce/addTorque must be used. If you need to read back with getForce/getTorque, you have to call sync() (expensive!!) beforehand, which will compute summary values for all bodies; if you forget, exception will be thrown. Note that sync() is invalidated at next write operation. 4. Adapted a few constitutive laws and other engines for the changes mentiones here. 1. Add time-profiling classes. See http://yade.wikia.com/wiki/Speed_profiling_using_TimingInfo_and_TimingDeltas_classes for details. It is accessible from python as well. 2. SimulationController no longer asks for output format. It just uses XML, the only available one. 3. Engine, EngineUnit have timingInfo member and pointer to optional timingDeltas. Timing is disabled by default, but it may still have some overhead in the order <1% perhaps (will test) 1. Forgotten file with yade.timing.stats() that pretty-prints some numbers. 1. Move all container to core, remove linking with them since it is not necessary 2. Fix things so that everything compiles (at least) both with and without BexContainer 3. Parallelize ConstitutiveLawDispatcher, InteracionPhysicsMetaEngine and InteractionGeometryMetaEngine with openMP if enabled on command-line 4. Make InteractionVecMap default container for interactions; necessary for parallel code. 1. New InteractionDispatchers class that has one common loop for InteractionGeometryMetaEngine, InteractionPhysicsMetaEngine and ConstitutiveLawDispatcher. It can be used from python like this: 1. Adapt ForceEngine to BexContainer 2. Add BEX_CONTAINER and YADE_OPENMP flags to be reported by -h. 1. Add two more forgotten headers. They are not used anywhere, though, and will be removed later. 1. Enhancement of utils.box from Marco. 1. Make Shop load 4/5/6 columns text files for spheres (and skip 5-cols) 2. Change evaluation of args in readParamsFromTable to be able to pass strings better (single quotes) and consistently 3. Parameters passed as env. vars by yade-multi are prefixed with ! 4. fix typo in timing for resetting timers. 1. Make the yade-multi scheduler multithread-aware. 2. Add the collider performance test as example 3. added utils.replaceCollider(anotherCollider) for convenience 4. added Omega().isChildClassOf(classNameChild,classNameParent) 1. Fix collider-perf (TriaxialTest has hardcoded dt=0.001 !!!!), set timestep by hand at first 2. Fix Shop:: loading spheres from file (regression from yesterday) 3. Add functorCache to Interaction and to InteractionDispatchers. About 5% improvement, but not yet finished. 4. Add DynLibDispatcher::getFunctor2D 5. Add BexContainer::sync() to other places in triaxial (thrown otherwise) 1. Fix old rename of runtime.args to runtime.argv in default-test.py. Should run OK now. 1. Fix for the compile error in snow for OrthogonalPlaneFit3. It still misses pkg/snow/Engine/ElawSnowLayersDeformation.cpp in the repo. Compile with exclude=...,snow as workaround. 1. Rename BroadInteractor to Collider. 2. Move some part of the contact logic to this common base class. The Collider::handleExistingInteraction is subject to discussion and not yet used. 1. Small fix in the collider code. 1. Remove SAPCollider completely 2. Make yade log4cxx 0.10 compatibile 3. Other minor fixes 1. Fix linking of realtime-rigidbody WRT PersistentSAPCollider 1. change default xiShear to 0 instead of NaN (is not used anyway) 2. Fix linking of mass-spring in cliean build 1. Fix #include's that include files not in the current source directory via "". 2. Add scripts/linkdeps.py that can automatically determine what plugin links to what other plugins, which can be once used for configurable monolithic/pluggable builds etc. 1. Fix crashed in TriaxialTest introduced by me a few days ago (referencing engine before being created) 2. Add simple (working?) memory usage query to utils and collider perf test. 1. Fixed collider performance benchmark 2. Added script to generate graph from log files (like http://yade.wikia.com/wiki/Colliders_performace) 1. Added SpheresContactGeometry::updateShearForce, will be used (not activated though yet) by ElasticContactLaw and other. hotfix related to last commit 1. Initial checkout for the DemXDofGeom classes (will contain the hasShear code from SpheresContactGeometry and more eventually). 1. Preliminary version for sphere-facet collisions with total formulation (moderately tested). 2. Same for sphere-sphere collision. 3. test script for facet-sphere collision geometry. 1. Use local foreach.hpp if not found in the system 2. Use local file defining boost::python::len for boost<1.34 1. remove explicit linkage to boost_python in gui/SConscript Forgotten empty file. 1. Remove logger from ClassFactory 2. Cleanup logging stuff in main (use constructor function, among other) 3. Cleanup system exit from python in PythonUI_rc.py 4. Add SpheresContactGeometry::updateShear that can be optionally used with ElasticContactLaw to update shear displacement instead of updating shearForce. triax-identical-results.py show quite large difference between both implementations, but I am not able to tell which one is correct. scripts/test/shear.py shown almost no difference for 2-sphere scenarios, modulo differences at 15th decimal place or so. 5. Remove debug output from BexContainer 6. Remove warning about meniscus data from CapillaryCohesiveLaw (warning is given in postProcessAttributes now, i.e. iff the class is actually used) 7. Add logger to snow. 8. Removed shear computation code in ElasticContactLaw, use SpheresContactGeometry::updateShearForce. 9. Fix scons deprecation warnings 1. Add functions to augment forces/torques in BexContainer. 1. Remove some garbage from SpheresContactGeometry 2. Verify that SCG_SHEAR doesn't alter behavior if ElasticContactLaw::useShear is false 3. Implement SCG_SHEAR for sphere-box interactions 4. sphere-box interactions no longer call goReverse, but swap interaction order instead, as facets do. 5. Fix triax-idnetical-results.py to reload generated initial config to avoid rounding issues of sphere coords in text file. Minifix: link core with librt (clock_gettime) for platforms that require it 1. Add rate-dependent damage to normal and viscoplasticity to shear components of Brefcom (not yet tested, just compiles); other cleanups there. 1. add addF and addT to legacy ActionContainer Add label attribute to engine units. Python wrapper updated. 1. Rate-dependent fixes (more to come) in brefcom. 1. Remove MetaBody::physicalActions if compiling with BEX_CONTAINER (default) 2. Make everything work with both BexContainer and deprecated PhysicalActionContainer 3. Change PhysicalActionDamper, PhysicalActionDamperUnit, PhysicalActionApplier and PhysicalActionApplierUnit to dispatch only according to PhysicalParameters (not PhysicalAction anymore). That means that only one unit will be called for each body and that NewtonsMomentumLaw has to do the job of NewtonsForceLaw as well (same for CundallNonViscousMomentumDamping). 4. Fix (finally) defaultDt computation in TriaxialTest (forgotten assignment to defaultDt in the GlobalStiffnessTimeStepper) 5. Fix (finally?) timestep manipulation form within the QtGUI. If reloading the same file, timestep settings will be preserved, otherwise those saved in the XML are used. 1. Create ef2_Spheres_Elastic_ElasticLaw that has the ElasticContactLaw algorithm 2. ElasticContactLaw now merely calls ef2_Spheres_Elastic_ElasticLaw. 3. TriaxialTest::parallel controls whether to use InteractionDispatchers or not. 4. Added examples/triax-perf to show the impact of that. Also see http://yade.wikia.com/wiki/Triaxial_Test_Parallel 5. Fix a few compilation issues. 6. Flush stdout before exiting from main, so that in case of crash upon exit (log4cxx?) we have all messages output. 1. Hotfix for 2 issues with ElasticContactLaw 1. Remove all traces of physical actions: 1. Remove Shop::Bex (no longer necessary) 2. Add InterpolatingDirectedForceEngine for Roger (not yet tested!) 1. Fix linking of ForceEngine with interpolation 2. Random rate-dependent things. 3. Typo in BexContainer docs 1. A few fixes in Brefcom. 2. Make python wrapper correctly handle long long attributes. 3. Added test script for InterpolatingDirectedForceEngine 1. MAJOR change in python syntax (backwards-compatible, though): through small bit of very dirty code, classes can be instantiated as python objects with keyowrd arguments, i.e. instead of 1. cleanup UniaxialStrainer code, add vars to control length of the acceleration phase and the ability to set absolute speed 2. EngineUnits within InteractionDispatchers can be labeled and accessed from python now. 3. A few minor things in the plot module 1. Remove cruft from brefcom, a few fixes there 2. Add gnuplot grid to gnuplot by default 3. Fix speed in USCT 4. Fix InteractionDispatchers traversal in pyOmega 1. Fix weird python problem if LIBS is not defined by distuils (?) 1. Add working version of facet adjacency finder (to get their mutual angle at edge) 1. Parallelize initial bound filling in PersistentSAPCollider. Gives almost 3x speedup for the first step. 2. Fix missing headers so that it compiles with g++-4.4 (in QGLViewer) 3. FacetTopologyAnalyzer works (not tested extensively), questions of where to put topology data for InteractingFacet (will be raised on yade-dev) 4. Test script for FacetTopologyAnalyzer. 1. Remove leftover var in PersistentSAPCollider 1. Add preliminary gnuplot plots merging facility to yade-multi 2. Fix yade.log module so that it also works without log4cxx (and gives 1 warning) 3. Switch to new syntax in scripts/plot.py 1. Fix race condition in brefcom (omp critical section) 2. Remove -ffast-math from optimized build, since NaNs do not work properly (e.g. isnan(NaN)==false!) 1. Fix bug in FacetTopologyAnalyzer algorithm 2. Add angle info to InteractingFacet (not yet used) 3. Add triangulated sphere test for FacetTopoloyAnalyzer to facet-topo.py 4. Fixes in rate-dep in brefcom 1. Add approximate viscosity equations to brefcom (not working) 2. Fixes in yade-multi 1. Finish implementation of Dof3DofGeom_FacetSphere (with plastic slip as well) 2. Adapt Brefcom optionally to Dem3DofGeom 3. Add d0fixup to SpheresContactGeometry to get correct normal strain in sphere-facet contact with fictive sphere (zero for sphere-sphere) 4. Finish FacetTopologyAnalyzer; angle usage in Dem4DofGeom_FacetSphere not yet tested. 1. Remove cruft from UniaxialStrainer, add the ability to set initial velocities to suppress inertia at the simulation beginning 2. Jobs in yade-multi can be automatically named after variables suffixed with ! 3. yade-multi now shows and updates automatically some statistic on localhost:9080 using http 1. Finish Dem3Dof for both spheres and facets, migrate Brefcom. Removing stuff from SpheresContactGeometry is on schedule, once thorough testing is finished. 2. Fix attribute inheritance for a few engine units 3. Add ef2_Dem3Dof_Elastic_ElasticLaw, which works like ElasticContactLaw (but faster ;-) ) 4. Remove BrefcomLaw, keep just the constitutive law as functor. Adapt sample generators for that. 5. Add hydrostatic confinement to brefcom (isoPrestress), remove viscApprox. 6. Add interface for querying and setting (doesn't work yet) number of openMP threads 7. Job description is taken from columns suffixed with ! or by combining all parameters 8. Add function for plotting yeild surface of brefcom to the eudoxos module 9. Oofem export now uses reference (starting) positions of particles as it should 10. Add "-" before profile name when generating default variant suffix in scons (which is expected) Fix comp9ilation error for Janek. 1. Add python wrapper for clumps, see scripts/test/clump.py on how to use it (O.bodies.appendClumped) 2. Fix clump support in NewtonsDampedLaw (damping is quite wrong, it seems...; Bruno, any ideas on that?) 3. Move clump to pkg-dem (even though it depends on extra/Shop) 4. Remove absolute shear computation from SpheresContactGeometry, as Dem3Dof works fine now and Brefcom will not use SCG anymore; adapt a few other classes to that; remove ElasticContactLaw2 that was using it. 5. 1. Warn in --version if -ffast-math was used 1. Fixing bug in TriaxialCompressionEngine (introduced by luc apparently). Big changes: Handle boundingVolume-less bodies gracefully in InsertionSortCollider 1. Add utils.regularSphereOrthoPack by Anoton Forgotten showcase. 1. Add InteractionContainer::requestErase to hint colliders that wouldn't otherwise see !isReal interactions. 2. Use this logic in InsertionSortCollider, PersistentSAPCollider, SpatialQuickSortCollider (noop in the last one) 3. Add InsertionSortCollider::sortThenCollide to make it behave as non-persistent collider (for debugging only?) 4. Add Interaction::reset() that has common initialization code. 5. Assign zero inertia to utils.facet (better than uninitialized binary garbage) 6. Fix contact logic in Brefcom, finally I get the same results with InsertionSortCollider as with SpatialQuickSortCollider on large simulation (more fixes to come) 7. Do not install pkg-config; fixes compilation error reported by the build bot. 1. Use bitfield instead of bools in InsertsionSortCollider 2. Revert accidental changes in insertion-sort-collider.py 3. Add function for using renamed classes from python with warning Getting rid of the Brefcom name, classes renamed as follows (moving files around will follow) 1. Add logic to scons to delete files that will not be installed in this run but are on-disk. This should make it unnecessary to remove files by hand. In the same way, disable implicit target cache which was making problems if files shuffle around. 2. Remove Brefcom* files, move to pkg/dem/ConcretePM.?pp. (not sure what other place, since it contains Engines, DataClasses etc in one file that I would refuse to break.). 3. Add detailed comments on ConcretePM to the ConcretePM.hpp 4. Remove extra/usct, moveUniaxialStrainer and put to pkg/dem; move SimpleScene from extra to pkg/dem 5. Remove core/yadeExceptions.* 6. Remove Preferences::dynLibDirectores and Preferences::version. Omega now recursively searches the lib directory for plugins and loads them. preferences.xml has only defaultGUILibName now. Finally. Remove baseDirs and other cruft from DynLibManager. 2 forgotten files (separated from UniaxialStrainer before) 1. Fix hopefully last relict of pkg-config 2. Degrade deleting non-existent interaction from fatal erro to warning only (not sure where that can come from, though.) Solve the cause of nonexistent interactions being deleted (after O.interactions.clear()). Make warning fatal error again. 1. Remove Interaction::isNew, Interaction::isReal. Add Interaction::isReal() which test for presence of _both_ interactionGeometry and interactionPhysics and Interaction::isFresh() which checks the interaction creation timestamp against current iteration. Updated all code for that. Please verify that your stuff works, it is possible I made some mistakes! 2. All code saying isReal=false replaced by interaction->requestErase(id1,id2) 3. make requestErase thread-safe 4. Add interace for traversing interactions pending erase (template) 5. Add TriaxialTest::noFiles and TriaxialCompressionEngine::noFiles to not generate any files (default: off) 6. Add predicate utils.ptInAABB(p,minPt,maxPt) 7. utils.spheresToFile return number of spheres written (instead of None) 8. Add examples/concrete/pack to generate packing; other stuff in concrete will follow, with simplified version of the cpm model in ConcretePM. 1. Syntax fixes in ConcretePM model 2. Interactions will be deleted also if the ye4xist, but geometry functor fails (returns false) 3. Add utils.approxSectionArea, utils.spheresFromFileUnixial (get some parameters useful for uniaxial tests from the sphere packing, such as cross-section, principal axis, etc) 4. Add lib/computational-geometry/Hull2d.hpp for computing convex hull in 2d using Graham scan algorithm (I know it is in CGAL already, but I don't want to depend on that commercial stuff) 5. Remove some unused stuff from utils. 1. Add epsNPl to Cpm 2. Replace vector by Vector2 and make it properly serializable (should be faster) 3. Add function to compute forces on interactions crossing plane. 4. Replace custom xcombine function by itertools.product in grid sphere packing Fixes and cleanups in the CPM code. Add new 'feature' to scons called openGL, which is on by default. Qt3 GUI will not be built without openGL. YADE_OPENGL is defined in openGL-enabled builds. Sconscript files adapted to skip GL plugins or GL parts of plugins. 1. Fix missing libs for linkage 2. Fix a few typos 1. Don't link core with glut (is there a reason for that?) Do not include X11 headers if without opengl 1. Move all python modules to PREFIX/lib/yadeSUFFIX/py/yade instead of */gui/yade 2. Add pack module for generating regular packings (thanks to Anton Gladky for his ideas & code) 3. Add _packPredicates module for solid inclusion testing. 4. Update regular-sphere-pack.py to test new packing features. Remove leftover reularSpheresOrthoPack from utils. Is in yade.pack now. Add pack.inHyperboloid predicate. Should be useful for cylindric specimen in uniaxial tension, but with the middle part having smaller diameter. Added to the test script as well. 1. Fix (hopefully) clump damping 2. Remove unused code from InsertionSortCollider 3. Make SimulationController NOT change timestep (rounding) by just opening it (!!) 4. Fix paths in PythonUI and lib/SConscript for $PREFIX/yade$SUFFIX/py/yade instead of $PREFIX/yade$SUFFIX/gui/yade 1. Add resetting interactionGeometry and interactionPhysics to Interaction::reset(), as it should be... 2. Small things in CPM 3. Add GaussAverage.data method to python (for debugging and plotting) Include Python.h in PythonRunnerFilter. Build this plugin only with EMBED_PYTHON. A few changes to allow run primarily python with qt3 on the top of that (open, close etc as needed). This paves way to running main yade process in python ;-) (just kidding, for now) 1. Handle groupMasks of bodies in InteractionDispatchers directly (not in geometry functors etc). 2. Fixes for qt3 started from within python 3. Add Body().dynamic flag to the wrapper, instead of using Body()['isDynamic'] all the time. Anton's new things: axis-aligned ellipsoid predicate and fix in pack.regularHexa. 1. Add external euclid.py module (suggested by Anton, thanks!) to our installation 1. Propose *.sqlite ending for saved simulations instead of * in the player Fix error-tolerant law which uses no interactionPhysics: add void Interaction physics in the geometry functor if returning true, to make Interaction::isReal return true. (Shouldn't we remove ErrorTolerant...? Does it have some serious use?) 1. Remove constructor priority for log4cxx to avoid syntax unsupported by gcc<=4.0. 2. Remove some commented cruft from FrictionLessElasticContactLaw 1. Add boolean operators on solid predicates (&,|,^,-), shown in scripts/test/regular-sphere-pack.py 2. Add notch predicate (not functional yet) 3. Add utils.alignedFacetBox to create hollow box from facets. Shown in new file scripts/test/facet-box.py 1. Update simulation filename in controller periodically 2. Fix notInNotch predicate, use infinite AABB for unbounded solids and raise exception in the packing generator if such is encountered. 3. Add notch to the head of regular-sphere-pack.py guy 1. Add checks for GTS (optional) 2. Add pyGTS to our tree (built only if needed), since no packages are available. 1. Fix corner case in InsertionSortCollider related to instability of std::sort (quicksort) and bodies having the same upper and lower bounds (facet in the xy plane, for example). Thanks to Anton for providing the crasher. Fix feature macro definitions (typos) 1. Add GTS surface predicate 2. Add example of sphere horse falling onto facet horse in scripts/test/gts.py (try it!) 3. Predicate difference now takes padding in the inverse sense for the second predicate (logical) 4. Attempt to enable lightning on facets (no effect :-( ) 1. Add coarsened horse geometry for the example gts.py 1. Rename ef2_Dem3Dof_Elastic_ElasticLaw to Law2_Dem3Dof_Elastic_Elastic (in scripts as well) 1. Make virtual methods on pack.Predicate work in python (inGtsSurface, for instance). Add scripts/test/gts-operators.py to show that. 2. Move scripts/test/gts.py to gts-horse.py 3. Add a few functions to pack for constructing triangulated revolution surfaces from meridians. 1. Padding support (though slow and not very precise) for pack.inGtsSurface 1. Fix crashers in InteractingMyTetrahedron* classes (introduced by me when updating interaction logic) 2. Reimplement inGtsSurface in c/c++ which makes it faster due to pygts interface limitations (addressed on pygts mailing list meanwhile), but is dirty programming. 3. Set CCOMSTR to correspond to CXXCOMSTR in SConstruct (to show nice line when compiling c source file, for pygts) 4. Set good-looking timestep in the TetrahedronsTest generator 1. Add triaxial packing generator, with optional memoization to sqlite database to avoid generating packing if there are suitable ones (same parameters/scalable to same parameters) available. Sample script will be provided soon. This allows for filling arbitrary (gts-defined, for example) volumes with irregular, high-quality sphere packing. 2. Add python-wrapped class SpherePack for manipulating sphere packings (loading, saving, spatial transformations, iterating) 3. Add shared_ptr Omega::rootBodyAnother to be used with Omega().switchWorld() 4. Move some stuff from gui/py to lib/py, which is more logical hopefully 5. If negative value is specified for TriaxialTest::thickness, wall thickness will correspond to the mean sphere radius (avoids spheres going through the walls during compaction for some radii) 1. Add automatic converter from python::tuple to Vector3r and vice versa. Wrapped functions can take/return Vector3r directly instead of manual conversion. Clean code that had to do that. Let me know if something breaks, the changes should not touch any python code. 2. Some preliminary work on wrapping Vector+Quaternion classes in python via py++ (not enabled, just the files are there) 3. Add forgotten _packSphere.cpp, thanks to Vincent for reporting. 1. Add scripts/test/gts-traix-pack.py to demonstrate triaxial packing generator. Remove useless include in GlobalStiffnessTimeStepper. 1. Fix STUPID (my fault, sorry!!) mistake in setting Interaction::iterMadeReal, which cause ElasticContactLaw to function wrong. It concerns a few other contact laws calling isFresh, which would return true as well. Sorry again. 1. Shuffling stuff around, moving most python things to py/ 2. Wrapping Vector3r, Quaternionr and Vector2r in python directly, see scripts/wm3-wrap.py 3. Change the way utils.box, utils.sphere and utils.facet works: arguments to physical parameters are passed as keywords, not as dictionary now (update your old code by passing **dict instead of dict as the last argument) 4. Fix a bug with useShear, now getting almost identical results for triaxial again. 5. Preliminary Triaxial::facetWalls, to be able to used Dem3DofGeom with Triaxial. (not fully functional yet) 6. TriaxialStressController::thickness is -1 by default now (get thickness from box width), as 0 is real value for Facets. Doesn't change beahvior in any way. 1. Update triax-perf.py 2. Add Omega().tmpToString returning string of :memory: saved simluation 1. add yade.plot.resetData(), which unlike reset() resets just data 2. Add scripts/test/compare-identical.py to run 2 simulations at the same time and check at every step (configurable) if they differ or not. 3. Add active=active line to GlobalStiffnessTimeStepper, which for some reason causes two same simulations to be the same. Any explanation someone?? 1. Add forgotten py/SConscript (sorry!) 1. Fix absolute path generated by py++ 1. Dump XML in ConcretePM in case of problems (nan's) 2. InteractingFacet::postProcessAttributes gives FATAL message if there are coincident vertices 3. Update triax-perf, add script and openoffice sheet to make table 4. InsertionSortCollider is used in TriaxialTest always (not only with fast) now. 1. Change prototype of Engine::isActivated() to Engine::isActivate(MetaBody*) 2. Add maxVelocitySq to NewtonsDampedLaw for analysis purposes 3. Add BoundingVolumeMetaEngine::sweepTime and ::sweepDist to sweep bounding volume by given predicted motion over time or by given absolute distance. 4. Add strided run support to InsertionSortCollider (using sweeping) 5. Add scripts/test/collider-stride-triax.py to play with the strategies of sweeping based on strides 6. Add O.interactions.countReal() 1. Fix collider-stride.py to match changed parameters. (it is quite useless now, anyway 1. Make NewtonsDampedLaw compute maxVlocitySq at every step anew. 2. Make InsertionSortCollider find NewtonsDampedLaw and get max speed from there. Together with InsertionSortColider::sweepLength, this makes stride adapted automatically to maxVelocitySq; this will described at http://yade.wikia.com/wiki/Insertion_Sort_Collider_Stride. 3. Update test script for that. 1. Handle clumps in a better way in NewtonsDampedLaw (only if asked by the clump itself) -- future parallelization work. (related to bug #398086) 2. InsertionSortCollider now knows when to run based on maximum distance the fastest body could have travelled. (It is actually the physical meaning of sweepDistance). Handle varying maxVelocitySq in a constitent way. 3. Add InteractionContainer::serializeSorted to sort interactions by id1 and id2 before serializing (useful for comparing XML files). Added Interaction::operator< to compare 2 interactions in that way. 4. Fix openMP strategy in InteractionDispatchers to "guided" (as per https://blueprints.launchpad.net/yade/+spec/omp-schedule-strategy) 1. Remove doc/removed, it is in SVN history 2. Tune debian scripts to install docs+examples+scripts instead of headers (targets https://bugs.launchpad.net/yade/+bug/398174, but not yet finished) 3. Add depends on python-numpy instead of python-scientific packages for debian 4. Add ../py directory to doxygen (targets bug #398190) 1. Change NewtonsDampedLaw to a StandAloneEngine 2. add .updateExistingKeys (perhaps should be updateExistingAttributes) to all python-wrapped yade objects, which will change only existing attributes from given dictionary 3. Adapt STLImporterTest to new nicer syntax. 1. Add virtual destructors to all EngineUnits so that they can by dynamic_cast'ed to. This fixes possible crash from python, bug #398255 2. Rename updateExistingKeys to updateExistingAttrs, add updateAttrs. 3. Add forgotten script to demonstrate predicate operators 4. The default debug level is -ggdb2 (instead of -ggdb3). Libs are about 60% in size and still give the same debug information. 1. Rename scons option arcs to PGO (profile=guided optimizations) 2. Install only binaries by default (no docs, must be requested from cmd line via path) 1. Various fixes related to generating debian packages 1. Fix EngineUnits linkage for SImpleViscoelasticRelationships 1. Add velocity binning for collision optimization: requires cooperation of NewtonsDampedLaw, BoundingVolumeMetaEngine and InsertionSortCollider. 2. Remove time-based sweeping from BoundingVOlumeMetaEngine. 3. QtGUI doesn't show annoying warning when run from python session anymore. 1. Parallelized NewtonsDampedLaw (scales very well) 2. Parallelized VelocityBins 3. Add const modifier to BodyContainer::size 4. Add virtual dtors to PhysicalAction{Damper,Applier}Unit (for dynamic_cast'ing) 1. Move NewtonsDampedLaw to StandAloneEngine directory 2. Add omp critical to ConcretePM 3. Remove SphericalDEMSimulator 1. Add sweepLength to TriaxialTest if fast==true 2. Remove euclid from the pack module, since we use wrapped wm3 now. 3. Add _packObb.cpp to compute minimal oriented bounding box on cloud of points 4. inGtsSurface predicate with triaxialPack will work on the minimum OBB 5. Add check for engine to prevent crash as per https://bugs.launchpad.net/yade/+bug/399810 6. Enhance the pack.inSpace predicate to work as expected. Custom center can be given to the ctor 1. Fix non-tuple in graph specification 2. Allow plotting agains the y2 axis, after a special parameter '|||'. 1. Remove mutex from requestErase (should be verified to compile on non-openMP machine!) 2. Add mutex to PhysicalParameters, so that body state can be locked while updating from the interaction loop. 3. Add linking with EngineUnits to Tetra (thans Emanuelle) why..?? 1. Adapt simple-scene-graph.py to new instance syntax 2. Add support to y2axis to saved gnuplot plots 3. Change interface for yade.plot.addData to take **kw instead of straight dict (still backwards-compatible) 1. Do not use REGISTER_ATTRIBUTE anymore, use REGISTER_ATTRIBUTES instead everywhere. This generates (in addition to serialization code) also some python code and makes python independent on the yade serialization framework (Janek, if you want to try boost::serialization, I have no objections now). 1. Remove garbage from doc 2. Instruct getopt to not shuffle command-line arguments, so that their order is preserved 3. Add epydoc documentation for all python classes and functions 1. Fix linking logic for _packPredicates (fixes https://bugs.launchpad.net/yade/+bug/401029) 2. Make gts-horse coarse original horse automatically Fix small bug in Velocity bins related to max sweep length (should improve performance as well). Still some incorrect things WRT bboxes, it seems. 1. Fix mathematical error with VelocityBins, verified by new script scripts/test/collider-sweep-simple.py to be correct 2. Add py/ directory to skipped dirs for linkdeps.py so that it works on current trunk 1. BIG CHANGE: pkg/ no longer have SConscript files but are scanned at startup for plugins. See http://yade.wikia.com/wiki/ImplicitBuilds for some details. Let me know if there are some problems. add boost-serialization and boost-program-options to debian. 1. Move STILimport to pkg/dem, as it depends on dem 2. update RockPM with the new-old version (probably svn didn't update the moved version? what a deal. We should definitely move to bzr...) 1. Fix unreported version for the debian build 1. Fix snow compilation by #including Voxel/* files in SnowVoxeslLoader and noc compiling them directly (sorry) 2. STLReader is a pure-header import lib now, tolerance is passed as regular data member. 3. Fix all warnings in ConcretePM. 4. Merge lib/yade-* into lib/yade-support. 1. Fix monolithic compilation even with fem. All modules can now be compiled that way. fix compilation? Fix TetraTestGen crasher (functionally still brokne, though) Remove SDECLinkGeometry, replaced by SpheresContactGeometry at a few places. Not checked for functionality. This avoid many warnings. 1. Fix linking with full Wm3 library 2. Automatically add /usr/include/wm3 to CPPPATH if useMiniWm3=False 1. Hopefully fix https://bugs.launchpad.net/yade/+bug/402098 2. Fast in TriaxialTest uses nBins==5 and binCoeff==2 for VelocityBins 1. Fix SnapshotEngine and simple-scene-video.py to run. It doesn't work, though, because of the makeCurrent() failed error (probably getting snapshot from another thread...) 1. Add GLViewer::nextFrameSnapshotFilename to save frame in postDraw 2. Adjust SnapshotEngine to take advantage of that. This should solve https://bugs.launchpad.net/yade/+bug/396023 3. utils.encodeVideoFromFrames can take list of files (instead of just wildcard). Backwards-compatible. 4. scons doc skips debian/ directory (would mess up if deb package was build) 1. Fix for https://bugs.launchpad.net/yade/+bug/406343 (at least for me) 1. Add GenericSpheresContactClass to unit radius1, radius2 and normal between SpheresContactGeometry and Dem3DofGeom (to make it work with GlobalSitffnessTimeStepper). Partially solves https://bugs.launchpad.net/yade/+bug/399963 1. Add docstrings to all wrapper.Omega() methods 2. Fix a few warnings. Fix has_map warning and one more in FlowEngine. 1. Add infrastructure for getting temporary filenames in a secure manner to Omega 2. move selectedBOyd to MetaBody; initialize it properly to avoid possible crash. Remove leftover SConscripts. 1. Change syntax of YADE_PLUGIN("Plugin1","Plugin2") to YADE_PLUGIN((Plugin1)(Plugin2)) (replaced everywhere) 2. Add some perliminary and not-enabled by default support for boost::serialization (see ClassFactory.hpp) 3. Add boost::serialization code for Se3r, Vector2r, Vector2, Quaternionr 4. Do not reset BexContainer's moves and rotations uselessly (i.e. if not used) 5. Use Omega's mutex in SimulationController to prevent loading-related crashes 1. Don't use __COUNTER__ to generate plugin registration function names, as they wre added in gcc 4.3 Use the name of the first plugin instead. 2. Dem3Dof_SphereSphere takes touching distance as equilibrium if distanceFactor is <=1. The initial position otherwise (was the default everytime until now) 1. Generate proxy constructors to all classes deriving only from Serializable in python (like GLDrawBox and similar). 2. Fix scripts to have the new syntax everywhere, since e.g. EngineUnit is just abstract class that cannot be instantiated from python. 3. Add check fro valid data before saving plot to gnuplot; raise comprehensible exception if there is nothing to save. 4. Remove leftover scripts/pch.py 1. Add an example of uniaxial tension-compression test for concrete (ready long time ago...) 1. All different yade types are real python types now. They have their properties defined at startup. One can say O.bodies[0].shape.diffuseColor instead of O.bodies[0].shape['diffuseColor'] now. It also works much better with ipython tab-completion. It is not sure whether we will be able ever to deprecate the old object['attribute'] syntax. 2. Wrap ParallelEngine in python, and finish Dispatcher wraps as well. 1. Reset interaction radius after the initial contacts have been created. Fix FileGenerator wrapper in PythonUI_rc.py (has different name in c++ (FileGenerator) and python (Preprocessor). 1. Rename Preprocessor in python to FileGenerator, to be consistent with c++. Preprocessor is never used directly, anyway. The old deprecated name put in the deprecation table. 2. Manage crash at exit in defaut-test gracefully 3. Fix serialization of pairs (overlooked replace) 1. Initial attempt at regression tests (only the python wrapper so far); run scripts/regression-tests.py 2. Fix a few bugs discovered that way :-) 1. Replace PersistentSAPCollider and DistantPersistentSAPCollider by InsertionSortCollider everywhere. The two are still in the sources, but are not compiled. Will be removed in near future. Added to deprecated table in python so that old scripts still work. 2. Add some more regression tests for the python wrapper. 3. Fix timestep in HangingCloth (it does some weird things, can someone check it or just remove mass-spring from the tree?) 1. Be more tolerant to specifying invalid GUI at the command line 2. Throw exception about unopenable $DISPLAY rather than letting QApplication abort() 1. Fix https://bugs.launchpad.net/bugs/409254 https://bugs.launchpad.net/yade/+bug/409254 take 2 Maybe fix https://bugs.launchpad.net/yade/+bug/409365 1. Fix (?) https://bugs.launchpad.net/yade/+bug/409254 by moving ClumpTestGen out of Clump.hpp 2. Avoid warnings in STL import code (return values _should_ be checked, though!) 3. Avoid warning in yade.cpp in optimized build 1. Infrastructure for periodic collision handling. Not at all functional at this moment, don't even try to use. 1. Beta version of periodic boundary conditions (try scripts/test/periodic-simple.py 1. Assign new function O.exitNoBacktrace to sys.exit. Fixes partially https://bugs.launchpad.net/yade/+bug/410250 2. Add some more comments to periodic stuff. 1. Script that shrinks the periodic cell progressively (reveals bugs in the collider, though ;-) ) 2. Add function to compute total force in volume from interactions to Shop, wrapped in _utils as well. 1. Working periodic collider, yay!! scripts/test/periodic-grow.py shows that 2. A few changes related to that. 1. Add PeriIsoCompressor for periodic isotropic compression; see scripts/test/periodic-compress.py. Not so much slower than regular triax, nice surprise. 2. Make SpherePack standalone class (previously just in python's _packSpheres), add the function to generate cloud of spheres, both periodic and non-periodic. _packSpheres wrapper is update, but otherwise not changed. 3. Fix python-less compilation for se3 interpolator engine 4. Add Omega().runEngine() 5. Fix some compilation/linking issues. 1. Fix missing vtable for GenericSphereContact (crasher with debugging) 2. Fix collider stride for TriaxialTest with unspecified radius 1. Try to fix locking with boost-1.35, possibly fixes https://bugs.launchpad.net/yade/+bug/411572 (please confirm) 2. Add periodic repetition function to SpherePack 1. Fix linkage for boost<=1.34 (hopefully) 1. Fix a few things in SpherePack 2. Remove TriaxialTest::GenerateCloud, replaced by SpherePack::makeCloud 3. Fix crash in BoundingVolumeMetaEngine, if MetaBody has no boundingVolume 4. Improve sorting operator, remove workarounds for std::sort wrapping minima/maxima (https://bugs.launchpad.net/yade/+bug/402098) 5. Limit minimum cell width in PeriIsoCompressor, to not crash. 6. Add code for periodic packs in pack.triaxialPack (not yet fully functional) 1. Add #pragma once to SpherePack.hpp (possibly cause of https://bugs.launchpad.net/bugs/412442) 2. Fix crash in TetraTestGen (finally, I think), closing https://bugs.launchpad.net/bugs/408422 3. Add highlight parameter to utils.{facet,sphere,box}, passed to Body::geometricalModel 1. Fix assertion is 2d dispatch code, add indices to RpmPhys, RpmMat, CpmPhys, CpmMat (would break dispatching if using more classes derived from the same base in the dispatch matrix) 1. Remove {,Distant}PersistentSAPCollider and Fixed{Position,Orientation}Engine classes 2. Add test script for generating packing 1. Summarize important changes since the last release. Add your own things, if they are important for everybody (svn log has the small details) 1. Add scripts/rename-class.py for renaming classes (replaces in code, moves files with bzr, adds rename record to python). Not very well tested, though. 2. Remove core/StandAloneSimulator.*pp (not used anymore) Add ignore patterns so that bzr st doesn't show (some) generated files 1. Merged upstream changes. 1. Clen the plugin loading logic a little (no nominal win32 support), support YADE_PREFIX for changing prefix (should be runtime-detected inthe future, anyway) 2. Use $ORIGIN in rpath to make yade relocatable; it can be fragile, let me know if there are troubles! 3. Add make check to the debian package (will be tested soon) 1. Add compatibility for hardy 2. Fix missing newlines (hardy compiler gives warning) Adjust rpath for the main executable (ugly hack) Run tests in debian package (not failing if the test crashes, though, for now) 1. IMPORTANT! All features are lower-cased now (avoids mess: openGL or OpenGL etc). This will probably break your profile files. 2. IMPORTANT! openmp is one of features, no longer a separate options. Adjust your profiles 3. Rename LOG4CXX to YADE_LOG4CXX; all features now #define YADE_FEATURE macros 4. Better $ORIGIN syntax in scons 5. Abort yade if running PythonUI_rc.py fails 6. Adjust pbuilder script 1. Add wrapper for running tests, to trap exit segfault at squeeze 2. Use the wrapper for tests in debian/control 3. Add wrapper for vector Make the test script report what distribution failed (currently only karmic). Fix GTS features (thanks for spotting that; we need regression tests for all the modules) 1. Skip more stuff in doxygen, a few warnings 2. Add debugging code to DynLibDispatcher (disabled) 1. Rewrite 2d dispatching code from scratch 2. Expose classIndex to python for indexable classes 3. scripts/test-sphere-facet.py shows how the dispatch matrix fills with data Add python 2.5 compatibility hack Avoid error in pack.triaxialTest if compiled without GTS. 1. PeriIsoCompressor: add keepProportions parameter (on by default), decrease global updates interval. 2. Omega: startSimulationLoop warns if there is no simulationLoop (how can that happen? It somehow can) 3. SpherePack: resets periodicity (and warns) if being rotated; cellSize is writable now. 4. pack.triaxialPack: renamed to pack.randomDensePack; fix loads of stuff in that; rename radiusStDev parameter to rRelFuzz; add epydoc documentation; fix erroneous detection of inGtsSurface being defined 5. wrapper: lock renderer when adding list of bodies; Omega().resetThisWorld to reset current world only. 6. Fix scripts/test/{gts-random-pack.py,gts-random-obb.py} ef2_Sphere_Sphere_Dem3Dof: change meaning of distanceFactor, see docs (if < 0, equilibrium is sum of radii, otherwise the initial distance; defaults to -1). Renamed to distFactor, to break old code intentionally InteractingSphere2AABB: allow negative aabbEnlargeFactor, which doesn't scale aabb at all (same as if it is 1.) yade-multi: use the first non-blank line as column headings (not necessarily the first line of the file, as is used to be) SpatialQuickSortCollider: fix clearing interaction with openMP examples/concrete/uniaxial: move files around, add confinement and docs; remove examples/concrete/pack since not in the pack module (an example should be given, though) examples/collider-perf: remove PersistentSAPCollider, add InsertionSortCollide with strides, but commented out since no effect at hthe beginning of simulation PeriodicInsertionSortCollider: remove unnecessary (hopefully) condition that would abort in scripts/test/periodic-simple.py PeriIsoCompressor: fix absolute displacements changing proportions, operate on averages instead pack.randomDensePack: fix proportions in periodic packs; change residual stress to 1e8 instead of 1e9 SConstruct: remove obsolete (unused) standalone openmp option yadeWrapper: Fix compilation with boost<1.35 (again) (now?) 1. Fix startup crash if no $DISPLAY set at all miniWm3Wrap: update with newer py++; still errors out at karmic spirit: avoid warning with newer boost versions Add gts to depends on the script. Remove unnecessary inclusion of indexing_suite which breaks compilation for boost<1.34 (or something like that). utils.uniaxialTestFeatures: fix compat with py2.5 SConstruct: fix compilation issues with older symlinks in include dirs Fix OperationalError, reported by Janek in https://bugs.launchpad.net/yade/+bug/416906 SConstruct: add doc for pretty, fix a few lib checks on karmic Fix version detection on systems where version is not specified by hand or in RELEASE file and bzr is not installed main: disable SIGHUP handler (emergency save) and automatic loading. 1. Remove garbage from examples. 2. Fix SpheresFactory, fix examples/SpheresFactory/model.py move SpheresFactor to scripts/test as it doesn't work. Add notes to changelog and news. Forgotten file Mark release version Add mill script mimicking http://www.youtube.com/watch?v=005rdDBoe4w Some changes in qt interface (useless) Add series to package version to allow same version for multiple series in the ppa (0.20-1~hardy, 0.20-1~karmic etc) Added script for http://www.youtube.com/watch?v=KUv26xlh89I 1. Fix facet lighting, mill shown with wire=False now (looks better) 2. Revert recent useless change in QtGUI-python 1. Enabling O.timingEnabled when running will not produce garbage values for current engine anymore 2. Add maxRefRelStep to VelocityBins, to limit speed fo maximum velocity changes 3. Fix epydoc format for utils.encodeVideoFromFrames and utils.uniaxialTestFeatures 1. Do not save potential-only interactions to the XML; do not save pendingErase interactions (are only potential) 2. Do not save interactions in SQLiteRecorder by default (saveInteractions=True if you want the old behavior) 3. Add slider to the simulation player, in the "snaps" tab 1. Add scene that has been sitting here for a few days (should be run for comparison with pfc3d) Workaround bug #416335; static members of Vector3 work only on instance, e.g. Vector3.ZERO will not work, you have to use Vector3().ZERO; changed all occurences in the code accordingly, update your scripts as well.\n2.Some undocumented and untested enhancements for parameter table (backwards compatible) ================================================== yade-0.20.0 Sat, Sep 19 21:41:52 2009 +0200 Anton Gladky (33): 1. This is my first test commit 2. Added some initial files for mining rocks classes simulation 1. Some changes in RockPM, still does not work good 1. Some small changes on RockPM.* files 2. Test SVN_2_email 1. Test 2. RockPM.* updated Changes on RockPM.* files 1. RockPM, first variant of "destruction mechanism" 1. Deleted euclid.py 1. delete euclid.py (fised Sconscript) 1. In utils.py alignedFacetBox has been changed to facetBox. It is now possible to create arbitrarily-aligned box composed of facets 2. Updated regular-sphere-pack.py 3. Some small changes on RockPM.cpp 1. RockPM update. Added simple "destruction mechanism" 2. Added scripts/installOnUbuntu.sh to make "oneButton-checkout+compile+install+doxygen+epydoc" script. Not tested yet. Requires corrections. 1. Updated some scripts according to new syntax 1. Added PressTestEngine for simulating presses. Can be used and for PointLoadTest simulations. 1. Updated simple-scene-graph.py according to a new syntax 2. Updated simple-scene-video.py according to a new syntax 1. Changes on PressTestEngine. Now it defines the destruction moment more precisely 2. YADE CONSOLE emblem shows now without upper row shifted. 1. Some small changes 1. All variables initialize in PressTestEngine and RockPm Some changes on News Fix compile error 1. Partly fixed 1. Almost fixed https://bugs.launchpad.net/yade/+bug/412892 Just 1 warning: Some changes in INSTALL file because of migrating to BZR Some changes on one-click-install script Added "warning" in one-click-install script 1. Fixes compiling error without openmp feature. 1. 418107, I guess it is more correctly. Some nonessential changes Blocked some warnings in RockPM.cpp Small changes Press Engine and RockPM changes Added demonstration of buldozer simulation "Thanks" and Thanks to Janek :) Fixes VTK-librabry dependencies for Ubuntu Some small changes on Buldozer Bruno Chareyre (16): 1. Fixed a critical bug in ElasticContactInteraction (kn, was not registered and left undefined after loading a simulation). 2. Test if fn!=0 (i.e. contact exists) before adding kn/ks to the global stiffness. 1. "Water" classes are updated based on the code developped locally (but not commited for a while) by Luc Scholtes. 2. Triangulation code updated as well (not compiled by default). 1. Add a missing class (for the capillarity model), this fixes a compilation error in the previous commit due to the missing files. The "stopSimulation" command in the compression engine is now optional, as sometimes you don't want it to stop at all(1). The default behaviour of the compressionEngine is not affected, with autoStopSimulation=true by default. However, the TriaxialTest IS affected : it sets autoStopSimulation=false by default. 1. Update capillary files and add a new engine for them. 2. Prepare for removing old useless classes (typically some variants of engines with "water" at the end) Remove useless dependency. -Avoid crash when computing fusion number (it was using pointers to deleted interractions) FIXME : no distant meniscii for now due to deletion by the contact law. Base class for the solid-fluid coupling (E. Catalano PhD). -Register "thickness" so that sample dimensions are computed correctly (and not with 0 thickness) Dimensions could be 0 when "updateParameters" was called from TriaxialCompressionEngine before TTController::action Missing declarations in r1836. - cleanup : removing unused (and useless) "water" variants of engines - some cleanup in recorders too Update of the read/write functions for the connection with comsol. (coupling via Berkeley<->Grenoble mail servers! ;)) Missing declarations of member variables. Set default read/write behaviour as in Andrea's version. Feng Chen (1): This is viscous force damping, equation similar to http://en.wikipedia.org/wiki/Damping, damping parameters are controlled by betaNormal and betaShear, it is sometimes more realistic than the non-viscous (or say, local) damping. While using this code, please make a reference to: Janek Kozicki (40): created nearly empty snow package: pkg-snow Snow stuff - generate grains made of layers according to voxel data read from file. And daraw it. forgot some files - make it compile with boost 1.34 - some snow improvements - another fix. now it really compiles with boost 1.34 1. TriaxialStressController reads radius from interactingGeometry Code wasn't compiling because of #include MicroMacroAnalyser - comment it out. 1. argh, guys. svn HEAD must compile. You didn't check your commits and then I waste 1h to fix that. See this commit, to check what I had to comment out about WATER - added keyboard shortcut '.' that toggles grid subdivision by 10 - fixed error with grid step - grid step is now shown in gl window small snow update another small snow update 1. small snow update 2. fix compilation error by Vaclav (hey, you didn't compile again before commit! ;p ) rename file to avoid case conflict with directory 1. GLViewer - when sth. is selected don't move it to 0,0,0 position, but use its original position. This is done by delaying assignment to the next call of draw() - added extensive comments to the polyhedron code which will be used for collisions small snow update maybe spheres won't disappear anymore? a placeholder for drawing snow interactions changed guards to #pragma once postpone creating a 3d view, until a file is loaded. That should hopefully fix the problem with the primary view being empty. added AUTHORS file, for the purpose of updating file headers. This was copied from http://yade.wikia.com/wiki/Authors Why do I have the impression that I'm adding this file a second time? After all it's referred to in almost all source files "See file LICENSE for details.", right? sort people in alphabetical order sorry for bumping up revisions.... Snow, as it is finished by me. Further work on it will to be done by next post-doc researcher who wants money from EU for working on this :) fix miniwm3 / full wm3 compilation error I forgot to add those, sorry. (I wonder how it could stay unnoticed for so long ;) add option for horizontal or vertical wires in fibre reinforced concrete. 1. correct display of lattice rods on 0th iteration 2. on/off switch for using different stiffness for tension and compression in lattice 3. fixed a bug in BodyRedirectionVector related to deleting of bodies 4. two more lattice examples 5. few more safety checks in lattice code 1. NullGUI was still usin .gz while thay are not supported anymore 2. small lattice update sanitize stupid numers in QtGUI, eg. 0.1299999999999 becomes 0.13 small fix after isNew and isReal are removed I'll update the code to use new contact logic. Add an option to display DOFs and body IDs in the OpenGL window - Lattice uses DOFs now - old implementation is still accessible by setting a flag backward_compatible, so that hundreds of my old FileGenerator files will still work - some improvements to recording strains and forces - fix all my warnings - lattice generator improvements wrt concrete with steel fibres - some improvements wrt to generation of densely packed aggregates and steel fibres in the concrete structure - testing command "bzr commit --fixes lp:414868" - fixing bug 414868 Fix stupid error introduced when we have migrated to bex container 1. get snow code to run, albeit still buggy 2. why dynamic_casts stopped working everywhere, that's a mystery to me 3. interactions isNew doesn't exist anymore, snow code needs update for this Jerome Duriez (2): - Correction of the headers of two files "ContactLaw1Interaction" which were commited by me and not by Bruno - Some features of ContactLaw1Interaction were declared in ElasticContactInteraction. This was a mistake totally not planned (and the fact it was in svn also was not noticed) and is now corrected - End of the job by suppressing also the corresponding lines in .cpp... Luc Sibille (1): I added a new engine "ThreeDTriaxialEngine" to perform triaxial simulations with an independant control in stress or in strain in the three space directions respectively. In this goal, the TriaxialStressControlEngine has been sligtly modified to impose a different stress value or strainrate in each space direction. I hope I have broken nothing! Sergei Dorofeenko (28): Intermediate commit for SpheresFactory. Don't work yet. 1. New engine SpheresFactory 2. Add function engineByLabel to MetaBody 3. Add members to BroadInteractor. 1.First worked version of SpheresFactory engine. Example in examples/SpheresFactory 2.Added PersistentSAPCollider::probeBoundingVolume function (for using with SpheresFactory) 3.InteractionGeometryMetaEngine::explicitAction has been modified to remove artifical (as me seems) asserts. 4.python import_stl_geometry now return list of body ids instead only their number. 5.import stl geometry now allows import facets without BoundingVolume and InteractingGeometry. 6.Fixed dynamic_cast for BroadInteractor. 1. SpheresFactory allows now to create spheres in a convex volume. 2. SimulationController estimates total simulation time if stopAtIteration>0. 1. SimulationPlayer now allows to reload filters without reloading all simulation. 2. ColorizedVelocityFilter now allows to setup minValue,maxValue without reloading the filter. Fixed bug in RotationEngine: rotationAxis now normalized in action(), not in postProcessAttributes() ColorizedVelocityFilter counts a scale for each frame, without using previous min,max values. Class SimpleViscoelasticInteraction is renamed to ViscoelasticInteraction and is inherited from ElasticContactInteraction now. 1. Convert SimpleViscoelasticContactLaw to ConstitutiveLaw engine unit (Spheres_Viscoelastic_SimpleViscoelasticContactLaw). 2. SimulatonPlayer have now Display tab as one in SimulationController. 1. The experimental widget for drawing a color scale for colorized velocity filter. 2. Convenient python function utils.ColorizedVelocityFilter. Merging utils.*_v2 functions with their "first" analogs. Add two new filters: ColorizedTimeFilter and PythonRunnerFilter Migrate GravityEngines and ConstitutiveLaw to BEX_CONTAINER Convert STLImporterTest to ConstitutiveLaw (SimpleViscoelastic contact model) and NewtonsDampedLaw engine. Fix bug in serialization for ViscoelasticInteraction. Fix compilation error for InteractionHashMap Update contact logic for SpatialQuickSortCollider (hope, it's correct) Fix typo in PersistentSAPCollider 1. Remove zeroPoint 2. Add prefix ef2_ to Spheres_Viscoelastic_SimpleViscoelasticContactLaw Fix link errors fixed and updated some examples in keeping with last modifications Realise InsertionSortCollider::probeBoundingVolume() so SpheresFactory now works SpheresFactory now can create a spheres by python function. See scripts/test/SpheresFactory/model.py for example. Add export python module with VTKWriter class (very initial) to export data from YADE to VTK-based post-processing tools Added a c++ VTKRecorder (for spheres and facets) and new feature 'vtk' needed for it. Add colors rec to VTKRecorder Add default path for VTK Fix VTKRecorder headers Fix VTKRecorder headers Add VTKINCDIR to configure options for directories where to look for VTK headers Unknown (1): The isotropic compaction into the TraxialTest is activated: 1)I have deleted the translationspeed parameter (now the translation speed of walls is the strainRate parameter) 2)I have activated the porosity parameter in the TriaxailStressController.cpp file Vincent Richefeu (38): - add the soft mgpost for DEM simulation post-processing and visualization. - set menus in english mode A very quick guide for mgpost (usage and XML format) a forgotten file in mgpost/doc - add a new tool for sphere packing (still in dev) - some enhancement in mgpost interface - SpherePadder devel... SpherePadder devel... SpherePadder (devel: 5 steps ok) - SpherePadder update - add a basic 'user friend' interface for sphere packing generation. The module can of course be used without this interface. Speed enhacement for the SpherePadder algorithm. Add possibility to make PNG screenshots (using libpng) Add a DataRecoder that generate MGP files (only for Spheres for the moment). The MGP files can then be read with mgpost. - add a class based on CGAL for 3D triangulation. - Packing method enhanced (place 380000 spheres in less than 2 min) Fix some bugs and enhance the display of positive and negative forces Fix some bugs Begin devel. of densification process 2 files that were forgotten Simplify sphere shapes when if there number is increased Bug corrections (min and max radii) - overlap with spheres inserted by user -> bug fixed - Densification begins to work Increase the number of colors for the display of body's groupMasks from 6 to 10 We can now make the packing denser with a stop criterion based on the solid fraction or total number of spheres. Add BasicViscoelasticRelationships: an alternative to SimpleViscoelasticRelationships. It accounts for the effective mass of each contact and considere the parameter cn as a dimensionless ponderation of its critical value (computed for each contact). Parameter cs is set to zero for the moment. Add a boost.python wrapper (module packing) Add a function to SpherePadder_wrapper to pass the result back to python. As Vaclav suggested, it is a list of (x,y,z,R) tuples. (Complet integration into yade is not done yet) - Add 'HistoryRecorder' to save the sample and network state with a given time-step interval. - Correct a small bug due to the fact that a Clump cannot be casted into a GeometricalModel (and I don't know why!) Use the clump mass instead of clump-member mass for the determination of the effective mass. Ooops! There was a bug Add the function NormalRestitution2DampingRate. Add sphere reading for gdm-tk format Remove default linkage with libtiff (png is now prefered) Add an example of python script for SpherePadder Add GroupRelationData serialization (not used yet in *Relationships classes) This class serves to manage parameters between bodies depending on their groupMasks. Here is an example of 'command stream' in xml file to set the parameters: Just try to use GroupRelationData with BasicViscolelasticRelationships. Cast size_t to int in pow(double,int) function to avoid ambiguity for gcc (compilation failled on one of my computer) Some tiny modifications for Mac OS X compatibility (Does not compil yet). Some forgotten tasks replace gcc-3.3 by gcc in the Makefile.macosx of mgpost Václav Šmilauer (269): 1. Add linear templated interpolation function working on 2 lists, t and values 2. Add InterpolatingRotationEngine that changes rotation speed as given by value table 3. Lower info about starting python thread to debug message only. 1. Rename REGISTER_SERIALIZABLE(class,bool) to REGISTER_SERIALIZABLE_GENERIC, add two macros REGISTER_SERIALIZABLE and REGISTER_SERIALIZABLE_FUNDAMENTAL. Changed all uses accordingly. 2. Added REGISTER_CLASS_AND_BASE(class,base) which performs REGISTER_CLASS_NAME and REGISTER_BASE_CLASS_NAME at once. 3. Added REGISTER_ATTRIBUTES (not trailing 'S'), expanding to void registerAttributes(){...}, and REGISTER_ATTRIBUTES_WITH_BASE, which prepends call to baseClass::registerAttributes() (specified as the first argument). 1. Added Se3Interpolator engine, with scripts/test/Se3Interpolator.py 2. Added from math import * to PythonUI_rc.py so that math functions are readily accessible everywhere 3. Implemented stopStrain in UniaxialStrainControlledTest 4. other small fixes 1. Modify REGISTER_ATTRIBUTES macro so that it work with or without base class given. Change all headers in core to use that. It should help us if we ever make the transition to boost::serialization. 2. User REGISTER_CLASS_AND_BASE instead of REGISTER_CLASS_NAME and REGISTER_BASE_CLASS in core and at a few other places. 1. Removed cerr garbage from glviewer (use LOG_DEBUG if needed) 1. Fix warnings in GLViewer 2. Add (35.4%)-style counter if stopAtIteration is set to the OSD in gl view 3. Add utils.downCast to downcast object to its derived class and copying all attributes. 4. Add utils.SpherePWaveTimeStep to compute critical dt from a few parameters only 5. Add routine to compute overall kinetic energy to Shop (indirectly to utils as well) 6. Add routine to sum torque (momentum) with respect to an axis from forces and torques on given set of bodies. Fix typo (compilation error in debug mode) in Shop::kineticEnergy 1. Fix a bug in rotation ode in SpheresContactGeometry. Now the code gives the same results as almost-for-sure-correct FEM code regarding strain computation. 2. Add label attribute to StandAloneEngine (inherits from Engine) omg (code cleanup, no functional changes) Exit once the simulation finishes; do not rely on simulation exiting itself. 1. SpiralEngine that does both rotation and translation along the same axis 2. InterpolatingSpiralEngine for variable rotation+translation speed (replaces InterpolationgRotationEngine) 3. scripts/test-spiral.py for rudimentary functionality testing. 1. Un-disallow (bug) having all dimensions scalable in triaxial if particle radius is fixed. 2. Don't record anything by default to file in UniaxialStrainer (only useful for debugging) 1. Add a few functions for integrating piecewise-linear functions in new module yade.linterpolation 1. fix damage colorizer (removed dynamic_cast causing segfaults on non-spheres) 2. InterpolatingSpiralEngine now takes bool wrap rather than Real period. 3. qt.makePlayerVideo takse startWait argument, which waits for Backspace before starting (useful for setting up the view manually); postLoadHook gets run afterwards now. 1. Add algorithm for pushing sphere always to the same side when in contact with facet, even under extreme stress where the sphere geometrically passes to the other side. 2. Add bool SpheresContactGeometry::initContactOnPositiveFacetSide for that 3. Add test/demo script for that. 4. Re-enabled GLDrawSphere::glutUse (cosurgi?) 5. Renamed yade.runtime.args to argv, to be consistent with sys.argv 6. Allow passing sys.argv (arguments to scripts) through QtGUI as well 1. Fix clip plane orientation inversion as well as wheel normal movement. 2. Clip planes not displayed at all unless one of the clip planes is being manupulated. 1. Unbreak bad type (list) for sys.argv[0], broken recently 2. Color bodies by residual strength rather than damage parameter (smoother) 3. Make player messages (maybe) better formatted omg... 1. Make player reuse existing renderer if there is one (allows setting Draw_mask etc before running player) 2. Add initRun parameter to PeriodicEngine (false by default), to run at the very fist run. 1. Make BrefcomDamageColorizer run at 0th iteration as well 2. Make player set stopAtIter to last iteration in db so that percentage is displayed in the output. Fix previous commit, overlooked. sorry. 1. Number lines in parameter table for multijobs from 1 (as text editors do) 2. Print short summary at the end of job log (when started, when finished, exit status, duration, commandline) 1. Fix logic typo in QtGUI (warning when there shouldn't be and vice versa) 1. logarithmic strain for Brefcom. 2. change sphere-facet algorithm such that it works on corners. Maybe no longer necessary, but it doesn't hurt now. scripts/test-sphere-facet-corner.py as provided by sega demonstrates that. 3. "from __future__ import division" in python init such that 3/2==1.5 and 3//2=1 (is default since python 2.6) 4. Global GL lock to avoid crashes/freezes with GL accessed from multiple threads concurrently. scripts/gl-test.py (which used to crash) now works with one view; 5. Properly lock/unlock on all gl ops in QtGUI-python.cpp, like setting view direction, resizing etc. 6. Fix wrong assertion in SQLite player 7. add Omega().resetTime to reset iteration number, virtual and real time. 8. Changed utils.loadVars/saveVars code to be more reliable. 9. Added utils.aabbExtrema2d 1. Lock GL when closing view. Seems to fix crashes / delays at exit 1. Contact sphere-facet must be deleted by the constitutive law once created. Let me know if that is a problem -- I think it is the way it should be in the future everywhere, though. 2. Fixes for boost 1.37 (boost::thread not fully compatible) 3. utils.basidDEMEngines (not tested yet) 4. Fix warning in GroupRelationData 5. add march switch to scons ('native' is default, but not supported by older compilers) 6. Prepend default CXXFLAGS so that user-defined ones (like warning suppression) come after the default ones and override those. 1. Tentative fix for newer scons, which links empty files (dummy plugins) with plain gcc and doesn't find default c++ libs to link with. 1. File not needed. 1. Beautify no-debug code in main 2. SpiralEngine now saves angle it has turned so far 3. Remove failing assertion from IFacet2ISphere4SCG (why it fails? it was a (I->isReal&&I->interactionGeometry)||(!I->isReal&&!I->interactionGeometry)...) 4. Improve the utils.spiralproject function to specify period (moderately tested, but seems to work) 5. Adjust locks in GLViewer. Fixes my crashes on nvidia for both player and 3d view (didn't dare to try 2nd view). Next step will be to move this lock to Omega and lock it when loading/resetting simulation etc. 6. Change theora video quality to 63 (maximum) instead of medium 32 in utils.encodeVideoFromFrames. Makes the video about 3x bigger. Two BIG changes: 1. Add ef2_Spheres_Brefcom_BrefcomLaw, is faster (!) 2. Fix locking in Omega, we don't get crashes when loading simulation with the 3D view enabled anymore (please report any further crashes in OpenGLRenderingEngine, that should be fixed) 3. Automatic update of Doxygen configuration file 4. Dem3DofContactGeometry, which should be in near future parent of SpheresContactGeometry and other new geometries providing normal and shear strains (SphereFacetContactGeometry, in my mind) 5. Add convenience function to apply force to contact point between two particles. (remove no-warn for c++0x since that flag is not known to gcc-3.4) 1. Add possibility to change container types from python (for benchmarks) -- code not yet tested! 2. Possible optimization in PhysicalActionVectorVector, now disabled. collider mistake hotfix 1. Make triaxial stop if !autoCompressionActivation and already unloaded. If this breaks something, please let me know, we can do it otherwise, but, for Cundall's sake, can we keep the same behavior for at least 6 months?? 2. SpatialQuickSortCollider will not delete real contacts, even if bodies don't collide. 3. Remove redundant attribute registration from SpheresContactGeometry fix typo in collider 1. removed persistentInteraction from most places; they are still present in MetaBody, but not serialized any more, most importantly (avoids warnings) and not GL-drawn. 2. Plugin loading loginc completely changes, the underlying macro YADE_PLUGIN has still the same interface. We used __attribute__((constructor)), __attribute__((visibility("internal"))) and anonymous namespace magic to get there. This will make it possible to put multiple plugins to a single shared library without touching the source, only fiddling with SConscript's. 3. PythonUI is interactive by default (it was not?? weird.) 1. Add new non-generic Bex container. For non-optimized build, it increased the speed by about 11% (9:35 vs. 8:49) as compared to PhysicalActionVectorVector. Users willling to go with the slower PhysicalActionContainer can compile with scons CXXFLAGS=-DNO_BEX now to get the old behavior. 1. Adapted TriaxialTest and ElasticContactLaw to BexContainer (switchable at compile-time). 2. Adapter GlobalStiffnessTimeStepper to BexContainer (GlobalStiffnessCounter code put to a function inside this one, hence that engine is not needed anymore). 3. Adapted Shop::Bex to BexContainer (probably not needed anymore?) 4. Exception is thrown in PhysicalActionVectorVector is used && built with BEX_CONTAINER (would most likely crash anyway). 5. transientInteractions and persistentInteractions are only references to MetaBody::interactions now. Removed extra loops in InteractionPhysicsMetaEngine and InteractionGeometryMetaEngine. 6. Remove including qglviewer into miniWm3, as it breaks compilation if using miniWm3 separately from yade (for testing purposes). 1. Define Janek's functions to convert from/to QGLViewer vector where they are used. 1. Add BexContainer (same interface, but separate implementation) in openMP flavor. 2. openmp=0 is the default for scons now (for some time), since openMP BexContainer gives about 7% slowdown and thus is not useful before at least some engines are parallelized as well. 3. Removed getting references to Force/Torque from BexContainer, since that breaks concurrency. Instead, addForce/addTorque must be used. If you need to read back with getForce/getTorque, you have to call sync() (expensive!!) beforehand, which will compute summary values for all bodies; if you forget, exception will be thrown. Note that sync() is invalidated at next write operation. 4. Adapted a few constitutive laws and other engines for the changes mentiones here. 1. Add time-profiling classes. See http://yade.wikia.com/wiki/Speed_profiling_using_TimingInfo_and_TimingDeltas_classes for details. It is accessible from python as well. 2. SimulationController no longer asks for output format. It just uses XML, the only available one. 3. Engine, EngineUnit have timingInfo member and pointer to optional timingDeltas. Timing is disabled by default, but it may still have some overhead in the order <1% perhaps (will test) 1. Forgotten file with yade.timing.stats() that pretty-prints some numbers. 1. Move all container to core, remove linking with them since it is not necessary 2. Fix things so that everything compiles (at least) both with and without BexContainer 3. Parallelize ConstitutiveLawDispatcher, InteracionPhysicsMetaEngine and InteractionGeometryMetaEngine with openMP if enabled on command-line 4. Make InteractionVecMap default container for interactions; necessary for parallel code. 1. New InteractionDispatchers class that has one common loop for InteractionGeometryMetaEngine, InteractionPhysicsMetaEngine and ConstitutiveLawDispatcher. It can be used from python like this: 1. Adapt ForceEngine to BexContainer 2. Add BEX_CONTAINER and YADE_OPENMP flags to be reported by -h. 1. Add two more forgotten headers. They are not used anywhere, though, and will be removed later. 1. Enhancement of utils.box from Marco. 1. Make Shop load 4/5/6 columns text files for spheres (and skip 5-cols) 2. Change evaluation of args in readParamsFromTable to be able to pass strings better (single quotes) and consistently 3. Parameters passed as env. vars by yade-multi are prefixed with ! 4. fix typo in timing for resetting timers. 1. Make the yade-multi scheduler multithread-aware. 2. Add the collider performance test as example 3. added utils.replaceCollider(anotherCollider) for convenience 4. added Omega().isChildClassOf(classNameChild,classNameParent) 1. Fix collider-perf (TriaxialTest has hardcoded dt=0.001 !!!!), set timestep by hand at first 2. Fix Shop:: loading spheres from file (regression from yesterday) 3. Add functorCache to Interaction and to InteractionDispatchers. About 5% improvement, but not yet finished. 4. Add DynLibDispatcher::getFunctor2D 5. Add BexContainer::sync() to other places in triaxial (thrown otherwise) 1. Fix old rename of runtime.args to runtime.argv in default-test.py. Should run OK now. 1. Fix for the compile error in snow for OrthogonalPlaneFit3. It still misses pkg/snow/Engine/ElawSnowLayersDeformation.cpp in the repo. Compile with exclude=...,snow as workaround. 1. Rename BroadInteractor to Collider. 2. Move some part of the contact logic to this common base class. The Collider::handleExistingInteraction is subject to discussion and not yet used. 1. Small fix in the collider code. 1. Remove SAPCollider completely 2. Make yade log4cxx 0.10 compatibile 3. Other minor fixes 1. Fix linking of realtime-rigidbody WRT PersistentSAPCollider 1. change default xiShear to 0 instead of NaN (is not used anyway) 2. Fix linking of mass-spring in cliean build 1. Fix #include's that include files not in the current source directory via "". 2. Add scripts/linkdeps.py that can automatically determine what plugin links to what other plugins, which can be once used for configurable monolithic/pluggable builds etc. 1. Fix crashed in TriaxialTest introduced by me a few days ago (referencing engine before being created) 2. Add simple (working?) memory usage query to utils and collider perf test. 1. Fixed collider performance benchmark 2. Added script to generate graph from log files (like http://yade.wikia.com/wiki/Colliders_performace) 1. Added SpheresContactGeometry::updateShearForce, will be used (not activated though yet) by ElasticContactLaw and other. hotfix related to last commit 1. Initial checkout for the DemXDofGeom classes (will contain the hasShear code from SpheresContactGeometry and more eventually). 1. Preliminary version for sphere-facet collisions with total formulation (moderately tested). 2. Same for sphere-sphere collision. 3. test script for facet-sphere collision geometry. 1. Use local foreach.hpp if not found in the system 2. Use local file defining boost::python::len for boost<1.34 1. remove explicit linkage to boost_python in gui/SConscript Forgotten empty file. 1. Remove logger from ClassFactory 2. Cleanup logging stuff in main (use constructor function, among other) 3. Cleanup system exit from python in PythonUI_rc.py 4. Add SpheresContactGeometry::updateShear that can be optionally used with ElasticContactLaw to update shear displacement instead of updating shearForce. triax-identical-results.py show quite large difference between both implementations, but I am not able to tell which one is correct. scripts/test/shear.py shown almost no difference for 2-sphere scenarios, modulo differences at 15th decimal place or so. 5. Remove debug output from BexContainer 6. Remove warning about meniscus data from CapillaryCohesiveLaw (warning is given in postProcessAttributes now, i.e. iff the class is actually used) 7. Add logger to snow. 8. Removed shear computation code in ElasticContactLaw, use SpheresContactGeometry::updateShearForce. 9. Fix scons deprecation warnings 1. Add functions to augment forces/torques in BexContainer. 1. Remove some garbage from SpheresContactGeometry 2. Verify that SCG_SHEAR doesn't alter behavior if ElasticContactLaw::useShear is false 3. Implement SCG_SHEAR for sphere-box interactions 4. sphere-box interactions no longer call goReverse, but swap interaction order instead, as facets do. 5. Fix triax-idnetical-results.py to reload generated initial config to avoid rounding issues of sphere coords in text file. Minifix: link core with librt (clock_gettime) for platforms that require it 1. Add rate-dependent damage to normal and viscoplasticity to shear components of Brefcom (not yet tested, just compiles); other cleanups there. 1. add addF and addT to legacy ActionContainer Add label attribute to engine units. Python wrapper updated. 1. Rate-dependent fixes (more to come) in brefcom. 1. Remove MetaBody::physicalActions if compiling with BEX_CONTAINER (default) 2. Make everything work with both BexContainer and deprecated PhysicalActionContainer 3. Change PhysicalActionDamper, PhysicalActionDamperUnit, PhysicalActionApplier and PhysicalActionApplierUnit to dispatch only according to PhysicalParameters (not PhysicalAction anymore). That means that only one unit will be called for each body and that NewtonsMomentumLaw has to do the job of NewtonsForceLaw as well (same for CundallNonViscousMomentumDamping). 4. Fix (finally) defaultDt computation in TriaxialTest (forgotten assignment to defaultDt in the GlobalStiffnessTimeStepper) 5. Fix (finally?) timestep manipulation form within the QtGUI. If reloading the same file, timestep settings will be preserved, otherwise those saved in the XML are used. 1. Create ef2_Spheres_Elastic_ElasticLaw that has the ElasticContactLaw algorithm 2. ElasticContactLaw now merely calls ef2_Spheres_Elastic_ElasticLaw. 3. TriaxialTest::parallel controls whether to use InteractionDispatchers or not. 4. Added examples/triax-perf to show the impact of that. Also see http://yade.wikia.com/wiki/Triaxial_Test_Parallel 5. Fix a few compilation issues. 6. Flush stdout before exiting from main, so that in case of crash upon exit (log4cxx?) we have all messages output. 1. Hotfix for 2 issues with ElasticContactLaw 1. Remove all traces of physical actions: 1. Remove Shop::Bex (no longer necessary) 2. Add InterpolatingDirectedForceEngine for Roger (not yet tested!) 1. Fix linking of ForceEngine with interpolation 2. Random rate-dependent things. 3. Typo in BexContainer docs 1. A few fixes in Brefcom. 2. Make python wrapper correctly handle long long attributes. 3. Added test script for InterpolatingDirectedForceEngine 1. MAJOR change in python syntax (backwards-compatible, though): through small bit of very dirty code, classes can be instantiated as python objects with keyowrd arguments, i.e. instead of 1. cleanup UniaxialStrainer code, add vars to control length of the acceleration phase and the ability to set absolute speed 2. EngineUnits within InteractionDispatchers can be labeled and accessed from python now. 3. A few minor things in the plot module 1. Remove cruft from brefcom, a few fixes there 2. Add gnuplot grid to gnuplot by default 3. Fix speed in USCT 4. Fix InteractionDispatchers traversal in pyOmega 1. Fix weird python problem if LIBS is not defined by distuils (?) 1. Add working version of facet adjacency finder (to get their mutual angle at edge) 1. Parallelize initial bound filling in PersistentSAPCollider. Gives almost 3x speedup for the first step. 2. Fix missing headers so that it compiles with g++-4.4 (in QGLViewer) 3. FacetTopologyAnalyzer works (not tested extensively), questions of where to put topology data for InteractingFacet (will be raised on yade-dev) 4. Test script for FacetTopologyAnalyzer. 1. Remove leftover var in PersistentSAPCollider 1. Add preliminary gnuplot plots merging facility to yade-multi 2. Fix yade.log module so that it also works without log4cxx (and gives 1 warning) 3. Switch to new syntax in scripts/plot.py 1. Fix race condition in brefcom (omp critical section) 2. Remove -ffast-math from optimized build, since NaNs do not work properly (e.g. isnan(NaN)==false!) 1. Fix bug in FacetTopologyAnalyzer algorithm 2. Add angle info to InteractingFacet (not yet used) 3. Add triangulated sphere test for FacetTopoloyAnalyzer to facet-topo.py 4. Fixes in rate-dep in brefcom 1. Add approximate viscosity equations to brefcom (not working) 2. Fixes in yade-multi 1. Finish implementation of Dof3DofGeom_FacetSphere (with plastic slip as well) 2. Adapt Brefcom optionally to Dem3DofGeom 3. Add d0fixup to SpheresContactGeometry to get correct normal strain in sphere-facet contact with fictive sphere (zero for sphere-sphere) 4. Finish FacetTopologyAnalyzer; angle usage in Dem4DofGeom_FacetSphere not yet tested. 1. Remove cruft from UniaxialStrainer, add the ability to set initial velocities to suppress inertia at the simulation beginning 2. Jobs in yade-multi can be automatically named after variables suffixed with ! 3. yade-multi now shows and updates automatically some statistic on localhost:9080 using http 1. Finish Dem3Dof for both spheres and facets, migrate Brefcom. Removing stuff from SpheresContactGeometry is on schedule, once thorough testing is finished. 2. Fix attribute inheritance for a few engine units 3. Add ef2_Dem3Dof_Elastic_ElasticLaw, which works like ElasticContactLaw (but faster ;-) ) 4. Remove BrefcomLaw, keep just the constitutive law as functor. Adapt sample generators for that. 5. Add hydrostatic confinement to brefcom (isoPrestress), remove viscApprox. 6. Add interface for querying and setting (doesn't work yet) number of openMP threads 7. Job description is taken from columns suffixed with ! or by combining all parameters 8. Add function for plotting yeild surface of brefcom to the eudoxos module 9. Oofem export now uses reference (starting) positions of particles as it should 10. Add "-" before profile name when generating default variant suffix in scons (which is expected) Fix comp9ilation error for Janek. 1. Add python wrapper for clumps, see scripts/test/clump.py on how to use it (O.bodies.appendClumped) 2. Fix clump support in NewtonsDampedLaw (damping is quite wrong, it seems...; Bruno, any ideas on that?) 3. Move clump to pkg-dem (even though it depends on extra/Shop) 4. Remove absolute shear computation from SpheresContactGeometry, as Dem3Dof works fine now and Brefcom will not use SCG anymore; adapt a few other classes to that; remove ElasticContactLaw2 that was using it. 5. 1. Warn in --version if -ffast-math was used 1. Fixing bug in TriaxialCompressionEngine (introduced by luc apparently). Big changes: Handle boundingVolume-less bodies gracefully in InsertionSortCollider 1. Add utils.regularSphereOrthoPack by Anoton Forgotten showcase. 1. Add InteractionContainer::requestErase to hint colliders that wouldn't otherwise see !isReal interactions. 2. Use this logic in InsertionSortCollider, PersistentSAPCollider, SpatialQuickSortCollider (noop in the last one) 3. Add InsertionSortCollider::sortThenCollide to make it behave as non-persistent collider (for debugging only?) 4. Add Interaction::reset() that has common initialization code. 5. Assign zero inertia to utils.facet (better than uninitialized binary garbage) 6. Fix contact logic in Brefcom, finally I get the same results with InsertionSortCollider as with SpatialQuickSortCollider on large simulation (more fixes to come) 7. Do not install pkg-config; fixes compilation error reported by the build bot. 1. Use bitfield instead of bools in InsertsionSortCollider 2. Revert accidental changes in insertion-sort-collider.py 3. Add function for using renamed classes from python with warning Getting rid of the Brefcom name, classes renamed as follows (moving files around will follow) 1. Add logic to scons to delete files that will not be installed in this run but are on-disk. This should make it unnecessary to remove files by hand. In the same way, disable implicit target cache which was making problems if files shuffle around. 2. Remove Brefcom* files, move to pkg/dem/ConcretePM.?pp. (not sure what other place, since it contains Engines, DataClasses etc in one file that I would refuse to break.). 3. Add detailed comments on ConcretePM to the ConcretePM.hpp 4. Remove extra/usct, moveUniaxialStrainer and put to pkg/dem; move SimpleScene from extra to pkg/dem 5. Remove core/yadeExceptions.* 6. Remove Preferences::dynLibDirectores and Preferences::version. Omega now recursively searches the lib directory for plugins and loads them. preferences.xml has only defaultGUILibName now. Finally. Remove baseDirs and other cruft from DynLibManager. 2 forgotten files (separated from UniaxialStrainer before) 1. Fix hopefully last relict of pkg-config 2. Degrade deleting non-existent interaction from fatal erro to warning only (not sure where that can come from, though.) Solve the cause of nonexistent interactions being deleted (after O.interactions.clear()). Make warning fatal error again. 1. Remove Interaction::isNew, Interaction::isReal. Add Interaction::isReal() which test for presence of _both_ interactionGeometry and interactionPhysics and Interaction::isFresh() which checks the interaction creation timestamp against current iteration. Updated all code for that. Please verify that your stuff works, it is possible I made some mistakes! 2. All code saying isReal=false replaced by interaction->requestErase(id1,id2) 3. make requestErase thread-safe 4. Add interace for traversing interactions pending erase (template) 5. Add TriaxialTest::noFiles and TriaxialCompressionEngine::noFiles to not generate any files (default: off) 6. Add predicate utils.ptInAABB(p,minPt,maxPt) 7. utils.spheresToFile return number of spheres written (instead of None) 8. Add examples/concrete/pack to generate packing; other stuff in concrete will follow, with simplified version of the cpm model in ConcretePM. 1. Syntax fixes in ConcretePM model 2. Interactions will be deleted also if the ye4xist, but geometry functor fails (returns false) 3. Add utils.approxSectionArea, utils.spheresFromFileUnixial (get some parameters useful for uniaxial tests from the sphere packing, such as cross-section, principal axis, etc) 4. Add lib/computational-geometry/Hull2d.hpp for computing convex hull in 2d using Graham scan algorithm (I know it is in CGAL already, but I don't want to depend on that commercial stuff) 5. Remove some unused stuff from utils. 1. Add epsNPl to Cpm 2. Replace vector by Vector2 and make it properly serializable (should be faster) 3. Add function to compute forces on interactions crossing plane. 4. Replace custom xcombine function by itertools.product in grid sphere packing Fixes and cleanups in the CPM code. Add new 'feature' to scons called openGL, which is on by default. Qt3 GUI will not be built without openGL. YADE_OPENGL is defined in openGL-enabled builds. Sconscript files adapted to skip GL plugins or GL parts of plugins. 1. Fix missing libs for linkage 2. Fix a few typos 1. Don't link core with glut (is there a reason for that?) Do not include X11 headers if without opengl 1. Move all python modules to PREFIX/lib/yadeSUFFIX/py/yade instead of */gui/yade 2. Add pack module for generating regular packings (thanks to Anton Gladky for his ideas & code) 3. Add _packPredicates module for solid inclusion testing. 4. Update regular-sphere-pack.py to test new packing features. Remove leftover reularSpheresOrthoPack from utils. Is in yade.pack now. Add pack.inHyperboloid predicate. Should be useful for cylindric specimen in uniaxial tension, but with the middle part having smaller diameter. Added to the test script as well. 1. Fix (hopefully) clump damping 2. Remove unused code from InsertionSortCollider 3. Make SimulationController NOT change timestep (rounding) by just opening it (!!) 4. Fix paths in PythonUI and lib/SConscript for $PREFIX/yade$SUFFIX/py/yade instead of $PREFIX/yade$SUFFIX/gui/yade 1. Add resetting interactionGeometry and interactionPhysics to Interaction::reset(), as it should be... 2. Small things in CPM 3. Add GaussAverage.data method to python (for debugging and plotting) Include Python.h in PythonRunnerFilter. Build this plugin only with EMBED_PYTHON. A few changes to allow run primarily python with qt3 on the top of that (open, close etc as needed). This paves way to running main yade process in python ;-) (just kidding, for now) 1. Handle groupMasks of bodies in InteractionDispatchers directly (not in geometry functors etc). 2. Fixes for qt3 started from within python 3. Add Body().dynamic flag to the wrapper, instead of using Body()['isDynamic'] all the time. Anton's new things: axis-aligned ellipsoid predicate and fix in pack.regularHexa. 1. Add external euclid.py module (suggested by Anton, thanks!) to our installation 1. Propose *.sqlite ending for saved simulations instead of * in the player Fix error-tolerant law which uses no interactionPhysics: add void Interaction physics in the geometry functor if returning true, to make Interaction::isReal return true. (Shouldn't we remove ErrorTolerant...? Does it have some serious use?) 1. Remove constructor priority for log4cxx to avoid syntax unsupported by gcc<=4.0. 2. Remove some commented cruft from FrictionLessElasticContactLaw 1. Add boolean operators on solid predicates (&,|,^,-), shown in scripts/test/regular-sphere-pack.py 2. Add notch predicate (not functional yet) 3. Add utils.alignedFacetBox to create hollow box from facets. Shown in new file scripts/test/facet-box.py 1. Update simulation filename in controller periodically 2. Fix notInNotch predicate, use infinite AABB for unbounded solids and raise exception in the packing generator if such is encountered. 3. Add notch to the head of regular-sphere-pack.py guy 1. Add checks for GTS (optional) 2. Add pyGTS to our tree (built only if needed), since no packages are available. 1. Fix corner case in InsertionSortCollider related to instability of std::sort (quicksort) and bodies having the same upper and lower bounds (facet in the xy plane, for example). Thanks to Anton for providing the crasher. Fix feature macro definitions (typos) 1. Add GTS surface predicate 2. Add example of sphere horse falling onto facet horse in scripts/test/gts.py (try it!) 3. Predicate difference now takes padding in the inverse sense for the second predicate (logical) 4. Attempt to enable lightning on facets (no effect :-( ) 1. Add coarsened horse geometry for the example gts.py 1. Rename ef2_Dem3Dof_Elastic_ElasticLaw to Law2_Dem3Dof_Elastic_Elastic (in scripts as well) 1. Make virtual methods on pack.Predicate work in python (inGtsSurface, for instance). Add scripts/test/gts-operators.py to show that. 2. Move scripts/test/gts.py to gts-horse.py 3. Add a few functions to pack for constructing triangulated revolution surfaces from meridians. 1. Padding support (though slow and not very precise) for pack.inGtsSurface 1. Fix crashers in InteractingMyTetrahedron* classes (introduced by me when updating interaction logic) 2. Reimplement inGtsSurface in c/c++ which makes it faster due to pygts interface limitations (addressed on pygts mailing list meanwhile), but is dirty programming. 3. Set CCOMSTR to correspond to CXXCOMSTR in SConstruct (to show nice line when compiling c source file, for pygts) 4. Set good-looking timestep in the TetrahedronsTest generator 1. Add triaxial packing generator, with optional memoization to sqlite database to avoid generating packing if there are suitable ones (same parameters/scalable to same parameters) available. Sample script will be provided soon. This allows for filling arbitrary (gts-defined, for example) volumes with irregular, high-quality sphere packing. 2. Add python-wrapped class SpherePack for manipulating sphere packings (loading, saving, spatial transformations, iterating) 3. Add shared_ptr Omega::rootBodyAnother to be used with Omega().switchWorld() 4. Move some stuff from gui/py to lib/py, which is more logical hopefully 5. If negative value is specified for TriaxialTest::thickness, wall thickness will correspond to the mean sphere radius (avoids spheres going through the walls during compaction for some radii) 1. Add automatic converter from python::tuple to Vector3r and vice versa. Wrapped functions can take/return Vector3r directly instead of manual conversion. Clean code that had to do that. Let me know if something breaks, the changes should not touch any python code. 2. Some preliminary work on wrapping Vector+Quaternion classes in python via py++ (not enabled, just the files are there) 3. Add forgotten _packSphere.cpp, thanks to Vincent for reporting. 1. Add scripts/test/gts-traix-pack.py to demonstrate triaxial packing generator. Remove useless include in GlobalStiffnessTimeStepper. 1. Fix STUPID (my fault, sorry!!) mistake in setting Interaction::iterMadeReal, which cause ElasticContactLaw to function wrong. It concerns a few other contact laws calling isFresh, which would return true as well. Sorry again. 1. Shuffling stuff around, moving most python things to py/ 2. Wrapping Vector3r, Quaternionr and Vector2r in python directly, see scripts/wm3-wrap.py 3. Change the way utils.box, utils.sphere and utils.facet works: arguments to physical parameters are passed as keywords, not as dictionary now (update your old code by passing **dict instead of dict as the last argument) 4. Fix a bug with useShear, now getting almost identical results for triaxial again. 5. Preliminary Triaxial::facetWalls, to be able to used Dem3DofGeom with Triaxial. (not fully functional yet) 6. TriaxialStressController::thickness is -1 by default now (get thickness from box width), as 0 is real value for Facets. Doesn't change beahvior in any way. 1. Update triax-perf.py 2. Add Omega().tmpToString returning string of :memory: saved simluation 1. add yade.plot.resetData(), which unlike reset() resets just data 2. Add scripts/test/compare-identical.py to run 2 simulations at the same time and check at every step (configurable) if they differ or not. 3. Add active=active line to GlobalStiffnessTimeStepper, which for some reason causes two same simulations to be the same. Any explanation someone?? 1. Add forgotten py/SConscript (sorry!) 1. Fix absolute path generated by py++ 1. Dump XML in ConcretePM in case of problems (nan's) 2. InteractingFacet::postProcessAttributes gives FATAL message if there are coincident vertices 3. Update triax-perf, add script and openoffice sheet to make table 4. InsertionSortCollider is used in TriaxialTest always (not only with fast) now. 1. Change prototype of Engine::isActivated() to Engine::isActivate(MetaBody*) 2. Add maxVelocitySq to NewtonsDampedLaw for analysis purposes 3. Add BoundingVolumeMetaEngine::sweepTime and ::sweepDist to sweep bounding volume by given predicted motion over time or by given absolute distance. 4. Add strided run support to InsertionSortCollider (using sweeping) 5. Add scripts/test/collider-stride-triax.py to play with the strategies of sweeping based on strides 6. Add O.interactions.countReal() 1. Fix collider-stride.py to match changed parameters. (it is quite useless now, anyway 1. Make NewtonsDampedLaw compute maxVlocitySq at every step anew. 2. Make InsertionSortCollider find NewtonsDampedLaw and get max speed from there. Together with InsertionSortColider::sweepLength, this makes stride adapted automatically to maxVelocitySq; this will described at http://yade.wikia.com/wiki/Insertion_Sort_Collider_Stride. 3. Update test script for that. 1. Handle clumps in a better way in NewtonsDampedLaw (only if asked by the clump itself) -- future parallelization work. (related to bug #398086) 2. InsertionSortCollider now knows when to run based on maximum distance the fastest body could have travelled. (It is actually the physical meaning of sweepDistance). Handle varying maxVelocitySq in a constitent way. 3. Add InteractionContainer::serializeSorted to sort interactions by id1 and id2 before serializing (useful for comparing XML files). Added Interaction::operator< to compare 2 interactions in that way. 4. Fix openMP strategy in InteractionDispatchers to "guided" (as per https://blueprints.launchpad.net/yade/+spec/omp-schedule-strategy) 1. Remove doc/removed, it is in SVN history 2. Tune debian scripts to install docs+examples+scripts instead of headers (targets https://bugs.launchpad.net/yade/+bug/398174, but not yet finished) 3. Add depends on python-numpy instead of python-scientific packages for debian 4. Add ../py directory to doxygen (targets bug #398190) 1. Change NewtonsDampedLaw to a StandAloneEngine 2. add .updateExistingKeys (perhaps should be updateExistingAttributes) to all python-wrapped yade objects, which will change only existing attributes from given dictionary 3. Adapt STLImporterTest to new nicer syntax. 1. Add virtual destructors to all EngineUnits so that they can by dynamic_cast'ed to. This fixes possible crash from python, bug #398255 2. Rename updateExistingKeys to updateExistingAttrs, add updateAttrs. 3. Add forgotten script to demonstrate predicate operators 4. The default debug level is -ggdb2 (instead of -ggdb3). Libs are about 60% in size and still give the same debug information. 1. Rename scons option arcs to PGO (profile=guided optimizations) 2. Install only binaries by default (no docs, must be requested from cmd line via path) 1. Various fixes related to generating debian packages 1. Fix EngineUnits linkage for SImpleViscoelasticRelationships 1. Add velocity binning for collision optimization: requires cooperation of NewtonsDampedLaw, BoundingVolumeMetaEngine and InsertionSortCollider. 2. Remove time-based sweeping from BoundingVOlumeMetaEngine. 3. QtGUI doesn't show annoying warning when run from python session anymore. 1. Parallelized NewtonsDampedLaw (scales very well) 2. Parallelized VelocityBins 3. Add const modifier to BodyContainer::size 4. Add virtual dtors to PhysicalAction{Damper,Applier}Unit (for dynamic_cast'ing) 1. Move NewtonsDampedLaw to StandAloneEngine directory 2. Add omp critical to ConcretePM 3. Remove SphericalDEMSimulator 1. Add sweepLength to TriaxialTest if fast==true 2. Remove euclid from the pack module, since we use wrapped wm3 now. 3. Add _packObb.cpp to compute minimal oriented bounding box on cloud of points 4. inGtsSurface predicate with triaxialPack will work on the minimum OBB 5. Add check for engine to prevent crash as per https://bugs.launchpad.net/yade/+bug/399810 6. Enhance the pack.inSpace predicate to work as expected. Custom center can be given to the ctor 1. Fix non-tuple in graph specification 2. Allow plotting agains the y2 axis, after a special parameter '|||'. 1. Remove mutex from requestErase (should be verified to compile on non-openMP machine!) 2. Add mutex to PhysicalParameters, so that body state can be locked while updating from the interaction loop. 3. Add linking with EngineUnits to Tetra (thans Emanuelle) why..?? 1. Adapt simple-scene-graph.py to new instance syntax 2. Add support to y2axis to saved gnuplot plots 3. Change interface for yade.plot.addData to take **kw instead of straight dict (still backwards-compatible) 1. Do not use REGISTER_ATTRIBUTE anymore, use REGISTER_ATTRIBUTES instead everywhere. This generates (in addition to serialization code) also some python code and makes python independent on the yade serialization framework (Janek, if you want to try boost::serialization, I have no objections now). 1. Remove garbage from doc 2. Instruct getopt to not shuffle command-line arguments, so that their order is preserved 3. Add epydoc documentation for all python classes and functions 1. Fix linking logic for _packPredicates (fixes https://bugs.launchpad.net/yade/+bug/401029) 2. Make gts-horse coarse original horse automatically Fix small bug in Velocity bins related to max sweep length (should improve performance as well). Still some incorrect things WRT bboxes, it seems. 1. Fix mathematical error with VelocityBins, verified by new script scripts/test/collider-sweep-simple.py to be correct 2. Add py/ directory to skipped dirs for linkdeps.py so that it works on current trunk 1. BIG CHANGE: pkg/ no longer have SConscript files but are scanned at startup for plugins. See http://yade.wikia.com/wiki/ImplicitBuilds for some details. Let me know if there are some problems. add boost-serialization and boost-program-options to debian. 1. Move STILimport to pkg/dem, as it depends on dem 2. update RockPM with the new-old version (probably svn didn't update the moved version? what a deal. We should definitely move to bzr...) 1. Fix unreported version for the debian build 1. Fix snow compilation by #including Voxel/* files in SnowVoxeslLoader and noc compiling them directly (sorry) 2. STLReader is a pure-header import lib now, tolerance is passed as regular data member. 3. Fix all warnings in ConcretePM. 4. Merge lib/yade-* into lib/yade-support. 1. Fix monolithic compilation even with fem. All modules can now be compiled that way. fix compilation? Fix TetraTestGen crasher (functionally still brokne, though) Remove SDECLinkGeometry, replaced by SpheresContactGeometry at a few places. Not checked for functionality. This avoid many warnings. 1. Fix linking with full Wm3 library 2. Automatically add /usr/include/wm3 to CPPPATH if useMiniWm3=False 1. Hopefully fix https://bugs.launchpad.net/yade/+bug/402098 2. Fast in TriaxialTest uses nBins==5 and binCoeff==2 for VelocityBins 1. Fix SnapshotEngine and simple-scene-video.py to run. It doesn't work, though, because of the makeCurrent() failed error (probably getting snapshot from another thread...) 1. Add GLViewer::nextFrameSnapshotFilename to save frame in postDraw 2. Adjust SnapshotEngine to take advantage of that. This should solve https://bugs.launchpad.net/yade/+bug/396023 3. utils.encodeVideoFromFrames can take list of files (instead of just wildcard). Backwards-compatible. 4. scons doc skips debian/ directory (would mess up if deb package was build) 1. Fix for https://bugs.launchpad.net/yade/+bug/406343 (at least for me) 1. Add GenericSpheresContactClass to unit radius1, radius2 and normal between SpheresContactGeometry and Dem3DofGeom (to make it work with GlobalSitffnessTimeStepper). Partially solves https://bugs.launchpad.net/yade/+bug/399963 1. Add docstrings to all wrapper.Omega() methods 2. Fix a few warnings. Fix has_map warning and one more in FlowEngine. 1. Add infrastructure for getting temporary filenames in a secure manner to Omega 2. move selectedBOyd to MetaBody; initialize it properly to avoid possible crash. Remove leftover SConscripts. 1. Change syntax of YADE_PLUGIN("Plugin1","Plugin2") to YADE_PLUGIN((Plugin1)(Plugin2)) (replaced everywhere) 2. Add some perliminary and not-enabled by default support for boost::serialization (see ClassFactory.hpp) 3. Add boost::serialization code for Se3r, Vector2r, Vector2, Quaternionr 4. Do not reset BexContainer's moves and rotations uselessly (i.e. if not used) 5. Use Omega's mutex in SimulationController to prevent loading-related crashes 1. Don't use __COUNTER__ to generate plugin registration function names, as they wre added in gcc 4.3 Use the name of the first plugin instead. 2. Dem3Dof_SphereSphere takes touching distance as equilibrium if distanceFactor is <=1. The initial position otherwise (was the default everytime until now) 1. Generate proxy constructors to all classes deriving only from Serializable in python (like GLDrawBox and similar). 2. Fix scripts to have the new syntax everywhere, since e.g. EngineUnit is just abstract class that cannot be instantiated from python. 3. Add check fro valid data before saving plot to gnuplot; raise comprehensible exception if there is nothing to save. 4. Remove leftover scripts/pch.py 1. Add an example of uniaxial tension-compression test for concrete (ready long time ago...) 1. All different yade types are real python types now. They have their properties defined at startup. One can say O.bodies[0].shape.diffuseColor instead of O.bodies[0].shape['diffuseColor'] now. It also works much better with ipython tab-completion. It is not sure whether we will be able ever to deprecate the old object['attribute'] syntax. 2. Wrap ParallelEngine in python, and finish Dispatcher wraps as well. 1. Reset interaction radius after the initial contacts have been created. Fix FileGenerator wrapper in PythonUI_rc.py (has different name in c++ (FileGenerator) and python (Preprocessor). 1. Rename Preprocessor in python to FileGenerator, to be consistent with c++. Preprocessor is never used directly, anyway. The old deprecated name put in the deprecation table. 2. Manage crash at exit in defaut-test gracefully 3. Fix serialization of pairs (overlooked replace) 1. Initial attempt at regression tests (only the python wrapper so far); run scripts/regression-tests.py 2. Fix a few bugs discovered that way :-) 1. Replace PersistentSAPCollider and DistantPersistentSAPCollider by InsertionSortCollider everywhere. The two are still in the sources, but are not compiled. Will be removed in near future. Added to deprecated table in python so that old scripts still work. 2. Add some more regression tests for the python wrapper. 3. Fix timestep in HangingCloth (it does some weird things, can someone check it or just remove mass-spring from the tree?) 1. Be more tolerant to specifying invalid GUI at the command line 2. Throw exception about unopenable $DISPLAY rather than letting QApplication abort() 1. Fix https://bugs.launchpad.net/bugs/409254 https://bugs.launchpad.net/yade/+bug/409254 take 2 Maybe fix https://bugs.launchpad.net/yade/+bug/409365 1. Fix (?) https://bugs.launchpad.net/yade/+bug/409254 by moving ClumpTestGen out of Clump.hpp 2. Avoid warnings in STL import code (return values _should_ be checked, though!) 3. Avoid warning in yade.cpp in optimized build 1. Infrastructure for periodic collision handling. Not at all functional at this moment, don't even try to use. 1. Beta version of periodic boundary conditions (try scripts/test/periodic-simple.py 1. Assign new function O.exitNoBacktrace to sys.exit. Fixes partially https://bugs.launchpad.net/yade/+bug/410250 2. Add some more comments to periodic stuff. 1. Script that shrinks the periodic cell progressively (reveals bugs in the collider, though ;-) ) 2. Add function to compute total force in volume from interactions to Shop, wrapped in _utils as well. 1. Working periodic collider, yay!! scripts/test/periodic-grow.py shows that 2. A few changes related to that. 1. Add PeriIsoCompressor for periodic isotropic compression; see scripts/test/periodic-compress.py. Not so much slower than regular triax, nice surprise. 2. Make SpherePack standalone class (previously just in python's _packSpheres), add the function to generate cloud of spheres, both periodic and non-periodic. _packSpheres wrapper is update, but otherwise not changed. 3. Fix python-less compilation for se3 interpolator engine 4. Add Omega().runEngine() 5. Fix some compilation/linking issues. 1. Fix missing vtable for GenericSphereContact (crasher with debugging) 2. Fix collider stride for TriaxialTest with unspecified radius 1. Try to fix locking with boost-1.35, possibly fixes https://bugs.launchpad.net/yade/+bug/411572 (please confirm) 2. Add periodic repetition function to SpherePack 1. Fix linkage for boost<=1.34 (hopefully) 1. Fix a few things in SpherePack 2. Remove TriaxialTest::GenerateCloud, replaced by SpherePack::makeCloud 3. Fix crash in BoundingVolumeMetaEngine, if MetaBody has no boundingVolume 4. Improve sorting operator, remove workarounds for std::sort wrapping minima/maxima (https://bugs.launchpad.net/yade/+bug/402098) 5. Limit minimum cell width in PeriIsoCompressor, to not crash. 6. Add code for periodic packs in pack.triaxialPack (not yet fully functional) 1. Add #pragma once to SpherePack.hpp (possibly cause of https://bugs.launchpad.net/bugs/412442) 2. Fix crash in TetraTestGen (finally, I think), closing https://bugs.launchpad.net/bugs/408422 3. Add highlight parameter to utils.{facet,sphere,box}, passed to Body::geometricalModel 1. Fix assertion is 2d dispatch code, add indices to RpmPhys, RpmMat, CpmPhys, CpmMat (would break dispatching if using more classes derived from the same base in the dispatch matrix) 1. Remove {,Distant}PersistentSAPCollider and Fixed{Position,Orientation}Engine classes 2. Add test script for generating packing 1. Summarize important changes since the last release. Add your own things, if they are important for everybody (svn log has the small details) 1. Add scripts/rename-class.py for renaming classes (replaces in code, moves files with bzr, adds rename record to python). Not very well tested, though. 2. Remove core/StandAloneSimulator.*pp (not used anymore) Add ignore patterns so that bzr st doesn't show (some) generated files 1. Merged upstream changes. 1. Clen the plugin loading logic a little (no nominal win32 support), support YADE_PREFIX for changing prefix (should be runtime-detected inthe future, anyway) 2. Use $ORIGIN in rpath to make yade relocatable; it can be fragile, let me know if there are troubles! 3. Add make check to the debian package (will be tested soon) 1. Add compatibility for hardy 2. Fix missing newlines (hardy compiler gives warning) Adjust rpath for the main executable (ugly hack) Run tests in debian package (not failing if the test crashes, though, for now) 1. IMPORTANT! All features are lower-cased now (avoids mess: openGL or OpenGL etc). This will probably break your profile files. 2. IMPORTANT! openmp is one of features, no longer a separate options. Adjust your profiles 3. Rename LOG4CXX to YADE_LOG4CXX; all features now #define YADE_FEATURE macros 4. Better $ORIGIN syntax in scons 5. Abort yade if running PythonUI_rc.py fails 6. Adjust pbuilder script 1. Add wrapper for running tests, to trap exit segfault at squeeze 2. Use the wrapper for tests in debian/control 3. Add wrapper for vector Make the test script report what distribution failed (currently only karmic). Fix GTS features (thanks for spotting that; we need regression tests for all the modules) 1. Skip more stuff in doxygen, a few warnings 2. Add debugging code to DynLibDispatcher (disabled) 1. Rewrite 2d dispatching code from scratch 2. Expose classIndex to python for indexable classes 3. scripts/test-sphere-facet.py shows how the dispatch matrix fills with data Add python 2.5 compatibility hack Avoid error in pack.triaxialTest if compiled without GTS. 1. PeriIsoCompressor: add keepProportions parameter (on by default), decrease global updates interval. 2. Omega: startSimulationLoop warns if there is no simulationLoop (how can that happen? It somehow can) 3. SpherePack: resets periodicity (and warns) if being rotated; cellSize is writable now. 4. pack.triaxialPack: renamed to pack.randomDensePack; fix loads of stuff in that; rename radiusStDev parameter to rRelFuzz; add epydoc documentation; fix erroneous detection of inGtsSurface being defined 5. wrapper: lock renderer when adding list of bodies; Omega().resetThisWorld to reset current world only. 6. Fix scripts/test/{gts-random-pack.py,gts-random-obb.py} ef2_Sphere_Sphere_Dem3Dof: change meaning of distanceFactor, see docs (if < 0, equilibrium is sum of radii, otherwise the initial distance; defaults to -1). Renamed to distFactor, to break old code intentionally InteractingSphere2AABB: allow negative aabbEnlargeFactor, which doesn't scale aabb at all (same as if it is 1.) yade-multi: use the first non-blank line as column headings (not necessarily the first line of the file, as is used to be) SpatialQuickSortCollider: fix clearing interaction with openMP examples/concrete/uniaxial: move files around, add confinement and docs; remove examples/concrete/pack since not in the pack module (an example should be given, though) examples/collider-perf: remove PersistentSAPCollider, add InsertionSortCollide with strides, but commented out since no effect at hthe beginning of simulation PeriodicInsertionSortCollider: remove unnecessary (hopefully) condition that would abort in scripts/test/periodic-simple.py PeriIsoCompressor: fix absolute displacements changing proportions, operate on averages instead pack.randomDensePack: fix proportions in periodic packs; change residual stress to 1e8 instead of 1e9 SConstruct: remove obsolete (unused) standalone openmp option yadeWrapper: Fix compilation with boost<1.35 (again) (now?) 1. Fix startup crash if no $DISPLAY set at all miniWm3Wrap: update with newer py++; still errors out at karmic spirit: avoid warning with newer boost versions Add gts to depends on the script. Remove unnecessary inclusion of indexing_suite which breaks compilation for boost<1.34 (or something like that). utils.uniaxialTestFeatures: fix compat with py2.5 SConstruct: fix compilation issues with older symlinks in include dirs Fix OperationalError, reported by Janek in https://bugs.launchpad.net/yade/+bug/416906 SConstruct: add doc for pretty, fix a few lib checks on karmic Fix version detection on systems where version is not specified by hand or in RELEASE file and bzr is not installed main: disable SIGHUP handler (emergency save) and automatic loading. 1. Remove garbage from examples. 2. Fix SpheresFactory, fix examples/SpheresFactory/model.py move SpheresFactor to scripts/test as it doesn't work. Add notes to changelog and news. Forgotten file Mark release version Add mill script mimicking http://www.youtube.com/watch?v=005rdDBoe4w Some changes in qt interface (useless) Add series to package version to allow same version for multiple series in the ppa (0.20-1~hardy, 0.20-1~karmic etc) Added script for http://www.youtube.com/watch?v=KUv26xlh89I 1. Fix facet lighting, mill shown with wire=False now (looks better) 2. Revert recent useless change in QtGUI-python 1. Enabling O.timingEnabled when running will not produce garbage values for current engine anymore 2. Add maxRefRelStep to VelocityBins, to limit speed fo maximum velocity changes 3. Fix epydoc format for utils.encodeVideoFromFrames and utils.uniaxialTestFeatures 1. Do not save potential-only interactions to the XML; do not save pendingErase interactions (are only potential) 2. Do not save interactions in SQLiteRecorder by default (saveInteractions=True if you want the old behavior) 3. Add slider to the simulation player, in the "snaps" tab 1. Add scene that has been sitting here for a few days (should be run for comparison with pfc3d) Workaround bug #416335; static members of Vector3 work only on instance, e.g. Vector3.ZERO will not work, you have to use Vector3().ZERO; changed all occurences in the code accordingly, update your scripts as well.\n2.Some undocumented and untested enhancements for parameter table (backwards compatible) ================================================== yade-0.12.1 Sat, Nov 22 22:48:27 2008 +0000 Bruno Chareyre (6): A wrong comment on contact laws in PFC3D is removed. svn update - no real change (in principle) - recovering from erased local file - Fix conflicts and prepare next implementation of isotropic compression - Few files missing in the previous commit. - Add a new class for computing/recording micromechanical data based on tesselation Still recovering from conflicted files... I hope this is the last one. A class with algorithm for analysing contacts-forces-displacements statistics. Using the triangulation lib. Janek Kozicki (14): ouch, forgot to mark INSTALL file as outdated. We need to update it. some cleanup in the files fix crashes of this->parentWidget()->parentWidget() in UI yade.cpp: more detailed info about compilation flags. LatticeExample: added material parameters bond zone between steel fibres and cement matrix update to use latest scons 1.0.0 don't refresh display when there's nothing to refresh support for generating multiple file with single NullGUI call add to SimulationController buttons for looking in different directions. The default view direction is now down along the direction of gravity. improved generation of steel fibres in lattice fixed snaphotNames in NullGUI for .xml.gz more configurable MakeItFlat, TriaxialTest can be now a biaxial test as well. small fixes in UIs make it compile with boost 1.35 (I wonder what 1.36 will bring) Fixed OpenGL problems with displaying spheres, which - never occurred on my desktop - I've seen them sometimes on other peoples computers, but never could reproduce them - but finally have appeared on my laptop. up direction on Y release 0.12.1 Jerome Duriez (7): Added : - Engines for simulating shear tests at constant normal displacement, normal stress or normal rigidity (CinemDNCEngine, CinemCNCEngine and CinemKNCEngine) for samples deriving from SimpleShear PreProcessor (added also, former DirectShearCis) - ContactLaw1 : a contact law with Moment Transfer and inelastic behaviour in compression : see comments. With correspondant Relationships and type of Interactions. NB : sorry for the name : i didn't search too long for a more explicit one but I think personly that the comments in the files (and I tried to put some) are far much better than the one - Add of the paragraph for the CL1Relationships, which was forgotten, in the corresponding SConscript A (last ?) error concerning last revision in the paragraph CL1Relationships : "CL1Interaction" does not exist, that's ContactLaw1Interaction -ContactLaw1 : correction of prototype of action() : it needed a body, whereas now action methods of Engines need a Metabody. This led the simulation to crash and is now fixed - SimpleShear : now all is normaly done so that this preprocessor could be used (with success) with this ContactLaw. Moreover it is now linked to the GlobalStifnessTimeStepper (instead of the ElasticOne) Suppress of some useful comments (sorry for the extra mail) (At last) The good Sconscript file - The GlobalStifnessCounter engine (for correct use of GlobalStifnessTimeStepper) was forgotten in the preprocessor SimpleShear... Sergei Dorofeenko (4): 1. A new algorithm for facets. It use only a class Facet, so classes Vertex and Edge are deprecated and has been removed. 2. Add functions to python gui for import geometry from stl and for creating facets. 3. Add Shop::inscribedCircleCenter for calculate position of center of triangle inscribed circle (use it for set facet's se3.position). 4. ForceRecorder now take cary about old data files and renaming them. 5. SimulationPlayer now allow wire body form view tab. 1. ResetPositionEngine is now inherited from PeriodicEngine. 2. Add examples/rod_penetration model and geometry. small fixes 1. New random-access interaction container InteractionVecMap (rewrited from InteractionVecSet) 2. Fixes: default initialization some attributes in SCG and IS2IS4SCG Unknown (2): I added a new state at the triaxial compression test in order to realize isotropic compression by the walls displacement until a indicated porosity value. These modifications can be seen with generator file "TriaxialCompression" in the last three parameters (added). I corrected my errors on the triaxialtest files.Moreover, i added comments in the TriaxialCompressionEngine.hpp. Vincent Richefeu (4): - initialize radius in InteractingSphere constructor. - add new plugins used for membrane modelling. - add GLDraw plugin for BssSweptSphereLineSegment displaying - 'Membrane' (in fact geogrid) has been improved but still doesn't work... - the class GroupRelationData has been add (not used yet) to define interacting parameters such as coefficient of friction or restitution that have nothing to do in the bodies parameters (in my opinion) - forgotten files Václav Šmilauer (44): Move big news to NEWS, ready for release finally (?) Update INSTALL file from wiki (brief instructions only). 1. Reimplement some loop-intensive functions from yade.utils in c++ for better performance (as yade._utils, imported into yade.utils automatically - transparent to the user) 2. Add poisson's ratio and Young's modulus estimation in yade.eudoxos based on linear regressions of position→displacement mapping along different axes 3. Rename Shop::ElasticWaveTimestepEstimate to Shop::PWaveTimeStep, wrapped in yade.utils 1. Add python interface for blocking DOFs: b.phys.blockedDOFs=['z','rx','ry'] It is friendlier than b.phys['blockedDOFs']=1<<2|1<<3|1<<4. The property is read-write. 1. Add code for computing histogram of interaction directions in given plane in _utils. 2. This is code is used by yade.eudoxos.plotDirections() to create the actual (nice) figure. 1. Skip (almost) exactly zero projections, implement masking of bodies. 1. poisson and young estimator now works on a fractional part of the speciment 2. do not switch ui automatically if selected explcitly 3. body::maskOK to check mask 1. eudoxos module cleanups, young estimator arg chages 2. fix harmless compiler warning in _utils.cpp 1. add utility function to compute elastic energy within a volume (the dynamic_cast to NormalShearInteraction still fails; what is going on?) 2. add utils.fractionalBox, an AABB reduced to its fraction 3. fix fixmes in Force and Momentum about unused functions about to be deleted 4. plotting interaction direction histogram now works on contrained volume (to study boundary influence on the distribution) 1. Beginning hijacking SpheresContactGeometry to hold more elaborate geometry characteristics, such as relative shear displacement. By default, those parameters are neither calculated nor displated (exactRot==False; must be set to True in ISphere2ISphere4SpheresContactGeometry to enable it). Test script is in scripts/exact-rot.py 2. Remove deprecated code from UniaxialStrainController 3. Add GLUtils to draw lines, text, numbers -- copid over from Shop 4. Add operator<< for Quatrnions (axis angle) 5. Fix energy calculation in volume (in _utils.cpp) 6. Other fixes here and there... 1. The exactRot code is reasonably verified now to be functional, including rolling correction (SpheresContactGeometry::relocateContactPoints) and will used in brefcom soon. 2. Updated the "testing" script scripts/exact-rot.py, as a showcase as well. 1. Remove GL things from Shop, moved to lib/opengl/GLUtils.hpp 2. Cleanup of SpheresContactGeometry code, rename exactRot to hasShear (I thought most of this was already commited?!) 1. Delete unused IS2IS4DistantSpheresContactGeometry (merged with IS2IS4SCG), adapt existing code 2. Adapt new facet code to updated SpheresContactGeometry (only superficially tested) so that they can interact using BrefcomLaw; add scripts/exact-rot-facet.py to show that. 3. Fix a few missing loggers in others' commits. 4. SimulationController redraws if iteration changes (the +1 button would otherwise not cause redraw) 5. Remove cruft from Brefcom. 6. Fix inheritance (dynamic casts) of NormalShearInteraction and of BrefcomPhysParams 7. Remove cruft from UniaxialStrainer 8. Add some python code to compute stress from stored elastic energy. 1. Move interaction direction distribution pie histograms to utils 2. Add plotting histogram of number of contacts to plotDirections() 1. Omega().bodies.append can take list of bodies now (instead of just one body), returning list of added id's 2. utils.facet can take both tuples and lists for vertex coordinates 1. Add NormalInteraction::normalForce and NormalShearInteraction::normalForce (moved up the hierarchy from ElasticContactInteraction) so that unbalancedForce can be calculated on any subclassed interaction type. 2. Adapt Brefcom for this. 3. Add Shop::unbalancedForce and utils.unbalancedForce 4. Add workaround for saving ipython history as suggested by http://lists.ipython.scipy.org/pipermail/ipython-user/2008-September/005839.html 5. Fix AxialGravityEngine to register parent class attributes. 1. Avoid compiler warning in optimized builds from pyOmega 2. Body containers now allocate the lowest possible ID for each added body. The old behavior was to allocate the first free ID greater than the ID of the body, if it was already set. Please let me know if this is critical for someone. We can do things like: 1. 3d view now has by default a OSD with iteration number, simulation time and virtual time. This can be toggled (all combinations) by pressing 'D' (which used to mean toggling d+ynamic flag...?) and set also from python with GLView.timeMask='rvi' (Real,Virtual,Iteration) and so on. 2. Simulation player displays real time and wall clock loaded from db (insted of bogus values of system clock when the player is being run) 3. new periodic SnapshotEngine that takes snapshots of any GL view to numbered PNG files. 4. new function qt.makeSimulationVideo that makes video _while running the simulation_. 5. qt.createVideo renamed to qt.makePlayerVideo 6. Added Omega method to query computation duration. 7. An example of using qt.makeSimulationVideo is in new file scripts/simple-scene-video.py 1. Add forgotten SnapshotEngine 2. BodyRedirectionVector always really find the lowest unused ID (the same for BodyAssocVector) 3. add Omega().interactions.clear() in python 4. Move the "Less than 500 bodies, moving possible" to LOG_INFO instead of on-screen since it disturbs videos taken during simulation... A few fixes in TriaxialTest: 1. radiusStdDev is a registered attribute parameter 2. skip unloading phase if sigmaLateralConfinement==sigmaIsoCompaction 3. new bool autoUnload, that controls automaticity of going from compaction to unloading; autocompressionActivation controls from unloading to loading. Note: IFacet2IS4SCG is broken, but not yet fixed. 1. TriaxialTest now takes readiusMean argument (by default negative, i.e. disabled); if >0, box size is scaled so that both requested porosity and mean size can be preserved. 2. Attempt to fix computation of stress from stored elastic energy. 1. Fix adding empty engine if record wall stress interval <= 0 in TriaxialTest (bug introduced yesterday) 1. Add Interaction::swapOrder(), for use in EngineUnits that want to avoid calling goReverse() 2. SnapshotEngine can sleep specified number of msecs after shot, which probably can avoid some hw problems (make_current failed in mesa, freezes etc) 3. InteractingFacet2IS4SCG now works "correctly" (not exactly physically, though) with shear 4. DynLibDispatcher should report names of classes if dispatch fails. 1. Add InteractionGeometryMetaEngine::explicitAction and InteractionPhysicsMetaEngine::explicitAction for creating contacts manually using the dispatcher 2. add utils.createInteraction(id1,id2) that requests explicit transient interaction creation 3. Add sample ElasticContactLaw2 (in ElasticContactLaw.cpp) that uses new SpheresContactGeometry code and can be used for "persistent" (transient but not deleted by the collider) contacts. 4. Add Shop::applyForceAtContactPoint (applies contact force at contact point to both bodies (reversed for body2) and moments acting on their cenroids as well) 5. All the previous new functionality is demonstrated in scripts/chain-distant-interactions.py. 1. Add Omega().reload() 2. Create map Omega::memSavedSimulations, where simulations are saved if they begin with special sequence ":memory:" and can be loaded again, within lifetime of Omega. 3. Add Omega().tmpLoad() and Omega().tmpSave() that use the above mentioned thing. 4. add utils.readParamsFromTable that reads any python variables from text file (useful for automatic parametric studies) 5. Add less expensive routine for sontact point relocation in SpheresContactGeometry 1. Separate player into two windows (controller and the 3d view); the controller may be hidden with ::hide() (and ::show()) or with Alt-H from the 3d view. This allows for correctly restoring 3d view size. Closing any of the two closes the player. Please log crashes, if any. 2. Update QtGUI-python.cpp: runPlayerSession 1. Yade now runs TCP server at the first free port above 9000 (accessible from localhost only), which simulates python console. (let me know if you need this over network -- it is DANGEROUS, since someone can delete all your files etc without any authentication). The interpreter has its own namespace. 1. Fix crasher (under special circumstances) in PersistentSAPCollider (deletion invalidating iterator) 2. PeriodicEngine now takes nDo and nDone attributes, limitng number of activations 3. Fix minor things is BrefcomDamageColorizer, add normalized damage to BrefcomPhysParams 4. Fix some indents in Triaxial Fix stupid sign mistake when applying contact force in brefcom. 1. PythonTCPServer now generates random 6-letter cookie (password) at startup and authenticates all connections by that cookie. It can be retrieved from yade.runtime.cookie 1. Add Body().mask in python 2. Add PhysicalParameters().pos and .ori instead of ugly pp['se3'][:3] and pp['se3'][3:] 3. Add dmgPlane plot in brefcom 4. Do not delete renderer if we close the last view (loses all renderer settings) 1. Add a quick implementation of bending and torsion code to SpheresContactGeometry 2. Update ElasticContactLaw2 to use that code; stiffnesses are hard-coded for now. 3. Update scripts/chain-distant-interactions.py to show that that code really works 4. Plot residual strength instead of damage in brefcom 5. Add some functions for spiral projections (not correctly working yet) 6. Fix missing std:: in DisplayParameters 1. Add 2d weighted average smoothing abstract class and its specialization on symmetric gaussian kernel, with python glue of course. 2. Remove .gz support. 3. Fix some bugs in the spiral projection code. 1. Fix errors preventing compilation due to missing TesselationWrapper. !! IMPORTANT !! Introduced new dependency on "python-numpy" package (numpy/ndarrayobject.h header), which is now checked for by scons. Tell me if this is not OK! 1. Add initializers for all SpheresContactGeometry members, to avoid nan's in the .xml file 2. Add code for saving arbitrary python variables within the .xml file, see documentation on utils.saveVars() and utils.loadVars() 3. Fix error (hopefully) caused by dangling symlinks in the symlinked buildDir/include tree 1. Fix algebraic typo in max distance check. 1. Commit simple parametric study interface, documented at http://yade.wikia.com/index.php?title=ScriptParametricStudy and wrapper script to queue jobs, which is installed as yade-trunk-multi, yade-trunk-opt-multi and so on. 2. Examples of such parametric "study" added in scripts/multi.py and scripts/multi.table 3. MetaBody now create Omega().tags['id'] at initialization like '20081028T102950p15498' (date, time, pid) that is unique 1. Changed colors to be random by default on utils.{sphere,box,facet} 1. Make our intelligence-challenged deserializer finally gracefully handle nan, inf, -inf (arbitrary lower-upper case). 2. Fix crash in MembraneTest (leftover in the commit from testing, oh well) 3. Add TriaxialTest::fixedBoxDims to not scale selected box dimensions if sphere mean radius is given (example underway). 1. experimental support for Real==long double (#defines QUAD_PRECISION, scons quad=1). long double is not necessarily quadruple precision (not on IA32, at least) though, but is still more precise than double. (search "long double" on wikipedia) 2. Some preparation to compile with -std=c++0x (not yet functional) WRT and boost::shared_ptr vs. and std::shared_ptr 3. Fixed in yade-multi. 4. New direct oofenm exporter in yade.eudoxos. 5. Don't fiddle with termios in non-interactive sessions. 1. Add INTEGER (besides FLOAT) to the list of wrapped c++ types in python. Fix type detection for long double 2. Fix Real->double conversions in GLDrawBssSweptSphereLineSegment.cpp 1. Body().phys.refPos is directly accessible now (old way Body().phys['refSe3'[0:3]] still works, though) 2. Labeled engines are at load-time or when Omega().engines are modified assigned to variables __builtins__.label; for example Add forgotten file. ================================================== yade-0.12.0 Wed, Aug 20 14:37:02 2008 +0000 Janek Kozicki (8): testing if SVN commit messages can go to launchpad eliminate crash on simulation reload. commented out line 241 in QtFileGenerator.cpp some small bugfixes that allow all non-broken filegenerators to run. Those based on SDECLinks will never work, so just put "return false;" there to indicate failure. use NDEBUG to detect optimized builds in FEMBeam and HangingCloth small changes in Lattice small bugfix in scons (by Vaclav) No idea why dynamic_cast fails while static_cast works in TriaxialCompressionEngine:275 and GlobalStiffnessCounter:63 when casting to NormalShearInteraction. We will use static_cast for now... New ChangeLog format. Now I will update with older revisions. But next time it's ALL OF YOU who will write this ChangeLog. It's not nice to write 200 entries once per year. Release 0.12 is ready Sergei Dorofeenko (1): Fixed small bugs and misprints Václav Šmilauer (22): 1. Remove unused GLViewer4 2. Add fairly straightforward GLViewer wrapper (manually wrapped) 3. Fix scripts/simple-scene-player.py that generates video 4. yade.qt module is now in python and imports * from yade._qt for the binary wrappers 5. importing qt if qt not running raises ImportError 6. utils.qtCreateVideo moved to qt.CreateVideo 7. Exponential softening in brefcom (untested) 1. DECREASED Mathr::ZERO_TOLERANCE to 1e-20 so that we don't get identity quaternions for small rotation in ToAxisAngle (!!) 2. Add glue for GLViewer, currently may crash, probably concurrency issues there 3. added yade.plot.reset() 4. add data smoothing (moving averages &c) function to yade.eudoxos 5. Omega().run(num#,wait=False): if the bool is True, it is equivalent to o.run(20); o.wait() for convenience 1. Fix file generator to properly return bool. This fixes some of default-test.py. Change python interface to throw on generator error rather than return bool. 2. Added python glue to set logging levels for individual loggers (from yade import log; log.setLevel('TriaxialTest',log.DEBUG) ) 3. Configuration file for logging is not monitored anymore, since changes from python would be lost 4. Added PhysicalParameters BrefcomPhysParams to prepare for storing volumetric strain; adapted utils.sphere and utils.box to take physParamsClass argument to determine what class to actually create (was always BodyMacroParameters, which is the default now) 5. Brefcom now computes unbalanced force (which is apparently broken as far as the numbers go) and volumetric strain. Many cleanups in Brefcom as well. 6. The collider now properly deletes interactions !I->isReal && !I->isNew && haveDistantTransient. More discussion is needed on that, though. 1. Fix USCTGen so that it works within default-test.py 2. Minor fixes as usual. 1. Fix all crashing preprocessors - for the price of SDECLinkedSpheres and ThreePointBending not really working - InteractingSphere2InteractingSphere4SpheresContactGoemetry only handles SpheresContactGeometry (and not SDECLinkGeometry), OTOH CohesiveContactLaw works only on SDECLinkGeometry. scripts/default-test.py passes now all preprocessors. 2. SDECLinkGeometry marked as deprecated. 1. Permit non-zero integeres as bool - sometimes the serializaer confuses bool with int; give warning to console about that. 2. the -opt profile (and optimize=1) generates instruction set for the current machine (gcc: -march=native) which means that the code may not run on different processor (e.g. core2 code will not run on Pentium IV). Please let me know if this is problem for someone. 1. Fix error with newer ipython coming from the fact that sys.argv wasn't defined in the embedded python env. 2. Fixes in brefcom. 3. stopSimulationLoop in TriaxialCompressionEngine if we enter LIMBO state. 1. Fix refresh period: use it for regular GL rendering as well 2. Make "open automatically" open generated simulation even if a simulation is already loaded 3. Fix crasher (on some machines) the close() was emitted 2× for QtFileGenerato 1. Fix a typo causing crash in the renderer. Fix another crash - rendering interaction that were, meanwhile, deleted during simulation being loaded. A more proper solution (like having a mutex on the whole rootBody that would be locked during loading) is welcome. 1. Remove draw mutex when loading simulation introduced a few days ago (may throw boost::lock_error under some conditions) 2. Restore default signal handlers before exit from main; set SEGV handler to nullHandler since on i386 we (on lenny consistently) get crashes in some log4cxx destructor. WARNING! This version crashes - but I don't know why and I please for help. Summary follows. 1. Fix GUI "crash" when trying to run python console without terminal (running by clicking an icon, for example): if no $TERM, run non-interactively 2. Select QtGUI over PythonUI if no $TERM set 1. Do not propagate exception to c++ (-> crash) if there is python exception in the script being run from command-line. Just print traceback and drop to the python console (unless stop after execution specified). 1. Kill building threads if the master thread is interruped in multi-builds (profile=a,b) Fix physical action index. test commit (whitespace) test commit 2 (whitespace) test commit (whitespace) 1. Fix catching all (including SystemExit) exceptions in python scripts. If nonInteractive or stopAfter, exit immediately, otherwise just print traceback and drop to the python shell. Reveals many unfunctional generators suddenly. 1. Fix nan's in SpheresContactGeometry 2. Fix ThreePointBending returning false on success (?!) 3. Add Preprocessor().load() method to python wrapper that generates to tempfile and loads it immediately. 1. Fix SDECLinkedSpheres returning false on succes (?!). ================================================== yade-0.12.0rc1 Sun, Jul 27 10:52:50 2008 +0000 Bruno Chareyre (69): Modifications in the equations of "non-viscous" damping. The equations are now as defined by Cundall. Engines are now compiled in a different order, with DeusExMachinas compiled last. The full DEM package has been compiled successfully after thuis change. IsotropicCompressionEngine removed from SVN. TriaxialTest do the same thing (i.e. isot. compression) better, and do more. The damping equations are reverted to their original expressions, with independant damping of each DOF. It looks like the convergence to equilibrium is faster with these equations. Squared distances are now compared instead of simple distances (faster) to decide if two grains are in contact. In addition, InteractionDetectionFactor is added as member data. The default value is 1, a value greater than one will allow the geometry of contacts to be created as soon as the distance is less than Factor*SumOfRadii. Usefull for interactions at longer distances (like capillary effects). A simple definition of contact stiffness based on E and nu : kn = E*size of sphere (so that apparent stiffness will be independent of size) ks = nu*kn A lot of small changes in triaxial classes, impossible to comment all of them; but note that : - TriaxialCompressionEngine can compress a sample to a dense isotropic state (either by moving walls or increasing the size of the spheres), - then change the confining pressure if needed (for running tests with different confining pressure on the same sample), - then start a triaxial compression test at constant zz strain rate and constant xx and yy stress (when the sample is considered stable based on StabilityCriterion). - The transitions between the different phases are (in principle) very smooth. Revert erroneous (and unexpected) changes in this pro file. Minor changes in the computation of the critical timestep. All files related to capillary law. Update of all classes related to dry and unsaturated triaxial tests. Modified definition of the interpenetration for box-spheres interractions. The previous definition was inconsistent. Correction of a wrong formula introduced in the last revision (the position of the contact point was wrong). Some changes in the computation of critical timestep so that the triaxial samples do not explode when dt is set to the automatic value. The change mostly affects the first steps of a simulation. Now, dt is computed at each timestep during the first steps, whatever the value of the user-defined variable "timeStepUpdateInterval", until a relevant value is found. Cosmetic changes in TriaxialTest. Initial zoom in the simulation player is set to a more reasonable value. UnbalancedForce member data was not defined in the constructor of TriaxialCompressionEngine, it was causing a crash when loading a TriaxialTest.xml. -TriaxialTest now includes a recorder to write stress history to a file. -safety factor is set to a smaller value in the timestepper as the computed value was still a bit too large in some cases. -UnbalancedForce is defined in TriaxialCompressionEngine() to avoid errors when loading a xml. Link TriaxialTest with WallStressRecorder in SConscript This commit contains new classes in order to simulate cohesive interactions with transient interactions. The new SAPCollider does set IsReal=false at each time step, neither do the Sphere2Sphere4Distant... engine. The user must set isReal=false in another engine (here the CohesiveFrictionalContactLaw engine) in order to have the interactions removed from the DistantPersistentSAPCollider list. All new engines are used in the CohesiveTriaxialTest. A REGISTER_ATTRIBUTE was missing in the previous commit. Some new classes related to the coupling with comsol (main author Andrea Cortis). FIXED : TriaxialCompressionEngine was stopping the simulation at each time step... 1- New contact law and related classes : CohesiveFrictionalContactLaw. It will be the most general contac law in Yade soon probably (TODO : include rotational effects like MomentRotation law). 2- New Stress-Strain recorder : TriaxialStateRecorder, autodetect the TrixialCompressionEngine of a MetaBody and write the parameters from it in a text file. 3- TriaxialCompressionEngine and TriaxialStressController are modified in order to compute stress and strain on demand. Modification in the usage of default values in GlobalStiffnessTimestepper. Change in dt default values in the preprocessors. Added some comments (doxygen friendly) and corrected the author in some of the source files related to the triaxial test example. In Yade.cpp : conditional compilation in order to compile with boost 1.33 In TriaxialTest.cpp : instanciation of a SimpleElasticRelationship object before adding it to engines (to avoid a crash). Vaçlav please, what is going on here?O Few "cerr" are back... Different fixes, including -TimeStepper : previousDt is now a registerable parameter, which can be used after saving/loading. New feature implemented : dt can be increased at a steady rate : dt=1.5*dt each time maximum (to prevent sudden increases and explosions). Comments added. -TriaxialTest : The timestepper is moved to a earlier location in the list of engines, so that the timestep is set before the stressController call. REMARK : REGISTERABLE dt IN THE TIMESTEPPER MAY BE REDUNDANT WITH THE "RECOVER TIME STEP" FEATURE OF YADE, DO WE NEED THIS ONE? -StressController : revert a small mistake in last commit. Fix the bug with BrefCom in GlobalStiffnessCounter. Samll optimizations. r1263 is +25% slower than r1264 based on tests on 2 different computers. Added NewtonsDampedLaw : The test on penetrationDepth is moved to a different line : no need for a "new SpheresContactGeometry()" when interaction->isReal will be false. A registered parameter (finalMaxMultiplier) was not set for the relevant engine. Fixed now. Parameters are adapted to the last modifications in TriaxialStressCompressionEngine. TriaxialStateRecorder : add the unbalanced force in 8th column. TriaxialTest : revert order of creation of spheres and boxes (boxes first), to prevent numbering problems in SAPcollider when using HydraulicTest. HydraulicTest : search engines and modify their parameters (desactivate stress control/activate gravity) dem/SConscript : link HydraulicTest with few more libs Safety coefficient on critical dt is changed to 1 (was 0.25 before). 0.25 was far too conservative. A bit (lot) of cleaning in TriaxialTest. Useless recorders inherited from the early ages of Yade are no longer present. Fixed interpolation for the case P=0. Added minimalist documentation. 1. TriaxialCompressionEngine is now saving at the end of compaction rather than at the begining of compression test, so that the simulation is saved when autoCompression is not activated (before this change, the simulation was going in LIMBO state without even saving, which means it was lost). Some cleaning. A link was missing between TriaxialTest and the NewtonsDampedLaw (new engine doing the same as the 6 previous integrating engines). A lot of fixes to make this engine work correctly regarding transitions between different states, including situations with saving/editing/loading. This commit contains an experimental version of the collider based on the triangulation package of CGAL.org. Compilation is disabled for the moment, but uncommenting few lines will enable compilation if CGAL and my (me=Bruno) own libs are available for linker. Contact law based on voronoi tesselation (using CGAL). Not included in compiling process now, this is for JF Jerier. This reverts a previous change in IGMetaEngine from Janek (interactions were set "new" when not real - problem was that non-distant interactions are ALWAYS "not real" when starting IG dispatching - so they were set new and reseted at each timestep, which disabled friction). What was supposed to be done in IGMetaengine is now replaced by something almost equivalent in the SAPcollider (the difference is that if an interaction is not real before being reseted by the collider, it really means that it is not-overlaping and not-physicaly-interacting). Again few changes in the behaviour of this engine, it should now handle correctly any manual change in the xml file (still needs a fix : there is still a part of the code that is done only at first iteration, which means that a modification of sigma_iso by editing the xml will give a different result than the same modification from PythonUI). Timestep safety coefficient is back to 0.25. - ks is registered in ElasticContactInteraction (it was not, which was a bug, but it was not affecting computation because initialKs was used to set ks=initialKs at each timestep). Added code for computing porosity in TriaxialStateRecorder and titles for colums in output history file (porosity is in the 9th column). 1+2 : added "Key" string in filenames. 3 : missed that hpp in previous commit. A small cast mistake. Corrected a local #include path. Added a function that can modify friction of all bodies/interactions. Usefull to compact at low friction and then perform the compression test with normal (higher) friction. Modify slightly the way shear displacement is computed to prevent "ratcheting" (see comment) Same modif as in ElasticContactLaw (previous revision) to prevent "ratcheting". Added a code that will be common to all output filenames to help sorting different simulation results. Some code for triangulation/tesselation using CGAL, it is experimental and not included in the build process for the moment. Fixed a bug due to a wrong macro definition in CGAL (CGAL_LIB_CREATE sould be "ar cr" instead of "ar cr ''"). This macro is not used now. - epsilonMax added to compressionEngine to stop simulation. - data files for Triangulation removed from svn - bool "isNeighbor" added to interactions, used in triangulationCollider. - Modified numerical scheme to reproduce a standard 2nd order finite difference scheme integration (more stable). - TimeStepSafetyCoefficient can be set to 1 rather than 0.25. - same change still to be done in the separate LeapFrog engines (the default TimeStepSafetyCoefficient is 0.25 in the meantime to prevent explosions with preprocessors using those separate engines). NewtonsDampedLaw : fixing a small mistake and cleaning the code. IMPORTANT NOTE : Forces/Moments are not affected by damping now, only accelerations are modified. The result is the same in terms of damping, but users can now get the exact values of forces/moments on bodies at any point during a timestep. Mostly small changes and fixes from previous weeks. Sorry for such poor comments... ks is added to registered parameters. Fix a problem resulting in VectSet (default) and HashMap being used simultaneously for transient/persistent interactions in the same simulation (which for unknown reasons is not good). Janek Kozicki (82): added info where are the pictures for the user manual can be undeleted from the history if anybody needs that directories for Czesiu and Tiziano to work on yade packages: debian and gentoo. later we can add directories for .rpm, etc.... - better DynLib error reporting - new Lattice, only 2D - triaxial test from Bruno - deleted unused QGLThread Fixed some problems with yade-flat deleted yade-lib-time, and using boost::posix_time instead - it is possible to select (shift click) and 'm'ove bodies in the simulation view window. a dirty implementation. Needs major refactoring. - the "display" tab now offers the ability to set 'display refresh rate' in [ms] so it's like the priority of draw. renaming SimulationRunner -> ThreadRunner SimulationFlow -> ThreadWorker renaming done. FileGenerator now does not block whole GUI when generating. And can be stopped if function generate() calls somewhere in the loops: small fixes to ThreadWorker Graphics display can be now synchronized with the calculation without problems, and without blocking GUI - more improvements in ThreadRunner, ThreadWorker::~ThreadWorker and SimulationController - fiddling with lattice: angle between beams is now calculated in 3D not 2D, with tracking of positive/negative angle. So the angle is between -180 and 180 deg, while arcus cosinus can only give a result between 0 and 180 degrees. Finally deleted swiftpp and qhull. Now we have less license problems. There is still license problem with math library, though. ... ... Some cleaning, involving changing variable names, like Body::interactingGeometry. Which caused almost all the files to be modified. oops, forgot to commit MyTetrahedronLaw renaming: ElasticContactParameters ElasticContactInteraction renaming cd... renaming finished: ElasticContactParameters ElasticContactInteraction added GLDrawStateFunctor. So now it is possible to see bodies' velocity, acceleration, angularVelocity, angularAcceleration. And other State attributes of a body. =========-----------------============ -------------------------------------- NullGUI allows to call a FileGenerator Omega throws when loading bad simulation file ----------- SimulationController catches that error from Omega :) (when loading bad file) 'C' key centers scene on selected body 'D' sets the 'isDynamic' flag of selected body. (select it twice to unset this flag). -- flag that allows to enable/disable calculating of torsion LatticeExample FileGenerator can now generate a 3D tetrahedral regular grid. (before there was only orthogonal grid) Added drawMask to OpenGLRenderingEngine, it is now possible to see only bodies that have a certain groupMask Added non-working scripts that can compile yade using waf. At least they are not working for me. -- removed invMass and invInertia. Removed special handling for division by zero. mass shouldn't be zero anyway. Matrix3 patch from Vaclav - FileGenerator reports how long the generation took - yade.cpp takes PREFIX and POSTFIX as #define /some/path , without " - small change to lattice generation method - Makefile cleans after scons - SConstruct: removed \" from defines in PREFIX and POSTFIX line 147 added -pthread for g++ 3.3 moved env.Append(CXXFLAGS=['-pipe','-Wall','-pthread']) before invoking the tests changed "nor" to "not", line 271 removed PATH, becuase I couldn't get it to work. so instead I set CXX='distcc g++-3.3' - FileGenerator shows generation time, and saving time - QtFileGenerator remembers save file name (so it is not always ../data/scene.xml), this was done in previous commit. A small bugfix here - OpenGLRenderingEngine didn't draw Body when it's groupMask was 0 - some changes in lattice. - I added GeometricalModelForceColorizer. It is another hacky Engine that I have added (along with Quadrilaterals). I did it, because I wanted to see spheres colored according to force acting on them. This is a hack because the GLDraw mechanism is currently very limited, and has to be extended to allow things like this. So currently it works, but not in a way it should be done. GLDraw* changes are coming ... soon :) In this commit I made Interactions drawable by GLDraw*, and I added three example GLDraws for Interactions: - in GLViewer new keys: 'o' and 'p' to change the field of view. Useful for changing the perspective. IMPORTANT: In this sommit I have added a third parameter to GLDrawInteractingGeometryFunctor, which means that all GLDrawInteracting* classes had to be changed. If you have your own classes that draw interacting geometry you must modify them as well. The extra paramater added is 'bool wireFrame'. I think it will be useful :) - a more prominent warning when PREFIX was not defined during compilation - ThreePointBending does not crash when there is not file to load - some fiddling with lattice moved some obsolete scripts to doc/removed - Updated trunk/ChangeLog - new icon - fix several warnings, - merge latest version of lattice from my PhD - todo: serialization problems with findType in NodeRecorder and FEMBeam, remove ErrorTolerant, fix collistions in rigid body - removed ErrorTolerant, - SConscript uses md5sum instead of timestamp. Tetrahedron modification to std::vector - fixed crash in SDECLinkedSpheres example - there must me a dynamic cast in InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp until the containers are rewritten. - fixed RotatingBox and BoxStack examples - and accidental mistake in SAPCollider - timestepper is set correctly when loading file in GUI (I hope!) - no need to reload second time - FileGenerator does not open SimulationController if it already exists - introduced body_id_t(ype) so that bodies are not numbered as an int, but as a body_id_t - added center 'scene button' on first tab of simulation controller trunk on SVN is deprecated now undeprecating trunk. Now I'll apply diffs from BZR back here. BZR revno: 983 committer: vsmilauer Fix scons to handle boost.*-mt well, some other cleanups. BZR revno: 989 committer: VĂĄclav Ĺ milauer message: Modify debian builds so that making source packages for release versions work as well. BZR revno: 991 committer: Janek Kozicki message: - Tetra2TetraBang returns before it starts (to avoid crashes in the release) - fixed some crashing of HangingCloth, but I see that there is still some problem. Tracking it down is a waste of time, currently, because new containers will enforce refactoring here and fixing this problem. - FileGenerators try to set the timestep when TimeStepper is not used. But it is still not working when simulation is running during the generation. This means, that 'dt' should not be in Omega, but inside a simulation itself. At last there is a clear answer for this dilemma. OK, I think that migration back from BZR is complete :-) Ooops, previous commit did break SCDECLinkedSpheres example and HangingCloth... I hope that it's fixed now. Also removed warnings from Capillary law... again. HangingCloth finally is fixed, and is not crashing in optimized build. The dynamic cast ought to be in HangingCloth.cpp FileGenerator ;) Added RELEASE file in tags/yade-0.11.0 more descriptive error message when directory ../data/ doesn't exist (usually happens at start...) - update yade icon, by Vaclav's suggestion (the red spheres are not so vividly red, so looks a bit better) - scons will create the installation directory if it doesn't exist - incorporated Bruno's fixes into 0.11 release - Updated RELEASE info in yade.cpp, although the best would be if sons will #define RELEASE update changelog Preparinf 0.11.1 release. Updated INSTALL file. ForceRecorder now checks if a body exists. changed char* yadePluginClasses[]= to const char* yadePluginClasses[]= to eliminate possible misuse updated release 0.11.1 looks like ready to ship Some fixes in lattice regarding yade::serialization problems (function findType()) that started to occur when using g++ newer than 3.4 The offending code was commented because it wasn't working. Now I uncommented and modified it, so it works. deleted unused class AAInteractingBox2InteractingSphere4ClosestFeatures Use lattice model for simulation of concrete with steel fibres reinforcement. SConstruct is now working on debian etch, exclude multimethods in Doxyfile 1. Fix FUNCTOR2D mistake in CundallNonViscousMomentumDamping 2. make it compile with python2.4 and qt3 (which sucks) NOTE: python-scientific requires boost 1.34 recent changes in Dispatcher seemingly broke adding InteractingSphere2InteractingSphere4DistantSpheresContactGeometry and InteractingBox2InteractingSphere4SpheresContactGeometry as strings. Need to create class instance first, then add it as a variable (not as string). I must assign something to avoid "nan" when loading dt. When recover=false, those can be "nan" and lead to crash. - draw linked interactions only if isReal. Added StaticAttractionEngine, which help to fasten a little the initial stage of compression - removing the central void. But it is in fact too slow, for bigger usage. That's because everything is attracted to everything. I don't know what's up with Brefcom, but I need yade to compile, because those guys who will sell us 16-core machine will be using this SVN revision for their benchmarks. dang! I just want the latest SVN revision to compile. yade.cpp give info about cmdGui -N name : specify the user interface (available: NullGUI, cmdGui, QtGUI) FileGenerator catches exceptions. Moment law. 1. moment law: some cleaning 2. GLDrawSphere - draws circles faster (wireframe) 3. yadeControl - fix compilation error with optimized builds: YADE_PTR_CAST -> dynamic_pointer_cast in previous commit, when optimizing the circle, I committed by accident a filled version. It's just a bool to toggle between filled and not filled, but, it's not possible to change from GUI... yet. Use / * - + for front cutting plane: 1. added new class YadeCamera : public qglviewer::Camera 2. ovverride virtual function which calculates the front cutting plane 3. it's possible that GLViewer4 will have to be modified - to use YadeCamera to have this new feature - front cutting plane. I didn't touch it. Ask the FileGenerator for the filename. - flag 'active' in DisplacementEngine - CapillaryCohesiveLaw now complains to stderr (could use LOG_WARN as well, but didn't compile) - flag 'always_use_moment_law' in CohesiveFrictionalContactLaw (so is possible to use even for broken contacts) - added comment about the contact law from PFC-3D (I used it for comparison with Wenjie) - started snow creep test. - added optional creep in CohesiveFrictionalContactLaw Jerome Duriez (1): - A new Preprocessor (DirectShearCis) allowing to simulate ... direct shear tests with the Engine associated to let move correctly the box (CinemCisEngine) Sergei Dorofeenko (17): Add linear viscoelastic contact model 1. Main commit: import a geometry of walls from a STL file. Translate comments to english. 1. Fix orientation. Now one can rotate the STL geometry. 2. Added rotation kinematics to STLImporterTest preprocessor 3. Bugs fix. 4. Added another example of STL file in examples directory. 1. Python wrapper for STLImporter 2. Example python preprocessor STLImporterTest.py 3. Small fixes 1. Added attribute zeroPoint to RigidBodyParameters and RotationEngine. This attribute defines the rotation center of kinematic body. 2. For ElasticContactLaw added accounting rotation of kinematic body around its zeroPoint. 3. Added phase flag "cycle" to Interaction. SpatialQuickSortCollider is modified so interaction's cycle flag is used to mark stale contacts instead isReal flag. 4. Small changed InteractingSphere2InteractingSphere4SpheresContactGeometry and GLDrawElasticContactInteraction. I think, towards an improvement. If there are objections, changes must be reverted. 5. pyOmega.save allows recovery 6. STLImporter allows multiple files to import consistently. 7. Bugs fix. reverting condition c->isReal 1. Add engine ResetPositionEngine for the return of bodies at their initilal positions. 2. small fixes. Small fixes Fix relative path in SimulationPlayer small fix 1. ResetPositionEngine: added import/export initial positions from file 2. GLSimulationPlayerViewer: skip bodies which does not have a geometrical model 3. QtGeneratedSimulationPlayer: small fixes layout and sizePolicy. 4. utils.py: agreement spheresToFile and spheresFromFile In PositionOrientationRecorder and GLSimulationPlayerViewer pass the bodies without geometrical model Small fixes in PositionOrientationRecorder 1. Added new engines: - FiltrEngine is a base engine for a scene filtration before visualization (both for a player and for a controller). The filtration is activated through GUI (now only for SimulationPlayer). - ColorizedLayerFilter allocates with colour a layer of bodies - ColorizedVelocityFilter allocates with colour a velocity of bodies 2. Add Omega::setCurrentIteration to allow current simulation time from a player 3. ResetPositionEngine allows onlyDynamic (without save subscribed bodies ids) small fixes fix errors in previous commits Fix in SimulationPlayer: search filters and updateGL after loading simulation Unknown (2): Fixed some typos. Modified Doxyfile not to show lib/ and to optimize for C++ Václav Šmilauer (208): Multiple changes. Add logging.hpp which I forgot in the previous commit. Remove printing headers being linked, add help for cleaning. Tried scons on a cleanly checked-out trunk and it worked. Sorry for the traffic. 1. Two sets of files were named StiffnessMatrixTimeStepper, of which the other one was in directory Global StiffnessTimestepper. Since it was not used (not compiled by default), I renamed the second set to match the directory name. If it breaks something, let me know. 2. Updated the scons script, scons now compiles yade completely, including header installation. It is yet to be tuned to be lot more fast, but works fine already. 3. Cleaning up messages at startup, (almost) everything is piped through the LOG_* stuff. 4. Included sample logging.conf.sample file, log4cxx is amazingly flexible and easy to use. Give it a try! 5. Lot of debugging since after the last change of allowing regular files to be plugin-loaded, yade would try to load garbage (like the file foobar.baz transformed to libbar.so and the like) giving spurious errors. Everything should work properly now, you can have whatever you like in the plugins directories. It will not even crash on short files (amazing fragility...). 6. Removed the message from ResultantForceEngine constructor, to not to pollute the console every time. Dtto for StiffnessMatrixTimeStepper. 7. Added one ; in yade.cpp that broke compilation without LOG4CXX. The non-log4cxx macros are now enclosed within {} just as their log4cxx counter parts. This should eliminate the need for separately building both configurations. First commit from the wm3 convergence set. Header files were modified to allow compilation with old methods with deprecation warnings from the compiler. This is the second changeset. Yade now compiles without any single warning about deprecated functions. For fixing your own code, I will upload a script to automatize that process shortly. As time goes by, deprecated functions and (slowly) wm3 itself will be removed from yade's sources. Provided script hackett-warn-replace.py is for eventually helping you with replacing deprecated wm3 methods by the good ones. hackett.py was used to insert deprecated wrapper to headers and will probably never used as such anymore. Deleted old erskine2* stuff, since it is superseded by erskine3* and scons. This commit marks properly all headers as well as methods that were deprecated during the transition to the official wm3 library. Next commit will follow shortly and will fix all deprecated headers warnings. It is (and will be for a while) to compile in with USE_BASTARDIZED_WM3 to use the old headers, but expect many warnings during the build. - Bastardized wm3 library ejected from the tree. From now on, you need to install wm3 separately. Will update README shortly on how to proceed. Basically, add "-I/usr/local/include/wm3" to CXXFLAGS if you use qmake. Includes and linking was adjusted in c++ and .pro files. - DOUBLE_PRECISION removed in favor of SINGLE_PRECISION. Therefore, the default is to define Reals as doubles now. SINGLE_PRECISION will be removed very soon anyway. - Removed yade-lib-algorithms, since it is not used. Once someone needs it, it can be found in svn history. - Created yade-lib-base, that for now contains 1. Logging.hpp: moved from yade-core to avoid circular dependency), 2. yadeWm3.hpp: typedefs for Vector3r Vecrtor3, definition of Real. This header will be removed soon, since it will not be needed. 3. yadeWm3Extra.hpp: things that were added to the bastardized wm3, like a few operators and functions. You almost certainly want to include it in your code if you get undefined references (and link with yade-lib-base). - Omega now reports undefined symbols demangled. Re-enable workaround for scons: create install directories beforehand. Cause of that is to be inspected yet. Disable DEBUG messages for non-log4cxx builds so that Janek's screen is nicer ;-) (sorry for these scattered commits, hopefully this is the last one). Exceptions from the FileGenerator thread are now properly caught; it means for example that if you pass an invalid classname in createActors, yade will tell yo +u what class it wasn't able to construct instead of hanging infinitely. Massive update of scons, which I now recommend for building. It has some autodetection support as well. Please report any bugs (?) / RFEs to me. Brief instruction are given in INSTALL. Quick fix for recently discovered segfault. Wondering why it didn't surface before. Valgrind still complains about PhysicalActionVectorVectorIterator::increment using an unitialized value, but that may be unrelated (probably is) to this one. SCons update, please use it and report any problems to yade-dev or yade-users. Thanks. Iterations/sec display added to simulation controller (someone more sensible may redesign the layout in the future). Line ending changed from CRLF to CR. Scons accepts additional POSTFIX parameter, which will alter installation so that PREFIX/{bin,lib}/yade becomes PREFIX/{bin,lib}/yadePOSTFIX (similar to EXTRAVERSION of Linux). Further, configuration files will be searched for in ~/.yadePOSTFIX instead of ~/.yade. Unfortunately, headers installed in PREFIX will still be overwritten by newer version, even with different POSTFIX, since most files do something like #include. This is meant to ease simultaneous installations of different variants of yade. To achieve full independence, PREFIX and POSTFIX should be different. Note that you don't need to set LD_LIBRARY_PATH, since scons uses linker's -rpath option (hint: man ld). If someone has better solution, please let me know. Microchange to comment on naming of scons configuration options. SConscruct file update - make it work with older scons, remove -floop-optimize2 that doesn't exist for older gcc (<4.0). Hunted down the bugwith node enumeration, now should be reliable. Added some checks so that configuration is not done when cleaning, likewise for installable nodes (so we do NOT uninstall upon cleaning). If you use g++-3.3, you need to set e.g. CXX="distcc g++-3.3 -pthread". This will be fixed perhaps in the future but for now the default is to keep it simple. Other fix for sarge (0.96.1) version of scons. It is a variant to be removed. For some features (especially the srcdir keyword), sonner or later we will mandate 0.96.94 to build yade, but that can be a few months in the future, though. Fix node enumeration for newer scons's (isfile() is true only if the file already exists, which is contrary to what I thought). Microchanges: fix rpath quoting, fix ctags indexing non-c++ files (local bug? --language=c++ would make all files (including .o, for example), being indexed. Plugin loader now handles multi-class plugins, provided that they define "char* yadePluginClasses[]" symbol containing list of class names (sentinel=NULL) that the plugin contains. Regular one-class-per-file plugins work normally. Fix build process for older versions of scons that break if there is a target that has no sources. Added a dummy empty file to the loki library to do that, modified project file. Do not forget to delete yade-libs/yade-lib-loki before running scons again to regenerate SConscript files. 1. Include IsotropicCompressionTest in dem's preprocessors project so that it gets compiled 2. Improve erskine to indent SConscripts in a nice way 1. Fixed Omega::scanPlugins so that it loads plugins that were linked without -rpath for their dependencies. Everything is in #ifdef STUPID_DLL 2. Removed again IsotropicCompressionTest since needed headers are missing. Bruno, please add them back (they were removed in the 1045 commit.) and then enable IsotropicCompressionTest in yade-packages/yade-package-dem/src/PreProcessor/PreProcessor.pro again. Default preferences.xml doesn't neglect the last plugin dir (off-by-one error) Simulation may be (which is the default) loaded after generation automatically now. Prepare framework for "high-level clumps". Everything is withing #ifdef HIGHLEVEL_CLUMPS, hence shouldn't change anything unless compiled with that option (don't try at the moment, it doesn't work). More information at http://beta.arcig.cz/~eudoxos/phd/index.cgi/YaDe/HighLevelClumps . 1. provide Doxyfile, running "cd yade-doc; doxygen" will produce html reference documentation 2. initial (non-functional) implementation of high-level clumps, along with some cleanup of the changes done elsewhere 3. erskine now can be given scons variables (namely, $PREFIX) that will be unexpanded in generated SConscript's 4. SConscruct #defines HIGHLEVEL_CLUMPS, since other people probably don't use scons (yet) 5. New method Body::byId, new typedef Body::id_t, new constant Body::ID_NONE (jailed in HIGHLEVEL_CLUMPS for now, that will be removed sooner or later) 1. Clump code completed, but totally untested so far. 2. Added target 'doc' to Makefile that runs doxygen 3. New tracing macro TRWM3QUAT for quaternions 1. Clump::subBodies are now a std::map, subSe3s removed. 2. Sample clump generator ClumpTestGen written; works, but yade crashes because of dispatchers being setup incorrectly. 3. Omega::setRootBody added so that rootBody can be temporarily set during filegeneration, which is necessary for Body::byId. 1. Fixes in the clump code 2. InteractionGeometryMetaEngine doesn't crash if a body doesn't have interactingGeometry (like Clump) 3. Fixes in the collider, related to the clump code 4. ClumpSubBodyMover is now a DeuxExMachina 5. discovered bug in Wm3::Matrix3::EigenDecomposition 6. ClumpTestGen generates a usable testcase (either a random one, or with one-sphere clump and an equivalent sphere) for testing purposes. Parameters etc. are physically wrong, but at least there are no crashes. 7. ClumpTestGen temporarily sets rootBody in Omega so that Body::byId is usable 1. Clump code is not (hopefully) correct physically - translational, rotational and potential energies give constant sum over time (more or less) 2. ClumpTestGen generates a useful scenario of standalone sphere, {1,2,3,4}-sphere clump. 3. Inertia calculation fallback for cases with NaNs from EigenDecomposition. 4. acceleration and angularAcceleration reset after every position update for clump. 5. Body::{isClump,isClumpMember,isStandalone} added. 6. Gravity engine skips clump members (applied to the whole clump only). 1. Clump code cleanup 2. Python may now be embedded in yade: (i) SConscruct checks for it and #defines EMBED_PYTHON if present. (ii) main sets up the interpreter. One disadvantage is that Python runs in its own thread, so pressing ^C during simulation doesn't quit yade (^\ still works). 3. New class PythonRecorder that evaluates arbitrary expression when activated. 4. Pyade interface that makes it possible to retrieve some values from yade in Python. For example, you can now record body #5 z-velocity and z-angularVelocity every 10 iterations by setting PythonRecorder::expression="if (S.i%10==0): print B[5].v[2],B[5].w[2]". Retrievable attributes are documented in the source (or the Doxygen documentation). 1. selection in the renderer are now saved in Omega::selectedBodies (GUI to that list is in the future yet) 2. PythonRecorder now supports retrieving selected bodies; it redirects stdout to file if specified. 3. pyade now required scientific python to be installed - this permits to do vector and quaternion arithmetics in python. General cleanup. 4. pyadeDummy.py module added - for testing pyade without yade Microchange to catch exception from distutils in python detection. 1. Scons changes, node enumeration gotten rid of, now uses proper Install in SConscript's. Should eliminate scons version problems we've had. 2. Some new make targets: for repetitive compilation (with -j2) and first personalizaed target: eudoxos. 3. Selecting clump member in GLViewer now selects the whole clump; it is moved and redrawn as well (only with HIGHLEVEL_CLUMPS). 4. An attempts at escaping special characters beforce XML serialization (\",\n,\t,\\), doesn't work - commented out. 5. Project files cleaned from nonexistent include directories. 1. OK, the floats floating around for colors drove me nuts, so I replace all of that garbage by doubles. Since for one particular case (glMaterialv) the corresponding function taking double (glMaterialdv) is not defined in mesa (and perhaps not in most other gl libs), for that one the argument was converted explicitly. 2. New Shop class, that defines static methods for easy things, along with a dictionary of default parameters for some useful stuff: like getting a rootbody with reasonable set of actors, sphere body, box body. That's all for the moment. Add your own stuff. Filegenerators may shrink considerably this way. 3. Clump::subBodies renamed to Clump::members, Clump::moveSubBodies to Clump::moveMembers, ClumpSubBodyMover to ClumpMemberMover - to be consistent with Body::isClumpMember. Clump still not moved to DEM, that will wait till later - at the moment, QGLViewer depends on Clump (for moving clump when selected and moved with mouse). Many extensive changes: 1. renamed Chagelog to ChangeLog, will be generated autmatically from svn chamgelog 2. removed waf script (wscript), not used 3. scons now installs everything with '-version-postfix' appended, like yade-svn1072-debug 4. scons builds different variants (version and postfix) in separate directories 1. Clump member velocities are calculated in ClumpMemberMover. This may create problems since velocity will always be lagged by one iteration. 2. removed cyclic dependency of Clump and Shop. 1. Debugging mode now #defines YADE_DEBUG in addition to DEBUG, which seems to be #undef'ed by some header. Lazy to trace down. 2. Removed #ifdef DEBUG messages from dynlib &co (now under #if 0); use LOG_TRACE if you need those messages 3. Signal handler now handles SIGSEGV (segmentation fault) and SIGABRT (failed assertions, among other) in debugging mode: gdb is run, attached to the current process and backtrace of all threads is printed. Python fixes: 1. load pyade.py from path given by PREFIX and POSTFIX (we really need to define that somewhere in a unified manner: not by using BOOST_PP_STRINGIZE everywhere! - config.hpp...?) 2. velocity and angularVelocity are vectors now (returned only the x component by mistake) Attempt to access interactions from Python, commeted out for the moment. May disappear later. Not used anywhere. Do not use. 1. Cleanup of clump includes 2. Scons now puts buildDir include directory first so that it shadows eventually installed versions 3. jobs=x added to scons, like -j3, but is saved accross runs 4. Archive modifications (shuffling includes around) so that compiling with recent g++ (4.1) works - was preprocessor problem. Fixed error in yesterday's commit, should compile really fine with g++4.1 now. SCons cleanup. Now supports buildPrefix (defaults to '..') so that build is completely separate from sources. commit before mass-replacing Dymanic_cast. This will not compile, used only as wayback for me. New commit shortly. dynamic_cast replaced by YADE_CAST where appropriate: i.e. the result of the cast is not checked to verify whether the conversion was successful as condition for further flow branching. The consequence is that you have to #define YADE_CAST in CXXFLAGS by hand as either dynamic_cast (original version) or static_cast (for optimized builds) when using make. dynamic_pointer_cast replaced by YADE_PTR_CAST as appropriate. It must be defined on compiler command-line (-DYADE_PTR_CAST=dynamic_pointer_cast or -DYADE_PTR_CAST=static_pointer_cast). Scons builds get this automatically. Doxygen settings from yade-flat imported. New file tracking removed elements. Merged the scons-layout branch to trunk. 1. PythonRecorder runs optimized byte-compiled expression, optionally translated to machine-code by psyco 2. Serialization lib now properly escapes and unescapes XML-unfriendly charcters (\n,\t,<,>,",\\)->(\\n,\\t,\[,\],\',\\\\) 1. Remove cyclic plugin loading forever (undefined STUPID_DLL) 2. Tetrahedron has vector v instead of Vector3r v1,v2,v3,v4; (fem will probably not compile because of this for now - will be fixed) 3. Added experimental tetra class & friends. ough... put actual data in. Next commit will rename files as they should be (stupid svn...). Renamed files. 1. gdbCrashBatch moved to Omega (was emptry when a different thread thatn the main one crashed?!) 2. Shop generates tetrahedra properly now, including dispatchers 3. Tetrahedra rendering and linking fixed 4. Added an icon to the main window (not serious ;-) ) 5. commented out STUPID_DLL overflowing loader 6. log4cxx has level set to INFO by default (was DEBUG, lot of garbage on screen) 1. Some type fixes (signed vs. unsigned). The Body ID mess needs to be cleaned up!!! 2. More tetrahedron stuff; will not compile for now, though. 3. Icon update ;-) 1. remove vector from tetrahedra code, replace simply by Vector3r[4] 2. implement 4h-4h intersection peroperly, without relying on wm3. Compiles, not tested for correctness at all. Make compilation proper when python is not found (no errors, just disable what should be disabled). #define MINIWM3 when using miniWm3 don't exclude lattice with miniWm3 (lattice needs to be modified to not use undefined functions from full Wm3 in this case (Delaunay!) Adjust QTDIR to gentoo, too Configure-time decision whether to link against QGLViewer or 3dviewer. use -mt variants of boost byt preference if both exist useMiniWm3 by default 1. Fix fedora/centos etc compilation ( in the .ui file mentioning nonexistent file) 2. Other scons cleanup 1. Fix soname on shared libs (no soname at all; bug with "" in the name previously). Is it good for something? 2. Add 'features' option to scons, which can enable/disable python and log4cxx at compile-time (extensible) 1. Correct 'all' value for features 2. Add a few signed/unsigned typecasts 3. Check clump code 1. Fix uninitialized se3 in one-member clump handling 2. Fix syntax error in SConstruct introduced in previous commit. If RELEASE file exists, get yade version from there, instead of from svn. Remove wildmagic-dev from debian deps. fixed qt3 detection (used deprecated qapp.h header instead of qapplication.h). Adjust debian package generation back to svn. frontend cleanups, eperimental python console ui. Convenience functions for serialization - experimental. fix qualifiers in constructor of AttrAccess 1. rename ThreadWorker::message() to ThreadWorker::getStatus, ThreadWorker::setMessage() to ThreadWorker::setStatus (and private ThreadWorker::m_message to m_status) 2. add public: std::string FileGenerator::message that holds exit value description 3. FileGenerator::generate returns now bool (if the generation was successful); description in ::message 4. Adapted all generators and UIs for the above changes (except NullGUI - is that needed?) Adjust other components for FileGenerator changes. Add wrapper for preprocessor in python. 1. SCons will download new version of itself if older thatn 0.96.93 and will proxy all calls to it transparently (hopefully) 2. Revamped python wrappers, now all attributes are settable as dicionary entries in respective instances from python 3. added example of python script that generates and runs BoxStack 4. Do not #define DEBUG, since it is used in log4cxx (as log4cxx::Levels::DEBUG). YADE_DEBUG is used everywhere. If you ever get weird errors about that, #undef DEBUG after including qt3 headers. 5. Some code cleanups. Fix argv[0] for scons proxy. Don't warn on amd64 about limited type range in comparison. Initial .spec file for fedora 6 spec file works on fedora 6 now 1. Add screw example (this is really my personal one...) 2. Fix Shop::tetra (tetra interacting geometry still incorrect or incorrectly drawn... why???) 3. Remove python finalization, boost should take care of that. 4. Possibly fix plugin loader bug (first plugin after one with yadePluginClasses "inherits" them unless it has its own yadePluginClasses defined). Sync SConstruct with sid packages (lib for qglviewer is not in capitals there) 1. Tetrahedron fixes (intersections are correct now, but interaction still wrong - crashes??!) 2. Fix scons to work with versions > .97 (no syntax errors; didn't try if it compiles 1. Scons now updates itself to 0.97.0d20070918 (for testing purposes etc) 2. fix crash in ElasticContactLaw and ElasticCohesiveLaw if interaction is not SpheresContactGeometry and ElasticContactInteraction; this fixes tetrahedra interaction. 3. other tetrahedron fixes (still not fully functional yet) 4. mark attributes in class factory as __attribute__((unused)) to avoid warnings 1. Correct typo in comment in SConstruct 2. Correct formulas for 4hedron inertia, testcase passes 3. Switch to fixed timestep when timestep is being changed by user in the qt3 ui 1. Change default timestep to 1e-8, should prevent weidness onthe first run. 2. Fix cmdGui to handle gracefully reading/assigning nonexistent attributes (not crash, but caught exception) 3. Fix char* / const char * warnings from g++-4.2 in main() and OpenGLRenderingEngine. 4. Cleanup of triaxial test, added parameter noLateralConfinement (not yet used). 1. Default scons to latest snapshot (should be a bit faster) 2. Don't autocreate plugin path entries for paths that are not installed 3. Turn TriaxialStressEngine into state machine, while preserving the possibility of changing some values by hand in .xml. (should be tested). 4. Exclude Loki:: from doxygen docs. 1. Remove relicts of old Omega::logMessage &c 2. Remove duplicated Wm3 headers in core (is already in lib-yade-base) 3. Update python scripting (object.attribute is shorthand for object['attribute'] now) 4. Cleanups in triaxial, adding STATE_UNINITIALIZED 1. BIG update of python wrappers - enagines can be created, added, modified from python now. Examples will be provided very soon. 2. fix plugin loader for multi-plugins: YADE_PLUGIN() macro should be used in all plugins, otherwise due to linking symbol overrides a multi-plugin will shadow classes in the plugin actually being loaded (better solution?!) 3. Add experimental BREakable Frictional COhesive Moment-blocking material (brefcom for short), not yet fully done. 4. PersistentSAPCollider now can be parametrized to permit distant contacts (is not the default, though), incorporating Bruno's changes in DistantPersistentSAPCollider 5. Uniaxial strain-controlled test (USCT), a quite simple implementation. Used primarily for brefcom testing now. 6. Fix SConstruct so that it is backward-compatible with python2.4 1. Remove MetaEngine, inherit MetaDispatchingEngine directly 2. Fix unbalanced force reporting (thanks for complaining, Bruno) 3. EngineUnits now declare their types with FUNCTOR1D(.) or FUNCTOR2D(.,.) macros, dispatchers will ask for their types automagically. Old syntax still supported, once all engines have those types declared, it will be obsoleted and removed (like e->add("InteractingSphere","InteractingSphere","InteractingSphere2InteractingSphere4SpheresContactGeometry"); Shop and USCTGen usethe new syntax now. 4. Brefcom law passes some rudimentary tests and appears to work (normal force and damage for now; we miss shear force and blocked rotations) 5. Brefcom contact can be drawn with opengl, damage signified by color. 6. Updated Python wrapper. 1. Remove the old prototype for adding EngineUnits to dispatchers add(string,string,string) 2. All EngineUnits now have FUNCTOR1D(...) or FUNCTOR2D(...,...) in their headers. 1. Preliminary recovery of simulation accross runs (try sending SIGHUP to yade) 2. Python wrapper for body parameters. 3. Misc fixes of engines. 4. Allow Omega to stop at predefined iteration number (for regression tests, I work on that ;-) ) 5. ... Fix lefover of experimental code in TriaxialCompressionEngine (creating sohesive links after compaction. Updated brefcom, with undisclosable parts moved outside the tree. Fix typo breaking compilation on different machines than mine. 1. Remove "../data", replace by "./" (cwd) or "". 2. Some other stuff I don't remember. 1. HUGE update of python, it wraps almost all yade classes now (except PhysicalActionContainer and InteractionContainer). Documentation is lacking as well. 2. Move most of init stuff of python from cmdGui::run to cmdGuiInit.py (which I forgot to "svn add", will commit shortly) 3. Run ipython shell (or python shell with history and tab completion as fallback) inside yade Adding init code as advertised in last commit. Passing exclude='qt3' to scons will disable qt3 checks and everything related to qt3. Note that the default GUI is still QtGUI unless you change that in your config file or at command line with -N. Avoid using boost1.34 python/stl_iterator.hpp, should compile with 1.33 now (debian etch, ubuntu feisty) Fixes and addendum for openSuse based on comments by Sega 1. Test suite for all preprocessors 2. Added assumeElasticSpheres attribute to GlobalStiffnessCounter; if set to false, dynamic_casts are used to properly determine type of contact between spheres (used in USCTGen now) 3. Debugger now dumps backtrace without interruption and exits immediately (core is still dumped) 1. cmdGui now exports yade binary name (to allow spawning subprocesses) 2. default-test.py handles crashing simulations gracefully (by executing them in a subprocess) 3. Omega retains original argc and argv from the command line. 1. Remove NaN's in PersistentSAPCollider for bodies that don't have bounding box: use zero-size degenerate box at its position instead. (fixes warning when running ClumpTestGen) 2. Remove check for scientific python from scons as we don't use it now. 1. BIG: Moved latest upstream qglviewer to our tree. If you REALLY need to use the packaged version, let me know. As of now, there is no way to do that. 2. BIG: Removed many (unfunctional) parts of the qt3 GUI, in the view of qt4 migration which will probably not happen. Maybe I removed too much (simulation player -- does it work?!), let me know in that case. 3. Experimental GLViewer support in python, disabled. (broken and needs qt4) 4. Misc fixes related to that and other small stuff. Previous commit didn't compile on clean environment, fixed now. HOTFIX: final fix for the libqglviewer linking issue.... I hate qt3, I hate uic, I hate moc. It works now, please test on you machines and let me know if there are any regressions. Forgotten files, build crashed on foreign machine. Fixed now. (This stuff is not tested, do not use!) OK, now QGLViewer REALLY builds. Was bug in scons: file.ext1.ext2 is not handled properly with the qt3 tool. Created symlinks replacing first dot with _. Add tags, doc and clean "targets" to scons do their job, short-circuit the rest of building process and exit. Clean only removes builddir, _not_ installed files as -c would do. (LP: #202067) 1. Resurredced and un-crapped simulation player (for making videos). Updated howto is http://yade.wikia.com/wiki/New:Making_videos#Using_Simulation_Player_with_svn.3E1281 1. Include fracture strain calibration routines in brefcom. 2. Add BrecomDamageColorizer - changes colora ccording to average cohesive interactions the body has. 3. Delete non-cohesive interactions from inside BrefcomLaw when spheres become distant. 4. Documentation updates. 1. MAJOR improvements of the python wrappers (constructors take attributes etc.) 2. FIRST proof-of-implementation simulation completely created in python: scripts/simple-scene.py. This file will be commented abundantly shortly. 3. Add default values to some bool params so that there is no serializer error if they are uninitialized. 4. Add aabbEnlargeFactor to InteractingSphere2AABB (should be added to InteractingBox2AABB as well?) (not tested yet) 5. rename InteractionDetectionFactor to interactinDetectionFactor 6. Serialization now registers only attributes that have not yet been registered (there were problems with python because of that: at first save, attributes were duplicated and the xml file was less readble, although loadable) 7. Scan .tpp and .ipp for c++ tags as well 8. Some documentation. 1. New engine attracting bodies towards a fixed axis (constant force, points towards the axis everywhere) 2. some fixes in python wrapper (run initializers if needed; the logic in yade itself is currently broken however) 3. New python "example" for creating cylindrical packing of spheres 1. allow saving spheres (format like small.sdec.xyz) from python 2. PositionOrientationRecorder can optionally record RGB color of each body as well now 3. SimulationPlayer now can change colors of bodies, if the .rgb file exists 4. Bunch of fixes if brefcom, in UniaxialStrainControlledTest 5. dt moved from Omega to MetaBody for good; this allows preprocessor to set timestep that will be used when the simulation is loaded. 6. Code cleanups here and there. Update debian control to possibly fix deb package builds Fix header scanner if there are extra headers in the tree. 1. PROTOTYPE CHANGE: Engine::action(Body*) changed to Engine::action(MetaBody*); all engines adapted 2. MetaBody::miscParams can be used to set static variables at deserialization (used for GLDrawBrefcomContact now) 3. allow serialization of shared_ptr (only pointers to derived classes were enabled until now) 4. big fixes inside brefcom 5. enhancements of python interface (Generic class, fixes) 6. added Shop::GLDrawLine, Shop::GLDrawArrow, Shop::GLDrawNum 7. fixed QGLViewer #defining DEBUG (qt3) by #undef'ing it after qt3 headers inclusion 1. Add many checks to see where XML and BIN serializers take each other's work (non-intrusive). 2. reorganization of cmdGui (will be renamed - perhaps - to pyUi or similar) 3. BINFormatManager is now optional and _disabled by default_. feature 'binfmt' must be enabled to build the plugin. 4. Added utils classes in python, examples are much simplified now. Fix python2.4 compatibility fix of the previous fix. 1. Commit before other changes. Renamed cmdGui to PythonUI. Tests seem to be working now. 1. Define macro NEEDS_BEX() that engines can use to advertise what physical actions they need. This avoids the necessity of passing that to PhysicalActionContainerInitializer. The change is backwards-compatible, all present engines were adapted however. 2. Fix BrefcomTestGen and USCTGen: don't crash anymore. 3. Small fixes in python code. Svn wants to commit before moving files... :-| Refactored MetaDispatchingEngine to MetaEngine (everywhere) Support saving to .xml, .xml.gz and .xml.bz2. Loading works as well. 1. Added heavy comments to simple-scene.py, started functionally equal code in extra/SimpleScene.{c,h}pp 2. Added dependency on boost::iostreams to debian template (for gzip/bzip2 streams). Hotfix for file loading logic. 1. Ignore ^C in PythonUI (gives crashes) 2. Shop::Bex caches physical action indices in static variables (not yet benchmarked) 3. Check for boost/foreach.hpp in scons and suggest how to install it. 4. Fixes in Brefcom 5. Set initial qglview size to 550x550 Big scons updates: Fix compilation problems and some warnings in the previous commit. 1. BOOST_FOREACH now works with InteractionContainer and BodyContainer and is #defined as foreach. 1. GUI change in qt3: make the simulation controller to take _much_ less space (no LCD displays, notably) and allow more place for 3d views. If someone is not happy with that, gui/qt3 can be reverted. 2. UniaxialStrainController now measures and records transversal strain. 3. Add attempt at smart command-line completion for ipython console. 4. Improved the class index cache in Shop::Bex (benchmarks needed) 1. Added MetaBody* as optional argument to Body::byId, to avoid Omega::instance().getRootBody() lookups - took a few percent of time in valgrind-profiled run. 2. Completed SimpleScene, a script to generate commented source py2wiki.py and put results on http://yade.wikia.com/wiki/SimpleSceneTutorial 3. Swap argument order in utils.sphere and utils.box to match Shop::sphere and Shop::box (center first, then radius/extents and not vice versa as it used to be) Make the GUI loader/saver a bit less intelligent. .yade, .xml, .xml.gz, .xml.bz2 are accepted when both loading and saving (hopefully). 1. Fix tabs in SConstruct. 1. Rudimentary plotting support through python; see http://yade.wikia.com/wiki/PythonPlotting and scripts/simple-scene-graph.py for details 2. Updates in examples/cmdGui1.py 1. QtGUI now integrated PythonUI if available. This means simulation can be controlled both from the QtGUi and the console. The + standalone PythonUI is available as well. 2. Changed form workspace to MDI windows; main window is menu-only thing that hides when simulation is open. 3. other minor changes. 1. Replace foreach with FOREACH, based on discussion with Janek. 2. Fix FileGenerateor message crash without workspace. 3. Fix TimeStepper choosable at the same time as fixed timestep. There is some problem with switching back to timestepper, use Omega().usesTimeStepper=True/False from python for now, please. 1. Merging containers and iterators and iteratorpointers to one .hpp. (Proxy headers created, no existign code affected) 2. Moving default containers for interactions, bodies and physicalAction to core; therefore, omega is constructed with out-of-the-box usable Metabody. (no code affected, though some initializations are now redundant) 3. Dropped workspace mode of QtGUI, since for some weeks no-one complained. 4. Big simplification of QtGUI (no dynamic menus and the like), to allow Views to be opened from python, independently of the simulation controller and so on. 5. Initial wrapper for gui stuff in python, in module yade.qt (View(),Controller(),center()) 6. Exiting the python interpreted (^D, quit()) will close yade main window as well. 7. Moved python wrapper helpers to gui/py/pyAttrUtils.hpp to be usable from elsewhere. Fix: move files properly (with svn) Forgotten add. MetaBody still needs InteractingGeometry, BoundingVolume and PhysicalParameters initialized. But that would mean moving more classes to core, which is questionable. For now, fix that in Python and still rely on user init in other code (as before, but less). 1. Fix passing .py to PythonUI (local vars shadowing global ones); fixes default-test.py as well. 2. Fallback to PythonUI automatically if $DISPLAY is not defined in shell 3. Ignore closing YadeQtMainWindow if it doesnt exist instead of throwing exception 1. Arguments can be passed to scripts, propagated as yade.runtime.args 2. default-test more robust, with e-mail report Update testing script for automated tests Micro fix in python script. Cleanups for ubuntu package builds. 1. Other fixes related to deb packages (jobs=1 because of fakeroot :-( ) 2. transversal strain sensors max speed can only be positive in USCT Fix for crashing from python-constructed rootbody. Hopfully other things are not broken. Fix player crashes (dialogs should have no parents) Fix setting timeStepper / fixed timestep from the qt3 ui Build qt3 with python disabled cleanly. 1. Add std::string Engine::label, which user can set to identify an engine by arbitrary label 2. Fix warnings in SpatialQuickSortCollider 3. Set isDynamic in rootBody by default 4. Remove PlotDataGetter, superseded by PeriodicPythonRunner 5. New abstract class for running things in predefined periods PeriodicEngine Forgotten file. 1. Fix sync mode in qt3 ui. 2. Fix real time display in qt3 ui. 3. Fix resizing of controller in qt3 ui (childs expand now) 4. Remove deprecated PythonRecorder (superseded by PeriodicPythonRunner) 5. Initialize Omega timers also at construction-time rather than simulation-loading only as it used to be. 6. Don't print bogus values of iters/sec in controller at startup. 1. Fix the priodic engine. 2. Add layout to the main windows with 4 buttons. 3. Fix PeriodicPythonRunner plugin installation 4. Update simple-scene-graph.py so that it works after latest plotting changes. 1. Add the possibility to save as gnuplot figure to the plotting interface 2. Add PeriodicEngine (fixed period) as opposed to RangePeriodicEngine (variable period) 3. Make BrefcomDamageColorizer subclass of PeriodicEngine instead of doing Omega::instance().getIteration()%interval==0 4. Change some icons in the UI 5. Add 'scale' parameter to loading spheres from file 1. Fix segfault in GUI exception trap 2. Handle .xml.gz and .xml.bz2 (in addition to .xml) as command-line argument in QtGUI Small fixes here and there. Merged from https://code.launchpad.net/~yade-team/yade/t2. All changes here: 1. Add list MetaBody::tags, which hold metadata in the key=value format; this is to workaround current serialization that errors out on map in findType. 2. Add meanStress and vlumetricStrain to Triaxial for python access 3. add neverDamage flag to Brefcom which forces elastic behavior regardless off strain magnitude. 4. Fix some warnings in STLImporter regarding signedness 5. add __attribute__((unused)) to a variable in Wm3Matrix3 that was not used during optimized builds - to avoid warning. 1. Fix tagging, do it as list; must NOT contain spaces! 2. Adapt python to that (replaces spaces automatically and so on) Forgotten variable after move Fixes for g++-4.3 compatibility (still some warnings, may need -fpermissive to compile) 1. Small fixes here and there 2. In brefcom, make the parameter set richer 3. PythonUI now may be run in non-interactive mode (batch processing) 4. new function Omega().interactions.nth(n) for getting random interaction Microfix: unitialized diffuseColor in boundingVolume 1. Remove failing and unused screw generator. 2. Add rate-dependence variables to brefcom 3. Add raw attribute access from python, like this: gm=GeometricalModel("Facet") gm.setRaw('vertices',"[{1 2 3} {4 5 6} {7 8 9}]") to provide access to attributes the current wrapper doesn't wrap properly (i.e. anything beyond numbers, bools, strings and flat arrays of numbers: e.g. vector, as in Facet). The format of the raw string is that of XMLFormatManager. 1. Triaxial now calculates thickness of the walls automatically (from the extents of the first wall) 2. Add flags to scons, for the gold linker (doesn't link plugins, oh well) 3. Many fixes in brefcom 4. flag needsInitializers moved into MetaBody and it is checked at every iteration; assigning initializers from python sets this flag. It is set to true in MetaBody constructor. 5. Added wrapper for postProcessAttributes in python, for Facets. Serializable::postProcessAttributes was made public due to that (don't kill me). 6. A few things added to yade.utils 7. SimulationController now correctly handles decreasing timestep mantissa from 1 (goes to 9 and exponent is decreased by 1) and increasing it from 9. 1. Parallel engine that runs engines in parallel; python wrapper for that 2. Added simple-scene-parallel.py for an example (sppedup of 16% over simple-scene.py) 3. Added openmp flags to scons (enabled by default) 4. Simultaneous builds of multiple profiles: scons profile=default,opt will run all the machinery 5. Refactored grid-drawing code; press 'x','y','z' to have grids with that normal 6. Ported some things from GLViewer to GLSimulationPlayerViewer (grid and mouse events) 1. Fix the simple-scene-parallel.py (interactionGeometry and interactionPhysics may _not_ be run in parallel) 2. Fix the #pragma clause in ParallelEngine (it did not run in parallel before, but still there were performance gains ?!) 3. When saving simulation, set the filename so that it can be reloaded from the GUI 1. PositionOrientationRecorder save to bzip2'ed files now; player is able to read both compressed and uncompressed files for backward compatibility. 2. Unsucessful try to use glut for drawing spheres; left as an option that is disabled by default, however. 3. Fixes in brefcom 4. Simulation player now has progress window and supports strides when loading files. 5. Fix wrong timestamp format in saveGnuplot in gui/py/plot.py (%m instead of %M) 1. Implemented clipping planes in the GL viewer and GL renderer 2. Moving body is now consistent with mouse bindings for moving scene Remove duplicated code in GLSimulationPlayerViewer, subclass from GLViewer. Median centering routine (for cases where one body went nuts and centerScene will make the whole a small point) - activated with Alt-C (both controller and viewer) 1. Added displacement and rotation scaling to the OpenGLRenderingEngine (accessible from the renderer config). Documentation missing as of now. Displacements from reference point will be scaled in the rendering. At this moment, only geometrical model and a few other elements of the GL display are scaled. 1. Double-click aligns clipping planes if manipulated, x,y,z aligns normal with axis. 2. Default number of clipping planes is 3 instead of 2 now. 2. Fix compilation error in ResetPositionEngine (missing logger) 1. sqlite3-dev is now required for yade (checked by scons) 2. sqlite3x c++ sqlite3 wrapper is in our tree (5 files, about 60kb of code), built by scons 3. Check for boost::regex 4. Experimental SQLiteRecorder (the player side is not yet supported at all!) 5. Remove messages at startup about singletons (define YADE_DEBUG env var to get them again) 6. StretchPeriodicEngine that will eventually replace the overdesigned RangePeriodicEngine Fix logger error at startup. 1. Remove some warnings about persistentInteractions initialization (initialization is done in MetaBody constructor anyway, it can not break anything); 2. Remove long obsolete pyade 3. Add Omega::getComputationTime 4. Add Omega::saveSimulationToStream and Omega::loadSimulationFromStream 5. Improve the SQLiteRecorder: put simulation into the db, create table with pointers to other tables, declare column types. The recording part is almost done. Implementation in player is to be done. 1. Move FiltrEngine from core to common (I know this is arguable, given that DeusExMachina and StandAloneEngine are in core as well. I think, however, that common is a more appropriate place since these engines are not as important...) 2. Completed the recording sqlite part 3. Completed the player part of sqlite (in player) 4. Added libsqlite3-dev to debian build depends 5. PeriodicEngine now is activated when the priod is reached, not afterwards (> vs. >=) Other fixes. Please not in GLSimulationPlayerViewer I had to comment one line that I didn't know how to make compile (dynamic-Cast). 1. Set iteration number with sqlite as well 1. Views, Player, Controller and Generator can be opened asynchronously from python now. 2. Revamped the player UI, hopefully making it better. 3. Added Alt-S for saving viewer state (camera etc) 4. Added runPlayer to python for aotomatized replay. The file contains instructions for offscreen thereof rendering as well. Re-enable sega's code that doesn't compile here. 1. qtCreateVideo creates video from the replay snapshots directly (using gstreamer) 2. qt.{Player,Generator,Controller} now take an optional bool; if true (_not_ default), they will not return until the requested window will have been created and ready. 3. runPlayer return wildcard and list of snapshot files now 4. Adapted simple-scene-player.py to reflect that. Fix linking issue. 1. new class DisplayParameters is a string->string "hash map" for holding various configurations. 2. Multiple display parameters (i.e. QGLViewer config and OpenGLRenderingEngine config) are stored in Metabody. 4. stopAtIteration moved to MetaBody so that it is saved and reloaded (MetaBody::recover hack is gone) 5. Remove unnecessary persistentInteraction initializers so that we have less warnings 6. Remove deprecated RangePeriodicEngine, plotting uses StretchPeriodicEngine instead. 7. Add the ability to load from stream and save to stream to IOFormatManager (afterwards, I discovered there were actually_identical_ functions loadArchive and saveArchive; those were deleted since unused elsewhere) 8. GLViewer can now load and save state from/to string 9. in GLViewer, keys 7,8,9 load display config #0,1,2 and Alt-{7,8,9} saves current view to #0,1,2. Those are saved in MetaBody. BUG: after loading such config, the QtGUI-generated OpenGLRenderingEngine config dialog doesn't work anymore (probably some issue with archives, not sure). 9. Hopefully all xml-parser-offensive characters are escaped at string serialization (and unescaped at deserialization). We use standard SGML escapes (newline=&br; tab=&tab; <=< and so on) now. This allows to save XML-as-string in the xml itself (used for DisplayParameters). 10. GLViewer now properly saves what XYZ planes are displayed (using custom DOM element) 11. Some fixes in Brefcom, more to come. 1. Fixes in Brefcom 2. Add docstrings to QtGUI-python functions; 3. StretchPeriodicEngine adjusts both limit and period if one of them is nonzero 4. Other fixes in python interface Sync with upstream QGLViewer 2.3.0 1. Experimental scale drawing in GLViewer (disabled by default) 2. Fix (?) race conditions (?) in Omega and python 3. Other fixes in plotting, works now again (remove numpy.array, not needed) 1. Merge all gravity engines (central, axial, directional (the old one)) into 1 header 2. Cleanups of pkg/common/SConstript 3. Add more brefcom accessors (Fs, Fn, ...) 4. Fix (hopefully) threading issues with python; Omega().pause and other now use Py_BEGIN_ALLOW_THREADS to avoid deadlock of the interpreter if called from c++ interpreting python code 1. Add private functions to eudoxos.py 2. Fix a few broken includes Fix #includes in affected files. Forgotten file. Second file that was forgotten :-| 1. Omega().interactions.nth returns n-th real interaction 2. Export more brefcom data to python 3. Make LOG_DEBUG and LOG_TRACE no-op in NDEBUG (optimized) builds 4. Change linebreaks from CR+LF to unix LF in a few random diles 5. Make DeusExMachina registerAttributes of Engine 6. Serializer prints offending value if bad_lexical_cast. 7. Attempt to catch exception if reading bool written as int (254 etc) and consider that "true" (doesn't work?) 8. JumpChangeSe3 can set (angular)velocity if requested instead of plain moving 1. Move refSe3 and dispSe3 to PhysicalParameters; this should speed up the renderer (clipping is done only once etc) and make it possible to apply clipping (via PhysicalParameters::isDisplayed) in GL functors for interactions as well. 2. Add button for setting reference positionts to the controller 3. Remove warnings in NewtonsDampedLaw 1. Cleanups in OpenGLRenderingEngine, use systematically clipping and scaling 2. Merge GL functor abstract class headers in one (GLDrawFunctors.hpp) and fix files using them 3. Make qt-serialization layout a bit more space-conservative. 1. Fix default test to report errors during simulation loading as well 2. Fix preprocessors derived from triaxial to not initializa transienInteractions, preventing crash discussed with Bruno: containes for transient and persistent must be the same, for unknown reason. 3. Fix preprocessors using brefcom to define all variables, otherwise we have nan's in XML which crashes the deserializer. Add script for making release Improved the release script. 1. Add the ability to block individual DOFs on every body in PhysicalParameters and implement relevant code in both NewtonsDampedLaw and LeapFrog integrators 2. Add that to UniaxialStrainer 3. Put both CundallNonViscous damping classes in one file (cleanup), adapt all files to that 1. Make the -x flag to PythonUI stop even if no script is provided. Fix missing lib (error at startup) ================================================== yade-0.10.0 Tue Jul 11 13:17:04 2006 +0000 Janek Kozicki (55): small correction in INSTALL, renamed ayde-data to yade-examples, and tagged it. added schedule added some more instructions to INSTALL file I am committing new version of docs, checked by my sister. And briefly checked by me. Olivier, now you can work on it, and remember to copy & paste lots of text and explanations from the article! directory for creating packages with yade. directory for Czesiu to work on debian packages for yade. later we can add directories for .rpm or gentoo, etc.... Fixed some broken symlinks. Removed unnecessary int i from MetaBody loops added missing -lglut yade is compiling with boost 1.33, but I had to make some modifications in ErrorTolerantLaw <- it is compiling, but I'm sure that it Jacobian is WRONG !! - Oliver it's your code, only you can fix that. some small changes, before I start something bigger ClassFactory is one step closer to windows version I have started changes that will make yade compilable on windows another step closer to compile yade on windows: to compile yade on windows we have to remove symlinks. I started doing that, but it's not finished. I have to commit in the middle still removing symlinks... symlinks removed. but it is NOT compiling now deleted all useless directories modyfing all .pro files and Makefiles so that it will compile maybe it is compiling... so symlinks are now removed, and it is compiling and installing exactly like before. So I have started compiling it on windows, and I stopped on the problem that linker cannot link serialization with factory. General cleaning of all header files. Now they are much more readable, and more coherent with C++ coding standards. added SDECMovingWall FileGenerator contributed by Andreas Plesch. You have decided to rename class: Box2AABB to a new name: InteractingBox2AABB You have decided to rename class: Sphere2AABB to a new name: InteractingSphere2AABB D yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/Box2AABB.pro D yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/Box2AABB.cpp D yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/Box2AABB.hpp A yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/InteractingBox2AABB.pro A yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/InteractingBox2AABB.cpp A yade-packages/yade-package-common/src/Engine/EngineUnit/Box2AABB/InteractingBox2AABB.hpp D yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/Sphere2AABB.cpp D yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/Sphere2AABB.hpp A yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/InteractingSphere2AABB.pro A yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/InteractingSphere2AABB.cpp A yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/InteractingSphere2AABB.hpp D yade-packages/yade-package-common/src/Engine/EngineUnit/Sphere2AABB/Sphere2AABB.pro I hope that scripts to rename classess are still working okay :> ErrorTolerantContactModel -> ErrorTolerantContact AABox2Sphere4ClosestFeatures -> AAInteractingBox2InteractingSphere4ClosestFeatures Box2Box4ClosestFeatures -> InteractingBox2InteractingBox4ClosestFeatures Box2Sphere4ClosestFeatures -> InteractingBox2InteractingSphere4ClosestFeatures Box2Sphere4ErrorTolerant -> InteractingBox2InteractingSphere4ErrorTolerantContact Box2Sphere4MacroMicroContactGeometry -> InteractingBox2InteractingSphere4SpheresContactGeometry Sphere2Sphere4ClosestFeatures -> InteractingSphere2InteractingSphere4ClosestFeatures Sphere2Sphere4ErrorTolerant -> InteractingSphere2InteractingSphere4ErrorTolerantContact Sphere2Sphere4MacroMicroContactGeometry -> InteractingSphere2InteractingSphere4SpheresContactGeometry continued... this renaming is DONE GLDrawInteractionBox -> GLDrawInteractingBox GLDrawInteractionGeometryFunctor -> GLDrawInteractingGeometryFunctor GLDrawInteractionSphere -> GLDrawInteractingSphere GLDrawInteractionGeometrySet -> GLDrawMetaInteractingGeometry renaming continued.. renamig DONE Serialization::registerAttributes() is now protected, as it should be. renamed MetaBody::actors to engines added: QtEngineEditor is not working - doesn't detect correctly StandAloneEngines - can save simulation from simulation controller - can change background color of the simulation displayed binary serialization for yade - looks like it is working :) fixed one bug in BINFormatManager fixed savig ElasticContactParameters and SpheresContactGeometry, so that after loading the simulation is not going crazy added several try/catch blocks removed GLAPI and GLAPIENTRY from OpenGLWrapper XMLSaxParser is now better at counting lines I have just enabled commit-email.pl for SVN. we should get info about commits for yade-dev, I wonder it if works :) not so small bugfixes and imprvements: - fixed serious bug in bool BodyRedirectionVector::erase(unsigned int); - added function bool exists() const; to BodyContainer - graphical display now has reversed meaning of scrollwheel, so it is now similar to behaviour of blender and autocad - SDECLinkedSpheres is working after some (surprise!) quick hack. That part is still waiting for total rewrite. - big improvements in lattice model. beam bending works (but not always) with axis+angle notation. maybe with quaternions it will be better. There is a problem that shows itself when using regular triangular grid. - added function Quaternion::power(RealType) - lattice bending works now in 2d (X-Y plane), using angles. not vectors or quaternions. I will do 3d later. - 'cancel' when loading filegenerator is not crashing now - started non-local model for lattice - hopefully 2d lattice beams are now okay. middle button in 3d view is now "PAN" command, not "ZOOM" as it used to be. It's more similar to AutoCAD 'yade -h' will now display compilation flags (currently only DOUBLE_PRECISION - how about adding long double ;) ?) small fix so yade works with lates kubuntu: Threadable class has been removed: - when yade is idle 0% of CPU is consumed by the display, - when simulation is ran it is in separate thread, second processor (if present) is drawing on the screen, - with two processors theoretically QtGUI should have speed equal to NullGUI, - drawing on the screen is not synchronized, so some bodies are from previous iteration, some are from next iteration (later there will be an option to turn synchronization ON - it will slow down computations a bit) Renaming SimulationLoop to SimulationRunner. renaming finished. SimulationLoop -> SimulationRunner deleted yade-lib-threads, added SimulationRunner, that can start/stop or perform singleLoop of simulation in separate thread. final touches to SimulationRunner compilation fix yade-flat now allows to debug yade from inside kdevelop SimulationController is now updating iterations/time and sets time step correctly. updated INSTALL file (before release). Olivier Galizzi (10): Corrected one missing include into yade-package-lattice so that it is compiling Added new yade-spherical-dem-simulator plugin. It is compiling but I have not tested it for now. This plugin will be used to compare yade performances to a dedicated simulator that can only run simulation on spheres and which is not extensible. Corrected some symlinks (forgot to call symlinks -rcs) Improvement into SphericalDEMSimulator SphericalDEMSimulator is now working. But maybe an error remains because for now it is 10x faster than yade !! Started to add SimulationPlayer plugin to QtGUI Some small optimisation of Math library. Some if statement where remaining after an assert that were doing the same check. Improvement into SphericalDEMSimulator and QtSimulationPlayer. SimulationPlayer is now working; but there is no check to see is the files exists or not, so it is up to the user to be carefull (at least for now) Minor changes into NullGUI. ================================================== yade-0.09.0 Sun Aug 21 20:41:37 2005 +0000 Janek Kozicki (34): fixed some broken symlinks removed inifinite loop when loading plugins fixed setDebug and setRelease scripts. Set everything to debug. added yade-flat - it is very useful for debugging, because command: fixed some Makefiles - changed make to $(MAKE) corrected invalid usage of postfix increment++ changed Makefiles, so that qmake respects INSTALL_DIR and PREFIX_DIR corrected a mistake another correction in Makefiles still fixind Makefiles, should be OK now... So now I think that Makefiles are OK. But I've discovered a mistake in .pro, when trying to install to totally custom directory (for example /home/joe/work ). So I'm committing this before fixing that. so by default /usr/local/include is searched for include files. INSTALL_DIR and PREFIX_DIR modify this path automatically. So that there is no problem to install yade as a normal non root user, in home directory. all Makefiles are tested and are working. following commmands were tested (launched from trunk/ directory) I started renaming SpheresContactGeometry to MacroMicroContactGeometry, and also I am testing new fixed renaming scripts! still testing renaming scripts... after this commit I'll know if scripts are correct fixing item no. 35 in yade-core/.todo fixing item no. 35 in yade-core/.todo Finished fixing item no. 35 in yade-core/.todo renaming: SDECTimeStepper ElasticCriterionTimeStepper SDECTimeStepper -> ElasticCriterionTimeStepper finished SDECTimeStepper -> ElasticCriterionTimeStepper InteractionDescriptionSet2AABB -> MetaInteractingGeometry2AABB ./yade-scripts/renameClassFilenames InteractionDescriptionSet2AABB MetaInteractingGeometry2AABB ./yade-scripts/renameClassDirectories InteractionDescriptionSet2AABB MetaInteractingGeometry2AABB updated Changelog M trunk/Changelog D tags/yade-0.1 M trunk/Changelog preparing for release. is compiling with DOUBLE_PRECISION corrected instructions in INSTALLs text files. ok, I think that this version is ready for release added dependencies diagram started tagging releases. renemed top directory QtGUI to yade-gui-qt. Just like XMLFormatManager tagged all new releases! Olivier Galizzi (19): Better YadeQtMainWindow. Now menus are displayed in menu bar in the same order they are added in the program. Added preferences for QtGUI. Now it remembers size and position and exit. Now it is possible to choose time step from GUI. Created directory yade-plugins to store all yade unfisnished plugins Added iteratortest to test iterator on polymorphic container Improved version of polymorphic iterator Splitted files in iteratortest so there is one class per file I have introduced iterators for all types of containers in order to remove the dirty gotoFirst, gotoNext, hasNext and notAtEnd methods. Now it looks like more like stl iterators. It is compiling but unfortunately it is segfaulting at runtime, probably some problems in ++,* operators. Yade is now working with iterator. At least all configurations generated by some FileGenerator are working. Added some improvement into GLEngineEditor. For that I have rewritten a big part of yade-lib-opengl because it was not possible to delete windows without corrupting the id of the others windows. Added Makefile to compile and install all packages at once. Better design : added class related to MetaEngine. Removed all references to Serialization stuff into yade-lib-multimethod. They are now into newly added classes. Some cleaning in MetaEngine hpp and cpp. Some improvement into QtEngineEditor Improvements into QtEngineEditor. Now it is olamost possible to create graphically a simultation loop.Now I have to make something to set parameter of MetaEngines. Improvement into QtEngineEditor Moved REGISTER_CLASS_NAME from Serializable to Factorable and started to add REGSITER_BASE_CLASS_NAME to all Factorable classes. With those two macro we'll be able to build into Omega for example the class tree and then reuse it everywhere it is needed. For example it will be usefull to create GUI that want to deal only with this or this type of class. Now all classes register their base class name. Removed unused classes. Fixed some compiletion errors. Added Makefile to compile the whole trunk at once. Improvement int QtEngineEditor. Now only correct EngineUnit and base base are displayed thank's to the REGISTER_BASE_CLASS_NAME macro. Simulation loop editing is now working. There are still some random crashes to fix and for now it is not possible to load a simulation loop. ================================================== yade-0.08.7 Thu Jul 7 11:14:08 2005 +0000 Janek Kozicki (10): renamed mscv to msvc first version of Makefile for yade-lib-loki Makefiles are better added Makefile for all libs Makefiles uninstall correctly make install works for all yade-libs (weel, actually oinly three of them now) looks like commands: small correction in docs small fix for make clean after name change of libXMLManager we had to correct Makefile Olivier Galizzi (77): Created yade-libs directoryt to clean a little the directory tree Created directory yade-packages Created directory yade-empties Created yade-empties directory Removed directories yade-lib-rendering-engine-opengl and yade-lib-gui-qt because they now have no reasons to be there Renaming directory yade to yade-core Modified yade-empty-lib directory structure Added Makefile in yade-empty-lib Added README file into yade-empty-lib/doc/ Created yade-lib-qhull Created yade-lib-loki Added symlinks for yade-lib-loki Created yade-lib-wm3-math Making symlinks relative Created lib yade-lib-threads and yade-lib-time The lib yade-lib-factory was also created but is not working because it needs the lib-loki to be installed Creaed libs yade-lib-swiftpp, yade-lib-multimethods. Corrected yade-lib-time, yade-lib-factory Created libs yade-lib-opengl and yade-lib-algorithms Created libs yade-lib-serialization and yade-lib-computational-geometry Created libs yade-lib-serialization-xml and yade-lib-serialization-qt Corrected #include statements to point to yade/yade-lib-* instead of just yade-lib* removed old yade-empty-package Added new yade-empty-package which is simpler than previous one Started to add yade/ in all include statements Finished to change #include statements Sub-Project libraries removed from yade-core Yade is now compiling with separate libraries projects Yade is now compiling AND running !! :) Changed yade-empty-package so that all subdirectories contain not plural names. Added empty kdevelop project into yade-empty-lib Added script changeLibName into yade-empty-lib, which allow the user to change the name of kdevelop project, this is easier when you wnat to start to develop a library Added script into yade-empties so that it is easier to start to develop a new package of lib. Added yade-empty-gui Improved version of scripts that change the name of empties. Started to make yade-core clean (without all plugins) Making yade-core clean. Making yade-core clean yade-core is clean. When asking for default gui, QtGUI is choosen when return is pressed. Created project yade-guis/QtGUI Modified make clean to remove kdevelop temp file Cleaning yade-packages before splitting First version of yade-package-common with containers and DataClasses ok, but for Terrain which is not compiling Moved Terrain to sandbox because it is absolutely not finished yet. Some cleaning in yade-tmp Added PersistentSAPCollider and SAPCollider to yade-package-common Engine Created yade-package-fem and yade-package-dem Intermediate commit because I have put Ellastic*Law into Engine and not Engine/StandAloneEngine Continuing splitting of yade. Removed unused directories Created package yade-package-realtime-rigidbody, yade-package-lattice, yade-package-mass-spring All data classes are almost splitted Prepocessor are all splitted, so as DataClasses removed useless directories Splitted all InteractionSolver Added forgottent LatticeLaw StandAloneEngine Removed unused directories All MetaEngine are now splitted Removed unused directories Splitted engine unit to yade-common Moved directory previously moved to wrong place Temporary commit because of wrong svn mv Moved directories that were in wrong place All BodyEngineUnit are now splitted Removed unused directories Temp commit because of error Everything is splitted but RenderingEngine and NarrowInteractionGeometryEngineUnit Removed unused directories Everything is now splitted but RenderingEngine Removed unused directories Splitting yade-core finished. Maybe some changes will be needed in the future. Of course now we have to make compile the new projects ! Removed unused directory. Fixed symlinks error into yade-core yade-core and yade-common are compiling Yade-package-dem is compiling yade-package-fem is compiling yade-package-lattice is compiling yade-package-mass-spring is compiling yade-package-rigid-body is compiling So all packages are now compiling, but I still have to check for build order. Yade is now compiling and running Changed build order of yade-package-common so that it is compiling on the first try. ================================================== yade-0.08.6 Fri Jul 1 15:36:47 2005 +0000 Olivier Galizzi (14): Added some functions into yade-lib-computational-geometry Started to and graphical interface for buliding simulation loop and initializer list Added ommitted files QtEngineEditor.* Added unused class MetaEngine, MetaDispatchingEngine2D and MetaDispatchingEngine1D. I wanted to make something easier for the user but it is not working now. Updates into QtGeneratedCodeGenerator.ui. Started to implement the GUI Updates in Omega : now foreach plugins we store if it is indexable, factorable or serializable. Improved code generation : Data class, engine and dispatching engine works. No stuff is done for generation of kdevelop projects. All libs use now $(YADEDYNLIBPATH)/yade-libs directory as output path. Some changes had to be made in most of the .pro files. Added a preference editor in QTGUI Attempt to use Yade without environnement variable. I am closer to the solution but it is still not working. Small change so that yade is compiling with qglviewer 2.0 No there is no need to set up and environnement variable to run yade. Of course because the libs are still into a local dir your LD_LIBRARY_PATH should point to this local folder. Yade is now working and compiling. Started to move yade-lib-gui-qt back to plugins yade-lib-gui-qt moved back to plugins Yade is now compiling fine. I removed qyade and nyade since they are not needed anymore. Added user manual without pictures. But .tex is compiling well. ================================================== yade-0.08.5 Sun Jun 19 23:01:35 2005 +0000 Janek Kozicki (5): it's compiling now with gcc 3.3 added warining in Omega.cpp when trying to scan non existing directory for dynlibs added missing 'virtual' to destructors of some classess - I had random compiler/startup errors because of that. openGL problem fixed - yade must link with -lglut, and display works. Lattice works with rods, but dirty, of course - as always when something is implemented for the first time :> Olivier Galizzi (6): All EngineUnit now link with their corresponding MetaEngine otherwise findType doesn't work ! Why ... I don't know ! :) Because EngineUnit only use the abstract class contained inside corresponding MetaEngine dynlib and nothing else ... To make yade deserialization working I had to modify PointerHandler.tpp around line 90. Basically I just remplaced a dynamic_cast by a reinterpret_cast. We have to find why dynamic_cast is not working anymore ! Added some dynlibs for handling swept sphere volume. Tetrahedron are almost working. A bug into SWIFT is still causing troubles. Some changes into SweptSphere and Tetrahedron Putting some stupid name for 2 enum in Typelist.hpp (l 518 and 520) so that yade is compiling with gcc 4. Gcc 4 do not accept anymore anonymous enum type ! ================================================== yade-0.08.4 Mon May 23 12:51:50 2005 +0000 Janek Kozicki (1): added -lpthread in some places, so it is compiling with g++ 3.3 Olivier Galizzi (17): Removing MarchingCube GeometricalModel (because it is not a GeometricalModel !) Renaming PhysicalActionEngineUnit to PhysicalActionDamperUnit and PhysicalActionApplierUnit Added class Preferences that contain directory to dynlibs. Modification of library yade-lib-factory so that it is using multiple directories to look for requested dynlib Removing remaining directory toolboxes Started to split include files of libraries into different directories. Started to change all #include "lib" to #include Corrected some wrong #include stuff All include files from plugins/pre and post processor are now into include/yade-common. This is not final destination but it is closer to want we want. All #include stuff are modified according to this new structure. Added script countNbLines that count the number of lines of code of the project Starting renaming SimpleSpringLaw to FrictionLessElasticContactLaw Renaming SimpleSpringLaw to FrictionLessElasticContactLaw Renaming SimpleSpringLaw to FrictionLessElasticContactLaw SimpleSpringLaw renamed to FrictionLessElasticContactLaw. Yade is compiling. Improved documentation : added introduction to YADE Improved documentation Added librarie swift++ and qhull. Modified scripts so that they works with .h and .c files. Added MarchingCube algorithm into yade-lib-computationnal-geometry Created lib yade-lib-algorithms were to gather algorithms of different type : for now there is only a PerlinNoise algorithm, but we can put here sorting algorithm ... Moving, renaming some directories before splitting Added new file generator Funnel and TetrahedronsTest Added new interactingGeometry PolyhedralSweptSphere Added new NarrowInteractionGeometryEngine SwiftPolyhedronProximityModeler that will use SWIFT++ library and PolyhedralSweptSphere Added EngineUnit Tetrahedron2PolyhedralSweptSphere and Box2PolyhedralSweptSphere that will build InteractingGeometry ================================================== yade-0.08.3 Tue May 10 08:40:39 2005 +0000: Olivier Galizzi (32): Renaming ActionParameter to PhysicalAction Renaming ActionParameter to PhysicalAction finished Renaming ActionParameterForce/Momentum to Force/Momentum adn ActionParameterInitilizer/Reseter to PhysicalActionContainerInitializer/Reseter Renaming ActionParameterForce/Momentum to Force/Momentum adn ActionParameterInitilizer/Reseter to PhysicalActionContainerInitializer/Reseter ... Renaming ActionParameterForce/Momentum to Force/Momentum adn ActionParameterInitilizer/Reseter to PhysicalActionContainerInitializer/Reseter Renaming ActionParameterVectorVector to PhysicalActionVectorVector ... Renaming ActionParameterVectorVector to PhysicalActionVectorVector ... Yade is now compiling ... Moving NullGUI to yade core and renaming QtGUI to yade-qt-gui Moving yade-gui-gt from extensions/Frontend to gui Still moving yade-qt-gui Moving XMLManager from extensions/IOManager to serialization Renaming back yade-qt-gui to QtGUI to try to make yade compile first ... Renaming back yade-qt-gui to QtGUI to try to make yade compile first finished Forgot to re-ad QtGUI to kdevelop project Changing yade-empty-package directory tree Changing build order Moving all MetaEngine stored inside yade core to plugin/engine/metaengine ... Moving MetaEngine from yade to plugins Moving MetaEngine from yade to plugins Moving MetaEngine from yade to plugins... Modifications so that yade is compiling with new directory tree Creating library yade-lib-serialization-qt and yade-lib-time Changing build order and moving XMLManager to libraries Changing build order and removing unused directory serialization Renaming XMLManager to yade-lib-serialization-xml Moving gui/QtGUI to libraries/yade-lib-gui-qt Changing build order and finishing renaming of XMLManager and QtGUI Changing the way QtGUI load OpenGLRenderingEngine so that QtGUI doesn't need anymore to link with OpenGLRenderingEngine library. Making yade main application with flat directory structure Making yade main application with flat directory structure Removing all references to libraries Interactions, Body, Engine than no longer exist. Yade should now compile. Splitted ElasticContactLaw into 2 : ElasticContactLaw and ElasticCohesiveLaw. Autocollision for hanging cloth is working without hack. ================================================== yade-0.08.2 Fri May 6 15:57:05 2005 +0000 Olivier Galizzi (75): Starting creating new directory structure Directory renaming ... renaming directories ... Directory renaming ... Directory renaming ... Directory renaming ... Directory renaming ... Directory renaming ... Directory renaming ... Directory renaming ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... s D yade/src/plugins/Engine/ActionParameterFunctor D yade/src/plugins/Engine/PhysicalAction Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Directory tree redesign ... Finishing directory tree redesign ... not compiling yet Now starting to rename files and some directories Renaming files ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes ... Renaming classes is almost finished and yade is now compiling ! Renaming libraries to yade-lib-* Renaming libraries to yade-lib-* ... Renaming libraries to yade-lib-* Renaming libraries to yade-lib-* Renaming libraries to yade-lib-* Renaming libraries to yade-lib-* done. Yade is now compiling. Moving DataStructure to plugins ... Moving DataStructure to plugins finished Yade is now compiling on the first try. I removed initialization in constructor of bodyContainer, InteractionContainer ... because now container are in plugins and so compiled after yade itself. Changing name Dispatcher/funtor to MetaEngine/EngineUnit Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit ... Changing names Dispatcher/Functor to MetaEngine/EngineUnit finished ================================================== yade-0.08.1 Wed Apr 27 16:51:17 2005 +0000 Janek Kozicki (348): deleted file makeSymLink, and corrected calling scripts, when current directory is not in $PATH - just added ./ everywhere better scripts - easier to use better script to switch dynlib on/off, but still not good enough removed spaces at the end of line Multimethods work! but class Factorable MUST be added, to clean mess with CollisionFunctor correcten compile dependencies - builds again from command line corrected (again) compile dependencies removed couple of compiler warnings added yade/scripts/setDebug yade/scripts/setRelease added FIXME about serialization, and Omega constructor tells about -rdynamic flag added comments into MAIN LOOP (currently inside NonConnexBody) scripts now check if YADEPATH was set scripts now checking if YADEPATH set, othervise tell user to set it moving GUI to frontend moved GUI to FrontEnd added FactoryExceptions so that ClassFactory is reusable fixed ArchiveTypes.hpp:FIXME : change SMART_POINTER to POINTER and STL_CONTAINER to CONTAINER added ClassFactory snippet, in order to clean it and make reusable ClassFactory now should be really reusable starting work with Serialization (spirit) preparing yade to use reusable snippets - do not modify those files inside yade! do it in snippets instead now yade uses exactly the same files as snippets. DO NOT MODIFY THEM, modify snippets first, then copy here. now yade uses boost::spirit, DO NOT MODIFY, work on snippets instead little cleanup, before making resetable rootBody corrected spirit. DO NOT MODIFY, please test on snippets first. now hanging cloth uses fundamental variable [ {1 {2 3 4}} {1 {2 3 4}} ... ] we started adding SDEC element. now SDECTestExample works. but not rotating box. and we need to clean stuff SDECDynamicEngine starts to work with contact law moving CollisionModel into CollisionGeometry changing *PhaseCollider into *Collider changing *PhaseCollider into *Collider (2) changing *PhaseCollider into *Collider (3) changed *PhaseCollider into *Collider, now starting with qmake static libraries inside yade directory now yade accepts more arguments on input: filename, timestep, maxiter added benchmark - we can easily test speed changes of yade CollllisionFunctor does NOT need to derive from Indexable!, rearranging subprojects changes in Math directory... more changes in directory tree (I must commit between changes...) more changes in directory tree (I must commit between changes... 2) moving files around ...still not compiling.. i must commit before I move directories.. looks like I've found a solution for qmake... looks like I've found a solution for qmake...2 finally! rearrangement of qmake/yade subtree. Serialization must be a dynlib!! it is absolutely not working as a static library!!, Omega must be freed from dependency on Vector3, this causes lots of problems (4hours to find it), 12h total, wheeeew. I Hope this work is not useless... CollisionFunctor derived or not, from Indexable? (in g++3.3 if YES - it's faster, but rather uncorrect...) now compiles with g++3.3, that was darn difficult to figure out, and is not slower than 94 svn status -q :) correction in SDECDynamicEngine with PermanentLinks, and Quaternion precise rotation added tetrahedron with permanent links, and -a flag, to say if we want autostart computations added NullGUI, and -p flag SDECBenchmark8k.xml is working now. added two more examples not working moment law - just after implementing it with JP wtf with euler angle on y direction??? added SDECMoreTetrahedronsWithLinksMDEM3D.xml this one works stable, but bad: data/SDECPermanentChainRotated.xml corrected SDECRotatingBoxWithTetrahedrons.xml and FileGenerator/RotatingBox/RotatingBox.cpp added LinkedSpheres filegenerator, small note inside Translatro.cpp - so that we can reproduce strange bahaviour changed order of REGISTER_ATTRIBUTES in NonConnexBody - interactions are first SDECDynamiCEngine has damping 0.3 now (should be attribute!!) added SDECCollision.xml - looks really good with timestep 0.003(FIXME - should be inside .xml) and moment law uncommented(FIXME) in SDECDynamicEngine XMLManager says line number of .xml if serialization fails, at least sometimes... Serializtion now supports: std::map, Loki::AssocVector, std::list, std::deque, std::set, std::vector, std::pair, boost::tuple1/2/3/4/5 corrected all .pro files to include toolboxes/Libraries/AssocVector - so that yade now compiles and runs good with all that new serialization stuff createIncludes script corrected, Makefile removed this version of file is used to make comparision of results with Jean Patrick corrected - works with current (unfinished) containers moved Singleton.hpp to toolboxes/Libraries/Singleton - place where it belongs now yade works with new serialization - added beforeSerialization, afterSerialization, beforeDeserialization, afterDesrialization removed class Contact, in prepare for interactionContainer added InteractionContainer (not integrated yet) InteractionContainer integrated into yade InteractioContainer eraseCurrent() useful for SAPColider BodyContainer starts to work BodyContainer with ids works, now I havr to move it into yade/Body, yade/Interaction InteractionContainer and BodyContainer integration completed. but container classes quality/speed is not good (and tested) yet InteractionVecSet and BodyVector FIXED threading on multi-processor machine (not real multiprocessor, just hyper threading...) rename BodyVector to BodyRedirectionVector corrected BodyRedirectionVector, added comment in Singleton scripts that allow easy switching between relative paths and paths in environemnt YADE*PATH variables threads are now crashing little less often... (only when clicking "new view" "start" "stop") XMLManager writes pointers in a shorter way, with _className_ preProcessAttributes postProcessAttributes converted SDECBenchmark8k.xml NullGUI works - for benchmars of Vector3 not in Serializable, etc.. scripts are checking all Environement Variables - more safety fixed missing is_base_and_derived in Indexable.hpp started with OpenGLWrapper and removed extra tabs in serialization OpenGLWrapper starts to work - now to write all those functions from gl.h OpenGLWrapper 50% done - and #DOUBLE_PRECISION works! (float/double) improved SDECLinkedSpheres (momwnt law is not workingsvn status -q) SDECCollision.xml is loading correctly, but is not working!!! - it was working previously!! SDECCollision.xml works for dt=0.003 SDECCollision.xml and SDECTetrahedronWithLinks.xml work for dt=0.003 SDECLinkedSpheres example now is much more interesteing, with dt=0.003 fixed hack in PointerHandler, fixed SDECBenchmark8k, some .pro were release, not debug ok, this problem in IOManager.cpp is strange... rearranging directories. changing directories cd... changing directories cd... changing directories cd... Finished rearranging subdirectories. Now we have directory extensions (we can rename it, if there is a better name), and ClassFactory is in toolbox/Libraries, Multimethods (once there are done) should go there too, because MultiMethods have nothing to do with yade. yade is now compiling (and works) with g++ 3.3 all .xml examples except ErrorTolerant, are now working NullGUI is now saving results during computations. Those results can be opened with QtGUI and we can see what is computed. added filegenerator that can import data files from SDEC hack, which must be corrected just after adding Action, allows to measure forces during simulation InteractionVecSet is corrected and working, yade is now compiling withi double (there was some mistake with float), but all the examples are now broken! yade is now crashing less often, so I hope that we will never again see that error: again was not compiling with double.... corrected some threading problems, removed MyEngine2 from DynamicEngine.pro, because it doesn't exist added SopeTest in SimulationController -pthreads -lpthreads are required for yade to compile with 3.3!! don`t remove them!!!! added some comments to code regarding integration with new multimethods started integration of multimethods integrating new multimethods, continued... 1D, 2D MultiMethods are working in yade. but there is a bug in DynLibDispatcher, current workaround is done with a hack added some comments to working multimethods, hack is little better, but not removed, yet Multimethods are now working, clean, checked with valgrind, and results from older version are compared with kompare. added two postprocessors - recording forces, and average position. but why they crash Omega.loadDynLibs(), when I use ofstream??? force recorder is not modifying data anymore, but anyway it`s dirty and must use Action, and work like real sensors!! SDECImport uses new dialog box changes into Interaction and Interaction container: version 0.1.5, with many changes: - moment rotation law added, mess inside SDECDynamicEngine (three enegines in one!) - Serialization now supports almost all std, boost and Loki containers and more - math classes are separate from serialization, and done with templates (but with wild-magic license) - for storing Bodies and Interactions we now use polymorphic classes InteractionContainer and BodyContainer - yade uses threads now, but still not fully stable - switch at compile time to select float/double precision of calculation - displayed objects are now casting really cool shadows - some examples are not updated, and therefor not working. it is guaranteed that SDECBenchmark8k will always work. - BoundingVolume optimized for each kind of GeometricalModel makes computation almost twice faster - new very generic MultiMethods are added, allowing multivirtual call with extra parameters, and easy code reuse added changelog small correction in Interaction constructor putting Real in all places where it is used for calculation was not compiling because of stupid .pro problems renamed DynLibLauncher to FunctorWrapper changing name from SDECContactModel to SDECContactModel - but not tested yet - I must commit between subversion operations SDECContactModel renamed to SDECContactGeometry, OK renaming BroadCollider, NarrowCollider to BroadInteractor, NarrowInteractor, part 1 still renaming finished renaming BroadCollider, NarrowCollider to BroadInteractor, NarrowInteractor changed color of sphere number 1 and 10 - this is for checking the shearForce between those spheres (as we had numerically different results for float and double) some cleaning before ActionContainer some .pro conflicts, now it's compiling, still before ActionContainer added empty class ActionVecVec I added empty classes ActionForce and ActionMomentum, because I need something that ActionContainer can store classes are empty now. So, now all classes are added: Action, ActionVecVec, ActionContainer, ActionForce, ActionMomentum, etc.. but they are empty. And it is compiling abstract interface for ActionContainer is specified, now to fill in the class ActionVecVec .... work inside ActionVecVec - not done yet, but is compiling corrected compilation order (except for CollisionGeometrySet, which is a sign bigger design flaw, than just a compilation order) and xorrected SDECBenchmark8k.xml so that it is running with latest modifications ActionContainer->reset() - resetting actions without deleting all the pointers - faster changed the way in which ActionContainer works, now all fields are never empty. DynamicEngine (or some other actor?), when if(first) must call ActionContainer->prepare(), and then ActionContainer works much faster. added flat kdevelop project, this is for debugging - I don't know why, but alleyoop is not showing line numbers inside dynlibs, now... finad() and getCurrent() in containers are now returning references, as it should be faster Body is Indexable, but we have to register SDECDiscreteElement to dispatcher, not RigidBody... it's a bug in Indexable class, or somewhere there... Multimethods now support inheritance in Indexable objects, I had to modify in Indexable class: possibly faster DynLibDispatcher, I was also trying to fix problem that Singleton is not deleted at end, but finally I made only some improvement, but it is still not fixed. renaming CollisionFunctor to InteractionFunctor, part 1 renaming, part 2 renaming, part 4 renaming, part 5 renaming, part 6 finished renaming of InteractionFunctor, and I also corrected colors in qt dialog, and qt simulation-controller window. But I'm not sure about colors in qt dialog. small change in ActionDispatcher.cpp, is faster, but if Action was holding body's id it is possible that it can be faster corrected SDECBenchmark8k.xml, and I've checked that visually simulation is the same as previous version renaming... moving stuff around moving stuff around moving stuff around cd.. moving stuff around... now I'll try to compile... still trying to compile... it is almost compiling so it is compiling, except for CollisionGeometrySet problem OpenGL display works with strange static_cast inside DynLibDispatcher started with PositionOrientationRecorder changed double to Real in few remaining places. small fixes in multimethods. remove ParticleBallisticEngine BallisticDynamicEngine renamed geometricalModel, interactionGeometry, boundingVolume before renaming class name of CollisionGeometry to InteractionGeometry renaming collistion to interaction, cd... renaming cd... renaming... renaming... renaming... renaming... still renaming collision to interaction... still renaming collision to interaction... still renaming collision to interaction... still renaming collision to interaction... still renaming collision to interaction... renaming mess.. classes aggregated by Body have a prefix 'Body' in their name, to reduce confusion of class names: fixed OpenGL display of cloth, and still renaming classess aggregated by Body Loki library in single place, but it should be renamed to SmallLoki, or YadeLoki, because this is not an exact copy of Loki library. added FactoryFunctors and UpdatorFunctors for BoundingVolume, GeometricalModel, etc... They are empty for now Loki ok (just should be SmallLoki, or YadeLoki), BodyAssocVec -> BodyAssocVector because of name conflict between Body::InteractionGeometry and Interaction::InteractionGeometry, maybe name Body::InteractionDescription will be ok? this is what I've renamed in this commit so now we have (arrow <- means 'aggregates'): renaming cd.. renaming cd.. renaming cd.. before renaming InteractionFunctor-s to InteractionGeometryFunctor-s little renaming/cleaning is finished. problem with InteractionDescriptionSet is solved, and now yade just compiles without any errors! I have done some general cleaning - removed unnecessary constructors, deleted unused postProcessAttributes, etc.. OK/Cancel works now in file selection dialog, ActionForce2RigidBody was deleted, because ActionForce2Particle does the same job now I'm staring to work on updating GeometricalModel of Mesh2D, so that cloth will be displayed properly changed names RigidBody to RigidBodyParameters and so on before making correct display of cloth geometrical model I have to move Geometry into Body, because Body owns geometry, and it will not compile if I don;t move it there. all renaming finished for now. so I'll start with proper update of geometrical model for cloth. update of GeometricalModel for cloth is working is compiling now with g++ 3.3, and with double FunctorWrapper is Serializable, now - because we want Dispatcher to work with serialization, so that Functors can get extra arguments from .xml Functors are serializable, so now I'm working on DynLibDispatcher to support this serialization of functors Serializable functors are working, so now I'll separate damping from SDECDynamicEngine. It will be a functor, with parameters. preaparations for ActionDampingFunctor, corrected SDECBenchmark8k.xml damping is separated from SDECDynamicEngine and works, strange is that ActionDampingDispatcher and ActionApplyDispatcher are exactly the same!! so they should be merged into one dispatcher. maybe Action2BodyPhysicalParametersDispatcher damping works quite good added ActionReset - it is not inside SDECDynamicEngine - because for cloth example we have two/three engines, so they can't do a reset - because they will delete results from other engine renamed: stared with RotatingBox with simplespring, filegenerator... RotatingBox example with spheres and boxes inside is working quite good - with SimpleSpringDynamicEngine BoxStack example is working quite good. meybe it should be renamed to WallImpact, or something like that... the real name for damping is: Cundall Non Viscous Local Damping TimeStepper is working quite nice, and now - even SDECLinkedSpheres example is stable! SDECParameters is now holding shearingAngle, young modulus and posiions ratio - as it should. internal shearing angle is added, and yade is ready to compare results with sdec, although force recorder is little dirty, because it is releasing the bug ball some small corrections, before comparing results with sdec splitting leapfrom integrator into two parts.... added velocity recorder, and timeintegrator is split in two parts started with lattice model Lattice model generation starts to work. SDECImport can also create walls made of spheres Body::group changed into Body::groupMask (so bodies can belong to many groups - max. 16 groups, because we have 16 bits here) supid error everywhere!!! volume of a spohere was 4/3*PI*radius*radius, EVERYWHERE!!!. the volume of a sphere should be calculated in ONLY one place!!! so now we will make another comparision with SDEC, after sphere volume was fixed renaming DynamicEngine to InteractionLaw renaming KinematicEngine to KinematicMotion DynamicEngine -> InteractionLaw KinematicEngine -> KinematicMotion renaming DynamicEngine is ConstitutiveLaw ApplyActionForce2Particle -> NewtonsForceLaw ApplyActionMomentum2RigidBody -> NewtonsMomentumLaw started nice class diagram better (but not finished) class diagram version used for training with Julien, Frederic, and Luc yadeExampleTimeLoop.dia (xml) almost finished renaming Action to ActionParameter renaming cd... renaming cd... renamed Action to ActionParameter separating gravity to GravityForceFunctor - it is necessery because I'm preparing code for courses. some filegeneratr examples now have zero gravity, and empty ActionParameterContainer, that is easy to fix with ActionParameterInitializer, when doing ActionParameterInitializer, also ActionParameterReset must be done correctly and split from ActionReset. Then we have to add ActionParameter displacement, position and angularDisplacement, so that ImposeKinematicConditions will work correctly (AngularDisplacementFunctor, DisplacementFunctor (it was Rotor and Translator)) some cleaning stared ActionParameterInitializer and ActionParameterReset started LeapFrogOrientationIntegratorFunctor and LeapFrogPositionIntegratorFunctor LeapFrogOrientationIntegratorFunctor LeapFrogPositionIntegratorFunctor done renaming KinematicMotion to COndition renaming KinematicMotion to Condition renaming KinematicMotion to Condition ForceCondition GravityCondition RotationCondition TranslationCondition, are OK renaming.. renaming.. renaming.. renaming.. renaming.. renaming.. renaming.. renaming.. renamed: SDECParameters -> BodyMacroParameters SDECContactGeometry -> MacroMicroContactGeometry, and all functors SDECMacroMicroElasticRelationships -> MacroMicroElasticRelationships SDECContactPhysics -> ElasticContactParameters SDECLaw -> ElasticContactLaw added empty classess: added empty FEMSetTextLoaderFunctor FEMBeam load the file correctly FEM bodies inherit from BodyPhysicalParameters scripts to rename classess, hopefully working correctly I'm testing the renaming scripts: I'm testing the scripts: I'm testing the scripts scripts should work now, with small human intervention I'm testing scripts again ./renameClassFilenames FEMTetrahedronParameters FEMTetrahedronData ./renameClassDirectories FEMTetrahedronParameters FEMTetrahedronData ComplexBody has now actors and initializers, and thanks to that FEMSetTextLoaderFunctor is working. FEM is half done - generation works. and other stuff. Only Constitutive Law for FEM is empty - waiting to be written. But there is a compilation problem we have to compile twice now, because of linker errors in fem loader. FEM works!! GLDrawTetrahedron is now drawing solid tetrahedrons. but sometimes it is drawing not correctly.... corrected some comments in FEMLaw FEM stuff is compiling correctly, some cleaning. created directory A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-fem created created created A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-qt A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-wm3math A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-loki A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-serialization A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-multimethods A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-factory A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-threads A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-opengl A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-computationalgeometry A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-massspring A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-realtime-rigidbody A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-computational-geometry D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-computationalgeometry A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-wm3-math D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-wm3math A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-mass-spring D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-massspring A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-empty A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-sandbox A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-serialization-xml A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-dem-fem D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-femdem better openGL tetrahedron display A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-time A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-gui-qt D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-qt A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-rendering-engine-opengl A trunk/yade-package-fem A trunk/yade-package-fem-dem D trunk/yade-mass-spring A trunk/yade-package-realtime-rigidbody D trunk/yade-dem D trunk/yade-fem D trunk/yade-dem-fem D trunk/yade-realtime-rigidbody A trunk/yade-package-lattice D trunk/yade-lattice A trunk/yade-package-mass-spring A trunk/yade-package-dem A trunk/yade-lib-wm3-math A trunk/yade-lib-loki D trunk/yade-rendering-engine-opengl A trunk/yade-lib-factory A trunk/yade-lib-computational-geometry D trunk/yade-multimethods A trunk/yade=lib-time A trunk/yade-lib-opengl D trunk/yade-threads D trunk/yade-wm3-math D trunk/yade-time D trunk/yade-loki A trunk/yade-lib-rendering-engine-opengl D trunk/yade-factory D trunk/yade-computational-geometry A trunk/yade-lib-multimethods D trunk/yade-opengl A trunk/yade-lib-threads A trunk/yade-lib-time D trunk/yade-serialization-xml D trunk/yade-serialization A trunk/yade-lib-serialization-xml A trunk/yade-lib-serialization D trunk/yade=lib-time fem-dem coupling ... disabled stuff in QtGeneratedSimulationController changed todo changed something in interactions ./renameClassFirst InteractionDescription InteractingGeometry ./renameClassFilenames InteractionDescription InteractingGeometry D yade/src/yade/Body/InteractionDescription A yade/src/yade/Body/InteractingGeometry D yade/projects/kdevelop/yade/Body/InteractionDescription A yade/projects/kdevelop/yade/Body/InteractingGeometry A yade/projects/kdevelop/yade/Body/InteractingGeometry/InteractingGeometry.pro M yade/projects/kdevelop/yade.kdevelop SimpleBody deleted renameClassFirst ComplexBody MetaBody ./renameClassFilenames ComplexBody MetaBody D yade/src/plugins/Body/InteractionDescription A yade/src/plugins/Body/InteractingGeometry D yade/src/plugins/Body/InteractionDescriptionFunctor A yade/src/plugins/Body/InteractingGeometryFunctor D yade/projects/kdevelop/plugins/Body/InteractionDescription A yade/projects/kdevelop/plugins/Body/InteractingGeometry D yade/projects/kdevelop/plugins/Body/InteractionDescriptionFunctor A yade/projects/kdevelop/plugins/Body/InteractingGeometryFunctor M yade/projects/kdevelop/plugins/Body/Body.pro M yade/projects/kdevelop/yade.kdevelop D yade/projects/kdevelop/plugins/Body/InteractingGeometry/InteractionDescription.pro A yade/projects/kdevelop/plugins/Body/InteractingGeometry/InteractingGeometry.pro D yade/projects/kdevelop/plugins/Body/InteractingGeometryFunctor/InteractionDescriptionFunctor.pro A yade/projects/kdevelop/plugins/Body/InteractingGeometryFunctor/InteractingGeometryFunctor.pro DeusExMachina /renameClassFilenames Condition DeusExMachina Condition DeusExMachina Condition DeusExMachina ./renameClassFirst InteractionSolver ConstitutiveLaw ./renameClassFilenames InteractionSolver ConstitutiveLaw InteractionSolver ConstitutiveLaw InteractionSolver ConstitutiveLaw Actor - Engine Actor - Engine BodyPhysicalParameters PhysicalParameters BodyPhysicalParameters PhysicalParameters BodyPhysicalParameters PhysicalParameters BodyPhysicalParameters PhysicalParameters ... ... ... ... ... ... ... ... A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-empty-lib A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-package D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-empty A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-empty-package D svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-package updated todo A svn+ssh://svn.berlios.de/svnroot/repos/yade/trunk/yade-lib-serialization-contrib we have made a great yade-empty directory structure!! Olivier Galizzi (147): removing ui file from CORBA IDL section and problem with moc resolved by removing trailing slash at the end of YADEPATH moving everything into subdirectory yade (part 1) moving everything into subdirectory yade (part 2) changed README - better quick-guide renaming function collisionModelisationPhase to narrowCollisionPhase smalls changes into ContactModel, CollisionModel, Body for preparing to multimethods. Class Indexable added. Splitting collision function into dynlibs Multimethod implemented but not tested yet! Indexable class not working (can't shared_dynamic_cast Serializable to Indexable) New classes added (Factorable,Interaction,InteractionModel) Rewriting class Factorable and InteractionModel because subversion delete their content during last commit ??? Add some toolboxes (M3D,M2D,Rand,Constants) Some unused files were removed. The content of some files was again erased by an unknown reason? All serialization stuff are now into a dynlib Putting build order in the correct order Toolboxes Distances and Intersections created shared_dynamic_cast was changed to dynamic_pointer_cast Adding new class for cloth simulation. There is some mess with serialization. starting adding cloth simulation Cloth simulation is working but some stuff are dirty Cloth and spheres are working together but in a dirty way Starting adding FEMBody and renaming Cloth to MassSpringBody Putting all GUI stuff into a dynlib and new class QtGUIGenerator (that generate a qt widget from a serializable object) added Correct some little error in QtGUIGenerator subproject Changing build order Minor changes + adding boxes into RotatingBox Better tuning of rotatingBox simulation Added not working BoxStack, and createDynamicEngine script New SDECDiscreteElement and SDECDynamicEngine added New simple example for SDEC added Some minor changes in SDECDynamicEngine - but it is still not working with RotatingBox New multimethod design (moved from omega to nonconnexbody) Some include of Omega were missing in previous commit Improved detection of new and old interactions (we hope it is faster) We change the way we remember contacts from previous time step (new geometrical old physical) Added Actor so we can choose order of main loop modules. Started to add permanent links Added new ErrorTolerant classes SDECTestPermanentLink.xml is now working Added ErrorTolerant classes round 2 Added todo file, corrected examples, corrected permanents links, started to add jean patrick law Moment law is now working better but there are still some problems Moment law is now using Quaternion instead of weird modulo loop for computing dBeta (but still some problem) Moment law seems now to work or at least it is much more stable Added Translator kinematic engine Continuing ErrorTolerantDynamicEngine and added CollisionFunctor for him LCP solver using bi-conjugate gradient is implemented but is not working yet Starting moving libraries AssocVector, Frontend, IOManager to correct places added /home/evasion/galizzi/devel/yade/yade/include, libraries in correct places now modified todo, removed some junk Change all declaration of Math stuff so that it is using new template Vector3, Matrix3 ... Yade is now working with new serialization of vector ... Removed output when class are registered Added some todo stuff QtGUIGenerator is now able to (de)-serialize all fundamentals into a serializable Add QtFileGenerator, for automatic file generation with Qt GUI (not completely working yet) QtGuiGenerator and QtFileGenerator are now working Added improvements into QtGUIGenerator and QtFileGenerator All Qt libraries are now in one library. Improved version of QtGUIGenerator Removed directory QtFileGenerator and QtGUIGenerator Created new qt controller for simulation and new opengl library New SimulationController is now working Started moving simulation loop from glViewer to a specific thread Added ThreadSynchronizer. Yade is now working with external simulation loop Improved thread management. Multiple views are now working Improved GUI. Is ThreadSynchronizer really working ? Improved version of Threads library Added omitted Thread* files Changes into ThreadSynchronizer Much better version of Thread library and multithreaded QGLViewer Reenabling GUI updater thread Now we use InteractionHashMap by default because InteractionVecSet is not ready yet Added RenderingEngines Changing build order Shadow added but not working yet because of problems with stencil buffer Shadows are working but not when they overlap Changing stencil function solved the problem with overlapping shadows Better lighting parameters Faster shadow. Only 1 rendering instead of 3 and use of QUAD_STRIP Improved QtGUI Improved QtGUI some changes in shadows Improved SDECSpheresPlanes Improved fast shadow volumes Added new classes for bounding volume management (not used yet) Bounding volume are now both indexalbe and a GeometricalModel BoundingVolume update is now done into an actor Improved version of GLWindowManager library Improved GUI with (de)-serialization of RenderingEngine into SimulationController Improved version of QtGUIGenerator. Now boolean are represented by checkboxes instead of linedits Better handling of start,stop and reload simulation. Thread now terminate when associated window is closed Update in BoundingVolume updating. Now it is working for rootBody through it CollisionGeometrySet. Scene is now dynamically centered when file is loaded Changes into FileGenerator Fixed some problems with FileGenerators Boxes are now casting shadows Boxes are now casting shadows Better handling of thread into GUI. But they are still problems especially if you close the first GLWindows because it contain the GLContext where the GL lists are stored Improved stability Threads improvement Somes changes into Thread and GUI Mush better handling of threads, open/close ... it is never crashing on my laptop at least Now yade is no more segfaulting on exit Display list are now builded at each new creation of RenderingEngine Changes into threads Added createDynlib script Added Messagedialog Fix error when reloading simulation and display list are now not built several times Redesigned the way we use boost::lock Added mutex into Threadable sleep method Added changes from snippets Thread Better handling of real simulation duration Improved GUI Persistent SAPCollider is now working. Added PersistantSAPCollider files that were missing in previous revision Added script addClassToDynLib Fix crash with permanent links. Added clas InteractionPhysics Added subproject InteractionPhysics Renamed subproject InteractionModel to InterationGeometry Added into SVN repository omitted files InteractionPhysics Problem with InteractionPhysics Corrected kdevelop mistakes due to introduction of InteractionPhysics Added SDECContactPhysics and SDECPermanentLinkPhysics Fix mistake into SDECPermentLink : Some attributes were not registered Implemented InteractionPhysics and InteractionGeometry Updated todo list : Switch all possible dynamic_pointer_cast to PointedType * p = static_cast(shared_p.get()) Added Action, ActionContainer, SDECLinearContactModel, PhysicalInteractor. We started redesign to introduce Action which are the response of a DynamicEngine to an Interaction and acts on body. Adding factorable macros into Action and ActionContainer Add function add,sub and reset into Action classes. Almost finished action container. You have to call createIndex() from constructor of all Indexable class. Before adding displatcher for applying Actions. Added ActionDispatcher. Now we want to use it. Now ActionDispatcher is working. Added omitted files from previous commit. Added single step button in QtGUI Better SpheresPlanes FileGenerator Started to rename and move SimpleNarrowCollider and classes related to InteractionPhysics InteractionPhysicsDispatcher starts to works. But we have to make BodyPhysics HangingCloth is working again but it is designed using Yade framework Small changes into MassSpring so that it is faster Added BodyPhysics class and moved all type of bodies into subdirectory BodyPhysics To add BodyPhysicalParameter we have to make OpenGLDispatchers. So we started to add all of them. OpenGL continued... Stuff with BodyPhysicalParameters is compiling . Corrected some bugs due to introduction of BodyPhysicalParameters Created TimeIntegratorFunctor and Dispatcher. BallisticDynamicEngine is now LeapFrogIntegrator Corrected KinematicEngine. MassSpring cloth is now working : but we still have to update geometricalModel Added layout and scrollview to QTGUI corrected function name into Quaternion Added file yade.sxw which contain concept and spirit of yade Added tree file to rename files and directories Added some concepts into yade.sxw trunk-1.07.0/INSTALL000066400000000000000000000000561226405415500140000ustar00rootroot00000000000000http://www.yade-dem.org/doc/installation.html trunk-1.07.0/LICENSE000066400000000000000000000434751226405415500137700ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. 13. As a special exception, you have permission to link this program with the CGAL library and distribute executables, as long as you follow the requirements of the GNU GPL in regard to all of the software in the executable aside from CGAL. trunk-1.07.0/NEWS000066400000000000000000000220011226405415500134400ustar00rootroot00000000000000vim:syntax=changelog 2011-10-23 Anton Gladky revision around bzr2942 * RELEASE 0.70.0, Bug-fix release. * some changes since 0.6 - Added HarmonicMotionEngine, WirePM - Added check-tests to detect regressions - A lot of fixes in the code and documentation. 2010-12-01 Václav Šmilauer revision around bzr bzr2540 * RELEASE 0.6: - https://launchpad.net/yade/trunk/0.60 * major changes since 0.5: - use boost::serialization (faster, more reliable), use eigen instead of Wm3 (better supported, more flexible) - qt4-based interface with on-the-fly inspection and editing of all internal variables - support compilation with clang++ - live plots - periodic boundary conditions are much better tested now - batch web interface substantially enhanced (including plots, logs, ...) - extended attribute flags (readonly, noSave, hidden, ...) - added --rebuild, --debug and --test options 2010-04-20 Václav Šmilauer revision around bzr2150 * RELEASE: 0.5 - https://launchpad.net/yade/+milestone/0.5 * overall: - yade main is now a python script, the c++ part is imported - many classes renamed for the sake of consistency, while mostly keeping backward compatibility for scripts - all classes (deriving from Serializable) are automatically exposed in python via automatically constructed wrappers, with full attribute access (https://bugs.launchpad.net/yade/+bug/544857) - lot of old code removed (to be found in attic/) * functionality: - separated State and (possibly shared) Material for bodies - InsertionSortCollider handles both periodic and aperiodic simulations now - Cell can undergo arbitrary linear transformation during simulation - VTKRecorder saves to VTK-compatible XML files; allows one to use Paraview for post-processing - NewtonIntegrator features integration of rotation of non-spherical bodies - callback functionality for interaction and body loop (InteractionDispatchers and NewtonIntegrator) (not yet fully done) - body and interaction containers devirtualized (https://blueprints.launchpad.net/yade/+spec/devirtualize-containers) * documentation: - New website https://www.yade-dem.org - Sphinx documentation https://www.yade-dem.org/sphinx/, containing both hand-written and automatically generated documentation - All classes and attributes visible from python are documented now - Drop doxygen documentation 2009-08-31 Václav Šmilauer revision around bzr1740 * RELEASE: 0.20.0 * overall: - fix many crashers, including synchronization with openGL, GUI and python - generate documentation for both python and c++ classes/functions automatically (http://yade.wikia.com/wiki/Reference_documentation) - move away from SVN repository at berlios.de to bzr at http://www.launchpad.net/yade; bug tracking and other launchpad features are being used; mailing lists migrated to launchpad * functionality enhancements (apart from performance-oriented changes): - Facets (arbitrary triangulation elements) interacting with spheres, allowing to triangulate any surface - support for GTS-compatible triangulated surfaces both as predicates and facet-triangulated simulation elements - non-incremental sphere-sphere and sphere-facet contact geometry classes (Dem3DofGeom) - ConstitutiveLawDispatcher, for having multiple constitutive laws operating on different interactions - schedule to run multiple jobs at time, with different parameters (yade-multi, http://yade.wikia.com/wiki/ScriptParametricStudy) - added PhysicalParameters::blockedDOFs - periodic boundary conditions - interaction logic cleaned up - sphere packing generators (orthogonal, hexagonal, loose random, triaxially compacted; periodic coming soon) - geometry predicates to clip packing, including boolean operations on predicates - infrastructure for regression tests * performance: - consistent openMP support throughout the code (InteractionDispatchers, NewtonsDampedLaw, BexContainer) (http://yade.wikia.com/wiki/Performance_Tuning#openMP) - InsertionSortCollider (PersistentSAPCollide removed) (http://yade.wikia.com/wiki/Colliders_performace) - InteractionDispatchers that reduce number of loops over interactions to one (http://yade.wikia.com/wiki/Performance_Tuning#InteractionDispatchers) - new fast container for interactions (InteractionVecMap) (http://yade.wikia.com/wiki/Performance_Tuning#Containers) - caching dispatchers, avoiding repetitive multivirtual call resolution (http://yade.wikia.com/wiki/Performance_Tuning#Dispatcher_cache) - runtime profiling information (http://yade.wikia.com/wiki/Speed_profiling_using_TimingInfo_and_TimingDeltas_classes) - avoid running collision detection at every step (http://yade.wikia.com/wiki/Insertion_Sort_Collider_Stride) - vector and quaternion classes are wrapped in python automatically (faster, avoids hand-written wrappers) - removed many python proxy classes, resulting in big speedup of python (e.g. 40 × for some operations) * building: - yade can be optionally with one single plugin containing all packages. Speeds up full compilation considerably and reduces binary size several times. - files in pkg/* are picked up automatically by the build system, including linking flags - do not install headers, only plugins - fix debian-package builds and document the procedure (http://yade.wikia.com/wiki/DebianPackages), special package for docs - fix all (or most) compile-time warnings - create new top-level py/ directory for python * python: - use natural syntax for class instance construction with attributes - run telnet server to make yade accessible while running (from localhost only) - save any python variables within the XML file, which will be resurrected next time (utils.saveVars, utils.loadVars) - support saving simulation to memory temporarily - functions from creating video from simulation (via snapshots, either during simulation or in the player) * Documentation: - Structurized content added http://yade.wikia.com/wiki/Structurized_content - FAQ start to implement http://yade.wikia.com/wiki/FAQ 2008-08-20 Janek Kozicki revision 1579 * RELEASE: 0.12.1 - several python interface improvements - add code for plotting histogram of interaction directions - added buttons for looking from different directions - new contact algorithm for facets - added python script for making videos - added a TCP server on port 9000 with python console in it - new dependency on python-numpy package, which allows faster math in python - added a script for parametric studies 2008-08-20 Janek Kozicki revision 1486 * RELEASE: 0.12 * User interface: - Refactored Qt3 interface: MDI with simulation running asynchronously, with python console - Python wrapper and console with the ability to control most simulation aspects (including creating simulations, modifying, inspecting, running, recording data), some parts of the UI (setting view, configuring renderer); see scripts/simple-scene.py to get started (http://yade.wikia.com/wiki/SimpleSceneTutorial) - Much enhanced simulation recorder and player, saving optionally to a single file (sqlite database), the ability to create video from simulation with one command (may be done offscreen as well): scripts/simple-scene-player.py, http://yade.wikia.com/wiki/New:Making_videos * Graphical Viewer: - up to 3 clipping planes in the GLViewer, can be manipulated, bound to each other, activated/deactivated - saving view to view configurations inside MetaBody (Alt+7 -- Alt+9), can be loaded later (from python as well) - displacement and rotation scaling in GLViewer, using PhysicalParameters::refSe3 * Simulation features: - New moment rotation law, fully tested and working - All simulation aspects (dt, iteration, virtual time) are now inside MetaBody, i.e. are restored exactly as they were from .xml - Much improved triaxial test - Lattice model can now simulate concrete with steel fibres * New, experimental features: - Selectively block any of 6 DOFs ( translation and rotation) for individual bodies (PhysicalParameters::blockedDOFs - not documented, not conveniently accessible from python yet) - Plotting interface based on pylab see example in scripts/simple-scene-graph.py - Sega's facets and vertices with stl import (for example import shapes from blender) * Serialization: - Transparent support for compressed .xml.gz and .xml.bz2 files; dropped support for binary format - The (de)serializer now (un)escapes all control characters, using the &charname; format, arbitrary string values can be de/serialized now, including parentheses, quotations marks, newlines, tabs, <>. * Compilation / Development: - Compilation profiles allow separate option sets for scons; simultaneous compilation of multiple profiles is supported via the profile=a,b,c - QGLViewer source is now in our tree, no need to install it separately trunk-1.07.0/README.rst000066400000000000000000000032621226405415500144400ustar00rootroot00000000000000=================================== YADE - Yet Another Dynamic Engine =================================== Extensible open-source framework for discrete numerical models, focused on Discrete Element Method. The computation parts are written in c++ using flexible object model, allowing independent implementation of new algorithms and interfaces. Python is used for rapid and concise scene construction, simulation control, postprocessing and debugging. **Documentation:** - https://www.yade-dem.org/doc/ (includes c++ and python reference) - https://yade-dem.org/doc/Yade.pdf (PDF-file with documentation) - https://yade-dem.org/doc/Yade.epub (EPUB-file with documentation) **Downloads:** - Packages for Ubuntu and Debian: - https://yade-dem.org/doc/installation.html#packages - External packages: https://launchpad.net/~yade-users/+archive/external - Tarballs of different versions: - https://github.com/yade/trunk/tags - Repository on github.com: https://github.com/yade - Repository on git.debian.org: http://git.debian.org/?p=debian-science/packages/yade.git **Teams involved:** - General users: https://launchpad.net/~yade-users - Developers and advanced users: https://launchpad.net/~yade-dev - Infrastructure maintainers: https://launchpad.net/~yade-pkg **Miscellaneous:** - `Yade buildbot `_ - `Yade page on ohloh-project `_ - `Yade on Debian PTS `_ - `Yade in Ubuntu `_ - `Home page `_ - `Wiki `_ - `Screenshots `_ trunk-1.07.0/RELEASE000066400000000000000000000000071226405415500137460ustar00rootroot000000000000001.07.0 trunk-1.07.0/cMake/000077500000000000000000000000001226405415500137665ustar00rootroot00000000000000trunk-1.07.0/cMake/CombineSources.cmake000066400000000000000000000017411226405415500177130ustar00rootroot00000000000000# include several source files (in SRCS) in one or more # combined files; each combined file holds maximally # MAXNUM files. # BASE gives basename for created files; # files corresponding to the pattern are deleted # first, so that there are no relicts from previous runs # with possibly different MAXNUM MACRO(COMBINE_SOURCES BASE SRCS MAXNUM) LIST(LENGTH SRCS SRCS_LENGTH) SET(COMB_COUNTER 0) FILE(GLOB EXISTING "${BASE}.*.cpp") IF("$EXISTING") FILE(REMOVE ${EXISTING}) ENDIF() SET(OUT "${BASE}.${COMB_COUNTER}.cpp") FILE(WRITE ${OUT}) SET(COUNTER 0) FOREACH(SRC ${SRCS}) if(${SRC} MATCHES "^/.*$") # absolute filename FILE(APPEND ${OUT} "#include<${SRC}>\n") else() FILE(APPEND ${OUT} "#include<${CMAKE_SOURCE_DIR}/${SRC}>\n") endif() MATH(EXPR COUNTER "${COUNTER}+1") IF(${COUNTER} EQUAL ${MAXNUM}) SET(COUNTER 0) MATH(EXPR COMB_COUNTER ${COMB_COUNTER}+1) SET(OUT "${BASE}.${COMB_COUNTER}.cpp") FILE(WRITE ${OUT}) ENDIF() ENDFOREACH() ENDMACRO() trunk-1.07.0/cMake/FindCGAL.cmake000066400000000000000000000027441226405415500163060ustar00rootroot00000000000000# http://code.google.com/p/pixelstruct/source/browse/trunk/cmake/FindCGAL.cmake?r=29 # # - Find CGAL # adapted from # # Find the CGAL includes and client library # This module defines # CGAL_DEFINITIONS: compiler flags for compiling with CGAL # CGAL_INCLUDE_DIR: where to find CGAL.h # CGAL_LIBRARIES: the libraries needed to use CGAL # CGAL_FOUND: if false, do not try to use CGAL SET(CGAL_DEFINITIONS -frounding-math) IF(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) SET(CGAL_FOUND TRUE) ELSE(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) FIND_PATH(CGAL_INCLUDE_DIR basic.h /usr/include/CGAL /usr/local/include/CGAL $ENV{ProgramFiles}/CGAL/*/include/CGAL $ENV{SystemDrive}/CGAL/*/include/CGAL ) FIND_LIBRARY(CGAL_LIBRARIES NAMES CGAL libCGAL PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL $ENV{ProgramFiles}/CGAL/*/lib/ms $ENV{SystemDrive}/CGAL/*/lib/ms ) IF(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) SET(CGAL_FOUND TRUE) MESSAGE(STATUS "Found CGAL: ${CGAL_INCLUDE_DIR}, ${CGAL_LIBRARIES}") ELSE(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) SET(CGAL_FOUND FALSE) MESSAGE(STATUS "CGAL not found.") ENDIF(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) MARK_AS_ADVANCED(CGAL_INCLUDE_DIR CGAL_LIBRARIES) ENDIF(CGAL_INCLUDE_DIR AND CGAL_LIBRARIES) trunk-1.07.0/cMake/FindCholmod.cmake000066400000000000000000000027411226405415500171620ustar00rootroot00000000000000# - Try to find CHOLMOD # This will define # # CHOLMOD_FOUND - system has CHOLMOD # CHOLMOD_LIBRARIES - library to link against to use Cholmod # CHOLMOD_INCLUDE_DIR - where to find cholmod.h, etc. # AMD_LIBRARY - needed by CHOLMOD # COLAMD_LIBRARY - needed by CHOLMOD # CCOLAMD_LIBRARY - needed by CHOLMOD # CAMD_LIBRARY - needed by CHOLMOD FIND_LIBRARY(CHOLMOD_LIBRARIES NAMES cholmod libcholmod PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL ) FIND_LIBRARY(AMD_LIBRARY NAMES amd PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL) FIND_LIBRARY(CAMD_LIBRARY NAMES camd PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL) FIND_LIBRARY(COLAMD_LIBRARY NAMES colamd PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL) FIND_LIBRARY(CCOLAMD_LIBRARY NAMES ccolamd PATHS /usr/lib /usr/local/lib /usr/lib/CGAL /usr/lib64 /usr/local/lib64 /usr/lib64/CGAL) FIND_PATH(CHOLMOD_INCLUDE_DIR cholmod.h PATH /usr/include /usr/include/suitesparse) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cholmod DEFAULT_MSG CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY) MARK_AS_ADVANCED(CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY) trunk-1.07.0/cMake/FindEigen3.cmake000066400000000000000000000056621226405415500167140ustar00rootroot00000000000000# - Try to find Eigen3 lib # # This module supports requiring a minimum version, e.g. you can do # find_package(Eigen3 3.1.2) # to require version 3.1.2 or newer of Eigen3. # # Once done this will define # # EIGEN3_FOUND - system has eigen lib with correct version # EIGEN3_INCLUDE_DIR - the eigen include directory # EIGEN3_VERSION - eigen version # Copyright (c) 2006, 2007 Montel Laurent, # Copyright (c) 2008, 2009 Gael Guennebaud, # Copyright (c) 2009 Benoit Jacob # Redistribution and use is allowed according to the terms of the 2-clause BSD license. if(NOT Eigen3_FIND_VERSION) if(NOT Eigen3_FIND_VERSION_MAJOR) set(Eigen3_FIND_VERSION_MAJOR 2) endif(NOT Eigen3_FIND_VERSION_MAJOR) if(NOT Eigen3_FIND_VERSION_MINOR) set(Eigen3_FIND_VERSION_MINOR 91) endif(NOT Eigen3_FIND_VERSION_MINOR) if(NOT Eigen3_FIND_VERSION_PATCH) set(Eigen3_FIND_VERSION_PATCH 0) endif(NOT Eigen3_FIND_VERSION_PATCH) set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") endif(NOT Eigen3_FIND_VERSION) macro(_eigen3_check_version) file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) set(EIGEN3_VERSION_OK FALSE) else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) set(EIGEN3_VERSION_OK TRUE) endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) if(NOT EIGEN3_VERSION_OK) message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " "but at least version ${Eigen3_FIND_VERSION} is required") endif(NOT EIGEN3_VERSION_OK) endmacro(_eigen3_check_version) if (EIGEN3_INCLUDE_DIR) # in cache already _eigen3_check_version() set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) else (EIGEN3_INCLUDE_DIR) find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library PATHS ${CMAKE_INSTALL_PREFIX}/include ${KDE4_INCLUDE_DIR} PATH_SUFFIXES eigen3 eigen ) if(EIGEN3_INCLUDE_DIR) _eigen3_check_version() endif(EIGEN3_INCLUDE_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) mark_as_advanced(EIGEN3_INCLUDE_DIR) endif(EIGEN3_INCLUDE_DIR) trunk-1.07.0/cMake/FindGL2PS.cmake000066400000000000000000000030501226405415500164160ustar00rootroot00000000000000# https://unihub.ru/tools/ofservice/browser/trunk/1.7/ThirdParty-1.7.1/paraview-3.8.0/VTK/CMake/FindGL2PS.cmake?rev=2 # - Find GL2PS library # Find the native GL2PS includes and library # This module defines # GL2PS_INCLUDE_DIR, where to find tiff.h, etc. # GL2PS_LIBRARIES, libraries to link against to use GL2PS. # GL2PS_FOUND, If false, do not try to use GL2PS. # also defined, but not for general use are # GL2PS_LIBRARY, where to find the GL2PS library. #============================================================================= # Copyright 2009 Kitware, Inc. # Copyright 2009 Mathieu Malaterre # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) FIND_PATH(GL2PS_INCLUDE_DIR gl2ps.h) FIND_LIBRARY(GL2PS_LIBRARY NAMES gl2ps ) # handle the QUIETLY and REQUIRED arguments and set GL2PS_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GL2PS DEFAULT_MSG GL2PS_LIBRARY GL2PS_INCLUDE_DIR) IF(GL2PS_FOUND) SET( GL2PS_LIBRARIES ${GL2PS_LIBRARY} ) ENDIF(GL2PS_FOUND) MARK_AS_ADVANCED(GL2PS_INCLUDE_DIR GL2PS_LIBRARY) trunk-1.07.0/cMake/FindGMP.cmake000066400000000000000000000016201226405415500162130ustar00rootroot00000000000000# http://liris.cnrs.fr/dgtal/cgi-bin/trac.cgi/browser/trunk/cmake/FindGMP.cmake # # Try to find the GMP librairies # GMP_FOUND - system has GMP lib # GMP_INCLUDE_DIR - the GMP include directory # GMP_LIBRARIES - Libraries needed to use GMP # Copyright (c) 2006, Laurent Montel, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (GMP_INCLUDE_DIR AND GMP_LIBRARIES) # Already in cache, be silent set(GMP_FIND_QUIETLY TRUE) endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES) find_path(GMP_INCLUDE_DIR NAMES gmp.h ) find_library(GMP_LIBRARIES NAMES gmp libgmp ) find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx ) MESSAGE(STATUS "GMP libs: " ${GMP_LIBRARIES} " " ${GMPXX_LIBRARIES} ) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES) trunk-1.07.0/cMake/FindGMPXX.cmake000066400000000000000000000016311226405415500164750ustar00rootroot00000000000000# https://svn.zib.de/lenne3d/lib/qpl_cgal/3.5.1/cmake/modules/FindGMPXX.cmake # # Try to find the GMPXX libraries # GMPXX_FOUND - system has GMPXX lib # GMPXX_INCLUDE_DIR - the GMPXX include directory # GMPXX_LIBRARIES - Libraries needed to use GMPXX # TODO: support Windows and MacOSX # GMPXX needs GMP find_package( GMP QUIET ) if(GMP_FOUND) if (GMPXX_INCLUDE_DIR AND GMPXX_LIBRARIES) # Already in cache, be silent set(GMPXX_FIND_QUIETLY TRUE) endif() find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h PATHS ${GMP_INCLUDE_DIR_SEARCH} DOC "The directory containing the GMPXX include files" ) find_library(GMPXX_LIBRARIES NAMES gmpxx PATHS ${GMP_LIBRARIES_DIR_SEARCH} DOC "Path to the GMPXX library" ) find_package_handle_standard_args(GMPXX "DEFAULT_MSG" GMPXX_LIBRARIES GMPXX_INCLUDE_DIR ) endif() trunk-1.07.0/cMake/FindGTS.cmake000066400000000000000000000125511226405415500162320ustar00rootroot00000000000000# http://code.google.com/p/booststl/source/browse/trunk/Modules/FindGTS.cmake?r=25 # Try to find gnu triangulation library GTS # See # http://gts.sf.net # # Once run this will define: # # GTS_FOUND = system has GTS lib # # GTS_LIBRARIES = full path to the libraries # on Unix/Linux with additional linker flags from "gts-config --libs" # # CMAKE_GTS_CXX_FLAGS = Unix compiler flags for GTS, essentially "`gts-config --cxxflags`" # # GTS_INCLUDE_DIR = where to find headers # # GTS_LINK_DIRECTORIES = link directories, useful for rpath on Unix # GTS_EXE_LINKER_FLAGS = rpath on Unix # # # GTS modyfication by # A.Khalatyan 05/2009 # # www.aip.de/~arm2arm # # This script is based on GSL script by # Felix Woelk 07/2004 # and Jan Woetzel # www.mip.informatik.uni-kiel.de # -------------------------------- IF(WIN32) # JW tested with gsl-1.8, Windows XP, MSVS 7.1, MSVS 8.0 SET(GTS_POSSIBLE_ROOT_DIRS ${GTS_ROOT_DIR} $ENV{GTS_ROOT_DIR} ${GTS_DIR} ${GTS_HOME} $ENV{GTS_DIR} $ENV{GTS_HOME} $ENV{EXTERN_LIBS_DIR}/gts $ENV{EXTRA} # "C:/home/arm2arm/SOFTWARE/gts-0.7.6" ) FIND_PATH(GTS_INCLUDE_DIR NAMES gts.h gtsconfig.h PATHS ${GTS_POSSIBLE_ROOT_DIRS} PATH_SUFFIXES include DOC "GTS header include dir" ) FIND_LIBRARY(GTS_GTS_LIBRARY NAMES gts libgts PATHS ${GTS_POSSIBLE_ROOT_DIRS} PATH_SUFFIXES lib DOC "GTS library dir" ) # FIND_LIBRARY(GTS_GLIB_LIBRARY # NAMES glib libgslcblas # PATHS ${GSL_POSSIBLE_ROOT_DIRS} # PATH_SUFFIXES lib # DOC "GSL cblas library dir" ) SET(GTS_LIBRARIES ${GTS_GTS_LIBRARY}) #MESSAGE("DBG\n" # "GSL_GSL_LIBRARY=${GSL_GSL_LIBRARY}\n" # "GSL_GSLCBLAS_LIBRARY=${GSL_GSLCBLAS_LIBRARY}\n" # "GSL_LIBRARIES=${GSL_LIBRARIES}") ELSE(WIN32) IF(UNIX) SET(GSL_CONFIG_PREFER_PATH "$ENV{GTS_DIR}/bin" "$ENV{GTS_DIR}" "$ENV{GTS_HOME}/bin" "$ENV{GTS_HOME}" CACHE STRING "preferred path to GTS (gts-config)") FIND_PROGRAM(GTS_CONFIG gts-config ${GTS_CONFIG_PREFER_PATH} /work2/arm2arm/SOFTWARE/bin/ ) #MESSAGE("DBG GTS_CONFIG ${GTS_CONFIG}") IF (GTS_CONFIG) MESSAGE(STATUS "GTS using gts-config ${GTS_CONFIG}") # set CXXFLAGS to be fed into CXX_FLAGS by the user: EXEC_PROGRAM(${GTS_CONFIG} ARGS --cflags OUTPUT_VARIABLE GTS_CXX_FLAGS ) #SET(GTS_CXX_FLAGS "`${GTS_CONFIG} --cflags`") SET(CMAKE_GTS_CXX_FLAGS ${GTS_CXX_FLAGS}) # MESSAGE("DBG ${GTS_CXX_FLAGS}") # set INCLUDE_DIRS to prefix+include EXEC_PROGRAM(${GTS_CONFIG} ARGS --prefix OUTPUT_VARIABLE GTS_PREFIX) SET(GTS_INCLUDE_DIR ${GTS_PREFIX}/include CACHE STRING INTERNAL) # set link libraries and link flags #SET(GSL_LIBRARIES "`${GSL_CONFIG} --libs`") # extract link dirs for rpath EXEC_PROGRAM(${GTS_CONFIG} ARGS --libs OUTPUT_VARIABLE GTS_CONFIG_LIBS ) SET(GTS_LIBRARIES "${GTS_CONFIG_LIBS}") # split off the link dirs (for rpath) # use regular expression to match wildcard equivalent "-L*" # with is a space or a semicolon STRING(REGEX MATCHALL "[-][L]([^ ;])+" GTS_LINK_DIRECTORIES_WITH_PREFIX "${GTS_CONFIG_LIBS}" ) # MESSAGE("DBG GSL_LINK_DIRECTORIES_WITH_PREFIX=${GSL_LINK_DIRECTORIES_WITH_PREFIX}") # remove prefix -L because we need the pure directory for LINK_DIRECTORIES IF (GTS_LINK_DIRECTORIES_WITH_PREFIX) STRING(REGEX REPLACE "[-][L]" "" GTS_LINK_DIRECTORIES ${GTS_LINK_DIRECTORIES_WITH_PREFIX} ) ENDIF (GTS_LINK_DIRECTORIES_WITH_PREFIX) SET(GTS_EXE_LINKER_FLAGS "-Wl,-rpath,${GTS_LINK_DIRECTORIES}" CACHE STRING INTERNAL) # MESSAGE("DBG GSL_LINK_DIRECTORIES=${GSL_LINK_DIRECTORIES}") # MESSAGE("DBG GSL_EXE_LINKER_FLAGS=${GSL_EXE_LINKER_FLAGS}") # ADD_DEFINITIONS("-DHAVE_GSL") # SET(GSL_DEFINITIONS "-DHAVE_GSL") MARK_AS_ADVANCED( GTS_CXX_FLAGS GTS_INCLUDE_DIR GTS_LIBRARIES GTS_LINK_DIRECTORIES GTS_DEFINITIONS ) MESSAGE(STATUS "Using GTS from ${GTS_PREFIX}") ELSE(GTS_CONFIG) INCLUDE(UsePkgConfig) #needed for PKGCONFIG(...) MESSAGE(STATUS "GSL using pkgconfig") # PKGCONFIG(gsl includedir libdir linkflags cflags) PKGCONFIG(gts GTS_INCLUDE_DIR GTS_LINK_DIRECTORIES GTS_LIBRARIES GTS_CXX_FLAGS) IF(GTS_INCLUDE_DIR) MARK_AS_ADVANCED( GTS_CXX_FLAGS GTS_INCLUDE_DIR GTS_LIBRARIES GTS_LINK_DIRECTORIES ) ELSE(GTS_INCLUDE_DIR) MESSAGE("FindGTS.cmake: gts-config/pkg-config gts not found. Please set it manually. GTS_CONFIG=${GTS_CONFIG}") ENDIF(GTS_INCLUDE_DIR) ENDIF(GTS_CONFIG) ENDIF(UNIX) ENDIF(WIN32) IF(GTS_LIBRARIES) IF(GTS_INCLUDE_DIR OR GTS_CXX_FLAGS) SET(GTS_FOUND 1) ENDIF(GTS_INCLUDE_DIR OR GTS_CXX_FLAGS) ENDIF(GTS_LIBRARIES) # ========================================== IF(NOT GTS_FOUND) # make FIND_PACKAGE friendly IF(NOT GTS_FIND_QUIETLY) IF(GTS_FIND_REQUIRED) MESSAGE(FATAL_ERROR "GTS required, please specify it's location.") ELSE(GTS_FIND_REQUIRED) MESSAGE(STATUS "ERROR: GTS was not found.") ENDIF(GTS_FIND_REQUIRED) ENDIF(NOT GTS_FIND_QUIETLY) ENDIF(NOT GTS_FOUND) trunk-1.07.0/cMake/FindLoki.cmake000066400000000000000000000010761226405415500164730ustar00rootroot00000000000000# - Find Loki library # # This module defines # LOKI_INCLUDE_DIR, where to find loki/Typelist.h, etc. # LOKI_LIBRARY, libraries to link against to use GL2PS. # LOKI_FOUND, If false, do not try to use GL2PS. FIND_PATH(LOKI_INCLUDE_DIR loki/Typelist.h) FIND_LIBRARY(LOKI_LIBRARY NAMES loki ) # handle the QUIETLY and REQUIRED arguments and set LOKI_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Loki DEFAULT_MSG LOKI_INCLUDE_DIR LOKI_LIBRARY) MARK_AS_ADVANCED(LOKI_INCLUDE_DIR LOKI_LIBRARY) trunk-1.07.0/cMake/FindMetis.cmake000066400000000000000000000011511226405415500166500ustar00rootroot00000000000000# - Find Metis library # # This module defines # METIS_INCLUDE_DIR, where to find loki/Typelist.h, etc. # METIS_LIBRARY, libraries to link against to use GL2PS. # METIS_FOUND, If false, do not try to use GL2PS. FIND_PATH(METIS_INCLUDE_DIR metis.h PATHS /usr/include/metis) FIND_LIBRARY(METIS_LIBRARY NAMES metis PATHS /usr/lib) # handle the QUIETLY and REQUIRED arguments and set LOKI_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Metis DEFAULT_MSG METIS_INCLUDE_DIR METIS_LIBRARY) MARK_AS_ADVANCED(METIS_INCLUDE_DIR METIS_LIBRARY) trunk-1.07.0/cMake/FindNumPy.cmake000066400000000000000000000072411226405415500166450ustar00rootroot00000000000000# https://github.com/ContinuumIO/dynd-python/blob/master/FindNumPy.cmake # - Find the NumPy libraries # This module finds if NumPy is installed, and sets the following variables # indicating where it is. # # TODO: Update to provide the libraries and paths for linking npymath lib. # # NUMPY_FOUND - was NumPy found # NUMPY_VERSION - the version of NumPy found as a string # NUMPY_VERSION_MAJOR - the major version number of NumPy # NUMPY_VERSION_MINOR - the minor version number of NumPy # NUMPY_VERSION_PATCH - the patch version number of NumPy # NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601 # NUMPY_INCLUDE_DIRS - path to the NumPy include files #============================================================================ # Copyright 2012 Continuum Analytics, Inc. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to permit # persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # #============================================================================ # Finding NumPy involves calling the Python interpreter if(NumPy_FIND_REQUIRED) find_package(PythonInterp REQUIRED) else() find_package(PythonInterp) endif() if(NOT PYTHONINTERP_FOUND) set(NUMPY_FOUND FALSE) return() endif() execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import numpy as n; print(n.__version__); print(n.get_include());" RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS OUTPUT_VARIABLE _NUMPY_VALUES ERROR_VARIABLE _NUMPY_ERROR_VALUE OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0) if(NumPy_FIND_REQUIRED) message(FATAL_ERROR "NumPy import failure:\n${_NUMPY_ERROR_VALUE}") endif() set(NUMPY_FOUND FALSE) return() endif() # Convert the process output into a list string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES}) string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES}) list(GET _NUMPY_VALUES 0 NUMPY_VERSION) list(GET _NUMPY_VALUES 1 NUMPY_INCLUDE_DIRS) # Make sure all directory separators are '/' string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS}) # Get the major and minor version numbers string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION}) list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR) list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR) list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH) string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH}) math(EXPR NUMPY_VERSION_DECIMAL "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}") find_package_message(NUMPY "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}" "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}") set(NUMPY_FOUND TRUE) trunk-1.07.0/cMake/FindOpenBlas.cmake000066400000000000000000000007641226405415500173030ustar00rootroot00000000000000# - Find OpenBlas library # # This module defines # OPENBLAS_LIBRARY, libraries to link against to use GL2PS. # OPENBLAS_FOUND, If false, do not try to use GL2PS. FIND_LIBRARY(OPENBLAS_LIBRARY NAMES openblas PATHS /usr/lib/openblas-base ) # handle the QUIETLY and REQUIRED arguments and set LOKI_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenBlas DEFAULT_MSG OPENBLAS_LIBRARY) MARK_AS_ADVANCED(OPENBLAS_LIBRARY) trunk-1.07.0/cMake/FindPythonModule.cmake000066400000000000000000000015551226405415500202260ustar00rootroot00000000000000# http://www.cmake.org/pipermail/cmake/2011-January/041666.html # # - Find Python Module FUNCTION(find_python_module module) STRING(TOUPPER ${module} module_upper) IF(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") SET(${module}_FIND_REQUIRED TRUE) ENDIF(ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED") EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import re, ${module}; print re.compile('/__init__.py.*').sub('',${module}.__file__)" RESULT_VARIABLE _${module}_status OUTPUT_VARIABLE _${module}_location ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) IF(_${module}_status MATCHES 0) SET(PY_${module} ${_${module}_location} CACHE STRING "Location of Python module ${module}") ENDIF(_${module}_status MATCHES 0) FIND_PACKAGE_HANDLE_STANDARD_ARGS(${module} DEFAULT_MSG PY_${module}) ENDFUNCTION(find_python_module) trunk-1.07.0/cMake/FindQGLVIEWER.cmake000066400000000000000000000037251226405415500171450ustar00rootroot00000000000000# - Try to find QGLViewer # Once done this will define # # QGLVIEWER_FOUND - system has QGLViewer # QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory # QGLVIEWER_LIBRARIES - Link these to use QGLViewer # QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer # find_path(QGLVIEWER_INCLUDE_DIR NAMES QGLViewer/qglviewer.h PATHS /usr/include /usr/local/include ENV QGLVIEWERROOT ) find_library(QGLVIEWER_LIBRARY_RELEASE NAMES qglviewer-qt4 qglviewer QGLViewer QGLViewer2 PATHS /usr/lib /usr/local/lib ENV QGLVIEWERROOT ENV LD_LIBRARY_PATH ENV LIBRARY_PATH PATH_SUFFIXES QGLViewer QGLViewer/release ) find_library(QGLVIEWER_LIBRARY_DEBUG NAMES dqglviewer dQGLViewer dQGLViewer2 PATHS /usr/lib /usr/local/lib ENV QGLVIEWERROOT ENV LD_LIBRARY_PATH ENV LIBRARY_PATH PATH_SUFFIXES QGLViewer QGLViewer/debug ) if(QGLVIEWER_LIBRARY_RELEASE) if(QGLVIEWER_LIBRARY_DEBUG) set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG}) else() set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE}) endif() set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library") endif() IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES) SET(QGLVIEWER_FOUND TRUE) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQGLVIEWER_FOUND") ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES) IF(QGLVIEWER_FOUND) IF(NOT QGLViewer_FIND_QUIETLY) MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}") ENDIF(NOT QGLViewer_FIND_QUIETLY) ELSE(QGLVIEWER_FOUND) IF(QGLViewer_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find QGLViewer") ENDIF(QGLViewer_FIND_REQUIRED) ENDIF(QGLVIEWER_FOUND) trunk-1.07.0/cMake/Findglib2.cmake000066400000000000000000000135241226405415500165750ustar00rootroot00000000000000# Downloaded from http://opensource.bolloretelecom.eu/projects/boc-wimax/browser/cmake/modules/FindGLIB2.cmake?rev=8f5b254534bd304923d4cc7bc7e9d6552c119ea2 # - Try to find GLib2 # Once done this will define # # GLIB2_FOUND - system has GLib2 # GLIB2_INCLUDE_DIRS - the GLib2 include directory # GLIB2_LIBRARIES - Link these to use GLib2 # # HAVE_GLIB_GREGEX_H glib has gregex.h header and # supports g_regex_match_simple # # Copyright (c) 2006 Andreas Schneider # Copyright (c) 2006 Philippe Bernery # Copyright (c) 2007 Daniel Gollub # Copyright (c) 2007 Alban Browaeys # Copyright (c) 2008 Michael Bell # Copyright (c) 2008 Bjoern Ricks # # Redistribution and use is allowed according to the terms of the New # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) # in cache already SET(GLIB2_FOUND TRUE) ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS ) INCLUDE(FindPkgConfig) ## Glib IF ( GLIB2_FIND_REQUIRED ) SET( _pkgconfig_REQUIRED "REQUIRED" ) ELSE ( GLIB2_FIND_REQUIRED ) SET( _pkgconfig_REQUIRED "" ) ENDIF ( GLIB2_FIND_REQUIRED ) IF ( GLIB2_MIN_VERSION ) PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} ) ELSE ( GLIB2_MIN_VERSION ) PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 ) ENDIF ( GLIB2_MIN_VERSION ) IF ( PKG_CONFIG_FOUND ) IF ( GLIB2_FOUND ) SET ( GLIB2_CORE_FOUND TRUE ) ELSE ( GLIB2_FOUND ) SET ( GLIB2_CORE_FOUND FALSE ) ENDIF ( GLIB2_FOUND ) ENDIF ( PKG_CONFIG_FOUND ) # Look for glib2 include dir and libraries w/o pkgconfig IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND ) FIND_PATH( _glibconfig_include_DIR NAMES glibconfig.h PATHS /opt/gnome/lib64 /opt/gnome/lib /opt/lib/ /opt/local/lib /sw/lib/ /usr/lib64 /usr/lib /usr/local/include ${CMAKE_LIBRARY_PATH} PATH_SUFFIXES glib-2.0/include ) FIND_PATH( _glib2_include_DIR NAMES glib.h PATHS /opt/gnome/include /opt/local/include /sw/include /usr/include /usr/local/include PATH_SUFFIXES glib-2.0 ) #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}") FIND_LIBRARY( _glib2_link_DIR NAMES glib-2.0 glib PATHS /opt/gnome/lib /opt/local/lib /sw/lib /usr/lib /usr/local/lib ) IF ( _glib2_include_DIR AND _glib2_link_DIR ) SET ( _glib2_FOUND TRUE ) ENDIF ( _glib2_include_DIR AND _glib2_link_DIR ) IF ( _glib2_FOUND ) SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} ) SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} ) SET ( GLIB2_CORE_FOUND TRUE ) ELSE ( _glib2_FOUND ) SET ( GLIB2_CORE_FOUND FALSE ) ENDIF ( _glib2_FOUND ) # Handle dependencies # libintl IF ( NOT LIBINTL_FOUND ) FIND_PATH(LIBINTL_INCLUDE_DIR NAMES libintl.h PATHS /opt/gnome/include /opt/local/include /sw/include /usr/include /usr/local/include ) FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl PATHS /opt/gnome/lib /opt/local/lib /sw/lib /usr/local/lib /usr/lib ) IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) SET (LIBINTL_FOUND TRUE) ENDIF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR) ENDIF ( NOT LIBINTL_FOUND ) # libiconv IF ( NOT LIBICONV_FOUND ) FIND_PATH(LIBICONV_INCLUDE_DIR NAMES iconv.h PATHS /opt/gnome/include /opt/local/include /opt/local/include /sw/include /sw/include /usr/local/include /usr/include PATH_SUFFIXES glib-2.0 ) FIND_LIBRARY(LIBICONV_LIBRARY NAMES iconv PATHS /opt/gnome/lib /opt/local/lib /sw/lib /usr/lib /usr/local/lib ) IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) SET (LIBICONV_FOUND TRUE) ENDIF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR) ENDIF ( NOT LIBICONV_FOUND ) IF (LIBINTL_FOUND) SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBINTL_LIBRARY}) SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR}) ENDIF (LIBINTL_FOUND) IF (LIBICONV_FOUND) SET (GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY}) SET (GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR}) ENDIF (LIBICONV_FOUND) ENDIF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND ) ## IF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) SET (GLIB2_FOUND TRUE) ENDIF (GLIB2_CORE_FOUND AND GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES) IF (GLIB2_FOUND) IF (NOT GLIB2_FIND_QUIETLY) MESSAGE (STATUS "Found GLib2: ${GLIB2_LIBRARIES} ${GLIB2_INCLUDE_DIRS}") ENDIF (NOT GLIB2_FIND_QUIETLY) ELSE (GLIB2_FOUND) IF (GLIB2_FIND_REQUIRED) MESSAGE (SEND_ERROR "Could not find GLib2") ENDIF (GLIB2_FIND_REQUIRED) ENDIF (GLIB2_FOUND) # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view MARK_AS_ADVANCED(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES) MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY) MARK_AS_ADVANCED(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY) ENDIF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS) IF ( GLIB2_FOUND ) # Check if system has a newer version of glib # which supports g_regex_match_simple INCLUDE( CheckIncludeFiles ) SET( CMAKE_REQUIRED_INCLUDES ${GLIB2_INCLUDE_DIRS} ) CHECK_INCLUDE_FILES ( glib/gregex.h HAVE_GLIB_GREGEX_H ) # Reset CMAKE_REQUIRED_INCLUDES SET( CMAKE_REQUIRED_INCLUDES "" ) ENDIF( GLIB2_FOUND ) trunk-1.07.0/cMake/GNUInstallDirs.cmake000066400000000000000000000163451226405415500176030ustar00rootroot00000000000000# - Define GNU standard installation directories # Provides install directory variables as defined for GNU software: # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html # Inclusion of this module defines the following variables: # CMAKE_INSTALL_ - destination for files of a given type # CMAKE_INSTALL_FULL_ - corresponding absolute path # where is one of: # BINDIR - user executables (bin) # SBINDIR - system admin executables (sbin) # LIBEXECDIR - program executables (libexec) # SYSCONFDIR - read-only single-machine data (etc) # SHAREDSTATEDIR - modifiable architecture-independent data (com) # LOCALSTATEDIR - modifiable single-machine data (var) # LIBDIR - object code libraries (lib or lib64 or lib/ on Debian) # INCLUDEDIR - C header files (include) # OLDINCLUDEDIR - C header files for non-gcc (/usr/include) # DATAROOTDIR - read-only architecture-independent data root (share) # DATADIR - read-only architecture-independent data (DATAROOTDIR) # INFODIR - info documentation (DATAROOTDIR/info) # LOCALEDIR - locale-dependent data (DATAROOTDIR/locale) # MANDIR - man documentation (DATAROOTDIR/man) # DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME) # Each CMAKE_INSTALL_ value may be passed to the DESTINATION options of # install() commands for the corresponding file type. If the includer does # not define a value the above-shown default will be used and the value will # appear in the cache for editing by the user. # Each CMAKE_INSTALL_FULL_ value contains an absolute path constructed # from the corresponding destination by prepending (if necessary) the value # of CMAKE_INSTALL_PREFIX. #============================================================================= # Copyright 2011 Nikita Krupen'ko # Copyright 2011 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) # Installation directories # if(NOT DEFINED CMAKE_INSTALL_BINDIR) set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") endif() if(NOT DEFINED CMAKE_INSTALL_SBINDIR) set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)") endif() if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR) set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)") endif() if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR) set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)") endif() if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR) set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)") endif() if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR) set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)") endif() if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(_LIBDIR_DEFAULT "lib") # Override this default 'lib' with 'lib64' iff: # - we are on Linux system but NOT cross-compiling # - we are NOT on debian # - we are on a 64 bits system # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" # See http://wiki.debian.org/Multiarch if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU") AND NOT CMAKE_CROSSCOMPILING) if (EXISTS "/etc/debian_version") # is this a debian system ? if(CMAKE_LIBRARY_ARCHITECTURE) set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") endif() else() # not debian, rely on CMAKE_SIZEOF_VOID_P: if(NOT DEFINED CMAKE_SIZEOF_VOID_P) message(AUTHOR_WARNING "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. " "Please enable at least one language before including GNUInstallDirs.") else() if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") set(_LIBDIR_DEFAULT "lib64") endif() endif() endif() endif() set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})") endif() if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)") endif() if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR) set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)") endif() if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR) set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)") endif() #----------------------------------------------------------------------------- # Values whose defaults are relative to DATAROOTDIR. Store empty values in # the cache and store the defaults in local variables if the cache values are # not set explicitly. This auto-updates the defaults as DATAROOTDIR changes. if(NOT CMAKE_INSTALL_DATADIR) set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)") set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}") endif() if(NOT CMAKE_INSTALL_INFODIR) set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)") set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info") endif() if(NOT CMAKE_INSTALL_LOCALEDIR) set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)") set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale") endif() if(NOT CMAKE_INSTALL_MANDIR) set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)") set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man") endif() if(NOT CMAKE_INSTALL_DOCDIR) set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)") set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}") endif() #----------------------------------------------------------------------------- mark_as_advanced( CMAKE_INSTALL_BINDIR CMAKE_INSTALL_SBINDIR CMAKE_INSTALL_LIBEXECDIR CMAKE_INSTALL_SYSCONFDIR CMAKE_INSTALL_SHAREDSTATEDIR CMAKE_INSTALL_LOCALSTATEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_OLDINCLUDEDIR CMAKE_INSTALL_DATAROOTDIR CMAKE_INSTALL_DATADIR CMAKE_INSTALL_INFODIR CMAKE_INSTALL_LOCALEDIR CMAKE_INSTALL_MANDIR CMAKE_INSTALL_DOCDIR ) # Result directories # foreach(dir BINDIR SBINDIR LIBEXECDIR SYSCONFDIR SHAREDSTATEDIR LOCALSTATEDIR LIBDIR INCLUDEDIR OLDINCLUDEDIR DATAROOTDIR DATADIR INFODIR LOCALEDIR MANDIR DOCDIR ) if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}}) set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}") else() set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}") endif() endforeach() trunk-1.07.0/cMake/GetVersion.cmake000066400000000000000000000035331226405415500170610ustar00rootroot00000000000000# Define version or set it from git IF (NOT YADE_VERSION) IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/RELEASE ) #Release file is found SET(READFILE cat) exec_program( ${READFILE} ${CMAKE_CURRENT_SOURCE_DIR} ARGS "RELEASE" OUTPUT_VARIABLE YADE_VERSION ) ELSEIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/config) #Use git for version defining exec_program( "git" ${CMAKE_CURRENT_SOURCE_DIR} ARGS "log" ARGS "-n1" ARGS "--pretty=oneline" ARGS "|" ARGS "cut" ARGS "-c1-7" OUTPUT_VARIABLE VERSION_GIT ) exec_program( "git" ${CMAKE_CURRENT_SOURCE_DIR} ARGS "log" ARGS "-n1" ARGS "--pretty=fuller" ARGS "--date=iso" ARGS "|" ARGS "grep" ARGS "AuthorDate" ARGS "|" ARGS "cut" ARGS "-c13-22" OUTPUT_VARIABLE VERSION_DATE ) SET(YADE_VERSION "${VERSION_DATE}.git-${VERSION_GIT}") #git log -n1 --pretty=format:"%ai_%h" ELSEIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.bzr/branch/last-revision) #Use bzr for version defining exec_program( "less" ${CMAKE_CURRENT_SOURCE_DIR}/.bzr/branch/ ARGS "last-revision" ARGS "|" ARGS "cut" ARGS "-c13-20" OUTPUT_VARIABLE VERSION_GIT ) exec_program( "bzr" ${CMAKE_CURRENT_SOURCE_DIR} ARGS "log" ARGS "-l" ARGS "1" ARGS "--gnu-changelog" ARGS "|" ARGS "head" ARGS "-n1" ARGS "|" ARGS "cut" ARGS "-c1-10" OUTPUT_VARIABLE VERSION_DATE ) SET(YADE_VERSION "${VERSION_DATE}.git-${VERSION_GIT}") ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/config ) SET (YADE_VERSION "Unknown") ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/RELEASE ) ENDIF (NOT YADE_VERSION) MESSAGE (STATUS "Version is set to " ${YADE_VERSION}) trunk-1.07.0/core/000077500000000000000000000000001226405415500136765ustar00rootroot00000000000000trunk-1.07.0/core/Body.cpp000066400000000000000000000014561226405415500153050ustar00rootroot00000000000000 #include #include #include #include #include //! This could be -1 if id_t is re-typedef'ed as `int' const Body::id_t Body::ID_NONE=Body::id_t(-1); const shared_ptr& Body::byId(Body::id_t _id, Scene* rb){return (*((rb?rb:Omega::instance().getScene().get())->bodies))[_id];} const shared_ptr& Body::byId(Body::id_t _id, shared_ptr rb){return (*(rb->bodies))[_id];} // return list of interactions of this particle python::list Body::py_intrs(){ python::list ret; for(Body::MapId2IntrT::iterator it=this->intrs.begin(),end=this->intrs.end(); it!=end; ++it) { //Iterate over all bodie's interactions if(!(*it).second->isReal()) continue; ret.append((*it).second); } return ret; } trunk-1.07.0/core/Body.hpp000066400000000000000000000154171226405415500153140ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include"Shape.hpp" #include"Bound.hpp" #include"State.hpp" #include"Material.hpp" #include #include #include class Scene; class Interaction; class Body: public Serializable{ public: // numerical types for storing ids typedef int id_t; // internal structure to hold some interaction of a body; used by InteractionContainer; typedef std::map > MapId2IntrT; // bits for Body::flags enum { FLAG_BOUNDED=1, FLAG_ASPHERICAL=2 }; /* add powers of 2 as needed */ //! symbolic constant for body that doesn't exist. static const Body::id_t ID_NONE; //! get Body pointer given its id. static const shared_ptr& byId(Body::id_t _id,Scene* rb=NULL); static const shared_ptr& byId(Body::id_t _id,shared_ptr rb); //! Whether this Body is a Clump. //! @note The following is always true: \code (Body::isClump() XOR Body::isClumpMember() XOR Body::isStandalone()) \endcode bool isClump() const {return clumpId!=ID_NONE && id==clumpId;} //! Whether this Body is member of a Clump. bool isClumpMember() const {return clumpId!=ID_NONE && id!=clumpId;} //! Whether this body is standalone (neither Clump, nor member of a Clump) bool isStandalone() const {return clumpId==ID_NONE;} //! Whether this body has all DOFs blocked // inline accessors // logic: http://stackoverflow.com/questions/47981/how-do-you-set-clear-and-toggle-a-single-bit-in-c bool isDynamic() const { assert(state); return state->blockedDOFs!=State::DOF_ALL; } void setDynamic(bool d){ assert(state); if(d){ state->blockedDOFs=State::DOF_NONE; } else { state->blockedDOFs=State::DOF_ALL; state->vel=state->angVel=Vector3r::Zero(); } } bool isBounded() const {return flags & FLAG_BOUNDED; } void setBounded(bool d){ if(d) flags|=FLAG_BOUNDED; else flags&=~(FLAG_BOUNDED); } bool isAspherical() const {return flags & FLAG_ASPHERICAL; } void setAspherical(bool d){ if(d) flags|=FLAG_ASPHERICAL; else flags&=~(FLAG_ASPHERICAL); } /*! Hook for clump to update position of members when user-forced reposition and redraw (through GUI) occurs. * This is useful only in cases when engines that do that in every iteration are not active - i.e. when the simulation is paused. * (otherwise, GLViewer would depend on Clump and therefore Clump would have to go to core...) */ virtual void userForcedDisplacementRedrawHook(){return;} python::list py_intrs(); Body::id_t getId() const {return id;}; int getGroupMask() {return groupMask; }; bool maskOk(int mask){return (mask==0 || (groupMask&mask));} // only BodyContainer can set the id of a body friend class BodyContainer; YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Body,Serializable,"A particle, basic element of simulation; interacts with other bodies.", ((Body::id_t,id,Body::ID_NONE,Attr::readonly,"Unique id of this body.")) ((int,groupMask,1,,"Bitmask for determining interactions.")) ((int,flags,FLAG_BOUNDED,Attr::readonly,"Bits of various body-related flags. *Do not access directly*. In c++, use isDynamic/setDynamic, isBounded/setBounded, isAspherical/setAspherical. In python, use :yref:`Body.dynamic`, :yref:`Body.bounded`, :yref:`Body.aspherical`.")) ((shared_ptr,material,,,":yref:`Material` instance associated with this body.")) ((shared_ptr,state,new State,,"Physical :yref:`state`.")) ((shared_ptr,shape,,,"Geometrical :yref:`Shape`.")) ((shared_ptr,bound,,,":yref:`Bound`, approximating volume for the purposes of collision detection.")) ((MapId2IntrT,intrs,,Attr::hidden,"Map from otherId to Interaction with otherId, managed by InteractionContainer. NOTE: (currently) does not contain all interactions with this body (only those where otherId>id), since performance issues with such data duplication have not yet been investigated.")) ((int,clumpId,Body::ID_NONE,Attr::readonly,"Id of clump this body makes part of; invalid number if not part of clump; see :yref:`Body::isStandalone`, :yref:`Body::isClump`, :yref:`Body::isClumpMember` properties. \n\nNot meant to be modified directly from Python, use :yref:`O.bodies.appendClumped` instead.")) ((long,chain,-1,,"Id of chain to which the body belongs.")) ((long,iterBorn,-1,,"Step number at which the body was added to simulation.")) ((Real,timeBorn,-1,,"Time at which the body was added to simulation.")) , /* ctor */, /* py */ // .def_readwrite("mat",&Body::material,"Shorthand for :yref:`Body::material`") .add_property("dynamic",&Body::isDynamic,&Body::setDynamic,"Whether this body will be moved by forces. (In c++, use ``Body::isDynamic``/``Body::setDynamic``) :ydefault:`true`") .add_property("bounded",&Body::isBounded,&Body::setBounded,"Whether this body should have :yref:`Body.bound` created. Note that bodies without a :yref:`bound ` do not participate in collision detection. (In c++, use ``Body::isBounded``/``Body::setBounded``) :ydefault:`true`") .add_property("aspherical",&Body::isAspherical,&Body::setAspherical,"Whether this body has different inertia along principal axes; :yref:`NewtonIntegrator` makes use of this flag to call rotation integration routine for aspherical bodies, which is more expensive. :ydefault:`false`") .def_readwrite("mask",&Body::groupMask,"Shorthand for :yref:`Body::groupMask`") .add_property("isStandalone",&Body::isStandalone,"True if this body is neither clump, nor clump member; false otherwise.") .add_property("isClumpMember",&Body::isClumpMember,"True if this body is clump member, false otherwise.") .add_property("isClump",&Body::isClump,"True if this body is clump itself, false otherwise.") .add_property("iterBorn",&Body::iterBorn,"Returns step number at which the body was added to simulation.") .add_property("timeBorn",&Body::timeBorn,"Returns time at which the body was added to simulation.") .def_readwrite("chain",&Body::chain,"Returns Id of chain to which the body belongs.") .def("intrs",&Body::py_intrs,"Return all interactions in which this body participates.") ); }; REGISTER_SERIALIZABLE(Body); trunk-1.07.0/core/BodyContainer.cpp000066400000000000000000000034471226405415500171520ustar00rootroot00000000000000// 2010 © Václav Šmilauer #include "Scene.hpp" #include "Body.hpp" #include "BodyContainer.hpp" #include "Clump.hpp" #ifdef YADE_OPENMP #include #endif CREATE_LOGGER(BodyContainer); BodyContainer::BodyContainer(): lowestFree(0) {} BodyContainer::~BodyContainer(){} void BodyContainer::clear(){ body.clear(); lowestFree=0; } Body::id_t BodyContainer::findFreeId(){ Body::id_t max=body.size(); for(; lowestFree& b){ Body::id_t newId=findFreeId(); return insert(b,newId); } Body::id_t BodyContainer::insert(shared_ptr& b, Body::id_t id){ assert(id>=0); if((size_t)id>=body.size()) body.resize(id+1); const shared_ptr& scene=Omega::instance().getScene(); b->iterBorn=scene->iter; b->timeBorn=scene->time; b->id=id; scene->doSort = true; body[id]=b; return id; } bool BodyContainer::erase(Body::id_t id){ if(!exists(id)) return false; lowestFree=min(lowestFree,id); const shared_ptr& b=Body::byId(id); //If the body is the last member of clump, the clump should be removed as well if ((b) and (b->isClumpMember())) { const shared_ptr& clumpBody=Body::byId(b->clumpId); const shared_ptr clump=YADE_PTR_CAST(clumpBody->shape); Clump::del(clumpBody, b); if (clump->members.size()==0) { //Clump has no members any more. Remove it this->erase(b->clumpId); } } const shared_ptr& scene=Omega::instance().getScene(); for(Body::MapId2IntrT::iterator it=b->intrs.begin(),end=b->intrs.end(); it!=end; ++it) { //Iterate over all bodie's interactions scene->interactions->requestErase((*it).second); } body[id]=shared_ptr(); return true; } trunk-1.07.0/core/BodyContainer.hpp000066400000000000000000000072551226405415500171600ustar00rootroot00000000000000// 2004 © Olivier Galizzi // 2004 © Janek Kozicki // 2010 © Václav Šmilauer #pragma once #include #include #ifndef FOREACH # define FOREACH BOOST_FOREACH #endif #include class Body; class InteractionContainer; #if YADE_OPENMP #define YADE_PARALLEL_FOREACH_BODY_BEGIN(b_,bodies) const Body::id_t _sz(bodies->size()); _Pragma("omp parallel for") for(Body::id_t _id=0; _id<_sz; _id++){ if(!(*bodies)[_id]) continue; b_((*bodies)[_id]); #define YADE_PARALLEL_FOREACH_BODY_END() } #else #define YADE_PARALLEL_FOREACH_BODY_BEGIN(b,bodies) FOREACH(b,*(bodies)){ #define YADE_PARALLEL_FOREACH_BODY_END() } #endif /* Container of bodies implemented as flat std::vector. It handles body removal and intelligently reallocates free ids for newly added ones. The nested iterators and the specialized FOREACH_BODY macros above will silently skip null body pointers which may exist after removal. The null pointers can still be accessed via the [] operator. Any alternative implementation should use the same API. */ class BodyContainer: public Serializable{ private: typedef std::vector > ContainerT; ContainerT body; Body::id_t lowestFree; Body::id_t findFreeId(); public: friend class InteractionContainer; // accesses the body vector directly //An iterator that will automatically jump slots with null bodies class smart_iterator : public ContainerT::iterator { public: ContainerT::iterator end; smart_iterator& operator++() { ContainerT::iterator::operator++(); while (!(this->operator*()) && end!=(*this)) ContainerT::iterator::operator++(); return *this;} smart_iterator operator++(int) {smart_iterator temp(*this); operator++(); return temp;} smart_iterator& operator=(const ContainerT::iterator& rhs) {ContainerT::iterator::operator=(rhs); return *this;} smart_iterator& operator=(const smart_iterator& rhs) {ContainerT::iterator::operator=(rhs); end=rhs.end; return *this;} smart_iterator() {} smart_iterator(const ContainerT::iterator& source) {(*this)=source;} smart_iterator(const smart_iterator& source) {(*this)=source; end=source.end;} }; // typedef ContainerT::iterator iterator; // typedef ContainerT::const_iterator const_iterator; typedef smart_iterator iterator; typedef const smart_iterator const_iterator; BodyContainer(); virtual ~BodyContainer(); Body::id_t insert(shared_ptr&); Body::id_t insert(shared_ptr& b, Body::id_t id); // mimick some STL api void clear(); // by using simple vector<>::iterator's, we can hit null bodies // iterator begin() { return body.begin(); } // iterator end() { return body.end(); } // const_iterator begin() const { return body.begin(); } // const_iterator end() const { return body.end(); } // //with smart iterators iterator begin() { iterator temp(body.begin()); temp.end=body.end(); return (body.begin()==body.end() || *temp)?temp:++temp;} iterator end() { iterator temp(body.end()); temp.end=body.end(); return temp;} const_iterator begin() const { return begin();} const_iterator end() const { return end();} size_t size() const { return body.size(); } shared_ptr& operator[](unsigned int id){ return body[id];} const shared_ptr& operator[](unsigned int id) const { return body[id]; } bool exists(Body::id_t id) const { return (id>=0) && ((size_t)id #include #include #include /*! Interface for approximate body locations in space Note: the min and max members refer to shear coordinates, in periodic and sheared space, not cartesian coordinates in the physical space. */ class Bound: public Serializable, public Indexable{ public: YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(Bound,Serializable,"Object bounding part of space taken by associated body; might be larger, used to optimalize collision detection", ((int,lastUpdateIter,0,Attr::readonly,"record iteration of last reference position update |yupdate|")) ((Vector3r,refPos,Vector3r(NaN,NaN,NaN),Attr::readonly,"Reference position, updated at current body position each time the bound dispatcher update bounds |yupdate|")) // ((bool,isBounding,false,Attr::readonly,"A flag used to tell when the body moves out of bounds - only used if oriVerlet striding is active :yref:`BoundDispatcher::updatingDispFactor`>0 |yupdate|")) ((Real,sweepLength,0, Attr::readonly,"The length used to increase the bounding boxe size, can be adjusted on the basis of previous displacement if :yref:`BoundDispatcher::targetInterv`>0. |yupdate|")) ((Vector3r,color,Vector3r(1,1,1),,"Color for rendering this object")) ((Vector3r,min,Vector3r(NaN,NaN,NaN),(Attr::noSave | Attr::readonly),"Lower corner of box containing this bound (and the :yref:`Body` as well)")) ((Vector3r,max,Vector3r(NaN,NaN,NaN),(Attr::noSave | Attr::readonly),"Lower corner of box containing this bound (and the :yref:`Body` as well)")) , /*deprec*/, /* init */, /* ctor*/, /*py*/ YADE_PY_TOPINDEXABLE(Bound) ); REGISTER_INDEX_COUNTER(Bound); }; REGISTER_SERIALIZABLE(Bound); trunk-1.07.0/core/Cell.cpp000066400000000000000000000032241226405415500152620ustar00rootroot00000000000000 #include CREATE_LOGGER(Cell); void Cell::integrateAndUpdate(Real dt){ //incremental displacement gradient _trsfInc=dt*velGrad; // total transformation; M = (Id+G).M = F.M trsf+=_trsfInc*trsf; _invTrsf=trsf.inverse(); // hSize contains colums with updated base vectors prevHSize=hSize; _vGradTimesPrevH = velGrad*prevHSize; hSize+=_trsfInc*hSize; if(hSize.determinant()==0){ throw runtime_error("Cell is degenerate (zero volume)."); } // lengths of transformed cell vectors, skew cosines Matrix3r Hnorm; // normalized transformed base vectors for(int i=0; i<3; i++){ Vector3r base(hSize.col(i)); _size[i]=base.norm(); base/=_size[i]; //base is normalized now Hnorm(0,i)=base[0]; Hnorm(1,i)=base[1]; Hnorm(2,i)=base[2];}; // skew cosines for(int i=0; i<3; i++){ int i1=(i+1)%3, i2=(i+2)%3; // sin between axes is cos of skew _cos[i]=(Hnorm.col(i1).cross(Hnorm.col(i2))).squaredNorm(); } // pure shear trsf: ones on diagonal _shearTrsf=Hnorm; // pure unshear transformation _unshearTrsf=_shearTrsf.inverse(); // some parts can branch depending on presence/absence of shear _hasShear=(hSize(0,1)!=0 || hSize(0,2)!=0 || hSize(1,0)!=0 || hSize(1,2)!=0 || hSize(2,0)!=0 || hSize(2,1)!=0); // OpenGL shear matrix (used frequently) fillGlShearTrsfMatrix(_glShearTrsfMatrix); } void Cell::fillGlShearTrsfMatrix(double m[16]){ m[0]=_shearTrsf(0,0); m[4]=_shearTrsf(0,1); m[8]=_shearTrsf(0,2); m[12]=0; m[1]=_shearTrsf(1,0); m[5]=_shearTrsf(1,1); m[9]=_shearTrsf(1,2); m[13]=0; m[2]=_shearTrsf(2,0); m[6]=_shearTrsf(2,1); m[10]=_shearTrsf(2,2);m[14]=0; m[3]=0; m[7]=0; m[11]=0; m[15]=1; } trunk-1.07.0/core/Cell.hpp000066400000000000000000000400341226405415500152670ustar00rootroot00000000000000// 2009 © Václav Šmilauer /*! Periodic cell parameters and routines. Usually instantiated as Scene::cell. The Cell has current box configuration represented by the parallelepiped's base vectors (*hSize*). Lengths of the base vectors can be accessed via *size*. * Matrix3r *trsf* is "deformation gradient tensor" F (http://en.wikipedia.org/wiki/Finite_strain_theory) * Matrix3r *velGrad* is "velocity gradient tensor" (http://www.cs.otago.ac.nz/postgrads/alexis/FluidMech/node7.html) The transformation is split between "normal" part and "rotation/shear" part for contact detection algorithms. The shearPt, unshearPt, getShearTrsf etc functions refer to both shear and rotation. This decomposition is frame-dependant and does not correspond to the rotation/stretch decomposition of mechanics (with stretch further decomposed into isotropic and deviatoric). Therefore, using the shearPt family in equations of mechanics is not recommended. Similarly, attributes assuming the existence of a "reference" state are considered deprecated (refSize, hSize0). It is better to not use them since there is no guarantee that the so-called "reference state" will be maintained consistently in the future. */ #pragma once #include #include //#include class Cell: public Serializable{ public: //! Get/set sizes of cell base vectors const Vector3r& getSize() const { return _size; } void setSize(const Vector3r& s){for (int k=0;k<3;k++) hSize.col(k)*=s[k]/hSize.col(k).norm(); refHSize=hSize; postLoad(*this);} //! Return copy of the current size (used only by the python wrapper) Vector3r getSize_copy() const { return _size; } //! return vector of consines of skew angle in yz, xz, xy planes between respective transformed base vectors const Vector3r& getCos() const {return _cos;} //! transformation matrix applying pure shear&rotation (scaling removed) const Matrix3r& getShearTrsf() const { return _shearTrsf; } //! inverse of getShearTrsfMatrix(). const Matrix3r& getUnshearTrsf() const {return _unshearTrsf;} //! transformation increment matrix applying arbitrary field (remove if not used in NewtonIntegrator! ) // const Matrix3r& getTrsfInc() const { return _trsfInc; } /*! return pointer to column-major OpenGL 4x4 matrix applying pure shear. This matrix is suitable as argument for glMultMatrixd. Note: the order of OpenGL transoformations matters; for instance, if you draw sheared wire box of size *size*, centered at *center*, the order is: 1. translation: glTranslatev(center); 3. shearing: glMultMatrixd(scene->cell->getGlShearTrsfMatrix()); 2. scaling: glScalev(size); 4. draw: glutWireCube(1); See also http://www.songho.ca/opengl/gl_transform.html#matrix . */ const double* getGlShearTrsfMatrix() const { return _glShearTrsfMatrix; } //! Whether any shear (non-diagonal) component of the strain matrix is nonzero. bool hasShear() const {return _hasShear; } // caches; private private: Matrix3r _invTrsf; Matrix3r _trsfInc; Matrix3r _vGradTimesPrevH; Vector3r _size, _cos; Vector3r _refSize; bool _hasShear; Matrix3r _shearTrsf, _unshearTrsf; double _glShearTrsfMatrix[16]; void fillGlShearTrsfMatrix(double m[16]); public: DECLARE_LOGGER; //! "integrate" velGrad, update cached values used by public getter. void integrateAndUpdate(Real dt); /*! Return point inside periodic cell, even if shear is applied */ Vector3r wrapShearedPt(const Vector3r& pt) const { return shearPt(wrapPt(unshearPt(pt))); } /*! Return point inside periodic cell, even if shear is applied; store cell coordinates in period. */ Vector3r wrapShearedPt(const Vector3r& pt, Vector3i& period) const { return shearPt(wrapPt(unshearPt(pt),period)); } /*! Apply inverse shear on point; to put it inside (unsheared) periodic cell, apply wrapPt on the returned value. */ Vector3r unshearPt(const Vector3r& pt) const { return _unshearTrsf*pt; } //! Apply shear on point. Vector3r shearPt(const Vector3r& pt) const { return _shearTrsf*pt; } /*! Wrap point to inside the periodic cell; don't compute number of periods wrapped */ Vector3r wrapPt(const Vector3r& pt) const { Vector3r ret; for(int i=0;i<3;i++) ret[i]=wrapNum(pt[i],_size[i]); return ret;} /*! Wrap point to inside the periodic cell; period will contain by how many cells it was wrapped. */ Vector3r wrapPt(const Vector3r& pt, Vector3i& period) const { Vector3r ret; for(int i=0; i<3; i++){ ret[i]=wrapNum(pt[i],_size[i],period[i]); } return ret;} /*! Wrap number to interval 0…sz */ static Real wrapNum(const Real& x, const Real& sz) { Real norm=x/sz; return (norm-floor(norm))*sz;} /*! Wrap number to interval 0…sz; store how many intervals were wrapped in period */ static Real wrapNum(const Real& x, const Real& sz, int& period) { Real norm=x/sz; period=(int)floor(norm); return (norm-period)*sz;} // relative position and velocity for interaction accross multiple cells Vector3r intrShiftPos(const Vector3i& cellDist) const { return hSize*cellDist.cast(); } Vector3r intrShiftVel(const Vector3i& cellDist) const { return _vGradTimesPrevH*cellDist.cast(); } // return body velocity while taking away mean field velocity (coming from velGrad) if the mean field velocity is applied on velocity Vector3r bodyFluctuationVel(const Vector3r& pos, const Vector3r& vel, const Matrix3r& prevVelGrad) const { return (vel-prevVelGrad*pos); } // get/set current shape; setting resets trsf to identity Matrix3r getHSize() const { return hSize; } void setHSize(const Matrix3r& m){ hSize=refHSize=m; postLoad(*this); } // set current transformation; has no influence on current configuration (hSize); sets display refHSize as side-effect Matrix3r getTrsf() const { return trsf; } void setTrsf(const Matrix3r& m){ trsf=m; postLoad(*this); } Matrix3r getVelGrad() const { return velGrad; } void setVelGrad(const Matrix3r& m){ nextVelGrad=m; velGradChanged=true;} //BEGIN Deprecated (see refSize property) // get undeformed shape Matrix3r getHSize0() const { return _invTrsf*hSize; } // edge lengths of the undeformed shape Vector3r getRefSize() const { Matrix3r h=getHSize0(); return Vector3r(h.col(0).norm(),h.col(1).norm(),h.col(2).norm()); } // temporary, will be removed in favor of more descriptive setBox(...) void setRefSize(const Vector3r& s){ // if refSize is set to the current size and the cell is a box (used in older scripts), say it is not necessary Matrix3r hSizeEigen3=hSize.diagonal().asDiagonal(); //Eigen3 support if(s==_size && hSize==hSizeEigen3){ LOG_WARN("Setting O.cell.refSize=O.cell.size is useless, O.trsf=Matrix3.Identity is enough now."); } else {LOG_WARN("Setting Cell.refSize is deprecated, use Cell.setBox(...) instead.");} setBox(s); postLoad(*this); } //END Deprecated // set box shape of the cell void setBox(const Vector3r& size){ setHSize(size.asDiagonal()); trsf=Matrix3r::Identity(); postLoad(*this); } void setBox3(const Real& s0, const Real& s1, const Real& s2){ setBox(Vector3r(s0,s1,s2)); } // return current cell volume Real getVolume() const {return hSize.determinant();} void postLoad(Cell&){ integrateAndUpdate(0); } // to resolve overloads Vector3r wrapShearedPt_py(const Vector3r& pt) const { return wrapShearedPt(pt);} Vector3r wrapPt_py(const Vector3r& pt) const { return wrapPt(pt);} // strain measures Matrix3r getDefGrad() { return trsf; } Matrix3r getSmallStrain() { return .5*(trsf+trsf.transpose()) - Matrix3r::Identity(); } Matrix3r getRCauchyGreenDef() { return trsf.transpose()*trsf; } Matrix3r getLCauchyGreenDef() { return trsf*trsf.transpose(); } Matrix3r getLagrangianStrain() { return .5*(getRCauchyGreenDef()-Matrix3r::Identity()); } Matrix3r getEulerianAlmansiStrain() { return .5*(Matrix3r::Identity()-getLCauchyGreenDef().inverse()); } void computePolarDecOfDefGrad(Matrix3r& R, Matrix3r& U) { Matrix_computeUnitaryPositive(trsf,&R,&U); } boost::python::tuple getPolarDecOfDefGrad(){ Matrix3r R,U; computePolarDecOfDefGrad(R,U); return boost::python::make_tuple(R,U); } Matrix3r getRotation() { Matrix3r R,U; computePolarDecOfDefGrad(R,U); return R; } Matrix3r getLeftStretch() { Matrix3r R,U; computePolarDecOfDefGrad(R,U); return U; } Matrix3r getRightStretch() { Matrix3r R,U; computePolarDecOfDefGrad(R,U); return trsf*R.transpose(); } // stress measures //Matrix3r getStress() { return Shop::getStress(); } //Matrix3r getCauchyStress() { Matrix3r s=getStress(); return .5*(s+s.transpose()); } enum { HOMO_NONE=0, HOMO_POS=1, HOMO_VEL=2, HOMO_VEL_2ND=3 }; YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(Cell,Serializable,"Parameters of periodic boundary conditions. Only applies if O.isPeriodic==True.", /* overridden below to be modified by getters/setters because of intended side-effects */ ((Matrix3r,trsf,Matrix3r::Identity(),,"[overridden]")) //"Current transformation matrix of the cell, which defines how far is the current cell geometry (:yref:`hSize`) from the reference configuration. Changing trsf will not change :yref:`hSize`, it serves only as accumulator for transformations applied via :yref:`velGrad`.")) ((Matrix3r,refHSize,Matrix3r::Identity(),,"Reference cell configuration, only used with :yref:`OpenGLRenderer.dispScale`. Updated automatically when :yref:`hSize` or :yref:`trsf` is assigned directly; also modified by :yref:`yade.utils.setRefSe3` (called e.g. by the ``Reference`` button in the UI).")) ((Matrix3r,hSize,Matrix3r::Identity(),,"[overridden below]")) ((Matrix3r,prevHSize,Matrix3r::Identity(),Attr::readonly,":yref:`hSize` from the previous step, used in the definition of relative velocity across periods.")) /* normal attributes */ ((Matrix3r,velGrad,Matrix3r::Zero(),,"[overridden below]")) ((Matrix3r,nextVelGrad,Matrix3r::Zero(),Attr::readonly,"see :yref:`Cell.velGrad`.")) ((Matrix3r,prevVelGrad,Matrix3r::Zero(),Attr::readonly,"Velocity gradient in the previous step.")) ((bool,homoDeform,true,,"Deform (:yref:`velGrad`) the cell homothetically, by adjusting positions and velocities of bodies. The velocity change is obtained by deriving the expression v=∇v.x, where ∇v is the macroscopic velocity gradient, giving in an incremental form: Δv=Δ ∇v x + ∇v Δx. As a result, velocities are modified as soon as ``velGrad`` changes, according to the first term: Δv(t)=Δ ∇v x(t), while the 2nd term reflects a convective term: Δv'= ∇v v(t-dt/2).")) ((bool,velGradChanged,false,Attr::readonly,"true when velGrad has been changed manually (see also :yref:`Cell.nextVelGrad`)")), /*deprec*/ ((Hsize,hSize,"conform to Yade's names convention.")), /*init*/ , /*ctor*/ _invTrsf=Matrix3r::Identity(); integrateAndUpdate(0), /*py*/ // override some attributes above .add_property("hSize",&Cell::getHSize,&Cell::setHSize,"Base cell vectors (columns of the matrix), updated at every step from :yref:`velGrad` (:yref:`trsf` accumulates applied :yref:`velGrad` transformations). Setting *hSize* during a simulation is not supported by most contact laws, it is only meant to be used at iteration 0 before any interactions have been created.") .add_property("size",&Cell::getSize_copy,&Cell::setSize,"Current size of the cell, i.e. lengths of the 3 cell lateral vectors contained in :yref:`Cell.hSize` columns. Updated automatically at every step. Assigning a value will change the lengths of base vectors (see :yref:`Cell.hSize`), keeping their orientations unchanged.") .add_property("refSize",&Cell::getRefSize,&Cell::setRefSize,"Reference size of the cell (lengths of initial cell vectors, i.e. column norms of :yref:`hSize`).\n\n.. note::\n\t Modifying this value is deprecated, use :yref:`setBox` instead.") // useful properties .add_property("trsf",&Cell::getTrsf,&Cell::setTrsf,"Current transformation matrix of the cell, obtained from time integration of :yref:`Cell.velGrad`.") .add_property("velGrad",&Cell::getVelGrad,&Cell::setVelGrad,"Velocity gradient of the transformation; used in :yref:`NewtonIntegrator`. Values of :yref:`velGrad` accumulate in :yref:`trsf` at every step.\n\n NOTE: changing velGrad at the beginning of a simulation loop would lead to inacurate integration for one step, as it should normaly be changed after the contact laws (but before Newton). To avoid this problem, assignment is deferred automatically. The target value typed in terminal is actually stored in :yref:`Cell.nextVelGrad` and will be applied right in time by Newton integrator.") .def_readonly("size",&Cell::getSize_copy,"Current size of the cell, i.e. lengths of the 3 cell lateral vectors contained in :yref:`Cell.hSize` columns. Updated automatically at every step.") .add_property("volume",&Cell::getVolume,"Current volume of the cell.") // functions .def("setBox",&Cell::setBox,"Set :yref:`Cell` shape to be rectangular, with dimensions along axes specified by given argument. Shorthand for assigning diagonal matrix with respective entries to :yref:`hSize`.") .def("setBox",&Cell::setBox3,"Set :yref:`Cell` shape to be rectangular, with dimensions along $x$, $y$, $z$ specified by arguments. Shorthand for assigning diagonal matrix with the respective entries to :yref:`hSize`.") // debugging only .def("wrap",&Cell::wrapShearedPt_py,"Transform an arbitrary point into a point in the reference cell") .def("unshearPt",&Cell::unshearPt,"Apply inverse shear on the point (removes skew+rot of the cell)") .def("shearPt",&Cell::shearPt,"Apply shear (cell skew+rot) on the point") .def("wrapPt",&Cell::wrapPt_py,"Wrap point inside the reference cell, assuming the cell has no skew+rot.") .def("getDefGrad",&Cell::getDefGrad,"Returns deformation gradient tensor $\\mat{F}$ of the cell deformation (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getSmallStrain",&Cell::getSmallStrain,"Returns small strain tensor $\\mat{\\varepsilon}=\\frac{1}{2}(\\mat{F}+\\mat{F}^T)-\\mat{I}$ of the cell (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getRCauchyGreenDef",&Cell::getRCauchyGreenDef,"Returns right Cauchy-Green deformation tensor $\\mat{C}=\\mat{F}^T\\mat{F}$ of the cell (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getLCauchyGreenDef",&Cell::getLCauchyGreenDef,"Returns left Cauchy-Green deformation tensor $\\mat{b}=\\mat{F}\\mat{F}^T$ of the cell (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getLagrangianStrain",&Cell::getLagrangianStrain,"Returns Lagrangian strain tensor $\\mat{E}=\\frac{1}{2}(\\mat{C}-\\mat{I})=\\frac{1}{2}(\\mat{F}^T\\mat{F}-\\mat{I})=\\frac{1}{2}(\\mat{U}^2-\\mat{I})$ of the cell (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getEulerianAlmansiStrain",&Cell::getEulerianAlmansiStrain,"Returns Eulerian-Almansi strain tensor $\\mat{e}=\\frac{1}{2}(\\mat{I}-\\mat{b}^{-1})=\\frac{1}{2}(\\mat{I}-(\\mat{F}\\mat{F}^T)^{-1})$ of the cell (http://en.wikipedia.org/wiki/Finite_strain_theory)") .def("getPolarDecOfDefGrad",&Cell::getPolarDecOfDefGrad,"Returns orthogonal matrix $\\mat{R}$ and symmetric positive semi-definite matrix $\\mat{U}$ as polar decomposition of deformation gradient $\\mat{F}$ of the cell ( $\\mat{F}=\\mat{RU}$ )") .def("getRotation",&Cell::getRotation,"Returns rotation of the cell (orthogonal matrix $\\mat{R}$ from polar decomposition $\\mat{F}=\\mat{RU}$ )") .def("getLeftStretch",&Cell::getLeftStretch,"Returns left (spatial) stretch tensor of the cell (matrix $\\mat{U}$ from polar decomposition $\\mat{F}=\\mat{RU}$ )") .def("getRightStretch",&Cell::getRightStretch,"Returns right (material) stretch tensor of the cell (matrix $\\mat{V}$ from polar decomposition $\\mat{F}=\\mat{RU}=\\mat{VR}\\ \\rightarrow\\ \\mat{V}=\\mat{FR}^T$ )") .def_readonly("shearTrsf",&Cell::_shearTrsf,"Current skew+rot transformation (no resize)") .def_readonly("unshearTrsf",&Cell::_unshearTrsf,"Inverse of the current skew+rot transformation (no resize)") .add_property("hSize0",&Cell::getHSize0,"Value of untransformed hSize, with respect to current :yref:`trsf` (computed as :yref:`trsf` ⁻¹ × :yref:`hSize`.") ); }; REGISTER_SERIALIZABLE(Cell); trunk-1.07.0/core/Clump.cpp000066400000000000000000000310131226405415500154600ustar00rootroot00000000000000// (c) 2007-2010 Vaclav Smilauer #include"Clump.hpp" #include #include #include #include #include YADE_PLUGIN((Clump)); CREATE_LOGGER(Clump); python::dict Clump::members_get(){ python::dict ret; FOREACH(MemberMap::value_type& b, members){ ret[b.first]=python::make_tuple(b.second.position,b.second.orientation); } return ret; } void Clump::add(const shared_ptr& clumpBody, const shared_ptr& subBody){ Body::id_t subId=subBody->getId(); const shared_ptr clump=YADE_PTR_CAST(clumpBody->shape); if(clump->members.count(subId)!=0) throw std::invalid_argument(("Body #"+lexical_cast(subId)+" is already part of this clump #"+lexical_cast(clumpBody->id)).c_str()); if(subBody->isClumpMember()) throw std::invalid_argument(("Body #"+lexical_cast(subId)+" is already a clump member of #"+lexical_cast(subBody->clumpId)).c_str()); else if(subBody->isClump()){ const shared_ptr subClump=YADE_PTR_CAST(subBody->shape); FOREACH(const MemberMap::value_type& mm, subClump->members){ const Body::id_t& memberId=mm.first; Scene* scene(Omega::instance().getScene().get()); // get scene const shared_ptr& member=Body::byId(memberId,scene); assert(member->isClumpMember()); member->clumpId=clumpBody->id; clump->members[memberId]=Se3r();// meaningful values will be put in by Clump::updateProperties LOG_DEBUG("Added body #"<id<<" to clump #"<id); } LOG_DEBUG("Clump #"<id<<" will be erased.");// see addToClump() in yadeWrapper.cpp } else{ // subBody must be a standalone! clump->members[subId]=Se3r();// meaningful values will be put in by Clump::updateProperties subBody->clumpId=clumpBody->id; } clumpBody->clumpId=clumpBody->id; // just to make sure clumpBody->setBounded(false); // disallow collisions with the clump itself if(subBody->isStandalone()){LOG_DEBUG("Added body #"<id<<" to clump #"<id);} } void Clump::del(const shared_ptr& clumpBody, const shared_ptr& subBody){ // erase the subBody; removing body that is not part of the clump throws const shared_ptr clump=YADE_PTR_CAST(clumpBody->shape); if(clump->members.erase(subBody->id)!=1) throw std::invalid_argument(("Body #"+lexical_cast(subBody->id)+" not part of clump #"+lexical_cast(clumpBody->id)+"; not removing.").c_str()); subBody->clumpId=Body::ID_NONE; LOG_DEBUG("Removed body #"<id<<" from clump #"<id); } void Clump::addForceTorqueFromMembers(const State* clumpState, Scene* scene, Vector3r& F, Vector3r& T){ FOREACH(const MemberMap::value_type& mm, members){ const Body::id_t& memberId=mm.first; const shared_ptr& member=Body::byId(memberId,scene); assert(member->isClumpMember()); State* memberState=member->state.get(); const Vector3r& f=scene->forces.getForce(memberId); const Vector3r& t=scene->forces.getTorque(memberId); F+=f; T+=t+(memberState->pos-clumpState->pos).cross(f); } } /*! Clump's se3 will be updated (origin at centroid and axes coincident with principal inertia axes) and subSe3 modified in such a way that members positions in world coordinates will not change. Note: velocities and angularVelocities of constituents are zeroed. OLD DOCS (will be cleaned up): -# Clump::members values and Clump::physicalParameters::se3 are invalid from this point -# M=0; S=vector3r(0,0,0); I=zero tensor; (ALL calculations are in world coordinates!) -# loop over Clump::members (position x_i, mass m_i, inertia at subBody's centroid I_i) [this loop will be replaced by numerical integration (rasterization) for the intersecting case; the rest will be the same] - M+=m_i - S+=m_i*x_i (local static moments are zero (centroid) - get inertia tensor of subBody in world coordinates, by rotating the principal (local) tensor against subBody->se3->orientation; then translate it to world origin (parallel axes theorem), then I+=I_i_world -# clumpPos=S/M -# translate aggregate's inertia tensor; parallel axes on I (R=clumpPos): I^c_jk=I'_jk-M*(delta_jk R.R - R_j*R_k) [http://en.wikipedia.org/wiki/Moments_of_inertia#Parallel_axes_theorem] -# eigen decomposition of I, get principal inertia and rotation matrix of the clump -# se3->orientation=quaternion(rotation_matrix); se3->position=clumpPos -# update subSe3s */ void Clump::updateProperties(const shared_ptr& clumpBody, unsigned int discretization, bool integrateInertia){ LOG_DEBUG("Updating clump #"<id<<" parameters"); const shared_ptr state(clumpBody->state); const shared_ptr clump(YADE_PTR_CAST(clumpBody->shape)); if(clump->members.empty()){ throw std::runtime_error("Clump::updateProperties: clump has zero members."); } // trivial case if(clump->members.size()==1){ LOG_DEBUG("Clump of size one will be treated specially.") MemberMap::iterator I=clump->members.begin(); shared_ptr subBody=Body::byId(I->first); //const shared_ptr& subRBP(YADE_PTR_CAST(subBody->physicalParameters)); State* subState=subBody->state.get(); // se3 of the clump as whole is the same as the member's se3 state->pos=subState->pos; state->ori=subState->ori; // relative member's se3 is identity I->second.position=Vector3r::Zero(); I->second.orientation=Quaternionr::Identity(); state->inertia=subState->inertia; state->mass=subState->mass; state->vel=Vector3r::Zero(); state->angVel=Vector3r::Zero(); return; } //check for intersections: bool intersecting = false; shared_ptr sph (new Sphere); int Sph_Index = sph->getClassIndexStatic(); // get sphere index for checking if bodies are spheres if (integrateInertia){ FOREACH(MemberMap::value_type& mm, clump->members){ const shared_ptr subBody1=Body::byId(mm.first); FOREACH(MemberMap::value_type& mm, clump->members){ const shared_ptr subBody2=Body::byId(mm.first); if ((subBody1->shape->getClassIndex() == Sph_Index) && (subBody2->shape->getClassIndex() == Sph_Index) && (subBody1!=subBody2)){//clump members should be spheres Vector3r dist = subBody1->state->pos - subBody2->state->pos; const Sphere* sphere1 = YADE_CAST (subBody1->shape.get()); const Sphere* sphere2 = YADE_CAST (subBody2->shape.get()); Real un = (sphere1->radius+sphere2->radius) - dist.norm(); if (un > -0.001*min(sphere1->radius,sphere2->radius)) {intersecting = true; break;} } } } } /* quantities suffixed by g: global (world) coordinates s: local subBody's coordinates c: local clump coordinates */ Real M=0; // mass Real dens=0;//density Vector3r Sg(0,0,0); // static moment, for getting clump's centroid Matrix3r Ig(Matrix3r::Zero()), Ic(Matrix3r::Zero()); // tensors of inertia; is upper triangular, zeros instead of symmetric elements /** algorithm for estimation of volumes and inertia tensor from clumps using summation/integration scheme with regular grid spacing (some parts copied from woo: http://bazaar.launchpad.net/~eudoxos/woo/trunk/view/head:/pkg/dem/Clump.cpp) */ if(intersecting){ //get boundaries and minimum radius of clump: Real rMin=1./0.; AlignedBox3r aabb; FOREACH(MemberMap::value_type& mm, clump->members){ const shared_ptr subBody = Body::byId(mm.first); if (subBody->shape->getClassIndex() == Sph_Index){//clump member should be a sphere const Sphere* sphere = YADE_CAST (subBody->shape.get()); aabb.extend(subBody->state->pos + Vector3r::Constant(sphere->radius)); aabb.extend(subBody->state->pos - Vector3r::Constant(sphere->radius)); rMin=min(rMin,sphere->radius); } } //get volume and inertia tensor using regular cubic cell array inside bounding box of the clump: Real dx = rMin/discretization; //edge length of cell Real aabbMax = max(max(aabb.max().x()-aabb.min().x(),aabb.max().y()-aabb.min().y()),aabb.max().z()-aabb.min().z()); if (aabbMax/dx > 150) dx = aabbMax/150;//limit dx Real dv = pow(dx,3); //volume of cell Vector3r x; //position vector (center) of cell for(x.x()=aabb.min().x()+dx/2.; x.x()members){ const shared_ptr subBody = Body::byId(mm.first); if (subBody->shape->getClassIndex() == Sph_Index){//clump member should be a sphere dens = subBody->material->density; const Sphere* sphere = YADE_CAST (subBody->shape.get()); if((x-subBody->state->pos).squaredNorm() < pow(sphere->radius,2)){ M += dv; Sg += dv*x; //inertia I = sum_i( mass_i*dist^2 + I_s) ) //steiners theorem Ig += dv*( x.dot(x)*Matrix3r::Identity()-x*x.transpose()/*dist^2*/+Matrix3r(Vector3r::Constant(dv*pow(dx,2)/6.).asDiagonal())/*I_s/m = d^2: along princial axes of dv; perhaps negligible?*/); break; } } } } } } } if(!intersecting){ FOREACH(MemberMap::value_type& mm, clump->members){ // I.first is Body::id_t, I.second is Se3r of that body const shared_ptr subBody=Body::byId(mm.first); dens = subBody->material->density; if (subBody->shape->getClassIndex() == Sph_Index){//clump member should be a sphere State* subState=subBody->state.get(); const Sphere* sphere = YADE_CAST (subBody->shape.get()); Real vol = (4./3.)*Mathr::PI*pow(sphere->radius,3.); M+=vol; Sg+=vol*subState->pos; Ig+=Clump::inertiaTensorTranslate(Vector3r::Constant((2/5.)*vol*pow(sphere->radius,2)).asDiagonal(),vol,-1.*subState->pos); } } } assert(M>0); LOG_TRACE("M=\n"<pos=Sg/M; // this will calculate translation only, since rotation is zero Matrix3r Ic_orientG=inertiaTensorTranslate(Ig, -M /* negative mass means towards centroid */, state->pos); // inertia at clump's centroid but with world orientation LOG_TRACE("Ic_orientG=\n"< decomposed(Ic_orientG); const Matrix3r& R_g2c(decomposed.eigenvectors()); // has NaNs for identity matrix?? LOG_TRACE("R_g2c=\n"<ori=Quaternionr(R_g2c); state->ori.normalize(); state->inertia=dens*decomposed.eigenvalues(); state->mass=dens*M; // TODO: these might be calculated from members... but complicated... - someone needs that?! state->vel=state->angVel=Vector3r::Zero(); clumpBody->setAspherical(state->inertia[0]!=state->inertia[1] || state->inertia[0]!=state->inertia[2]); // update subBodySe3s; subtract clump orientation (=apply its inverse first) to subBody's orientation FOREACH(MemberMap::value_type& I, clump->members){ shared_ptr subBody=Body::byId(I.first); State* subState=subBody->state.get(); I.second.orientation=state->ori.conjugate()*subState->ori; I.second.position=state->ori.conjugate()*(subState->pos-state->pos); } } /*! @brief Recalculates inertia tensor of a body after translation away from (default) or towards its centroid. * * @param I inertia tensor in the original coordinates; it is assumed to be upper-triangular (elements below the diagonal are ignored). * @param m mass of the body; if positive, translation is away from the centroid; if negative, towards centroid. * @param off offset of the new origin from the original origin * @return inertia tensor in the new coordinate system; the matrix is symmetric. */ Matrix3r Clump::inertiaTensorTranslate(const Matrix3r& I,const Real m, const Vector3r& off){ return I+m*(off.dot(off)*Matrix3r::Identity()-off*off.transpose()); } /*! @brief Recalculate body's inertia tensor in rotated coordinates. * * @param I inertia tensor in old coordinates * @param T rotation matrix from old to new coordinates * @return inertia tensor in new coordinates */ Matrix3r Clump::inertiaTensorRotate(const Matrix3r& I,const Matrix3r& T){ /* [http://www.kwon3d.com/theory/moi/triten.html] */ return T.transpose()*I*T; } /*! @brief Recalculate body's inertia tensor in rotated coordinates. * * @param I inertia tensor in old coordinates * @param rot quaternion that describes rotation from old to new coordinates * @return inertia tensor in new coordinates */ Matrix3r Clump::inertiaTensorRotate(const Matrix3r& I, const Quaternionr& rot){ Matrix3r T=rot.toRotationMatrix(); return inertiaTensorRotate(I,T); } trunk-1.07.0/core/Clump.hpp000066400000000000000000000146211226405415500154730ustar00rootroot00000000000000// (c) 2007 Vaclav Smilauer #pragma once #include #include #include #include #include #include #include /*! Body representing clump (rigid aggregate) composed by other existing bodies. Clump is one of bodies that reside in scene->bodies. When an existing body is added to ::Clump, it's ::Body::dynamic flag is set to false (it is still subscribed to all its engines, to make it possible to remove it from the clump again). All forces acting on Clump::members are made to act on the clump itself, which will ensure that they influence all Clump::members as if the clump were a rigid particle. What are clump requirements so that they function? -# Given any body, tell - if it is a clump member: Body::isClumpMember() - if it is a clump: Body:: isClump(). (Correct result is assured at each call to Clump::add). (we could use RTTI instead? Would that be more reliable?) - if it is a standalone Body: Body::isStandalone() - what is it's clump id (Body::clumpId) -# given the root body, tell - what clumps it contains (enumerate all bodies and filter clumps, see above) -# given a clump, tell - what bodies it contains (keys of ::Clump::members) - what are se3 of these bodies (values of ::Clump::members) -# add/delete bodies from/to clump (::Clump::add, ::Clump::del) - This includes saving se3 of the subBody: it \em must be in clump's local coordinates so that it is constant. The transformation from global to local is given by clump's se3 at the moment of addition. Clump's se3 is initially (origin,identity) -# Update clump's physical properties (Clump::updateProperties) - This \em must reposition members so that they have the same se3 globally -# Apply forces acting on members to the clump instead (done in NewtonsForceLaw, NewtonsMomentumLaw) - uses world coordinates to calculate effect on the clump's centroid -# Integrate position and orientation of the clump - LeapFrogPositionIntegrator and LeapFrogOrientationIntegrator move clump as whole - clump members are skipped, since they have Body::dynamic==false. - ClumpMemberMover is an engine that updates positions of the clump memebers in each timestep (calls Clump::moveSubBodies internally) Some more information can be found http://beta.arcig.cz/~eudoxos/phd/index.cgi/YaDe/HighLevelClumps For an example how to generate a clump, see ClumpTestGen::createOneClump. @todo GravityEngine should be applied to members, not to clump as such?! Still not sure. Perhaps Clumps should have mass and inertia set to zeros so that engines unaware of clumps do not act on it. It would have some private mass and insertia that would be used in NewtonsForceLaw etc for clumps specially... @note Collider::mayCollide (should be used by all colliders) bypasses Clumps explicitly. This no longer depends on the absence of bound. @note Clump relies on its id being assigned (as well as id of its components); therefore, only bodies that have already been inserted to the container may be added to Clump which has been itself already added to the container. We further requier that clump id is greater than ids of clumped bodies */ class NewtonIntegrator; class Clump: public Shape { public: typedef std::map MemberMap; static void add(const shared_ptr& clump, const shared_ptr& subBody); static void del(const shared_ptr& clump, const shared_ptr& subBody); //! Recalculate physical properties of Clump. static void updateProperties(const shared_ptr& clump, unsigned int discretization, bool integrateInertia); //! Calculate positions and orientations of members based on relative Se3; newton pointer (if non-NULL) calls NewtonIntegrator::saveMaximaVelocity // done as template to avoid cross-dependency between clump and newton (not necessary if all plugins are linked together) template static void moveMembers(const shared_ptr& clumpBody, Scene* scene, IntegratorT* integrator=NULL){ const shared_ptr& clump=YADE_PTR_CAST(clumpBody->shape); const shared_ptr& clumpState=clumpBody->state; FOREACH(MemberMap::value_type& B, clump->members){ // B.first is Body::id_t, B.second is local Se3r of that body in the clump const shared_ptr& b = Body::byId(B.first,scene); const shared_ptr& subState=b->state; const Vector3r& subPos(B.second.position); const Quaternionr& subOri(B.second.orientation); // position update subState->pos=clumpState->pos+clumpState->ori*subPos; subState->ori=clumpState->ori*subOri; // velocity update subState->vel=clumpState->vel+clumpState->angVel.cross(subState->pos-clumpState->pos); subState->angVel=clumpState->angVel; if(integrator) integrator->saveMaximaDisplacement(b); } } //! update member positions after clump being moved by mouse (in case simulation is paused and engines will not do that). void userForcedDisplacementRedrawHook(){ throw runtime_error("Clump::userForcedDisplacementRedrawHook not yet implemented (with Clump as subclass of Shape).");} //! get force and torque on the clump itself, from forces/torques on members; does not include force on clump itself void addForceTorqueFromMembers(const State* clumpState, Scene* scene, Vector3r& F, Vector3r& T); //! Recalculates inertia tensor of a body after translation away from (default) or towards its centroid. static Matrix3r inertiaTensorTranslate(const Matrix3r& I,const Real m, const Vector3r& off); //! Recalculate body's inertia tensor in rotated coordinates. static Matrix3r inertiaTensorRotate(const Matrix3r& I, const Matrix3r& T); //! Recalculate body's inertia tensor in rotated coordinates. static Matrix3r inertiaTensorRotate(const Matrix3r& I, const Quaternionr& rot); python::dict members_get(); YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Clump,Shape,"Rigid aggregate of bodies", ((MemberMap,members,,Attr::hidden,"Ids and relative positions+orientations of members of the clump (should not be accessed directly)")) // ((vector,ids,,Attr::readonly,"Ids of constituent particles (only informative; direct modifications will have no effect).")) ,/*ctor*/ createIndex(); ,/*py*/ .add_property("members",&Clump::members_get,"Return clump members as {'id1':(relPos,relOri),...}") ); DECLARE_LOGGER; REGISTER_CLASS_INDEX(Clump,Shape); }; REGISTER_SERIALIZABLE(Clump); trunk-1.07.0/core/Dispatcher.cpp000066400000000000000000000012561226405415500164740ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include Functor::~Functor(){}; // vtable #include "Dispatcher.hpp" #include #include Dispatcher::~Dispatcher(){} trunk-1.07.0/core/Dispatcher.hpp000066400000000000000000000274271226405415500165110ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include #include #include #include // real base class for all dispatchers (the other one are templates) class Dispatcher: public Engine{ public: // these functions look to be completely unused...? virtual string getFunctorType() { throw; }; virtual int getDimension() { throw; }; virtual string getBaseClassType(unsigned int ) { throw; }; // virtual ~Dispatcher(); YADE_CLASS_BASE_DOC(Dispatcher,Engine,"Engine dispatching control to its associated functors, based on types of argument it receives. This abstract base class provides no functionality in itself.") }; REGISTER_SERIALIZABLE(Dispatcher); /* Each real dispatcher derives from Dispatcher1D or Dispatcher2D (both templates), which in turn derive from Dispatcher (an Engine) and DynLibDispatcher (the dispatch logic). Because we need literal functor and class names for registration in python, we provide macro that creates the real dispatcher class with everything needed. */ #define _YADE_DISPATCHER1D_FUNCTOR_ADD(FunctorT,f) virtual void addFunctor(shared_ptr f){ add1DEntry(f->get1DFunctorType1(),f); } #define _YADE_DISPATCHER2D_FUNCTOR_ADD(FunctorT,f) virtual void addFunctor(shared_ptr f){ add2DEntry(f->get2DFunctorType1(),f->get2DFunctorType2(),f); } #define _YADE_DIM_DISPATCHER_FUNCTOR_DOC_ATTRS_CTOR_PY(Dim,DispatcherT,FunctorT,doc,attrs,ctor,py) \ typedef FunctorT FunctorType; \ void updateScenePtr(){ FOREACH(shared_ptr f, functors){ f->scene=scene; }} \ void postLoad(DispatcherT&){ clearMatrix(); FOREACH(shared_ptr f, functors) add(static_pointer_cast(f)); } \ virtual void add(FunctorT* f){ add(shared_ptr(f)); } \ virtual void add(shared_ptr f){ bool dupe=false; string fn=f->getClassName(); FOREACH(const shared_ptr& f, functors) { if(fn==f->getClassName()) dupe=true; } if(!dupe) functors.push_back(f); addFunctor(f); } \ BOOST_PP_CAT(_YADE_DISPATCHER,BOOST_PP_CAT(Dim,D_FUNCTOR_ADD))(FunctorT,f) \ boost::python::list functors_get(void) const { boost::python::list ret; FOREACH(const shared_ptr& f, functors){ ret.append(f); } return ret; } \ void functors_set(const vector >& ff){ functors.clear(); FOREACH(const shared_ptr& f, ff) add(f); postLoad(*this); } \ void pyHandleCustomCtorArgs(python::tuple& t, python::dict& d){ if(python::len(t)==0)return; if(python::len(t)!=1) throw invalid_argument("Exactly one list of " BOOST_PP_STRINGIZE(FunctorT) " must be given."); typedef std::vector > vecF; vecF vf=boost::python::extract(t[0])(); functors_set(vf); t=python::tuple(); } \ YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(DispatcherT,Dispatcher,"Dispatcher calling :yref:`functors<" BOOST_PP_STRINGIZE(FunctorT) ">` based on received argument type(s).\n\n" doc, \ ((vector >,functors,,,"Functors active in the dispatch mechanism [overridden below].")) /*additional attrs*/ attrs, \ /*ctor*/ ctor, /*py*/ py .add_property("functors",&DispatcherT::functors_get,&DispatcherT::functors_set,"Functors associated with this dispatcher." " :yattrtype:`vector >` ") \ .def("dispMatrix",&DispatcherT::dump,python::arg("names")=true,"Return dictionary with contents of the dispatch matrix.").def("dispFunctor",&DispatcherT::getFunctor,"Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws."); \ ) #define YADE_DISPATCHER1D_FUNCTOR_DOC_ATTRS_CTOR_PY(DispatcherT,FunctorT,doc,attrs,ctor,py) _YADE_DIM_DISPATCHER_FUNCTOR_DOC_ATTRS_CTOR_PY(1,DispatcherT,FunctorT,doc,attrs,ctor,py) #define YADE_DISPATCHER2D_FUNCTOR_DOC_ATTRS_CTOR_PY(DispatcherT,FunctorT,doc,attrs,ctor,py) _YADE_DIM_DISPATCHER_FUNCTOR_DOC_ATTRS_CTOR_PY(2,DispatcherT,FunctorT,doc,attrs,ctor,py) // HELPER FUNCTIONS /*! Function returning class name (as string) for given index and topIndexable (top-level indexable, such as Shape, Material and so on) This function exists solely for debugging, is quite slow: it has to traverse all classes and ask for inheritance information. It should be used primarily to convert indices to names in Dispatcher::dictDispatchMatrix?D; since it relies on Omega for RTTI, this code could not be in Dispatcher itself. s*/ template std::string Dispatcher_indexToClassName(int idx){ scoped_ptr top(new topIndexable); std::string topName=top->getClassName(); typedef std::pair classItemType; FOREACH(classItemType clss, Omega::instance().getDynlibsDescriptor()){ if(Omega::instance().isInheritingFrom_recursive(clss.first,topName) || clss.first==topName){ // create instance, to ask for index shared_ptr inst=dynamic_pointer_cast(ClassFactory::instance().createShared(clss.first)); assert(inst); if(inst->getClassIndex()<0 && inst->getClassName()!=top->getClassName()){ throw logic_error("Class "+inst->getClassName()+" didn't use REGISTER_CLASS_INDEX("+inst->getClassName()+","+top->getClassName()+") and/or forgot to call createIndex() in the ctor. [[ Please fix that! ]]"); } if(inst->getClassIndex()==idx) return clss.first; } } throw runtime_error("No class with index "+boost::lexical_cast(idx)+" found (top-level indexable is "+topName+")"); } //! Return class index of given indexable template int Indexable_getClassIndex(const shared_ptr i){return i->getClassIndex();} //! Return sequence (hierarchy) of class indices of given indexable; optionally convert to names template python::list Indexable_getClassIndices(const shared_ptr i, bool convertToNames){ int depth=1; python::list ret; int idx0=i->getClassIndex(); if(convertToNames) ret.append(Dispatcher_indexToClassName(idx0)); else ret.append(idx0); if(idx0<0) return ret; // don't continue and call getBaseClassIndex(), since we are at the top already while(true){ int idx=i->getBaseClassIndex(depth++); if(convertToNames) ret.append(Dispatcher_indexToClassName(idx)); else ret.append(idx); if(idx<0) return ret; } } //! Return functors of this dispatcher, as list of functors of appropriate type template std::vector > Dispatcher_functors_get(shared_ptr self){ std::vector > ret; FOREACH(const shared_ptr& functor, self->functors){ shared_ptr functorRightType(dynamic_pointer_cast(functor)); if(!functorRightType) throw logic_error("Internal error: Dispatcher of type "+self->getClassName()+" did not contain Functor of the required type "+typeid(typename DispatcherT::functorType).name()+"?"); ret.push_back(functorRightType); } return ret; } template void Dispatcher_functors_set(shared_ptr self, std::vector > functors){ self->clear(); FOREACH(const shared_ptr& item, functors) self->add(item); } // Dispatcher is not a template, hence converting this into a real constructor would be complicated; keep it separated, at least for now... //! Create dispatcher of given type, with functors given as list in argument template shared_ptr Dispatcher_ctor_list(const std::vector >& functors){ shared_ptr instance(new DispatcherT); Dispatcher_functors_set(instance,functors); return instance; } template < class FunctorType, bool autoSymmetry=true > class Dispatcher1D : public Dispatcher, public DynLibDispatcher < TYPELIST_1(typename FunctorType::DispatchType1) // base classes for dispatch , FunctorType // class that provides multivirtual call , typename FunctorType::ReturnType // return type , typename FunctorType::ArgumentTypes , autoSymmetry > { public : typedef typename FunctorType::DispatchType1 baseClass; typedef baseClass argType1; typedef FunctorType functorType; typedef DynLibDispatcher dispatcherBase; shared_ptr getFunctor(shared_ptr arg){ return dispatcherBase::getExecutor(arg); } python::dict dump(bool convertIndicesToNames){ python::dict ret; FOREACH(const DynLibDispatcher_Item1D& item, dispatcherBase::dataDispatchMatrix1D()){ if(convertIndicesToNames){ string arg1=Dispatcher_indexToClassName(item.ix1); ret[python::make_tuple(arg1)]=item.functorName; } else ret[python::make_tuple(item.ix1)]=item.functorName; } return ret; } int getDimension() { return 1; } virtual string getFunctorType(){ shared_ptr eu(new FunctorType); return eu->getClassName(); } virtual string getBaseClassType(unsigned int i){ if (i==0) { shared_ptr bc(new baseClass); return bc->getClassName(); } else return ""; } public: REGISTER_ATTRIBUTES(Dispatcher,); REGISTER_CLASS_AND_BASE(Dispatcher1D,Dispatcher DynLibDispatcher); }; template < class FunctorType, bool autoSymmetry=true > class Dispatcher2D : public Dispatcher, public DynLibDispatcher < TYPELIST_2(typename FunctorType::DispatchType1,typename FunctorType::DispatchType2) // base classes for dispatch , FunctorType // class that provides multivirtual call , typename FunctorType::ReturnType // return type , typename FunctorType::ArgumentTypes // argument of engine unit , autoSymmetry > { public : typedef typename FunctorType::DispatchType1 baseClass1; typedef typename FunctorType::DispatchType2 baseClass2; typedef baseClass1 argType1; typedef baseClass2 argType2; typedef FunctorType functorType; typedef DynLibDispatcher dispatcherBase; shared_ptr getFunctor(shared_ptr arg1, shared_ptr arg2){ return dispatcherBase::getExecutor(arg1,arg2); } python::dict dump(bool convertIndicesToNames){ python::dict ret; FOREACH(const DynLibDispatcher_Item2D& item, dispatcherBase::dataDispatchMatrix2D()){ if(convertIndicesToNames){ string arg1=Dispatcher_indexToClassName(item.ix1), arg2=Dispatcher_indexToClassName(item.ix2); ret[python::make_tuple(arg1,arg2)]=item.functorName; } else ret[python::make_tuple(item.ix1,item.ix2)]=item.functorName; } return ret; } virtual int getDimension() { return 2; } virtual string getFunctorType(){ shared_ptr eu(new FunctorType); return eu->getClassName(); } virtual string getBaseClassType(unsigned int i){ if (i==0){ shared_ptr bc(new baseClass1); return bc->getClassName(); } else if (i==1){ shared_ptr bc(new baseClass2); return bc->getClassName();} else return ""; } public: REGISTER_ATTRIBUTES(Dispatcher,); REGISTER_CLASS_AND_BASE(Dispatcher2D,Dispatcher DynLibDispatcher); }; trunk-1.07.0/core/DisplayParameters.hpp000066400000000000000000000033031226405415500200370ustar00rootroot00000000000000#pragma once /* Class for storing set of display parameters. * * The interface sort of emulates map string->string (which is not handled by yade-serialization). * * The "keys" (called displayTypes) are intended to be "OpenGLRenderer" or "GLViewer" (and perhaps other). * The "values" are intended to be XML representation of display parameters, obtained either by yade-serialization * with OpenGLRenderer and saveStateToStream with QGLViewer (and GLViewer). * */ class DisplayParameters: public Serializable{ private: std::vector values; std::vector displayTypes; public: //! Get value of given display type and put it in string& value and return true; if there is no such display type, return false. bool getValue(std::string displayType, std::string& value){assert(values.size()==displayTypes.size()); vector::iterator I=std::find(displayTypes.begin(),displayTypes.end(),displayType); if(I==displayTypes.end()) return false; value=values[std::distance(displayTypes.begin(),I)]; return true;} //! Set value of given display type; if such display type exists, it is overwritten, otherwise a new one is created. void setValue(std::string displayType, std::string value){assert(values.size()==displayTypes.size()); vector::iterator I=std::find(displayTypes.begin(),displayTypes.end(),displayType); if(I==displayTypes.end()){displayTypes.push_back(displayType); values.push_back(value);} else {values[std::distance(displayTypes.begin(),I)]=value;};} DisplayParameters(){} virtual ~DisplayParameters(){} REGISTER_ATTRIBUTES(Serializable,(displayTypes)(values)); REGISTER_CLASS_AND_BASE(DisplayParameters,Serializable); }; REGISTER_SERIALIZABLE(DisplayParameters); trunk-1.07.0/core/EnergyTracker.cpp000066400000000000000000000012401226405415500171440ustar00rootroot00000000000000#include Real EnergyTracker::total() const { Real ret=0; size_t sz=energies.size(); for(size_t id=0; id > dta=energies.getPerThreadData(); FOREACH(pairStringInt p,names) ret[p.first]=dta[p.second]; return ret; } trunk-1.07.0/core/EnergyTracker.hpp000066400000000000000000000062031226405415500171550ustar00rootroot00000000000000#pragma once #include #include #include #include #include #ifndef FOREACH #define FOREACH BOOST_FOREACH #endif namespace py=boost::python; class EnergyTracker: public Serializable{ public: ~EnergyTracker(); void findId(const std::string& name, int& id, bool reset=false, bool newIfNotFound=true){ if(id>0) return; // the caller should have checked this already if(names.count(name)) id=names[name]; else if(newIfNotFound) { #ifdef YADE_OPENMP #pragma omp critical #endif { energies.resize(energies.size()+1); id=energies.size()-1; resetStep.resize(id+1); resetStep[id]=reset; names[name]=id; assert(id<(int)energies.size()); assert(id>=0); } } } // set value of the accumulator; note: must NOT be called from parallel sections! void set(const Real& val, const std::string& name, int &id){ if(id<0) findId(name,id,/* do not reset value that is set directly */ false); energies.set(id,val); } // add value to the accumulator; safely called from parallel sections void add(const Real& val, const std::string& name, int &id, bool reset=false){ if(id<0) findId(name,id,reset); energies.add(id,val); } Real getItem_py(const std::string& name){ int id=-1; findId(name,id,false,false); if (id<0) {PyErr_SetString(PyExc_KeyError,("Unknown energy name '"+name+"'.").c_str()); python::throw_error_already_set(); } return energies.get(id); } void setItem_py(const std::string& name, Real val){ int id=-1; set(val,name,id); } void clear(){ energies.clear(); names.clear(); resetStep.clear();} void resetResettables(){ size_t sz=energies.size(); for(size_t id=0; id mapStringInt; typedef std::pair pairStringInt; YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(EnergyTracker,Serializable,"Storage for tracing energies. Only to be used if :yref:`O.trackEnergy` is True.", ((OpenMPArrayAccumulator,energies,,,"Energy values, in linear array")) ((mapStringInt,names,,Attr::hidden,"Associate textual name to an index in the energies array.")) ((vector,resetStep,,Attr::hidden,"Whether the respective energy value should be reset at every step.")) ,/*ctor*/ ,/*py*/ .def("__getitem__",&EnergyTracker::getItem_py,"Get energy value for given name.") .def("__setitem__",&EnergyTracker::setItem_py,"Set energy value for given name (will create a non-resettable item, if it does not exist yet).") .def("clear",&EnergyTracker::clear,"Clear all stored values.") .def("keys",&EnergyTracker::keys_py,"Return defined energies.") .def("items",&EnergyTracker::items_py,"Return contents as list of (name,value) tuples.") .def("total",&EnergyTracker::total,"Return sum of all energies.") .add_property("_perThreadData",&EnergyTracker::perThreadData,"Contents as dictionary, where each value is tuple of individual threads' values (for debugging)") ) }; REGISTER_SERIALIZABLE(EnergyTracker); trunk-1.07.0/core/Engine.cpp000066400000000000000000000005561226405415500156150ustar00rootroot00000000000000#include CREATE_LOGGER(Engine); void Engine::action(){ LOG_FATAL("Engine "< #include #include #include #include #include #ifndef FOREACH #define FOREACH BOOST_FOREACH #endif class Body; class Scene; class Engine: public Serializable{ public: // pointer to the simulation, set at every step by Scene::moveToNextTimeStep Scene* scene; //! high-level profiling information; not serializable TimingInfo timingInfo; //! precise profiling information (timing of fragments of the engine) shared_ptr timingDeltas; virtual ~Engine() {}; virtual bool isActivated() { return true; }; virtual void action(); private: // py access funcs TimingInfo::delta timingInfo_nsec_get(){return timingInfo.nsec;}; void timingInfo_nsec_set(TimingInfo::delta d){ timingInfo.nsec=d;} long timingInfo_nExec_get(){return timingInfo.nExec;}; void timingInfo_nExec_set(long d){ timingInfo.nExec=d;} void explicitAction(); DECLARE_LOGGER; YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Engine,Serializable,"Basic execution unit of simulation, called from the simulation loop (O.engines)", ((bool,dead,false,,"If true, this engine will not run at all; can be used for making an engine temporarily deactivated and only resurrect it at a later point.")) ((int, ompThreads, -1,,"Number of threads to be used in the engine. If ompThreads<0 (default), the number will be typically OMP_NUM_THREADS or the number N defined by 'yade -jN' (this behavior can depend on the engine though). This attribute will only affect engines whose code includes openMP parallel regions (e.g. :yref:`InteractionLoop`). This attribute is mostly useful for experiments or when combining :yref:`ParallelEngine` with engines that run parallel regions, resulting in nested OMP loops with different number of threads at each level.")) ((string,label,,,"Textual label for this object; must be valid python identifier, you can refer to it directly from python.")), /* ctor */ scene=Omega::instance().getScene().get(); #ifdef USE_TIMING_DELTAS timingDeltas=shared_ptr(new TimingDeltas); #endif , /* py */ .add_property("execTime",&Engine::timingInfo_nsec_get,&Engine::timingInfo_nsec_set,"Cummulative time this Engine took to run (only used if :yref:`O.timingEnabled`\\ ==\\ ``True``).") .add_property("execCount",&Engine::timingInfo_nExec_get,&Engine::timingInfo_nExec_set,"Cummulative count this engine was run (only used if :yref:`O.timingEnabled`\\ ==\\ ``True``).") .def_readonly("timingDeltas",&Engine::timingDeltas,"Detailed information about timing inside the Engine itself. Empty unless enabled in the source code and :yref:`O.timingEnabled`\\ ==\\ ``True``.") .def("__call__",&Engine::explicitAction) ); }; REGISTER_SERIALIZABLE(Engine); trunk-1.07.0/core/FileGenerator.cpp000066400000000000000000000050141226405415500171300ustar00rootroot00000000000000/************************************************************************* * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include #include #include #include #include #include"FileGenerator.hpp" CREATE_LOGGER(FileGenerator); bool FileGenerator::generate(std::string& msg){ throw invalid_argument("Calling abstract FileGenerator::generate() does not make sense."); } bool FileGenerator::generateAndSave(const string& outputFileName, string& message) { bool status; message=""; boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); try { status=generate(message); // will modify message } catch(std::exception& e){ LOG_FATAL("Unhandled exception: "< #include #include "Scene.hpp" #include "ThreadWorker.hpp" class FileGenerator: public Serializable { protected: shared_ptr scene; public: bool generateAndSave(const string& outFile, string& message); protected : //! Returns whether the generation was successful; message for user is in FileGenerator::message virtual bool generate(std::string& msg); void pyGenerate(const string& out); void pyLoad(); YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(FileGenerator,Serializable,"Base class for scene generators, preprocessors.", /*attrs*/, /*ctor*/ , .def("generate",&FileGenerator::pyGenerate,(python::arg("out")),"Generate scene, save to given file") .def("load",&FileGenerator::pyLoad,"Generate scene, save to temporary file and load immediately"); ); DECLARE_LOGGER; }; REGISTER_SERIALIZABLE(FileGenerator); trunk-1.07.0/core/ForceContainer.hpp000066400000000000000000000337541226405415500173240ustar00rootroot00000000000000// 2009 © Václav Šmilauer #pragma once #include #include #include #include #include // make sure that (void*)&vec[0]==(void*)&vec BOOST_STATIC_ASSERT(sizeof(Vector3r)==3*sizeof(Real)); #ifdef YADE_OPENMP #include /*! Container for Body External Variables (forces), typically forces and torques from interactions. * Values should be reset at every iteration by calling ForceContainer::reset(); * If you want to add your own force type, you need to: * * 1. Create storage vector * 2. Create accessor function * 3. Update the resize function * 4. Update the reset function * 5. update the sync function (for the multithreaded implementation) * * This class exists in two flavors: non-parallel and parallel. The parallel one stores * force increments separately for every thread and sums those when sync() is called. * The reason of this design is that the container is not truly random-access, but rather * is written to everywhere in one phase and read in the next one. Adding to force/torque * marks the container as dirty and sync() must be performed before reading the stored data. * Calling getForce/getTorque when the container is not synchronized throws an exception. * * It is intentional that sync() needs to be called exlicitly, since syncs are expensive and * the programmer should be aware of that. Sync is however performed only if the container * is dirty. Every full sync increments the syncCount variable, that should ideally equal * the number of steps (one per step). * * The number of threads (omp_get_max_threads) may not change once ForceContainer is constructed. * * The non-parallel flavor has the same interface, but sync() is no-op and synchronization * is not enforced at all. */ //! This is the parallel flavor of ForceContainer class ForceContainer{ private: typedef std::vector vvector; std::vector _forceData; std::vector _torqueData; std::vector _moveData; std::vector _rotData; vvector _force, _torque, _move, _rot, _permForce, _permTorque; std::vector sizeOfThreads; size_t size; size_t permSize; bool syncedSizes; int nThreads; bool synced,moveRotUsed,permForceUsed; boost::mutex globalMutex; Vector3r _zero; inline void ensureSize(Body::id_t id, int threadN){ assert(nThreads>omp_get_thread_num()); if (threadN<0) resizePerm(min((size_t)1.5*(id+100),(size_t)(id+2000))); else if (sizeOfThreads[threadN]<=(size_t)id) resize(min((size_t)1.5*(id+100),(size_t)(id+2000)),threadN); } inline void ensureSynced(){ if(!synced) throw runtime_error("ForceContainer not thread-synchronized; call sync() first!"); } // dummy function to avoid template resolution failure friend class boost::serialization::access; template void serialize(ArchiveT & ar, unsigned int version){} public: ForceContainer(): size(0), permSize(0),syncedSizes(true),synced(true),moveRotUsed(false),permForceUsed(false),_zero(Vector3r::Zero()),syncCount(0),lastReset(0){ nThreads=omp_get_max_threads(); for(int i=0; i _force; std::vector _torque; std::vector _move; std::vector _rot; std::vector _permForce, _permTorque; size_t size; size_t permSize; inline void ensureSize(Body::id_t id){ if(size<=(size_t)id) resize(min((size_t)1.5*(id+100),(size_t)(id+2000)));} #if 0 const Vector3r& getForceUnsynced (Body::id_t id){ return getForce(id);} const Vector3r& getTorqueUnsynced(Body::id_t id){ return getForce(id);} #endif bool moveRotUsed, permForceUsed; // dummy function to avoid template resolution failure friend class boost::serialization::access; template void serialize(ArchiveT & ar, unsigned int version){} public: ForceContainer(): size(0), permSize(0), moveRotUsed(false), permForceUsed(false), syncCount(0), lastReset(0){} const Vector3r& getForce(Body::id_t id){ensureSize(id); return _force[id];} void addForce(Body::id_t id,const Vector3r& f){ensureSize(id); _force[id]+=f;} const Vector3r& getTorque(Body::id_t id){ensureSize(id); return _torque[id];} void addTorque(Body::id_t id,const Vector3r& t){ensureSize(id); _torque[id]+=t;} const Vector3r& getMove(Body::id_t id){ensureSize(id); return _move[id];} void addMove(Body::id_t id,const Vector3r& f){ensureSize(id); moveRotUsed=true; _move[id]+=f;} const Vector3r& getRot(Body::id_t id){ensureSize(id); return _rot[id];} void addRot(Body::id_t id,const Vector3r& f){ensureSize(id); moveRotUsed=true; _rot[id]+=f;} void addPermForce(Body::id_t id, const Vector3r& f){ ensureSize(id); _permForce[id]=f; permForceUsed=true;} void addPermTorque(Body::id_t id, const Vector3r& t){ ensureSize(id); _permTorque[id]=t; permForceUsed=true;} const Vector3r& getPermForce(Body::id_t id) { ensureSize(id); return _permForce[id]; } const Vector3r& getPermTorque(Body::id_t id) { ensureSize(id); return _permTorque[id]; } // single getters do the same as globally synced ones in the non-parallel flavor const Vector3r& getForceSingle (Body::id_t id){ ensureSize(id); if (permForceUsed) { return _force [id] + _permForce[id]; } else { return _force [id]; } } const Vector3r& getTorqueSingle(Body::id_t id){ ensureSize(id); if (permForceUsed) { return _torque[id] + _permTorque[id]; } else { return _torque[id]; } } const Vector3r& getMoveSingle (Body::id_t id){ ensureSize(id); return _move [id]; } const Vector3r& getRotSingle (Body::id_t id){ ensureSize(id); return _rot [id]; } //! Set all forces to zero void reset(long iter, bool resetAll=false){ memset(&_force [0],0,sizeof(Vector3r)*size); memset(&_torque[0],0,sizeof(Vector3r)*size); if(moveRotUsed){ memset(&_move [0],0,sizeof(Vector3r)*size); memset(&_rot [0],0,sizeof(Vector3r)*size); moveRotUsed=false; } if (resetAll){ memset(&_permForce [0], 0,sizeof(Vector3r)*size); memset(&_permTorque[0], 0,sizeof(Vector3r)*size); permForceUsed = false; } lastReset=iter; } void sync(){ if (permForceUsed) for(long id=0; id<(long)size; id++) {_force[id]+=_permForce[id]; _torque[id]+=_permTorque[id];} return;} unsigned long syncCount; // interaction in which the container was last reset; used by NewtonIntegrator to detect whether ForceResetter was not forgotten long lastReset; /*! Resize the container; this happens automatically, * but you may want to set the size beforehand to avoid resizes as the simulation grows. */ void resize(size_t newSize){ _force.resize(newSize,Vector3r::Zero()); _torque.resize(newSize,Vector3r::Zero()); _permForce.resize(newSize,Vector3r::Zero()); _permTorque.resize(newSize,Vector3r::Zero()); _move.resize(newSize,Vector3r::Zero()); _rot.resize(newSize,Vector3r::Zero()); size=newSize; } const int getNumAllocatedThreads() const {return 1;} const bool& getMoveRotUsed() const {return moveRotUsed;} const bool& getPermForceUsed() const {return permForceUsed;} }; #endif trunk-1.07.0/core/FrontEnd.cpp000066400000000000000000000011401226405415500161150ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include "FrontEnd.hpp" FrontEnd::FrontEnd() { } FrontEnd::~FrontEnd() { } trunk-1.07.0/core/FrontEnd.hpp000066400000000000000000000016151226405415500161310ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include "Omega.hpp" #include class FrontEnd : public Factorable { public : FrontEnd (); virtual ~FrontEnd (); virtual int run(int , char * []) { return -1;}; // called before actually invoking it virtual bool available(){return false;} REGISTER_CLASS_AND_BASE(FrontEnd,Factorable); }; REGISTER_FACTORABLE(FrontEnd); trunk-1.07.0/core/Functor.hpp000066400000000000000000000120201226405415500160220ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include class TimingDeltas; class Scene; class Functor: public Serializable { public: virtual vector getFunctorTypes(){throw;} shared_ptr timingDeltas; //! updated before every dispatch loop by the dispatcher; DO NOT ABUSE access to scene, except for getting global variables like scene->dt. Scene* scene; virtual ~Functor(); // defined in Dispatcher.cpp YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Functor,Serializable,"Function-like object that is called by Dispatcher, if types of arguments match those the Functor declares to accept.", ((string,label,,,"Textual label for this object; must be a valid python identifier, you can refer to it directly from python.")), /*ctor*/ #ifdef USE_TIMING_DELTAS timingDeltas=shared_ptr(new TimingDeltas); #endif , .def_readonly("timingDeltas",&Functor::timingDeltas,"Detailed information about timing inside the Dispatcher itself. Empty unless enabled in the source code and O.timingEnabled==True.") .add_property("bases",&Functor::getFunctorTypes,"Ordered list of types (as strings) this functor accepts.") ); }; REGISTER_SERIALIZABLE(Functor); template < class _DispatchType1, class _ReturnType, class _ArgumentTypes > class Functor1D: public Functor, public FunctorWrapper<_ReturnType, _ArgumentTypes> { public: typedef _DispatchType1 DispatchType1; typedef _ReturnType ReturnType; typedef _ArgumentTypes ArgumentTypes; #define FUNCTOR1D(type1) public: std::string get1DFunctorType1(void){return string(#type1);} int checkArgTypes(const shared_ptr& arg1){ return (bool)dynamic_pointer_cast(arg1)?1:0; } virtual std::string get1DFunctorType1(void){throw runtime_error("Class "+this->getClassName()+" did not use FUNCTOR1D to declare its argument type?"); } virtual vector getFunctorTypes(void){vector ret; ret.push_back(get1DFunctorType1()); return ret;}; // check that the object can be correctly cast to the derived class handled by the functor (will be used if ever utils.createInteraction can be called with list of functors only) // virtual bool checkArgTypes(const shared_ptr& arg1){ throw runtime_error("Class "+this->getClassName()+" did not use FUNCTOR1D to declare its argument type?"); } REGISTER_CLASS_AND_BASE(Functor1D,Functor FunctorWrapper); /* do not REGISTER_ATTRIBUTES here, since we are template; derived classes should call REGISTER_ATTRIBUTES(Functor,(their)(own)(attributes)), bypassing Functor1D */ }; template < class _DispatchType1, class _DispatchType2, class _ReturnType, class _ArgumentTypes > class Functor2D: public Functor, public FunctorWrapper<_ReturnType, _ArgumentTypes> { public: typedef _DispatchType1 DispatchType1; typedef _DispatchType2 DispatchType2; typedef _ReturnType ReturnType; typedef _ArgumentTypes ArgumentTypes; #define FUNCTOR2D(type1,type2) public: std::string get2DFunctorType1(void){return string(#type1);}; std::string get2DFunctorType2(void){return string(#type2);}; int checkArgTypes(const shared_ptr& arg1, const shared_ptr& arg2){ if(dynamic_pointer_cast(arg1)&&dynamic_pointer_cast(arg2)) return 1; if(dynamic_pointer_cast(arg2)&&dynamic_pointer_cast(arg1)) return -1; return 0; } virtual std::string get2DFunctorType1(void){throw logic_error("Class "+this->getClassName()+" did not use FUNCTOR2D to declare its argument types?");} virtual std::string get2DFunctorType2(void){throw logic_error("Class "+this->getClassName()+" did not use FUNCTOR2D to declare its argument types?");} virtual vector getFunctorTypes(){vector ret; ret.push_back(get2DFunctorType1()); ret.push_back(get2DFunctorType2()); return ret;}; // check that objects can be correctly cast to derived classes handled by the functor (see comment in Functor1D:: checkArgTypes) // virtual bool checkArgTypes(const shared_ptr&, const shared_ptr&){ throw logic_error("Class "+this->getClassName()+" did not use FUNCTOR2D to declare its argument types?"); } REGISTER_CLASS_AND_BASE(Functor2D,Functor FunctorWrapper); /* do not REGISTER_ATTRIBUTES here, since we are template; derived classes should call REGISTER_ATTRIBUTES(Functor,(their)(own)(attributes)), bypassing Functor2D */ }; trunk-1.07.0/core/GLConfig.hpp000066400000000000000000000030561226405415500160430ustar00rootroot00000000000000// code not yet for use (6/12/2009); if long here uselessly, delete. // // 2009 © Václav Šmilauer #include /*! Storage for general 3d view settings. Is saved along with simulation and passed to every call to render(...). Contains more or less what used to be inside OpenGLRenderer. */ class GLConfig: public Serializable{ Vector3r lightPos,bgColor; Body::id_t currSel; bool dof,id,bbox,geom,wire,intrGeom,intrPhys; int mask; bool scaleDisplacements,scaleRotations; Vector3r displacementScale; Real rotationScale; vector clipPlaneSe3; vector clipPlaneActive; // should be bool, but serialization doesn't handle vector // not saved Vector3r highlightEmission0; Vector3r highlightEmission1; // normalized saw signal with given periodicity, with values ∈ 〈0,1〉 */ Real normSaw(Real t, Real period){ Real xi=(t-period*((int)(t/period)))/period; /* normalized value, (0-1〉 */ return (xi<.5?2*xi:2-2*xi); } Real normSquare(Real t, Real period){ Real xi=(t-period*((int)(t/period)))/period; /* normalized value, (0-1〉 */ return (xi<.5?0:1); } //! wrap number to interval x0…x1 Real wrapCell(const Real x, const Real x0, const Real x1); //! wrap point to inside Scene's cell (identity if !Scene::isPeriodic) Vector3r wrapCellPt(const Vector3r& pt, Scene* rb); void drawPeriodicCell(Scene*); REGISTER_ATTRIBUTES(Serializable,(dof)(id)(bbox)(geom)(wire)(intrGeom)(intrPhys)(mask)(scaleDisplacements)(scaleRotations)(displacementScale)(rotationScale)(clipPlaneSe3)(clipPlaneActive)); }; trunk-1.07.0/core/GlobalEngine.hpp000066400000000000000000000014511226405415500167360ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include "Engine.hpp" class GlobalEngine: public Engine{ public : virtual ~GlobalEngine() {}; YADE_CLASS_BASE_DOC(GlobalEngine,Engine,"Engine that will generally affect the whole simulation (contrary to PartialEngine)."); }; REGISTER_SERIALIZABLE(GlobalEngine); trunk-1.07.0/core/IGeom.hpp000066400000000000000000000017441226405415500154150ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include #include class IGeom : public Serializable, public Indexable { YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(IGeom,Serializable,"Geometrical configuration of interaction", /*no attrs*/, /*ctor*/, /*py*/ YADE_PY_TOPINDEXABLE(IGeom) ); REGISTER_INDEX_COUNTER(IGeom); }; REGISTER_SERIALIZABLE(IGeom); trunk-1.07.0/core/IPhys.hpp000066400000000000000000000017701226405415500154500ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include #include class IPhys : public Serializable, public Indexable { YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(IPhys,Serializable,"Physical (material) properties of :yref:`interaction`.", /*attrs*/, /*ctor*/, /*py*/YADE_PY_TOPINDEXABLE(IPhys) ); REGISTER_INDEX_COUNTER(IPhys); }; REGISTER_SERIALIZABLE(IPhys); trunk-1.07.0/core/Interaction.cpp000066400000000000000000000024341226405415500166640ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include"Interaction.hpp" #include Interaction::Interaction(Body::id_t newId1,Body::id_t newId2): id1(newId1), id2(newId2), cellDist(Vector3i(0,0,0)){ reset(); } bool Interaction::isFresh(Scene* rb){ return iterMadeReal==rb->iter;} void Interaction::init(){ iterMadeReal=-1; functorCache.geomExists=true; isActive=true; } void Interaction::reset(){ geom=shared_ptr(); phys=shared_ptr(); init(); } void Interaction::swapOrder(){ if(geom || phys){ throw std::logic_error("Bodies in interaction cannot be swapped if they have geom or phys."); } std::swap(id1,id2); cellDist*=-1; } trunk-1.07.0/core/Interaction.hpp000066400000000000000000000077411226405415500166770ustar00rootroot00000000000000#pragma once #include // keep those two here, template instantiation & boost::python gets broken otherwise, e.g. https://bugs.launchpad.net/bugs/618766 #include #include #include class IGeomFunctor; class IPhysFunctor; class LawFunctor; class Scene; class Interaction: public Serializable{ private: friend class IPhysDispatcher; friend class InteractionLoop; public: bool isReal() const {return (bool)geom && (bool)phys;} //! If this interaction was just created in this step (for the constitutive law, to know that it is the first time there) bool isFresh(Scene* rb); bool isActive; Interaction(Body::id_t newId1,Body::id_t newId2); const Body::id_t& getId1() const {return id1;}; const Body::id_t& getId2() const {return id2;}; //! swaps order of bodies within the interaction void swapOrder(); bool operator<(const Interaction& other) const { return getId1() geom; shared_ptr phys; shared_ptr constLaw; } functorCache; //! Reset interaction to the intial state (keep only body ids) void reset(); //! common initialization called from both constructor and reset() void init(); YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Interaction,Serializable,"Interaction between pair of bodies.", ((Body::id_t,id1,0,Attr::readonly,":yref:`Id` of the first body in this interaction.")) ((Body::id_t,id2,0,Attr::readonly,":yref:`Id` of the second body in this interaction.")) ((long,iterMadeReal,-1,,"Step number at which the interaction was fully (in the sense of geom and phys) created. (Should be touched only by :yref:`IPhysDispatcher` and :yref:`InteractionLoop`, therefore they are made friends of Interaction")) ((long,iterLastSeen,-1,(Attr::noSave|Attr::hidden),"At which step this interaction was last detected by the collider. InteractionLoop will remove it if InteractionContainer::iterColliderLastRun==scene->iter, InteractionContainer::iterColliderLastRun is positive (some colliders manage interaction deletion themselves, such as :yref:`InsertionSortCollider`) and iterLastSeeniter.")) ((shared_ptr,geom,,,"Geometry part of the interaction.")) ((shared_ptr,phys,,,"Physical (material) part of the interaction.")) ((Vector3i,cellDist,Vector3i(0,0,0),,"Distance of bodies in cell size units, if using periodic boundary conditions; id2 is shifted by this number of cells from its :yref:`State::pos` coordinates for this interaction to exist. Assigned by the collider.\n\n.. warning::\n\t(internal) cellDist must survive Interaction::reset(), it is only initialized in ctor. Interaction that was cancelled by the constitutive law, was reset() and became only potential must have thepriod information if the geometric functor again makes it real. Good to know after few days of debugging that :-)")) ((int,linIx,-1,(Attr::noSave|Attr::hidden),"Index in the linear interaction container. For internal use by InteractionContainer only.")) ((long,iterBorn,-1,,"Step number at which the interaction was added to simulation.")) , /* ctor */ init(), /*py*/ .add_property("isReal",&Interaction::isReal,"True if this interaction has both geom and phys; False otherwise.") .def_readwrite("isActive",&Interaction::isActive,"True if this interaction is active. Otherwise the forces from this interaction will not be taken into account. True by default.") ); }; REGISTER_SERIALIZABLE(Interaction); trunk-1.07.0/core/InteractionContainer.cpp000066400000000000000000000141571226405415500205340ustar00rootroot00000000000000// 2008 © Sergei Dorofeenko // 2009,2010 © Václav Šmilauer #include "InteractionContainer.hpp" #include "Scene.hpp" #ifdef YADE_OPENMP #include #endif CREATE_LOGGER(InteractionContainer); // begin internal functions bool InteractionContainer::insert(const shared_ptr& i){ assert(bodies); boost::mutex::scoped_lock lock(drawloopmutex); Body::id_t id1=i->getId1(); Body::id_t id2=i->getId2(); if (id1>id2) swap(id1,id2); assert((Body::id_t)bodies->size()>id1); // the bodies must exist already assert((Body::id_t)bodies->size()>id2); const shared_ptr& b1=(*bodies)[id1]; const shared_ptr& b2=(*bodies)[id2]; if(!b1->intrs.insert(Body::MapId2IntrT::value_type(id2,i)).second) return false; // already exists if(!b2->intrs.insert(Body::MapId2IntrT::value_type(id1,i)).second) return false; linIntrs.resize(++currSize); // currSize updated linIntrs[currSize-1]=i; // assign last element i->linIx=currSize-1; // store the index back-reference in the interaction (so that it knows how to erase/move itself) const shared_ptr& scene=Omega::instance().getScene(); i->iterBorn=scene->iter; return true; } void InteractionContainer::clear(){ assert(bodies); boost::mutex::scoped_lock lock(drawloopmutex); FOREACH(const shared_ptr& b, *bodies) { if (b) b->intrs.clear(); // delete interactions from bodies } linIntrs.clear(); // clear the linear container pendingErase.clear(); currSize=0; dirty=true; } bool InteractionContainer::erase(Body::id_t id1,Body::id_t id2, int linPos){ assert(bodies); boost::mutex::scoped_lock lock(drawloopmutex); if (id1>id2) swap(id1,id2); if(id2>=(Body::id_t)bodies->size()) return false; // no such interaction const shared_ptr& b1((*bodies)[id1]); const shared_ptr& b2((*bodies)[id2]); int linIx=-1; if(!b1) linIx=linPos; else { Body::MapId2IntrT::iterator I(b1->intrs.find(id2)); if(I==b1->intrs.end()) linIx=linPos; else { linIx=I->second->linIx; assert(linIx==linPos); //erase from body, we also erase from linIntrs below b1->intrs.erase(I); if (b2) { Body::MapId2IntrT::iterator I2(b2->intrs.find(id1)); if (not(I2==b2->intrs.end())) { b2->intrs.erase(I2); } } } } if(linIx<0) { LOG_ERROR("InteractionContainer::erase: attempt to delete interaction with a deleted body (the definition of linPos in the call to erase() should fix the problem) for ##"+lexical_cast(id1)+"+"+lexical_cast(id2)); return false;} // iid is not the last element; we have to move last one to its place if (linIx<(int)currSize-1) { linIntrs[linIx]=linIntrs[currSize-1]; linIntrs[linIx]->linIx=linIx; // update the back-reference inside the interaction } // in either case, last element can be removed now linIntrs.resize(--currSize); // currSize updated return true; } const shared_ptr& InteractionContainer::find(Body::id_t id1,Body::id_t id2){ assert(bodies); if (id1>id2) swap(id1,id2); // those checks could be perhaps asserts, but pyInteractionContainer has no access to the body container... if(id2>=(Body::id_t)bodies->size()){ empty=shared_ptr(); return empty; } const shared_ptr& b1((*bodies)[id1]); if(!b1) { empty=shared_ptr(); return empty; } Body::MapId2IntrT::iterator I(b1->intrs.find(id2)); if (I!=b1->intrs.end()) return I->second; else { empty=shared_ptr(); return empty; } } // end internal functions // the rest uses internal functions to access data structures, and does not have to be modified if they change bool InteractionContainer::insert(Body::id_t id1,Body::id_t id2) { shared_ptr i(new Interaction(id1,id2) ); return insert(i); } void InteractionContainer::requestErase(Body::id_t id1, Body::id_t id2, bool force){ const shared_ptr I=find(id1,id2); if(!I) return; I->reset(); IdsForce v={id1,id2,force}; #ifdef YADE_OPENMP threadsPendingErase[omp_get_thread_num()].push_back(v); #else pendingErase.push_back(v); #endif } void InteractionContainer::requestErase(const shared_ptr& I){ I->reset(); } void InteractionContainer::requestErase(Interaction* I){ I->reset(); } void InteractionContainer::clearPendingErase(){ #ifdef YADE_OPENMP FOREACH(list& pendingErase, threadsPendingErase){ pendingErase.clear(); } #else pendingErase.clear(); #endif } int InteractionContainer::unconditionalErasePending(){ int ret=0; #ifdef YADE_OPENMP // shadow this->pendingErase by the local variable, to share code FOREACH(list& pendingErase, threadsPendingErase){ #endif if(!pendingErase.empty()){ FOREACH(const IdsForce& p, pendingErase){ ret++; erase(p.id1,p.id2); } pendingErase.clear(); } #ifdef YADE_OPENMP } #endif return ret; } void InteractionContainer::eraseNonReal(){ typedef pair Ids; std::list ids; FOREACH(const shared_ptr& i, *this){ if(!i->isReal()) ids.push_back(Ids(i->getId1(),i->getId2())); } FOREACH(const Ids& id, ids){ this->erase(id.first,id.second); } } // compare interaction based on their first id struct compPtrInteraction{ bool operator() (const shared_ptr& i1, const shared_ptr& i2) const { return (*i1)<(*i2); } }; void InteractionContainer::preSave(InteractionContainer&){ FOREACH(const shared_ptr& I, *this){ if(I->geom || I->phys) interaction.push_back(I); // since requestErase'd interactions have no interaction physics/geom, they are not saved } if(serializeSorted) std::sort(interaction.begin(),interaction.end(),compPtrInteraction()); } void InteractionContainer::postSave(InteractionContainer&){ interaction.clear(); } void InteractionContainer::preLoad(InteractionContainer&){ interaction.clear(); } void InteractionContainer::postLoad__calledFromScene(const shared_ptr& bb){ bodies=&bb->body; // update the internal pointer clear(); FOREACH(const shared_ptr& I, interaction){ Body::id_t id1=I->getId1(), id2=I->getId2(); if (!(*bodies)[id1] || !(*bodies)[id2]) { return; } else { insert(I); } } interaction.clear(); } trunk-1.07.0/core/InteractionContainer.hpp000066400000000000000000000207051226405415500205350ustar00rootroot00000000000000// 2004 © Olivier Galizzi // 2004 © Janek Kozicki // 2010 © Václav Šmilauer #pragma once #include #include #ifdef YADE_OPENMP #include #endif #include #include #include #ifndef FOREACH # define FOREACH BOOST_FOREACH #endif /* This InteractionContainer implementation has reference to the body container and stores interactions in 2 places: * Internally in a std::vector; that allows for const-time linear traversal. Each interaction internally holds back-reference to the position in this container in Interaction::linIx. * Inside Body::intrs (in the body with min(id1,id2)). Both must be kep in sync, which is handled by insert & erase methods. It was originally written by 2008 © Sergei Dorofeenko , later devirtualized and put here. Alternative implementations of InteractionContainer should implement the same API. Due to performance reasons, no base class with virtual methods defining such API programatically is defined (it could be possible to create class template for this, though). Future (?): * The shared_ptr might be duplicated in body id2 as well. That would allow to retrieve in a straigthforward manner all interactions with given body id, for instance. Performance implications are not clear. * the linear vector might be removed; in favor of linear traversal of bodies by their subdomains, then traversing the map in each body. If the previous point would come to realization, half of the interactions would have to be skipped explicitly in such a case. */ class InteractionContainer: public Serializable{ private: typedef vector > ContainerT; // linear array of container interactions ContainerT linIntrs; // pointer to body container, since each body holds (some) interactions // this must always point to scene->bodies->body const BodyContainer::ContainerT* bodies; // always in sync with intrs.size(), to avoid that function call size_t currSize; shared_ptr empty; // used only during serialization/deserialization vector > interaction; public: // flag for notifying the collider that persistent data should be invalidated bool dirty; // required by the class factory... :-| InteractionContainer(): currSize(0),dirty(false),serializeSorted(false),iterColliderLastRun(-1){ bodies=NULL; #ifdef YADE_OPENMP threadsPendingErase.resize(omp_get_max_threads()); #endif } void clear(); // iterators typedef ContainerT::iterator iterator; typedef ContainerT::const_iterator const_iterator; iterator begin(){return linIntrs.begin();} iterator end() {return linIntrs.end();} const_iterator begin() const {return linIntrs.begin();} const_iterator end() const {return linIntrs.end();} // insertion/deletion bool insert(Body::id_t id1,Body::id_t id2); bool insert(const shared_ptr& i); //3rd parameter is used to remove I from linIntrs (in conditionalyEraseNonReal()) when body b1 has been removed bool erase(Body::id_t id1,Body::id_t id2,int linPos=-1); const shared_ptr& find(Body::id_t id1,Body::id_t id2); // bool found(Body::id_t id1,Body::id_t id2); inline bool found(const Body::id_t& id1,const Body::id_t& id2){ assert(bodies); return (id1>id2)?(*bodies)[id2]->intrs.count(id1):(*bodies)[id1]->intrs.count(id2);} // index access shared_ptr& operator[](size_t id){return linIntrs[id];} const shared_ptr& operator[](size_t id) const { return linIntrs[id];} size_t size(){ return currSize; } // simulation API //! Erase all non-real (in term of Interaction::isReal()) interactions void eraseNonReal(); // mutual exclusion to avoid crashes in the rendering loop boost::mutex drawloopmutex; // sort interactions before serializations; useful if comparing XML files from different runs (false by default) bool serializeSorted; // iteration number when the collider was last run; set by the collider, if it wants interactions that were not encoutered in that step to be deleted by InteractionLoop (such as SpatialQuickSortCollider). Other colliders (such as InsertionSortCollider) set it it -1, which is the default long iterColliderLastRun; //! Ask for erasing the interaction given (from the constitutive law); this resets the interaction (to the initial=potential state) and collider should traverse pendingErase to decide whether to delete the interaction completely or keep it potential void requestErase(Body::id_t id1, Body::id_t id2, bool force=false); void requestErase(const shared_ptr& I); void requestErase(Interaction* I); /*! List of pairs of interactions that will be (maybe) erased by the collider; if force==true, they will be deleted unconditionally. If accessed from within a parallel section, pendingEraseMutex must be locked (this is done inside requestErase for you). If there is, at one point, a multi-threaded collider, pendingEraseMutex should be moved to the public part and used from there as well. */ struct IdsForce{ Body::id_t id1; Body::id_t id2; bool force; }; #ifdef YADE_OPENMP vector > threadsPendingErase; #endif list pendingErase; /*! Erase all pending interactions unconditionally. This should be called only in rare cases that collider is not used but still interactions should be erased. Otherwise collider should decide on a case-by-case basis, which interaction to erase for good and which to keep in the potential state (without geom and phys). This function doesn't lock pendingEraseMutex, as it is (supposedly) called from no-parallel sections only once per iteration */ int unconditionalErasePending(); /*! Clear the list of interaction pending erase: all interactions queued for considering erasing them will be dropped; useful for colliders that handle that by themselves, without needing the hint; with openMP, it would not be enough to call pendingErase->clear(), this helper function does it for all threads. Use this only if you understand this explanation. */ void clearPendingErase(); /*! Traverse all pending interactions and erase them if the (T*)->shouldBeErased(id1,id2) return true and keep it if it return false; finally, pendingErase will be clear()'ed. Class using this interface (which is presumably a collider) must define the bool shouldBeErased(Body::id_t, Body::id_t) const method which will be called for every interaction. Returns number of interactions, have they been erased or not (this is useful to check if there were some erased, after traversing those) */ template int erasePending(const T& t, Scene* rb){ int ret=0; #ifdef YADE_OPENMP // shadow the this->pendingErase by the local variable, to share the code FOREACH(list& pendingErase, threadsPendingErase){ #endif FOREACH(const IdsForce& p, pendingErase){ ret++; if(p.force || t.shouldBeErased(p.id1,p.id2,rb)) erase(p.id1,p.id2); } pendingErase.clear(); #ifdef YADE_OPENMP } #endif return ret; } /*! Traverse all interactions and erase them if they are not real and the (T*)->shouldBeErased(id1,id2) return true, or if body(id1) has been deleted Class using this interface (which is presumably a collider) must define the bool shouldBeErased(Body::id_t, Body::id_t) const */ template void conditionalyEraseNonReal(const T& t, Scene* rb){ // beware iterators here, since erase is invalidating them. We need to iterate carefully, and keep in mind that erasing one interaction is moving the last one to the current position. for (size_t linPos=0; linPos& i=linIntrs[linPos]; if(!i->isReal() && t.shouldBeErased(i->getId1(),i->getId2(),rb)) erase(i->getId1(),i->getId2(),linPos); else linPos++;} } // we must call Scene's ctor (and from Scene::postLoad), since we depend on the existing BodyContainer at that point. void postLoad__calledFromScene(const shared_ptr&); void preLoad(InteractionContainer&); void preSave(InteractionContainer&); void postSave(InteractionContainer&); REGISTER_ATTRIBUTES(Serializable,(interaction)(serializeSorted)(dirty)); REGISTER_CLASS_AND_BASE(InteractionContainer,Serializable); DECLARE_LOGGER; }; REGISTER_SERIALIZABLE(InteractionContainer); trunk-1.07.0/core/Material.cpp000066400000000000000000000020131226405415500161340ustar00rootroot00000000000000#include #include #include #include #ifndef FOREACH #define FOREACH BOOST_FOREACH #endif Material::~Material(){} const shared_ptr Material::byId(int id, Scene* w_){ Scene* w=w_?w_:Omega::instance().getScene().get(); assert(id>=0 && (size_t)idmaterials.size()); assert(w->materials[id]->id == id); return w->materials[id]; } const shared_ptr Material::byLabel(const std::string& label, Scene* w_){ Scene* w=w_?w_:Omega::instance().getScene().get(); FOREACH(const shared_ptr& m, w->materials){ if(m->label == label) return m; } throw std::runtime_error(("No material labeled `"+label+"'.").c_str()); } const int Material::byLabelIndex(const std::string& label, Scene* w_){ Scene* w=w_?w_:Omega::instance().getScene().get(); size_t iMax=w->materials.size(); for(size_t i=0; imaterials[i]->label==label) return i; } throw std::runtime_error(("No material labeled `"+label+"'.").c_str()); } trunk-1.07.0/core/Material.hpp000066400000000000000000000054361226405415500161550ustar00rootroot00000000000000// 2009 © Václav Šmilauer #pragma once #include #include #include #include #include class Scene; /*! Material properties associated with a body. Historical note: this used to be part of the PhysicalParameters class. The other data are now in the State class. */ class Material: public Serializable, public Indexable{ public: virtual ~Material(); //! Function to return empty default-initialized instance of State that // is supposed to go along with this Material. Don't override unless you need // something else than basic State. virtual shared_ptr newAssocState() const { return shared_ptr(new State); } /*! Function that returns true if given State instance is what this material expects. Base Material class has no requirements, but the check would normally look like this: return (bool)dynamic_cast state; */ virtual bool stateTypeOk(State*) const { return true; } static const shared_ptr byId(int id, Scene* scene=NULL); static const shared_ptr byId(int id, shared_ptr scene) {return byId(id,scene.get());} static const shared_ptr byLabel(const std::string& label, Scene* scene=NULL); static const shared_ptr byLabel(const std::string& label, shared_ptr scene) {return byLabel(label,scene.get());} // return index of material, given its label static const int byLabelIndex(const std::string& label, Scene* scene=NULL); YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Material,Serializable,"Material properties of a :yref:`body`.", ((int,id,((void)"not shared",-1),Attr::readonly,"Numeric id of this material; is non-negative only if this Material is shared (i.e. in O.materials), -1 otherwise. This value is set automatically when the material is inserted to the simulation via :yref:`O.materials.append`. (This id was necessary since before boost::serialization was used, shared pointers were not tracked properly; it might disappear in the future)")) ((string,label,,,"Textual identifier for this material; can be used for shared materials lookup in :yref:`MaterialContainer`.")) ((Real,density,1000,,"Density of the material [kg/m³]")), /* ctor */, /*py*/ .def("newAssocState",&Material::newAssocState,"Return new :yref:`State` instance, which is associated with this :yref:`Material`. Some materials have special requirement on :yref:`Body::state` type and calling this function when the body is created will ensure that they match. (This is done automatically if you use utils.sphere, … functions from python).") YADE_PY_TOPINDEXABLE(Material) ); REGISTER_INDEX_COUNTER(Material); }; REGISTER_SERIALIZABLE(Material); trunk-1.07.0/core/Omega.cpp000066400000000000000000000246121226405415500154370ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include"Omega.hpp" #include"Scene.hpp" #include"TimeStepper.hpp" #include"ThreadRunner.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_VERSION<103500 class RenderMutexLock: public boost::try_mutex::scoped_try_lock{ public: RenderMutexLock(): boost::try_mutex::scoped_try_lock(Omega::instance().renderMutex,true){/*cerr<<"Lock renderMutex"<& Omega::getDynlibsDescriptor(){return dynlibs;} const shared_ptr& Omega::getScene(){return scenes.at(currentSceneNb);} void Omega::resetCurrentScene(){ RenderMutexLock lock; scenes.at(currentSceneNb) = shared_ptr(new Scene);} void Omega::resetScene(){ resetCurrentScene(); }//RenderMutexLock lock; scene = shared_ptr(new Scene);} void Omega::resetAllScenes(){ RenderMutexLock lock; scenes.resize(1); scenes[0] = shared_ptr(new Scene); currentSceneNb=0; } int Omega::addScene(){ scenes.push_back(shared_ptr(new Scene)); return scenes.size()-1; } void Omega::switchToScene(int i) { if (i<0 || i>=int(scenes.size())) { LOG_ERROR("Scene "<(tmpFileCounter++); } void Omega::reset(){ stop(); init(); } void Omega::init(){ sceneFile=""; //resetScene(); resetAllScenes(); sceneAnother=shared_ptr(new Scene); timeInit(); createSimulationLoop(); } void Omega::timeInit(){ startupLocalTime=microsec_clock::local_time(); } void Omega::createSimulationLoop(){ simulationLoop=shared_ptr(new ThreadRunner(&simulationFlow_));} void Omega::stop(){ LOG_DEBUG(""); if (simulationLoop&&simulationLoop->looping())simulationLoop->stop(); if (simulationLoop) simulationLoop=shared_ptr(); } /* WARNING: even a single simulation step is run asynchronously; the call will return before the iteration is finished. */ void Omega::step(){ if (simulationLoop){ simulationLoop->spawnSingleAction(); } } void Omega::run(){ if(!simulationLoop){ LOG_ERROR("No Omega::simulationLoop? Creating one (please report bug)."); createSimulationLoop(); } if (simulationLoop && !simulationLoop->looping()){ simulationLoop->start(); } } void Omega::pause(){ if (simulationLoop && simulationLoop->looping()){ simulationLoop->stop(); } } bool Omega::isRunning(){ if(simulationLoop) return simulationLoop->looping(); else return false; } void Omega::buildDynlibDatabase(const vector& dynlibsList){ LOG_DEBUG("called with "< pythonables; FOREACH(string name, dynlibsList){ shared_ptr f; try { LOG_DEBUG("Factoring plugin "<(f); dynlibs[name].isFactorable = dynamic_pointer_cast(f); dynlibs[name].isSerializable = dynamic_pointer_cast(f); for(int i=0;igetBaseClassNumber();i++){ dynlibs[name].baseClasses.insert(f->getBaseClassName(i)); } if(dynlibs[name].isSerializable) pythonables.push_back(name); } catch (std::runtime_error& e){ /* FIXME: this catches all errors! Some of them are not harmful, however: * when a class is not factorable, it is OK to skip it; */ } } // handle Serializable specially //Serializable().pyRegisterClass(wrapperScope); /* python classes must be registered such that base classes come before derived ones; for now, just loop until we succeed; proper solution will be to build graphs of classes and traverse it from the top. It will be done once all classes are pythonable. */ for(int i=0; i<100 && pythonables.size()>0; i++){ if(getenv("YADE_DEBUG")) cerr< done; for(std::list::iterator I=pythonables.begin(); I!=pythonables.end(); ){ shared_ptr s=static_pointer_cast(ClassFactory::instance().createShared(*I)); try{ if(getenv("YADE_DEBUG")) cerr<<"{{"<<*I<<"}}"; s->pyRegisterClass(wrapperScope); std::list::iterator prev=I++; pythonables.erase(prev); } catch (...){ if(getenv("YADE_DEBUG")){ cerr<<"["<<*I<<"]"; PyErr_Print(); } boost::python::handle_exception(); I++; } } } map::iterator dli = dynlibs.begin(); map::iterator dliEnd = dynlibs.end(); for( ; dli!=dliEnd ; ++dli){ set::iterator bci = (*dli).second.baseClasses.begin(); set::iterator bciEnd = (*dli).second.baseClasses.end(); for( ; bci!=bciEnd ; ++bci){ string name = *bci; if (name=="Dispatcher1D" || name=="Dispatcher2D") (*dli).second.baseClasses.insert("Dispatcher"); else if (name=="Functor1D" || name=="Functor2D") (*dli).second.baseClasses.insert("Functor"); else if (name=="Serializable") (*dli).second.baseClasses.insert("Factorable"); else if (name!="Factorable" && name!="Indexable") { shared_ptr f = ClassFactory::instance().createShared(name); for(int i=0;igetBaseClassNumber();i++) dynlibs[name].baseClasses.insert(f->getBaseClassName(i)); } } } } bool Omega::isInheritingFrom(const string& className, const string& baseClassName){ return (dynlibs[className].baseClasses.find(baseClassName)!=dynlibs[className].baseClasses.end()); } bool Omega::isInheritingFrom_recursive(const string& className, const string& baseClassName){ if (dynlibs[className].baseClasses.find(baseClassName)!=dynlibs[className].baseClasses.end()) return true; FOREACH(const string& parent,dynlibs[className].baseClasses){ if(isInheritingFrom_recursive(parent,baseClassName)) return true; } return false; } void Omega::loadPlugins(vector pluginFiles){ FOREACH(const string& plugin, pluginFiles){ LOG_DEBUG("Loading plugin "<& plugins(ClassFactory::instance().pluginClasses); plugins.sort(); plugins.unique(); buildDynlibDatabase(vector(plugins.begin(),plugins.end())); } void Omega::loadSimulation(const string& f, bool quiet){ bool isMem=algorithm::starts_with(f,":memory:"); if(!isMem && !filesystem::exists(f)) throw runtime_error("Simulation file to load doesn't exist: "+f); if(isMem && memSavedSimulations.count(f)==0) throw runtime_error("Cannot load nonexistent memory-saved simulation "+f); if(!quiet) LOG_INFO("Loading file "+f); //shared_ptr scene = getScene(); shared_ptr& scene = scenes[currentSceneNb]; //shared_ptr& scene = getScene(); { stop(); // stop current simulation if running resetScene(); RenderMutexLock lock; if(isMem){ istringstream iss(memSavedSimulations[f]); yade::ObjectIO::load(iss,"scene",scene); } else { yade::ObjectIO::load(f,"scene",scene); } } if(scene->getClassName()!="Scene") throw logic_error("Wrong file format (scene is not a Scene!?) in "+f); sceneFile=f; timeInit(); if(!quiet) LOG_DEBUG("Simulation loaded"); } void Omega::saveSimulation(const string& f, bool quiet){ if(f.size()==0) throw runtime_error("f of file to save has zero length."); if(!quiet) LOG_INFO("Saving file " << f); //shared_ptr scene = getScene(); shared_ptr& scene = scenes[currentSceneNb]; //shared_ptr& scene = getScene(); if(algorithm::starts_with(f,":memory:")){ if(memSavedSimulations.count(f)>0 && !quiet) LOG_INFO("Overwriting in-memory saved simulation "<(oss,"scene",scene); memSavedSimulations[f]=oss.str(); } else { // handles automatically the XML/binary distinction as well as gz/bz2 compression yade::ObjectIO::save(f,"scene",scene); } sceneFile=f; } trunk-1.07.0/core/Omega.hpp000066400000000000000000000074251226405415500154470ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once // qt3 sucks #ifdef QT_MOC_CPP #undef slots #include #define slots slots #else #ifdef slots #undef slots #include #define slots #else #include #endif #endif #include #include #include #include #include #include #include #include #include #include #include "SimulationFlow.hpp" #ifndef FOREACH # define FOREACH BOOST_FOREACH #endif class Scene; class ThreadRunner; using namespace boost; using namespace boost::posix_time; using namespace std; struct DynlibDescriptor{ set baseClasses; bool isIndexable, isFactorable, isSerializable; }; class Omega: public Singleton{ shared_ptr simulationLoop; SimulationFlow simulationFlow_; map dynlibs; // FIXME : should store that in ClassFactory ? void buildDynlibDatabase(const vector& dynlibsList); // FIXME - maybe in ClassFactory ? vector > scenes; int currentSceneNb; shared_ptr sceneAnother; // used for temporarily running different simulation, in Omega().switchscene() ptime startupLocalTime; map memSavedSimulations; // to avoid accessing simulation when it is being loaded (should avoid crashes with the UI) boost::mutex loadingSimulationMutex; boost::mutex tmpFileCounterMutex; long tmpFileCounter; std::string tmpFileDir; public: // management, not generally useful void init(); void reset(); void timeInit(); void initTemps(); void cleanupTemps(); const map& getDynlibsDescriptor(); void loadPlugins(vector pluginFiles); bool isInheritingFrom(const string& className, const string& baseClassName ); bool isInheritingFrom_recursive(const string& className, const string& baseClassName ); void createSimulationLoop(); bool hasSimulationLoop(){return (bool)(simulationLoop);} string gdbCrashBatch; char** origArgv; int origArgc; // do not change by hand /* Mutex for: * 1. GLViewer::paintGL (deffered lock: if fails, no GL painting is done) * 2. other threads that wish to manipulate GL * 3. Omega when substantial changes to the scene are being made (bodies being deleted, simulation loaded etc) so that GL doesn't access those and crash */ boost::try_mutex renderMutex; void run(); void pause(); void step(); void stop(); // resets the simulationLoop bool isRunning(); std::string sceneFile; // updated at load/save automatically void loadSimulation(const string& name, bool quiet=false); void saveSimulation(const string& name, bool quiet=false); void resetScene(); void resetCurrentScene(); void resetAllScenes(); const shared_ptr& getScene(); int addScene(); void switchToScene(int i); //! Return unique temporary filename. May be deleted by the user; if not, will be deleted at shutdown. string tmpFilename(); Real getRealTime(); time_duration getRealTime_duration(); // configuration directory used for logging config and possibly other things std::string confDir; DECLARE_LOGGER; Omega(){ LOG_DEBUG("Constructing Omega."); } ~Omega(){} FRIEND_SINGLETON(Omega); friend class pyOmega; }; trunk-1.07.0/core/PartialEngine.cpp000066400000000000000000000010541226405415500171240ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include "PartialEngine.hpp" trunk-1.07.0/core/PartialEngine.hpp000066400000000000000000000020061226405415500171270ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include class PartialEngine: public Engine{ public: virtual ~PartialEngine() {}; YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(PartialEngine,Engine,"Engine affecting only particular bodies in the simulation, defined by *ids*.", ((std::vector,ids,,,":yref:`Ids` of bodies affected by this PartialEngine.")), /*deprec*/, /*init*/, /* ctor */, /* py */ ); }; REGISTER_SERIALIZABLE(PartialEngine); trunk-1.07.0/core/Scene.cpp000066400000000000000000000213151226405415500154410ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include"Scene.hpp" #include #include #include #include #include #include #include #include #include // POSIX-only #include #include #include namespace py=boost::python; YADE_PLUGIN((Scene)); CREATE_LOGGER(Scene); // should be elsewhere, probably bool TimingInfo::enabled=false; void Scene::fillDefaultTags(){ // fill default tags struct passwd* pw; char hostname[HOST_NAME_MAX]; gethostname(hostname,HOST_NAME_MAX); pw=getpwuid(geteuid()); if(!pw) throw runtime_error("getpwuid(geteuid()) failed!"); // a few default tags // real name: will have all non-ASCII characters replaced by ? since serialization doesn't handle that // the standard GECOS format is Real Name,,, - first comma and after will be discarded string gecos(pw->pw_gecos), gecos2; size_t p=gecos.find(","); if(p!=string::npos) boost::algorithm::erase_tail(gecos,gecos.size()-p); for(size_t i=0;ipw_name)+"@"+hostname+")"," ","~")); tags.push_back(string("isoTime="+boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()))); string id=boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time())+"p"+lexical_cast(getpid()); tags.push_back("id="+id); tags.push_back("d.id="+id); tags.push_back("id.d="+id); // tags.push_back("revision="+py::extract(py::import("yade.config").attr("revision"))());; } void Scene::postLoad(Scene&){ // update the interaction container; must be done in Scene ctor as well; important! interactions->postLoad__calledFromScene(bodies); // this might be removed at some point, since it is checked by regression tests now FOREACH(const shared_ptr& b, *bodies){ if(!b || !b->material || b->material->id<0) continue; // not a shared material if(b->material!=materials[b->material->id]) throw std::logic_error("Scene::postLoad: Internal inconsistency, shared materials not preserved when loaded; please report bug."); } } void Scene::moveToNextTimeStep(){ if(runInternalConsistencyChecks){ runInternalConsistencyChecks=false; checkStateTypes(); } // substepping or not, update engines from _nextEngines, if defined, at the beginning of step // subStep can be 0, which happens if simulations is saved in the middle of step (without substepping) // this assumes that prologue will not set _nextEngines, which is safe hopefully if(!_nextEngines.empty() && (subStep<0 || (subStep<=0 && !subStepping))){ engines=_nextEngines; _nextEngines.clear(); // hopefully this will not break in some margin cases (subStepping with setting _nextEngines and such) subStep=-1; } if(!subStepping && subStep<0){ /* set substep to 0 during the loop, so that engines/nextEngines handler know whether we are inside the loop currently */ subStep=0; // ** 1. ** prologue if(isPeriodic) cell->integrateAndUpdate(dt); //forces.reset(); // uncomment if ForceResetter is removed const bool TimingInfo_enabled=TimingInfo::enabled; // cache the value, so that when it is changed inside the step, the engine that was just running doesn't get bogus values TimingInfo::delta last=TimingInfo::getNow(); // actually does something only if TimingInfo::enabled, no need to put the condition here // ** 2. ** engines FOREACH(const shared_ptr& e, engines){ e->scene=this; if(e->dead || !e->isActivated()) continue; e->action(); if(TimingInfo_enabled) {TimingInfo::delta now=TimingInfo::getNow(); e->timingInfo.nsec+=now-last; e->timingInfo.nExec+=1; last=now;} } // ** 3. ** epilogue // Calculation speed if (iter==0) { //For the first time prevTime = boost::posix_time::microsec_clock::local_time(); } else { boost::posix_time::ptime timeNow = boost::posix_time::microsec_clock::local_time(); boost::posix_time::time_duration duration = timeNow - prevTime; long dif = duration.total_microseconds(); SpeedElements(iter%nSpeedIter,0)=1000000.0 / dif; speed = SpeedElements.mean(); prevTime = timeNow; } iter++; time+=dt; subStep=-1; } else { /* IMPORTANT: take care to copy EXACTLY the same sequence as is in the block above !! */ if(TimingInfo::enabled){ TimingInfo::enabled=false; LOG_INFO("O.timingEnabled disabled, since O.subStepping is used."); } if(subStep<-1 || subStep>(int)engines.size()){ LOG_ERROR("Invalid value of Scene::subStep ("<=-1 && subs<=(int)engines.size()); // ** 1. ** prologue if(subs==-1){ if(isPeriodic) cell->integrateAndUpdate(dt); } // ** 2. ** engines else if(subs>=0 && subs<(int)engines.size()){ const shared_ptr& e(engines[subs]); e->scene=this; if(!e->dead && e->isActivated()) e->action(); } // ** 3. ** epilogue else if(subs==(int)engines.size()){ iter++; time+=dt; /* gives -1 along with the increment afterwards */ subStep=-2; } // (?!) else { /* never reached */ assert(false); } } subStep++; // if not substepping, this will make subStep=-2+1=-1, which is what we want } } shared_ptr Scene::engineByName(const string& s){ FOREACH(shared_ptr e, engines){ if(e->getClassName()==s) return e; } return shared_ptr(); } bool Scene::timeStepperPresent(){ int n=0; FOREACH(const shared_ptr&e, engines){ if(dynamic_cast(e.get())) n++; } if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast(n)+") TimeSteppers in the simulation?!").c_str()); return n>0; } bool Scene::timeStepperActive(){ int n=0; bool ret=false; FOREACH(const shared_ptr&e, engines){ TimeStepper* ts=dynamic_cast(e.get()); if(ts) { ret=ts->active; n++; } } if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast(n)+") TimeSteppers in the simulation?!").c_str()); return ret; } bool Scene::timeStepperActivate(bool a){ int n=0; FOREACH(const shared_ptr e, engines){ TimeStepper* ts=dynamic_cast(e.get()); if(ts) { ts->setActive(a); n++; } } if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast(n)+") TimeSteppers in the simulation?!").c_str()); return n>0; } void Scene::checkStateTypes(){ FOREACH(const shared_ptr& b, *bodies){ if(!b || !b->material) continue; if(b->material && !b->state) throw std::runtime_error("Body #"+lexical_cast(b->getId())+": has Body::material, but NULL Body::state."); if(!b->material->stateTypeOk(b->state.get())){ throw std::runtime_error("Body #"+lexical_cast(b->getId())+": Body::material type "+b->material->getClassName()+" doesn't correspond to Body::state type "+b->state->getClassName()+" (should be "+b->material->newAssocState()->getClassName()+" instead)."); } } } void Scene::updateBound(){ if(!bound) bound=shared_ptr(new Bound); const Real& inf=std::numeric_limits::infinity(); Vector3r mx(-inf,-inf,-inf); Vector3r mn(inf,inf,inf); FOREACH(const shared_ptr& b, *bodies){ if(!b) continue; if(b->bound){ for(int i=0; i<3; i++){ if(!isinf(b->bound->max[i])) mx[i]=max(mx[i],b->bound->max[i]); if(!isinf(b->bound->min[i])) mn[i]=min(mn[i],b->bound->min[i]); } } else { mx=mx.cwiseMax(b->state->pos); mn=mn.cwiseMin(b->state->pos); } } bound->min=mn; bound->max=mx; } trunk-1.07.0/core/Scene.hpp000066400000000000000000000160071226405415500154500ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include #include #include #include #include #include #include #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 255 #endif class Bound; #ifdef YADE_OPENGL class OpenGLRenderer; #endif class Scene: public Serializable{ public: //! Adds material to Scene::materials. It also sets id of the material accordingly and returns it. int addMaterial(shared_ptr m){ materials.push_back(m); m->id=(int)materials.size()-1; return m->id; } //! Checks that type of Body::state satisfies Material::stateTypeOk. Throws runtime_error if not. (Is called from BoundDispatcher the first time it runs) void checkStateTypes(); //! update our bound; used directly instead of a BoundFunctor, since we don't derive from Body anymore void updateBound(); // neither serialized, nor accessible from python (at least not directly) ForceContainer forces; // initialize tags (author, date, time) void fillDefaultTags(); // advance by one iteration by running all engines void moveToNextTimeStep(); /* Functions operating on TimeStepper; they all throw exception if there is more than 1 */ // return whether a TimeStepper is present bool timeStepperPresent(); // true if TimeStepper is present and active, false otherwise bool timeStepperActive(); // (de)activate TimeStepper; returns whether the operation was successful (i.e. whether a TimeStepper was found) bool timeStepperActivate(bool activate); static const int nSpeedIter = 10; //Number of iterations, which are taking into account for speed calculation Eigen::Matrix SpeedElements; //Array for saving speed-values for last "nSpeedIter"-iterations shared_ptr engineByName(const string& s); #ifdef YADE_OPENGL shared_ptr renderer; #endif void postLoad(Scene&); // bits for Scene::flags enum { LOCAL_COORDS=1, COMPRESSION_NEGATIVE=2 }; /* add powers of 2 as needed */ // convenience accessors bool usesLocalCoords() const { return flags & LOCAL_COORDS; } void setLocalCoords(bool d){ if(d) flags|=LOCAL_COORDS; else flags&=~(LOCAL_COORDS); } bool compressionNegative() const { return flags & COMPRESSION_NEGATIVE; } void setCompressionNegative(bool d){ if(d) flags|=COMPRESSION_NEGATIVE; else flags&=~(COMPRESSION_NEGATIVE); } boost::posix_time::ptime prevTime; //Time value on the previous step YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Scene,Serializable,"Object comprising the whole simulation.", ((Real,dt,1e-8,,"Current timestep for integration.")) ((long,iter,0,Attr::readonly,"Current iteration (computational step) number")) ((bool,subStepping,false,,"Whether we currently advance by one engine in every step (rather than by single run through all engines).")) ((int,subStep,-1,Attr::readonly,"Number of sub-step; not to be changed directly. -1 means to run loop prologue (cell integration), 0…n-1 runs respective engines (n is number of engines), n runs epilogue (increment step number and time.")) ((Real,time,0,Attr::readonly,"Simulation time (virtual time) [s]")) ((Real,speed,0,Attr::readonly,"Current calculation speed [iter/s]")) ((long,stopAtIter,0,,"Iteration after which to stop the simulation.")) ((Real,stopAtTime,0,,"Time after which to stop the simulation")) ((bool,isPeriodic,false,Attr::readonly,"Whether periodic boundary conditions are active.")) ((bool,trackEnergy,false,Attr::readonly,"Whether energies are being traced.")) ((bool,doSort,false,Attr::readonly,"Used, when new body is added to the scene.")) ((bool,runInternalConsistencyChecks,true,Attr::hidden,"Run internal consistency check, right before the very first simulation step.")) ((Body::id_t,selectedBody,-1,,"Id of body that is selected by the user")) ((int,flags,0,Attr::readonly,"Various flags of the scene; 1 (Scene::LOCAL_COORDS): use local coordinate system rather than global one for per-interaction quantities (set automatically from the functor).")) ((list,tags,,,"Arbitrary key=value associations (tags like mp3 tags: author, date, version, description etc.)")) ((vector >,engines,,Attr::hidden,"Engines sequence in the simulation.")) ((vector >,_nextEngines,,Attr::hidden,"Engines to be used from the next step on; is returned transparently by O.engines if in the middle of the loop (controlled by subStep>=0).")) // NOTE: bodies must come before interactions, since InteractionContainer is initialized with a reference to BodyContainer::body ((shared_ptr,bodies,new BodyContainer,Attr::hidden,"Bodies contained in the scene.")) ((shared_ptr,interactions,new InteractionContainer,Attr::hidden,"All interactions between bodies.")) ((shared_ptr,energy,new EnergyTracker,Attr::hidden,"Energy values, if energy tracking is enabled.")) ((vector >,materials,,Attr::hidden,"Container of shared materials. Add elements using Scene::addMaterial, not directly. Do NOT remove elements from here unless you know what you are doing!")) ((shared_ptr,bound,,Attr::hidden,"Bounding box of the scene (only used for rendering and initialized if needed).")) ((shared_ptr,cell,new Cell,Attr::hidden,"Information on periodicity; only should be used if Scene::isPeriodic.")) ((vector >,miscParams,,Attr::hidden,"Store for arbitrary Serializable objects; will set static parameters during deserialization (primarily for GLDraw functors which otherwise have no attribute access)")) ((vector >,dispParams,,Attr::hidden,"'hash maps' of display parameters (since yade::serialization had no support for maps, emulate it via vector of strings in format key=value)")) , /*ctor*/ fillDefaultTags(); interactions->postLoad__calledFromScene(bodies); SpeedElements.Zero(); , /* py */ .add_property("localCoords",&Scene::usesLocalCoords,"Whether local coordianate system is used on interactions (set by :yref:`IGeomFunctor`).") .add_property("compressionNegative",&Scene::usesLocalCoords,"Whether the convention is that compression has negative sign (set by :yref:`IGeomFunctor`).") ); DECLARE_LOGGER; }; REGISTER_SERIALIZABLE(Scene); trunk-1.07.0/core/Shape.cpp000066400000000000000000000000601226405415500154360ustar00rootroot00000000000000#include Shape::~Shape(){} trunk-1.07.0/core/Shape.hpp000066400000000000000000000025631226405415500154550ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include #define BV_FUNCTOR_CACHE class BoundFunctor; class Shape: public Serializable, public Indexable { public: ~Shape(); // vtable #ifdef BV_FUNCTOR_CACHE shared_ptr boundFunctor; #endif YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Shape,Serializable,"Geometry of a body", ((Vector3r,color,Vector3r(1,1,1),,"Color for rendering (normalized RGB).")) ((bool,wire,false,,"Whether this Shape is rendered using color surfaces, or only wireframe (can still be overridden by global config of the renderer).")) ((bool,highlight,false,,"Whether this Shape will be highlighted when rendered.")), /*ctor*/, /*py*/ YADE_PY_TOPINDEXABLE(Shape) ); REGISTER_INDEX_COUNTER(Shape); }; REGISTER_SERIALIZABLE(Shape); trunk-1.07.0/core/SimulationFlow.cpp000066400000000000000000000022061226405415500173560ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2006 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include #include "SimulationFlow.hpp" #include "Scene.hpp" #include "Omega.hpp" CREATE_LOGGER(SimulationFlow); void SimulationFlow::singleAction() { Scene* scene=Omega::instance().getScene().get(); if (!scene) throw logic_error("SimulationFlow::singleAction: no Scene object?!"); if(scene->subStepping) { LOG_INFO("Sub-stepping disabled when running simulation continuously."); scene->subStepping=false; } scene->moveToNextTimeStep(); if(scene->stopAtIter>0 && scene->iter==scene->stopAtIter) setTerminate(true); if(scene->stopAtTime>0 && scene->time==scene->stopAtTime) setTerminate(true); }; trunk-1.07.0/core/SimulationFlow.hpp000066400000000000000000000012721226405415500173650ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2006 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include "ThreadWorker.hpp" class SimulationFlow // FIXME ; bad name : public ThreadWorker { public: virtual void singleAction(); DECLARE_LOGGER; }; trunk-1.07.0/core/State.cpp000066400000000000000000000043531226405415500154670ustar00rootroot00000000000000// 2009 © Václav Šmilauer #include #include #include #ifndef FOREACH #define FOREACH BOOST_FOREACH #endif CREATE_LOGGER(State); void State::setDOFfromVector3r(Vector3r disp,Vector3r rot){ blockedDOFs=((disp[0]==1.0)?DOF_X :0)|((disp[1]==1.0)?DOF_Y :0)|((disp[2]==1.0)?DOF_Z :0)| ((rot [0]==1.0)?DOF_RX:0)|((rot [1]==1.0)?DOF_RY:0)|((rot [2]==1.0)?DOF_RZ:0); } std::string State::blockedDOFs_vec_get() const { std::string ret; #define _SET_DOF(DOF_ANY,ch) if((blockedDOFs & State::DOF_ANY)!=0) ret.push_back(ch); _SET_DOF(DOF_X,'x'); _SET_DOF(DOF_Y,'y'); _SET_DOF(DOF_Z,'z'); _SET_DOF(DOF_RX,'X'); _SET_DOF(DOF_RY,'Y'); _SET_DOF(DOF_RZ,'Z'); #undef _SET_DOF return ret; } #ifdef YADE_DEPREC_DOF_LIST // support deprecated syntax, later take std::string arg directly (more efficient) void State::blockedDOFs_vec_set(const python::object& dofs0){ python::extract dofStr(dofs0); python::extract > dofLst(dofs0); blockedDOFs=0; if(dofStr.check()){ string dofs(dofStr()); #else void State::blockedDOFs_vec_set(const std::string& dofs){ blockedDOFs=0; #endif FOREACH(char c, dofs){ #define _GET_DOF(DOF_ANY,ch) if(c==ch) { blockedDOFs|=State::DOF_ANY; continue; } _GET_DOF(DOF_X,'x'); _GET_DOF(DOF_Y,'y'); _GET_DOF(DOF_Z,'z'); _GET_DOF(DOF_RX,'X'); _GET_DOF(DOF_RY,'Y'); _GET_DOF(DOF_RZ,'Z'); #undef _GET_DOF throw std::invalid_argument("Invalid DOF specification `"+lexical_cast(c)+"' in '"+dofs+"', characters must be ∈{x,y,z,X,Y,Z}."); } #ifdef YADE_DEPREC_DOF_LIST } else if(dofLst.check()){ LOG_WARN("Specifying State.blockedDOFs as list ['x','y','rx','rz'] is deprecated, use string 'xyXZ' instead."); FOREACH(const std::string s, dofLst()){ #define _GET_DOF(DOF_ANY,str) if(s==str) { blockedDOFs|=State::DOF_ANY; continue; } _GET_DOF(DOF_X,"x"); _GET_DOF(DOF_Y,"y"); _GET_DOF(DOF_Z,"z"); _GET_DOF(DOF_RX,"rx"); _GET_DOF(DOF_RY,"ry"); _GET_DOF(DOF_RZ,"rz"); #undef _GET_DOF throw std::invalid_argument("Invalid DOF specification `"+s+"', must be ∈{x,y,z,rx,ry,rz}."); } } else { throw std::invalid_argument("Invalid type: State.blockedDOFs must be either list of strings or string."); } #endif } trunk-1.07.0/core/State.hpp000066400000000000000000000106371226405415500154760ustar00rootroot00000000000000// 2009 © Václav Šmilauer #pragma once #include #include #include // delete later and remove relevant code, to not support old State.blockedDOFs=['x','y','rz'] syntax anymore //#define YADE_DEPREC_DOF_LIST class State: public Serializable, public Indexable{ public: /// linear motion (references to inside se3) Vector3r& pos; /// rotational motion (reference to inside se3) Quaternionr& ori; //! mutex for updating the parameters from within the interaction loop (only used rarely) boost::mutex updateMutex; // bits for blockedDOFs enum {DOF_NONE=0,DOF_X=1,DOF_Y=2,DOF_Z=4,DOF_RX=8,DOF_RY=16,DOF_RZ=32}; //! shorthand for all DOFs blocked static const unsigned DOF_ALL=DOF_X|DOF_Y|DOF_Z|DOF_RX|DOF_RY|DOF_RZ; //! shorthand for all displacements blocked static const unsigned DOF_XYZ=DOF_X|DOF_Y|DOF_Z; //! shorthand for all rotations blocked static const unsigned DOF_RXRYRZ=DOF_RX|DOF_RY|DOF_RZ; //! Return DOF_* constant for given axis∈{0,1,2} and rotationalDOF∈{false(default),true}; e.g. axisDOF(0,true)==DOF_RX static unsigned axisDOF(int axis, bool rotationalDOF=false){return 1<<(axis+(rotationalDOF?3:0));} //! set DOFs according to two Vector3r arguments (blocked is when disp[i]==1.0 or rot[i]==1.0) void setDOFfromVector3r(Vector3r disp,Vector3r rot=Vector3r::Zero()); //! Getter of blockedDOFs for list of strings (e.g. DOF_X | DOR_RX | DOF_RZ → 'xXZ') std::string blockedDOFs_vec_get() const; //! Setter of blockedDOFs from string ('xXZ' → DOF_X | DOR_RX | DOF_RZ) #ifdef YADE_DEPREC_DOF_LIST void blockedDOFs_vec_set(const python::object&); #else void blockedDOFs_vec_set(const std::string& dofs); #endif //! Return displacement (current-reference position) Vector3r displ() const {return pos-refPos;} //! Return rotation (current-reference orientation, as Vector3r) Vector3r rot() const { Quaternionr relRot=refOri.conjugate()*ori; AngleAxisr aa(relRot); return aa.axis()*aa.angle(); } // python access functions: pos and ori are references to inside Se3r and cannot be pointed to directly Vector3r pos_get() const {return pos;} void pos_set(const Vector3r& p) {pos=p;} Quaternionr ori_get() const {return ori; } void ori_set(const Quaternionr& o){ori=o;} YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(State,Serializable,"State of a body (spatial configuration, internal variables).", ((Se3r,se3,Se3r(Vector3r::Zero(),Quaternionr::Identity()),,"Position and orientation as one object.")) ((Vector3r,vel,Vector3r::Zero(),,"Current linear velocity.")) ((Real,mass,0,,"Mass of this body")) ((Vector3r,angVel,Vector3r::Zero(),,"Current angular velocity")) ((Vector3r,angMom,Vector3r::Zero(),,"Current angular momentum")) ((Vector3r,inertia,Vector3r::Zero(),,"Inertia of associated body, in local coordinate system.")) ((Vector3r,refPos,Vector3r::Zero(),,"Reference position")) ((Quaternionr,refOri,Quaternionr::Identity(),,"Reference orientation")) ((unsigned,blockedDOFs,,,"[Will be overridden]")) ((bool,isDamped,true,,"Damping in :yref:`Newtonintegrator` can be deactivated for individual particles by setting this variable to FALSE. E.g. damping is inappropriate for particles in free flight under gravity but it might still be applicable to other particles in the same simulation.")) ((Real,densityScaling,1,,"|yupdate| see :yref:`GlobalStiffnessTimeStepper::targetDt`.")), /* additional initializers */ ((pos,se3.position)) ((ori,se3.orientation)), /* ctor */, /*py*/ YADE_PY_TOPINDEXABLE(State) .add_property("blockedDOFs",&State::blockedDOFs_vec_get,&State::blockedDOFs_vec_set,"Degress of freedom where linear/angular velocity will be always constant (equal to zero, or to an user-defined value), regardless of applied force/torque. String that may contain 'xyzXYZ' (translations and rotations).") // references must be set using wrapper funcs .add_property("pos",&State::pos_get,&State::pos_set,"Current position.") .add_property("ori",&State::ori_get,&State::ori_set,"Current orientation.") .def("displ",&State::displ,"Displacement from :yref:`reference position` (:yref:`pos` - :yref:`refPos`)") .def("rot",&State::rot,"Rotation from :yref:`reference orientation` (as rotation vector)") ); REGISTER_INDEX_COUNTER(State); DECLARE_LOGGER; }; REGISTER_SERIALIZABLE(State); trunk-1.07.0/core/ThreadRunner.cpp000066400000000000000000000060341226405415500170060ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2006 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include #include "ThreadRunner.hpp" #include "ThreadWorker.hpp" #include #include #include #include CREATE_LOGGER(ThreadRunner); void ThreadRunner::run() { // this is the body of execution of separate thread boost::mutex::scoped_lock lock(m_runmutex); try{ workerThrew=false; while(looping()) { call(); if(m_thread_worker->shouldTerminate()){ stop(); return; } } } catch (std::exception& e){ LOG_FATAL("Exception occured: "<setTerminate(false); m_thread_worker->callSingleAction(); } void ThreadRunner::pleaseTerminate() { stop(); m_thread_worker->setTerminate(true); } void ThreadRunner::spawnSingleAction() { boost::mutex::scoped_lock boollock(m_boolmutex); boost::mutex::scoped_lock calllock(m_callmutex); if(m_looping) return; boost::function0 call( boost::bind( &ThreadRunner::call , this ) ); boost::thread th(call); } void ThreadRunner::start() { boost::mutex::scoped_lock lock(m_boolmutex); if(m_looping) return; m_looping=true; boost::function0 run( boost::bind( &ThreadRunner::run , this ) ); boost::thread th(run); } void ThreadRunner::stop() { //std::cerr<<__FILE__<<":"<<__LINE__<<":"<<__FUNCTION__< /*! \brief ThreadRunner takes care of starting/stopping (executing) the ThreadWorker in the separate thread. It is achieved by either: - one execution of { ThreadWorker::singleAction(); } in separate thread - a loop { while(looping() ) ThreadWorker::singleAction(); } in separate thread Lifetime of ThreadRunner is guaranteed to be longer or equal to the lifetime of the separate thread of execution. The ThreadRunner owner must make sure that ThreadWorker has longer or equal lifetime than instance of ThreadRunner. Otherwise ThreadRunner will try to execute a dead object, which will lead to crash. Do not destroy immediately after call to singleAction(). Destructor can kick in before a separate thread starts, which will lead to a crash. User can explicitly ask the running thread to terminate execution. If the thread supports it, it will terminate. \note This code is reentrant. Simultaneous requests from other threads to start/stop or perform singleAction() are expected. So ThreadWorker(s) are running, while the user is interacting with the UI frontend (doesn't matter whether the UI is graphical, ncurses or any other). */ class ThreadWorker; class ThreadRunner { private : ThreadWorker* m_thread_worker; bool m_looping; boost::mutex m_boolmutex; boost::mutex m_callmutex; boost::mutex m_runmutex; void run(); void call(); DECLARE_LOGGER; public : ThreadRunner(ThreadWorker* c) : m_thread_worker(c), m_looping(false), workerThrew(false) {}; ~ThreadRunner(); /// perform ThreadWorker::singleAction() in separate thread void spawnSingleAction(); /// start doing singleAction() in a loop in separate thread void start(); /// stop the loop (changes the flag checked by looping() ) void stop(); /// kindly ask the separate thread to terminate void pleaseTerminate(); /// precondition for the loop started with start(). bool looping(); //! if true, workerException is copy of the exception thrown by the worker bool workerThrew; //! last exception thrown by the worker, if any std::exception workerException; }; trunk-1.07.0/core/ThreadWorker.cpp000066400000000000000000000032371226405415500170100ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2006 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include "ThreadWorker.hpp" void ThreadWorker::setTerminate(bool b) { boost::mutex::scoped_lock lock(m_mutex); m_should_terminate=b; }; bool ThreadWorker::shouldTerminate() { boost::mutex::scoped_lock lock(m_mutex); return m_should_terminate; }; void ThreadWorker::setProgress(float i) { boost::mutex::scoped_lock lock(m_mutex); m_progress=i; }; void ThreadWorker::setStatus(std::string s) { boost::mutex::scoped_lock lock(m_mutex); m_status=s; }; float ThreadWorker::progress() { boost::mutex::scoped_lock lock(m_mutex); return m_progress; }; std::string ThreadWorker::getStatus() { boost::mutex::scoped_lock lock(m_mutex); return m_status; }; void ThreadWorker::setReturnValue(boost::any a) { boost::mutex::scoped_lock lock(m_mutex); m_val = a; }; boost::any ThreadWorker::getReturnValue() { boost::mutex::scoped_lock lock(m_mutex); return m_val; }; bool ThreadWorker::done() { boost::mutex::scoped_lock lock(m_mutex); return m_done; }; void ThreadWorker::callSingleAction() { { boost::mutex::scoped_lock lock(m_mutex); m_done = false; } this->singleAction(); { boost::mutex::scoped_lock lock(m_mutex); m_done = true; } }; trunk-1.07.0/core/ThreadWorker.hpp000066400000000000000000000045541226405415500170200ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2006 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include class ThreadRunner; /*! \brief ThreadWorker contains information about tasks to be performed when the separate thread is executed. */ class ThreadWorker // perhaps simulation steps, or stage? as it is a single stage // of the simulation, that consists of several steps // Update: it is more general now. simulation stages perhaps will be derived from this class { private: /// You should check out ThreadRunner, it is used for execution control of this class friend class ThreadRunner; bool m_should_terminate; bool m_done; boost::mutex m_mutex; boost::any m_val; float m_progress; std::string m_status; void callSingleAction(); protected: void setTerminate(bool); /// singleAction() can check whether someone asked for termination, and terminate if/when possible bool shouldTerminate(); /// if something must be returned, set the result using this method void setReturnValue(boost::any); /// if you feel monitored for progress, you can set it here: a value between 0.0 and 1.0 void setProgress(float); /// if you feel being monitored for what currently is done, set the message here void setStatus(std::string); /// derived classes must define this method, that's what is executed in separate thread virtual void singleAction() = 0; public: ThreadWorker() : m_should_terminate(false), m_done(false), m_progress(0) {}; virtual ~ThreadWorker() {}; /// Returns a value between 0.0 and 1.0. Useful for updating a progress bar. float progress(); // get_progress ? (pick a naming convention, efngh) /// You can display a message in GUI about what is the current work status std::string getStatus(); /// Check whether execution is finished, bool done(); /// then get the result. boost::any getReturnValue(); }; trunk-1.07.0/core/TimeStepper.cpp000066400000000000000000000017541226405415500166520ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * Copyright (C) 2004 by Janek Kozicki * * cosurgi@berlios.de * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #include #include #include bool TimeStepper::isActivated() { return (active && (scene->iter % timeStepUpdateInterval == 0)); } void TimeStepper::setActive(bool a, int nb) { active = a; if (nb>0) timeStepUpdateInterval = (unsigned int)nb; } trunk-1.07.0/core/TimeStepper.hpp000066400000000000000000000021551226405415500166530ustar00rootroot00000000000000/************************************************************************* * Copyright (C) 2004 by Olivier Galizzi * * olivier.galizzi@imag.fr * * * * This program is free software; it is licensed under the terms of the * * GNU General Public License v2 or later. See file LICENSE for details. * *************************************************************************/ #pragma once #include #include #include "Interaction.hpp" #include "GlobalEngine.hpp" class Body; class TimeStepper: public GlobalEngine{ public: virtual void computeTimeStep(Scene* ) { throw; }; virtual bool isActivated(); virtual void action() { computeTimeStep(scene);} ; void setActive(bool a, int nb=-1); YADE_CLASS_BASE_DOC_ATTRS( TimeStepper,GlobalEngine,"Engine defining time-step (fundamental class)", ((bool,active,true,,"is the engine active?")) ((unsigned int,timeStepUpdateInterval,1,,"dt update interval"))); }; REGISTER_SERIALIZABLE(TimeStepper); trunk-1.07.0/core/Timing.hpp000066400000000000000000000030221226405415500156330ustar00rootroot00000000000000// 2009 © Václav Šmilauer #pragma once #include #include struct TimingInfo{ typedef unsigned long long delta; long nExec; delta nsec; TimingInfo():nExec(0),nsec(0){} static delta getNow(bool evenIfDisabled=false) { if(!enabled && !evenIfDisabled) return 0L; #ifdef __APPLE__ std::cerr << "ERROR: Time profiling (TimingInfo) not implemented on Apples." << std::endl; return 0L; #else struct timespec ts; clock_gettime(CLOCK_MONOTONIC,&ts); return delta(1e9*ts.tv_sec+ts.tv_nsec); #endif } static bool enabled; }; /* Create TimingDeltas object, then every call to checkpoint() will add * (or use existing) TimingInfo to data. It increases its nExec by 1 * and nsec by time elapsed since construction or last checkpoint. */ class TimingDeltas{ TimingInfo::delta last; size_t i; public: vector data; vector labels; TimingDeltas():i(0){} void start(){if(!TimingInfo::enabled)return; i=0;last=TimingInfo::getNow();} void checkpoint(const string& label){ if(!TimingInfo::enabled) return; if(data.size()<=i) { data.resize(i+1); labels.resize(i+1); labels[i]=label;} TimingInfo::delta now=TimingInfo::getNow(); data[i].nExec+=1; data[i].nsec+=now-last; last=now; i++; } void reset(){ data.clear(); labels.clear(); } // python access boost::python::list pyData(){ boost::python::list ret; for(size_t i=0; i // make core classes known to the class factory #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // these two are not accessible from python directly (though they should be in the future, perhaps) #if BOOST_VERSION>=104200 BOOST_CLASS_EXPORT_IMPLEMENT(BodyContainer); BOOST_CLASS_EXPORT_IMPLEMENT(InteractionContainer); #else BOOST_CLASS_EXPORT(BodyContainer); BOOST_CLASS_EXPORT(InteractionContainer); #endif YADE_PLUGIN((Body)(Bound)(Cell)(Dispatcher)(EnergyTracker)(Engine)(FileGenerator)(Functor)(GlobalEngine)(Interaction)(IGeom)(IPhys)(Material)(PartialEngine)(Shape)(State)(TimeStepper)); EnergyTracker::~EnergyTracker(){} // vtable //BOOST_CLASS_EXPORT(OpenMPArrayAccumulator); //BOOST_CLASS_EXPORT(OpenMPAccumulator); trunk-1.07.0/core/main/000077500000000000000000000000001226405415500146225ustar00rootroot00000000000000trunk-1.07.0/core/main/main.py.in000077500000000000000000000301211226405415500165250ustar00rootroot00000000000000#!${pyExecutable} # encoding: utf-8 # syntax:python import sys,os,os.path,time try: import _io except ImportError: import io # Add search path for yade Python-modules # It allows to use both Yade-versions (packaged and self-compiled one). # See LP:1254708 for more details # https://bugs.launchpad.net/yade/+bug/1254708 sys.path.insert(1,'${runtimePREFIX}/${LIBRARY_OUTPUT_PATH}/yade${SUFFIX}/py') # get yade path (allow YADE_PREFIX to override) prefix,suffix='${runtimePREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'],'${SUFFIX}' # duplicate some items from yade.config here, so that we can increase verbosity when the c++ part is booting features,version,debugbuild='${features}'.split(' '),'${realVersion}',' ${debugbuild}' libPATH='${LIBRARY_OUTPUT_PATH}' if (libPATH[1:] == '{LIBRARY_OUTPUT_PATH}'): libPATH='lib' ## find available builds libDir=prefix+'/'+libPATH+'/yade'+suffix if not (os.path.exists(libDir+'/py/yade/__init__.py')): raise RuntimeError('Libraries are not found! ('+libDir+'/py/yade/__init__.py, /py/yade/__init__.py)') # handle command-line options first try: import argparse except ImportError: # argparse not present, print error message raise RuntimeError("\n\nPlease install 'python-argparse' package.\n") prog = os.path.basename(sys.argv[0]) par=argparse.ArgumentParser(usage='%s [options] [ simulation.xml[.bz2] | script.py [script options]]'%prog, prog=prog,description="Yade: open-source platform for dynamic compuations. It\ is an extensible open-source framework for discrete numerical models, focused\ on Discrete Element Method. The computation parts are written in c++ using\ flexible object model, allowing independent implementation of new algorithms\ and interfaces. Python is used for rapid and concise scene construction, \ simulation control, postprocessing and debugging.\ Available features: %s.\ Homepage http://www.yade-dem.org, code hosted at http://www.launchpad.net/yade."%features ) par.add_argument('-v','--version',help='Print version and exit.',dest='version',action='store_true') par.add_argument('-j','--threads',help='Number of OpenMP threads to run; defaults to 1. Equivalent to setting OMP_NUM_THREADS environment variable.',dest='threads',type=int) par.add_argument('--cores',help='Set number of OpenMP threads (as \-\-threads) and in addition set affinity of threads to the cores given.',dest='cores',type=str) par.add_argument('--update',help='Update deprecated class names in given script(s) using text search & replace. Changed files will be backed up with ~ suffix. Exit when done without running any simulation.',dest='updateScripts',nargs='+') par.add_argument('--nice',help='Increase nice level (i.e. decrease priority) by given number.',dest='nice',type=int) par.add_argument('-x',help='Exit when the script finishes',dest='exitAfter',action='store_true') par.add_argument('-n',help="Run without graphical interface (equivalent to unsetting the DISPLAY environment variable)",dest='nogui',action='store_true') par.add_argument('--test',help="Run regression test suite and exit; the exists status is 0 if all tests pass, 1 if a test fails and 2 for an unspecified exception.",dest="test",action='store_true') par.add_argument('--checks',help='Run a series of user-defined check tests as described in /yade/scripts/checks-and-tests/checks/README',dest='checks',action='store_true') par.add_argument('--performance',help='Starts a test to measure the productivity',dest='performance',action='store_true') par.add_argument('script',nargs='?',default='',type=str,help=argparse.SUPPRESS) par.add_argument('args',nargs=argparse.REMAINDER,help=argparse.SUPPRESS) # see argparse doc, par.disable_interspersed_args() from optargs module par.add_argument('-l',help='import libraries at startup before importing yade libs. May be used when the ordering of imports matter (see e.g. https://bugs.launchpad.net/yade/+bug/1183402/comments/3). The option can be use multiple times, as in "yade -llib1 -llib2"',default=None,action='append',dest='impLibraries',type=str) opts=par.parse_args() args = opts.args if opts.impLibraries: sys.path.append('.') for lib in opts.impLibraries: __import__(lib) if opts.version: print 'Yade version: %s%s'%(version,debugbuild) sys.exit(0) if opts.script: args.insert(0,opts.script) # for compatibility with userSession(), could be modified in the future ## remove later ## python2.5 relative module imports workaround v=sys.version_info if v[0]==2 and v[1]<=5: for submodule in ('yade','gts','yade/tests'): sys.path.append(os.path.join(libDir,'py',submodule)) sys.path.append(os.path.join(libDir,'py')) # run regression test suite and exit if opts.test: import yade.tests try: result=yade.tests.testAll() except: print 20*'*'+' UNEXPECTED EXCEPTION WHILE RUNNING TESTS '+20*'*' print 20*'*'+' '+str(sys.exc_info()[0]) print 20*'*'+" Please report bug at http://bugs.launchpad.net/yade providing the following traceback:" import traceback; traceback.print_exc() print 20*'*'+' Thank you '+20*'*' sys.exit(2) if result.wasSuccessful(): print "*** ALL TESTS PASSED ***" sys.exit(0) else: print 20*'*'+' SOME TESTS FAILED '+20*'*' sys.exit(1) if not 'openmp' in features and (opts.cores or (opts.threads and opts.threads>1)): print 'WARNING: compiled without OpenMP, -j/--threads/--cores have no effect.' # OpenMP env variables must be se before loading yade libs ("import yade" below) # changes have no effeect after libgomp initializes if opts.cores: if opts.threads: print 'WARNING: --threads ignored, since --cores specified.' try: cores=[int(i) for i in opts.cores.split(',')] except ValueError: raise ValueError('Invalid --cores specification %s, should be a comma-separated list of non-negative integers'%opts.cores) opts.nthreads=len(cores) os.environ['GOMP_CPU_AFFINITY']=' '.join([str(cores[0])]+[str(c) for c in cores]) os.environ['OMP_NUM_THREADS']=str(len(cores)) elif opts.threads: os.environ['OMP_NUM_THREADS']=str(opts.threads) else: os.environ['OMP_NUM_THREADS']='1' if __name__ == "__main__": # do not print this while importing yade in other python application sys.stderr.write('Welcome to Yade '+version+debugbuild+'\n') # initialization and c++ plugins import import yade # other parts we will need soon import yade.config import yade.wrapper import yade.system import yade.runtime # continue option processing if opts.updateScripts: yade.system.updateScripts(args) sys.exit(0) # modify sys.argv in-place so that it can be handled by userSession sys.argv=yade.runtime.argv=args yade.runtime.opts=opts from yade import utils, pack from yade.utils import * from yade.pack import * from math import * # Run the check tests listed in scripts/checks-and-tests/checks/checkList.py if opts.checks: checksPath=libDir+'/py/yade/tests/checks' execfile(checksPath+'/checkList.py') # Run performance check test if opts.performance: checksPath=libDir+'/py/yade/tests/checks/performance' execfile(checksPath+'/checkPerf.py') def userSession(qt4=False,qapp=None): # prepare nice namespace for users import yade.runtime import sys if __name__ != "__main__": # for importing as python module return # start non-blocking qt4 app here; need to ask on the mailing list on how to make it functional ## with ipython 0.11, start the even loop early (impossible with 0.10, which is thread-based) #if qt4 and yade.runtime.ipython_version==11: # import IPython # IPython.appstart_qt4(qapp) if len(sys.argv)>0: arg0=sys.argv[0] if qt4: yade.qt.Controller(); if sum(bool(arg0.endswith(ext)) for ext in ('.xml','.xml.bz2','.xml.gz','.yade','.yade.gz','.yade.bz2','.bin','.bin.gz','.bin.bz2'))>0: if len(sys.argv)>1: raise RuntimeError('Extra arguments to saved simulation to run: '+' '.join(sys.argv[1:])) sys.stderr.write("Running simulation "+arg0+'\n') if arg0.endswith('.py'): def runScript(script): sys.stderr.write("Running script "+arg0+'\n') try: execfile(script,globals()) except SystemExit: raise except: # all other exceptions import traceback traceback.print_exc() if yade.runtime.opts.exitAfter: sys.exit(1) if yade.runtime.opts.exitAfter: sys.exit(0) runScript(arg0) if yade.runtime.opts.exitAfter: sys.exit(0) # common ipython configuration banner='[[ ^L clears screen, ^U kills line. '+', '.join((['F12 controller','F11 3d view (use h-key for showing help)','F10 both','F9 generator'] if (qt4) else [])+['F8 plot'])+'. ]]' ipconfig=dict( # ipython options, see e.g. http://www.cv.nrao.edu/~rreid/casa/tips/ipy_user_conf.py prompt_in1='Yade [\#]: ', prompt_in2=' .\D.: ', prompt_out=" -> [\#]: ", separate_in='',separate_out='',separate_out2='', #execfile=[prefix+'/lib/yade'+suffix+'/py/yade/ipython.py'], readline_parse_and_bind=[ 'tab: complete', # only with the gui; the escape codes might not work on non-linux terminals. ] +(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": "\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if (qt4) else []) #F12,F11,F10,F9 +['"\e[19~": "\C-Uimport yade.plot; yade.plot.plot();\C-M"', #F8 '"\e[A": history-search-backward', '"\e[B": history-search-forward', # incremental history forward/backward ] ) # show python console # handle both ipython 0.10 and 0.11 (incompatible API) if yade.runtime.ipython_version==10: from IPython.Shell import IPShellEmbed ipshell=IPShellEmbed(banner=banner,rc_override=ipconfig) ipshell() # save history -- a workaround for atexit handlers not being run (why?) # http://lists.ipython.scipy.org/pipermail/ipython-user/2008-September/005839.html import IPython.ipapi IPython.ipapi.get().IP.atexit_operations() elif yade.runtime.ipython_version==11: from IPython.frontend.terminal.embed import InteractiveShellEmbed # use the dict to set attributes for k in ipconfig: setattr(InteractiveShellEmbed,k,ipconfig[k]) InteractiveShellEmbed.banner1=banner+'\n' # called banner1 here, not banner anymore ipshell=InteractiveShellEmbed() ipshell() elif yade.runtime.ipython_version>=12: from IPython.frontend.terminal.embed import InteractiveShellEmbed from IPython.config.loader import Config cfg = Config() prompt_config = cfg.PromptManager prompt_config.in_template = ipconfig['prompt_in1'] prompt_config.in2_template = ipconfig['prompt_in2'] prompt_config.out_template = ipconfig['prompt_out'] import readline for k in ipconfig['readline_parse_and_bind']: readline.parse_and_bind(k) InteractiveShellEmbed.config=cfg InteractiveShellEmbed.banner1=banner+'\n' ipshell=InteractiveShellEmbed() ipshell() ## run userSession in a way corresponding to the features we use: gui=None yade.runtime.hasDisplay=False # this is the default initialized in the module, anyway if 'qt4' in features: gui='qt4' if opts.nogui: gui=None if gui: import Xlib.display # PyQt4's QApplication does exit(1) if it is unable to connect to the display # we however want to handle this gracefully, therefore # we test the connection with bare xlib first, which merely raises DisplayError try: # contrary to display.Display, _BaseDisplay does not check for extensions and that avoids spurious message "Xlib.protocol.request.QueryExtension" (bug?) Xlib.display._BaseDisplay(); yade.runtime.hasDisplay=True except: # usually Xlib.error.DisplayError, but there can be Xlib.error.XauthError etc as well # let's just pretend any exception means the display would not work gui=None print 'Warning: no X rendering available (see https://bbs.archlinux.org/viewtopic.php?id=13189)' # run remote access things, before actually starting the user session (not while imported by other python application) if __name__ == "__main__": from yade import remote yade.remote.useQThread=(gui=='qt4') yade.remote.runServers() if gui==None: userSession() elif gui=='qt4': ## we already tested that DISPLAY is available and can be opened ## otherwise Qt4 might crash at this point import PyQt4 from PyQt4 import QtGui from PyQt4.QtCore import * import yade.qt # this yade.qt is different from the one that comes with qt3 qapp=QtGui.QApplication(sys.argv) userSession(qt4=True,qapp=qapp) if __name__ == "__main__": O.exitNoBacktrace() trunk-1.07.0/core/main/pyboot.cpp000066400000000000000000000032251226405415500166440ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include #ifdef YADE_DEBUG void crashHandler(int sig){ switch(sig){ case SIGABRT: case SIGSEGV: signal(SIGSEGV,SIG_DFL); signal(SIGABRT,SIG_DFL); // prevent loops - default handlers cerr<<"SIGSEGV/SIGABRT handler called; gdb batch file is `"<(getpid())<<"\nset pagination off\nthread info\nthread apply all backtrace\ndetach\nquit\n"; gdbBatch.close(); signal(SIGABRT,crashHandler); signal(SIGSEGV,crashHandler); #endif vector ppp; for(int i=0; i(pp[i])); Omega::instance().loadPlugins(ppp); } void yadeFinalize(){ Omega::instance().cleanupTemps(); } BOOST_PYTHON_MODULE(boot){ python::scope().attr("initialize")=&yadeInitialize; python::scope().attr("finalize")=&yadeFinalize; //,"Finalize yade (only to be used internally).") } trunk-1.07.0/core/main/yade-batch.in000077500000000000000000000721001226405415500171560ustar00rootroot00000000000000#!${pyExecutable} # encoding: utf-8 # # vim: syntax=python # portions © 2008 Václav Šmilauer import os, sys, thread, time, logging, pipes, socket, xmlrpclib, re, shutil, random # Add search path for yade Python-modules # It allows to use both Yade-versions (packaged and self-compiled one). # See LP:1254708 for more details # https://bugs.launchpad.net/yade/+bug/1254708 sys.path.insert(1,'${runtimePREFIX}/${LIBRARY_OUTPUT_PATH}/yade${SUFFIX}/py') #socket.setdefaulttimeout(10) ## replaced by scons automatically prefix,suffix='${runtimePREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'],'${SUFFIX}' libPATH='${LIBRARY_OUTPUT_PATH}' if (libPATH[1:] == '{LIBRARY_OUTPUT_PATH}'): libPATH='lib' libDir=prefix+'/'+libPATH+'/yade'+suffix # run the batch always in non-debug mode (the spawned processes do honor debuggin flag, however) docDir=prefix+'/share/doc/yade'+suffix imageLogo = docDir+'/img/yade-logo-note.png' sys.path.append(os.path.join(libDir,'py')) executable=os.path.join(prefix,'bin','yade'+suffix) ## we just need this ... import yade, yade.utils, yade.config, yade.remote class JobInfo(): def __init__(self,num,id,command,hrefCommand,log,nCores,script,table,lineNo,affinity): self.started,self.finished,self.duration,self.durationSec,self.exitStatus=None,None,None,None,None # duration is a string, durationSec is a number self.command=command; self.hrefCommand=hrefCommand; self.num=num; self.log=log; self.id=id; self.nCores=nCores; self.cores=set(); self.infoSocket=None self.script=script; self.table=table; self.lineNo=lineNo; self.affinity=affinity self.hasXmlrpc=False self.status='PENDING' self.threadNum=None self.plotsLastUpdate,self.plotsFile=0.,yade.Omega().tmpFilename()+'.'+yade.remote.plotImgFormat def saveInfo(self): log=file(self.log,'a') log.write(""" =================== JOB SUMMARY ================ id : %s status : %d (%s) duration: %s command : %s started : %s finished: %s """%(self.id,self.exitStatus,'OK' if self.exitStatus==0 else 'FAILED',self.duration,self.command,time.asctime(time.localtime(self.started)),time.asctime(time.localtime(self.finished)))); log.close() #Show notification messasge if (pynotifyAvailable): statusString = '' if (self.exitStatus==0): statusString = 'Finished.' else: statusString = 'FAILED!' n = pynotify.Notification("Yade", "The job %d/%d is %s Duration %s"%(self.num+1, len(jobs), statusString, self.duration), imageLogo) n.show() def ensureXmlrpc(self): 'Attempt to establish xmlrpc connection to the job (if it does not exist yet). If the connection could not be established, as magic line was not found in the log, return False.' if self.hasXmlrpc: return True for l in open(self.log,'r'): if not l.startswith('XMLRPC info provider on'): continue url=l[:-1].split()[4] self.xmlrpcConn=xmlrpclib.ServerProxy(url,allow_none=True) self.hasXmlrpc=True return True if not self.hasXmlrpc: return False # catches the case where the magic line is not in the log yet def getInfoDict(self): if self.status!='RUNNING': return None if not self.ensureXmlrpc(): return None return self.xmlrpcConn.basicInfo() def updatePlots(self): global opts if self.status!='RUNNING': return if not self.ensureXmlrpc(): return if time.time()-self.plotsLastUpdate0: ret+='%2.2f%% done
step %d/%d'%(info['iter']*100./info['stopAtIter'],info['iter'],info['stopAtIter']) finishTime = str(time.ctime(time.time()+int((round(info['stopAtIter'] - info['iter'])/info['speed'])))) ret+='
%s finishes
'%finishTime else: ret+='step %d'%(info['iter']) if info['realtime']!=0: ret+='
speed %g/sec'%(info['speed']) ret+='
%d bodies
%d intrs'%(info['numBodies'],info['numIntrs']) ret+='' else: ret+=' (no info) ' ret+='%d%s'%(self.nCores,(' ('+','.join([str(c) for c in self.cores])+')') if self.cores and self.status=='RUNNING' else '') # TODO: make clickable so that it can be served full-size if os.path.exists(self.plotsFile): if 0: pass ## all this mess to embed SVG; clicking on it does not work, though ## question posted at http://www.abclinuxu.cz/poradna/linux/show/314041 ## see also http://www.w3schools.com/svg/svg_inhtml.asp and http://dutzend.blogspot.com/2010/04/svg-im-anklickbar-machen.html #img=''%(self.num,yade.remote.plotImgMimetype) #img='