phs-poly


Namephs-poly JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryPHS+poly approximation procedures
upload_time2025-09-09 22:27:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords approximation rbf-fd meshfree
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # phs_poly

Finite difference coefficients using the RBF-FD method.

Only PHS + poly of limited order are supported.

## Fortran examples

Example of gradient and Hessian calculation using RBF-FD.

To compile use,

```
gfortran -Wall -Og -o test_phs_poly phs_poly_approx.f90 test_phs_poly.f90 -llapack
```

Here's what the output should look like:

```txt
$ ./test_phs_poly

Testing 1
Grad (approx)    -0.000000   -0.000000
Grad (exact)      0.000000    0.000000
Hess (approx)    -0.000000   -0.000000    0.000000
Hess (exact)      0.000000    0.000000    0.000000

Testing x
Grad (approx)     1.000000   -0.000000
Grad (exact)      1.000000    0.000000
Hess (approx)    -0.000000    0.000000    0.000000
Hess (exact)      0.000000    0.000000    0.000000

Testing y
Grad (approx)    -0.000000    1.000000
Grad (exact)      0.000000    1.000000
Hess (approx)     0.000000   -0.000000    0.000000
Hess (exact)      0.000000    0.000000    0.000000

Testing x^2
Grad (approx)     0.862000    0.000000
Grad (exact)      0.862000    0.000000
Hess (approx)     2.000000   -0.000000    0.000000
Hess (exact)      2.000000    0.000000    0.000000

Testing y^2
Grad (approx)    -0.000000    1.074000
Grad (exact)      0.000000    1.074000
Hess (approx)     0.000000   -0.000000    2.000000
Hess (exact)      0.000000    0.000000    2.000000

Testing x*y
Grad (approx)     0.537000    0.431000
Grad (exact)      0.537000    0.431000
Hess (approx)     0.000000    1.000000    0.000000
Hess (exact)      0.000000    1.000000    0.000000

Testing general quad
Grad (approx)     6.734000    6.094000
Grad (exact)      6.734000    6.094000
Hess (approx)     6.000000    4.000000   10.000000
Hess (exact)      6.000000    4.000000   10.000000

Testing smooth function f(x,y) = sin(pi x)*cos(pi y)
Grad (approx)    -0.076949   -3.072093
Grad (exact)     -0.078364   -3.047367
Hess (approx)     1.121192   -2.065178    1.184418
Hess (exact)      1.117863   -2.108393    1.117863
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "phs-poly",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "approximation, RBF-FD, meshfree",
    "author": null,
    "author_email": "Ivan Pribec <ivan.pribec@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a9/17/71fa5e61f90e4aa90df99faa09e99d5e9b135c7d1494ea9c54393224f925/phs_poly-0.2.1.tar.gz",
    "platform": null,
    "description": "# phs_poly\n\nFinite difference coefficients using the RBF-FD method.\n\nOnly PHS + poly of limited order are supported.\n\n## Fortran examples\n\nExample of gradient and Hessian calculation using RBF-FD.\n\nTo compile use,\n\n```\ngfortran -Wall -Og -o test_phs_poly phs_poly_approx.f90 test_phs_poly.f90 -llapack\n```\n\nHere's what the output should look like:\n\n```txt\n$ ./test_phs_poly\n\nTesting 1\nGrad (approx)    -0.000000   -0.000000\nGrad (exact)      0.000000    0.000000\nHess (approx)    -0.000000   -0.000000    0.000000\nHess (exact)      0.000000    0.000000    0.000000\n\nTesting x\nGrad (approx)     1.000000   -0.000000\nGrad (exact)      1.000000    0.000000\nHess (approx)    -0.000000    0.000000    0.000000\nHess (exact)      0.000000    0.000000    0.000000\n\nTesting y\nGrad (approx)    -0.000000    1.000000\nGrad (exact)      0.000000    1.000000\nHess (approx)     0.000000   -0.000000    0.000000\nHess (exact)      0.000000    0.000000    0.000000\n\nTesting x^2\nGrad (approx)     0.862000    0.000000\nGrad (exact)      0.862000    0.000000\nHess (approx)     2.000000   -0.000000    0.000000\nHess (exact)      2.000000    0.000000    0.000000\n\nTesting y^2\nGrad (approx)    -0.000000    1.074000\nGrad (exact)      0.000000    1.074000\nHess (approx)     0.000000   -0.000000    2.000000\nHess (exact)      0.000000    0.000000    2.000000\n\nTesting x*y\nGrad (approx)     0.537000    0.431000\nGrad (exact)      0.537000    0.431000\nHess (approx)     0.000000    1.000000    0.000000\nHess (exact)      0.000000    1.000000    0.000000\n\nTesting general quad\nGrad (approx)     6.734000    6.094000\nGrad (exact)      6.734000    6.094000\nHess (approx)     6.000000    4.000000   10.000000\nHess (exact)      6.000000    4.000000   10.000000\n\nTesting smooth function f(x,y) = sin(pi x)*cos(pi y)\nGrad (approx)    -0.076949   -3.072093\nGrad (exact)     -0.078364   -3.047367\nHess (approx)     1.121192   -2.065178    1.184418\nHess (exact)      1.117863   -2.108393    1.117863\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "PHS+poly approximation procedures",
    "version": "0.2.1",
    "project_urls": null,
    "split_keywords": [
        "approximation",
        " rbf-fd",
        " meshfree"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fe3eabc42f7f418ce1c0b2b93886c178934421b32ff88c1bff72b9acd09ccd27",
                "md5": "a48d0c8ed1aadfbbdff4db59527869c0",
                "sha256": "84e8848e4ae6a69f204286bbdfc8063300455c3bb39c8a93d7735ee452d2184e"
            },
            "downloads": -1,
            "filename": "phs_poly-0.2.1-cp39-cp39-macosx_15_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "a48d0c8ed1aadfbbdff4db59527869c0",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9",
            "size": 9378,
            "upload_time": "2025-09-09T22:27:46",
            "upload_time_iso_8601": "2025-09-09T22:27:46.038530Z",
            "url": "https://files.pythonhosted.org/packages/fe/3e/abc42f7f418ce1c0b2b93886c178934421b32ff88c1bff72b9acd09ccd27/phs_poly-0.2.1-cp39-cp39-macosx_15_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a91771fa5e61f90e4aa90df99faa09e99d5e9b135c7d1494ea9c54393224f925",
                "md5": "0bee826efe6b51b9988f3ebc8d8b9f9e",
                "sha256": "b8bdbdcacb1eb6505b78c8d41120dd19b9307d219f1021cfd46d9d8ec6da190c"
            },
            "downloads": -1,
            "filename": "phs_poly-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0bee826efe6b51b9988f3ebc8d8b9f9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9187,
            "upload_time": "2025-09-09T22:27:47",
            "upload_time_iso_8601": "2025-09-09T22:27:47.384543Z",
            "url": "https://files.pythonhosted.org/packages/a9/17/71fa5e61f90e4aa90df99faa09e99d5e9b135c7d1494ea9c54393224f925/phs_poly-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-09 22:27:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "phs-poly"
}
        
Elapsed time: 2.70577s