about adding an new InsertionSortCollider

Asked by Haohui Xin

Hello, I add a new engine and new InsertionSortCollider. But I meet the problems as following, could anyone help me to explain the reason?

Traceback (most recent call last):
  File "./yade-2016-10-31.git-1b22b1a", line 129, in <module>
    import yade
  File "/home/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/__init__.py", line 65, in <module>
    import boot
ImportError: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/libyade.so: undefined symbol: _ZTV25HeatInsertionSortCollider

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Haohui Xin (tjxhhcu) said :
#1

The CMAKE information is as following:

-- Version is set to 2016-10-31.git-1b22b1a
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 and -save-temps
-- GCC Version >= 4.9. Adding -fstack-protector-strong
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- chrono
-- atomic
-- Boost_VERSION: 105800
-- Boost_LIB_VERSION: 1_58
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_python.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_iostreams.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_serialization.so/usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found Eigen3, version: 3.2.92
-- Disable vectorization
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GTS
-- Found GUI-Qt5-LIBS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- Could NOT find Cholmod (missing: CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY)
-- Could NOT find OpenBlas (missing: OPENBLAS_LIBRARY)
-- Could NOT find Metis (missing: METIS_INCLUDE_DIR METIS_LIBRARY)
-- Missing dependency for LINSOLV, disabled
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at your own risk!
Yade will be installed to /home/xhh/yade/install
-- Suffix is set to -2016-10-31.git-1b22b1a
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/xhh/yade/install
-- Use system gts version
-- VTK version >5 is found
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW GL2PS LBMFLOW
-- Disabled features: LINSOLV SPH LIQMIGRATION MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xhh/yade/build
xhh@xhh:~/yade/build$ make -j 8
[ 1%] Automatic moc for target _packPredicates
[ 2%] Automatic moc for target boot
[ 3%] Automatic moc for target _packSpheres
[ 3%] Automatic moc for target _packObb
[ 4%] Automatic moc for target _polyhedra_utils
[ 4%] Automatic moc for target _GLViewer
[ 4%] Automatic moc for target wrapper
[ 5%] Automatic moc for target yade
[ 5%] Built target boot_automoc
[ 5%] Built target _packPredicates_automoc
[ 5%] Built target _packSpheres_automoc
[ 5%] Built target _polyhedra_utils_automoc
[ 5%] Built target _packObb_automoc
[ 5%] Built target _GLViewer_automoc
[ 5%] Built target wrapper_automoc
[ 5%] Automatic moc for target WeightedAverage2d
[ 6%] Automatic moc for target _utils
[ 6%] Automatic moc for target _customConverters
[ 6%] Built target yade_automoc
[ 8%] Built target _packObb
[ 9%] Built target _polyhedra_utils
[ 9%] Built target WeightedAverage2d_automoc
[ 9%] Built target _utils_automoc
[ 9%] Built target _customConverters_automoc
[ 10%] Built target WeightedAverage2d
[ 14%] Built target _GLViewer
Scanning dependencies of target yade
[ 14%] Building CXX object CMakeFiles/yade.dir/pkg/common/HeatCollider.cpp.o
[ 15%] Building CXX object CMakeFiles/yade.dir/pkg/common/HeatInsertionSortCollider.cpp.o
[ 15%] Linking CXX shared library lib/x86_64-linux-gnu/libyade.so
[ 93%] Built target yade
[ 93%] Linking CXX shared library lib/x86_64-linux-gnu/boot.so
[ 93%] Linking CXX shared library lib/x86_64-linux-gnu/wrapper.so
[ 94%] Linking CXX shared library lib/x86_64-linux-gnu/_customConverters.so
[ 94%] Linking CXX shared library lib/x86_64-linux-gnu/_utils.so
[ 94%] Linking CXX shared library lib/x86_64-linux-gnu/_packPredicates.so
[ 94%] Linking CXX shared library lib/x86_64-linux-gnu/_packSpheres.so
[ 95%] Built target _packPredicates
[ 96%] Built target _packSpheres
[ 97%] Built target boot
[ 98%] Built target _customConverters
[ 99%] Built target wrapper
[100%] Built target _utils

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Hi,

Have you launched "make install" as well ? [*]

