/[escript]/branches/domexper/dudley/src/Mesh_tet4.c
ViewVC logotype

Contents of /branches/domexper/dudley/src/Mesh_tet4.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3086 - (show annotations)
Thu Aug 5 05:07:58 2010 UTC (8 years, 10 months ago) by jfenwick
Original Path: branches/domexper/dudley/src/Mesh_hex8.c
File MIME type: text/plain
File size: 20491 byte(s)
Another pass at removing finley

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Dudley: generates rectangular meshes */
18
19 /* Generates a numElements[0] x numElements[1] x numElements[2] mesh with first order elements (Hex8) in the brick */
20 /* [0,Length[0]] x [0,Length[1]] x [0,Length[2]]. order is the desired accuracy of the */
21 /* integration scheme. */
22
23 /**************************************************************/
24
25 #include "RectangularMesh.h"
26
27 Dudley_Mesh* Dudley_RectangularMesh_Hex8(dim_t* numElements,
28 double* Length,
29 bool_t* periodic,
30 index_t order,
31 index_t reduced_order,
32 bool_t useElementsOnFace,
33 bool_t useFullElementOrder,
34 bool_t optimize)
35 {
36 #define N_PER_E 1
37 #define DIM 3
38 dim_t N0,N1,N2,NE0,NE1,NE2,i0,i1,i2,k,Nstride0=0, Nstride1=0,Nstride2=0, local_NE0, local_NE1, local_NE2, local_N0=0, local_N1=0, local_N2=0;
39 dim_t totalNECount,faceNECount,NDOF0=0,NDOF1=0,NDOF2=0,NFaceElements=0, NN;
40 index_t node0, myRank, e_offset2, e_offset1, e_offset0=0, offset1=0, offset2=0, offset0=0, global_i0, global_i1, global_i2;
41 Dudley_ReferenceElementSet *refPoints=NULL, *refContactElements=NULL, *refFaceElements=NULL, *refElements=NULL;
42 Dudley_Mesh* out;
43 Paso_MPIInfo *mpi_info = NULL;
44 char name[50];
45 #ifdef Dudley_TRACE
46 double time0=Dudley_timer();
47 #endif
48
49 /* get MPI information */
50 mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );
51 if (! Dudley_noError()) {
52 return NULL;
53 }
54 myRank=mpi_info->rank;
55
56 /* set up the global dimensions of the mesh */
57
58 NE0=MAX(1,numElements[0]);
59 NE1=MAX(1,numElements[1]);
60 NE2=MAX(1,numElements[2]);
61 N0=N_PER_E*NE0+1;
62 N1=N_PER_E*NE1+1;
63 N2=N_PER_E*NE2+1;
64
65 /* allocate mesh: */
66 sprintf(name,"Rectangular %d x %d x %d mesh",N0,N1,N2);
67 out=Dudley_Mesh_alloc(name,DIM, mpi_info);
68 if (! Dudley_noError()) {
69 Paso_MPIInfo_free( mpi_info );
70 return NULL;
71 }
72 refElements= Dudley_ReferenceElementSet_alloc(Hex8,order,reduced_order);
73 if (useElementsOnFace) {
74 refFaceElements=Dudley_ReferenceElementSet_alloc(Hex8Face, order, reduced_order);
75 refContactElements=Dudley_ReferenceElementSet_alloc(Hex8Face_Contact, order, reduced_order);
76 } else {
77 refFaceElements=Dudley_ReferenceElementSet_alloc(Rec4, order, reduced_order);
78 refContactElements=Dudley_ReferenceElementSet_alloc(Rec4_Contact, order, reduced_order);
79 }
80 refPoints=Dudley_ReferenceElementSet_alloc(Point1, order, reduced_order);
81
82
83 if ( Dudley_noError()) {
84
85 Dudley_Mesh_setPoints(out,Dudley_ElementFile_alloc(refPoints, mpi_info));
86 Dudley_Mesh_setContactElements(out,Dudley_ElementFile_alloc(refContactElements, mpi_info));
87 Dudley_Mesh_setFaceElements(out,Dudley_ElementFile_alloc(refFaceElements, mpi_info));
88 Dudley_Mesh_setElements(out,Dudley_ElementFile_alloc(refElements, mpi_info));
89
90 /* work out the largest dimension */
91 if (N2==MAX3(N0,N1,N2)) {
92 Nstride0=1;
93 Nstride1=N0;
94 Nstride2=N0*N1;
95 local_NE0=NE0;
96 e_offset0=0;
97 local_NE1=NE1;
98 e_offset1=0;
99 Paso_MPIInfo_Split(mpi_info,NE2,&local_NE2,&e_offset2);
100 } else if (N1==MAX3(N0,N1,N2)) {
101 Nstride0=N2;
102 Nstride1=N0*N2;
103 Nstride2=1;
104 local_NE0=NE0;
105 e_offset0=0;
106 Paso_MPIInfo_Split(mpi_info,NE1,&local_NE1,&e_offset1);
107 local_NE2=NE2;
108 e_offset2=0;
109 } else {
110 Nstride0=N1*N2;
111 Nstride1=1;
112 Nstride2=N1;
113 Paso_MPIInfo_Split(mpi_info,NE0,&local_NE0,&e_offset0);
114 local_NE1=NE1;
115 e_offset1=0;
116 local_NE2=NE2;
117 e_offset2=0;
118 }
119 offset0=e_offset0*N_PER_E;
120 offset1=e_offset1*N_PER_E;
121 offset2=e_offset2*N_PER_E;
122 local_N0=local_NE0>0 ? local_NE0*N_PER_E+1 : 0;
123 local_N1=local_NE1>0 ? local_NE1*N_PER_E+1 : 0;
124 local_N2=local_NE2>0 ? local_NE2*N_PER_E+1 : 0;
125
126 /* get the number of surface elements */
127
128 NFaceElements=0;
129 if (!periodic[2] && (local_NE2>0)) {
130 NDOF2=N2;
131 if (offset2==0) NFaceElements+=local_NE1*local_NE0;
132 if (local_NE2+e_offset2 == NE2) NFaceElements+=local_NE1*local_NE0;
133 } else {
134 NDOF2=N2-1;
135 }
136
137 if (!periodic[0] && (local_NE0>0)) {
138 NDOF0=N0;
139 if (e_offset0 == 0) NFaceElements+=local_NE1*local_NE2;
140 if (local_NE0+e_offset0 == NE0) NFaceElements+=local_NE1*local_NE2;
141 } else {
142 NDOF0=N0-1;
143 }
144 if (!periodic[1] && (local_NE1>0)) {
145 NDOF1=N1;
146 if (e_offset1 == 0) NFaceElements+=local_NE0*local_NE2;
147 if (local_NE1+e_offset1 == NE1) NFaceElements+=local_NE0*local_NE2;
148 } else {
149 NDOF1=N1-1;
150 }
151 }
152
153
154 /* allocate tables: */
155 if (Dudley_noError()) {
156
157 Dudley_NodeFile_allocTable(out->Nodes,local_N0*local_N1*local_N2);
158 Dudley_ElementFile_allocTable(out->Elements,local_NE0*local_NE1*local_NE2);
159 Dudley_ElementFile_allocTable(out->FaceElements,NFaceElements);
160 }
161
162 if (Dudley_noError()) {
163 /* create nodes */
164
165 #pragma omp parallel for private(i0,i1,i2,k,global_i0,global_i1,global_i2)
166 for (i2=0;i2<local_N2;i2++) {
167 for (i1=0;i1<local_N1;i1++) {
168 for (i0=0;i0<local_N0;i0++) {
169 k=i0+local_N0*i1+local_N0*local_N1*i2;
170 global_i0=i0+offset0;
171 global_i1=i1+offset1;
172 global_i2=i2+offset2;
173 out->Nodes->Coordinates[INDEX2(0,k,DIM)]=DBLE(global_i0)/DBLE(N0-1)*Length[0];
174 out->Nodes->Coordinates[INDEX2(1,k,DIM)]=DBLE(global_i1)/DBLE(N1-1)*Length[1];
175 out->Nodes->Coordinates[INDEX2(2,k,DIM)]=DBLE(global_i2)/DBLE(N2-1)*Length[2];
176 out->Nodes->Id[k]=Nstride0*global_i0+Nstride1*global_i1+Nstride2*global_i2;
177 out->Nodes->Tag[k]=0;
178 out->Nodes->globalDegreesOfFreedom[k]=Nstride0*(global_i0%NDOF0)
179 +Nstride1*(global_i1%NDOF1)
180 +Nstride2*(global_i2%NDOF2);
181 }
182 }
183 }
184 /* set the elements: */
185 NN=out->Elements->numNodes;
186 #pragma omp parallel for private(i0,i1,i2,k,node0)
187 for (i2=0;i2<local_NE2;i2++) {
188 for (i1=0;i1<local_NE1;i1++) {
189 for (i0=0;i0<local_NE0;i0++) {
190
191 k=i0+local_NE0*i1+local_NE0*local_NE1*i2;
192 node0=Nstride0*N_PER_E*(i0+e_offset0)+Nstride1*N_PER_E*(i1+e_offset1)+Nstride2*N_PER_E*(i2+e_offset2);
193
194 out->Elements->Id[k]=(i0+e_offset0)+NE0*(i1+e_offset1)+NE0*NE1*(i2+e_offset2);
195 out->Elements->Tag[k]=0;
196 out->Elements->Owner[k]=myRank;
197
198 out->Elements->Nodes[INDEX2(0,k,NN)] =node0 ;
199 out->Elements->Nodes[INDEX2(1,k,NN)] =node0+ Nstride0;
200 out->Elements->Nodes[INDEX2(2,k,NN)] =node0+ Nstride1+Nstride0;
201 out->Elements->Nodes[INDEX2(3,k,NN)] =node0+ Nstride1;
202 out->Elements->Nodes[INDEX2(4,k,NN)] =node0+Nstride2 ;
203 out->Elements->Nodes[INDEX2(5,k,NN)] =node0+Nstride2 +Nstride0;
204 out->Elements->Nodes[INDEX2(6,k,NN)] =node0+Nstride2+Nstride1+Nstride0;
205 out->Elements->Nodes[INDEX2(7,k,NN)] =node0+Nstride2+Nstride1 ;
206 }
207 }
208 }
209 /* face elements */
210 NN=out->FaceElements->numNodes;
211 totalNECount=NE0*NE1*NE2;
212 faceNECount=0;
213 /* these are the quadrilateral elements on boundary 1 (x3=0): */
214 if (!periodic[2] && (local_NE2>0)) {
215 /* ** elements on boundary 100 (x3=0): */
216 if (e_offset2==0) {
217 #pragma omp parallel for private(i0,i1,k,node0)
218 for (i1=0;i1<local_NE1;i1++) {
219 for (i0=0;i0<local_NE0;i0++) {
220
221 k=i0+local_NE0*i1+faceNECount;
222 node0=Nstride0*N_PER_E*(i0+e_offset0)+Nstride1*N_PER_E*(i1+e_offset1);
223
224 out->FaceElements->Id[k]=(i0+e_offset0)+NE0*(i1+e_offset1)+totalNECount;
225 out->FaceElements->Tag[k]=100;
226 out->FaceElements->Owner[k]=myRank;
227
228 if (useElementsOnFace) {
229 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0 ;
230 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0 +Nstride1 ;
231 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0 +Nstride1+Nstride0;
232 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+ Nstride0 ;
233 out->FaceElements->Nodes[INDEX2(4,k,NN)] =node0+Nstride2 ;
234 out->FaceElements->Nodes[INDEX2(5,k,NN)] =node0+Nstride2+Nstride1 ;
235 out->FaceElements->Nodes[INDEX2(6,k,NN)] =node0+Nstride2+Nstride1+Nstride0;
236 out->FaceElements->Nodes[INDEX2(7,k,NN)] =node0+Nstride2 +Nstride0;
237 } else {
238 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0 ;
239 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0+ Nstride1 ;
240 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0+ Nstride1+Nstride0;
241 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+ Nstride0;
242 }
243 }
244 }
245 faceNECount+=local_NE1*local_NE0;
246 }
247 totalNECount+=NE1*NE0;
248 /* ** elements on boundary 200 (x3=1) */
249 if (local_NE2+e_offset2 == NE2) {
250 #pragma omp parallel for private(i0,i1,k,node0)
251 for (i1=0;i1<local_NE1;i1++) {
252 for (i0=0;i0<local_NE0;i0++) {
253
254 k=i0+local_NE0*i1+faceNECount;
255 node0=Nstride0*N_PER_E*(i0+e_offset0)+Nstride1*N_PER_E*(i1+e_offset1)+Nstride2*N_PER_E*(NE2-1);
256
257 out->FaceElements->Id[k]=(i0+e_offset0)+NE0*(i1+e_offset1)+totalNECount;
258 out->FaceElements->Tag[k]=200;
259 out->FaceElements->Owner[k]=myRank;
260 if (useElementsOnFace) {
261 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0+Nstride2 ;
262 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0+Nstride2+ Nstride0;
263 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0+Nstride2+Nstride1+Nstride0;
264 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+Nstride2+Nstride1 ;
265
266 out->FaceElements->Nodes[INDEX2(4,k,NN)] =node0 ;
267 out->FaceElements->Nodes[INDEX2(5,k,NN)] =node0+Nstride0 ;
268 out->FaceElements->Nodes[INDEX2(6,k,NN)] =node0+ Nstride1+Nstride0;
269 out->FaceElements->Nodes[INDEX2(7,k,NN)] =node0+ Nstride1;
270 } else {
271 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0+Nstride2 ;
272 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0+Nstride2 +Nstride0;
273 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0+Nstride2+Nstride1+Nstride0;
274 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+Nstride2+Nstride1 ;
275 }
276 }
277 }
278 faceNECount+=local_NE1*local_NE0;
279 }
280 totalNECount+=NE1*NE0;
281 }
282 if (!periodic[0] && (local_NE0>0)) {
283 /* ** elements on boundary 001 (x1=0): */
284
285 if (e_offset0 == 0) {
286 #pragma omp parallel for private(i1,i2,k,node0)
287 for (i2=0;i2<local_NE2;i2++) {
288 for (i1=0;i1<local_NE1;i1++) {
289
290 k=i1+local_NE1*i2+faceNECount;
291 node0=Nstride1*N_PER_E*(i1+e_offset1)+Nstride2*N_PER_E*(i2+e_offset2);
292 out->FaceElements->Id[k]=(i1+e_offset1)+NE1*(i2+e_offset2)+totalNECount;
293 out->FaceElements->Tag[k]=1;
294 out->FaceElements->Owner[k]=myRank;
295
296 if (useElementsOnFace) {
297 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0 ;
298 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0+Nstride2 ;
299 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0+Nstride2+Nstride1 ;
300 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+Nstride1 ;
301 out->FaceElements->Nodes[INDEX2(4,k,NN)] =node0+Nstride0 ;
302 out->FaceElements->Nodes[INDEX2(5,k,NN)] =node0+Nstride2+Nstride0 ;
303 out->FaceElements->Nodes[INDEX2(6,k,NN)] =node0+Nstride2+Nstride1+Nstride0;
304 out->FaceElements->Nodes[INDEX2(7,k,NN)] =node0+Nstride1+Nstride0 ;
305 } else {
306 out->FaceElements->Nodes[INDEX2(0,k,NN)] =node0 ;
307 out->FaceElements->Nodes[INDEX2(1,k,NN)] =node0+Nstride2 ;
308 out->FaceElements->Nodes[INDEX2(2,k,NN)] =node0+Nstride2+Nstride1 ;
309 out->FaceElements->Nodes[INDEX2(3,k,NN)] =node0+ Nstride1 ;
310 }
311 }
312 }
313 faceNECount+=local_NE1*local_NE2;
314 }
315 totalNECount+=NE1*NE2;
316 /* ** elements on boundary 002 (x1=1): */
317 if (local_NE0+e_offset0 == NE0) {
318 #pragma omp parallel for private(i1,i2,k,node0)
319 for (i2=0;i2<local_NE2;i2++) {
320 for (i1=0;i1<local_NE1;i1++) {
321 k=i1+local_NE1*i2+faceNECount;
322 node0=Nstride0*N_PER_E*(NE0-1)+Nstride1*N_PER_E*(i1+e_offset1)+Nstride2*N_PER_E*(i2+e_offset2);
323 out->FaceElements->Id[k]=(i1+e_offset1)+NE1*(i2+e_offset2)+totalNECount;
324 out->FaceElements->Tag[k]=2;
325 out->FaceElements->Owner[k]=myRank;
326
327 if (useElementsOnFace) {
328 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0+ Nstride0;
329 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+ Nstride1+Nstride0;
330 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2+Nstride1+Nstride0;
331 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+Nstride2+ Nstride0;
332
333 out->FaceElements->Nodes[INDEX2(4,k,NN)]=node0 ;
334 out->FaceElements->Nodes[INDEX2(5,k,NN)]=node0+ Nstride1 ;
335 out->FaceElements->Nodes[INDEX2(6,k,NN)]=node0+Nstride2+Nstride1 ;
336 out->FaceElements->Nodes[INDEX2(7,k,NN)]=node0+Nstride2 ;
337
338 } else {
339 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0 +Nstride0;
340 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+ Nstride1+Nstride0;
341 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2+Nstride1+Nstride0;
342 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+Nstride2+ Nstride0;
343 }
344
345 }
346 }
347 faceNECount+=local_NE1*local_NE2;
348 }
349 totalNECount+=NE1*NE2;
350 }
351 if (!periodic[1] && (local_NE1>0)) {
352 /* ** elements on boundary 010 (x2=0): */
353 if (e_offset1 == 0) {
354 #pragma omp parallel for private(i0,i2,k,node0)
355 for (i2=0;i2<local_NE2;i2++) {
356 for (i0=0;i0<local_NE0;i0++) {
357 k=i0+local_NE0*i2+faceNECount;
358 node0=Nstride0*N_PER_E*(i0+e_offset0)+Nstride2*N_PER_E*(i2+e_offset2);
359
360 out->FaceElements->Id[k]=(i2+e_offset2)+NE2*(e_offset0+i0)+totalNECount;
361 out->FaceElements->Tag[k]=10;
362 out->FaceElements->Owner[k]=myRank;
363 if (useElementsOnFace) {
364 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0 ;
365 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+ Nstride0;
366 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2 +Nstride0;
367 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+Nstride2 ;
368
369 out->FaceElements->Nodes[INDEX2(4,k,NN)]=node0+ Nstride1 ;
370 out->FaceElements->Nodes[INDEX2(5,k,NN)]=node0+Nstride1+ Nstride0;
371 out->FaceElements->Nodes[INDEX2(6,k,NN)]=node0+Nstride2+Nstride1+Nstride0;
372 out->FaceElements->Nodes[INDEX2(7,k,NN)]=node0+Nstride2+Nstride1 ;
373 } else {
374 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0 ;
375 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+ Nstride0;
376 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2+ Nstride0;
377 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+Nstride2 ;
378 }
379 }
380 }
381 faceNECount+=local_NE0*local_NE2;
382 }
383 totalNECount+=NE0*NE2;
384 /* ** elements on boundary 020 (x2=1): */
385 if (local_NE1+e_offset1 == NE1) {
386 #pragma omp parallel for private(i0,i2,k,node0)
387 for (i2=0;i2<local_NE2;i2++) {
388 for (i0=0;i0<local_NE0;i0++) {
389 k=i0+local_NE0*i2+faceNECount;
390 node0=Nstride0*N_PER_E*(i0+e_offset0)+Nstride1*N_PER_E*(NE1-1)+Nstride2*N_PER_E*(i2+e_offset2);
391
392 out->FaceElements->Id[k]=(i2+e_offset2)+NE2*(i0+e_offset0)+totalNECount;
393 out->FaceElements->Tag[k]=20;
394 out->FaceElements->Owner[k]=myRank;
395
396 if (useElementsOnFace) {
397 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0+ Nstride1 ;
398 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+Nstride2+Nstride1 ;
399 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2+Nstride1+Nstride0;
400 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+Nstride1+Nstride0 ;
401
402 out->FaceElements->Nodes[INDEX2(4,k,NN)]=node0 ;
403 out->FaceElements->Nodes[INDEX2(5,k,NN)]=node0+Nstride2 ;
404 out->FaceElements->Nodes[INDEX2(6,k,NN)]=node0+Nstride2+ Nstride0;
405 out->FaceElements->Nodes[INDEX2(7,k,NN)]=node0+ Nstride0;
406 } else {
407 out->FaceElements->Nodes[INDEX2(0,k,NN)]=node0+ Nstride1 ;
408 out->FaceElements->Nodes[INDEX2(1,k,NN)]=node0+Nstride2+Nstride1 ;
409 out->FaceElements->Nodes[INDEX2(2,k,NN)]=node0+Nstride2+Nstride1+Nstride0;
410 out->FaceElements->Nodes[INDEX2(3,k,NN)]=node0+ Nstride1+Nstride0;
411 }
412 }
413 }
414 faceNECount+=local_NE0*local_NE2;
415 }
416 totalNECount+=NE0*NE2;
417 }
418 }
419 if (Dudley_noError()) {
420 /* add tag names */
421 Dudley_Mesh_addTagMap(out,"top", 200);
422 Dudley_Mesh_addTagMap(out,"bottom", 100);
423 Dudley_Mesh_addTagMap(out,"left", 1);
424 Dudley_Mesh_addTagMap(out,"right", 2);
425 Dudley_Mesh_addTagMap(out,"front", 10);
426 Dudley_Mesh_addTagMap(out,"back", 20);
427 }
428 /* prepare mesh for further calculatuions:*/
429 if (Dudley_noError()) {
430 Dudley_Mesh_resolveNodeIds(out);
431 }
432 if (Dudley_noError()) {
433 Dudley_Mesh_prepare(out, optimize);
434 }
435
436 if (!Dudley_noError()) {
437 Dudley_Mesh_free(out);
438 }
439 /* free up memory */
440 Dudley_ReferenceElementSet_dealloc(refPoints);
441 Dudley_ReferenceElementSet_dealloc(refContactElements);
442 Dudley_ReferenceElementSet_dealloc(refFaceElements);
443 Dudley_ReferenceElementSet_dealloc(refElements);
444 Paso_MPIInfo_free( mpi_info );
445
446 return out;
447 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26