/[escript]/branches/trilinos_from_5897/dudley/src/NodeFile_setIdRange.cpp
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/NodeFile_setIdRange.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6008 by caltinay, Fri Feb 5 03:37:49 2016 UTC revision 6009 by caltinay, Wed Mar 2 04:13:26 2016 UTC
# Line 14  Line 14 
14  *  *
15  *****************************************************************************/  *****************************************************************************/
16    
17  /************************************************************************************/  /****************************************************************************/
18    
19  /*   Dudley: Mesh: NodeFile */  /*   Dudley: Mesh: NodeFile */
20    
21  /*   returns the maximum and minimum node id number of nodes: */  /*   returns the maximum and minimum node id number of nodes: */
22    
23  /************************************************************************************/  /****************************************************************************/
   
 #define ESNEEDPYTHON  
 #include "esysUtils/first.h"  
24    
25  #include "NodeFile.h"  #include "NodeFile.h"
26  #include "Util.h"  #include "Util.h"
27    
28  /************************************************************************************/  namespace dudley {
29    
30  void Dudley_NodeFile_setGlobalIdRange(index_t * min_id, index_t * max_id, Dudley_NodeFile * in)  void Dudley_NodeFile_setGlobalIdRange(index_t * min_id, index_t * max_id, Dudley_NodeFile * in)
31  {  {
# Line 50  void Dudley_NodeFile_setGlobalIdRange(in Line 47  void Dudley_NodeFile_setGlobalIdRange(in
47      *min_id = min_id_local;      *min_id = min_id_local;
48      *max_id = max_id_local;      *max_id = max_id_local;
49  #endif  #endif
50      if (*max_id < *min_id)      if (*max_id < *min_id) {
51      {          *max_id = 0;
52      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
53      }      }
54  }  }
55    
# Line 61  void Dudley_NodeFile_setIdRange(index_t Line 57  void Dudley_NodeFile_setIdRange(index_t
57  {  {
58      *min_id = Dudley_Util_getMinInt(1, in->numNodes, in->Id);      *min_id = Dudley_Util_getMinInt(1, in->numNodes, in->Id);
59      *max_id = Dudley_Util_getMaxInt(1, in->numNodes, in->Id);      *max_id = Dudley_Util_getMaxInt(1, in->numNodes, in->Id);
60      if (*max_id < *min_id)      if (*max_id < *min_id) {
61      {          *max_id = 0;
62      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
63      }      }
64  }  }
65    
# Line 88  void Dudley_NodeFile_setGlobalDOFRange(i Line 83  void Dudley_NodeFile_setGlobalDOFRange(i
83      *min_id = min_id_local;      *min_id = min_id_local;
84      *max_id = max_id_local;      *max_id = max_id_local;
85  #endif  #endif
86      if (*max_id < *min_id)      if (*max_id < *min_id) {
87      {          *max_id = 0;
88      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
89      }      }
90  }  }
91    
# Line 99  void Dudley_NodeFile_setDOFRange(index_t Line 93  void Dudley_NodeFile_setDOFRange(index_t
93  {  {
94      *min_id = Dudley_Util_getMinInt(1, in->numNodes, in->globalDegreesOfFreedom);      *min_id = Dudley_Util_getMinInt(1, in->numNodes, in->globalDegreesOfFreedom);
95      *max_id = Dudley_Util_getMaxInt(1, in->numNodes, in->globalDegreesOfFreedom);      *max_id = Dudley_Util_getMaxInt(1, in->numNodes, in->globalDegreesOfFreedom);
96      if (*max_id < *min_id)      if (*max_id < *min_id) {
97      {          *max_id = 0;
98      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
99      }      }
100  }  }
101    
# Line 110  void Dudley_NodeFile_setReducedDOFRange( Line 103  void Dudley_NodeFile_setReducedDOFRange(
103  {  {
104      *min_id = Dudley_Util_getFlaggedMinInt(1, in->numNodes, in->globalReducedDOFIndex, -1);      *min_id = Dudley_Util_getFlaggedMinInt(1, in->numNodes, in->globalReducedDOFIndex, -1);
105      *max_id = Dudley_Util_getFlaggedMaxInt(1, in->numNodes, in->globalReducedDOFIndex, -1);      *max_id = Dudley_Util_getFlaggedMaxInt(1, in->numNodes, in->globalReducedDOFIndex, -1);
106      if (*max_id < *min_id)      if (*max_id < *min_id) {
107      {          *max_id = 0;
108      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
109      }      }
110  }  }
111    
# Line 151  void Dudley_NodeFile_setGlobalReducedDeg Line 143  void Dudley_NodeFile_setGlobalReducedDeg
143      *min_id = min_id_local;      *min_id = min_id_local;
144      *max_id = max_id_local;      *max_id = max_id_local;
145  #endif  #endif
146      if (*max_id < *min_id)      if (*max_id < *min_id) {
147      {          *max_id = 0;
148      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
149      }      }
150  }  }
151    
# Line 185  void Dudley_NodeFile_setGlobalNodeIDInde Line 176  void Dudley_NodeFile_setGlobalNodeIDInde
176      *min_id = min_id_local;      *min_id = min_id_local;
177      *max_id = max_id_local;      *max_id = max_id_local;
178  #endif  #endif
179      if (*max_id < *min_id)      if (*max_id < *min_id) {
180      {          *max_id = 0;
181      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
182      }      }
183  }  }
184    
# Line 219  void Dudley_NodeFile_setGlobalReducedNod Line 209  void Dudley_NodeFile_setGlobalReducedNod
209      *min_id = min_id_local;      *min_id = min_id_local;
210      *max_id = max_id_local;      *max_id = max_id_local;
211  #endif  #endif
212      if (*max_id < *min_id)      if (*max_id < *min_id) {
213      {          *max_id = 0;
214      *max_id = 0;          *min_id = -1;
     *min_id = -1;  
215      }      }
216  }  }
217    
218    } // namespace dudley
219    

Legend:
Removed from v.6008  
changed lines
  Added in v.6009

  ViewVC Help
Powered by ViewVC 1.1.26