SplitNewton


NameSplitNewton JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/gpavanb1/SplitNewton
SummarySplit Newton Solver
upload_time2022-12-18 13:02:57
maintainer
docs_urlNone
authorgpavanb1
requires_python
licenseMIT
keywords newton python continuation armijo optimization pseudotransient splitting
VCS
bugtrack_url
requirements numpy scipy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SplitNewton

[![Downloads](https://pepy.tech/badge/splitnewton)](https://pepy.tech/project/splitnewton)

Unbounded SPLIT [Newton](https://en.wikipedia.org/wiki/Newton%27s_method) with [pseudo-transient continuation
](https://ctk.math.ncsu.edu/TALKS/Purdue.pdf) and [backtracking](https://en.wikipedia.org/wiki/Backtracking_line_search)

Good for ill-conditioned problems where there are two different sets of systems

Particular applications include
* [Fast-Slow Reaction-Diffusion systems](https://en.wikipedia.org/wiki/Reaction%E2%80%93diffusion_system)
* [CFD](https://en.wikipedia.org/wiki/Computational_fluid_dynamics) - Pressure-Velocity coupling

## What does 'split' mean?

The system is divided into two and for ease of communication, let's refer to first set of variables as "outer" and the second as "inner".

* Holding the outer variables fixed, Newton iteration is performed till convergence using the sub-Jacobian

* One Newton step is performed for the outer variables with inner held fixed (using its sub-Jacobian)

* This process is repeated till convergence criterion is met for the full system (same as in Newton)

## How to install and execute?

Just run 
```
pip install splitnewton
```

There is an [examples](https://github.com/gpavanb1/SplitNewton/examples) folder that contains a test function and driver program

## How good is this?

Consider the test problem

$\lambda_{a} = 10^{6}$, 
$\lambda_{b} = 10^{2}$

and the second system
$\lambda_{c} = 10^{-1}$
$\lambda_{d} = 10^{-4}$

and using `logspace` for variation in $\lambda_{i}$


$$ F(u) = \lambda_{a} u^{4}_{1} + ... + \lambda_{b} u^{4}_{\lfloor N/2 \rfloor} + \lambda_{c} u^{4}_{\lceil N/2 \rceil} + ... + \lambda_{d} u^{4}_{N}$$

$$
J(u) = 3 * \begin{bmatrix}
\lambda_a & \dots & 0 & 0 & \dots & 0 \newline
\vdots & \ddots & \vdots & \vdots & \ddots & \vdots \newline
0 & \dots & \lambda_b & 0 & \dots & 0 \newline
0 & \dots & 0 & \lambda_c & \dots & 0 \newline
\vdots & \ddots & \vdots & \vdots & \ddots & \vdots \newline
0 & \dots & 0 & 0 & \dots & \lambda_d
\end{bmatrix} u^{2}
$$

For N=5000 (with no backtracking and pseudo-transient continuation), 

| Method    | Time       | Iterations    |
|-----------|------------|---------------|
| Split Newton    |    9 seconds |  32   |
| Newton |  not converged > 1 min  | NA  |


## Whom to contact?

Please direct your queries to [gpavanb1](http://github.com/gpavanb1)
for any questions.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gpavanb1/SplitNewton",
    "name": "SplitNewton",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "newton python continuation armijo optimization pseudotransient splitting",
    "author": "gpavanb1",
    "author_email": "gpavanb@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/41/78/cfdc3f972dfb5c1428554c64170323df5b2305e8e0216c83af8367b781ad/SplitNewton-0.1.4.tar.gz",
    "platform": null,
    "description": "# SplitNewton\n\n[![Downloads](https://pepy.tech/badge/splitnewton)](https://pepy.tech/project/splitnewton)\n\nUnbounded SPLIT [Newton](https://en.wikipedia.org/wiki/Newton%27s_method) with [pseudo-transient continuation\n](https://ctk.math.ncsu.edu/TALKS/Purdue.pdf) and [backtracking](https://en.wikipedia.org/wiki/Backtracking_line_search)\n\nGood for ill-conditioned problems where there are two different sets of systems\n\nParticular applications include\n* [Fast-Slow Reaction-Diffusion systems](https://en.wikipedia.org/wiki/Reaction%E2%80%93diffusion_system)\n* [CFD](https://en.wikipedia.org/wiki/Computational_fluid_dynamics) - Pressure-Velocity coupling\n\n## What does 'split' mean?\n\nThe system is divided into two and for ease of communication, let's refer to first set of variables as \"outer\" and the second as \"inner\".\n\n* Holding the outer variables fixed, Newton iteration is performed till convergence using the sub-Jacobian\n\n* One Newton step is performed for the outer variables with inner held fixed (using its sub-Jacobian)\n\n* This process is repeated till convergence criterion is met for the full system (same as in Newton)\n\n## How to install and execute?\n\nJust run \n```\npip install splitnewton\n```\n\nThere is an [examples](https://github.com/gpavanb1/SplitNewton/examples) folder that contains a test function and driver program\n\n## How good is this?\n\nConsider the test problem\n\n$\\lambda_{a} = 10^{6}$, \n$\\lambda_{b} = 10^{2}$\n\nand the second system\n$\\lambda_{c} = 10^{-1}$\n$\\lambda_{d} = 10^{-4}$\n\nand using `logspace` for variation in $\\lambda_{i}$\n\n\n$$ F(u) = \\lambda_{a} u^{4}_{1} + ... + \\lambda_{b} u^{4}_{\\lfloor N/2 \\rfloor} + \\lambda_{c} u^{4}_{\\lceil N/2 \\rceil} + ... + \\lambda_{d} u^{4}_{N}$$\n\n$$\nJ(u) = 3 * \\begin{bmatrix}\n\\lambda_a & \\dots & 0 & 0 & \\dots & 0 \\newline\n\\vdots & \\ddots & \\vdots & \\vdots & \\ddots & \\vdots \\newline\n0 & \\dots & \\lambda_b & 0 & \\dots & 0 \\newline\n0 & \\dots & 0 & \\lambda_c & \\dots & 0 \\newline\n\\vdots & \\ddots & \\vdots & \\vdots & \\ddots & \\vdots \\newline\n0 & \\dots & 0 & 0 & \\dots & \\lambda_d\n\\end{bmatrix} u^{2}\n$$\n\nFor N=5000 (with no backtracking and pseudo-transient continuation), \n\n| Method    | Time       | Iterations    |\n|-----------|------------|---------------|\n| Split Newton    |    9 seconds |  32   |\n| Newton |  not converged > 1 min  | NA  |\n\n\n## Whom to contact?\n\nPlease direct your queries to [gpavanb1](http://github.com/gpavanb1)\nfor any questions.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Split Newton Solver",
    "version": "0.1.4",
    "split_keywords": [
        "newton",
        "python",
        "continuation",
        "armijo",
        "optimization",
        "pseudotransient",
        "splitting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "09f9d866468502ac82a5a34adfdad41b",
                "sha256": "7e1bed88cc20a1e5b2f080864ee12a2b7654985d9cbbe590eae883b269b6f938"
            },
            "downloads": -1,
            "filename": "SplitNewton-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "09f9d866468502ac82a5a34adfdad41b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4789,
            "upload_time": "2022-12-18T13:02:57",
            "upload_time_iso_8601": "2022-12-18T13:02:57.008065Z",
            "url": "https://files.pythonhosted.org/packages/41/78/cfdc3f972dfb5c1428554c64170323df5b2305e8e0216c83af8367b781ad/SplitNewton-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-18 13:02:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "gpavanb1",
    "github_project": "SplitNewton",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.23.5"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.9.3"
                ]
            ]
        }
    ],
    "lcname": "splitnewton"
}
        
Elapsed time: 0.03371s