Skip to main content

pyvista-frd-reader

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.

Read node and element sets

Supply a companion input deck to attach boolean set masks to the result:

mesh = pyvista_frd.read("model.frd", inp_path="model.inp")
body = mesh.extract_cells(mesh.cell_data["ELSET:BODY"])
fixed = mesh.extract_points(mesh.point_data["NSET:FIXED"])

pyvista_frd.read_sets("model.inp") returns the original set IDs without an FRD file. Includes, generated ranges, and references to earlier sets are supported. See Node and element sets for naming, missing-ID behavior, and limitations.

Named surfaces

Extract faces using the companion deck’s *SURFACE definitions, with all nodal results from the active step:

reader = pyvista_frd.FRDReader("model.frd", inp_path="model.inp")
wall = reader.read_surface("WALL")
wall.plot(scalars="STRESS_Mises")
surfaces = reader.read_surfaces()  # named MultiBlock

Solid faces retain quadratic midside nodes. Shell sides, planar edges, expanded beam/shell faces, internal faces, and nodal surfaces are supported. See Named surfaces for face numbering, missing-ID handling, dataset validation, and two runnable galleries with all required result files and companion decks included in the source.

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.3.1

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.3.1
File Size Uploaded
pyvista_frd_reader-0.3.1.tar.gz 1.4 MB Details

Built distributions (wheels)

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

Total release size: 2.1 MB

Release files / pyvista_frd_reader-0.3.1.tar.gz

Download URL pyvista_frd_reader-0.3.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c76787ee8e83d6300fe6f9d749a682254f4fc10e091a99296a7d866a04669b1f
BLAKE2b-256 checksum
How to use checksums
8c872068f5838f2afea773897a038942edb0f91fa3c395d2c5f588e7092e274d
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 Oct 9, 2026.

Transparency log

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

Download URL pyvista_frd_reader-0.3.1-py3-none-win_amd64.whl
Size 135.8 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2d12e3782e1dc430b14e0152950c62a71a8034b2ea93fb42cea454096431a818
BLAKE2b-256 checksum
How to use checksums
4e95fa7063f765a267d90fc8a7a0422ff4764dcf071633f9e1fb6138534af8ba
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 Oct 9, 2026.

Transparency log

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

Download URL pyvista_frd_reader-0.3.1-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 154.0 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
847745c83ffcc2810fb2283379e603fa4dfcd364e611e96f5e30bd3f1e092999
BLAKE2b-256 checksum
How to use checksums
2523b0b53f4dad75b1f83186c2780a5306da90cc6f282d86b2d036e5994a4910
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 Oct 9, 2026.

Transparency log

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

Download URL pyvista_frd_reader-0.3.1-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 140.9 kB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5841b88ebcec8d922a0fee7e091155695b4084ad4681615f33525a7611262539
BLAKE2b-256 checksum
How to use checksums
03aae21f7cc68a8fee9bcd5160467e324a64a0a6961025d6e9f08b9bc6a0bc2a
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 Oct 9, 2026.

Transparency log

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

Download URL pyvista_frd_reader-0.3.1-py3-none-macosx_11_0_arm64.whl
Size 123.4 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9fec02806d83efbad8c2afc00e41cef52152a2d4b625ae71d33139d47020d72c
BLAKE2b-256 checksum
How to use checksums
9592f8c85abb4ba3c258c58df9f83759b3da402fdf31f7269a9ba4aa3ed6b34f
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 Oct 9, 2026.

Transparency log

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

Download URL pyvista_frd_reader-0.3.1-py3-none-macosx_10_15_x86_64.whl
Size 132.2 kB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
441e8a98430681fbdc92d231cdc1da222cb5fe41b366ac732a1ce78c3df6980d
BLAKE2b-256 checksum
How to use checksums
8b4059d27da4bab31b22d2136aa121922d9c7d99967e12d03639073f6d0ca28a
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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

6 release files

0.3.0

6 release files

0.2.2

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