geo(1rheolef)
geo(1rheolef) π
okay bestie, welcome to geo, the rheolef-7.2 era icon that plots (and upgrades) finite element meshes. she's giving main character energy and she's about to explain everything. sit down, grab a strawberry π, and let's go.
β¨ NAME β¨
geo β plot a finite element mesh (rheolef-7.2)
πΈ SYNOPSIS πΈ
geo [options] file[.geo[.gz]]
π¦ DESCRIPTION π¦
Plot or upgrade a finite element mesh. that's it, that's the vibe. plot it, or glow it up to a newer format. π
β EXAMPLES β
Plot a mesh, iconic behaviour:
geo square.geo
geo box.geo
geo box.geo -full
Plot a mesh into a file (no screen, just vibes on disk):
geo square.geo -image-format png
Convert from a old geo file format to the new one:
geo -upgrade - < square-old.geo > square.geo
See below for the geo file format specification. The old file format does not contains edges and faces connectivity in 3d geometries, or edges connectivity in 2d geometries. The converter add it automatically into the upgraded file format. Conversely, the old file format is useful when combined with a translator from another file format that do not provides edges and faces connectivity.
π INPUT FILE SPECIFICATION π
filenameβ Specifies the name of the file containing the input mesh. The.geosuffix extension is assumed.-β Read mesh on standard input instead on a file. (yes, a literal dash, she's minimal like that π )-name stringβ When mesh comes from standard input, the mesh name is not known and is set tooutputby default. This option allows one to change this default. This option is useful when dealing with output formats (graphic, format conversion) that creates auxiliary files, based on this name.-Idir,-I dirβ Add dir to the Rheolef file search path. This mechanism initializes a search path given by the environment variableRHEOPATH. If the environment variableRHEOPATHis not set, the default value is the current directory.-checkβ Check the mesh file: numbering, bounds and that for all element, its orientation is positive.
π INPUT FORMAT OPTIONS π
-if format,-input-format formatβ Load mesh in a given file format. Supported input formats are:geo,bamg,vtk.
π§ RENDER SPECIFICATION π§
-gnuplotβ Use the gnuplot tool. This is the default for 1D geometry.-paraviewβ Use the paraview tool. This is the default for 2D and 3D geometries.
π RENDER OPTIONS π
-[no]latticeβ When using a high order geometry, the lattice inside any element appears. Default is on.-[no]fullβ All internal edges appears, for 3d meshes. Default is off.-[no]fillβ Fill mesh faces using light effects, when available.-[no]stereoβ Rendering mode suitable for red-blue anaglyph 3D stereoscopic glasses. Option only available with paraview.-[no]shrinkβ shrink elements (with paraview only).-[no]cutβ cut by plane and clip (with paraview only).-[no]showlabelβ Show or hide labels, boundary domains and various annotations. By default, domains are showed with a specific color.-round [*float*]β Round the input up to the specified precision. This option, combined with-geo, leads to a round filter. Useful for non-regression test purpose, in order to compare numerical results between files with a limited precision, since the full double precision is machine-dependent.
π₯ OUTPUT FORMAT OPTIONS π₯
-geoβ output mesh on standard output stream in geo text file format, instead of plotting it.-upgradeβ Convert from a old geo file format to the new one.-gmshβ Output mesh on standard output stream in gmsh text file format, instead of plotting it.-image-format stringβ The argument is any valid image format, such as bitmappng,jpg,gif,tif,ppm,bmpor vectorialpdf,eps,ps,svgimage file formats. this option can be used with the paraview and the gnuplot renders. The output file is e.g.basename.pngwhenbasenameis the name of the mesh, or can be set with the-nameoption.-resolution int intβ The two arguments represent a couple of sizes, for the image resolution, e.g.1024and768for a 1024x768 image size. This option can be used together with the-image-formatfor any of the bitmap image formats. This option requires the paraview render.
π OTHERS OPTIONS π
-subdivide intβ Subdivide each edge in k parts, where k is the prescribed argument. The new vertices are numbered so that they coincide with the Pk Lagrange nodes. It can be combined with the-geooption to get the subdivided mesh. In that case, default value is1, i.e. no subdividing. It can also be combined with a graphic option, such that-gnuplotorparaview: When dealing with a curved high order geometry, k corresponds to the number of points per edge used to draw a curved element. In that case, this option is activated by default and value is the curved mesh order.-add-boundaryβ Check for a domain namedboundary. If this domain does not exists, extract the boundary of the geometry and append it to the domain list. This command is useful for mesh converted from generators, as bamg, that cannot have more than one domain specification per boundary edge.-rz,-zrβ Specifies the coordinate system. Useful when converting from bamg or gmsh format, that do not have any coordinate system specification.-[no]verboseβ Print messages related to graphic files created and command system calls (this is the default).-[no]cleanβ Clear temporary graphic files (this is the default).-[no]executeβ Execute graphic command (this is the default). The-noexecutevariant is useful in conjunction with the-verboseand-nocleanoptions in order to modify some render options by hand.-dumpβ Used for debug purpose.
π INQUIRE OPTIONS π
-size,-n-elementβ Print the mesh size, i.e. the number of elements and then exit.-n-vertexβ Print the number of elements and then exit.
ngl bestie, that's literally what the page says. i'm just the messenger π«Ά
-sys-coordβ Print the coordinate system and then exit.-hmin,-hmaxβ Print the smallest (resp. largest) edge length and then exit.-xmin,-xmaxβ Print the bounding box lower-left (resp. top-right) corner and exit.-min-element-measure,-max-element-measureβ Print the smallest (resp. largest) element measure and then exit.
π« FILE FORMAT CONVERSION π«
For the gmsh and bamg mesh generators, automatic file conversion is provided by the msh2geo and bamg2geo commands (see bamg2geo_1 and msh2geo_1 ).
For conversion from the .vtk legacy ascii file format to the .geo one, simply writes:
geo -if vtk -geo - < input.vtk > output.geo
π¦ THE GEO FILE FORMAT π¦
This is the default mesh file format. It contains two entities, namely a mesh and a list of domains. The mesh entity starts with the mesh keyword, that should be at the beginning of a line. It is followed by the geo format version number: the current mesh format version number is 4. Next comes the header, containing global information: the space dimension (e.g. 1, 2 or 3), the number of nodes and the number of elements, for each type of element (tetrahedron, etc). When dimension is three, the number of faces (triangles, quadrangles) is specified, and then, when dimension is two or three, the number of edges is also specified. Follows the node coordinates list and the elements connectivity list. Each element starts with a letter indicating the element type:
pβ pointeβ edgetβ triangleqβ quadrangleTβ tetrahedronPβ prismHβ hexahedron
Then, for each element, comes the vertex indexes. A vertex index is numbered in the C-style, i.e. the first index started at 0 and the larger one is the number of vertices minus one. A sample mesh writes:
mesh
4
header
dimension 2
nodes 4
triangles 2
edges 5
end header
0 0
1 0
1 1
0 1
t 0 1 3
t 1 2 3
e 0 1
e 1 2
e 2 3
e 3 0
e 1 3
Note that information about edges for 2d meshes and faces for 3d one are required for maintaining P2 and higher order approximation fields in a consistent way: degrees of freedom associated to sides requires that sides are well defined.
The second entity is a list of domains, that finishes with the end of file. A domain starts with the domain keyword, that should be at the beginning of a line. It is followed by the domain name, a simple string. Then, comes the domain format version: the current domain version number is 2. Next, the domain dimension and its number of elements. Finally, the list of elements: they are specified by the element index in the mesh, preceded by its orientation. A minus sign specifies that the element (generally a side) has the opposite orientation, while the plus sign is omitted. A sample domain list writes:
domain
bottom
2 1 1
0
domain
top
2 1 1
2
Copy and paste the previous sample mesh data in a file, e.g. 'square.geo'. Be carreful for the 'mesh' and 'domain' to be at the beginning of a line. Then enter:
geo square.geo
and the mesh is displayed.
π THE SIMPLIFIED GEO FILE FORMAT π
Information about edges for 2d meshes and faces for 3d one is not provided by most mesh generators (e.g. gmsh or bamg). It could be complex to build this list, so a simplified file format is also supported, without faces and/or edges connectivity, and the geo command proposes to build it automatically and save it in a more complete, upgraded geo file.
The simplified version of the previous mesh is:
mesh
4
header
dimension 2
nodes 4
triangles 2
end header
0 0
1 0
1 1
0 1
t 0 1 3
t 1 2 3
The domain list is no more able to refer to existing sides: edges are simply listed by their complete connectivity, thanks to the domain format version number 1. For the previous example, we have:
domain
bottom
1 1 1
e 0 1
domain
top
1 1 1
e 2 3
Copy and paste the previous simplified sample mesh data in a file, e.g. square0.geo. Be carreful for the mesh and domain keywords to be at the beginning of a line. Then enter:
geo -upgrade -geo square0.geo
and the previous mesh with its complete connectivity is displayed: edges has been automatically identified and numbered, and domains now refers to edge indexes.
β¨ IMPLEMENTATION β¨
okay bestie, this whole doc? literally generated straight out of the source file main/bin/geo.cc β that's where the magic lives, that's the whole vibe check. π
π AUTHOR π
the absolute icon who wrote this:
- Pierre Saramito β
Pierre.Saramito@imag.fr
ngl, credit where credit is due, they ate. π
π COPYRIGHT π
okay so legally we gotta say this and we're gonna say it with our whole chest:
- Copyright (C) 2000-2018 Pierre Saramito
<Pierre.Saramito@imag.fr> - GPLv3+: GNU GPL version 3 or later β
http://gnu.org/licenses/gpl.html
π fr fr, this is free software: you're literally free to change it and redistribute it. do whatever, bestie.
π but hear me β there is NO WARRANTY, to the extent permitted by law. like, none. zero. not a crumb. so don't come for anyone if it goes sideways, okay? π«Ά
and that's the whole page, bestie!! πβ¨ this one came from the rheolef source, Version 7.2, and yeah β it's geo(1rheolef), the one and only. now go make some gorgeous meshes, you main character. ππ¦πΈπ
π¦ where this page comes from
- debian trixie: rheolef 7.2-4 Β· GPL-3.0-or-later
- ubuntu noble: rheolef 7.2-3build5 Β· GPL-3.0-or-later
- ubuntu questing: rheolef 7.2-4build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms