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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/finley/src/finleyC/NodeFile.c revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC trunk/finley/src/NodeFile.c revision 751 by bcumming, Mon Jun 26 01:46:34 2006 UTC
# Line 1  Line 1 
1  /*  /*
2   ******************************************************************************   ************************************************************
3   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
4   *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *   *                                                          *
5   *                                                                            *   *              http://www.access.edu.au                    *
6   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
7   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
8   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
9   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
10   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
11  */  */
12    
13  /**************************************************************/  /**************************************************************/
# Line 31  Line 29 
29    
30  /*   allocates a node file to hold nodes */  /*   allocates a node file to hold nodes */
31  /*   use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */  /*   use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */
32    #ifdef PASO_MPI
33  Finley_NodeFile* Finley_NodeFile_alloc(int numDim){  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;    Finley_NodeFile *out;
38        
39    /*  allocate the return value */    /*  allocate the return value */
# Line 50  Finley_NodeFile* Finley_NodeFile_alloc(i Line 51  Finley_NodeFile* Finley_NodeFile_alloc(i
51    out->degreeOfFreedom=NULL;    out->degreeOfFreedom=NULL;
52    out->reducedDegreeOfFreedom=NULL;    out->reducedDegreeOfFreedom=NULL;
53    out->toReduced=NULL;    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;    return out;
62  }  }
63    
# Line 60  void Finley_NodeFile_dealloc(Finley_Node Line 68  void Finley_NodeFile_dealloc(Finley_Node
68       #ifdef Finley_TRACE       #ifdef Finley_TRACE
69       printf("node file is deallocated.\n");       printf("node file is deallocated.\n");
70       #endif       #endif
71       Finley_NodeFile_deallocTable(in);         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);             MEMFREE(in);      
80    }    }
81  }  }

Legend:
Removed from v.155  
changed lines
  Added in v.751

  ViewVC Help
Powered by ViewVC 1.1.26