{"slug": "fossil-v3-0-0-is-out", "title": "FOSSIL v3.0.0 is out", "summary": "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.", "body_md": "FOrtran Surfaces, Solids, Immersed boundaries and Level sets\n\nFOSSIL 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.\n\n*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.*\n\n`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.\n*An O-grid moves through a background grid. Its holes, receptors, and orphans are recomputed every frame.*\n\n*Points tracked through an O-grid by stencil walks, across its seam*\n\n*An O-grid marched out of a NACA 0012 by hyperbolic extrusion.*\n\n*The small cut-cell pieces of a moving ellipse and their merge targets, every frame.*\n\n*Conservative advancement to the time of impact. The plain bound takes 25 steps; the directional bound takes 5.*\n\nFOSSIL 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.\n\n*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.*\n\n```\nuse fossil, only : surface_stl_object, SIGN_FAST_WINDING_NUMBER\n\ncall surface%load_from_file(file_name='dragon-placed.stl', guess_format=.true.)\ndo k = 0, 4\n   p(k) = 0._R8P * ex_R8P + (-0.6_R8P + 0.3_R8P * k) * ey_R8P + 0._R8P * ez_R8P\n   d_pn = surface%distance(point=p(k), is_signed=.true., is_square_root=.true.)\n   d_wn = surface%distance(point=p(k), is_signed=.true., is_square_root=.true., sign_algorithm=SIGN_FAST_WINDING_NUMBER)\n   inside(k) = surface%is_point_inside(point=p(k), sign_algorithm=SIGN_FAST_WINDING_NUMBER)\n   print '(F7.3,2F15.6,L5)', p(k)%y, d_pn, d_wn, inside(k)\nenddo\ny      d (pseudo-n.)  d (winding n.) inside\n -0.600       0.150398       0.150398    F\n -0.300      -0.000289      -0.000289    T\n  0.000      -0.015419      -0.015419    T\n  0.300      -0.002330      -0.002330    T\n  0.600       0.114892       0.114892    F\n```\n\nThe 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:\n\n```\npseudo-normal : device vs host mismatches 0 of 13824\nwinding number: device vs host mismatches 0 of 13824\n```\n\nThe documentation has a 16-chapter [tutorial](https://szaghi.github.io/FOSSIL/manual/tutorial/01-first-surface) (the GPU is the last chapter), a [cookbook](https://szaghi.github.io/FOSSIL/manual/cookbook), a reference page with design notes for each feature, and an [Upgrading to 3.0](https://szaghi.github.io/FOSSIL/guide/upgrading-3) page. No public name was removed in 3.0, but some routines behave differently; that page lists each change.\n\nFOSSIL 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.\n\nFeedback, issues, and contributions are welcome.\n\nStefano", "url": "https://wpnews.pro/news/fossil-v3-0-0-is-out", "canonical_source": "https://fortran-lang.discourse.group/t/fossil-v3-0-0-is-out/11287#post_1", "published_at": "2026-11-09 09:53:05+00:00", "updated_at": "2026-11-09 10:23:14.896002+00:00", "lang": "en", "topics": ["developer-tools", "ai-research"], "entities": ["FOSSIL", "OpenACC", "nvfortran", "gfortran", "ifx", "FoBiS", "fpm", "NACA 0012"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/fossil-v3-0-0-is-out", "markdown": "https://wpnews.pro/news/fossil-v3-0-0-is-out.md", "text": "https://wpnews.pro/news/fossil-v3-0-0-is-out.txt", "jsonld": "https://wpnews.pro/news/fossil-v3-0-0-is-out.jsonld"}}