Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
Functions
vtkparser.hpp File Reference
#include "mmgcommon_private.h"
#include <vtkSmartPointer.h>
#include <vtkXMLReader.h>
#include <vtkXMLWriter.h>
#include <vtkXMLUnstructuredGridReader.h>
#include <vtkXMLUnstructuredGridWriter.h>
#include <vtkXMLPUnstructuredGridWriter.h>
#include <vtkXMLPolyDataReader.h>
#include <vtkXMLPolyDataWriter.h>
#include <vtkXMLPPolyDataWriter.h>
#include <vtkDataSetReader.h>
#include <vtkDataSetWriter.h>
#include <vtkPDataSetWriter.h>
#include <vtkDataSet.h>
#include <vtkUnstructuredGrid.h>
#include <vtkPolyData.h>
#include <vtkStructuredGrid.h>
#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vtkFieldData.h>
#include <vtkCellTypes.h>
#include <vtkDataArray.h>
#include <vtkFloatArray.h>
#include <vtkDoubleArray.h>
#include <vtkLine.h>
#include <vtkTriangle.h>
#include <vtkQuad.h>
#include <vtkTetra.h>
#include <vtkWedge.h>
#include <vtkCellArray.h>
#include <typeinfo>
Include dependency graph for vtkparser.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int MMG5_loadVtpMesh_part1 (MMG5_pMesh, const char *, vtkDataSet **, int8_t *, int8_t *, int *, int8_t *)
 
int MMG5_loadVtuMesh_part1 (MMG5_pMesh, const char *, vtkDataSet **, int8_t *, int8_t *, int *, int8_t *)
 
int MMG5_loadVtkMesh_part1 (MMG5_pMesh, const char *, vtkDataSet **, int8_t *, int8_t *, int *, int8_t *)
 
int MMG5_loadVtkMesh_part2 (MMG5_pMesh, MMG5_pSol *, vtkDataSet **, int8_t, int8_t, int)
 
static void MMG5_internal_VTKSetLine (vtkSmartPointer< vtkPolyData > d, vtkSmartPointer< vtkCellArray > *ca)
 
static void MMG5_internal_VTKSetLine (vtkSmartPointer< vtkUnstructuredGrid > d, vtkSmartPointer< vtkCellArray > *ca)
 
static void MMG5_internal_VTKSetCells (int *t, vtkSmartPointer< vtkPolyData > d, vtkSmartPointer< vtkCellArray > ca)
 
static void MMG5_internal_VTKSetCells (int *t, vtkSmartPointer< vtkUnstructuredGrid > d, vtkSmartPointer< vtkCellArray > ca)
 
static void MMG5_internal_VTKbinary (vtkXMLUnstructuredGridWriter *w, int binary)
 
static void MMG5_internal_VTKbinary (vtkXMLPolyDataWriter *w, int binary)
 
static void MMG5_internal_VTKbinary (vtkDataSetWriter *w, int binary)
 
template<class T , class TWriter , class PWriter >
int MMG5_saveVtkMesh_i (MMG5_pMesh mesh, MMG5_pSol *sol, const char *mfilename, int metricData, int binary, int npart, int myid, int master)
 
template<class T , class TWriter , class PWriter >
int MMG5_saveVtkMesh (MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename, int metricData, int binary)
 

Function Documentation

◆ MMG5_internal_VTKbinary() [1/3]

static void MMG5_internal_VTKbinary ( vtkDataSetWriter *  w,
int  binary 
)
static
Parameters
wvtk writer
binary1 if we want to save in binary format

Try to set the suitable file format to the vtk writer

Definition at line 148 of file vtkparser.hpp.

◆ MMG5_internal_VTKbinary() [2/3]

static void MMG5_internal_VTKbinary ( vtkXMLPolyDataWriter *  w,
int  binary 
)
static
Parameters
wvtk writer
binary1 if we want to save in binary format

Try to set the suitable file format to the vtk writer

Definition at line 134 of file vtkparser.hpp.

◆ MMG5_internal_VTKbinary() [3/3]

static void MMG5_internal_VTKbinary ( vtkXMLUnstructuredGridWriter *  w,
int  binary 
)
static
Parameters
wvtk writer
binary1 if we want to save in binary format

Try to set the suitable file format to the vtk writer

Definition at line 120 of file vtkparser.hpp.

◆ MMG5_internal_VTKSetCells() [1/2]

static void MMG5_internal_VTKSetCells ( int *  t,
vtkSmartPointer< vtkPolyData >  d,
vtkSmartPointer< vtkCellArray >  ca 
)
static
Parameters
tarray of integer storing the cell types
dvtk data type in which we want to store the array ca
cavtk cell array containing the cells connectivity

Store a list of vtk cells into a vtkPolyData

Definition at line 101 of file vtkparser.hpp.

Here is the caller graph for this function:

◆ MMG5_internal_VTKSetCells() [2/2]

static void MMG5_internal_VTKSetCells ( int *  t,
vtkSmartPointer< vtkUnstructuredGrid >  d,
vtkSmartPointer< vtkCellArray >  ca 
)
static
Parameters
tarray of integer storing the cell types
dvtk data type in which we want to store the array ca
cavtk cell array containing the cells connectivity

Store a list of vtk cells into a vtkUnstructuredGrid

Definition at line 111 of file vtkparser.hpp.

◆ MMG5_internal_VTKSetLine() [1/2]

static void MMG5_internal_VTKSetLine ( vtkSmartPointer< vtkPolyData >  d,
vtkSmartPointer< vtkCellArray > *  ca 
)
static
Parameters
dvtk data type in which we want to store the array ca
cavtk cell array containing the lines connectivity

