Skip to main content

Read and write CalculiX FRD files with PyVista. The Python API returns a pyvista.UnstructuredGrid; the C API exposes the same parser without a Python dependency.

import pyvista_frd

mesh = pyvista_frd.read("result.frd")
mesh.plot(scalars="STRESS_Mises")

Install

pip install pyvista-frd-reader

Wheels are available for Linux, macOS, and Windows. Linux wheels require glibc 2.28 or newer. A source build requires CMake and a C++17 compiler. There is no pure-Python fallback.

Read time steps

Use FRDReader when a file contains more than one result step:

reader = pyvista_frd.FRDReader("transient.frd")
print(reader.time_values)

reader.set_active_time_point(3)
mesh = reader.read()

The reader implements PyVista’s time-reader interface. Result blocks are indexed when the file is opened and parsed when their step is first read.

Write and convert files

pyvista_frd.write("result_ascii.frd", mesh)
pyvista_frd.write("result_binary.frd", mesh, binary=True)

# Convert the records without building a PyVista mesh.
pyvista_frd.convert("result_binary.frd", "result_ascii.frd", binary=False)

ASCII output stores six significant digits. Binary output is smaller and retains the stored floating-point values. See Writing FRD for format and round-trip details.

Supported FRD data

The reader supports the two ASCII encodings and the float32 and float64 binary encodings. It reads short and long element records, including fixed-width records whose node IDs have no separating spaces.

Supported element types are HE8, PE6, PE15, TE4, HE20, TE10, TR3, TR6, QU4, QU8, BE2, BE3, PY5, and PY13. PY5 and PY13 are the experimental CalculiX pyramid types C3D5 and C3D13.

For each six-component array whose name contains STRESS or STRAIN, the reader adds:

  • <NAME>_Mises: von Mises magnitude

  • <NAME>_sgMises: von Mises magnitude signed by the tensor trace

  • <NAME>_PS1, _PS2, and _PS3: principal values, largest first

Invalid and unsupported elements produce pyvista.InvalidMeshWarning with the source line number. Points use float64 storage. VTK cell connectivity uses 32-bit storage when it fits, otherwise 64-bit storage.

Relationship to PyVista

PyVista includes a Python FRD reader. This package provides a separate C++ implementation and does not replace pyvista.FRDReader or register itself as the handler for pyvista.read.

The conformance suite compares the two readers file by file and array by array. The current external sweep covers 1,766 files with no undocumented divergences. The principal-value comparison uses a numerical tolerance because the implementations use different eigensolvers. Binary FRD is checked against paired ASCII and binary output from CalculiX because PyVista’s reader supports ASCII only.

See Parity for the corpus, method, results, and limitations. See Divergences for the exact behavioral and numerical differences.

C API

The public header is cpp/include/pvfrd/pvfrd.h. It uses a C ABI and can be called from C, C++, or another language with a foreign-function interface.

cmake -S cpp -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
#include <pvfrd/pvfrd.h>

pvfrd_file *file = NULL;
if (pvfrd_open("mesh.frd", &file) != PVFRD_OK) { /* handle error */ }

const double *points = pvfrd_points(file);
uint64_t n_points = pvfrd_n_points(file);

pvfrd_close(file);

The shared library has no additional link dependencies. Static linking with GCC or Clang also requires -lstdc++ -lm.

Development

cmake -S cpp -B cpp/build -DPVFRD_BUILD_TESTS=ON
cmake --build cpp/build
./cpp/build/pvfrd_tests

pip install -e .[tests]
pytest

The C++ and Python suites share the fixtures in tests/fixtures. tools/mutate.py applies known parser and writer defects and verifies that the intended tests fail.

Documentation

The documentation includes installation, examples, the Python and C APIs, format notes, and verification results.

Credit

Rafal (@3rav) wrote PyVista’s original FRD reader in pyvista#8255. This package reimplements that behavior and vendors the PyVista reader as its conformance reference. Guido Dhondt and Klaus Wittig created CalculiX and its FRD format. See History and credit.

License

This project is MIT licensed. The vendored fast_float header is available under Apache-2.0, MIT, or BSL terms.

Metadata

Release files for pyvista-frd-reader 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvista-frd-reader 0.2.2
File Size Uploaded
pyvista_frd_reader-0.2.2.tar.gz 478.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyvista-frd-reader 0.2.2
File
pyvista_frd_reader-0.2.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details
pyvista_frd_reader-0.2.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
pyvista_frd_reader-0.2.2-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details

Total release size: 1.1 MB

Release files / pyvista_frd_reader-0.2.2.tar.gz

Download URL pyvista_frd_reader-0.2.2.tar.gz
Size 478.9 kB
Tags Source
SHA-256 checksum
How to use checksums
68b678703fb7288d540ad54fcbc5b875ba56a0e46e1b317bb7f2d682feae24ae
BLAKE2b-256 checksum
How to use checksums
d4223d558d09af595e8cebcd98898650df6a387add55927d57741e895ec4c003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pyvista_frd_reader-0.2.2-py3-none-win_amd64.whl

Download URL pyvista_frd_reader-0.2.2-py3-none-win_amd64.whl
Size 125.1 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4a8266d267e12fb40c279ff181ec32a970d385bf0fc513b892441b97256a392f
BLAKE2b-256 checksum
How to use checksums
37ad6ff3d7bae2d922ef1167df74b1bcefb984def312b7faae50be8b958c9b9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 143.7 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e0312ae7152b23de9f105b58dc36485a9349e3cbf1f015ffbda69dbe7ebcbc81
BLAKE2b-256 checksum
How to use checksums
ffa46f81e4c73360690738cd81d30ddd775ddc7642b4771b9a919fb11888795d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL pyvista_frd_reader-0.2.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 130.9 kB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
466c631a88ffa3131405929b7039ce4d77c5f268d604f473b225ff9220a1c395
BLAKE2b-256 checksum
How to use checksums
80295405fee63772e014c7d6120c2d430029da9a70cb97040726c1758018a51b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pyvista_frd_reader-0.2.2-py3-none-macosx_11_0_arm64.whl

Download URL pyvista_frd_reader-0.2.2-py3-none-macosx_11_0_arm64.whl
Size 112.8 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
03749eb535feba6c5a1e515799483acfdb6263d6c0a505bad8fbb67c4bf6a4f4
BLAKE2b-256 checksum
How to use checksums
2524ae9eaf45f1f0c06024ed8a55a16754e3b85da2aabd401e81142948bb77d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / pyvista_frd_reader-0.2.2-py3-none-macosx_10_15_x86_64.whl

Download URL pyvista_frd_reader-0.2.2-py3-none-macosx_10_15_x86_64.whl
Size 121.5 kB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
4a71a2462d3a237c974a489b72bf173b454c2c2cc13fc9cd55433fdae70d7a41
BLAKE2b-256 checksum
How to use checksums
8968cdacb294d7da8906a45f8f93366351d65141633a4c1362563355fe94e63d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

6 release files

0.3.0

6 release files

This release

0.2.2 This release

6 release files

0.2.1

6 release files

0.2.0

6 release files

0.1.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page