Metadata-Version: 2.2
Name: pbf
Version: 0.3.0
Summary: A work-in-progress powder bed fusion simulation library.
Author: Philipp Kopp, Massimo Carraturo
License: MIT License
         
         Copyright (c) 2026 Philipp Kopp, Massimo Carraturo
         
         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.
         
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Project-URL: Repository, https://gitlab.com/hpfem/code/pbf
Project-URL: Examples, https://gitlab.com/hpfem/code/pbf/-/tree/master/examples?ref_type=heads
Project-URL: Issues, https://gitlab.com/hpfem/code/pbf/issues
Project-URL: Changelog, https://gitlab.com/hpfem/code/pbf/-/releases
Requires-Python: >=3.9
Requires-Dist: mlhp==0.2.4
Description-Content-Type: text/markdown

## Install from Python Package Index (PyPI)

Selected releases are uploaded to PyPI as packaged binaries for common platforms and Python versions. You can install _pbf_ with
```
pip install pbf
```
If there is no precompiled package for your platform, a manual attempt to compile _pbf_ from source will be made. This also installs [mlhp](https://pypi.org/project/mlhp/), the finite element library _pbf_ is built on, at the exact version _pbf_ was compiled against: the two share C++ objects at runtime, so they have to match.

You can take a look at the [example scripts](https://gitlab.com/hpfem/code/pbf/-/tree/master/examples?ref_type=heads) or the [test scripts](https://gitlab.com/hpfem/code/pbf/-/tree/master/tests?ref_type=heads). Make sure to select the version corresponding to your local installation, since the master branch may include recent changes that haven't made it into a new version yet. 

A good starting point may be this [transient heat conduction](https://gitlab.com/hpfem/code/pbf/-/blob/master/examples/thermal_metrics.py?ref_type=heads) example with a custom postprocessor to extract data like cooling rates or time above melting. Alternatively, [steady-state heat conduction](https://gitlab.com/hpfem/code/pbf/-/blob/master/examples/steadystate_thermal.py?ref_type=heads) can provide a quick and cheap estimate of the melt pool dimensions and the temperature field in its proximity. However, the nonlinear iterations may be a bit less robust due to the apparent heat capacity formulation.

Disclaimer: everything is experimental and subject to change :)

## Compile from source

This is intended mostly for development on _pbf_. Clone the repository recursively:
```
git clone --recursive https://gitlab.com/hpfem/code/pbf.git
```
Create a build project using CMake and compile `pymlhpbf`. You will find the `pbf` package in the /bin subfolder of your build tree.
