Skip to main content

A CFD image sampling library.

Project description

Python

🌐 BiFIS

Signed Distance Function-biased flow importance sampling for implicit neural compression of flow fields
Omar A. Mures, Miguel Cid Montoya

Usage

Installation

The bifis library is available using pip. We recommend using a virtual environment to avoid conflicts with other software on your machine.

pip install bifis

Example

from bifis.utils import Config, console
from bifis.sampling import Uniform, VariableDensity, BiFIS
from scipy.interpolate import griddata

# Load configuration
config = Config("config.json")

# Build toy deck
points, deck, path = build_toy_deck()

uniform = Uniform(config, args.resolution[0], args.resolution[1], np.arange(len(points)))
uniform.show(points[:, 0], points[:, 1], write=False)

variable_density = VariableDensity(config, args.resolution[0], args.resolution[1], np.arange(len(points)))
variable_density.show(points[:, 0], points[:, 1], write=False)

bifis = BiFIS(config, args.resolution[0], args.resolution[1], np.arange(len(points)), samples=points, surface=deck, surface_idx=np.arange(len(deck)))
bifis.show(points[:, 0], points[:, 1], write=False)

# Use resulting grid
interp_var_dens = griddata((points[:, 0], points[:, 1]), p_original, (variable_density.grid_x, variable_density.grid_y), method=interpolation_method)

# BiFIS uses cell ids instead of interpolation to get pixel data
fields_b_i = p_original[bifis.idx].reshape(bifis.img_shape)

📢 News

May 2025

  • Initial code version published.

March 2025

  • Code coming soon.

🎯 TODO

The repo is still under construction, thanks for your patience.

  • Release pip package.
  • Release of the sampling code.

📜 Citation

@Article{montoya2024aeroelastic,
  author = {Mures, Omar A. and Cid Montoya, Miguel},
  title = {Signed Distance Function-biased flow importance sampling for implicit neural compression of flow fields},
  journal = {Computer-Aided Civil and Infrastructure Engineering},
  volume = {n/a},
  number = {n/a},
  pages = {},
  doi = {n/a},
  url = {n/a},
}

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

bifis-0.1.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

bifis-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file bifis-0.1.0.tar.gz.

File metadata

  • Download URL: bifis-0.1.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bifis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 785edd07a22b023e295947b8db6c9a65090e5dc106860fd55e739370fe54fe27
MD5 8f5d75e030c6859823db22c3601157eb
BLAKE2b-256 9f4350fa97dd7eba5e7126d5e2f31f35e6f53bdad22cf5be9bef3e9f7268f392

See more details on using hashes here.

Provenance

The following attestation bundles were made for bifis-0.1.0.tar.gz:

Publisher: python-publish.yml on omaralvarez/BiFIS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bifis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bifis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bifis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b13825b0c9f11bef255d962fc0b0703a2e8756b1d3b0497be79468029509c69a
MD5 603b9075fbd2101862ab0f525d3ae229
BLAKE2b-256 27c2d5f1d127e6685eadf2c51b18f449da9fd9025b42b72fd7586ceabf21971f

See more details on using hashes here.

Provenance

The following attestation bundles were made for bifis-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on omaralvarez/BiFIS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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