1 |
/* $Id$ */ |
2 |
/**************************************************************/ |
3 |
/* */ |
4 |
/* Finley: Mesh : NodeFile */ |
5 |
/* */ |
6 |
/* allocates and deallocates node files */ |
7 |
/* */ |
8 |
/**************************************************************/ |
9 |
|
10 |
/* Copyrights by ACcESS Australia 2003/04 */ |
11 |
/* Author: gross@access.edu.au */ |
12 |
/* Version: $Id$ */ |
13 |
|
14 |
/**************************************************************/ |
15 |
|
16 |
#include "Finley.h" |
17 |
#include "NodeFile.h" |
18 |
|
19 |
/**************************************************************/ |
20 |
|
21 |
/* allocates a node file to hold nodes */ |
22 |
/* use Finley_NodeFile_allocTable to allocate the node table (Id,Coordinatess). */ |
23 |
|
24 |
Finley_NodeFile* Finley_NodeFile_alloc(int numDim){ |
25 |
Finley_NodeFile *out; |
26 |
|
27 |
/* allocate the return value */ |
28 |
|
29 |
out=(Finley_NodeFile*)MEMALLOC(sizeof(Finley_NodeFile)); |
30 |
if (Finley_checkPtr(out)) return NULL; |
31 |
out->numNodes=0; |
32 |
out->numDegreesOfFreedom=0; |
33 |
out->reducedNumDegreesOfFreedom=0; |
34 |
out->reducedNumNodes=0; |
35 |
out->numDim=numDim; |
36 |
out->Id=NULL; |
37 |
out->Tag=NULL; |
38 |
out->Coordinates=NULL; |
39 |
out->degreeOfFreedom=NULL; |
40 |
out->reducedDegreeOfFreedom=NULL; |
41 |
out->toReduced=NULL; |
42 |
return out; |
43 |
} |
44 |
|
45 |
/* deallocates a node file: */ |
46 |
|
47 |
void Finley_NodeFile_dealloc(Finley_NodeFile* in) { |
48 |
if (in!=NULL) { |
49 |
#ifdef Finley_TRACE |
50 |
printf("node file is deallocated.\n"); |
51 |
#endif |
52 |
Finley_NodeFile_deallocTable(in); |
53 |
MEMFREE(in); |
54 |
} |
55 |
} |
56 |
/* |
57 |
* $Log$ |
58 |
* Revision 1.3 2004/12/15 03:48:45 jgs |
59 |
* *** empty log message *** |
60 |
* |
61 |
* Revision 1.1.1.1 2004/10/26 06:53:57 jgs |
62 |
* initial import of project esys2 |
63 |
* |
64 |
* Revision 1.1.1.1 2004/06/24 04:00:40 johng |
65 |
* Initial version of eys using boost-python. |
66 |
* |
67 |
* |
68 |
*/ |