/[escript]/trunk/finley/src/Mesh_line2.c
ViewVC logotype

Contents of /trunk/finley/src/Mesh_line2.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 757 - (show annotations)
Mon Jun 26 13:12:56 2006 UTC (13 years, 2 months ago) by woo409
File MIME type: text/plain
File size: 20565 byte(s)
+ Merge of intelc_win32 branch (revision 741:755) with trunk. Tested on iVEC altix (run_tests and py_tests all pass)

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 /**************************************************************/
14
15 /* Finley: generates rectangular meshes */
16
17 /* Generates numElements[0] mesh with first order elements (Line2) in
18 the interval [0,Length[0]]. order is the desired accuracy of the
19 integration scheme. */
20
21
22 /**************************************************************/
23
24 /* Author: gross@access.edu.au */
25 /* Version: $Id$ */
26
27 /**************************************************************/
28
29 #include "RectangularMesh.h"
30
31 /**************************************************************/
32
33 /* get the number of nodes/elements for domain with rank=rank, of size processors
34 where n is the total number of nodes/elements in the global domain */
35 static index_t domain_MODdim( index_t rank, index_t size, index_t n )
36 {
37 rank = size-rank-1;
38
39 if( rank < n%size )
40 return (index_t)floor(n/size)+1;
41 return (index_t)floor(n/size);
42 }
43
44
45 /* Determines the number of nodes/elements etc along an axis which is numElementsGlobal long for domain rank */
46 /* A bit messy, but it only has to be done once... */
47 static void domain_calculateDimension( index_t rank, dim_t size, dim_t numElementsGlobal, bool_t periodic, dim_t *numNodesLocal, dim_t *numDOFLocal, dim_t *numElementsLocal, dim_t *numElementsInternal, dim_t *firstNode, dim_t *nodesExternal, dim_t *DOFExternal, dim_t *numNodesExternal, bool_t *periodicLocal )
48 {
49 index_t i0;
50 dim_t numNodesGlobal = numElementsGlobal+1;
51
52 (*numNodesLocal) = domain_MODdim( rank, size, numNodesGlobal );
53
54 numElementsLocal[0] = numNodesLocal[0]+1;
55 periodicLocal[0] = periodicLocal[1] = FALSE;
56 nodesExternal[0] = nodesExternal[1] = 1;
57 if( periodic )
58 {
59 if( size==1 )
60 {
61 numElementsLocal[0] = numElementsGlobal;
62 nodesExternal[0] = nodesExternal[1] = 0;
63 periodicLocal[0] = periodicLocal[1] = TRUE;
64 }
65 else
66 {
67 if( rank==0 )
68 {
69 periodicLocal[0] = TRUE;
70 numNodesLocal[0]++;
71 }
72 if( rank==(size-1) )
73 {
74 periodicLocal[1] = TRUE;
75 numNodesLocal[0]--;
76 numElementsLocal[0]--;
77 }
78 }
79 }
80 else if( !periodic )
81 {
82 if( rank==0 ){
83 nodesExternal[0]--;
84 numElementsLocal[0]--;
85 }
86 if( rank==(size-1) )
87 {
88 nodesExternal[1]--;
89 numElementsLocal[0]--;
90 }
91 }
92 numNodesExternal[0] = nodesExternal[0]+nodesExternal[1];
93
94 numElementsInternal[0] = numElementsLocal[0];
95 if( (rank==0) && (rank==size-1) );
96
97 else if( !periodic && ( (rank==0) ^ (rank==size-1) ) )
98 numElementsInternal[0] -= 1;
99 else
100 numElementsInternal[0] -= 2;
101
102 firstNode[0] = 0;
103 for( i0=0; i0<rank; i0++ )
104 firstNode[0] += domain_MODdim( i0, size, numNodesGlobal );
105
106 numDOFLocal[0] = numNodesLocal[0];
107 if( periodicLocal[0] )
108 {
109 numDOFLocal[0]--;
110 }
111 DOFExternal[0] = nodesExternal[0];
112 DOFExternal[1] = nodesExternal[1];
113
114 /* some debugging printf statements */
115 printf( "rank/size = %d/%d\nNodes : %d Local, %d External[%d %d], First = %d\nElements : %d Local\nDOF : %d Local, External [%d %d]\nperiodicLocal [%d %d]\n\n", rank, size, *numNodesLocal, *numNodesExternal, nodesExternal[0], nodesExternal[1], *firstNode, *numElementsLocal, *numDOFLocal, DOFExternal[0], DOFExternal[1], periodicLocal[0], periodicLocal[1] );
116 }
117
118 Finley_Mesh* Finley_RectangularMesh_Line2(dim_t* numElements,double* Length,bool_t* periodic, dim_t order,bool_t useElementsOnFace)
119 #ifndef PASO_MPI
120 {
121 /* Serial/OpenMP version */
122 dim_t N0,NE0,i0,NDOF0,NFaceElements;
123 index_t NUMNODES,k;
124 Finley_Mesh* out;
125 char name[50];
126 double time0=Finley_timer();
127 NE0=MAX(1,numElements[0]);
128 N0=NE0+1;
129
130 if (!periodic[0]) {
131 NDOF0=N0;
132 NFaceElements=2;
133 } else {
134 NDOF0=N0-1;
135 NFaceElements=0;
136 }
137
138 /* allocate mesh: */
139
140 sprintf(name,"Rectangular mesh with %d nodes",N0);
141 out=Finley_Mesh_alloc(name,1,order);
142 if (! Finley_noError()) return NULL;
143
144 out->Elements=Finley_ElementFile_alloc(Line2,out->order);
145 if (useElementsOnFace) {
146 out->FaceElements=Finley_ElementFile_alloc(Line2Face,out->order);
147 out->ContactElements=Finley_ElementFile_alloc(Line2Face_Contact,out->order);
148 } else {
149 out->FaceElements=Finley_ElementFile_alloc(Point1,out->order);
150 out->ContactElements=Finley_ElementFile_alloc(Point1_Contact,out->order);
151 }
152 out->Points=Finley_ElementFile_alloc(Point1,out->order);
153 if (! Finley_noError()) {
154 Finley_Mesh_dealloc(out);
155 return NULL;
156 }
157
158 /* allocate tables: */
159
160 Finley_NodeFile_allocTable(out->Nodes,N0);
161 Finley_ElementFile_allocTable(out->Elements,NE0);
162 Finley_ElementFile_allocTable(out->FaceElements,NFaceElements);
163 if (! Finley_noError()) {
164 Finley_Mesh_dealloc(out);
165 return NULL;
166 }
167
168 /* set nodes: */
169
170 #pragma omp parallel for private(i0,k)
171 for (i0=0;i0<N0;i0++) {
172 k=i0;
173 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(i0)/DBLE(N0-1)*Length[0];
174 out->Nodes->Id[k]=k;
175 out->Nodes->Tag[k]=0;
176 out->Nodes->degreeOfFreedom[k]=(i0%NDOF0);
177 }
178 if (!periodic[0]) {
179 out->Nodes->Tag[0]=1;
180 out->Nodes->Tag[N0-1]=2;
181 }
182
183 /* set the elements: */
184
185 #pragma omp parallel for private(i0,k)
186 for (i0=0;i0<NE0;i0++) {
187 k=i0;
188 out->Elements->Id[k]=k;
189 out->Elements->Tag[k]=0;
190 out->Elements->Color[k]=COLOR_MOD(i0);
191
192 out->Elements->Nodes[INDEX2(0,k,2)]=i0;
193 out->Elements->Nodes[INDEX2(1,k,2)]=i0+1;
194 }
195 out->Elements->minColor=0;
196 out->Elements->maxColor=COLOR_MOD(0);
197
198 /* face elements: */
199 if (useElementsOnFace) {
200 NUMNODES=2;
201 } else {
202 NUMNODES=1;
203 }
204 if (!periodic[0]) {
205 out->FaceElements->Id[0]=NE0;
206 out->FaceElements->Tag[0]=1;
207 out->FaceElements->Color[0]=0;
208 if (useElementsOnFace) {
209 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
210 out->FaceElements->Nodes[INDEX2(1,0,NUMNODES)]=1;
211 } else {
212 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
213 }
214
215 out->FaceElements->Id[1]=NE0+1;
216 out->FaceElements->Tag[1]=2;
217 out->FaceElements->Color[1]=1;
218 if (useElementsOnFace) {
219 out->FaceElements->Nodes[INDEX2(0,1,NUMNODES)]=N0-1;
220 out->FaceElements->Nodes[INDEX2(1,1,NUMNODES)]=N0-2;
221 } else {
222 out->FaceElements->Nodes[INDEX2(0,1,NUMNODES)]=N0-1;
223 }
224 }
225 out->FaceElements->maxColor=1;
226 out->FaceElements->minColor=0;
227
228 /* face elements done: */
229
230
231 /* condense the nodes: */
232
233 Finley_Mesh_resolveNodeIds(out);
234
235 /* prepare mesh for further calculatuions:*/
236
237 Finley_Mesh_prepare(out) ;
238
239 #ifdef Finley_TRACE
240 printf("timing: mesh generation: %.4e sec\n",Finley_timer()-time0);
241 #endif
242
243 if (! Finley_noError()) {
244 Finley_Mesh_dealloc(out);
245 return NULL;
246 }
247
248 return out;
249 }
250 #else
251 {
252 /* Finley_Mesh* Finley_RectangularMesh_Line2(dim_t* numElements,double* Length,bool_t* periodic, index_t order,bool_t useElementsOnFace) { */
253 /* MPI version */
254 dim_t N0, NE0, NE0_local, i0, NDOF0, NFaceElements, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal;
255 index_t NUMNODES,k,firstNode=0, DOFcount=0, forwardDOF[2], backwardDOF[2];
256 index_t targetDomain=-1;
257 bool_t periodicLocal[2], domLeft=FALSE, domRight=FALSE, domInternal=FALSE;
258 Finley_Mesh* out=NULL;
259 char name[50];
260 double time0=Finley_timer();
261 Paso_MPIInfo *mpi_info = NULL;
262
263 /* dimensions the global domain */
264 NE0=MAX(1,numElements[0]);
265 N0=NE0+1;
266 NDOF0=N0;
267 if( periodic[0] )
268 NDOF0--;
269
270 /* get MPI information */
271 mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );
272 if (! Finley_noError()) {
273 Finley_Mesh_dealloc(out);
274 return NULL;
275 }
276
277 if( mpi_info->rank==0 )
278 domLeft = TRUE;
279 if( mpi_info->rank==mpi_info->size-1 )
280 domRight = TRUE;
281 if( mpi_info->rank>0 && mpi_info->rank<mpi_info->size-1 )
282 domInternal = TRUE;
283
284 /* dimensions of the local subdomain */
285 domain_calculateDimension( mpi_info->rank, mpi_info->size, NE0, periodic[0], &numNodesLocal, &numDOFLocal, &numElementsLocal, &numElementsInternal, &firstNode, nodesExternal, DOFExternal, &numNodesExternal, periodicLocal );
286
287 /* form face element if the local domain contains a periodic boundary */
288 NFaceElements = 0;
289 if( !periodic[0] )
290 {
291 if(domLeft)
292 NFaceElements++;
293 if(domRight)
294 NFaceElements++;
295 }
296
297
298 /* allocate mesh: */
299 sprintf(name,"Rectangular mesh with %d nodes",N0);
300 out=Finley_Mesh_alloc(name,1,order,mpi_info);
301 if (! Finley_noError()) return NULL;
302
303 out->Elements=Finley_ElementFile_alloc(Line2,out->order,mpi_info);
304 if (useElementsOnFace) {
305 out->FaceElements=Finley_ElementFile_alloc(Line2Face,out->order,mpi_info);
306 out->ContactElements=Finley_ElementFile_alloc(Line2Face_Contact,out->order,mpi_info);
307 } else {
308 out->FaceElements=Finley_ElementFile_alloc(Point1,out->order,mpi_info);
309 out->ContactElements=Finley_ElementFile_alloc(Point1_Contact,out->order,mpi_info);
310 }
311 out->Points=Finley_ElementFile_alloc(Point1,out->order,mpi_info);
312 if (! Finley_noError()) {
313 Finley_Mesh_dealloc(out);
314 return NULL;
315 }
316
317 /* allocate tables: */
318
319 Finley_NodeFile_allocTable(out->Nodes,numNodesLocal+numNodesExternal);
320 Finley_NodeDistribution_allocTable( out->Nodes->degreeOfFreedomDistribution, numNodesLocal, numNodesExternal, 0 );
321 Finley_ElementFile_allocTable(out->Elements,numElementsLocal);
322 if( NFaceElements )
323 Finley_ElementFile_allocTable(out->FaceElements,NFaceElements);
324 if (! Finley_noError()) {
325 Finley_Mesh_dealloc(out);
326 return NULL;
327 }
328
329 /* set nodes: */
330 #pragma omp parallel for private(i0,k)
331 /* local nodes */
332 for (i0=0;i0<numNodesLocal;i0++) {
333 k=i0;
334 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(i0+firstNode)/DBLE(N0-1)*Length[0];
335 out->Nodes->Id[k]=k;
336 out->Nodes->Tag[k]=0;
337 out->Nodes->degreeOfFreedom[k]=i0%(numDOFLocal);
338 }
339
340 /* external nodes - do left then right hand side */
341 /* the following only applies if more than one domain */
342 if( mpi_info->size>1 )
343 {
344 DOFcount = numNodesLocal;
345 k=numNodesLocal;
346 if( mpi_info->rank!=0 || periodicLocal[0] )
347 {
348 /* left hand boundary is periodic -
349 add the nodes/DOF that define the element on the right hand boundary */
350 if( periodicLocal[0] )
351 {
352 /* tag the left hand boundary appropriately */
353 out->Nodes->Tag[0]=1;
354 k--;
355 out->Nodes->Coordinates[INDEX2(0,k,1)]=Length[0];
356 out->Nodes->Id[k]=k;
357 out->Nodes->Tag[k]=0;
358 out->Nodes->degreeOfFreedom[k]=0;
359 DOFcount--;
360 k++;
361 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(N0-2)/DBLE(N0-1)*Length[0];
362 out->Nodes->Id[k]=k;
363 out->Nodes->Tag[k]=0;
364 out->Nodes->degreeOfFreedom[k]=DOFcount++;
365 k++;
366 }
367 /* left hand boundary with another subdomain, need to add the node/DOF that
368 defines the element that spans the boundary */
369 else
370 {
371 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(firstNode-1)/DBLE(N0-1)*Length[0];
372 out->Nodes->Id[k]=k;
373 out->Nodes->Tag[k]=0;
374 out->Nodes->degreeOfFreedom[k]=DOFcount++;
375 k++;
376 }
377 }
378 if( mpi_info->rank!=(mpi_info->size-1) || periodicLocal[1] )
379 {
380 /* right hand boundary is periodic - add the external reference to the distribution */
381 if( periodicLocal[1] )
382 {
383 out->Nodes->Coordinates[INDEX2(0,k,1)]=Length[0];
384 out->Nodes->Id[k]=k;
385 out->Nodes->Tag[k]=0;
386 out->Nodes->degreeOfFreedom[k]=k;
387 k++;
388 }
389 /* right hand boundary with another subdomain, need to add the node/DOF that
390 defines the element that spans the boundary */
391 else
392 {
393 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(firstNode+numNodesLocal-periodicLocal[0])/DBLE(N0-1)*Length[0];
394 out->Nodes->Id[k]=k;
395 out->Nodes->Tag[k]=0;
396 out->Nodes->degreeOfFreedom[k]=DOFcount;
397 k++;
398 }
399 }
400 /* setup boundary DOF data */
401 if( domInternal )
402 {
403 targetDomain = mpi_info->rank-1;
404 forwardDOF[0] = 0;
405 backwardDOF[0] = numNodesLocal;
406 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
407 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
408
409 targetDomain = mpi_info->rank+1;
410 forwardDOF[0] = numNodesLocal-1;
411 backwardDOF[0] = numNodesLocal+1;
412 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
413 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
414 }
415 else if( domLeft )
416 {
417 if( periodicLocal[0] )
418 {
419 targetDomain = mpi_info->size-1;
420 forwardDOF[0] = 0;
421 backwardDOF[0] = numNodesLocal;
422 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
423 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
424 }
425 targetDomain = mpi_info->rank+1;
426 forwardDOF[0] = numNodesLocal-1-periodicLocal[0];
427 backwardDOF[0] = numNodesLocal + periodicLocal[0];
428 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
429 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
430 }
431 else
432 {
433 targetDomain = mpi_info->rank-1;
434 forwardDOF[0] = 0;
435 backwardDOF[0] = numNodesLocal;
436 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
437 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
438
439 if( periodicLocal[1] )
440 {
441 targetDomain = 0;
442 forwardDOF[0] = numNodesLocal-1;
443 backwardDOF[0] = numNodesLocal+1;
444 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
445 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
446 }
447 }
448
449 if (! Finley_MPI_noError(mpi_info)) {
450 Finley_Mesh_dealloc(out);
451 return NULL;
452 }
453
454 }
455
456 /* set the elements: */
457 /* form internal elements */
458 //#pragma omp parallel for private(i0,k)
459 for (i0=0;i0<numElementsInternal;i0++)
460 {
461 k=i0;
462 out->Elements->Id[k]=k;
463 out->Elements->Tag[k]=0;
464 out->Elements->Color[k]=0;
465
466 out->Elements->Nodes[INDEX2(0,k,2)]=i0;
467 out->Elements->Nodes[INDEX2(1,k,2)]=i0+1;
468 }
469
470 /* followed by boundary elements... */
471 i0 = numElementsInternal;
472 if( mpi_info->size>1 )
473 {
474 /* left hand boundary */
475 if( mpi_info->rank>0 ) /* left hand boundary is an internal boundary */
476 {
477 k=i0;
478 out->Elements->Id[k]=k;
479 out->Elements->Tag[k]=0;
480 out->Elements->Color[k]=0;
481
482 out->Elements->Nodes[INDEX2(0,k,2)]=i0+1;
483 out->Elements->Nodes[INDEX2(1,k,2)]=0;
484 i0++;
485 }
486 else if( periodicLocal[0] ) /* left hand boundary is a periodic boundary */
487 {
488 k=i0;
489 out->Elements->Id[k]=k;
490 out->Elements->Tag[k]=0;
491 out->Elements->Color[k]=0;
492
493 out->Elements->Nodes[INDEX2(0,k,2)]=i0+2;
494 out->Elements->Nodes[INDEX2(1,k,2)]=i0+1;
495 i0++;
496 }
497
498 /* right hand boundary */
499 if( mpi_info->rank<mpi_info->size-1 ) /* right hand boundary is an internal boundary */
500 {
501 k=i0;
502 out->Elements->Id[k]=k;
503 out->Elements->Tag[k]=0;
504 out->Elements->Color[k]=0;
505
506 out->Elements->Nodes[INDEX2(0,k,2)]=numNodesLocal-1-periodicLocal[0];
507 out->Elements->Nodes[INDEX2(1,k,2)]=nodesExternal[0]+numNodesLocal;
508 i0++;
509 }
510 else if( periodicLocal[1] ) /* right hand boundary is a periodic boundary */
511 {
512 /* no need to do anything */;
513 k=i0;
514 out->Elements->Id[k]=k;
515 out->Elements->Tag[k]=0;
516 out->Elements->Color[k]=0;
517
518 out->Elements->Nodes[INDEX2(0,k,2)]=numNodesLocal-1;
519 out->Elements->Nodes[INDEX2(1,k,2)]=numNodesLocal+1;
520 }
521 }
522 out->Elements->minColor=0;
523 out->Elements->maxColor=0;
524
525 out->Elements->elementDistribution->numLocal = numElementsLocal;
526 out->Elements->elementDistribution->numInternal = numElementsInternal;
527 out->Elements->elementDistribution->numBoundary = numElementsLocal - numElementsInternal;
528
529 /* face elements: */
530 if (useElementsOnFace) {
531 NUMNODES=2;
532 } else {
533 NUMNODES=1;
534 }
535 if ( domLeft && !periodicLocal[0] )
536 {
537 out->FaceElements->Id[0]=i0-1;
538 out->FaceElements->Tag[0]=1;
539 out->FaceElements->Color[0]=0;
540 if (useElementsOnFace) {
541 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
542 out->FaceElements->Nodes[INDEX2(1,0,NUMNODES)]=1;
543 } else {
544 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
545 }
546 i0++;
547 }
548 if( domRight && !periodicLocal[1])
549 {
550 out->FaceElements->Id[domLeft]=i0;
551 out->FaceElements->Tag[domLeft]=2;
552 out->FaceElements->Color[domLeft]=1;
553 /* TODO */
554 /* check that the correct indices have been used */
555 if (useElementsOnFace) {
556 out->FaceElements->Nodes[INDEX2(0,domLeft,NUMNODES)]=numNodesLocal-2;
557 out->FaceElements->Nodes[INDEX2(1,domLeft,NUMNODES)]=numNodesLocal-1;
558 } else {
559 out->FaceElements->Nodes[INDEX2(0,domLeft,NUMNODES)]=numNodesLocal-1;
560 }
561 }
562 out->FaceElements->maxColor=0;
563 out->FaceElements->minColor=0;
564 if( domLeft || domRight && !periodic[0] )
565 out->FaceElements->elementDistribution->numLocal = out->FaceElements->elementDistribution->numInternal = domLeft + domRight;
566
567
568 /* face elements done: */
569
570 /* condense the nodes: */
571 Finley_Mesh_resolveNodeIds(out);
572
573 /* prepare mesh for further calculatuions:*/
574
575 /* this isn't needed for a mesh generated this way */
576 Finley_Mesh_prepare(out);
577
578 /* setup the CommBuffer */
579 {
580 index_t *numForward=NULL, *numBackward=NULL;
581 index_t i;
582
583 numForward = MEMALLOC( out->Nodes->degreeOfFreedomDistribution->numNeighbours, index_t );
584 numBackward = MEMALLOC( out->Nodes->degreeOfFreedomDistribution->numNeighbours, index_t );
585
586 for( i=0; i<out->Nodes->degreeOfFreedomDistribution->numNeighbours; i++ )
587 {
588 numForward[i] = out->Nodes->degreeOfFreedomDistribution->edges[i]->numForward;
589 numBackward[i] = out->Nodes->degreeOfFreedomDistribution->edges[i]->numBackward;
590 }
591
592 Paso_CommBuffer_allocTable( out->Nodes->CommBuffer, FINLEY_INIT_ITEMSIZE, numForward, numBackward, out->Nodes->degreeOfFreedomDistribution->numNeighbours, out->Nodes->degreeOfFreedomDistribution->neighbours );
593
594 MEMFREE( numForward );
595 MEMFREE( numBackward );
596 }
597 if (! Finley_MPI_noError( mpi_info )) {
598 Paso_MPIInfo_dealloc( mpi_info );
599 Finley_Mesh_dealloc(out);
600 return NULL;
601 }
602
603 /* free up memory */
604 Paso_MPIInfo_dealloc( mpi_info );
605
606 #ifdef Finley_TRACE
607 printf("timing: mesh generation: %.4e sec\n",Finley_timer()-time0);
608 #endif
609
610 return out;
611 }
612 #endif
613
614
615
616
617 /*
618 * Revision 1.3 2005/09/01 03:31:36 jgs
619 * Merge of development branch dev-02 back to main trunk on 2005-09-01
620 *
621 * Revision 1.2.2.2 2005/09/07 06:26:19 gross
622 * the solver from finley are put into the standalone package paso now
623 *
624 * Revision 1.2.2.1 2005/08/24 02:02:18 gross
625 * timing output switched off. solver output can be swiched through getSolution(verbose=True) now.
626 *
627 * Revision 1.2 2005/07/08 04:07:52 jgs
628 * Merge of development branch back to main trunk on 2005-07-08
629 *
630 * Revision 1.1.1.1.2.2 2005/06/30 01:53:56 gross
631 * a bug in coloring fixed
632 *
633 * Revision 1.1.1.1.2.1 2005/06/29 02:34:52 gross
634 * some changes towards 64 integers in finley
635 *
636 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
637 * initial import of project esys2
638 *
639 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
640 * Initial version of eys using boost-python.
641 *
642 *
643 */
644

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26