Skip to main content

global analytic equation solver

Project description

# RootLocker Project

This module permit to simply solve analytic equations in the complex plan. It ensures that all the solutions, along with their order of multiplicity, are recovered. The algorithm used rely on the argument principle and therefore require at least C1 functions.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

` This module requires the ad module which provides automatic differentiation easily. `

### Installing

` The easiest way to install this library is to use pip. `

### Use

There are two ways to use this module.

  1. In this mode, you can define a function which uses the admath library (loaded by default when importing rootlocker module)

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. In order to avoid the use of the ad module, one ca provide an equationprovider by overriding the class EqProvider. For instance, one can directly use custom C or C++ code for the function and its derivative and this permits to significantly reduce the computational time required by the algorithm.

## Authors

  • Maxence Miguel-Brebion - (IMFT)

## License

This project is licensed under the MIT License - see the LICENSE.txt file for details

## Acknowledgments

Laurent Selle, Thierry Poinsot and Emilien Courtine from The Institut de Mecanique des Fluides de Toulouse have greatly contributed to the algorithm behind the rootlocker module.

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

rootlocker-1.0.4.tar.gz (9.9 kB view details)

Uploaded Source

File details

Details for the file rootlocker-1.0.4.tar.gz.

File metadata

  • Download URL: rootlocker-1.0.4.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rootlocker-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8e1f20dec1df2c327bb8ec330cbee7d9d4c27f873a04613c8a137d18682f90aa
MD5 7003909a219f35cb16970e9979e54086
BLAKE2b-256 378fd203044637ef1976608583a147d259ab2153445dec0a9c6a61437d475d04

See more details on using hashes here.

Supported by

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