A simple to use Fortran library that produces 2D meshes given a description of a geometry.
Software that does something similar. I would also accept softwares that are harder to use but are ubiquitous in numerical computing.
For context, I am studying Fortran and FEM. I am currently learning FEM through Bengzon and Larson’s book while implementing the material in Fortran. I am familiar with static libraries but not so much with dynamic libraries.
Some grid generation texts have companion software you can download
(if you can find the current website). The software is usually in Fortran or C.
Here are a couple.
Knupp&Steinberg, Fundamentals of Grid Generation
Zip file with Fortran 77 code is at
Farrashkhalvat & Miles, Basic Structured Grid Generation (with intro to unstructured grid generation). Used to be a Butterworth-Heinemannm book but I think its Elsevier now. Unfortunately the companion web site for the source code given on the back cover appears to be no longer valid. I have the code somewhere but am not sure if its legal to redistrubute it. You can contact Elsevier to see if they can point you to the code
I think the book by Liseiken, Grid Generation Methods, Springer-Verlag also has companion software but I can’t find a link to it on the Springer Web site.
Also, about 12 years or so ago I wrote some Fortran C-Interop interfaces to Shewchuk’s Triangle code. I’ll upload it to github if enough folks are interested.
You would probably be better off using a full blown FEM mesh generator like GMSH (https://gmsh.info). I think it supports 2D as well as 3D meshes (triangles, quads etc) and
also supports higher-order versions of these elements. Most of the open-source CFD and FEM codes written in Fortran (and other languages) have a GMSH reader (for at least the version 2 file format). For the V2 file format, programming you own reader is fairly straightforward.