cd /news/developer-tools/fossil-v3-0-0-is-out · home › topics › developer-tools › article
[ARTICLE · art-166122] src=fortran-lang.discourse.group ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

FOSSIL v3.0.0 is out

FOSSIL v3.0.0, a pure Fortran geometry library for simulation codes, has been released with surfaces, signed distances and level sets, immersed-boundary queries, AMR tagging, exact cut cells, curvilinear and overset grids, and moving bodies, developed with the help of an AI assistant. FOSSIL decides geometry by exact predicates rather than tolerances, and its OpenACC GPU path produces bit-exact results matching the CPU path, with the release gate reporting 0 mismatches out of 13,824 for both pseudo-normal and winding-number sign algorithms. No public name was removed in 3.0, but some routines behave differently, and an "Upgrading to 3.0" page lists each change; the library builds with FoBiS or fpm and compiles with GNU gfortran, Intel ifx, and NVIDIA nvfortran.

read3 min views1 publishedNov 9, 2026

FOrtran Surfaces, Solids, Immersed boundaries and Level sets

FOSSIL is a pure Fortran library of geometry for simulation codes, with no C underneath. It started as a small STL parser (the old name was “FOrtran Stereo Litography parser”). The last releases (2.0 to 3.0, with the help of an AI assistant) turned it into what a CFD code needs from its geometry: surfaces read and repaired, signed distances and level sets, immersed-boundary queries, AMR tagging, exact cut cells, curvilinear and overset grids, and moving bodies. Everything runs on the CPU, and the hot paths run on the GPU with results bit-exact to the CPU.

A NACA 0012 pitching through a Cartesian grid. Top: its exact cut cells. Bottom: the level sets of its signed distance. The pose is passed to the query, so the tree is never rebuilt.

analyze gives the box, volume, centroid, connectivity, shells, and bodies. Named patches come from solid <name> blocks.sanitize removes slivers and duplicates, closes gaps, and orients the normals outward. fill_holes patches and fairs the holes. Exact booleans and self-intersections, decimation, isotropic remeshing, smoothing, alpha wrapping, marching cubes. An O-grid moves through a background grid. Its holes, receptors, and orphans are recomputed every frame.

Points tracked through an O-grid by stencil walks, across its seam

An O-grid marched out of a NACA 0012 by hyperbolic extrusion.

The small cut-cell pieces of a moving ellipse and their merge targets, every frame.

Conservative advancement to the time of impact. The plain bound takes 25 steps; the directional bound takes 5.

FOSSIL decides geometry by exact predicates, not tolerances. orient2d and orient3d use exact expansion arithmetic. Booleans and self-intersections are built on implicit points (line-plane and three-plane intersections) and constrained triangulations, so they need no epsilon. Grid-line crossings use one global symbolic perturbation, which makes ties consistent across the x, y, and z axes.

A block drilled nine times. Each step is checked by an independent boolean: the volume residual stays at round-off and the result stays watertight.

use fossil, only : surface_stl_object, SIGN_FAST_WINDING_NUMBER

call surface%load_from_file(file_name='dragon-placed.stl', guess_format=.true.)
do k = 0, 4
   p(k) = 0._R8P * ex_R8P + (-0.6_R8P + 0.3_R8P * k) * ey_R8P + 0._R8P * ez_R8P
   d_pn = surface%distance(point=p(k), is_signed=.true., is_square_root=.true.)
   d_wn = surface%distance(point=p(k), is_signed=.true., is_square_root=.true., sign_algorithm=SIGN_FAST_WINDING_NUMBER)
   inside(k) = surface%is_point_inside(point=p(k), sign_algorithm=SIGN_FAST_WINDING_NUMBER)
   print '(F7.3,2F15.6,L5)', p(k)%y, d_pn, d_wn, inside(k)
enddo
y      d (pseudo-n.)  d (winding n.) inside
 -0.600       0.150398       0.150398    F
 -0.300      -0.000289      -0.000289    T
  0.000      -0.015419      -0.015419    T
  0.300      -0.002330      -0.002330    T
  0.600       0.114892       0.114892    F

The device path is OpenACC with nvfortran. Distances, rich IB queries, AMR box tagging, posed queries, deviation and block location share their kernels with the CPU path. Every device result is compared with the host result, and the gate is zero mismatches:

pseudo-normal : device vs host mismatches 0 of 13824
winding number: device vs host mismatches 0 of 13824

The documentation has a 16-chapter tutorial (the GPU is the last chapter), a cookbook, a reference page with design notes for each feature, and an Upgrading to 3.0 page. No public name was removed in 3.0, but some routines behave differently; that page lists each change.

FOSSIL builds with FoBiS or fpm and compiles with GNU gfortran, Intel ifx, and NVIDIA nvfortran (OpenACC on the device). It is multi-licensed (GPL v3, BSD 2-Clause, BSD 3-Clause, MIT): pick the one that fits you.

Feedback, issues, and contributions are welcome.

Stefano

── more in #developer-tools 4 stories · sorted by recency
── more on @fossil 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/fossil-v3-0-0-is-out] indexed:0 read:3min 2026-11-09 · —