proteus
1.8.1
C/C++/Fortran libraries
|
Go to the documentation of this file.
9 static void print_int_2d(
int* a,
int h,
int w, FILE*
f)
11 for (
int i = 0; i < h; ++i) {
12 for (
int j = 0; j <
w; ++j)
13 fprintf(
f,
"%d ", a[i *
w + j]);
18 static void print_double_2d(
double* a,
int h,
int w, FILE*
f)
20 for (
int i = 0; i < h; ++i) {
21 for (
int j = 0; j <
w; ++j)
22 fprintf(
f,
"%f ", a[i *
w + j]);
27 static void dump_proteus_mesh_header(
Mesh* m, FILE*
f)
35 fprintf(
f,
"nInteriorElementBoundaries_global = %d\n",
37 fprintf(
f,
"nExteriorElementBoundaries_global = %d\n",
44 static void dump_proteus_subdomain(
Mesh* m, FILE*
f)
46 dump_proteus_mesh_header(m,
f);
47 fprintf(
f,
"elementNodesArray:\n");
50 fprintf(
f,
"nodeElementOffsets:\n");
52 fprintf(
f,
" NULL\n");
58 fprintf(
f,
"nodeElementsArray:\n");
59 for (
int i = 0; i < total; ++i)
62 fprintf(
f,
"elementNeighborsArray:\n");
65 fprintf(
f,
"elementBoundariesArray:\n");
68 fprintf(
f,
"elementBoundaryNodesArray:\n");
71 fprintf(
f,
"elementBoundaryElementsArray:\n");
74 fprintf(
f,
"elementBoundaryLocalElementBoundariesArray:\n");
77 fprintf(
f,
"interiorElementBoundariesArray:\n");
80 fprintf(
f,
"exteriorElementBoundariesArray:\n");
83 fprintf(
f,
"edgeNodesArray:\n");
85 fprintf(
f,
"nodeStarOffsets:\n");
87 fprintf(
f,
" NULL\n");
93 fprintf(
f,
"nodeStarArray:\n");
94 for (
int i = 0; i < total; ++i)
97 fprintf(
f,
"elementMaterialTypes:\n");
100 fprintf(
f,
"elementBoundaryMaterialTypes:\n");
103 fprintf(
f,
"nodeMaterialTypes:\n");
106 fprintf(
f,
"nodeArray:\n");
108 fprintf(
f,
"elementDiametersArray:\n");
111 fprintf(
f,
"elementInnerDiametersArray:\n");
114 fprintf(
f,
"elementBoundaryDiametersArray:\n");
117 fprintf(
f,
"elementBarycentersArray:\n");
121 fprintf(
f,
"nodeDiametersArray:\n");
124 fprintf(
f,
"nodeSupportArray:\n");
127 fprintf(
f,
"h = %f\n", m->
h);
128 fprintf(
f,
"hMin = %f\n", m->
hMin);
129 fprintf(
f,
"sigmaMax = %f\n", m->
sigmaMax);
130 fprintf(
f,
"volume = %f\n", m->
volume);
133 static void dump_proteus_parallel_arrays(
Mesh* m, FILE*
f)
135 int size = PCU_Comm_Peers();
136 fprintf(
f,
"elementOffsets_subdomain_owned:\n");
137 for (
int i = 0; i <= size; ++i)
139 fprintf(
f,
"elementNumbering_subdomain2global:\n");
142 fprintf(
f,
"nodeOffsets_subdomain_owned:\n");
143 for (
int i = 0; i <= size; ++i)
145 fprintf(
f,
"nodeNumbering_subdomain2global:\n");
148 fprintf(
f,
"elementBoundaryOffsets_subdomain_owned:\n");
149 for (
int i = 0; i <= size; ++i)
151 fprintf(
f,
"elementBoundaryNumbering_subdomain2global:\n");
154 fprintf(
f,
"edgeOffsets_subdomain_owned:\n");
155 for (
int i = 0; i <= size; ++i)
157 fprintf(
f,
"edgeNumbering_subdomain2global:\n");
165 fprintf(stderr,
"%d dumping mesh file\n", PCU_Comm_Self());
166 if (PCU_Comm_Peers() > 1) {
167 fprintf(
f,
"PARALLEL HEADER\n");
168 dump_proteus_mesh_header(m,
f);
169 fprintf(
f,
"PARALLEL ARRAYS\n");
170 dump_proteus_parallel_arrays(m,
f);
171 fprintf(
f,
"SUBDOMAIN\n");
174 dump_proteus_subdomain(m,
f);
double * nodeDiametersArray
int * elementBoundaryOffsets_subdomain_owned
int * interiorElementBoundariesArray
int * elementBoundaryNodesArray
int * exteriorElementBoundariesArray
int nNodes_elementBoundary
int nElementBoundaries_global
int nInteriorElementBoundaries_global
int * nodeOffsets_subdomain_owned
int * elementBoundaryLocalElementBoundariesArray
int * elementBoundaryMaterialTypes
int * edgeNumbering_subdomain2global
double * elementInnerDiametersArray
int * edgeOffsets_subdomain_owned
double * elementBoundaryBarycentersArray
int * elementBoundariesArray
double * elementBarycentersArray
int nElementBoundaries_element
int * elementMaterialTypes
int * elementOffsets_subdomain_owned
double * elementDiametersArray
int * elementBoundaryNumbering_subdomain2global
int nExteriorElementBoundaries_global
int max_nNodeNeighbors_node
int * nodeNumbering_subdomain2global
double * nodeSupportArray
int * elementNumbering_subdomain2global
void dump_proteus_mesh(Mesh *m, FILE *f)
double * elementBoundaryDiametersArray
int * elementBoundaryElementsArray
int * elementNeighborsArray