Skip to main content

A 3pc Python library for mathematical functions used in composite analysis.

Project description

3pc-utils

3pc-utils is a Python library containing mathematical functions and operators used in composite analysis. It provides various delta operators, Kronecker delta, and utilities for managing pairs of indices for composite lamination theory computations.

Installation

Use the package manager pip to install 3pc-utils. Since the package is publicly available on PyPI, you can install it directly:

pip install 3pc-utils

API Reference

Mathematical Operators

The package provides a wide range of delta operators used in the solution of composite plate problems.

delta1(m, n, p, q) to delta92(m, n, p, q)

Calculates various delta operators based on integer indices m, n, p, q. These operators typically return a float value or zero based on parity and index equality.

kronecker(m, n)

Calculates the Kronecker delta. Returns 1 if m == n, else 0.

Utility Functions

get_odd_even(m)

Creates two lists of index pairs (i, j) for i, j in range(1, m+1).

  • odd: Pairs where i + j is odd.
  • even: Pairs where i + j is even.

get_pairs(m)

Creates a list of all possible index pairs (i, j) for i, j in range(1, m+1).


Usage Examples

Using Delta Operators

from utils.utils import delta1, kronecker

# Calculate delta1 operator
val = delta1(1, 2, 3, 4)
print(f"Delta1 value: {val}")

# Calculate kronecker delta
k = kronecker(1, 1) # returns 1
print(f"Kronecker(1, 1): {k}")

Managing Index Pairs

from utils.utils import get_odd_even, get_pairs

# Get all pairs for a 4x4 system
all_pairs = get_pairs(4)

# Separate into odd and even combinations
odd_pairs, even_pairs = get_odd_even(4)

Commands

The package provides a command-line interface entry point. After installing, you can run the main application using:

utils

(Currently, this serves as an entry point defined in utils.main:main)

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

3pc_utils-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

3pc_utils-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file 3pc_utils-1.0.0.tar.gz.

File metadata

  • Download URL: 3pc_utils-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for 3pc_utils-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d66f5ec9e78b65538bcc46bb346e4c9188bebb8b4302c7c68e29415e9a755cb
MD5 eceed91727fdd3c463236b65b5cb8306
BLAKE2b-256 9ff2d115d0786fddc5019b0b632d177b5b64b4127190ac069a1dded1b840e2ea

See more details on using hashes here.

File details

Details for the file 3pc_utils-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: 3pc_utils-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for 3pc_utils-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68f8a0d396ecdf3157d89b4105d07643178dc8235d37fa33c6341e76190ee74d
MD5 52c4e89f405ad5001e7d675dc48d1f17
BLAKE2b-256 c6ce407bc47af9faee47885638fee7ad3c0ad995c972c18dea6772990cf036bc

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