Debian Codegraph @

packages/seacas/libraries/chaco/assign/merge_assign.c

raw
1 /*
2 * Copyright(C) 1999-2020 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * See packages/seacas/LICENSE for details
7 */
8
9 /* Combine the old assignment value with the new partition. */
10 void merge_assignments(int *assignment, /* assignment list for graph */
11 int *subassign, /* subgraph assignment list */
12 int *subsets, /* mapping from local to global sets */
13 int subnvtxs, /* number of vtxs in subgraph */
14 int *loc2glob /* subgraph -> graph numbering map */
15 )
16 {
17 int i; /* loop counter */
18
19 for (i = 1; i <= subnvtxs; i++) {
20 assignment[loc2glob[i]] = subsets[subassign[i]];
21 }
22 }