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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 751 - (show annotations)
Mon Jun 26 01:46:34 2006 UTC (12 years, 9 months ago) by bcumming
File MIME type: text/plain
File size: 3218 byte(s)
Changes relating to the MPI version of escript
The standard OpenMP version of escript is unchanged

- updated data types (Finley_Mesh, Finley_NodeFile, etc) to store meshes
  over multiple MPI processes.
- added CommBuffer code in Paso for communication of Data associated
  with distributed meshes
- updates in Finley and Escript to support distributed data and operations
  on distributed data (such as interpolation).
- construction of RHS in MPI, so that simple explicit schemes (such as
  /docs/examples/wave.py without IO and the Locator) can run in MPI.
- updated mesh generation for first order line, rectangle and brick
  meshes and second order line meshes in MPI.        
- small changes to trunk/SConstruct and trunk/scons/ess_options.py to
  build the MPI version, these changes are turned off by default.

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: Mesh : NodeFile */
16 /* */
17 /* allocates and deallocates node files */
18 /* */
19 /**************************************************************/
20
21 /* Author: gross@access.edu.au */
22 /* Version: $Id$ */
23
24 /**************************************************************/
25
26 #include "NodeFile.h"
27
28 /**************************************************************/
29
30 /* allocates a node file to hold nodes */
31 /* use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */
32 #ifdef PASO_MPI
33 Finley_NodeFile* Finley_NodeFile_alloc(dim_t numDim, Paso_MPIInfo *MPIInfo){
34 #else
35 Finley_NodeFile* Finley_NodeFile_alloc(dim_t numDim){
36 #endif
37 Finley_NodeFile *out;
38
39 /* allocate the return value */
40
41 out=MEMALLOC(1,Finley_NodeFile);
42 if (Finley_checkPtr(out)) return NULL;
43 out->numNodes=0;
44 out->numDegreesOfFreedom=0;
45 out->reducedNumDegreesOfFreedom=0;
46 out->reducedNumNodes=0;
47 out->numDim=numDim;
48 out->Id=NULL;
49 out->Tag=NULL;
50 out->Coordinates=NULL;
51 out->degreeOfFreedom=NULL;
52 out->reducedDegreeOfFreedom=NULL;
53 out->toReduced=NULL;
54 #ifdef PASO_MPI
55 out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
56 out->degreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
57 out->reducedDegreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
58 out->CommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
59 out->reducedCommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
60 #endif
61 return out;
62 }
63
64 /* deallocates a node file: */
65
66 void Finley_NodeFile_dealloc(Finley_NodeFile* in) {
67 if (in!=NULL) {
68 #ifdef Finley_TRACE
69 printf("node file is deallocated.\n");
70 #endif
71 Finley_NodeFile_deallocTable(in);
72 #ifdef PASO_MPI
73 Paso_MPIInfo_dealloc( in->MPIInfo );
74 Finley_NodeDistribution_dealloc( in->degreeOfFreedomDistribution );
75 Finley_NodeDistribution_dealloc( in->reducedDegreeOfFreedomDistribution );
76 Paso_CommBuffer_dealloc( in->CommBuffer );
77 Paso_CommBuffer_dealloc( in->reducedCommBuffer );
78 #endif
79 MEMFREE(in);
80 }
81 }
82 /*
83 * $Log$
84 * Revision 1.5 2005/09/15 03:44:23 jgs
85 * Merge of development branch dev-02 back to main trunk on 2005-09-15
86 *
87 * Revision 1.4.2.1 2005/09/07 06:26:20 gross
88 * the solver from finley are put into the standalone package paso now
89 *
90 * Revision 1.4 2004/12/15 07:08:33 jgs
91 * *** empty log message ***
92 *
93 *
94 *
95 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26