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

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

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

trunk/finley/src/finleyC/Mesh.c revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC trunk/finley/src/Mesh.c revision 730 by bcumming, Mon May 15 04:03:49 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 32  Line 30 
30    
31  extern Finley_RefElementInfo Finley_RefElement_InfoList[];  extern Finley_RefElementInfo Finley_RefElement_InfoList[];
32    
33  Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order) {  #ifndef PASO_MPI
34    Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order)
35    #else
36    Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order, Paso_MPIInfo *mpi_info)
37    #endif
38    {
39    Finley_Mesh *out;    Finley_Mesh *out;
40        
41    /*  allocate the return value */    /*  allocate the return value */
# Line 51  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 54  Finley_Mesh* Finley_Mesh_alloc(char* nam
54    out->FullReducedPattern=NULL;    out->FullReducedPattern=NULL;
55    out->ReducedFullPattern=NULL;    out->ReducedFullPattern=NULL;
56    out->ReducedReducedPattern=NULL;    out->ReducedReducedPattern=NULL;
57      
58    #ifdef PASO_MPI
59      out->MPIInfo = NULL;
60    
61      /* get MPI info */
62      out->MPIInfo = Paso_MPIInfo_getReference( mpi_info );
63      if (! Finley_noError()) {
64          Finley_Mesh_dealloc(out);
65          return NULL;
66      }
67    #endif
68    /*   copy name: */    /*   copy name: */
69        
70    out->Name=MEMALLOC(strlen(name)+1,char);    out->Name=MEMALLOC(strlen(name)+1,char);
# Line 62  Finley_Mesh* Finley_Mesh_alloc(char* nam Line 75  Finley_Mesh* Finley_Mesh_alloc(char* nam
75    strcpy(out->Name,name);    strcpy(out->Name,name);
76        
77    /*   allocate node table: */    /*   allocate node table: */
78      #ifdef PASO_MPI
79      out->Nodes=Finley_NodeFile_alloc( numDim, mpi_info );
80    #else
81    out->Nodes=Finley_NodeFile_alloc(numDim);    out->Nodes=Finley_NodeFile_alloc(numDim);
82    #endif
83    if (! Finley_noError()) {    if (! Finley_noError()) {
84        Finley_Mesh_dealloc(out);        Finley_Mesh_dealloc(out);
85        return NULL;        return NULL;
# Line 107  void Finley_Mesh_dealloc(Finley_Mesh* in Line 123  void Finley_Mesh_dealloc(Finley_Mesh* in
123         Paso_SystemMatrixPattern_dealloc(in->FullReducedPattern);         Paso_SystemMatrixPattern_dealloc(in->FullReducedPattern);
124         Paso_SystemMatrixPattern_dealloc(in->ReducedFullPattern);         Paso_SystemMatrixPattern_dealloc(in->ReducedFullPattern);
125         Paso_SystemMatrixPattern_dealloc(in->ReducedReducedPattern);         Paso_SystemMatrixPattern_dealloc(in->ReducedReducedPattern);
126    #ifdef PASO_MPI
127           Paso_MPIInfo_dealloc( in->MPIInfo );
128    #endif
129         MEMFREE(in);               MEMFREE(in);      
130       }       }
131    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.26