~ubuntu-branches/debian/squeeze/gmsh/squeeze

« back to all changes in this revision

Viewing changes to contrib/Chaco/refine_map/find_edge_cube.c

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2009-01-07 16:02:08 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090107160208-vklhtj69br5yw5bh
Tags: 2.2.6.dfsg-2
* debian/control: fixed lintian warning "debhelper-but-no-misc-depends"
* debian/watch: fixed lintian warning
  "debian-watch-file-should-mangle-version"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This software was developed by Bruce Hendrickson and Robert Leland   *
 
2
 * at Sandia National Laboratories under US Department of Energy        *
 
3
 * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
 
4
 
 
5
#include        <stdio.h>
 
6
#include        "defs.h"
 
7
#include        "refine_map.h"
 
8
 
 
9
 
 
10
struct refine_edata *find_edge_cube(node, dim, edata, nsets_tot)
 
11
int       node;                 /* processor node */
 
12
int       dim;                  /* direction of edge from node */
 
13
struct refine_edata *edata;     /* data structure for edge preferences */
 
14
int       nsets_tot;            /* total number of processors */
 
15
{
 
16
    struct refine_edata *eguy;  /* returned pointer to edge info */
 
17
    int       index;            /* computed index into edata */
 
18
 
 
19
    /* Squeeze out bit dim from node number. */
 
20
    index = node ^ ((node >> dim) << dim);
 
21
    index ^= ((node >> (dim+1)) << dim);
 
22
    index += dim* nsets_tot/2;
 
23
 
 
24
    eguy = &(edata[index]);
 
25
 
 
26
    return(eguy);
 
27
}