![]() MMG5_Vertex is keyword to say that the metrics are provided at mesh nodes (mandatory for now) and MMG5_Tensor a keyword to specify that we want to impose a tensorial metric at nodes (note that we don’t need to specify the metric dimension because this information is redundant with the mesh dimension). If ( MMG3D_Set_solSize(mmgMesh,mmgSol,MMG5_Vertex, nbvals, MMG5_Tensor) != 1 ) In a first step, we must give the solution size and type: ![]() We call mmgMesh the mesh structure at the Mmg format and mmgSol the metric structure at the Mmg format. We suppose here that we want to adapt a three-dimensional volumic mesh, thus we call the Mmg3d library. Note that vectors can not be used to prescribe a size map. Nbvals # number of metrics: must match with the number of nodes in the mesh fileġ 3 # number of solutions per node (always 1 for Mmg) and type of each solution (1:scalar, 2:vector, 3:tensor). SolAtVertices # For now, Mmg works only with metrics defined at mesh vertices MeshVersionFormatted nprec # nprec=1: simple precision, nprec=2: double precisionĭimension d # metric dimension : must match with the mesh dimension The medit solution file describes the metric precision, dimension, size and type (in the following example, the user must fill the fields in italic and comments must be removed): Using an input file at medit format (.sol extension) There is two ways to provide your metrics: using a solution file at the medit format (for command line interface) or using the API function (for library users). The size that is prescribed is the the inverse of the squared root of the metric eigenvalues so, to impose an anisotropic size of 0.25 along the x-direction, of 10 along the y-direction and 0.5 along the z-direction, we have to provide the metric such as: Anisotropic metric prescription at mesh nodesīe the flattened metric that we want to prescribe at the mesh node and nbvals the number of mesh nodes. The vertex numbers here are local numbers (0, 1 or 2). 2:4, j in the first element and the vertices edgeadjacency4:6, j in the second element. sol file at Medit file format, we will store V = (1,0, 1,0,0,1) while you must provide to the Mmg APIs V = (1,0, 0,1,0,1). Specify a quadrature order for the point cloud generation. Thus, the vector stored in the Medit solution file is different from the vector to provide to the Mmg API functions: Example 1īe M an anisotropic metric of size 1 en every direction (so the metric is isotropic but stored in an anisotropic way): We flatten this upper triangular matrix to a vector using the following convention: 2D 3Dīe very careful, Medit uses a column storage of the upper triangular matrix while Mmg uses a line storage of the same matrix. M is a metric tensor so it is a symmetric matrix and we can choose to only provide the upper triangular part of M to Mmg. Using the Medit file format (.mesh/.sol) or the API functions Matrix flattening into a vectorīe d the mesh dimension and the metric that we want to impose at the mesh node.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |