totypes


Nametotypes JSON
Version 0.6.4 PyPI version JSON
download
home_page
SummaryCustom datatypes useful in a topology optimization context
upload_time2024-03-05 03:45:08
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2023 The INVRS-IO authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords topology optimization jax inverse design
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # totypes - Custom types for topology optimization
`v0.6.4`

## Overview

The `totypes` package defines custom jax-compatible datatypes for use in a topology optimization, inverse design, or AI-guided design context. The custom types are pytree nodes consisting of standard jax arrays along with metadata that describe the desired characteristics of the arrays.
- `BoundedArray`, an array with optional lower and/or upper bounds, used e.g. for representing layer thicknesses.
- `Density2DArray`, an array with lower and upper bounds and characteristics such as fixed pixels, minimum feature size, or symmetry, used for representing layer density as is common in topology optimization.

Custom types do not modify the underlying arrays to ensure that e.g. bounds are obeyed. Instead, it is intended that any scheme for generating arrays be aware of and respect the metadata. For example, a topology optimization scheme could read the minimum width and spacing of layers, and use these quantities to construct an appropriate filtering scheme.

Several related utilities are also provided. The `json_utils` module provides functions for serializing and deserializing pytrees containing the custom types. And, the `symmetry` module provides functions that symmetrize arrays; the allowed symmetries of the `Density2DArray` are restricted to those implemented in the `symmetry` module.

## Install

```
pip install totypes
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "totypes",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
    "keywords": "topology,optimization,jax,inverse design",
    "author": "",
    "author_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c5/f2/47e83bf4c5353a74aa3059e0b0e79797b813d9eea3e18f1222c939ffb42c/totypes-0.6.4.tar.gz",
    "platform": null,
    "description": "# totypes - Custom types for topology optimization\n`v0.6.4`\n\n## Overview\n\nThe `totypes` package defines custom jax-compatible datatypes for use in a topology optimization, inverse design, or AI-guided design context. The custom types are pytree nodes consisting of standard jax arrays along with metadata that describe the desired characteristics of the arrays.\n- `BoundedArray`, an array with optional lower and/or upper bounds, used e.g. for representing layer thicknesses.\n- `Density2DArray`, an array with lower and upper bounds and characteristics such as fixed pixels, minimum feature size, or symmetry, used for representing layer density as is common in topology optimization.\n\nCustom types do not modify the underlying arrays to ensure that e.g. bounds are obeyed. Instead, it is intended that any scheme for generating arrays be aware of and respect the metadata. For example, a topology optimization scheme could read the minimum width and spacing of layers, and use these quantities to construct an appropriate filtering scheme.\n\nSeveral related utilities are also provided. The `json_utils` module provides functions for serializing and deserializing pytrees containing the custom types. And, the `symmetry` module provides functions that symmetrize arrays; the allowed symmetries of the `Density2DArray` are restricted to those implemented in the `symmetry` module.\n\n## Install\n\n```\npip install totypes\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 The INVRS-IO authors.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Custom datatypes useful in a topology optimization context",
    "version": "0.6.4",
    "project_urls": null,
    "split_keywords": [
        "topology",
        "optimization",
        "jax",
        "inverse design"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2395f260a8543edca7096fdb34a8790b9a44c2969ef761505182436205a505a",
                "md5": "953bfdfe0e4ec3886169a747a8193afd",
                "sha256": "5d7c76878ed4bc99bafa40972f61eaeaa901af92bb0936beacb6dd218ffd9d66"
            },
            "downloads": -1,
            "filename": "totypes-0.6.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "953bfdfe0e4ec3886169a747a8193afd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12241,
            "upload_time": "2024-03-05T03:45:06",
            "upload_time_iso_8601": "2024-03-05T03:45:06.893010Z",
            "url": "https://files.pythonhosted.org/packages/f2/39/5f260a8543edca7096fdb34a8790b9a44c2969ef761505182436205a505a/totypes-0.6.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5f247e83bf4c5353a74aa3059e0b0e79797b813d9eea3e18f1222c939ffb42c",
                "md5": "9939e9d55440edd31140f4b3b013f5a0",
                "sha256": "e4c2b780ddd64bf426d790863d3ac97d756eaaf84bda43eba36bd12285f75288"
            },
            "downloads": -1,
            "filename": "totypes-0.6.4.tar.gz",
            "has_sig": false,
            "md5_digest": "9939e9d55440edd31140f4b3b013f5a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16788,
            "upload_time": "2024-03-05T03:45:08",
            "upload_time_iso_8601": "2024-03-05T03:45:08.711472Z",
            "url": "https://files.pythonhosted.org/packages/c5/f2/47e83bf4c5353a74aa3059e0b0e79797b813d9eea3e18f1222c939ffb42c/totypes-0.6.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-05 03:45:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "totypes"
}
        
Elapsed time: 0.19557s