Skip to main content

Custom datatypes useful in a topology optimization context

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

totypes - Custom types for topology optimization

Continuous integration PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

totypes-0.9.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

totypes-0.9.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file totypes-0.9.1.tar.gz.

File metadata

  • Download URL: totypes-0.9.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for totypes-0.9.1.tar.gz
Algorithm Hash digest
SHA256 7f61ffc0aab8fe91008229d47ec36f9a54d6d87d24e5996ce7fda34c9b2251b2
MD5 392c42fece404b24fc22f2add4dda470
BLAKE2b-256 a7bde2468e8a4278ea19cb08635bd477121710e2de98feb88325449ddca24059

See more details on using hashes here.

File details

Details for the file totypes-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: totypes-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for totypes-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 657e3fae15059f919ab5268b7106fc9bc62df98f520fc361dcaf85bce1e0886b
MD5 6d8705b938eb9f67e2907e91ca29778a
BLAKE2b-256 c5fc6c3da5ade4a40aece0c6b694e8caa41387c5fe871822701d9ab2776dc57f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page