Skip to content

Feature map ​

Everything FOSSIL does, grouped as the reference is grouped. Each row names the entry point, the reference page and, where there is one, the tutorial chapter that uses it. Every public operation is a type-bound procedure of one of four types, surface_stl_object, curve_object, distance_field_object and facet_object, or a free procedure of a module of its own (named in the row); use fossil re-exports the types and the named constants.

Surfaces ​

CapabilityEntry pointReferenceTutorial
Load ASCII or binary STL, format detected, NaN/Inf rejected, optional clip boxsurface%load_from_fileI/O, analysis, manipulation1
Save ASCII or binary STLsurface%save_into_fileI/O, analysis, manipulation1
Bounding box, volume, centroid, connectivity, shells and bodies, pseudo-normals, AABB treesurface%analyze (run by load, sanitize, clip)I/O, analysis, manipulation1
Validity: watertight, manifold, closed volumeis_watertight, is_manifold, is_volumeI/O, analysis, manipulation2
Repair: slivers, duplicates, gaps, orientation, one warning per defect classsurface%sanitizeI/O, analysis, manipulation2
Hole filling (Liepa minimum-weight patches, refinement, thin-plate fairing)surface%fill_holesHole filling2
Translate, rotate, mirror, resize, clip, mergetranslate, rotate, mirror, resize, clip, merge_solidsI/O, analysis, manipulation3
Self-intersection detection and resolution (exact pair_cut, exact predicates)find_self_intersections, resolve_self_intersectionsSelf-intersection
Booleans: union, intersection, difference, symmetric difference (Zhou et al. 2016)surface%booleanBoolean operations
Quadric decimation (Garland and Heckbert 1997)surface%decimateMesh decimation
Isotropic remeshing, optional feature preservation (Botsch and Kobbelt 2004)surface%isotropic_remeshIsotropic remeshing
Explicit and Taubin smoothingsurface%smoothMesh smoothing
Alpha wrapping: a watertight surrogate of any triangle soup (Portaneri et al. 2022)surface%alpha_wrapAlpha wrapping
Isosurface extraction (Lorensen and Cline 1987)extract_isosurfaceMarching cubes
Shape-diameter segmentation (Shapira et al. 2008)surface%segment_sdfSDF segmentation
Cotangent Laplacian and barycentric masssurface%cotangent_laplacianCotangent Laplacian
Gaussian and mean curvature per vertex; pointwise O(h²) by a cubic jet fitgaussian_curvature, mean_curvature, jet_curvaturePer-vertex curvature
Mass, centre of mass, inertia tensor, principal axes (exact polyhedral integrals); 2-D second momentssurface%mass_properties, curve%mass_properties, inertia_to_world, principal_frameMass properties
Surface deviation: one-sided and symmetric Hausdorff distance, mean, rms, per-vertex distancesurface%deviation, surface%hausdorff, curve%deviation, curve%hausdorffSurface deviation
Feature edges: sharp, boundary and non-manifold edges, corners, polylines; refinement and distances along them; 2-D cornerssurface%feature_edges, build_features, box_feature_many, tag_block(feature_tags=), query_many(feature_distances=), curve%feature_cornersFeature edges
Local thickness and gaps per facet: ray (shape diameter) and medial (shrinking ball); thin regions under a cell size; refinement of thin wallssurface%thickness, thin_regions, build_thin, box_thin_many, tag_block(thin_tags=), curve%thicknessThickness and gaps
Named patches: one per solid block or per file, kept on every facet; multi-solid ASCII outputload_from_files, get_patches_number, patch_name, facet_patch, set_patchNamed patches
Distance between two bodies: closest facets and points, contact; bit-identical to brute forcesurface%distance_toBody–body distance
Time of first contact of moving bodies over a step: certified (never late, no tunnelling), several bodies, 2-D twinssurface%time_of_impact, curve%time_of_impact, first_impact, first_impact_2dContinuous collision detection

Distance and signs ​

CapabilityEntry pointReferenceTutorial
Signed or unsigned distance of a point, bit-exact against brute forcesurface%distanceI/O, analysis, manipulation4
Closest facet, edge, vertex, point and normalsurface%compute_distanceI/O, analysis, manipulation4
Inside or outsidesurface%is_point_insideSign algorithms benchmark4
Four sign algorithms: pseudo-normal (default), ray parity, solid angle, fast winding numbersign_algorithm=Sign algorithms benchmark4
Generalized and fast winding number (Jacobson 2013, Barill 2018)surface%winding_numberWinding number
Batched distances, OpenMP-parallel and bit-exact with serialsurface%distance_manyI/O, analysis, manipulation5
SAH BVH (default) or octree accelerationaabb_tree_kind=I/O, analysis, manipulation5
Ray queries: first hit, all hits, any hitintersect_ray_first, _all, _anyRay queries
Signed-distance field on a stretched grid: exact band, flood-fill signs, fast sweepingdistance_field_object%computeSigned-distance fields6
Eikonal diagnostic of a fielddistance_field_object%gradient_diagnosticSigned-distance fields

