Windows Binary Installation

1. System Requirements

  • Windows Platform: Windows 11
  • GPU: NVIDIA graphics card
  • CPU: Intel i7 or higher
  • OpenGL: 4.6+
  • RAM: 8GB+

2. Runtime Dependencies

3. Installation

Install the package using pip:

pip install PyPeridyno

We recommend installing in a real environment with administrator privileges.

4. Verification Test

  1. Copy the test code into a new file named GL_GlfwGUI.py:
import os
import sys
import PyPeridyno as dyno
print(sys.path)

scn = dyno.SceneGraph()

app = dyno.GlfwApp()
app.setSceneGraph(scn)
app.initialize(1920, 1080, True)
app.setWindowTitle("Empty GUI")
app.mainLoop()
  1. Execute the file using shell:python -u "/path/GL_GlfwGUI.py"
  2. Expected successful output:

5. Usage Guide

First import the PyPeridyno package: import PyPeridyno as dyno

Key Usage Patterns:

  1. Class Instantiation
    Python classes mirror their C++ counterparts with identical names.
    C++: std::shared_ptr<SceneGraph> scn = std::make_shared<SceneGraph>();
    Python: scn = dyno.SceneGraph()

  2. Templated Classes
    For C++ template classes, use class name + type abbreviation in Python:
    C++: CodimensionalPD<DataType3f> → Python: CodimensionalPD3f

  3. Method Calls
    All method names match C++, with pointer operators (->) replaced by dot notation (.):
    C++: scn->setLowerBound(); → Python: scn.setLowerBound()

  4. Vector Types
    dyno.Vector3f() corresponds to C++’s dyno::Vec3f(), but requires explicit list syntax:
    C++: dyno::Vec3f(1) → Python: dyno.Vector3f([1,1,1])

  5. Default Parameters
    Python requires explicit specification of all parameters:
    C++: CodimensionalPD<DataType3f>(0.15, 120, 0.001, 0.0001)
    Python: CodimensionalPD3f(0.15, 120, 0.001, 0.0001, "default")

  6. Enum Types
    Enums maintain C++ naming but require full qualification:
    C++: GLPointVisualModule::PER_OBJECT_SHADER
    Python: dyno.GLPointVisualModule().ColorMapMode.PER_OBJECT_SHADER

  7. File Paths
    Use dyno.get_asset_path() + relative path (absolute paths also accepted).
    Default path: C:\ProgramData\Peridyno\data (created during pip install).
    Download additional data from: data.zip

All other usage patterns remain consistent with the C++ implementation.

6. pip Installation FAQ

Q1: Why is administrator privilege required?

A: During installation, pip needs to copy cufft64_11.dll from the CUDA_PATH to your Python directory. Without admin rights, this copy operation may fail silently. While the installation may complete without errors, missing this DLL will prevent proper execution.
Workaround: Manually copy cufft64_11.dll to your Python installation directory if admin rights are unavailable.

Q2: Runtime Error: “ImportError: DLL load failed while importing PyPeridyno: The specified module could not be found”

Solution:

  1. Verify your CUDA version is exactly 12.2 (check CUDA_PATH)
  2. Manually copy the correct cufft64_11.dll to your Python directory
  3. Ensure you’re using Python 3.12 (version mismatch can cause this error)

Q3: How to reinstall?

Complete removal steps:

pip uninstall PyPeridyno
pip cache purge
pip install PyPeridyno