Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
libmmgtypes.h
Go to the documentation of this file.
1/* =============================================================================
2** This file is part of the mmg software package for the tetrahedral
3** mesh modification.
4** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5**
6** mmg is free software: you can redistribute it and/or modify it
7** under the terms of the GNU Lesser General Public License as published
8** by the Free Software Foundation, either version 3 of the License, or
9** (at your option) any later version.
10**
11** mmg is distributed in the hope that it will be useful, but WITHOUT
12** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14** License for more details.
15**
16** You should have received a copy of the GNU Lesser General Public
17** License and of the GNU General Public License along with mmg (in
18** files COPYING.LESSER and COPYING). If not, see
19** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20** use this copy of the mmg distribution only if you accept them.
21** =============================================================================
22*/
23
33#include <stdint.h>
34#include <stdarg.h>
35#include <stddef.h>
36
37#include "mmg/common/mmgcmakedefines.h"
38#include "mmg/common/mmgversion.h"
39
40#ifndef _LIBMMGTYPES_H
41#define _LIBMMGTYPES_H
42
49#define MMG5_SUCCESS 0
57#define MMG5_LOWFAILURE 1
65#define MMG5_STRONGFAILURE 2
66
71#define MG_ISO 10
72
77#define MG_PLUS 2
82#define MG_MINUS 3
83
93#define MMG5_ARG_start 1
102#define MMG5_ARG_ppMesh 2
112#define MMG5_ARG_ppLs 3
122#define MMG5_ARG_ppMet 4
132#define MMG5_ARG_ppDisp 5
142#define MMG5_ARG_ppSols 6
151#define MMG5_ARG_pMesh 7
160#define MMG5_ARG_pMet 8
169#define MMG5_ARG_pDisp 9
179#define MMG5_ARG_end 10
180
187#define MMG5_NSOLS_MAX 100
188
195#define MMG5_FILENAME_LEN_MAX 255
196
203#define MMG5_MMAT_NoSplit 0
204
211#define MMG5_MMAT_Split 1
212
223
235
253
263typedef struct {
264 double hmin;
265 double hmax;
266 double hausd;
267 MMG5_int ref;
268 int8_t elt;
270
276typedef struct {
277 double c[3];
278 double n[3];
281#ifdef USE_POINTMAP
282 MMG5_int src;
283#endif
284 MMG5_int ref;
285 MMG5_int xp;
286 MMG5_int tmp;
288 MMG5_int flag;
289 MMG5_int s;
290 uint16_t tag;
292 int8_t tagdel;
293} MMG5_Point;
295
300typedef struct {
301 double n1[3],n2[3];
303 int8_t nnor; /* By default 0; 1 if no normal available (internal NOM point) */
306
311typedef struct {
312 MMG5_int a,b;
313 MMG5_int ref;
314 MMG5_int base;
316 uint16_t tag;
317} MMG5_Edge;
319
338typedef struct {
339 double qual; /*Quality of the triangle*/
340 MMG5_int v[3];
341 MMG5_int ref;
342 MMG5_int base;
343 MMG5_int cc;
345 MMG5_int edg[3];
347 MMG5_int flag;
348 uint16_t tag[3];
350 } MMG5_Tria;
352
353
372typedef struct {
373 MMG5_int v[4];
374 MMG5_int ref;
375 MMG5_int base;
376 MMG5_int edg[4];
378 uint16_t tag[4];
380} MMG5_Quad;
382
383
407typedef struct {
408 double qual;
409 MMG5_int v[4];
410 MMG5_int ref;
411 MMG5_int base;
412 MMG5_int mark;
413 MMG5_int xt;
416 MMG5_int flag;
417 uint16_t tag;
418} MMG5_Tetra;
420
425typedef struct {
426 MMG5_int ref[4];
428 MMG5_int edg[6];
430 uint16_t ftag[4];
432 uint16_t tag[6];
434 int8_t ori;
439
469typedef struct {
470 MMG5_int v[6];
471 MMG5_int ref;
472 MMG5_int base;
473 MMG5_int flag;
474 MMG5_int xpr;
476 uint8_t tag;
477} MMG5_Prism;
479
484typedef struct {
485 MMG5_int ref[5];
487 MMG5_int edg[9];
491 uint16_t ftag[5];
493 uint16_t tag[9];
497
502typedef struct {
503 int8_t dospl;
504 MMG5_int ref,rin,rex;
505} MMG5_Mat;
507
512typedef struct {
513 MMG5_int offset;
514 MMG5_int size;
515 int *lookup;
518
523typedef struct {
526 double min[3],max[3],delta,ls,lxreg,rmc;
527 MMG5_int *br;
528 MMG5_int isoref;
529 MMG5_int nsd;
531 int nbr,nbri;
532 int opnbdy;
533 int renum;
536 int imprim;
537 int8_t nreg;
538 int8_t xreg;
539 int8_t ddebug;
540 int8_t badkal;
541 int8_t iso;
542 int8_t isosurf;
543 int8_t setfem;
546 int8_t fem;
547 int8_t lag;
548 int8_t parTyp;
551 int8_t sethmin;
552 int8_t sethmax;
554 uint8_t metRidTyp;
555 char *fparam;
561
564} MMG5_Info;
565
570typedef struct {
571 MMG5_int a;
572 MMG5_int b;
573 MMG5_int ref;
574 MMG5_int nxt;
575 uint16_t tag;
576} MMG5_hgeom;
577
582typedef struct {
584 MMG5_int siz,max,nxt;
585} MMG5_HGeom;
586
587
592typedef struct {
593 MMG5_int a,b,nxt;
594 MMG5_int k;
595 MMG5_int s;
596} MMG5_hedge;
597
603typedef struct {
604 MMG5_int siz,max,nxt;
606} MMG5_Hash;
607
665
671typedef struct {
672 int ver; /* Version of the solution file */
673 int dim; /* Dimension of the solution file*/
674 MMG5_int np; /* Number of points of the solution */
675 MMG5_int npmax; /* Maximum number of points */
676 MMG5_int npi; /* Temporary number of points (internal use only) */
677 int size; /* Number of solutions per entity */
678 int type; /* Type of the solution (scalar, vectorial or tensorial) */
679 int entities; /* Type of the solution (scalar, vectorial of tensorial) */
680 double *m;
681 double umin,umax;
682 char *namein;
683 char *nameout;
684} MMG5_Sol;
686
687#endif
MMG5_Par * MMG5_pPar
MMG5_Tria * MMG5_pTria
MMG5_Edge * MMG5_pEdge
MMG5_Quad * MMG5_pQuad
MMG5_type
Type of solutions.
@ MMG5_Vector
@ MMG5_Tensor
@ MMG5_Scalar
@ MMG5_Notype
MMG5_xPrism * MMG5_pxPrism
MMG5_Format
Type of supported file format.
@ MMG5_FMT_MeditBinary
@ MMG5_FMT_Tetgen
@ MMG5_FMT_VtkVtk
@ MMG5_FMT_GmshBinary
@ MMG5_FMT_VtkPvtp
@ MMG5_FMT_Unknown
@ MMG5_FMT_GmshASCII
@ MMG5_FMT_MeditASCII
@ MMG5_FMT_VtkVtp
@ MMG5_FMT_VtkPvtu
@ MMG5_FMT_VtkVtu
MMG5_Sol * MMG5_pSol
MMG5_InvMat * MMG5_pInvMat
MMG5_Point * MMG5_pPoint
MMG5_Mat * MMG5_pMat
MMG5_Mesh * MMG5_pMesh
MMG5_xTetra * MMG5_pxTetra
MMG5_Tetra * MMG5_pTetra
MMG5_entities
Identifies the types of mesh entities.
@ MMG5_Noentity
@ MMG5_Vertex
@ MMG5_Tetrahedron
@ MMG5_Edg
@ MMG5_Triangle
MMG5_Prism * MMG5_pPrism
MMG5_xPoint * MMG5_pxPoint
Structure to store edges of am MMG mesh.
MMG5_int b
MMG5_int base
uint16_t tag
MMG5_int ref
MMG5_int a
Hash table to store geometric edges.
MMG5_int max
MMG5_hgeom * geom
MMG5_int siz
MMG5_int nxt
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
MMG5_int max
MMG5_int nxt
MMG5_hedge * item
MMG5_int siz
Structure to store input parameters of the job.
int8_t iso
int8_t parTyp
int8_t ddebug
double delta
double hsiz
int8_t isosurf
int8_t sethmin
MMG5_int * br
uint8_t ani
uint8_t noswap
double min[3]
double rmc
double hmin
int8_t setfem
MMG5_pMat mat
double hgrad
double max[3]
double lxreg
uint8_t noinsert
int8_t badkal
MMG5_int isoref
uint8_t metRidTyp
double hmax
double ls
uint8_t nomove
uint8_t optimLES
int8_t lag
MMG5_int nsd
uint8_t nosurf
MMG5_InvMat invmat
char * fparam
int8_t sethmax
uint8_t nosizreq
MMG5_pPar par
uint8_t optim
double dhd
double hgradreq
double hausd
int8_t xreg
int8_t nreg
int8_t fem
To store lookup table for references in the mesh (useful in LS mode)
MMG5_int offset
MMG5_int size
To store user-defined references in the mesh (useful in LS mode)
MMG5_int ref
int8_t dospl
MMG5_int rex
MMG5_int rin
MMG mesh structure.
size_t memCur
MMG5_int ntmax
MMG5_pQuad quadra
MMG5_int nc1
MMG5_Info info
MMG5_int * adjapr
MMG5_int xt
MMG5_int ne
MMG5_pPoint point
char * nameout
MMG5_int xpr
MMG5_int mark
MMG5_int * adja
MMG5_pPrism prism
MMG5_int xtmax
MMG5_int nquad
size_t memMax
MMG5_int nemax
MMG5_int npmax
MMG5_pxPoint xpoint
MMG5_int nenil
MMG5_HGeom htab
MMG5_int * adjq
MMG5_int xp
double gap
MMG5_int namax
MMG5_int base
MMG5_int nei
MMG5_pTetra tetra
MMG5_pxPrism xprism
MMG5_int nt
MMG5_pTria tria
MMG5_int np
MMG5_pEdge edge
MMG5_int nanil
MMG5_int nti
MMG5_int npi
MMG5_pxTetra xtetra
MMG5_int nai
MMG5_int nprism
MMG5_int na
MMG5_int npnil
char * namein
MMG5_int * adjt
MMG5_int xpmax
Local parameters for a specific entity and reference.
double hmin
double hmax
double hausd
MMG5_int ref
int8_t elt
Structure to store vertices of an MMG mesh.
double n[3]
int8_t tagdel
MMG5_int tmp
double c[3]
uint16_t tag
MMG5_int xp
MMG5_int s
MMG5_int ref
MMG5_int flag
Structure to store prsim of a MMG mesh.
MMG5_int v[6]
uint8_t tag
MMG5_int ref
MMG5_int flag
MMG5_int base
MMG5_int xpr
Structure to store quadrangles of an MMG mesh.
MMG5_int ref
MMG5_int base
MMG5_int v[4]
uint16_t tag[4]
MMG5_int edg[4]
MMG5_int npi
double umin
char * nameout
MMG5_int npmax
char * namein
double * m
double umax
MMG5_int np
Structure to store tetrahedra of an MMG mesh.
MMG5_int base
MMG5_int v[4]
MMG5_int xt
MMG5_int flag
MMG5_int ref
MMG5_int mark
uint16_t tag
double qual
Structure to store triangles of a MMG mesh.
MMG5_int edg[3]
double qual
MMG5_int ref
MMG5_int flag
uint16_t tag[3]
MMG5_int base
MMG5_int v[3]
MMG5_int cc
Used to hash edges (memory economy compared to MMG5_hgeom).
MMG5_int s
MMG5_int b
MMG5_int a
MMG5_int k
MMG5_int nxt
Cell of the hash table of geometric edges.
MMG5_int ref
MMG5_int b
MMG5_int nxt
MMG5_int a
uint16_t tag
Structure to store surface vertices of an MMG mesh.
double n2[3]
double n1[3]
Structure to store the surface prism of a MMG mesh.
uint16_t ftag[5]
MMG5_int edg[9]
MMG5_int ref[5]
uint16_t tag[9]
Structure to store additional information for the surface tetrahedra of an MMG mesh.
uint16_t tag[6]
MMG5_int edg[6]
MMG5_int ref[4]
uint16_t ftag[4]