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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1749 - (hide annotations)
Wed Sep 3 07:25:01 2008 UTC (14 years ago) by gross
File MIME type: text/plain
File size: 7945 byte(s)
fixes a problem with the saveVTK writing under mpi


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26