[*]https://yade-dem.org/doc/installation.html#compilation

Revision history for this message
Jan Stránský (honzik) said :
#5

Hello,
would it be possible for you to share the code of the new classes such that
we can test it?
Thanks
Jan

Dne 15. 11. 2016 1:53 dop. napsal uživatel "Haohui Xin" <
<email address hidden>>:

> Question #404070 on Yade changed:
> https://answers.launchpad.net/yade/+question/404070
>
> Haohui Xin gave more information on the question:
> ~/yade/build$ make install
> [ 0%] Automatic moc for target boot
> [ 0%] Built target boot_automoc
> [ 1%] Automatic moc for target yade
> [ 1%] Built target yade_automoc
> [ 1%] Automatic moc for target _GLViewer
> [ 1%] Built target _GLViewer_automoc
> [ 5%] Built target _GLViewer
> [ 84%] Built target yade
> [ 85%] Built target boot
> [ 86%] Automatic moc for target _polyhedra_utils
> [ 86%] Built target _polyhedra_utils_automoc
> [ 87%] Built target _polyhedra_utils
> [ 88%] Automatic moc for target _packSpheres
> [ 88%] Built target _packSpheres_automoc
> [ 89%] Built target _packSpheres
> [ 90%] Automatic moc for target _packPredicates
> [ 90%] Built target _packPredicates_automoc
> [ 91%] Built target _packPredicates
> [ 91%] Automatic moc for target wrapper
> [ 91%] Built target wrapper_automoc
> [ 93%] Built target wrapper
> [ 93%] Automatic moc for target _packObb
> [ 93%] Built target _packObb_automoc
> [ 95%] Built target _packObb
> [ 95%] Automatic moc for target WeightedAverage2d
> [ 95%] Built target WeightedAverage2d_automoc
> [ 96%] Built target WeightedAverage2d
> [ 97%] Automatic moc for target _utils
> [ 97%] Built target _utils_automoc
> [ 98%] Built target _utils
> [ 98%] Automatic moc for target _customConverters
> [ 98%] Built target _customConverters_automoc
> [100%] Built target _customConverters
> Install the project...
> -- Install configuration: ""
> -- Installing: /home/xhh/yade/install/bin/yade-2016-10-31.git-1b22b1a-
> batch
> -- Installing: /home/xhh/yade/install/bin/yade-2016-10-31.git-1b22b1a
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/config.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/__init__.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkLiquidMigration.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkWirePM.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkTestNormalInelasticity.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkTestTriax.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkGravity.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkList.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkWeight.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkCapillaryModels.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkClumpHopper.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkViscElPM.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkViscElEng.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/DEM-PFV-check.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkTestDummy.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkViscElPM2.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkPolyhedraCrush.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/checkSaveLoadClumps.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/data/WallStressesCheckTest
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/data/checkTestTriax.spheres
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/data/100spheres
> -- Up-to-date: /home/xhh/yade/install/share/doc/yade-2016-10-31.git-
> 1b22b1a/img/yade-logo-note.png
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/boot.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/boot.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/libyade.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/libyade.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/_GLViewer.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/qt/_GLViewer.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/SerializableEditor.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/Inspector.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/__init__.py
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/img_rc.py
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/ui_controller.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/_GLViewer.so
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/SerializableEditor.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/Inspector.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/__init__.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/img_rc.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/qt/ui_controller.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/export.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_extraDocs.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/linterpolation.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/bodiesHandling.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/system.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/ymport.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/runtime.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/polyhedra_utils.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/plot.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/gridpfacet.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/params.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/utils.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/deformableelementsutils.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/timing.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/remote.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/post2d.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/geom.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/pack.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/mtTkinter.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/pbc.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/engines.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/clump.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/wrapper.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/core.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/cohesive-chain.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/__init__.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/performance/performance.db
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/tests/checks/performance/checkPerf.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/msFEM2D.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/saveGauss.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/msFEM3D.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/msFEMup.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/simDEM.py
> -- Up-to-date: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/FEMxDEM/mpipool.py
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/WeightedAverage2d.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/WeightedAverage2d.so"
> to "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_utils.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_utils.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_polyhedra_utils.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_polyhedra_utils.so"
> to "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_packPredicates.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_packPredicates.so"
> to "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_packSpheres.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_packSpheres.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_packObb.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_packObb.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/wrapper.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/wrapper.so" to
> "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
> -- Installing: /home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a/py/yade/_customConverters.so
> -- Set runtime path of "/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/_customConverters.so"
> to "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-
> 31.git-1b22b1a:/home/xhh/yade/install/lib/x86_64-linux-gnu/
> yade-2016-10-31.git-1b22b1a/py:/home/xhh/yade/install/lib/
> x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/:/home/
> xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-
> 1b22b1a/py/yade/qt:/home/xhh/yade/install/lib/x86_64-linux-
> gnu/yade-2016-10-31.git-1b22b1a/py/gts"
>
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Haohui Xin (tjxhhcu) said :
#6

