/[escript]/branches/arrayview_from_1695_trunk/finley/src/NodeFile_gather.c
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/finley/src/NodeFile_gather.c

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

revision 1780 by jfenwick, Mon Aug 11 03:33:40 2008 UTC revision 1781 by jfenwick, Thu Sep 11 05:03:14 2008 UTC
# Line 13  Line 13 
13   *   *
14   *******************************************************/   *******************************************************/
15    
16  /**************************************************************/  /**************************************************************
17     *
18  /*   Finley: Mesh: NodeFile                                   */   *   Finley: Mesh: NodeFile                                  
19     *   gathers the NodeFile out from the NodeFile in using the entries
20  /*   gathers the NodeFile out from the NodeFile in using the entries   *   in index[0:out->numNodes-1] which are between min_index and max_index (exclusive)
21  /*   in index[0:out->numNodes-1] which are between min_index and max_index (exclusive) */   *   the node index[i]
22  /*   the node index[i]   *
23     **************************************************************/
 /**************************************************************/  
24    
25  #include "NodeFile.h"  #include "NodeFile.h"
26    
# Line 35  void Finley_NodeFile_gatherEntries(dim_t Line 34  void Finley_NodeFile_gatherEntries(dim_t
34  {  {
35     dim_t i;     dim_t i;
36     register index_t k;     register index_t k;
37     register const index_t range=max_index-min_index;     const index_t range=max_index-min_index;
38     const  size_t numDim_size=(size_t)numDim*sizeof(double);     const  size_t numDim_size=(size_t)numDim*sizeof(double);
   
39     #pragma omp parallel for private(i,k) schedule(static)     #pragma omp parallel for private(i,k) schedule(static)
40     for (i=0;i<n;i++) {     for (i=0;i<n;i++) {
41        k=index[i]-min_index;        k=index[i]-min_index;
# Line 157  void Finley_NodeFile_gather_global(index Line 155  void Finley_NodeFile_gather_global(index
155              #pragma omp parallel for private(n) schedule(static)              #pragma omp parallel for private(n) schedule(static)
156              for (n=0; n< out->numNodes; ++n) {              for (n=0; n< out->numNodes; ++n) {
157                  if (out->Id[n] == undefined_node ) {                  if (out->Id[n] == undefined_node ) {
158                   sprintf(error_msg,"Finley_NodeFile_gather_global: Node id %d is referenced but is not defined.",out->Id[n]);                   sprintf(error_msg,"Finley_NodeFile_gather_global: Node id %d at position %d is referenced but is not defined.",out->Id[n],n);
159                   Finley_setError(VALUE_ERROR,error_msg);                   Finley_setError(VALUE_ERROR,error_msg);
160                 }                 }
161               }               }

Legend:
Removed from v.1780  
changed lines
  Added in v.1781

  ViewVC Help
Powered by ViewVC 1.1.26