全局解析方程求解器
rootlocker的Python项目详细描述
#rootlocker项目
该模块允许简单地求解复杂平面中的解析方程。它确保所有的解以及它们的多重性顺序都被恢复。使用的算法依赖于参数原理,因此至少需要C1函数。
##入门
这些说明将为您在本地计算机上启动和运行项目的副本,以便进行开发和测试。有关如何在实时系统上部署项目的说明,请参阅部署。
###先决条件
` This module requires the ad module which provides automatic differentiation easily. `
###安装
` The easiest way to install this library is to use pip. `
###使用
使用此模块有两种方法。
- 在此模式下,您可以定义一个使用admath库的函数(导入rootlocker模块时默认加载)
import rootlocker as rl \# Import rootlocker module along with admath module bounds= [complex(-2,-1),complex(8,3)] \# Define the domain of research def f(x): \# Define the function for wich roots are searched return rl.cos(x)+4.0\*rl.sin(2*x) sols,ms=solve(bounds,func=f,myerr=1e-3) \# Solve the equation f(x)=0 with the accuracy specified by myerr ms.plotRoots() \# Plot the solutions (uses matplotlib) ms.printStats() \# Prints statctics about the computation
b.为了避免使用ad模块,一个ca通过重写类eqprovider来提供equationprovider。 例如,可以直接使用自定义C或C++代码的函数及其导数,这允许大大减少算法所需的计算时间。
##作者
- maxence miguel brebion-(imft)
##许可证
此项目在麻省理工学院许可下获得许可-有关详细信息,请参见license.txt文件
##致谢
Lount Selle、Thierry Poinsot和Emilien Courtine来自Mecanique des Fluides de Toulouse研究所,他们对rootlocker模块背后的算法做出了巨大贡献。