Hello, Thanks.

The latest error is as following. It could cmakem make and make install. But it appeared problems when I run it.

 Traceback (most recent call last):
  File "./yade-2016-10-31.git-1b22b1a", line 129, in <module>
    import yade
  File "/home/xhh/yade/install/lib/x86_64-linux-gnu/yade-2016-10-31.git-1b22b1a/py/yade/__init__.py", line 67, in <module>
    import system
RuntimeError: extension class wrapper for base class HeatCollider has not been created yet

Firstly, I define a new engine.

#pragma once

#include<core/GlobalEngine.hpp>

class HeatEngine: public Engine {
 public :
  virtual ~HeatEngine() {};
 YADE_CLASS_BASE_DOC(HeatEngine,Engine,"Engine that used for heat simulation.");
};
REGISTER_SERIALIZABLE(HeatEngine);

Second, I define a new collider

#pragma once
#include<core/Bound.hpp>
#include<core/Interaction.hpp>
#include<pkg/common/HeatEngine.hpp>
#include<pkg/common/Dispatching.hpp>

class HeatCollider: public HeatEngine {
 public:
  static int avoidSelfInteractionMask;
  /*! Probe the Bound on a bodies presense. Returns list of body ids with which there is potential overlap. */
  virtual vector<Body::id_t> probeBoundingVolume(const Bound&){throw;}

  static bool mayCollide(const Body*, const Body*);

  virtual void invalidatePersistentData(){}

  // ctor with functors for the integrated BoundDispatcher
  virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);

  int get_avoidSelfInteractionMask(){return avoidSelfInteractionMask;}
  void set_avoidSelfInteractionMask(const int &v){avoidSelfInteractionMask = v;}

 YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(HeatCollider,HeatEngine,"Abstract class for finding spatial collisions between bodies. \n\n.. admonition:: Special constructor\n\n\tDerived HeatColliders (unless they override ``pyHandleCustomCtorArgs``) can be given list of :yref:`BoundFunctors <BoundFunctor>` which is used to initialize the internal :yref:`boundDispatcher <HeatCollider.boundDispatcher>` instance.",
  ((shared_ptr<BoundDispatcher>,boundDispatcher,new BoundDispatcher,Attr::readonly,":yref:`BoundDispatcher` object that is used for creating :yref:`bounds <Body.bound>` on HeatCollider's request as necessary.")),
  /*ctor*/,
  .add_property("avoidSelfInteractionMask",&HeatCollider::get_avoidSelfInteractionMask,&HeatCollider::set_avoidSelfInteractionMask,"This mask is used to avoid the interactions inside a group of particles. To do so, the particles must have the same mask and this mask have to be compatible with this one.")
 );
 DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(HeatCollider);

#include<pkg/common/HeatCollider.hpp>

YADE_PLUGIN((HeatCollider));

int HeatCollider::avoidSelfInteractionMask = 0 ;

bool HeatCollider::mayCollide(const Body* b1, const Body* b2){
 return
  // might be called with deleted bodies, i.e. NULL pointers
  (b1!=NULL && b2!=NULL) &&
  // only collide if at least one particle is standalone or they belong to different clumps
  (b1->isStandalone() || b2->isStandalone() || b1->clumpId!=b2->clumpId
  #ifdef YADE_SPH
  // If SPH-mode enabled, we do not skip interactions between clump-members
  // to get the correct calculation of density b->rho
  || true
  #endif
  ) &&
   // do not collide clumps, since they are just containers, never interact
  !b1->isClump() && !b2->isClump() &&
  // masks must have at least 1 bit in common
  b1->maskCompatible(b2->groupMask) &&
  // avoid contact between particles having the same mask compatible with the avoidSelfInteractionMask.
   !( (b1->groupMask == b2->groupMask) && b1->maskCompatible(avoidSelfInteractionMask) )
 ;
}

