**adaptation
#
Description#
This command is used to remesh and/or optimize a Zebulon mesh (2D, 3D or surfacic) by means of external remeshing libraries. It’s main focus is on defining options for preserving FEM entities in order to repeat a computation on the new mesh. Any external remesher should be able to preserve these entities. Additional specific instructions may be required.
Syntax#
The command has the following syntax:
**adaptation
\(~\,\) *min_size
hmin
\(~\,\) *max_size
hmax
\(~\,\) [ *surface_mesher surface-mesher
]
\(~\,\) [ *volume_mesher 2d-or-3d-mesher
]
\(~\,\) *metric [
default/scalar/from_function/from_file/uniform_from_field/ ]
\(~\,\) [ *verbose
int-value ]
\(~\,\) [ *preserve_elsets
elsets-names ]
\(~\,\) [ *preserve_elsets_start_with
elsets-start-with-names ]
\(~\,\) [ *preserve_bsets
bsets-names ]
\(~\,\) [ *preserve_bsets_start_with
bsets-start-with-names ]
\(~\,\) [ *freeze_elsets
elsets-names ]
\(~\,\) [ *freeze_elsets_start_with
elsets-start-with-names ]
\(~\,\) [ *freeze_bsets
bsets-names ]
\(~\,\) [ *freeze_bsets_start_with
bsets-start-with-names ]
\(~\,\) [ *freeze_nsets
nsets-names ]
\(~\,\) [ *freeze_nsets_start_with
nsets-start-with-names ]
\(~\,\) [ *freeze_fasets_geom
fasets-names ]
\(~\,\) [ *freeze_fasets_geom_start_with
fasets-start-with-names ]
\(~\,\) [ *ridges
lisets-names ]
\(~\,\) [ *ridges_start_with
lisets-start-with-names ]
\(~\,\) [ *corners
nsets-names ]
\(~\,\) [ *corners_start_with
nsets-start-with-names ]
*min_size
imposes minimal edge size.
*max_size
imposes maximal edge size.
*surface_mesher
sets the 3D surface remesher. For now, only the option
mms
is available. Note that, some of the following options don’t apply to this kind of remesher.*volume_mesher
sets the volume remesher. For now, only the option
mmg3d
is available for a 3D mesh andmmg2d
for a 2D mesh. Note that, all options are automatically transferred fromadaptation
to the remesher.*metric
defaultcreates the size map of the current mesh defined by the mean edge lenghts of the mesh. It has the following syntax :
*metric default
[factor
double-val ]
[min_size
double-val]
[max_size
double-val ]
[output_file
ascii-file-name ]
where min_size
and max_size
are usually taken equal to the previous ones from adaptation
, but can also be different. The factor
is a multiplication factor of the default metric.
*metric scalar
imposes a constant isotropic metric. It has the following syntax :
*metric scalar
\(~\,\)value
double-val \(~\,\) [min_size
double-val ] \(~\,\) [max_size
double-val ] \(~\,\) [output_file
ascii-file-name ]*metric from_function
creates a size map using the nodes coordinates which satisfy the given function. Remember to include a semicolon at the end of the function definition. The complete syntax is the following one :
*metric from_function
\(~\,\)func
function; \(~\,\) [min_size
double-val ] \(~\,\) [max_size
double-val ] \(~\,\) [output_file
ascii-file-name ]*metric from_file
reads a nodal size map from a file. The syntax is:
*metric from_file
\(~\,\)file
file-name \(~\,\) [min_size
double-val ] \(~\,\) [max_size
double-val ] \(~\,\) [output_file
ascii-file-name ]
where file-name
defines the name of an ASCII file containing the prescribed size map for the new mesh. The ASCII file should contain the following lines:
- first line\(n_b\) (number of the initial mesh points : 1 integer)
- line 2 to \(n_b +1\)\(x_i\), \(y_i\), \(z_i\), \(d_i\) (definition of \(P_i\) coordinates and prescribes size : 4 double values).
Note that, if the number of prescribed sizes is different of the number of the mesh nodes, a transfer through the closest neighbour method is done.
*metric
uniform_from_field creates a size map based on a uniform distribution of a given field (usually the discretization error estimate) for a target value of accuracy. The syntax is :
*metric uniform_from_field
\(~\,\) field
\(\eta\)
\(~\,\) accuracy
\(\tau\)
\(~\,\) [ min_size
double-val ]
\(~\,\) [ max_size
double-val ]
\(~\,\) [ output_file
ascii-file-name ]
The new size map is computed by the formula
where \(d\) is the dimension, \(p\) the finite elements interpolation degree and \(h_{old}\) the default metric of the initial mesh. Note that, this metric can only be used during an adaptive procedure or when an initial solution exists, as the field \(\eta\) is either read from a solution file or computed by a previous computational step.
*verbose
prints detailed information aboutthe remeshing process. Takes integer values between 0 and 6. The default value is 1.
*preserve_elsets
(preserve_elsets_start_with
)preserves the given element sets. Set surface interpolation and nodes insertion are allowed.
*preserve_bsets
(preserve_bsets_start_with
)preserves the given boundary (liset/faset) sets. Interpolation and nodes insertion are allowed.
*freeze_elsets
(freeze_elsets_start_with
)freezes the given element sets. Surface interpolation and nodes insertion are forbidden.
*freeze_bsets
(freeze_bsets_start_with
)freezes the given boundary (liset/faset) sets. Interpolation and nodes insertion are forbidden.
*freeze_nsets
(freeze_nsets_start_with
)freezes the given node sets. The new mesh will contain the initial nodes, at their exact initial positions, and, for parallel purpose, their initial ranks. Note that, nodes insertion is allowed. Thus, for use in a boundary condition please transform the nset in bset and use the freeze_bset option.
*freeze_fasets_geom
(freeze_fasets_geom_start_with
)freezes the geometry of a surface (faset). Interpolation is forbidden, but nodes insertion is allowed.
*ridges
(ridges_start_with
)preserves line sets (lisets). We define a ridge as a curvature line (liset) which locally splits a surface in two smooth surfaces. In the geometry optimization step, this line imposes an independent optimization on each one of its sides. It can be seen as a CAO information to be preserved.
*corners
(corners_start_with
)preserves node sets. It is similar to a ridge, but on nodes. The geometry of each surface splitted by a corner is set to be independently optimized.
Example#
****mesher
***mesh
**open hole_toy
**adaptation
*min_size .001
*max_size 2.
*verbose 6
*metric scalar
value 0.15
*volume_mesher mmg3d
hgrad 1.25
hausd 0.005
*freeze_elsets eset_overlap
*preserve_elsets_start_with eset
*freeze_bsets left
*preserve_bsets right front
*corners_start_with corn
**output adaptation_hole_toy_remeshed.geof
****return
****mesher
***mesh
**open carre.geof
**adaptation
*metric scalar
value 0.1
*min_size .1
*max_size 2.
*volume_mesher mmg2d
hgrad 1.
*verbose 6
*preserve_elsets diag mix
*freeze_elsets diag
*preserve_bsets left top bottom
*freeze_nsets diag
**output carre_remeshed.geof
****return