Immersed boundaries ​

CapabilityEntry pointReferenceTutorial
2-D curves: closed and open polylines, segment BVH, signed distance, 2-D winding number, repaircurve_object2-D geometry7
Axis-aligned section of an STL as a curveslice_surface2-D geometry7
Rich queries: closest point, feature, pseudo-normal, body; ambiguous feet; wall curvaturequery_point, query_manyImmersed-boundary queries8
Image points and probes with a visibility testimage_points, probe_manyImmersed-boundary queries8
Wall distance with body id and early cutoffwall_distance_manyImmersed-boundary queries
Grid-adapted markerssurface_markers, curve_markersImmersed-boundary queries
AMR block and cell classification: cut, near, inside, outsidebox_classify_manyAMR tagging9
Signed tag bands on a blocktag_blockAMR tagging9
Exact grid-line crossings and wall fractionsline_crossings, cell_wall_fractionsCut-cell geometry
2-D cut cells: fractions, apertures, centroids, wetted boundary, piecescurve%cut_cellsCut-cell geometry10
3-D cut cells: face fractions, volumes, fluid pieces with their own measurescut_cells_3d (module fossil_cut_cells_3d)Cut-cell geometry10
Cut-cell solver support: piece links, state- and flux-redistribution neighbourhoods, merge targetscut_links_2d, cut_cells_3d(links=), srd_neighbourhoods, frd_neighbourhoods, merge_targetsCut cells: solver support
Cut-cell moments up to order 4, quadrature rules, edge fractions, exact coarseningcut_cells_3d(moments_order=, quadrature=, edges=), curve%cut_cells(moments_order=, quadrature=), cut_coarsen_3d, cut_coarsen_2dCut cells: solver support
Curvilinear structured blocks: topology records (seams, cuts, poles, periodic, interfaces) and their detectioncurvilinear_block_t, curvilinear_block_2d_t, detect_topologyCurvilinear blocks
Exact cell geometry, certified cell validity, quality metricsgeometry, validity, qualityCurvilinear blocks
Point location in curvilinear blocks (robust, walking, GPU) and Lagrange stencils of width qlocate_many, locate_many_device, locate_in_blocks, stencilsCurvilinear blocks
Overset cutters and hole cutting: wall cutters with trimming, exact hole flags (CPU and GPU), hole maps, X-rayswall_cutter, hole_flags, hole_map, xray_flagsOverset assembly
Overset donors and classification: candidates with quality (CPU and GPU), pair matrix, explicit and implicit selection, fringes, orphans by cause, overlap width, wall projection, moving grids, connectivity outputdonor_candidates, classify, fringe_levels, wall_projection, exposed_points, build_connectivityOverset assembly
Rigid poses, body-frame queries, O(N) tree refitrigid_pose_t, pose=, moveMoving bodies11
Swept geometry of a time step: exact swept volumes, time-averaged aperturesswept_cells_2d, swept_cells_3dMoving bodies11

GPU ​

CapabilityEntry pointReferenceTutorial
Distance, rich queries, wall distance, box classification, posed queries on the device (OpenACC), bit-exact against the CPU pathenter_device, *_device, exit_deviceGPU queries12

fossilizer CLI ​

src/app/fossilizer.f90 wraps the library for the command line: load one or more STL files, clip, merge, mirror, rotate, translate, resize, sanitize and repair connectivity, print statistics and, with --mass_properties [--density ρ], the mass properties of a closed body, or with --compare other.stl, the certified Hausdorff distance to another surface, or with --distance other.stl, the body–body distance, or with --patches prefix, the named patches (one STL per patch), or with --features file.vtk, the feature edges and corners, or with --thickness file.vtk [--thickness_method ray|medial] [--h h --thin_factor f], the thinnest wall, the narrowest gap and the facets thinner than the cell; save the result.

Compilers ​

CompilerStatus
GNU gfortran 14.3+ (14 series) or ≥ 15.1Supported (13.x and 14.0–14.2 untested, see Installation)
Intel Fortran ≥ 16.xSupported
NVIDIA HPC Fortran (nvfortran) ≥ 26.9The device build of the GPU queries, compiled without FMA contraction

Design principles ​

  • Pure Fortran: no C extensions, no system calls beyond standard I/O.
  • Exact where it decides: orientation predicates are exact (orient2d, orient3d); tree-accelerated queries equal brute force bit for bit; the GPU path equals the CPU path bit for bit.
  • OOP and TDD: every operation is a type-bound procedure, every public operation is exercised by a test in src/tests/.
  • Free and open source: multi-licensed for FOSS and commercial use.