geo(1rheolef) | rheolef | geo(1rheolef) |
geo - plot a finite element mesh (rheolef-7.1)
geo [options] file[.geo[.gz]]
Plot or upgrade a finite element mesh.
Plot a mesh:
geo square.geo
geo box.geo
geo box.geo -full
Plot a mesh into a file:
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.
filename
-
-name string
-Idir
-I dir
-check
-if format
-input-format format
-gnuplot
-paraview
-[no]lattice
-[no]full
-[no]fill
-[no]stereo
-[no]shrink
-[no]cut
-[no]showlabel
-round [*float*]
-geo
-upgrade
-gmsh
-image-format string
-resolution int int
-subdivide int
-add-boundary
-rz
-zr
-[no]verbose
`-[no]clean
-[no]execute
-dump
-size
-n-element
-n-vertex
-sys-coord
-hmin
-hmax
-xmin
-xmax
-min-element-measure
-max-element-measure
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
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:
letter | element type
-------|-------------
p | point
e | edge
t | triangle
q | quadrangle
T | tetrahedron
P | prism
H | 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.
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.
This documentation has been generated from file main/bin/geo.cc
Pierre Saramito <Pierre.Saramito@imag.fr>
Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Sat Mar 13 2021 | Version 7.1 |