void HeatCollider::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
 if(boost::python::len(t)==0) return; // nothing to do
 if(boost::python::len(t)!=1) throw invalid_argument(("HeatCollider optionally takes exactly one list of BoundFunctor's as non-keyword argument for constructor ("+boost::lexical_cast<string>(boost::python::len(t))+" non-keyword ards given instead)").c_str());
 typedef std::vector<shared_ptr<BoundFunctor> > vecBound;
 vecBound vb=boost::python::extract<vecBound>(t[0])();
 FOREACH(shared_ptr<BoundFunctor> bf, vb) this->boundDispatcher->add(bf);
 t=boost::python::tuple(); // empty the args
}

define an new sort methods

/*************************************************************************
* Copyright (C) 2008 by Sergei Dorofeenko *
* <email address hidden> *
* *
* 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 <pkg/common/HeatCollider.hpp>
#include <core/InteractionContainer.hpp>
#include <vector>

class HeatSpatialQuickSortCollider : public HeatCollider {
    protected:

 struct AABBBound {
     Vector3r min,max;
     int id;
 };

 class xBoundComparator {
     public:
       bool operator() (shared_ptr<AABBBound> b1, shared_ptr<AABBBound> b2)
       {
   return b1->min[0] < b2->min[0];
       }
 };

 vector<shared_ptr<AABBBound> > rank;

   public:
  virtual void action();
 YADE_CLASS_BASE_DOC(HeatSpatialQuickSortCollider,HeatCollider,"Collider using quicksort along axes at each step, using :yref:`Aabb` bounds. \n\n Its performance is lower than that of :yref:`InsertionSortCollider` (see `Colliders' performance <https://yade-dem.org/index.php/Colliders_performace>`_), but the algorithm is simple enought to make it good for checking other collider's correctness.");
};
REGISTER_SERIALIZABLE(HeatSpatialQuickSortCollider);

/*************************************************************************
* Copyright (C) 2008 by Sergei Dorofeenko *
* <email address hidden> *
* *
* 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 "HeatSpatialQuickSortCollider.hpp"
#include <core/Scene.hpp>
#include <core/BodyContainer.hpp>
#include <cmath>
#include <algorithm>

YADE_PLUGIN((HeatSpatialQuickSortCollider));

void HeatSpatialQuickSortCollider::action()
{
 // update bounds
 boundDispatcher->scene=scene; boundDispatcher->action();

 const shared_ptr<BodyContainer>& bodies = scene->bodies;

 // This collider traverses all interactions at every step, therefore all interactions
 // that were requested for erase might be erased here and will be recreated if necessary.
 scene->interactions->eraseNonReal();

 size_t nbElements=bodies->size();
 if (nbElements!=rank.size())
 {
  size_t n = rank.size();
  rank.resize(nbElements);
  for (; n<nbElements; ++n)
   rank[n] = shared_ptr<AABBBound>(new AABBBound);
 }

 Vector3r min,max;
 int i=0;
 FOREACH(const shared_ptr<Body>& b, *bodies){
  if(!b->bound) continue;
  min = b->bound->min;
  max = b->bound->max;
  rank[i]->id = b->getId();
  rank[i]->min = min;
  rank[i]->max = max;
  i++;
 }

 const shared_ptr<InteractionContainer>& interactions=scene->interactions;
 scene->interactions->iterColliderLastRun=scene->iter;

 sort(rank.begin(), rank.end(), xBoundComparator()); // sorting along X

 int id,id2; size_t j;
 shared_ptr<Interaction> interaction;
 for(int i=0,e=nbElements-1; i<e; ++i)
 {
  id = rank[i]->id;
  min = rank[i]->min;
  max = rank[i]->max;
  j=i;
  while(++j<nbElements)
  {
   if ( rank[j]->min[0] > max[0]) break;
   if ( rank[j]->min[1] < max[1]
   && rank[j]->max[1] > min[1]
   && rank[j]->min[2] < max[2]
   && rank[j]->max[2] > min[2])
   {
    id2=rank[j]->id;
    if ( (interaction = interactions->find(Body::id_t(id),Body::id_t(id2))) == 0)
    {
     interaction = shared_ptr<Interaction>(new Interaction(id,id2) );
     interactions->insert(interaction);
    }
    interaction->iterLastSeen=scene->iter;
   }
  }
 }
}

define an new loop

#pragma once
#include<pkg/common/HeatEngine.hpp>
#include <pkg/common/Callbacks.hpp>
#include <pkg/common/Dispatching.hpp>

#ifdef USE_TIMING_DELTAS
 #define TIMING_DELTAS_CHECKPOINT(cpt) timingDeltas->checkpoint(cpt)
 #define TIMING_DELTAS_START() timingDeltas->start()
#else
 #define TIMING_DELTAS_CHECKPOINT(cpt)
 #define TIMING_DELTAS_START()
#endif

class HeatInteractionLoop: public HeatEngine {
 bool alreadyWarnedNoCollider;
 using idPair = std::pair<Body::id_t, Body::id_t>;
 // store interactions that should be deleted after loop in action, not later
 #ifdef YADE_OPENMP
  std::vector<std::list<idPair> > eraseAfterLoopIds;
  void eraseAfterLoop(Body::id_t id1,Body::id_t id2){ eraseAfterLoopIds[omp_get_thread_num()].push_back(idPair(id1,id2)); }
 #else
  list<idPair> eraseAfterLoopIds;
  void eraseAfterLoop(Body::id_t id1,Body::id_t id2){ eraseAfterLoopIds.push_back(idPair(id1,id2)); }
 #endif
 public:
  virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);
  virtual void action();
  YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(HeatInteractionLoop,HeatEngine,"Unified dispatcher for handling interaction loop at every step, for parallel performance reasons.\n\n.. admonition:: Special constructor\n\n\tConstructs from 3 lists of :yref:`Ig2<IGeomFunctor>`, :yref:`Ip2<IPhysFunctor>`, :yref:`Law<LawFunctor>` functors respectively; they will be passed to interal dispatchers, which you might retrieve.",
   ((shared_ptr<IGeomDispatcher>,geomDispatcher,new IGeomDispatcher,Attr::readonly,":yref:`IGeomDispatcher` object that is used for dispatch."))
   ((shared_ptr<IPhysDispatcher>,physDispatcher,new IPhysDispatcher,Attr::readonly,":yref:`IPhysDispatcher` object used for dispatch."))
   ((shared_ptr<LawDispatcher>,lawDispatcher,new LawDispatcher,Attr::readonly,":yref:`LawDispatcher` object used for dispatch."))
   ((vector<shared_ptr<IntrCallback> >,callbacks,,,":yref:`Callbacks<IntrCallback>` which will be called for every :yref:`Interaction`, if activated."))
   ((bool, eraseIntsInLoop, false,,"Defines if the interaction loop should erase pending interactions, else the collider takes care of that alone (depends on what collider is used)."))
   ,
   /*ctor*/ alreadyWarnedNoCollider=false;
    #ifdef YADE_OPENMP
     eraseAfterLoopIds.resize(omp_get_max_threads());
    #endif
   ,
   /*py*/
  );
  DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(HeatInteractionLoop);

