SCOREC core
Parallel unstructured mesh tools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
apfConvert.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Scientific Computation Research Center
3  *
4  * This work is open source software, licensed under the terms of the
5  * BSD license as described in the LICENSE file in the top-level directory.
6  */
7 
8 #ifndef APF_CONVERT_H
9 #define APF_CONVERT_H
10 
14 #include <map>
15 
16 namespace apf {
17 
18 class Mesh;
19 class Mesh2;
20 class ModelEntity;
21 class MeshEntity;
22 
28 void convert(Mesh *in, Mesh2 *out,
29  MeshEntity** nodes=NULL, MeshEntity** elems=NULL, bool copy_data=true);
30 
32 typedef std::map<int, MeshEntity*> GlobalToVert;
33 
39 void assemble(Mesh2* m, const int* conn, int nelem, int etype,
40  GlobalToVert& globalToVert);
41 
48 void finalise(Mesh2* m, GlobalToVert& globalToVert);
49 
66 void construct(Mesh2* m, const int* conn, int nelem, int etype,
67  GlobalToVert& globalToVert);
68 
77 void setCoords(Mesh2* m, const double* coords, int nverts,
78  GlobalToVert& globalToVert);
79 
87 void destruct(Mesh2* m, int*& conn, int& nelem, int &etype, int cellDim = -1);
88 
91 void extractCoords(Mesh2* m, double*& coords, int& nverts);
92 
93 }
94 
95 #endif
void extractCoords(Mesh2 *m, double *&coords, int &nverts)
get a contiguous set of global vertex coordinates
void construct(Mesh2 *m, const int *conn, int nelem, int etype, GlobalToVert &globalToVert)
construct a mesh from just a connectivity array
void destruct(Mesh2 *m, int *&conn, int &nelem, int &etype, int cellDim=-1)
convert an apf::Mesh2 object into a connectivity array
apf::Mesh2 Mesh
convenient mesh name
Definition: maMesh.h:27
void finalise(Mesh2 *m, GlobalToVert &globalToVert)
finalise construction of a mixed-cell-type mesh from just a connectivity array
void setCoords(Mesh2 *m, const double *coords, int nverts, GlobalToVert &globalToVert)
Assign coordinates to the mesh.
Extended mesh interface for modification.
Definition: apfMesh2.h:29
std::map< int, MeshEntity * > GlobalToVert
a map from global ids to vertex objects
Definition: apfConvert.h:32
void assemble(Mesh2 *m, const int *conn, int nelem, int etype, GlobalToVert &globalToVert)
assemble a mixed-cell-type mesh from just a connectivity array
void convert(Mesh *in, Mesh2 *out, MeshEntity **nodes=NULL, MeshEntity **elems=NULL, bool copy_data=true)
convert one mesh data structure to another