Skip to main content

A package for IGA elasticity.

Project description

IGA_for_bsplyne

IGA_for_bsplyne is a high-performance Python library for 3D Isogeometric Analysis (IGA) applied to linear elasticity. It bridges the gap between Computer-Aided Design (CAD) and Finite Element Analysis (FEA) by using B-Spline basis functions directly as the approximation space for structural mechanics.

This library extends the geometric foundations of bsplyne to provide a complete multipatch IGA solver pipeline.

Installation

1. High-Performance Solvers (Optional but Recommended)

For large-scale 3D problems, IGA_for_bsplyne leverages SuiteSparse (via scikit-sparse and sparseqr) to achieve significant speedups.

  • Recommended Installation (Conda): Conda is highly recommended as it automatically manages the complex non-Python dependencies (SuiteSparse). Run these commands in order:

    conda install -c conda-forge scikit-sparse
    pip install sparseqr
    

    Note: sparseqr is not on Conda, but it will successfully link to the SuiteSparse libraries installed by scikit-sparse.

  • Alternative (System Package Manager): If you are not using Conda, you must install SuiteSparse manually. Note: This method is not recommended for most users as it often leads to complex compilation issues during the pip phase:

    • macOS: brew install suitesparse && pip install scikit-sparse sparseqr
    • Ubuntu/Debian: sudo apt-get install libsuitesparse-dev && pip install scikit-sparse sparseqr
  • Fallback: If these packages are not detected, the library automatically falls back to standard scipy.sparse solvers and an internal Sparse QR implementation, ensuring full compatibility at the cost of performance.

2. Install the Library

Standard Installation

Install the latest stable version directly from PyPI:

pip install IGA-for-bsplyne

Development Installation

If you wish to modify the code or contribute to the project, install the library in editable mode:

git clone https://github.com/Dorian210/IGA_for_bsplyne
cd IGA_for_bsplyne
pip install -e .

Note: The core dependency bsplyne is handled automatically by pip.

Core Architecture

The library is organized into three specialized layers:

🛠️ Constraint Management: Dirichlet

Handles complex boundary conditions via an affine mapping approach: u = Cd + k.

  • Static condensation: Automatically reduces the system size by removing constrained DOFs.
  • Advanced Relations: Supports slave-reference dependencies and Rigid Body constraints.
  • Key tools: DirichletConstraintHandler for automated multi-point constraint assembly.

🧊 Local Physics: IGAPatch

The bridge between B-Spline geometry and continuum mechanics.

  • Operators: High-performance assembly of Stiffness matrix (K) and RHS vector (f).
  • Post-Processing: Integrated calculation of Strains, Stresses, and Von Mises invariants.
  • Digital Twin & Immersed Models: Supports IGAPatchDensity to model heterogeneous materials (e.g., from CT-scan imagery) by interpolating volume fractions directly into the B-Spline basis.

🌐 Global Solver: ProblemIGA

Orchestrates the multipatch environment and global resolution.

  • Connectivity: Seamlessly "welds" patches together using MultiPatchBSplineConnectivity.
  • Solvers: Choice between Direct (Cholesky) and Iterative (PCG) solvers.
  • Visualization: Native ParaView (.pvd/.vtu) export.

Quick Start

from IGA_for_bsplyne.IGAPatch import IGAPatch
from IGA_for_bsplyne.ProblemIGA import ProblemIGA

# Define your patch
patch = IGAPatch(spline, ctrl_pts, E=70e9, nu=0.33)

# Assemble and solve
prob = ProblemIGA([patch], connectivity, dirichlet)
u = prob.solve()

# Export results
prob.save_paraview(u, path="./", name="results")

Tutorials & Examples

A comprehensive hands-on guide is available in examples/tutorial/:

  1. Affine Mappings (01-03)
  2. Local Integration & Post-Processing (04-06)
  3. Immersed Models & Density (07)
  4. Multipatch Solving (08-09)

Documentation

The full API documentation is available in the docs/ directory or via the Online Portal.

License

This project is licensed under the CeCILL License.

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

iga_for_bsplyne-1.0.2.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

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

iga_for_bsplyne-1.0.2-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file iga_for_bsplyne-1.0.2.tar.gz.

File metadata

  • Download URL: iga_for_bsplyne-1.0.2.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for iga_for_bsplyne-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0b420e9bd1a3f53b54fd6e73ebf629d483db5ebea75f1027a801bfe790b46022
MD5 995658ecd25f3003de1a0b18a2d4508c
BLAKE2b-256 9f22a3f41e77c832d1a6d32632d7234a269c5423aedfd8b9da5e93bc5e7d3edf

See more details on using hashes here.

File details

Details for the file iga_for_bsplyne-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for iga_for_bsplyne-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11f88f6fc6339ba5f5ff367f1252c99c1260e324a3b1bd07cb591420e2cf8e8f
MD5 88f5e7a46a3add14b525d00fa49b14ed
BLAKE2b-256 1f27463e828ba05c41b1f9645e1a6396dac0bd3b0f7e4824a2843cfc356d3a71

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