/[escript]/branches/domexper/dudley/src/Mesh_createNodeFileMappings.c
ViewVC logotype

Annotation of /branches/domexper/dudley/src/Mesh_createNodeFileMappings.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1738 - (hide annotations)
Fri Aug 29 05:06:45 2008 UTC (10 years, 9 months ago) by gross
Original Path: trunk/finley/src/Mesh_createNodeFileMappings.c
File MIME type: text/plain
File size: 18450 byte(s)
some changes improving the robustness for MPI if the elements/processor is small
1 ksteube 1315
2 gross 1735 /* $Id:$ */
3 ksteube 1315
4     /*******************************************************
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     /**************************************************************/
17    
18     /* Finley: NodeFile : creates the mappings using the indexReducedNodes */
19     /* no distribution is happening */
20    
21     /**************************************************************/
22    
23     #include "Mesh.h"
24     #define UNUSED -1
25    
26 gross 1735 #define BOUNDS_CHECK 1
27    
28 ksteube 1315 /**************************************************************/
29    
30     void Mesh_createDOFMappingAndCoupling(Finley_Mesh* in, bool_t use_reduced_elements)
31     {
32 gross 1735 index_t min_DOF, max_DOF, *shared=NULL, *offsetInShared=NULL, *locDOFMask=NULL, i, k, myFirstDOF, myLastDOF, *nodeMask=NULL, firstDOF, lastDOF, *globalDOFIndex, *wanted_DOFs=NULL;
33     dim_t mpiSize, len_loc_dof, numNeighbors, n, lastn, numNodes,*rcv_len=NULL, *snd_len=NULL, count;
34 ksteube 1315 Paso_MPI_rank myRank,p,p_min,p_max, *neighbor=NULL;
35     Paso_SharedComponents *rcv_shcomp=NULL, *snd_shcomp=NULL;
36     Finley_NodeMapping *this_mapping=NULL;
37 gross 1552 Paso_Connector* this_connector=NULL;
38 ksteube 1315 Paso_Distribution* dof_distribution;
39 gross 1735 Paso_MPIInfo *mpi_info = in->MPIInfo;
40     #ifdef PASO_MPI
41     MPI_Request* mpi_requests=NULL;
42     MPI_Status* mpi_stati=NULL;
43     #else
44     int *mpi_requests=NULL, *mpi_stati=NULL;
45     #endif
46    
47 ksteube 1315 numNodes=in->Nodes->numNodes;
48     if (use_reduced_elements) {
49     dof_distribution=in->Nodes->reducedDegreesOfFreedomDistribution;
50     globalDOFIndex=in->Nodes->globalReducedDOFIndex;
51     } else {
52     dof_distribution=in->Nodes->degreesOfFreedomDistribution;
53     globalDOFIndex=in->Nodes->globalDegreesOfFreedom;
54     }
55 gross 1738 myFirstDOF=Paso_Distribution_getFirstComponent(dof_distribution);
56     myLastDOF=Paso_Distribution_getLastComponent(dof_distribution);
57 ksteube 1315
58 gross 1738
59 gross 1735 mpiSize=mpi_info->size;
60     myRank=mpi_info->rank;
61 ksteube 1315
62     min_DOF=Finley_Util_getFlaggedMinInt(1,numNodes,globalDOFIndex,-1);
63     max_DOF=Finley_Util_getFlaggedMaxInt(1,numNodes,globalDOFIndex,-1);
64    
65 gross 1738 if (max_DOF < min_DOF) {
66     min_DOF=myFirstDOF;
67     max_DOF=myLastDOF-1;
68     }
69    
70 ksteube 1315 p_min=mpiSize;
71     p_max=-1;
72 gross 1738 if (max_DOF >= min_DOF) {
73     for (p=0; p<mpiSize; ++p) {
74     if (dof_distribution->first_component[p]<=min_DOF) p_min=p;
75     if (dof_distribution->first_component[p]<=max_DOF) p_max=p;
76     }
77     }
78 ksteube 1315
79     len_loc_dof=max_DOF-min_DOF+1;
80     if (! ((min_DOF<=myFirstDOF) && (myLastDOF-1<=max_DOF)) ) {
81     Finley_setError(SYSTEM_ERROR,"Local elements do not span local degrees of freedom.");
82     return;
83     }
84 gross 1735 rcv_len=TMPMEMALLOC(mpiSize,dim_t);
85     snd_len=TMPMEMALLOC(mpiSize,dim_t);
86     #ifdef PASO_MPI
87     mpi_requests=MEMALLOC(mpiSize*2,MPI_Request);
88     mpi_stati=MEMALLOC(mpiSize*2,MPI_Status);
89     #else
90     mpi_requests=MEMALLOC(mpiSize*2,int);
91     mpi_stati=MEMALLOC(mpiSize*2,int);
92     #endif
93     wanted_DOFs=TMPMEMALLOC(numNodes,index_t);
94 ksteube 1315 nodeMask=TMPMEMALLOC(numNodes,index_t);
95     neighbor=TMPMEMALLOC(mpiSize,Paso_MPI_rank);
96     shared=TMPMEMALLOC(numNodes*(p_max-p_min+1),index_t);
97     offsetInShared=TMPMEMALLOC(mpiSize+1,index_t);
98     locDOFMask=TMPMEMALLOC(len_loc_dof, index_t);
99 gross 1735 if (! ( Finley_checkPtr(neighbor) || Finley_checkPtr(shared) || Finley_checkPtr(offsetInShared) || Finley_checkPtr(locDOFMask) ||
100     Finley_checkPtr(nodeMask) || Finley_checkPtr(rcv_len) || Finley_checkPtr(snd_len) || Finley_checkPtr(mpi_requests) || Finley_checkPtr(mpi_stati) ||
101     Finley_checkPtr(mpi_stati) )) {
102 ksteube 1315
103 gross 1735 memset(rcv_len,0,sizeof(dim_t)*mpiSize);
104     #pragma omp parallel
105     {
106     #pragma omp for private(i) schedule(static)
107     for (i=0;i<len_loc_dof;++i) locDOFMask[i]=UNUSED;
108     #pragma omp for private(i) schedule(static)
109     for (i=0;i<numNodes;++i) nodeMask[i]=UNUSED;
110     #pragma omp for private(i,k) schedule(static)
111     for (i=0;i<numNodes;++i) {
112     k=globalDOFIndex[i];
113     if (k>-1) {
114     locDOFMask[k-min_DOF]=UNUSED-1;
115     #ifdef BOUNDS_CHECK
116     if ((k-min_DOF) >= len_loc_dof) { printf("BOUNDS_CHECK %s %d i=%d k=%d min_DOF=%d\n", __FILE__, __LINE__, i, k, min_DOF); exit(1); }
117     #endif
118     }
119     }
120 ksteube 1315
121 gross 1735 #pragma omp for private(i) schedule(static)
122     for (i=myFirstDOF-min_DOF;i<myLastDOF-min_DOF;++i) {
123     locDOFMask[i]=i-myFirstDOF+min_DOF;
124     #ifdef BOUNDS_CHECK
125     if (i < 0 || i >= len_loc_dof) { printf("BOUNDS_CHECK %s %d i=%d\n", __FILE__, __LINE__, i); exit(1); }
126     #endif
127     }
128 ksteube 1315 }
129    
130     numNeighbors=0;
131     n=0;
132     lastn=n;
133     for (p=p_min;p<=p_max;++p) {
134     firstDOF=MAX(min_DOF,dof_distribution->first_component[p]);
135     lastDOF=MIN(max_DOF+1,dof_distribution->first_component[p+1]);
136     if (p != myRank) {
137     for (i=firstDOF-min_DOF;i<lastDOF-min_DOF;++i) {
138 gross 1735 #ifdef BOUNDS_CHECK
139     if (i < 0 || i >= len_loc_dof) { printf("BOUNDS_CHECK %s %d p=%d i=%d\n", __FILE__, __LINE__, p, i); exit(1); }
140     #endif
141 ksteube 1315 if (locDOFMask[i] == UNUSED-1) {
142     locDOFMask[i]=myLastDOF-myFirstDOF+n;
143 gross 1735 wanted_DOFs[n]=i+min_DOF;
144 ksteube 1315 ++n;
145     }
146     }
147     if (n>lastn) {
148 gross 1735 rcv_len[p]=n-lastn;
149 ksteube 1315 neighbor[numNeighbors]=p;
150 gross 1735 #ifdef BOUNDS_CHECK
151 ksteube 1326 if (numNeighbors < 0 || numNeighbors >= mpiSize+1) { printf("BOUNDS_CHECK %s %d p=%d numNeighbors=%d n=%d\n", __FILE__, __LINE__, p, numNeighbors, n); exit(1); }
152 gross 1735 #endif
153 ksteube 1315 offsetInShared[numNeighbors]=lastn;
154     numNeighbors++;
155     lastn=n;
156     }
157     }
158     }
159     #ifdef BOUNDS_CHECK
160 ksteube 1326 if (numNeighbors < 0 || numNeighbors >= mpiSize+1) { printf("BOUNDS_CHECK %s %d numNeighbors=%d\n", __FILE__, __LINE__, numNeighbors); exit(1); }
161 ksteube 1315 #endif
162     offsetInShared[numNeighbors]=lastn;
163    
164     /* assign new DOF labels to nodes */
165     #pragma omp parallel for private(i) schedule(static)
166     for (i=0;i<numNodes;++i) {
167     k=globalDOFIndex[i];
168     if (k>-1) nodeMask[i]=locDOFMask[k-min_DOF];
169     }
170    
171     /* now we can set the mapping from nodes to local DOFs */
172     this_mapping=Finley_NodeMapping_alloc(numNodes,nodeMask,UNUSED);
173     /* define how to get DOF values for controlled bu other processors */
174 gross 1735 #ifdef BOUNDS_CHECK
175 ksteube 1315 for (i=0;i<offsetInShared[numNeighbors];++i) {
176 ksteube 1326 if (i < 0 || i >= numNodes*(p_max-p_min+1)) { printf("BOUNDS_CHECK %s %d i=%d\n", __FILE__, __LINE__, i); exit(1); }
177 ksteube 1315 }
178 gross 1735 #endif
179 ksteube 1315 #pragma omp parallel for private(i) schedule(static)
180     for (i=0;i<offsetInShared[numNeighbors];++i) shared[i]=myLastDOF-myFirstDOF+i;
181    
182 gross 1735 rcv_shcomp=Paso_SharedComponents_alloc(myLastDOF-myFirstDOF,numNeighbors,neighbor,shared,offsetInShared,1,0,mpi_info);
183 ksteube 1315
184 gross 1735 /*
185     * now we build the sender
186     */
187     #ifdef PASO_MPI
188     MPI_Alltoall(rcv_len,1,MPI_INT,snd_len,1,MPI_INT,mpi_info->comm);
189     #else
190     for (p=0;p<mpiSize;++p) snd_len[p]=rcv_count[p];
191     #endif
192     count=0;
193     for (p=0;p<rcv_shcomp->numNeighbors;p++) {
194     #ifdef PASO_MPI
195     MPI_Isend(&(wanted_DOFs[rcv_shcomp->offsetInShared[p]]), rcv_shcomp->offsetInShared[p+1]-rcv_shcomp->offsetInShared[p],
196     MPI_INT,rcv_shcomp->neighbor[p],mpi_info->msg_tag_counter+myRank,mpi_info->comm,&mpi_requests[count]);
197     #endif
198     count++;
199     }
200 ksteube 1315 n=0;
201     numNeighbors=0;
202 gross 1735 for (p=0;p<mpiSize;p++) {
203     if (snd_len[p] > 0) {
204     #ifdef PASO_MPI
205     MPI_Irecv(&(shared[n]),snd_len[p],
206     MPI_INT, p, mpi_info->msg_tag_counter+p, mpi_info->comm, &mpi_requests[count]);
207     #endif
208     count++;
209     neighbor[numNeighbors]=p;
210     offsetInShared[numNeighbors]=n;
211     numNeighbors++;
212     n+=snd_len[p];
213     }
214     }
215     mpi_info->msg_tag_counter+=mpi_info->size;
216     offsetInShared[numNeighbors]=n;
217     #ifdef PASO_MPI
218     MPI_Waitall(count,mpi_requests,mpi_stati);
219     #endif
220     /* map global ids to local id's */
221     #pragma omp parallel for private(i) schedule(static)
222     for (i=0;i<offsetInShared[numNeighbors];++i) {
223     shared[i]=locDOFMask[shared[i]-min_DOF];
224     }
225 ksteube 1315
226 gross 1562 snd_shcomp=Paso_SharedComponents_alloc(myLastDOF-myFirstDOF,numNeighbors,neighbor,shared,offsetInShared,1,0,dof_distribution->mpi_info);
227 ksteube 1315
228 gross 1552 if (Finley_noError()) this_connector=Paso_Connector_alloc(snd_shcomp,rcv_shcomp);
229 ksteube 1315 /* assign new DOF labels to nodes */
230     Paso_SharedComponents_free(rcv_shcomp);
231     Paso_SharedComponents_free(snd_shcomp);
232     }
233 gross 1735 TMPMEMFREE(rcv_len);
234     TMPMEMFREE(snd_len);
235     TMPMEMFREE(mpi_requests);
236     TMPMEMFREE(mpi_stati);
237     TMPMEMFREE(wanted_DOFs);
238 ksteube 1315 TMPMEMFREE(nodeMask);
239     TMPMEMFREE(neighbor);
240     TMPMEMFREE(shared);
241     TMPMEMFREE(offsetInShared);
242     TMPMEMFREE(locDOFMask);
243     if (Finley_noError()) {
244     if (use_reduced_elements) {
245     in->Nodes->reducedDegreesOfFreedomMapping=this_mapping;
246 gross 1552 in->Nodes->reducedDegreesOfFreedomConnector=this_connector;
247 ksteube 1315 } else {
248     in->Nodes->degreesOfFreedomMapping=this_mapping;
249 gross 1552 in->Nodes->degreesOfFreedomConnector=this_connector;
250 ksteube 1315 }
251     } else {
252     Finley_NodeMapping_free(this_mapping);
253 gross 1552 Paso_Connector_free(this_connector);
254 ksteube 1315
255     }
256     }
257 ksteube 1347
258     void Finley_Mesh_createMappings(Finley_Mesh* mesh, index_t* distribution) {
259     int i;
260     index_t *maskReducedNodes=NULL, *indexReducedNodes=NULL;
261     dim_t numReducedNodes;
262    
263     maskReducedNodes=TMPMEMALLOC(mesh->Nodes->numNodes,index_t);
264     indexReducedNodes=TMPMEMALLOC(mesh->Nodes->numNodes,index_t);
265    
266     if (! ( Finley_checkPtr(maskReducedNodes) || Finley_checkPtr(indexReducedNodes) ) ) {
267     #pragma omp parallel for private(i) schedule(static)
268     for (i=0;i<mesh->Nodes->numNodes;++i) maskReducedNodes[i]=-1;
269     Finley_Mesh_markNodes(maskReducedNodes,0,mesh,TRUE);
270     numReducedNodes=Finley_Util_packMask(mesh->Nodes->numNodes,maskReducedNodes,indexReducedNodes);
271     if (Finley_noError()) Finley_Mesh_createNodeFileMappings(mesh,numReducedNodes,indexReducedNodes,distribution);
272     }
273    
274     TMPMEMFREE(maskReducedNodes);
275     TMPMEMFREE(indexReducedNodes);
276     }
277    
278 ksteube 1315 void Finley_Mesh_createNodeFileMappings(Finley_Mesh* in, dim_t numReducedNodes, index_t* indexReducedNodes, index_t* dof_first_component) {
279    
280    
281     index_t myFirstDOF, myLastDOF, myFirstNode, myLastNode, *reduced_dof_first_component=NULL, *nodeMask=NULL,
282     *reduced_nodes_first_component=NULL, *nodes_first_component=NULL,k,
283     *maskMyReducedDOF=NULL, *indexMyReducedDOF=NULL, *maskMyReducedNodes=NULL, *indexMyReducedNodes=NULL;
284 gross 1738 dim_t myNumDOF, myNumNodes, myNumReducedNodes, myNumReducedDOF, globalNumReducedNodes, globalNumReducedDOF,i,mpiSize, minGlobalNodeIndex,maxGlobalNodeIndex;
285 ksteube 1315 Paso_MPI_rank myRank;
286    
287     mpiSize=in->Nodes->MPIInfo->size;
288     myRank=in->Nodes->MPIInfo->rank;
289     /* mark the nodes used by the reduced mesh */
290    
291     reduced_dof_first_component=TMPMEMALLOC(mpiSize+1,index_t);
292     reduced_nodes_first_component=TMPMEMALLOC(mpiSize+1,index_t);
293     nodes_first_component=TMPMEMALLOC(mpiSize+1,index_t);
294    
295     if (! ( Finley_checkPtr(reduced_dof_first_component) || Finley_checkPtr(reduced_nodes_first_component) || Finley_checkPtr(nodes_first_component) ) ) {
296    
297 gross 1738 Finley_NodeFile_setGlobalNodeIDIndexRange(&minGlobalNodeIndex,&maxGlobalNodeIndex,in->Nodes);
298     Paso_MPIInfo_setDistribution(in->Nodes->MPIInfo,minGlobalNodeIndex,maxGlobalNodeIndex,nodes_first_component);
299 ksteube 1315
300     myFirstDOF=dof_first_component[myRank];
301     myLastDOF=dof_first_component[myRank+1];
302     myNumDOF=myLastDOF-myFirstDOF;
303     myFirstNode=nodes_first_component[myRank];
304     myLastNode=nodes_first_component[myRank+1];
305     myNumNodes=myLastNode-myFirstNode;
306    
307     maskMyReducedDOF=TMPMEMALLOC(myNumDOF,index_t);
308     indexMyReducedDOF=TMPMEMALLOC(myNumDOF,index_t);
309     maskMyReducedNodes=TMPMEMALLOC(myNumNodes,index_t);
310     indexMyReducedNodes=TMPMEMALLOC(myNumNodes,index_t);
311    
312     if (! ( Finley_checkPtr(maskMyReducedDOF) || Finley_checkPtr(indexMyReducedDOF) || Finley_checkPtr(maskMyReducedNodes) || Finley_checkPtr(indexMyReducedNodes) ) ) {
313    
314     #pragma omp parallel private(i)
315     {
316     #pragma omp for schedule(static)
317     for (i=0;i<myNumNodes;++i) maskMyReducedNodes[i]=-1;
318     #pragma omp for schedule(static)
319     for (i=0;i<myNumDOF;++i) maskMyReducedDOF[i]=-1;
320     #pragma omp for private(k) schedule(static)
321     for (i=0;i<numReducedNodes;++i) {
322     k=in->Nodes->globalNodesIndex[indexReducedNodes[i]];
323     if ( (k>=myFirstNode) && (myLastNode>k) ) maskMyReducedNodes[k-myFirstNode]=i;
324     k=in->Nodes->globalDegreesOfFreedom[indexReducedNodes[i]];
325 gross 1735 if ( (k>=myFirstDOF) && (myLastDOF>k) ) {
326     maskMyReducedDOF[k-myFirstDOF]=i;
327     }
328 ksteube 1315 }
329     }
330     myNumReducedNodes=Finley_Util_packMask(myNumNodes,maskMyReducedNodes,indexMyReducedNodes);
331     myNumReducedDOF=Finley_Util_packMask(myNumDOF,maskMyReducedDOF,indexMyReducedDOF);
332    
333     #ifdef PASO_MPI
334     MPI_Allgather(&myNumReducedNodes,1,MPI_INT,reduced_nodes_first_component,1,MPI_INT,in->Nodes->MPIInfo->comm);
335     MPI_Allgather(&myNumReducedDOF,1,MPI_INT,reduced_dof_first_component,1,MPI_INT,in->Nodes->MPIInfo->comm);
336     #else
337     reduced_nodes_first_component[0]=myNumReducedNodes;
338     reduced_dof_first_component[0]=myNumReducedDOF;
339     #endif
340     globalNumReducedNodes=0;
341     globalNumReducedDOF=0;
342     for (i=0;i<mpiSize;++i) {
343     k=reduced_nodes_first_component[i];
344     reduced_nodes_first_component[i]=globalNumReducedNodes;
345     globalNumReducedNodes+=k;
346    
347     k=reduced_dof_first_component[i];
348     reduced_dof_first_component[i]=globalNumReducedDOF;
349     globalNumReducedDOF+=k;
350     }
351     reduced_nodes_first_component[mpiSize]=globalNumReducedNodes;
352     reduced_dof_first_component[mpiSize]=globalNumReducedDOF;
353     /* ==== distribution of Nodes ===============================*/
354 gross 1738 Paso_MPIInfo_setDistribution(in->Nodes->MPIInfo,minGlobalNodeIndex,maxGlobalNodeIndex,nodes_first_component);
355 ksteube 1315 in->Nodes->nodesDistribution=Paso_Distribution_alloc(in->Nodes->MPIInfo,nodes_first_component,1,0);
356    
357     /* ==== distribution of Nodes ===============================*/
358     in->Nodes->degreesOfFreedomDistribution=Paso_Distribution_alloc(in->Nodes->MPIInfo,dof_first_component,1,0);
359    
360     /* ==== distribution of reduced Nodes ===============================*/
361     reduced_nodes_first_component[mpiSize]=globalNumReducedNodes;
362     in->Nodes->reducedNodesDistribution=Paso_Distribution_alloc(in->Nodes->MPIInfo,reduced_nodes_first_component,1,0);
363    
364     /* ==== distribution of reduced DOF ===============================*/
365     in->Nodes->reducedDegreesOfFreedomDistribution=Paso_Distribution_alloc(in->Nodes->MPIInfo,reduced_dof_first_component,1,0);
366     }
367     TMPMEMFREE(maskMyReducedDOF);
368     TMPMEMFREE(indexMyReducedDOF);
369     TMPMEMFREE(maskMyReducedNodes);
370     TMPMEMFREE(indexMyReducedNodes);
371     }
372     TMPMEMFREE(reduced_dof_first_component);
373     TMPMEMFREE(reduced_nodes_first_component);
374     TMPMEMFREE(nodes_first_component);
375    
376     nodeMask=TMPMEMALLOC(in->Nodes->numNodes,index_t);
377     if (! Finley_checkPtr(nodeMask) && Finley_noError()) {
378    
379     /* ==== nodes mapping which is a dummy structure ======== */
380     #pragma omp parallel for private(i) schedule(static)
381     for (i=0;i<in->Nodes->numNodes;++i) nodeMask[i]=i;
382     in->Nodes->nodesMapping=Finley_NodeMapping_alloc(in->Nodes->numNodes,nodeMask,UNUSED);
383    
384     /* ==== mapping between nodes and reduced nodes ========== */
385     #pragma omp parallel for private(i) schedule(static)
386     for (i=0;i<in->Nodes->numNodes;++i) nodeMask[i]=UNUSED;
387     #pragma omp parallel for private(i) schedule(static)
388     for (i=0;i<numReducedNodes;++i) nodeMask[indexReducedNodes[i]]=i;
389     in->Nodes->reducedNodesMapping=Finley_NodeMapping_alloc(in->Nodes->numNodes,nodeMask,UNUSED);
390    
391     }
392     TMPMEMFREE(nodeMask);
393 gross 1552 /* ==== mapping between nodes and DOFs + DOF connector ========== */
394 ksteube 1315 if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,FALSE);
395 gross 1552 /* ==== mapping between nodes and reduced DOFs + reduced DOF connector ========== */
396 ksteube 1315 if ( Finley_noError()) Mesh_createDOFMappingAndCoupling(in,TRUE);
397    
398     /* get the Ids for DOFs and reduced nodes */
399     if (Finley_noError()) {
400     #pragma omp parallel private(i)
401     {
402     #pragma omp for
403     for (i=0;i<in->Nodes->reducedNodesMapping->numTargets;++i) in->Nodes->reducedNodesId[i]=in->Nodes->Id[in->Nodes->reducedNodesMapping->map[i]];
404     #pragma omp for
405     for (i=0;i<in->Nodes->degreesOfFreedomMapping->numTargets;++i) in->Nodes->degreesOfFreedomId[i]=in->Nodes->Id[in->Nodes->degreesOfFreedomMapping->map[i]];
406     #pragma omp for
407     for (i=0;i<in->Nodes->reducedDegreesOfFreedomMapping->numTargets;++i) in->Nodes->reducedDegreesOfFreedomId[i]=in->Nodes->Id[in->Nodes->reducedDegreesOfFreedomMapping->map[i]];
408     }
409     } else {
410     Finley_NodeMapping_free(in->Nodes->nodesMapping);
411     Finley_NodeMapping_free(in->Nodes->reducedNodesMapping);
412     Finley_NodeMapping_free(in->Nodes->degreesOfFreedomMapping);
413     Finley_NodeMapping_free(in->Nodes->reducedDegreesOfFreedomMapping);
414     Paso_Distribution_free(in->Nodes->nodesDistribution);
415     Paso_Distribution_free(in->Nodes->reducedNodesDistribution);
416     Paso_Distribution_free(in->Nodes->degreesOfFreedomDistribution);
417     Paso_Distribution_free(in->Nodes->reducedDegreesOfFreedomDistribution);
418 gross 1552 Paso_Connector_free(in->Nodes->degreesOfFreedomConnector);
419     Paso_Connector_free(in->Nodes->reducedDegreesOfFreedomConnector);
420 ksteube 1315 in->Nodes->nodesMapping=NULL;
421     in->Nodes->reducedNodesMapping=NULL;
422     in->Nodes->degreesOfFreedomMapping=NULL;
423     in->Nodes->reducedDegreesOfFreedomMapping=NULL;
424     in->Nodes->nodesDistribution=NULL;
425     in->Nodes->reducedNodesDistribution=NULL;
426     in->Nodes->degreesOfFreedomDistribution=NULL;
427     in->Nodes->reducedDegreesOfFreedomDistribution=NULL;
428 gross 1552 in->Nodes->degreesOfFreedomConnector=NULL;
429     in->Nodes->reducedDegreesOfFreedomConnector=NULL;
430 ksteube 1315 }
431     }
432    

  ViewVC Help
Powered by ViewVC 1.1.26