Meshing Module (-M)#
Module -M is the module for meshing scalar and raster tessellations. Two meshing strategies are available. Free (or unstructured) meshing creates a conforming mesh into tetrahedral or hexahedral elements (triangular or quadrangular in 2D). Grid (or structured) meshing generates a non-conforming mesh into hexahedral elements arranged on a grid (quadrangular in 2D). Free meshing is carried out so that the elements have sizes as close as possible to the target value, and show high quality, that is, with shapes as close to equilateral as possible. The input file is a Tessellation File (.tess) or a Raster Tessellation File (.tesr), as provided by Tessellation Module (-T). Standard tessellations, multiscale tessellations, and periodic (or semi-periodic) tessellations are supported. Free meshing of raster tessellations works for 2D tessellations only. The output mesh can be written as a Mesh File (.msh), which can be readily used by FEPX, or in other formats.
The target element size of the mesh can be specified through the element characteristic length (cl). It corresponds to the length of a 1D element, the length of the edge of a triangular or quadrangular element (2D), and the length of an edge of a tetrahedral or hexahedral element (3D). A relative characteristic length (rcl) can be used instead, whose value is relative to the average cell size and provides a medium number of elements. It is also possible to specify cl or rcl values on a per-cell basis, or different values along the three space directions.
For free meshing, mesh quality is ensured to the greatest extent possible using several approaches:
Optimized meshing rules: the mesh properties are controlled by size parameters (options
-cl,-rcl, etc.) and size gradient parameters (options-pland-pl{edge,face,poly});Multimeshing: each tessellation face and volume is meshed separately from the others, with several meshing algorithms, until a target mesh quality is reached. This is controlled by options
-meshqual*,-mesh2dalgoand-mesh3dalgo.
Note that, in general, tessellation regularization is also necessary to ensure good-quality meshing (see Tessellation Module (-T), option -reg).
Remeshing can also be applied to generate a new, good-quality mesh from a mesh containing poor-quality elements. The variables defined on the parent mesh can be transported to the child mesh (options -transport*).
For mapped meshing, mesh cleaning options enable the merging of duplicate nodes, or the duplication of nodes that would create a singular behavior in simulations (options -dupnodemerge and -singnodedup).
Mesh partitioning allows for the division of the mesh nodes and elements into several sets while minimizing the interfaces between them [1], as needed for parallel simulations with FEPX. Partitioning can return any number of partitions, possibly divided into subpartitions according to a parallel computer architecture (option -part).
In the output mesh, the individual entities of the tessellations (the vertices, edges, faces and polyhedra) can be described by element sets (option -dim). Node sets of the vertices, edges and faces located on the boundary of the tessellation are also provided for prescribing the boundary conditions (option -nset). The surface element sets are also provided (option -faset). Element sets other than those corresponding to the tessellation cells can be defined (option -elset). The mesh order can be 1 or 2 (option -order, default 2). Statistical data can be obtained on the meshes (options -stat*).
The methods implemented for meshing are described in [CMAME2011].
Here is what a typical run of module -M looks like:
$ neper -M n10-id1.tess
======================== N e p e r =======================
Info : A software package for polycrystal generation and meshing.
Info : Version 5.0.1
Info : Built with: gsl|libgmsh|muparser|opengjk|openmp|libscotch
(full)
Info : Running on 8 threads.
Info : <https://neper.info>
Info : Copyright (C) 2003-2026, and GNU GPL'd, by Romain Quey, CNRS.
Info : No initialization file found (`/home/rquey/.neperrc').
Info : ---------------------------------------------------------------
Info : MODULE -M loaded with arguments:
Info : [ini file] (none)
Info : [com line] n10-id1.tess
Info : ---------------------------------------------------------------
Info : Reading input data...
Info : - Reading arguments...
Info : Loading input data...
Info : - Loading tessellation...
Info : [i] Parsing file `n10-id1.tess'...
Info : [i] Parsed file `n10-id1.tess'.
Info : Meshing...
Info : - Preparing... (cl = 0.2321) 100%
Info : - 0D meshing... 100%
Info : - 1D meshing... 100%
Info : - 2D meshing... 100% (0.76|0.93/96%| 4%| 0%)
Info : - Fixing 2D-mesh pinches...
Info : - 3D meshing... 100% (0.92|0.94/100%| 0%| 0%)
Info : Creating fasets...
Info : Switching mesh to order 2...
Info : Creating nsets...
Info : Writing mesh results...
Info : - Preparing mesh...
Info : - Mesh properties:
Info : > Node number: 1264
Info : > Elt number: 716
Info : > Mesh volume: 1.000
Info : - Writing mesh...
Info : [o] Writing file `n10-id1.msh'...
Info : [o] Wrote file `n10-id1.msh'.
Info : Elapsed time: 0.211 secs.
========================================================================
Input Data#
In normal use, the input data is a tessellation file, a raster tessellation file or a mesh file.
- <file_name1>[:<transformation>],<file_name2>...#
Specify the input file, which can be:
a Mesh File (.msh), for remeshing (in which case a tessellation file should preferably be loaded too), with an optional transformation:
<file_name>: nodal coordinates to load from a Position File.
Note
To transform a raster tessellation (crop, etc.), use Tessellation Module (-T)’s option
-transform.Default value: -.
It is also possible to load a mesh to be considered as the output mesh (in contrast to loading it as an input file). If the file contains meshes of dimensions lower than the tessellation’s dimension, they are used, and only higher-dimension meshes are computed. Use option -o to avoid overwriting the file.
- -loadmesh <file_name>#
Load a mesh from a Mesh File (.msh).
If the tessellation is not loaded, the node sets of the mesh file are kept (instead of being created, see
-nset), and the missing edge and vertex node sets, if any, are obtained from the intersections of the face node sets (in 3D) or edge node sets (in 2D).Default value: -.
Finally, it is possible to load a set of points.
- -loadpoint <file_name>#
Load points from a file formatted as a Position File.
Important
These points are used only for statistics, in option
-statpoint, and are not used for tessellation.Default value: -.
Meshing Options#
- -elttype <elt_type>#
Specify the type of elements, which can be:
tri: triangular elements;quad: quadrangular elements;tet: tetrahedral elements;hex: hexahedral elements;quadgrid: quadrangular elements, arranged on a grid;quad9grid: 9-node quadrangular elements, arranged on a grid (requires-order2);hexgrid: hexahedral elements, arranged on a grid.
In 2D,
tet,hexandhexgridare treated astri,quadandquadgrid, respectively.tri,quad,tetandhexprovide meshes that conform to the cell boundaries, whilequadgrid,quad9gridandhexgridprovide grid (structured) meshes, which do not.hexis obtained by meshing into tetrahedral elements and then splitting each tetrahedral element into 4 hexahedral elements, from its edge centres, face centres and centre (as done by Gmsh, withMesh.SubdivisionAlgorithm = 2). Similarly, each triangular element is split into 3 quadrangular elements and each 1D element into 2 1D elements, so that the mesh is conformal. The element quality is lower than the one of the tetrahedral elements (a regular tetrahedral element provides hexahedral elements of scaled Jacobian 0.71). In 2D,quadproceeds as Gmsh’s full-quad recombination: each face is meshed into triangular elements of twice the element size, which are recombined into quadrangular elements (Blossom algorithm), and all elements are then split (each quadrangular element into 4 and each triangular element into 3) and smoothed. The element size options (such as-cland-rcl) apply to the resulting elements (the element length being the mean edge length), and-rclis defined as forquadgridandhexgrid.-interfaceis not available withquadandhex.Raster tessellations can be meshed with
quadgrid,quad9gridandhexgrid, and, in 2D, withtriandquad.Default value:
tetin 3D andtriin 2D.
- -cl or -rcl <length>#
Specify the absolute or relative characteristic lengths of the elements.
-rclis defined relative to the average cell size. The value applies to all entities (polyhedra, faces, edges and vertices), unless specified otherwise for some of them using-[r]cl{poly,face,edge,ver}. The argument can be:a real value;
an expression based on the Tessellation Keys or Raster Tessellation Keys, which allows one to define individual values. An example is
-rcl "(body>0)?<val1>:<val2>", to mesh interior cells withrcl=<val1>and boundary cells withrcl=<val2>;file(<file_name>): individual values to load from a Data File.
Default value:
-rcl 1(which corresponds to averages of about 100 elements per cell in 3D and 64 in 2D).
- -dim <dimension1>,<dimension2>,...[:msh]#
Specify the mesh dimension(s), which can be:
an integer value between
0and3;inputdim: the dimension of the input data;all: all (0toinputdim);none: none.
Attention
The
.mshfile does not depend on this option and will always contain the meshes of all dimensions, unless:mshis used.Note
If a mesh dimension of 3 is requested while the input data is 2D, the 2D mesh is extruded into a 3D mesh (tetrahedral elements). The extrusion length is equal to the typical (in-plane) element characteristic length.
With
-format geof, use1,inputdimto get the 1D mesh written as lisets.Default value:
inputdim.
- -order <order>#
Specify the mesh order, which can be:
1: linear-interpolation elements (2-node linear elements, 3-node triangular elements, 4-node quadrangular elements, 4-node tetrahedral elements and 8-node hexahedral elements);2: quadratic-interpolation elements (3-node linear elements, 6-node triangular elements, 8-node or 9-node quadrangular elements, 10-node tetrahedral elements and 20-node hexahedral elements).
A mesh loaded using
-loadmeshis switched to the specified order (in the case of1, the second-order nodes are removed).Default value:
2.
- -cl{ver,edge,face,poly} or -rcl{ver,edge,face,poly} <characteristic_length> (secondary options)#
Specify the absolute or relative characteristic lengths of the elements at the vertex, edge, face or polyhedron level (compared to options
-cland-rclapplying to all entities), which can be:default: the same value as the parent, upper-dimension entity (or the-clor-rclvalue, for a polyhedron);a real value;
an expression based on the Tessellation Keys, which allows one to define individual values. An example is
-rclface "(domface==<id>)?<val>:default", to get a finer mesh at domain face<id>;file(<file_name>): individual values to load from a Data File.
The element characteristic lengths inside a face increase from those at its boundary (its edge mesh) to the
-[r]clfacevalue, at a rate defined by option-pl(or-plface). Similarly, in 3D, the element characteristic lengths inside a cell increase from those at its boundary (its face meshes) to the-[r]clor-[r]clpolyvalue, at a rate defined by option-pl(or-plpoly). For example,-rcl 1 -rclface 0.3provides a fine mesh at the interfaces and a coarser mesh inside the cells, and-rcl 1 -rclface 0.6 -rcledge 0.2also provides a fine mesh at the edges and a coarser mesh inside the faces.Default value: -.
- -pl <progression_factor> (secondary option)#
Specify the progression factor for the element characteristic lengths, which corresponds to the ratio between the lengths of two adjacent elements where the element characteristic length increases (\(\geq 1\)), i.e., from the vertices to the interiors of the edges, and from the boundaries to the interiors of the faces and cells: the characteristic length at a distance \(d\) from a boundary node of characteristic length \(cl_b\) is \(cl_b + \ln (pl)\,d\) (up to the edge, face or cell value). It also defines the characteristic length of a vertex whose shortest edge is short, of length \(L\), which is \(pl \, L\) (if lower than the target value).
The value applies to all entities (polyhedra, faces and edges), unless specified otherwise for some of them using
-pl{poly,face,edge}.Default value:
2.
- -pl{edge,face,poly} <progression_factor> (secondary options)#
Specify the progression factors at the edge, face or polyhedron level (compared to option
-plapplying to all entities), which can be:default: the-plvalue;a real value (\(\geq 1\));
an expression based on the Tessellation Keys, which allows one to define individual values. An example is
-plpoly "(body>0)?3:default", to get a faster increase of the element characteristic length inside the interior cells;file(<file_name>): individual values to load from a Data File.
-pledgeapplies to the 1D meshing of the edges (from the vertices),-plfaceto the increase of the element characteristic length from the face boundaries to the face interiors, and-plpolyto the increase from the polyhedron boundaries to the polyhedron interiors (see-[r]cl{ver,edge,face,poly}).Default value:
default.
- -clratio <val_x>:<val_y>:<val_z> (secondary option)#
Specify the ratios between the
clvalues along thex,yandzdirections. For example,2:1:1leads to elements twice as long in thexdirection as in theyandzdirections.Default value:
1:1:1.
The following options define the multimeshing algorithm (for 2D and 3D free meshing). Multimeshing consists of using several meshing algorithms concurrently, for each face or polyhedron, until a minimum, target mesh quality is reached. The mesh quality factor, \(O\), accounts for both the element sizes and aspect ratios. It is given by \(O = O_{dis}^\alpha \times O_{size}^{1-\alpha}\), where \(O_{dis}\) and \(O_{size}\) range from 0 (poor quality) to 1 (high quality), and \(\alpha\) is a factor equal to 0.8. Therefore, \(O\) also ranges from 0 (poor quality) to 1 (high quality) [CMAME2011]. \(O_{size}\) is computed with respect to the target element characteristic lengths given by the mesh size map (see options -cl and -pl), i.e., for the ratio of the length of each element to the target value at its center (rather than to a uniform value, as in [CMAME2011]). The minimum quality value can be modified using option -meshqualmin. The values of \(O\) and \(O_{dis}\) can be modified using options -meshqualexpr and -meshqualdisexpr. The value of the target mesh quality significantly influences meshing speed and output mesh quality. A value of 0 provides the fastest meshing while a value of 1 provides the best-quality meshing. The default value provides an effective balance. 2D and 3D meshing is performed using Gmsh, and mesh optimization using Gmsh and Netgen (options -mesh2dalgo and -mesh3dalgo).
- -meshqualmin <quality_value>#
Specify the minimum target value of mesh quality, \(O\), as defined by option
-meshqualexpr.Default value:
0.9.
- -meshqualexpr <quality_expression> (secondary option)#
Specify the expression of mesh quality, \(O\), as a function of \(O_{dis}\) and \(O_{size}\).
Default value:
Odis^0.8*Osize^0.2.
- -meshqualdisexpr <quality_expression> (secondary option)#
Specify the expression of the mesh element distortion parameter, \(O_{dis}\), as a function of the element distortion parameter \(dis\).
Default value:
dis^(exp((dis^0.1)/(dis^0.1-1))).
- -mesh2dalgo <algo1>,<algo2>,... (secondary option)#
Specify the 2D meshing algorithm(s), which can be:
mead: MeshAdapt;dela: Delaunay;fron: Frontal.
According to multimeshing, the algorithms are used concurrently until the quality criterion is reached.
Default value:
mead,dela,fron.
- -mesh3dalgo <mesh_algo1>:<opti_algo1>,<mesh_algo2>:<opti_algo2>,... (secondary option)#
Specify the 3D meshing and optimization algorithms. The meshing algorithms can be:
dela: Delaunay (Gmsh).
The optimization algorithms can be:
gmsh: Gmsh;netg: Netgen;gmne: Gmsh + Netgen;none: none.
According to multimeshing, the algorithms are used concurrently until the quality criterion is reached.
The
netgmeshing algorithm (Netgen) is no longer available.Default value:
dela:gmsh,dela:gmne,dela:netg.
- -meshedge <edge_expr> (secondary option)#
Specify the edges to mesh, which can be
allor an expression based on the variables described in Tessellation Keys.Default value:
all.
- -meshface <face_expr> (secondary option)#
Specify the faces to mesh, which can be
allor an expression based on the variables described in Tessellation Keys.Default value:
all.
- -meshpoly <poly_expr> (secondary option)#
Specify the polyhedra to mesh, which can be
allor an expression based on the variables described in Tessellation Keys.Default value:
all.
- -interface <interface_type> (secondary option)#
Specify the type of interface meshing, which can be:
continuous: continuous mesh at interfaces with shared nodes between neighbor element sets (which are associated with the tessellation cells);discontinuous: discontinuous mesh at interfaces with distinct nodes for the neighbor element sets;cohesive: cohesive elements at interfaces joining the neighbor element sets.
For a periodic (or semi-periodic) tessellation, an interface between a cell and the periodic image of another cell is described at its master location only: the nodes of the periodic image are duplicated there and tied by periodicity to the nodes of the other cell at the slave location, and the cohesive elements are defined there.
In the case of a multiscale tessellation, it is possible to provide a different value for each scale using the
::separator (if fewer values than tessellation scales are provided, the last provided value is used for all higher scales). The value of a scale applies to the interfaces created at that scale (cohesive elements are defined only at thecohesiveinterfaces), and neighbor element sets joined bycontinuousinterfaces share their nodes, so that adiscontinuousorcohesiveinterface is closed where it meetscontinuousinterfaces only.Default value:
continuous.
- -mesh2dpinchfix <logical> (secondary option)#
Correct 2D-mesh pinches after 2D meshing (recommended).
Default value:
1.
Raster Tessellation Meshing Options#
Direct 2D raster tessellation meshing involves interface reconstruction, interface mesh smoothing and then remeshing. The following options enable the control of interface smoothing.
- -tesrsmooth <smoothing> (secondary option)#
Specify the method for smoothing the interface meshes reconstructed from a raster tessellation, which can be:
laplacian: Laplacian smoothing is an iterative method that modifies the coordinates of a node of a mesh using the coordinates of the connected nodes. At iteration \(i\), the position of a node, \(X_i\), is calculated from its previous position, \(X_{i-1}\), and the position of the barycenter of the neighboring nodes (weighted barycenter considering the inverse of the distance between the node and the neighbor), \(X^n_{i-1}\), as follows: \(X_i=(1-A)\,X_{i-1} + A\,X^n_{i-1}\). \(A \in \left[0,\,1\right]\) is an adjustable parameter (see option-tesrsmoothfact). The number of iterations is set by option-tesrsmoothitermax. There is no stopping criterion, so that the maximum number of iterations is always reached.none: none.
Default value:
laplacian.
- -tesrsmoothfact <fact> (secondary option)#
Specify the factor used for the interface mesh smoothing (\(A\) in option
-tesrsmooth).Default value:
0.5.
- -tesrsmoothitermax <iter_number> (secondary option)#
Specify the number of iterations used for interface mesh smoothing.
Default value:
5.
Mesh Cleaning Options#
The following options are specific to mapped meshing of raster tessellations containing voids.
- -singnodedup <logical> (secondary option)#
Duplicate singular nodes. A singular node belongs to several elements that share only this node or an edge, which provides a singular behavior [2].
Duplicated nodes can be merged back using option
-dupnodemerge.Default value:
0.
- -dupnodemerge <distance> (secondary option)#
Merge duplicate nodes. The argument is the distance between nodes below which two nodes are merged.
Note that Neper does not generate meshes with duplicate nodes, except when
-singnodedupor-interfaceare used.Default value: -.
Transformation Options#
- -transform <transformation1>,<transformation2>,...#
Apply successive transformations to a mesh, which can be:
translate(<dist_x>,<dist_y>,<dist_z>): translate by distances<dist_x>,<dist_y>and<dist_z>alongx,yandz, respectively;rotate(<axis_x>,<axis_y>,<axis_z>,<angle>): rotate about the center, by a given axis and angle (angle expressed in degrees);scale(<fact_x>,<fact_y>,<fact_z>): scale by<fact_x>,<fact_y>and<fact_z>alongx,yandz, respectively;smooth(<A>,<itermax>,<type>): smooth the interfaces of a mesh by Laplacian smoothing (use only if you know what you are doing). Laplacian smoothing is an iterative method that modifies the coordinates of a node using the coordinates of the neighboring nodes. At iteration \(i\), the position of a node, \(X_i\), is calculated from its previous position, \(X_{i-1}\), and the position of the barycenter of the neighboring nodes (weighted barycenter considering the inverse of the distance between the node and the neighbor), \(X^n_{i-1}\), as follows: \(X_i=(1-A)\,X_{i-1} + A\,X^n_{i-1};\,0\leq A \leq 1\).<itermax>iterations are applied.<type>defines the nodes used for smoothing and can beallfor all nodes orinteriorfor interior nodes.explode(<fact>): produce a roughly “exploded” mesh for which elsets are apart from each other (or cohesive elements become thick). To be used in conjunction with-interface {discontinuous,cohesive}.<fact>is a factor controlling the distance between elsets.slice(<d>,<a>,<b>,<c>): slice a 3D mesh by the (oriented) plane of equation \(a\,x+b\,y+c\,z=d\) (yielding a 2D mesh).node(<file_name>): override node positions with ones defined in a Data File.ori(<file_name>[,des=<descriptor>]): override orientations with ones defined in a Data File written using a specific descriptor (see Rotations and Orientations, defaultrodrigues). The file may contain orientations for elsets or for elements, and this is automatically determined from the number of lines (in the case of element orientations, elset orientations are updated accordingly, by averaging).
Default value: -.
Mesh Partitioning Options#
Mesh partitioning is achieved using the libscotch library. The principle of mesh partitioning is to create partitions of the same size, in terms of nodes and elements, while minimizing the interfaces between them. This attempts to distribute an equal load to all computation units and minimizes communications between them, and therefore minimizes the total computation time of simulations. Partitioning is applied to the higher-dimension mesh and does not change node and element numbering. This is done using option -part.
- -part <part_number>|<part_number>:<subpart_number>#
Specify the number of partitions, which can be any integer value, or a number of partitions and a number of subpartitions per partition. Using a number of partitions is generally sufficient. Using
<part_number>:<subpart_number>corresponds to a computer cluster made of<part_number>nodes (or “processors”) of<subpart_number>cores each, for which communications between cores of a same node are faster than communications between cores of different nodes. The mesh is divided into<part_number>partitions, each divided into<subpart_number>subpartitions, which minimizes the communications between partitions (considered 10 times more costly than those between subpartitions of a same partition). The subpartitions are numbered consecutively within each partition (subpartitions 1 to<subpart_number>belong to the first partition, etc.), for a total of<part_number>\(\times\)<subpart_number>partitions in the output files. This reduces the communications between nodes, provided that the MPI processes are placed by node (consecutive processes on the same node); the effect on the simulation time depends on the solver and the computer.Default value: -.
Field Transport Options#
- -transport <entity_type1>:<data_type1>:<file_name1>,<data_type2>:<file_name2>,...#
Transport data from a parent mesh to a child mesh. The parent mesh is the input mesh and the child mesh is the result mesh (created by remeshing or loaded with
-loadmesh).<entity_type>can benodeorelt, and<data_type>can beinteger<X>orreal<X>, where<X>is the data dimensionality, and<file_name>is the file containing the parent data.Nodal data are transported by interpolation using the shape functions (2D only). Elemental data are transported as specified by
-transporteltmethod.Default value: -.
- -transporteltmethod <method> (secondary option)#
Specify the method to transport elemental data from the parent mesh to the child mesh. For each element of the child mesh, its center, \(c\), is considered. The method can be:
distance: choose, for each element of the child mesh (of center \(c\)), the element of the parent mesh whose center is the closest to \(c\);location: choose the element of the parent mesh that \(c\) belongs to.
Default value:
distance.
Output Options#
- -o <file_name>#
Specify the output file name.
Default value: input file’s base name.
- -format <format1>,<format2>,...#
Specify the format(s) of the output file(s), which can be:
msh[:<encoding>]: native (Gmsh-style) mesh file, whereencodingcan beasciiorbinary(defaultascii);sim: simulation directory;vtk: VTK mesh file;inp: Abaqus input file;geof: Z-set mesh file;ori: orientation file (optional FEPX input);phase: group file (optional FEPX input);bcs: boundary condition file (optional FEPX input);per: periodicity file (see also option-performat);tess: tessellation file, where the tessellation is reconstructed from the mesh;etree: element-orientation k-d tree file (for development only);ntree: node-orientation k-d tree file (for development only).
Default value:
msh.
- -nset <nset1>,<nset2>,...#
Specify the node sets to provide, which can be:
faces: domain faces;edges: domain edges;vertices: domain vertices;facebodies: interior of the domain faces;edgebodies: interior of the domain edges;all: all of the above node sets;<dom_entity_label>: label of a domain entity.For a cubic domain, they are
{x-z}{0,1}: domain faces,{x-z}{0,1}{x-z}{0,1}: domain edges, and{x-z}{0,1}{x-z}{0,1}{x-z}{0,1}: domain vertices.For a cylindrical domain, they are
z{0,1}for thezfaces andcylfor the curved face (orf{1,2,...}for the faces of a faceted cylinder).For an hourglass domain, they are
z{0,1}for thezfaces andhourglassfor the curved face.For other domains, they are
f{1,2,...}for the faces.
The labels of edges and vertices are derived by concatenating those of their parent faces.
bodycan be appended to obtain only the interior nodes.<nset_label>:<nset_definition>, where<nset_label>is a custom nset label and<nset_definition>defines the nodes belonging to the nset, which can be:an expression based on the variables provided in Mesh Keys (for nodes), for example
bottom:z<1e-6;min(<expr>)ormax(<expr>): the nodes for which the expression is minimal or maximal (to a relative tolerance of \(10^{-6}\)), for examplebottom:min(z);closest(<x>,<y>,<z>): the node closest to a point, for examplecenter:closest(0.5,0.5,0.5).
none: none.
The node sets of the domain faces, edges and vertices that are periodic (see
-periodicityin module Tessellation Module (-T)), which are not boundaries, are not provided (a fully periodic mesh has no node sets).Default value:
faces,edges,verticesin 3D andedges,verticesin 2D.
- -faset <faset1>,<faset2>,...#
Specify the element surface meshes (edge meshes in 2D) to output, which can be:
faces: all domain faces (except the periodic ones, which are not boundaries);<dom_face_label>: individual faces (see option-nset);internal: internal faces (edges in 2D) as created by-interface discontinuous;none: none.
Default value:
faces.
- -elset <elset1>,<elset2>,... (secondary option)#
Specify the element sets to output, which can be:
default: default element sets (those corresponding to the input tessellation cells);<elset_label>:<elset_definition>, where<elset_label>is a custom elset label and<elset_definition>is an expression defining the elements belonging to the elset, based on the variables provided in Mesh Keys.
Default value:
default.
- -performat <format>#
Specify the format of the
.peroutput file, which can be:msh;plain: plain format;geof: Z-set format.
Default value:
msh.
Post-Processing Options#
In all -stat options, a key can also be any mathematical expression based on the keys, for example x+y+z or vol>0.1.
The following options provide general statistics on the highest-dimension mesh (mesh), 0D mesh (mesh0d), 1D mesh (mesh1d), 2D mesh (mesh2d), 3D mesh (mesh3d) and cohesive-element mesh (meshco).
- -stat{mesh,mesh{0-3}d,meshco} <key1>,<key2>,...#
Provide statistics on the mesh. Available keys are described in Mesh Keys.
Default value: -.
File extension:
.stmesh,.stmesh0-3d,.stmeshco.
The following options provide statistics on the nodes (node), highest-dimension elements (elt) and element sets (elset), 0D elements (elt0d) and element sets (elset0d), 1D elements (elt1d) and element sets (elset1d), 2D elements (elt2d) and element sets (elset2d), 3D elements (elt3d) and element sets (elset3d), cohesive elements (eltco) and element sets (elsetco), and points (point).
- -stat{node,elt,elt{0-3}d,elset,elset{0-3}d,eltco,elsetco} <key1>,<key2>,...#
Provide statistics on the nodes, elements or elsets. Available keys are described in Mesh Keys.
Default value: -.
File extension:
.stnode,.stelt,.stelt0-3d,.stelset,.stelset0-3d,.steltco,.stelsetco.
- -statpoint <key1>,<key2>,...#
Provide statistics on points. The points must be loaded with option
-loadpoint. Available keys are described in Point Keys.Default value: -.
File extension:
.stpoint.
Advanced Options#
These advanced options set running conditions for the meshing libraries (2D and 3D meshing).
- -mesh2dclreps <tolerance> (secondary option)#
Specify the relative tolerance on the average ratio of the element characteristic lengths of each face to their target values (given by the mesh size map, see options
-cland-pl), which can be:a real value;
an expression based on the variables defined in Tessellation Keys;
<file_name>: values to load from a Data File.
As Gmsh’s 2D mesher does not exactly provide elements of the target values, the mesh size map passed to it is scaled iteratively, and so this is a CPU-sensitive option.
Default value:
0.02.
- -mesh3dclreps <tolerance> (secondary option)#
Same as
-mesh2dclreps, but for the cells (3D meshing). As Gmsh’s 3D mesher generally provides elements larger than the target values, this is a highly CPU-sensitive option.Default value:
0.02.
- -mesh{2,3}dmaxtime <time> (secondary option)#
Specify the maximum processing time allowed to the meshing library for meshing a tessellation face or polyhedron (in seconds).
Default value:
10000.
- -mesh{2,3}drmaxtime <relative_time> (secondary option)#
Specify a factor used to determine the maximum processing time allowed to the meshing library for meshing a tessellation face or polyhedron. This option is similar to
-mesh2dmaxtime, but the actual maximum time is the product of the maximum processing time of the previous meshing operations by the value provided in argument.Default value:
100.
- -mesh{2,3}diter <iter_number> (secondary option)#
Specify the maximum number of meshing attempts for a particular face or polyhedron (in the rare case of failure).
Default value:
3.
Output Files#
Mesh#
.msh: mesh file as described in Mesh File (.msh);
.vtk: VTK file;
.inp: Abaqus input file;
.geof: Z-set file;
.ori: orientation file (optional FEPX file). It contains the$ElsetOrientationsand$ElementOrientationssections of the.mshfile;
.phase: group file (optional FEPX file). It contains the$Groupssection of the.mshfile;
.bcs: boundary conditions file (optional FEPX file);
.per: periodicity file;
.etree: element-orientation k-d tree file;
.ntree: node-orientation k-d tree file.
Interfaces#
File
.intl. For each 2D interface, the file provides (one 2D interface per line) the labels of the two element sets of the interface.
Statistics#
Statistics files are provided for nodes, elements, element sets and points. They are formatted with one entity per line. Each line contains the data specified to the corresponding -stat option and described in Mesh Keys.
.stnode: node statistics file;
.stmesh: (highest-dimension) mesh statistics file;
.stelt: (highest-dimension) element statistics file;
.stelset: (highest-dimension) element set statistics file;
.stmesh0d: 0D mesh statistics file;
.stmesh1d: 1D mesh statistics file;
.stmesh2d: 2D mesh statistics file;
.stmesh3d: 3D mesh statistics file;
.stmeshco: cohesive-element mesh statistics file;
.stelt0d: 0D element statistics file;
.stelt1d: 1D element statistics file;
.stelt2d: 2D element statistics file;
.stelt3d: 3D element statistics file;
.stelset0d: 0D elset statistics file;
.stelset1d: 1D elset statistics file;
.stelset2d: 2D elset statistics file;
.stelset3d: 3D elset statistics file;
.stpoint: point statistics file.
Footnotes