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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2548 - (hide annotations)
Mon Jul 20 06:20:06 2009 UTC (10 years, 6 months ago) by jfenwick
File MIME type: text/plain
File size: 7910 byte(s)
Updating copyright notices
1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2548 * Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1312
14 ksteube 1811
15 jgs 82 #ifndef INC_FINLEY_NODEFILE
16     #define INC_FINLEY_NODEFILE
17    
18     #define MAX_numDim 3
19    
20 jgs 150 #include "Finley.h"
21 ksteube 1312 #include "NodeMapping.h"
22 robwdcock 682 #include "escript/DataC.h"
23 ksteube 1312 #include "paso/Distribution.h"
24     #include "paso/Coupler.h"
25 jgs 82
26     struct Finley_NodeFile {
27 bcumming 730 Paso_MPIInfo *MPIInfo; /* MPI information */
28 bcumming 782
29 jgs 123 dim_t numNodes; /* number of nodes */
30     dim_t numDim; /* spatial dimension */
31 ksteube 1312 index_t *Id; /* Id[i] is the id number of node i. It need to be unique. */
32 jgs 123 index_t *Tag; /* Tag[i] is the tag of node i. */
33 gross 1716 index_t *tagsInUse; /* array of tags which are actually used */
34     dim_t numTagsInUse; /* number of tags used */
35 ksteube 1312
36     index_t* globalDegreesOfFreedom; /* globalDegreesOfFreedom[i] is the global degree of freedom assigned to node i */
37     /* this index is used to consider periodic boundary conditions by assigning */
38     /* the same degreesOfFreedom to the same node */
39 jgs 123 double *Coordinates; /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */
40     /* node i. */
41 ksteube 1312 index_t *globalReducedDOFIndex; /* assigns each local node a global unique Id in a dens labeling of reduced DOF*/
42     /* value <0 indicates that the DOF is not used */
43     index_t *globalReducedNodesIndex; /* assigns each local node a global unique Id in a dens labeling */
44     /* value <0 indicates that the DOF is not used */
45     index_t *globalNodesIndex; /* assigns each local reduced node a global unique Id in a dens labeling */
46 gross 776
47 ksteube 1312
48     Finley_NodeMapping *nodesMapping;
49     Finley_NodeMapping *reducedNodesMapping;
50     Finley_NodeMapping *degreesOfFreedomMapping;
51     Finley_NodeMapping *reducedDegreesOfFreedomMapping;
52    
53     Paso_Distribution *nodesDistribution;
54     Paso_Distribution *reducedNodesDistribution;
55     Paso_Distribution *degreesOfFreedomDistribution;
56     Paso_Distribution *reducedDegreesOfFreedomDistribution;
57    
58 gross 1552 Paso_Connector* degreesOfFreedomConnector;
59     Paso_Connector *reducedDegreesOfFreedomConnector;
60 ksteube 1312
61     /* these a the packed versions of Id */
62     index_t *reducedNodesId;
63     index_t *degreesOfFreedomId;
64     index_t *reducedDegreesOfFreedomId;
65    
66    
67     int status; /* the status counts the updates done on the node coordinates */
68 gross 776 /* the value of status is increased by when the node coordinates are updated.*/
69    
70    
71 jgs 82 };
72    
73 ksteube 1312 typedef struct Finley_NodeFile Finley_NodeFile;
74 bcumming 730
75    
76 jgs 82
77 bcumming 730 Finley_NodeFile* Finley_NodeFile_alloc(dim_t, Paso_MPIInfo *MPIInfo);
78 ksteube 1312 index_t Finley_NodeFile_getFirstReducedNode(Finley_NodeFile* in);
79     index_t Finley_NodeFile_getLastReducedNode(Finley_NodeFile* in);
80     dim_t Finley_NodeFile_getGlobalNumReducedNodes(Finley_NodeFile* in);
81     index_t* Finley_NodeFile_borrowGlobalReducedNodesIndex(Finley_NodeFile* in);
82     index_t Finley_NodeFile_maxGlobalNodeIDIndex(Finley_NodeFile* in);
83     index_t Finley_NodeFile_maxGlobalReducedNodeIDIndex(Finley_NodeFile* in);
84     index_t Finley_NodeFile_GlobalDegreeOfFreedomIndex(Finley_NodeFile* in);
85     index_t Finley_NodeFile_GlobalReducedDegreeOfFreedomIndex(Finley_NodeFile* in);
86    
87     index_t Finley_NodeFile_getFirstNode(Finley_NodeFile* in);
88     index_t Finley_NodeFile_getLastNode(Finley_NodeFile* in);
89     dim_t Finley_NodeFile_getGlobalNumNodes(Finley_NodeFile* in);
90     index_t* Finley_NodeFile_borrowGlobalNodesIndex(Finley_NodeFile* in);
91    
92     /* returns the number of target */
93     dim_t Finley_NodeFile_getNumReducedNodes(Finley_NodeFile* in);
94     dim_t Finley_NodeFile_getNumDegreesOfFreedom(Finley_NodeFile* in);
95     dim_t Finley_NodeFile_getNumNodes(Finley_NodeFile* in);
96     dim_t Finley_NodeFile_getNumReducedDegreesOfFreedom(Finley_NodeFile* in);
97    
98     /* returns the mapping from local nodes to a target */
99     index_t* Finley_NodeFile_borrowTargetReducedNodes(Finley_NodeFile* in);
100     index_t* Finley_NodeFile_borrowTargetDegreesOfFreedom(Finley_NodeFile* in);
101     index_t* Finley_NodeFile_borrowTargetNodes(Finley_NodeFile* in);
102     index_t* Finley_NodeFile_borrowTargetReducedDegreesOfFreedom(Finley_NodeFile* in);
103     /* returns the mapping from target to the local nodes */
104     index_t* Finley_NodeFile_borrowReducedNodesTarget(Finley_NodeFile* in);
105     index_t* Finley_NodeFile_borrowDegreesOfFreedomTarget(Finley_NodeFile* in);
106     index_t* Finley_NodeFile_borrowNodesTarget(Finley_NodeFile* in);
107     index_t* Finley_NodeFile_borrowReducedDegreesOfFreedomTarget(Finley_NodeFile* in);
108    
109 bcumming 730 void Finley_NodeFile_allocTable(Finley_NodeFile*,dim_t);
110 ksteube 1312 void Finley_NodeFile_free(Finley_NodeFile*);
111     void Finley_NodeFile_freeTable(Finley_NodeFile*);
112     void Finley_NodeFile_setIdGlobalRange(index_t*,index_t*,Finley_NodeFile*);
113     void Finley_NodeFile_setIdRange(index_t*,index_t*,Finley_NodeFile*);
114     void Finley_NodeFile_setDOFGlobalRange(index_t*,index_t*,Finley_NodeFile*);
115     void Finley_NodeFile_setDOFRange(index_t*,index_t*,Finley_NodeFile*);
116 bcumming 730
117 gross 1749
118 ksteube 1312 void Finley_NodeFile_setGlobalDOFRange(index_t*,index_t*,Finley_NodeFile*);
119     void Finley_NodeFile_setGlobalIdRange(index_t*,index_t*,Finley_NodeFile*);
120     index_t Finley_NodeFile_maxGlobalDegreeOfFreedomIndex(Finley_NodeFile*);
121     index_t Finley_NodeFile_maxGlobalReducedDegreeOfFreedomIndex(Finley_NodeFile*);
122    
123     void Finley_NodeFile_setReducedDOFRange(index_t*,index_t*,Finley_NodeFile*);
124     dim_t Finley_NodeFile_createDenseDOFLabeling(Finley_NodeFile*);
125 gross 1749 dim_t Finley_NodeFile_createDenseNodeLabeling(Finley_NodeFile* in, index_t* node_distribution, const index_t* dof_distribution);
126 ksteube 1312 dim_t Finley_NodeFile_createDenseReducedNodeLabeling(Finley_NodeFile* in, index_t* reducedNodeMask);
127     dim_t Finley_NodeFile_createDenseReducedDOFLabeling(Finley_NodeFile* in, index_t* reducedNodeMask);
128     void Finley_NodeFile_assignMPIRankToDOFs(Finley_NodeFile* in,Paso_MPI_rank* mpiRankOfDOF, index_t *distribution);
129     void Finley_NodeFile_gather(index_t*,Finley_NodeFile*,Finley_NodeFile*);
130     void Finley_NodeFile_gather_global(index_t*,Finley_NodeFile*,Finley_NodeFile*);
131     void Finley_NodeFile_gatherEntries(dim_t, index_t*, index_t, index_t, index_t*, index_t*, index_t*, index_t*, index_t*, index_t*, dim_t numDim, double*, double*);
132     void Finley_NodeFile_copyTable(dim_t,Finley_NodeFile*,dim_t,dim_t,Finley_NodeFile*);
133 jgs 123 void Finley_NodeFile_scatter(index_t*,Finley_NodeFile*,Finley_NodeFile*);
134 ksteube 1312 void Finley_NodeFile_scatterEntries(dim_t, index_t*, index_t, index_t, index_t*, index_t*, index_t*, index_t*, index_t*, index_t*, dim_t numDim, double*, double*);
135     void Finley_NodeFile_copyTable(dim_t,Finley_NodeFile*,dim_t,dim_t,Finley_NodeFile*);
136 gross 1738 void Finley_NodeFile_setGlobalReducedDegreeOfFreedomRange(index_t* min_id,index_t* max_id,Finley_NodeFile* in);
137     void Finley_NodeFile_setGlobalNodeIDIndexRange(index_t* min_id,index_t* max_id,Finley_NodeFile* in);
138     void Finley_NodeFile_setGlobalReducedNodeIDIndexRange(index_t* min_id,index_t* max_id,Finley_NodeFile* in);
139 ksteube 1312
140     /* ===================== */
141 jgs 82 void Finley_NodeFile_setCoordinates(Finley_NodeFile*,escriptDataC*);
142 gross 767 void Finley_NodeFile_setTags(Finley_NodeFile*,const int,escriptDataC*);
143 gross 1716 void Finley_NodeFile_setTagsInUse(Finley_NodeFile* in);
144 jgs 82
145     #endif
146    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26