Skip to main content

A module for diff geo

Project description

difdyf

calculate differential geometry content

difdyf 是一个计算不同度规场,坐标系下各种张量的库

更多功能正在添加中

使用方式

import difdyf as df
g,symb=df.sphereMetric()## 生成球坐标度规场g,symb=【'r','theta','phi'】
T=df.getChristSymb(g,symb)## 生成球坐标下克氏算符
R=df.getRiemannCurvature(T,symb)## 生成球坐标表示的R3空间黎曼曲率张量,和正交坐标表示的R3曲率一样,为0
##输入度规场g可任意指定,需要是一个2维字符串值的字典,例如g['r']['r']='1'

内部函数

df.sphereMetric()## 生成球坐标度规场g,symb=【'r','theta','phi'】
df.orthMetric(n)## 生成n维正交度规场g,symb=【'x0','x1',... ,'xn'】
df.getChristSymb(g,symb)## 生成度规场下的克氏算符
df.getRiemannCurvature(T,symb)## 生成黎曼曲率
df.getRici(T,symb)##里奇张量
df.coord2MetricFromOrth(n,coordList,varlist)## 生成不同坐标系的度规场
                                               n为空间维度(整数)
                                               coordList为坐标表示式 i.e.['r*cos(theta)*cos(phi)','r*cos(theta)*sin(phi)','r*sin(theta)']
                                                    需要是一个n维列表,列表每一个字符串依次代表x0,x1,..., xn在新坐标系中的表示式
                                               varlist为新坐标名字 i.e. ['r','theta','phi']
df.plotFromCoord(coord,symb,ranges)# 生成指定坐标系(3维)在正交坐标下的象
                                    coord=['r*cos(theta)*cos(phi)','r*cos(theta)*sin(phi)','r*sin(theta)']
                                    var=['r','theta','phi']
                                    ranges:坐标范围
                       i.e. df.plotFromCoord(coord,var,[[1],np.linspace(-1.57,1.57,40),np.linspace(0,6.28,40)])




安装

$ pip install difdyf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

difdyf-1.14112.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

difdyf-1.14112-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file difdyf-1.14112.tar.gz.

File metadata

  • Download URL: difdyf-1.14112.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for difdyf-1.14112.tar.gz
Algorithm Hash digest
SHA256 6180c9e72d1293dd1608354417f75f2654e12fde5f102142a8e22a659dcf5af0
MD5 7494b93ed8aa752a88ee7d8d024e4268
BLAKE2b-256 36c96ee49a685a80af7a0a96fdbddd10a2d55ea2e3fb79620cce616632b9382c

See more details on using hashes here.

File details

Details for the file difdyf-1.14112-py3-none-any.whl.

File metadata

  • Download URL: difdyf-1.14112-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1

File hashes

Hashes for difdyf-1.14112-py3-none-any.whl
Algorithm Hash digest
SHA256 97ad3f01596881a615b9a1d3bd7986cca605d7687add4a172df36faa3e4c5f0c
MD5 4084f8864c4106fd1535ae9732618503
BLAKE2b-256 4b52e101aa2da24976494374450378ffd555a4be8b529e3bc44264cedfdf3db0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page