#include"HeatInteractionLoop.hpp"

YADE_PLUGIN((HeatInteractionLoop));
CREATE_LOGGER(HeatInteractionLoop);

void HeatInteractionLoop::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
 if(boost::python::len(t)==0) return; // nothing to do
 if(boost::python::len(t)!=3) throw invalid_argument("Exactly 3 lists of functors must be given");
 // parse custom arguments (3 lists) and do in-place modification of args
 using vecGeom = std::vector<shared_ptr<IGeomFunctor> >;
 using vecPhys = std::vector<shared_ptr<IPhysFunctor> >;
 using vecLaw = std::vector<shared_ptr<LawFunctor> >;
 vecGeom vg=boost::python::extract<vecGeom>(t[0])();
 vecPhys vp=boost::python::extract<vecPhys>(t[1])();
 vecLaw vl=boost::python::extract<vecLaw>(t[2])();
 for(const auto gf : vg) this->geomDispatcher->add(gf);
 for(const auto pf : vp) this->physDispatcher->add(pf);
 for(const auto cf : vl) this->lawDispatcher->add(cf);
 t=boost::python::tuple(); // empty the args; not sure if this is OK, as there is some refcounting in raw_constructor code
}

void HeatInteractionLoop::action(){
 // update Scene* of the dispatchers
 lawDispatcher->scene=scene;
 physDispatcher->scene=scene;
 geomDispatcher->scene=scene;

 // ask dispatchers to update Scene* of their functors
 geomDispatcher->updateScenePtr();
 physDispatcher->updateScenePtr();
 lawDispatcher->updateScenePtr();

 /*
  initialize callbacks; they return pointer (used only in this timestep) to the function to be called
  returning NULL deactivates the callback in this timestep
 */
 // pair of callback object and pointer to the function to be called
 vector<IntrCallback::FuncPtr> callbackPtrs;
 for (const auto cb : callbacks){
  cb->scene=scene;
  callbackPtrs.push_back(cb->stepInit());
 }
 assert(callbackPtrs.size()==callbacks.size());
 const size_t callbacksSize=callbacks.size();

 // cache transformed cell size
 Matrix3r cellHsize = Matrix3r::Zero();
 if(scene->isPeriodic) {
  cellHsize=scene->cell->hSize;
 }

 // force removal of interactions that were not encountered by the collider
 // (only for some kinds of colliders; see comment for InteractionContainer::iterColliderLastRun)
 const bool removeUnseenIntrs=(scene->interactions->iterColliderLastRun>=0 && scene->interactions->iterColliderLastRun==scene->iter);

 #ifdef YADE_OPENMP
 const long size=scene->interactions->size();
 #pragma omp parallel for schedule(guided) num_threads(ompThreads>0 ? min(ompThreads,omp_get_max_threads()) : omp_get_max_threads())
 for(long i=0; i<size; i++){
  const shared_ptr<Interaction>& I=(*scene->interactions)[i];
 #else
 for (const auto & I : *scene->interactions){
 #endif
  if(removeUnseenIntrs && !I->isReal() && I->iterLastSeen<scene->iter) {
   eraseAfterLoop(I->getId1(),I->getId2());
   continue;
  }

  const shared_ptr<Body>& b1_=Body::byId(I->getId1(),scene);
  const shared_ptr<Body>& b2_=Body::byId(I->getId2(),scene);

  if(!b1_ || !b2_){
   LOG_DEBUG("Body #"<<(b1_?I->getId2():I->getId1())<<" vanished, erasing intr #"<<I->getId1()<<"+#"<<I->getId2()<<"!");
   scene->interactions->requestErase(I);
   continue;
  }

    // Skip interaction with clumps
    if (b1_->isClump() || b2_->isClump()) { continue; }

  // we know there is no geometry functor already, take the short path
  if(!I->functorCache.geomExists) { assert(!I->isReal()); continue; }

  // no interaction geometry for either of bodies; no interaction possible
  if(!b1_->shape || !b2_->shape) { assert(!I->isReal()); continue; }

  bool swap=false;
  // IGeomDispatcher
  if(!I->functorCache.geom){
   I->functorCache.geom=geomDispatcher->getFunctor2D(b1_->shape,b2_->shape,swap);
   // returns NULL ptr if no functor exists; remember that and shortcut
   if(!I->functorCache.geom) {
    I->functorCache.geomExists=false;
    continue;
   }
  }
  // arguments for the geom functor are in the reverse order (dispatcher would normally call goReverse).
  // we don't remember the fact that is reverse, so we swap bodies within the interaction
  // and can call go in all cases
  if(swap){I->swapOrder();}
  // body pointers must be updated, in case we swapped
  const shared_ptr<Body>& b1=swap?b2_:b1_;
  const shared_ptr<Body>& b2=swap?b1_:b2_;

  assert(I->functorCache.geom);

  bool wasReal=I->isReal();
  bool geomCreated;
  if(!scene->isPeriodic){
   geomCreated=I->functorCache.geom->go(b1->shape,b2->shape, *b1->state, *b2->state, Vector3r::Zero(), /*force*/false, I);
  } else {
   // handle periodicity
   Vector3r shift2=cellHsize*I->cellDist.cast<Real>();
   // in sheared cell, apply shear on the mutual position as well
   geomCreated=I->functorCache.geom->go(b1->shape,b2->shape,*b1->state,*b2->state,shift2,/*force*/false,I);
  }
  if(!geomCreated){
   if(wasReal) LOG_WARN("IGeomFunctor returned false on existing interaction!");
   if(wasReal) scene->interactions->requestErase(I); // fully created interaction without geometry is reset and perhaps erased in the next step
   continue; // in any case don't care about this one anymore
  }

  // IPhysDispatcher
  if(!I->functorCache.phys){
   I->functorCache.phys=physDispatcher->getFunctor2D(b1->material,b2->material,swap);
   assert(!swap); // InteractionPhysicsEngineUnits are symmetric
  }

  if(!I->functorCache.phys){
   throw std::runtime_error("Undefined or ambiguous IPhys dispatch for types "+b1->material->getClassName()+" and "+b2->material->getClassName()+".");
  }
  I->functorCache.phys->go(b1->material,b2->material,I);
  assert(I->phys);

  if(!wasReal) I->iterMadeReal=scene->iter; // mark the interaction as created right now

  // LawDispatcher
  // populating constLaw cache must be done after geom and physics dispatchers have been called, since otherwise the interaction
  // would not have geom and phys yet.
  if(!I->functorCache.constLaw){
   I->functorCache.constLaw=lawDispatcher->getFunctor2D(I->geom,I->phys,swap);
   if(!I->functorCache.constLaw){
    LOG_FATAL("None of given Law2 functors can handle interaction #"<<I->getId1()<<"+"<<I->getId2()<<", types geom:"<<I->geom->getClassName()<<"="<<I->geom->getClassIndex()<<" and phys:"<<I->phys->getClassName()<<"="<<I->phys->getClassIndex()<<" (LawDispatcher::getFunctor2D returned empty functor)");
    exit(1);
   }
   assert(!swap); // reverse call would make no sense, as the arguments are of different types
  }
  assert(I->functorCache.constLaw);

  //If the functor return false, the interaction is reset
  if (!I->functorCache.constLaw->go(I->geom,I->phys,I.get())) scene->interactions->requestErase(I);

  // process callbacks for this interaction
  if(!I->isReal()) continue; // it is possible that Law2_ functor called requestErase, hence this check
  for(size_t i=0; i<callbacksSize; i++){
   if(callbackPtrs[i]!=NULL) (*(callbackPtrs[i]))(callbacks[i].get(),I.get());
  }
 }
}

Revision history for this message
Anton Gladky (gladky-anton) said :
#7

Hi,

did you see that the newly created files were compiled? To be sure,
you should "touch CMakeLists.txt" to regenerate the list of cpp-files
and run compilation process again.

Best regards

Anton

Revision history for this message
Haohui Xin (tjxhhcu) said :
#8

Yes, the created file is compiled. I did not change the "CmakeList.txt". The introduction said it will detect the cpp file in the pkg automatically.

THanks

Revision history for this message
Anton Gladky (gladky-anton) said :
#9

If you just added files and did not "touch CMakeLists.txt"
the file list for compilation is not regenerated.

Anton

Revision history for this message
Haohui Xin (tjxhhcu) said :
#10

Thanks I am not familiar with CmakeList.txt I will try to learn the Cmake file to solve my problems

Revision history for this message
Jan Stránský (honzik) said :
#11

Just to clarify Anton's answer, you don't need to learn anything, just run
the commands

touch CMakeLists.txt
cmake
make install

cheers
Jan

2016-11-16 9:38 GMT+01:00 Haohui Xin <email address hidden>:

> Question #404070 on Yade changed:
> https://answers.launchpad.net/yade/+question/404070
>
> Haohui Xin posted a new comment:
> Thanks I am not familiar with CmakeList.txt I will try to learn the
> Cmake file to solve my problems
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Haohui Xin for more information if necessary.

To post a message you must log in.