dsh-diffgeom
其他 活跃维护

dsh-diffgeom

hatter123/dsh-diffgeom

生态下的计算几何问题求解插件,内置常见几何定理、公式库与自动推导逻辑,支持多边形面积、角度、线段距离等几何量的快速计算,开箱即用,可便捷集成至各类几何相关开发流程,输出精准计算结果。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Python
主要语言
MIT
开源协议
5 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:hatter123/dsh-diffgeom
git clone https://github.com/hatter123/dsh-diffgeom.git
git clone git@github.com:hatter123/dsh-diffgeom.git
README.md main

dsh-diffgeom

Differential-geometry symbolic computation for DeepSeek Harness. It registers a diffgeom tool that runs coordinate-free differential geometry through SymPy.diffgeom and returns the symbolic result.

Prerequisites

Python 3 with SymPy installed:

python -m pip install sympy

Verify:

python -c "import sympy; print(sympy.__version__)"

Install

dsh plugin --profile web add "D:/VSCode_/Project/dsh/dsh-diffgeom"

(or publish to npm and dsh plugin --profile web add dsh-diffgeom)

What it can do

  • manifolds, patches, coordinate systems
  • scalar fields and tensor fields (abstract, coordinate-free)
  • exterior derivative d (Differential)
  • wedge product ∧ (Wedge)
  • Lie derivative (LieDerivative)
  • covariant derivative, metric → Christoffel symbols → Riemann/Ricci components

Preloaded objects

The tool evaluates your Python code with a working Euclidean manifold already set up:

  • 2D: m, p, r2, coordinates x,y, basis 1-forms ex,ey, basis vectors e_x,e_y, metric g
  • 3D: m3, p3, r3, coordinates x3,y3,z3, basis ex3,ey3,ez3, vectors e_x3,e_y3,e_z3, metric g3

Plus the usual constructor/operation names: Manifold, Patch, CoordSystem, TensorProduct, Wedge, LieDerivative, Differential, metric_to_Christoffel_2nd, metric_to_Ricci_components, metric_to_Riemann_components, symbols, Function, simplify.

Examples

d(x*y)                     # exterior derivative of the scalar field x*y
Wedge(ex, ey)(e_x, e_y)    # wedge of basis 1-forms evaluated on basis vectors → 1
LieDerivative(e_x, x*y)    # Lie derivative of x*y along e_x → y

How it works

index.js runs python diffgeom_backend.py "<code>" via Node's child_process, capturing stdout. The backend builds the Euclidean manifold, evals the code, and prints the result.