bamg(1rheolef) | rheolef | bamg(1rheolef) |
bamg - bidimensional anisotropic mesh generator (rheolef-7.1)
bamg [options] -g file[.bamgcad] -o ouput.bamg
bamg -g toto.bamgcad -o toto.bamg
This command generates the mesh of a square ]1,1[^2 with a mesh size h=0.666
at all vertices. The geometry in defined in the following square.bamgcad
file:
MeshVersionFormatted 0
Dimension 2
Vertices 4
-1 -1 1
1 -1 2
1 1 3
-1 1 4
Edges 4
1 2 1
2 3 2
3 4 3
4 1 4
hVertices
0.666 0.666 0.666 0.666
The file starts with vertices, coordinates and identifier. Then come the
boundary edges, using vertices identifiers and defining a boundary edge
identifier.
This software present five modes of action:
Create a mesh from a geometry. For instance:
bamg -g toto.bamgcad -o toto.bamg
The create mode supports the following options:
-g filename
-o filename
In addition, optional parameter can be added to specify a metric or the
quality improvement. All these options are described below.
Adapt a mesh from a background mesh using a metric or solution file. For instance:
bamg -b toto_bgd.bamg -Mbb toto_bgd_sol.bb -o toto_new.bamg
The adapt mode supports the following options:
-b filename
-Mbb filename
-MBB filename
-M filename
-o filename
In addition, optional parameter can be added to control the metric generation and the quality improvement. All these options are described below.
Construct a metric file for an existing mesh and with a provided solution. This option can be used without generating a new mesh, e.g. if you have another mesh generator. For instance:
bamg -r toto_bgd.bamg -Mbb toto_bgd_sol.bb -oM toto_bgd.metric
The metric build mode supports the following options:
-r filename
--Mbb filename
--MBB *filename
-oM filename
In addition, optional parameter can be added to control the metric generation. All these options are described below.
Improve quality for an existing mesh and generate a new mesh. For instance:
bamg -r toto_bgd.bamg -M toto_bgd.metric -o toto_new.bamg
The quality improvement mode supports the following options:
-r filename
-M filename
-o filename
In the adaption process, a solution has been computed with the background mesh. In order to transfer the solution of the problem under consideration on the new generated mesh, an interpolation of old solution is necessary. This transferred solution may be a good initial guess for the solution on the new mesh. This interpolation is carried out in a P1 Lagrange context.
bamg -b toto_old.bamg -rbb toto_old.bb -r toto_new.bamg -obb toto_new.bb
The interpolation mode supports the following options:
-b filename
-rbb filename
-rBB *filename
-r filename
-wbb filename
-wBB filename
-hmax float
-hmin float
-errg float
-nbv int
These options are relevant when computing a metric from a scalar field provided in a .bb file. Notice that, when providing a tensor metric in the .bb file, the metric computation is not performed and these options are not relevant.
-RelError
1 |H(x)| M(x) = ---------- -------------------- err*coef^2
max(CutOff,|eta(x)|)
-AbsError
1 |H(x)| M(x) = ---------- --------------------- err*coef^2 (sup(eta) -
inf(eta))
-coef float
-err float
-CutOff float
-power float
-NbJacobi int
-ratio float
-aniso
-iso The -anio enforces the metric to be anisotropic. This is the
default. Conversely, the metric may be of isotropic type with the -iso
flag.
-anisomax float
-hminaniso float
-maxsubdiv float
-KeepBackVertices
-noKeepBackVertices
-NoRescaling
-Rescaling
-NbSmooth int
-omega float
-splitpbedge
-nosplitpbedge
-thetaquad float
-2
-2q
-o filename
-oamdba *filename
-oftq *filename
-omsh *filename
-oam_fmt *filename
-oam *filename
-onopo *filename
-thetamax float
-v int
The general structure allows one to specify a mesh describing the geometry of the given domain. The identification of the boundaries are used to define boundary conditions for a partial derivative equation problem. In this case, some of the above sections are not relevant. First the required sections are:
MeshVersionFormatted 0
Dimension 2
Vertices nv
{x_k y_k i_k} k=1:nv
Edges ne
{i_l j_l k_l} l=1:ne
Next, the optional sections:
SubDomain nd
{2 ie_k orient id_k} k=1:nd
A sub-domain, i.e. a bounded connex components of the plan is defined using
one edge identifier ie along with an orientation information orient,
indicating on which side of this entity the sub-domain lies. This feature is
useful, e.g. when dealing with a domain with holes. The sub-domain number is
id. If no sub-domain are defined, then we suppose to mesh all the bounded
connex component of the plan. Remark: SubDomainFromGeom is equivalent to
SubDomain.
AngleOfCornerBound angle
The AngleOfCornerBound specifies the angular limit for a corner in degree
to be curved. The angle is defined from two normals of two consecutives
edges. The default is 180 degree, i.e. no corners are curved. When this
angle is defined, some corners could be specified not to be curved by the
following list:
Corners nc
{i_k} k=1:nc
The curved geometric representation of a boundary in two dimensions uses the
edges provided in the data structure so as to define some curves of order
three in the following way:
In short, an edge defined by two information will be approached by a straight line, three information allow one to obtain a curve of degree two and four data, a curve of degree three. The tangents are optionally specified by:
TangentAtEdges nt
{ie_k ive_k xt yt} k=1:nt
For the edge identifier ie, the tangent at its ive vertex (ive
takes value 1 or 2) is specified by its components xt and yt. Giving
the tangent vector of an edge by means of the tangent vector at a point
enables us to deal with the case where several edges (boundary lines) are
emanating from a point.
The required vertices, are the vertices of the support that must be present in the mesh as element vertices. Similarly, some edges can be required:
RequiredVertices nrv
{iv_k} k=1:nrv
RequiredEdges nre
{ie_k} k=1:nre
The following features are planed for future work. For periodic boundary conditions, the section EquivalencedEdges indicates that two edges must be meshed the same way:
EquivalencedEdges nee
{ie1_k ie2_k} k=1:nee
Crack definition is the purpose of the CrackedEdges section. We specify
then that an edge is identical in terms of geometry to another edge:
CrackedEdges nce
{ie1_k ie2_k} k=1:nce
The original site of the bamg mesh generator is http://www.ann.jussieu.fr/hecht/ftp/bamg . Please read http://www.ann.jussieu.fr/hecht/ftp/bamg/bamg.pdf for the detailed file formats and more advanced examples, e.g. a mesh adaptation loop to minimize the P1 Lagrange interpolation error.
Frederic Hecht Frederic.Hecht@inria.fr is the author of bamg.
Pierre Saramito Pierre.Saramito@imag.fr writes this unix man page.
Copyright (C) 1998-2018 Frederic Hecht <Frederic.Hecht@inria.fr> LGPLv3+: GNU LGPL version 3 or later http://gnu.org/licenses/lgpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Pierre Saramito <Pierre.Saramito@imag.fr>
Sat Mar 13 2021 | Version 7.1 |