Functions
mesh.c File Reference
#include "metislib.h"
Include dependency graph for mesh.c:

Go to the source code of this file.

Functions

void CreateGraphDual (idx_t ne, idx_t nn, idx_t *eptr, idx_t *eind, idx_t ncommon, idx_t **r_xadj, idx_t **r_adjncy)
 
void CreateGraphNodal (idx_t ne, idx_t nn, idx_t *eptr, idx_t *eind, idx_t **r_xadj, idx_t **r_adjncy)
 
mesh_tCreateMesh (void)
 
idx_t FindCommonElements (idx_t qid, idx_t elen, idx_t *eind, idx_t *nptr, idx_t *nind, idx_t *eptr, idx_t ncommon, idx_t *marker, idx_t *nbrs)
 
idx_t FindCommonNodes (idx_t qid, idx_t nelmnts, idx_t *elmntids, idx_t *eptr, idx_t *eind, idx_t *marker, idx_t *nbrs)
 
void FreeMesh (mesh_t **r_mesh)
 
void InitMesh (mesh_t *mesh)
 
int METIS_MeshToDual (idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind, idx_t *ncommon, idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy)
 
int METIS_MeshToNodal (idx_t *ne, idx_t *nn, idx_t *eptr, idx_t *eind, idx_t *numflag, idx_t **r_xadj, idx_t **r_adjncy)
 

Function Documentation

◆ CreateGraphDual()

void CreateGraphDual ( idx_t  ne,
idx_t  nn,
idx_t eptr,
idx_t eind,
idx_t  ncommon,
idx_t **  r_xadj,
idx_t **  r_adjncy 
)

This function creates the dual of a finite element mesh

Definition at line 162 of file mesh.c.

◆ CreateGraphNodal()

void CreateGraphNodal ( idx_t  ne,
idx_t  nn,
idx_t eptr,
idx_t eind,
idx_t **  r_xadj,
idx_t **  r_adjncy 
)

This function creates the (almost) nodal of a finite element mesh

Definition at line 277 of file mesh.c.

◆ CreateMesh()

mesh_t* CreateMesh ( void  )

This function creates and initializes a mesh_t structure

Definition at line 380 of file mesh.c.

◆ FindCommonElements()

idx_t FindCommonElements ( idx_t  qid,
idx_t  elen,
idx_t eind,
idx_t nptr,
idx_t nind,
idx_t eptr,
idx_t  ncommon,
idx_t marker,
idx_t nbrs 
)

This function finds all elements that share at least ncommon nodes with the `‘query’' element.

Definition at line 237 of file mesh.c.

◆ FindCommonNodes()

idx_t FindCommonNodes ( idx_t  qid,
idx_t  nelmnts,
idx_t elmntids,
idx_t eptr,
idx_t eind,
idx_t marker,
idx_t nbrs 
)

This function finds the union of nodes that are in the same elements with the `‘query’' node.

Definition at line 348 of file mesh.c.

◆ FreeMesh()

void FreeMesh ( mesh_t **  r_mesh)

This function deallocates any memory stored in a mesh

Definition at line 404 of file mesh.c.

◆ InitMesh()

void InitMesh ( mesh_t mesh)

This function initializes a mesh_t data structure

Definition at line 395 of file mesh.c.

◆ METIS_MeshToDual()

int METIS_MeshToDual ( idx_t ne,
idx_t nn,
idx_t eptr,
idx_t eind,
idx_t ncommon,
idx_t numflag,
idx_t **  r_xadj,
idx_t **  r_adjncy 
)

This function creates a graph corresponding to the dual of a finite element mesh.

Parameters
neis the number of elements in the mesh.
nnis the number of nodes in the mesh.
eptris an array of size ne+1 used to mark the start and end locations in the nind array.
eindis an array that stores for each element the set of node IDs (indices) that it is made off. The length of this array is equal to the total number of nodes over all the mesh elements.
ncommonis the minimum number of nodes that two elements must share in order to be connected via an edge in the dual graph.
numflagis either 0 or 1 indicating if the numbering of the nodes starts from 0 or 1, respectively. The same numbering is used for the returned graph as well.
r_xadjindicates where the adjacency list of each vertex is stored in r_adjncy. The memory for this array is allocated by this routine. It can be freed by calling METIS_free().
r_adjncystores the adjacency list of each vertex in the generated dual graph. The memory for this array is allocated by this routine. It can be freed by calling METIS_free().

Definition at line 44 of file mesh.c.

◆ METIS_MeshToNodal()

int METIS_MeshToNodal ( idx_t ne,
idx_t nn,
idx_t eptr,
idx_t eind,
idx_t numflag,
idx_t **  r_xadj,
idx_t **  r_adjncy 
)

This function creates a graph corresponding to (almost) the nodal of a finite element mesh. In the nodal graph, each node is connected to the nodes corresponding to the union of nodes present in all the elements in which that node belongs.

Parameters
neis the number of elements in the mesh.
nnis the number of nodes in the mesh.
eptris an array of size ne+1 used to mark the start and end locations in the nind array.
eindis an array that stores for each element the set of node IDs (indices) that it is made off. The length of this array is equal to the total number of nodes over all the mesh elements.
numflagis either 0 or 1 indicating if the numbering of the nodes starts from 0 or 1, respectively. The same numbering is used for the returned graph as well.
r_xadjindicates where the adjacency list of each vertex is stored in r_adjncy. The memory for this array is allocated by this routine. It can be freed by calling METIS_free().
r_adjncystores the adjacency list of each vertex in the generated dual graph. The memory for this array is allocated by this routine. It can be freed by calling METIS_free().

Definition at line 114 of file mesh.c.



gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:20