Store a list of vtk cells containing only lines into a vtkPolyData and reset the list of cells. Otherwise, lines are casted into polygons by the SetPoly method.

Definition at line 76 of file vtkparser.hpp.

Here is the caller graph for this function:

◆ MMG5_internal_VTKSetLine() [2/2]

static void MMG5_internal_VTKSetLine ( vtkSmartPointer< vtkUnstructuredGrid >  d,
vtkSmartPointer< vtkCellArray > *  ca 
)
static
Parameters
dvtk data type in which we want to store the array ca
cavtk cell array containing the lines connectivity

Nothing to do here, the SetCell method allow to handle both lines and elements.

Definition at line 90 of file vtkparser.hpp.

◆ MMG5_loadVtkMesh_part1()

int MMG5_loadVtkMesh_part1 ( MMG5_pMesh  mesh,
const char *  filename,
vtkDataSet **  dataset,
int8_t *  ptMeditRef,
int8_t *  eltMeditRef,
int *  nsols,
int8_t *  metricData 
)
Parameters
meshpointer toward a MMG5 mesh
filenamename of the input file.
datasetvtkdataset structure
ptMeditRefindex of point data field that contains references (field named medit:ref), -1 if no references
eltMeditRefindex of a cell data field that contains references (field named medit:ref), -1 if no references
nsolsnumber of point data (except the medit:ref ones)
metricData1 if file contains a metric data highlighted by the :metric name
Returns
1 if success, 0 if fail to open/load the file, -1 otherwise;

I/O at Vtk VTK file format.

Definition at line 269 of file vtkparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_loadVtkMesh_part2()

int MMG5_loadVtkMesh_part2 ( MMG5_pMesh  mesh,
MMG5_pSol sol,
vtkDataSet **  dataset,
int8_t  ptMeditRef,
int8_t  eltMeditRef,
int  nsols 
)
Parameters
meshpointer toward a MMG5 mesh
ptMeditRef1 if a point data field contains references (field named medit:ref)
eltMeditRef1 if a cell data field contains references (field named medit:ref)
nsolsnumber of point data (except the medit:ref ones)
Returns
1 if success, -1 if fail.

I/O at Vtu VTK file format, part 2: mesh and solution storing

Definition at line 346 of file vtkparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_loadVtpMesh_part1()

int MMG5_loadVtpMesh_part1 ( MMG5_pMesh  mesh,
const char *  filename,
vtkDataSet **  dataset,
int8_t *  ptMeditRef,
int8_t *  eltMeditRef,
int *  nsols,
int8_t *  metricData 
)
Parameters
meshpointer toward a MMG5 mesh
filenamename of the input file.
datasetvtkdataset structure
ptMeditRefindex of point data field that contains references (field named medit:ref), -1 if no references
eltMeditRefindex of a cell data field that contains references (field named medit:ref), -1 if no references
nsolsnumber of point data (except the medit:ref ones)
metricData1 if file contains a metric data highlighted by the :metric name
Returns
1 if success, 0 if fail to open/load the file, -1 otherwise;

I/O at Vtp VTK file format.

Definition at line 230 of file vtkparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_loadVtuMesh_part1()

int MMG5_loadVtuMesh_part1 ( MMG5_pMesh  mesh,
const char *  filename,
vtkDataSet **  dataset,
int8_t *  ptMeditRef,
int8_t *  eltMeditRef,
int *  nsols,
int8_t *  metricData 
)
Parameters
meshpointer toward a MMG5 mesh
filenamepointer toward the filename
datasetvtkdataset structure
ptMeditRefindex of point data field that contains references (field named medit:ref), -1 if no references
eltMeditRefindex of a cell data field that contains references (field named medit:ref), -1 if no references
nsolsnumber of point data (except the medit:ref ones)
metricData1 if file contains a metric data highlighted by the :metric name
Returns
1 if success, 0 if fail to open/load the file, -1 other errors;

I/O at Vtu VTK file format, part 1: file reading + count of the number of entities.

Definition at line 308 of file vtkparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MMG5_saveVtkMesh()

template<class T , class TWriter , class PWriter >
int MMG5_saveVtkMesh ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  filename,
int  metricData,
int  binary 
)
Template Parameters
Tone of the VTK data class.
TWriterone of the VTK writer class.
Parameters
meshpointer toward a MMG5 mesh
solpointer toward a MMG5 solution array
filenamename of the input file.
metricData1 if sol contains a metric array
binary1 to save file at binary format (if available in TWriter class)
Returns
1 if success, 0 if fail.

Save a vtk file at .vtp, .vtu or .vtk format.

Definition at line 516 of file vtkparser.hpp.

Here is the caller graph for this function:

◆ MMG5_saveVtkMesh_i()

template<class T , class TWriter , class PWriter >
int MMG5_saveVtkMesh_i ( MMG5_pMesh  mesh,
MMG5_pSol sol,
const char *  mfilename,
int  metricData,
int  binary,
int  npart,
int  myid,
int  master 
)
Template Parameters
Tone of the VTK data class.
TWriterone of the VTK writer class.
PWriterone of the parallel VTK writer class.
Parameters
meshpointer toward a MMG5 mesh
solpointer toward a MMG5 solution array
mfilenamename of the master file to save (if call by master).
metricData1 if sol contains a metric array
binary1 to save file at binary format (if available in TWriter class)
npartnumber of parts of the saving
myidid of the process (save the file part number myid)
masterid of the master process (save its part file + the master file)
Returns
1 if success, 0 if fail.

Save a vtk file at .(p)vtp, .(p)vtu or .(p)vtk format.

Definition at line 170 of file vtkparser.hpp.

Here is the call graph for this function: