开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约

LeoPkuCs / PyPhysLeoC++MIT

Watch 2 Star 0 Fork 0
加入码云
与超过 300 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
This is a simulation library for computer graphics which contains following contents: 1.Basic Tetrahedron Hexahedron FEA, Different Material Model including Linear, StVK, Neohookean, spline-design. 2.Basic Peridynamic FEA, Di... 展开 收起

Loading...
README.md

PyPhysLeo

Description

This is a simulation library for computer graphics which contains following contents: 1.Basic Tetrahedron Hexahedron FEA, Different Material Model including Linear, StVK, Neohookean, spline-design. 2.Basic Peridynamic FEA, Different Material Model including Linear, anisotropic nonlinear basis design. 3.Different Kinds of Time Integration Method, including Explicit Euler, Runge-Kunta, implicit newton-raphson, implicit quasi-newton, gradient descent. 4.Basic Position Based Dynamics

Document

C++ documents is generated by doxygen.

cd PyPhysLeo/doc/source
doxygen PhysLeo.doxygen

this will create the C++ API for PhysLeo lib in PyPhysLeo/doc/build/doxygen/html online document, please refer to

https://leopkucs.gitee.io/pyphysleo

Python documents is generated by sphinx-doc.

cd PyPhysLeo/doc/source
make

this will create the Python API for PyPhysLeo module in PyPhysLeo/doc/build/html

Dependencies

Cuda (Accelleration on Nvidia's Graphics Card) Qt (GUI and Interaction) OpenGL GLEW(Rendering) pybind11 (Python Binding) Eigen (Linear Algebra)

Prerequisite

Python3 (recommend install ananconda3, add it to your system path) QT CMake

Platform

Theoretically speaking, this project can be compiled and used in any platform as long as you have Nvidia's card, cuda and all other prerequisites. However it is only tested on Windows and Linux with x64 architecture.

Build

cd PyPhysLeo (root directory) mkdir build cd build cmake .. make make install

Then you can use PyPhysLeo by import PyPhysLeo in your python code.

Python Binding

binding codes are under "PyBind", name in "py_xx.cpp"

Pytest and Example

Examples of how to use PyPhysLeo, please refer to the test files in "PyTest". test files are all in format "test_xx.py". Run "pytest" at subdirectory "PyTest" to check the correctness of the module

Demo Test

for C++ programmer, please refer to QtApplication subproject. for python programmer, please refer to PyQtApplication subproject. It relies on PyQt5 PyOpenGL, be sure you already have these modules. All you need to do is to create your own scene graph. Now I only create the Stvk Bunny Demo, I will put other demos on as soon as I can.


Feel free to ask me about any problems about this project including compilation, bugs or others. My email is leoxupku@gmail.com. But the best way is still to set up an issue on this project first. Finally, give me a star if you like this project.

点评 ( 0 )

你可以在登录后,发表评论

搜索帮助