跳转到主要内容

并行参数场用于不确定性量化

项目描述

欢迎使用parafields

License GitHub Workflow Status Documentation Status codecov

parafields是一个Python包,它提供基于循环嵌入的高斯随机场。核心功能包括

  • 多种协方差函数:指数、高斯、Matérn、球形和立方协方差函数等
  • 通过mpi4py使用域分解和MPI生成分布式场
  • 使用numpy数据结构以简化与Python科学软件生态系统的集成
  • 可选的矩阵-向量积缓存
  • 易于集成到基于FEniCSx的PDE求解器中,例如(FEniCSx-based)(当前尚未作为我们CI的一部分进行测试的示例

parafields 通过 Python 绑定到 parafields-core C++ 库 来实现这些功能。以下选项在后端支持,但尚未在 Python 绑定中支持

  • axiparallel 和完全几何各向异性
  • 值转换,如对数正态、折叠正态或符号函数(游程集)
  • 为多网格/尺度方法对随机场进行粗化和细化

安装

parafields 可从 PyPI 获取,并可以使用 pip 进行安装

python -m pip install parafields

这将安装 parafields 的顺序、预编译版本。要在 MPI-并行环境中使用 parafields,您需要从源代码构建此包

python -m pip install --no-binary parafields -v parafields

这将从源代码构建包并将其链接到您的系统 MPI。

此外,parafields 定义了以下可选依赖集

  • jupyter:用于 parafields 的交互式 Jupyter 接口的所有要求
  • tests:运行 parafields 的单元测试的所有要求
  • docs:构建 parafields 的 Sphinx 文档的所有要求

这些可选依赖可以通过安装例如 parafields[jupyter] 来安装。

使用方法

这是 parafields 包的最小使用示例

Minimum usage example

有关更多示例,请查看 parafields 文档

报告问题

如果您需要 parafields 的支持或发现了错误,请考虑在 问题跟踪器 上报告错误。

贡献

parafields 欢迎外部贡献。为了获得最佳的贡献者体验,请在开始开发之前在 问题跟踪器 上打开一个问题。以这种方式宣布您的开发意图允许我们明确这是否在包的范围内。贡献通过在 GitHub 存储库上的拉取请求来完成。请还添加您的姓名到版权所有者名单。

对于 parafields 的开发安装,请使用以下说明

git clone https://github.com/parafields/parafields.git
cd parafields
python -m pip install -v --editable .[tests,docs,jupyter]

在贡献之前,请确保单元测试通过,并且新功能被单元测试覆盖。可以使用 pytest 运行单元测试

# Sequential tests
python -m pytest

# Parallel tests
mpirun --oversubscribe -np 4 python -m pytest --only-mpi

为了本地构建 Sphinx 文档,请使用以下命令

sphinx-build -t html ./doc ./html

致谢

parafields-core C++ 库 是由 Ole Klein 开发的,由德国联邦教育和研究部(Bundesministerium für Bildung und Forschung)和巴登-符腾堡州科学与艺术部(Ministerium für Wissenschaft, Forschung und Kunst Baden-Württemberg)支持。

Python 绑定由海德堡大学的科学软件开发中心实现。科学软件开发中心作为德国联邦和州政府的卓越战略的一部分得到资助。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关 安装软件包 的更多信息。

源分布

parafields-1.0.2.tar.gz (33.9 kB 查看哈希值)

上传时间

构建分布

parafields-1.0.2-cp312-cp312-win_amd64.whl (2.2 MB 查看哈希值)

上传于 CPython 3.12 Windows x86-64

parafields-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB 查看哈希值)

上传于 CPython 3.12 manylinux: glibc 2.17+ x86-64

parafields-1.0.2-cp312-cp312-macosx_10_9_x86_64.whl (2.8 MB 查看哈希值)

上传于 CPython 3.12 macOS 10.9+ x86-64

parafields-1.0.2-cp311-cp311-win_amd64.whl (2.2 MB 查看哈希值)

上传于 CPython 3.11 Windows x86-64

parafields-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ x86-64

parafields-1.0.2-cp311-cp311-macosx_10_9_x86_64.whl (2.8 MB 查看哈希值)

上传于 CPython 3.11 macOS 10.9+ x86-64

parafields-1.0.2-cp310-cp310-win_amd64.whl (2.2 MB 查看哈希值)

上传于 CPython 3.10 Windows x86-64

parafields-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ x86-64

parafields-1.0.2-cp310-cp310-macosx_10_9_x86_64.whl (2.8 MB 查看哈希值)

上传于 CPython 3.10 macOS 10.9+ x86-64

parafields-1.0.2-cp39-cp39-win_amd64.whl (2.2 MB 查看哈希值)

上传于 CPython 3.9 Windows x86-64

parafields-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB 查看哈希值)

上传时间 CPython 3.9 manylinux: glibc 2.17+ x86-64

parafields-1.0.2-cp39-cp39-macosx_10_9_x86_64.whl (2.8 MB 查看哈希值)

上传时间 CPython 3.9 macOS 10.9+ x86-64

parafields-1.0.2-cp38-cp38-win_amd64.whl (2.2 MB 查看哈希值)

上传时间 CPython 3.8 Windows x86-64

parafields-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB 查看哈希值)

上传时间 CPython 3.8 manylinux: glibc 2.17+ x86-64

parafields-1.0.2-cp38-cp38-macosx_10_9_x86_64.whl (2.8 MB 查看哈希值)

上传时间 CPython 3.8 macOS 10.9+ x86-64

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面