/[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 1062 - (show annotations)
Mon Mar 26 06:17:53 2007 UTC (12 years, 6 months ago) by gross
File MIME type: text/plain
File size: 18751 byte(s)
reduced integration schemes are implemented now for grad, integrate, etc. Tests still to be added.
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 #ifdef PASO_MPI
34 /* get the number of nodes/elements for domain with rank=rank, of size processors
35 where n is the total number of nodes/elements in the global domain */
36 static index_t domain_MODdim( index_t rank, index_t size, index_t n )
37 {
38 rank = size-rank-1;
39
40 if( rank < n%size )
41 return (index_t)floor(n/size)+1;
42 return (index_t)floor(n/size);
43 }
44
45
46 /* Determines the number of nodes/elements etc along an axis which is numElementsGlobal long for domain rank */
47 /* A bit messy, but it only has to be done once... */
48 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 )
49 {
50 index_t i0;
51 dim_t numNodesGlobal = numElementsGlobal+1;
52
53 (*numNodesLocal) = domain_MODdim( rank, size, numNodesGlobal );
54
55 numElementsLocal[0] = numNodesLocal[0]+1;
56 periodicLocal[0] = periodicLocal[1] = FALSE;
57 nodesExternal[0] = nodesExternal[1] = 1;
58 if( periodic )
59 {
60 if( size==1 )
61 {
62 numElementsLocal[0] = numElementsGlobal;
63 nodesExternal[0] = nodesExternal[1] = 0;
64 periodicLocal[0] = periodicLocal[1] = TRUE;
65 }
66 else
67 {
68 if( rank==0 )
69 {
70 periodicLocal[0] = TRUE;
71 numNodesLocal[0]++;
72 }
73 if( rank==(size-1) )
74 {
75 periodicLocal[1] = TRUE;
76 numNodesLocal[0]--;
77 numElementsLocal[0]--;
78 }
79 }
80 }
81 else if( !periodic )
82 {
83 if( rank==0 ){
84 nodesExternal[0]--;
85 numElementsLocal[0]--;
86 }
87 if( rank==(size-1) )
88 {
89 nodesExternal[1]--;
90 numElementsLocal[0]--;
91 }
92 }
93 numNodesExternal[0] = nodesExternal[0]+nodesExternal[1];
94
95 numElementsInternal[0] = numElementsLocal[0];
96 if( (rank==0) && (rank==size-1) );
97
98 else if( !periodic && ( (rank==0) ^ (rank==size-1) ) )
99 numElementsInternal[0] -= 1;
100 else
101 numElementsInternal[0] -= 2;
102
103 firstNode[0] = 0;
104 for( i0=0; i0<rank; i0++ )
105 firstNode[0] += domain_MODdim( i0, size, numNodesGlobal );
106
107 numDOFLocal[0] = numNodesLocal[0];
108 if( periodicLocal[0] )
109 {
110 numDOFLocal[0]--;
111 }
112 DOFExternal[0] = nodesExternal[0];
113 DOFExternal[1] = nodesExternal[1];
114 }
115
116 #endif
117
118 #ifdef PASO_MPI
119 Finley_Mesh* Finley_RectangularMesh_Line2_singleCPU(dim_t* numElements,double* Length,bool_t* periodic, index_t order,index_t reduced_order, bool_t useElementsOnFace, Paso_MPIInfo *mpi_info)
120 #else
121 Finley_Mesh* Finley_RectangularMesh_Line2(dim_t* numElements,double* Length,bool_t* periodic, index_t order, index_t reduced_order, bool_t useElementsOnFace)
122 #endif
123 {
124 /* Serial/OpenMP version */
125 dim_t N0,NE0,i0,NDOF0,NFaceElements;
126 index_t NUMNODES,k;
127 Finley_Mesh* out;
128 char name[50];
129 double time0=Finley_timer();
130 NE0=MAX(1,numElements[0]);
131 N0=NE0+1;
132
133 if (!periodic[0]) {
134 NDOF0=N0;
135 NFaceElements=2;
136 } else {
137 NDOF0=N0-1;
138 NFaceElements=0;
139 }
140
141 /* allocate mesh: */
142
143 sprintf(name,"Rectangular mesh with %d nodes",N0);
144 #ifdef PASO_MPI
145 out=Finley_Mesh_alloc(name,1,order,reduced_order,mpi_info);
146 if (! Finley_noError()) return NULL;
147
148 out->Elements=Finley_ElementFile_alloc(Line2,out->order,out->reduced_order,mpi_info);
149 if (useElementsOnFace) {
150 out->FaceElements=Finley_ElementFile_alloc(Line2Face,out->order,out->reduced_order,mpi_info);
151 out->ContactElements=Finley_ElementFile_alloc(Line2Face_Contact,out->order,out->reduced_order,mpi_info);
152 } else {
153 out->FaceElements=Finley_ElementFile_alloc(Point1,out->order,out->reduced_order,mpi_info);
154 out->ContactElements=Finley_ElementFile_alloc(Point1_Contact,out->order,out->reduced_order,mpi_info);
155 }
156 out->Points=Finley_ElementFile_alloc(Point1,out->order,out->reduced_order,mpi_info);
157 if (! Finley_noError()) {
158 Finley_Mesh_dealloc(out);
159 return NULL;
160 }
161
162 /* allocate tables: */
163 Finley_NodeFile_allocTable(out->Nodes,N0);
164 Finley_NodeDistribution_allocTable( out->Nodes->degreeOfFreedomDistribution, N0, 0, 0);
165 Finley_ElementFile_allocTable(out->Elements,NE0);
166 Finley_ElementFile_allocTable(out->FaceElements,NFaceElements);
167 Finley_ElementDistribution_allocTable( out->Elements->elementDistribution, NE0, 0);
168 Finley_ElementDistribution_allocTable( out->FaceElements->elementDistribution, NFaceElements, 0 );
169 #else
170 out=Finley_Mesh_alloc(name,1,order,reduced_order);
171 if (! Finley_noError()) return NULL;
172
173 out->Elements=Finley_ElementFile_alloc(Line2,out->order, out->reduced_order);
174 if (useElementsOnFace) {
175 out->FaceElements=Finley_ElementFile_alloc(Line2Face,out->order, out->reduced_order);
176 out->ContactElements=Finley_ElementFile_alloc(Line2Face_Contact,out->order, out->reduced_order);
177 } else {
178 out->FaceElements=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order);
179 out->ContactElements=Finley_ElementFile_alloc(Point1_Contact,out->order, out->reduced_order);
180 }
181 out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order);
182 if (! Finley_noError()) {
183 Finley_Mesh_dealloc(out);
184 return NULL;
185 }
186
187 /* allocate tables: */
188
189 Finley_NodeFile_allocTable(out->Nodes,N0);
190 Finley_ElementFile_allocTable(out->Elements,NE0);
191 Finley_ElementFile_allocTable(out->FaceElements,NFaceElements);
192 #endif
193 if (! Finley_noError()) {
194 Finley_Mesh_dealloc(out);
195 return NULL;
196 }
197
198 /* set nodes: */
199
200 #pragma omp parallel for private(i0,k)
201 for (i0=0;i0<N0;i0++) {
202 k=i0;
203 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE(i0)/DBLE(N0-1)*Length[0];
204 out->Nodes->Id[k]=k;
205 out->Nodes->Tag[k]=0;
206 out->Nodes->degreeOfFreedom[k]=(i0%NDOF0);
207 #ifdef PASO_MPI
208 out->Nodes->Dom[k] = NODE_INTERNAL;
209 #endif
210 }
211 if (!periodic[0]) {
212 out->Nodes->Tag[0]=1;
213 out->Nodes->Tag[N0-1]=2;
214 }
215
216 /* set the elements: */
217
218 #pragma omp parallel for private(i0,k)
219 for (i0=0;i0<NE0;i0++) {
220 k=i0;
221 out->Elements->Id[k]=k;
222 out->Elements->Tag[k]=0;
223 out->Elements->Color[k]=COLOR_MOD(i0);
224 #ifdef PASO_MPI
225 out->Elements->Dom[k] = ELEMENT_INTERNAL;
226 #endif
227
228 out->Elements->Nodes[INDEX2(0,k,2)]=i0;
229 out->Elements->Nodes[INDEX2(1,k,2)]=i0+1;
230 }
231 out->Elements->minColor=0;
232 out->Elements->maxColor=COLOR_MOD(0);
233
234 /* face elements: */
235 if (useElementsOnFace) {
236 NUMNODES=2;
237 } else {
238 NUMNODES=1;
239 }
240 if (!periodic[0]) {
241 out->FaceElements->Id[0]=NE0;
242 out->FaceElements->Tag[0]=1;
243 out->FaceElements->Color[0]=0;
244 #ifdef PASO_MPI
245 out->FaceElements->Dom[0] = ELEMENT_INTERNAL;
246 #endif
247 if (useElementsOnFace) {
248 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
249 out->FaceElements->Nodes[INDEX2(1,0,NUMNODES)]=1;
250 } else {
251 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
252 }
253
254 out->FaceElements->Id[1]=NE0+1;
255 out->FaceElements->Tag[1]=2;
256 out->FaceElements->Color[1]=1;
257 #ifdef PASO_MPI
258 out->FaceElements->Dom[1] = ELEMENT_INTERNAL;
259 #endif
260 if (useElementsOnFace) {
261 out->FaceElements->Nodes[INDEX2(0,1,NUMNODES)]=N0-1;
262 out->FaceElements->Nodes[INDEX2(1,1,NUMNODES)]=N0-2;
263 } else {
264 out->FaceElements->Nodes[INDEX2(0,1,NUMNODES)]=N0-1;
265 }
266 }
267 out->FaceElements->maxColor=1;
268 out->FaceElements->minColor=0;
269
270 #ifdef PASO_MPI
271 Finley_ElementFile_setDomainFlags( out->Elements );
272 Finley_ElementFile_setDomainFlags( out->FaceElements );
273 Finley_ElementFile_setDomainFlags( out->ContactElements );
274 Finley_ElementFile_setDomainFlags( out->Points );
275
276 /* reorder the degrees of freedom */
277 Finley_Mesh_resolveDegreeOfFreedomOrder( out, TRUE );
278 #endif
279
280 /* condense the nodes: */
281 Finley_Mesh_resolveNodeIds(out);
282
283 /* prepare mesh for further calculatuions:*/
284 Finley_Mesh_prepare(out) ;
285
286 #ifdef Finley_TRACE
287 printf("timing: mesh generation: %.4e sec\n",Finley_timer()-time0);
288 #endif
289 if (Finley_noError()) {
290 if ( ! Finley_Mesh_isPrepared(out) ) {
291 Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers.");
292 }
293 } else {
294 Finley_Mesh_dealloc(out);
295 }
296 return out;
297 }
298 #ifdef PASO_MPI
299 Finley_Mesh* Finley_RectangularMesh_Line2(dim_t* numElements,double* Length,bool_t* periodic, dim_t order, index_t reduced_order, bool_t useElementsOnFace)
300 {
301 /* MPI version */
302 dim_t N0, NE0, NE0_local, i0, NDOF0, NFaceElements, numNodesLocal, numDOFLocal, numElementsLocal, numElementsInternal, nodesExternal[2], DOFExternal[2], numNodesExternal, N0t, NDOF0t;
303 index_t NUMNODES,k,firstNode=0, firstNodeConstruct, DOFcount=0, forwardDOF[2], backwardDOF[2];
304 index_t targetDomain=-1, node0;
305 bool_t periodicLocal[2], domLeft=FALSE, domRight=FALSE, domInternal=FALSE, boundaryRight, boundaryLeft;
306 Finley_Mesh* out=NULL;
307 char name[50];
308 double time0=Finley_timer();
309 Paso_MPIInfo *mpi_info = NULL;
310
311 /* dimensions the global domain */
312 NE0=MAX(1,numElements[0]);
313 N0=NE0+1;
314 NDOF0=N0;
315 if( periodic[0] )
316 NDOF0--;
317
318 /* get MPI information */
319 mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );
320 if (! Finley_noError()) {
321 Finley_Mesh_dealloc(out);
322 return NULL;
323 }
324
325 /* use the serial code to generate the mesh in the 1-CPU case */
326 if( mpi_info->size==1 ){
327 out = Finley_RectangularMesh_Line2_singleCPU(numElements,Length,periodic,order,reduced_order,useElementsOnFace,mpi_info);
328 return out;
329 }
330
331 if( mpi_info->rank==0 )
332 domLeft = TRUE;
333 if( mpi_info->rank==mpi_info->size-1 )
334 domRight = TRUE;
335 if( mpi_info->rank>0 && mpi_info->rank<mpi_info->size-1 )
336 domInternal = TRUE;
337
338 /* dimensions of the local subdomain */
339 domain_calculateDimension( mpi_info->rank, mpi_info->size, NE0, periodic[0], &numNodesLocal, &numDOFLocal, &numElementsLocal, &numElementsInternal, &firstNode, nodesExternal, DOFExternal, &numNodesExternal, periodicLocal );
340
341 /* form face element if the local domain contains a periodic boundary */
342 NFaceElements = 0;
343 if( !periodic[0] )
344 {
345 if(domLeft)
346 NFaceElements++;
347 if(domRight)
348 NFaceElements++;
349 }
350
351 boundaryLeft = !domLeft || periodicLocal[0];
352 boundaryRight = !domRight || periodicLocal[1];
353 N0t = numNodesLocal + boundaryRight + boundaryLeft;
354 NDOF0t = numDOFLocal + boundaryRight + boundaryLeft;
355 firstNodeConstruct = firstNode - boundaryLeft;
356 firstNodeConstruct = firstNodeConstruct<0 ? N0-2 : firstNodeConstruct;
357
358 /* allocate mesh: */
359 sprintf(name,"Rectangular mesh with %d nodes",N0);
360 out=Finley_Mesh_alloc(name,1,order,reduced_order,mpi_info);
361 if (! Finley_noError()) return NULL;
362
363 out->Elements=Finley_ElementFile_alloc(Line2,out->order, out->reduced_order,mpi_info);
364 if (useElementsOnFace) {
365 out->FaceElements=Finley_ElementFile_alloc(Line2Face, out->reduced_order,out->order,mpi_info);
366 out->ContactElements=Finley_ElementFile_alloc(Line2Face_Contact, out->reduced_order,out->order,mpi_info);
367 } else {
368 out->FaceElements=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order,mpi_info);
369 out->ContactElements=Finley_ElementFile_alloc(Point1_Contact,out->order, out->reduced_order,mpi_info);
370 }
371 out->Points=Finley_ElementFile_alloc(Point1,out->order, out->reduced_order,mpi_info);
372 if (! Finley_noError()) {
373 Finley_Mesh_dealloc(out);
374 return NULL;
375 }
376
377 /* allocate tables: */
378
379 Finley_NodeFile_allocTable(out->Nodes,numNodesLocal+numNodesExternal);
380 Finley_NodeDistribution_allocTable( out->Nodes->degreeOfFreedomDistribution, numNodesLocal, numNodesExternal, 0);
381 Finley_ElementFile_allocTable(out->Elements,numElementsLocal);
382 Finley_ElementFile_allocTable(out->FaceElements,NFaceElements);
383 Finley_ElementDistribution_allocTable( out->Elements->elementDistribution, numElementsLocal, domRight);
384 Finley_ElementDistribution_allocTable( out->FaceElements->elementDistribution, NFaceElements, 0 );
385 if (! Finley_noError()) {
386 Finley_Mesh_dealloc(out);
387 return NULL;
388 }
389
390 /* set nodes: */
391 #pragma omp parallel for private(i0,k)
392 /* local nodes */
393 for (i0=0;i0<N0t;i0++) {
394 k=i0;
395 out->Nodes->Coordinates[INDEX2(0,k,1)]=DBLE((i0+firstNodeConstruct) % N0)/DBLE(N0-1)*Length[0];
396 out->Nodes->Id[k]=k;
397 out->Nodes->Tag[k]=0;
398 out->Nodes->degreeOfFreedom[k]=k;
399 out->Nodes->Dom[k]=NODE_INTERNAL;
400 }
401
402 /* setup boundary DOF data */
403 if( boundaryLeft ){
404 out->Nodes->Dom[0] = NODE_EXTERNAL;
405 out->Nodes->Dom[1] = NODE_BOUNDARY;
406 }
407 else
408 out->Nodes->Tag[0] += 1;
409 if( boundaryRight ){
410 out->Nodes->Dom[N0t-1] = NODE_EXTERNAL;
411 out->Nodes->Dom[N0t-2] = NODE_BOUNDARY;
412 }
413 else
414 out->Nodes->Tag[N0t-1] += 2;
415 if( periodicLocal[0] ){
416 out->Nodes->degreeOfFreedom[2] = out->Nodes->degreeOfFreedom[1];
417 out->Nodes->Dom[2] = out->Nodes->Dom[1];
418 }
419
420 if( !(mpi_info->size==2 && periodicLocal[0])){
421 if( boundaryLeft ) {
422 targetDomain = mpi_info->rank-1 < 0 ? mpi_info->size-1 : mpi_info->rank-1;
423 forwardDOF[0] = out->Nodes->degreeOfFreedom[1];
424 backwardDOF[0] = out->Nodes->degreeOfFreedom[0];
425 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
426 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
427 }
428 if( boundaryRight ) {
429 targetDomain = mpi_info->rank+1 > mpi_info->size-1 ? 0 : mpi_info->rank+1;
430 forwardDOF[0] = out->Nodes->degreeOfFreedom[N0t-2];
431 backwardDOF[0] = out->Nodes->degreeOfFreedom[N0t-1];
432 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
433 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
434 }
435 } else{
436 /* periodic boundary conditions with 2 domains, need to change the order in which domain 0 passes boundary data */
437 targetDomain = 1;
438
439 forwardDOF[0] = out->Nodes->degreeOfFreedom[N0t-2];
440 backwardDOF[0] = out->Nodes->degreeOfFreedom[N0t-1];
441 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
442 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
443
444 forwardDOF[0] = out->Nodes->degreeOfFreedom[1];
445 backwardDOF[0] = out->Nodes->degreeOfFreedom[0];
446 Finley_NodeDistribution_addForward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, forwardDOF );
447 Finley_NodeDistribution_addBackward( out->Nodes->degreeOfFreedomDistribution, targetDomain, 1, backwardDOF );
448 }
449
450 if (! Finley_MPI_noError(mpi_info)) {
451 Finley_Mesh_dealloc(out);
452 return NULL;
453 }
454
455 /* set the elements: */
456 /* form internal elements */
457 #pragma omp parallel for private(i0,k)
458 for (i0=0;i0<numElementsLocal;i0++)
459 {
460 k=i0;
461 node0 = (periodicLocal[0] && !i0) ? 0 : i0 + periodicLocal[0];
462
463 out->Elements->Id[k]=(i0+firstNodeConstruct) % NE0;
464 out->Elements->Tag[k]=0;
465 out->Elements->Color[k]=COLOR_MOD(i0);
466 out->Elements->Dom[k]=ELEMENT_INTERNAL;
467
468 out->Elements->Nodes[INDEX2(0,k,2)]=node0;
469 out->Elements->Nodes[INDEX2(1,k,2)]=node0+1;
470 }
471 if( boundaryLeft )
472 out->Elements->Dom[0] = ELEMENT_BOUNDARY;
473 if( boundaryRight )
474 out->Elements->Dom[numElementsLocal-1] = ELEMENT_BOUNDARY;
475
476 out->Elements->minColor=0;
477 out->Elements->maxColor=COLOR_MOD(0);
478
479 Finley_ElementFile_setDomainFlags( out->Elements );
480
481 /* face elements: */
482 if (useElementsOnFace) {
483 NUMNODES=2;
484 } else {
485 NUMNODES=1;
486 }
487 if ( domLeft && !periodicLocal[0] )
488 {
489 out->FaceElements->Id[0]=NE0;
490 out->FaceElements->Tag[0]=1;
491 out->FaceElements->Color[0]=0;
492 out->FaceElements->Dom[0]=ELEMENT_INTERNAL;
493 if (useElementsOnFace) {
494 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
495 out->FaceElements->Nodes[INDEX2(1,0,NUMNODES)]=1;
496 } else {
497 out->FaceElements->Nodes[INDEX2(0,0,NUMNODES)]=0;
498 }
499 }
500 if( domRight && !periodicLocal[1])
501 {
502 out->FaceElements->Id[domLeft]=NE0+1;
503 out->FaceElements->Tag[domLeft]=2;
504 out->FaceElements->Color[domLeft]=1;
505 out->FaceElements->Dom[domLeft]=ELEMENT_INTERNAL;
506 if (useElementsOnFace) {
507 out->FaceElements->Nodes[INDEX2(0,domLeft,NUMNODES)]=N0t-1;
508 out->FaceElements->Nodes[INDEX2(1,domLeft,NUMNODES)]=N0t-2;
509 } else {
510 out->FaceElements->Nodes[INDEX2(0,domLeft,NUMNODES)]=N0t-1;
511 }
512 }
513 out->FaceElements->numElements=NFaceElements;
514 out->FaceElements->maxColor=1;
515 out->FaceElements->minColor=0;
516
517 Finley_ElementFile_setDomainFlags( out->FaceElements );
518
519 /* setup distribution info for other elements */
520 Finley_ElementFile_setDomainFlags( out->ContactElements );
521 Finley_ElementFile_setDomainFlags( out->Points );
522
523 Finley_Mesh_prepareElementDistribution( out );
524
525 /* reorder the degrees of freedom */
526 Finley_Mesh_resolveDegreeOfFreedomOrder( out, TRUE );
527
528 /* condense the nodes: */
529 Finley_Mesh_resolveNodeIds(out);
530 if( !Finley_MPI_noError(mpi_info) )
531 {
532 Paso_MPIInfo_dealloc( mpi_info );
533 Finley_Mesh_dealloc(out);
534 return NULL;
535 }
536
537 /* prepare mesh for further calculatuions:*/
538 Finley_Mesh_prepare(out);
539 if( !Finley_MPI_noError(mpi_info) )
540 {
541 Paso_MPIInfo_dealloc( mpi_info );
542 Finley_Mesh_dealloc(out);
543 return NULL;
544 }
545
546 /* free up memory */
547 Paso_MPIInfo_dealloc( mpi_info );
548
549 #ifdef Finley_TRACE
550 printf("timing: mesh generation: %.4e sec\n",Finley_timer()-time0);
551 #endif
552 if (Finley_noError()) {
553 if ( ! Finley_Mesh_isPrepared(out) ) {
554 Finley_setError(SYSTEM_ERROR,"Mesh is not prepared for calculation. Contact the programmers.");
555 }
556 }
557 return out;
558 }
559 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26