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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 776 - (hide annotations)
Wed Jul 12 00:07:31 2006 UTC (13 years, 5 months ago) by gross
File MIME type: text/plain
File size: 3255 byte(s)
basic code for persistence of jacobeans added. routines are not called yet
1 jgs 150 /*
2 elspeth 616 ************************************************************
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 jgs 150 */
12    
13 jgs 82 /**************************************************************/
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 bcumming 730 #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 jgs 82 Finley_NodeFile *out;
38    
39     /* allocate the return value */
40    
41 jgs 102 out=MEMALLOC(1,Finley_NodeFile);
42 jgs 82 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 gross 776 out->status=FINLEY_INITIAL_STATUS;
55 bcumming 730 #ifdef PASO_MPI
56     out->MPIInfo = Paso_MPIInfo_getReference( MPIInfo );
57     out->degreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
58 bcumming 751 out->reducedDegreeOfFreedomDistribution = Finley_NodeDistribution_alloc( MPIInfo );
59     out->CommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
60     out->reducedCommBuffer = Paso_CommBuffer_alloc( MPIInfo, __g_nodeTag++ );
61 bcumming 730 #endif
62 jgs 82 return out;
63     }
64    
65     /* deallocates a node file: */
66    
67     void Finley_NodeFile_dealloc(Finley_NodeFile* in) {
68     if (in!=NULL) {
69     #ifdef Finley_TRACE
70     printf("node file is deallocated.\n");
71     #endif
72 bcumming 730 Finley_NodeFile_deallocTable(in);
73     #ifdef PASO_MPI
74     Paso_MPIInfo_dealloc( in->MPIInfo );
75     Finley_NodeDistribution_dealloc( in->degreeOfFreedomDistribution );
76 bcumming 751 Finley_NodeDistribution_dealloc( in->reducedDegreeOfFreedomDistribution );
77     Paso_CommBuffer_dealloc( in->CommBuffer );
78     Paso_CommBuffer_dealloc( in->reducedCommBuffer );
79 bcumming 730 #endif
80 jgs 82 MEMFREE(in);
81     }
82     }
83     /*
84     * $Log$
85 jgs 150 * Revision 1.5 2005/09/15 03:44:23 jgs
86     * Merge of development branch dev-02 back to main trunk on 2005-09-15
87     *
88     * Revision 1.4.2.1 2005/09/07 06:26:20 gross
89     * the solver from finley are put into the standalone package paso now
90     *
91 jgs 102 * Revision 1.4 2004/12/15 07:08:33 jgs
92 jgs 97 * *** empty log message ***
93 jgs 82 *
94 jgs 97 *
95 jgs 82 *
96     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26