Custom datatypes useful in a topology optimization context
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file totypes-0.8.0.tar.gz
.
File metadata
- Download URL: totypes-0.8.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe558b9d5d8bb7440be26e9abc29da61e2bdf8eaa368998f2c9739bdb588c8af |
|
MD5 | 9052054a4e74bc7c6b5055ae70e18c4b |
|
BLAKE2b-256 | 48dae1c2a598ce9b407bc5a3c62688181eef85fb9c4617171b9d9c303b9faa69 |
File details
Details for the file totypes-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: totypes-0.8.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3cddd98b0dff490810732b7c2cd555694ec019c750148ca1e33deace5930868 |
|
MD5 | 7827559143e12bb6bdea102d8b866093 |
|
BLAKE2b-256 | a8fa6fba18d976377ebe4a29080698d11658ffb73e43884f8fb76fee20191980 |