totypes


Nametotypes JSON
Version 0.8.0 PyPI version JSON
download
home_pageNone
SummaryCustom datatypes useful in a topology optimization context
upload_time2024-08-08 19:25:41
maintainerNone
docs_urlNone
authorNone
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.8.0`

## 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": null,
    "name": "totypes",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
    "keywords": "topology, optimization, jax, inverse design",
    "author": null,
    "author_email": "\"Martin F. Schubert\" <mfschubert@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/48/da/e1c2a598ce9b407bc5a3c62688181eef85fb9c4617171b9d9c303b9faa69/totypes-0.8.0.tar.gz",
    "platform": null,
    "description": "# totypes - Custom types for topology optimization\n`v0.8.0`\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.8.0",
    "project_urls": null,
    "split_keywords": [
        "topology",
        " optimization",
        " jax",
        " inverse design"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8fa6fba18d976377ebe4a29080698d11658ffb73e43884f8fb76fee20191980",
                "md5": "7827559143e12bb6bdea102d8b866093",
                "sha256": "a3cddd98b0dff490810732b7c2cd555694ec019c750148ca1e33deace5930868"
            },
            "downloads": -1,
            "filename": "totypes-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7827559143e12bb6bdea102d8b866093",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12365,
            "upload_time": "2024-08-08T19:25:39",
            "upload_time_iso_8601": "2024-08-08T19:25:39.519938Z",
            "url": "https://files.pythonhosted.org/packages/a8/fa/6fba18d976377ebe4a29080698d11658ffb73e43884f8fb76fee20191980/totypes-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48dae1c2a598ce9b407bc5a3c62688181eef85fb9c4617171b9d9c303b9faa69",
                "md5": "9052054a4e74bc7c6b5055ae70e18c4b",
                "sha256": "fe558b9d5d8bb7440be26e9abc29da61e2bdf8eaa368998f2c9739bdb588c8af"
            },
            "downloads": -1,
            "filename": "totypes-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9052054a4e74bc7c6b5055ae70e18c4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16209,
            "upload_time": "2024-08-08T19:25:41",
            "upload_time_iso_8601": "2024-08-08T19:25:41.102998Z",
            "url": "https://files.pythonhosted.org/packages/48/da/e1c2a598ce9b407bc5a3c62688181eef85fb9c4617171b9d9c303b9faa69/totypes-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-08 19:25:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "totypes"
}
        
Elapsed time: 1.58072s