fortran.c
Go to the documentation of this file.
1 /*
2  * Copyright 1997, Regents of the University of Minnesota
3  *
4  * fortran.c
5  *
6  * This file contains code for the fortran to C interface
7  *
8  * Started 8/19/97
9  * George
10  *
11  */
12 
13 #include "metislib.h"
14 
15 
16 /*************************************************************************/
18 /*************************************************************************/
20 {
21  idx_t i;
22 
23  for (i=0; i<=nvtxs; i++)
24  xadj[i]--;
25 
26  for (i=0; i<xadj[nvtxs]; i++)
27  adjncy[i]--;
28 }
29 
30 
31 /*************************************************************************/
33 /*************************************************************************/
35 {
36  idx_t i;
37 
38  for (i=0; i<nvtxs; i++)
39  vector[i]++;
40 
41  for (i=0; i<xadj[nvtxs]; i++)
42  adjncy[i]++;
43 
44  for (i=0; i<=nvtxs; i++)
45  xadj[i]++;
46 }
47 
48 /*************************************************************************/
50 /*************************************************************************/
52 {
53  idx_t i, nedges;
54 
55  nedges = xadj[nvtxs];
56  for (i=0; i<nedges; i++)
57  adjncy[i]++;
58 
59  for (i=0; i<=nvtxs; i++)
60  xadj[i]++;
61 }
62 
63 
64 
65 /*************************************************************************/
67 /*************************************************************************/
69  idx_t *v1, idx_t *v2)
70 {
71  idx_t i, nedges;
72 
73  for (i=0; i<nvtxs; i++) {
74  v1[i]++;
75  v2[i]++;
76  }
77 
78  nedges = xadj[nvtxs];
79  for (i=0; i<nedges; i++)
80  adjncy[i]++;
81 
82  for (i=0; i<=nvtxs; i++)
83  xadj[i]++;
84 
85 }
86 
87 
88 
89 /*************************************************************************/
91 /*************************************************************************/
93 {
94  idx_t i;
95 
96  for (i=0; i<=n; i++)
97  ptr[i]--;
98  for (i=0; i<ptr[n]; i++)
99  ind[i]--;
100 }
101 
102 
103 /*************************************************************************/
105 /*************************************************************************/
107  idx_t *xadj, idx_t *adjncy)
108 {
109  idx_t i;
110 
111  for (i=0; i<ptr[n]; i++)
112  ind[i]++;
113  for (i=0; i<=n; i++)
114  ptr[i]++;
115 
116  for (i=0; i<xadj[nvtxs]; i++)
117  adjncy[i]++;
118  for (i=0; i<=nvtxs; i++)
119  xadj[i]++;
120 }
121 
122 
123 /*************************************************************************/
125 /*************************************************************************/
127  idx_t *epart, idx_t *npart)
128 {
129  idx_t i;
130 
131  for (i=0; i<ptr[ne]; i++)
132  ind[i]++;
133  for (i=0; i<=ne; i++)
134  ptr[i]++;
135 
136  for (i=0; i<ne; i++)
137  epart[i]++;
138 
139  for (i=0; i<nn; i++)
140  npart[i]++;
141 }
142 
Vector v2
Vector v1
idx_t idx_t * xadj
int n
idx_t idx_t idx_t idx_t idx_t idx_t real_t idx_t idx_t idx_t * epart
void Change2FNumbering2(idx_t nvtxs, idx_t *xadj, idx_t *adjncy)
Definition: fortran.c:51
void Change2FNumbering(idx_t nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vector)
Definition: fortran.c:34
void ChangeMesh2FNumbering2(idx_t ne, idx_t nn, idx_t *ptr, idx_t *ind, idx_t *epart, idx_t *npart)
Definition: fortran.c:126
void Change2FNumberingOrder(idx_t nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *v1, idx_t *v2)
Definition: fortran.c:68
void ChangeMesh2FNumbering(idx_t n, idx_t *ptr, idx_t *ind, idx_t nvtxs, idx_t *xadj, idx_t *adjncy)
Definition: fortran.c:106
float * ptr
int32_t idx_t
idx_t idx_t idx_t idx_t idx_t idx_t real_t idx_t idx_t idx_t idx_t * npart
void ChangeMesh2CNumbering(idx_t n, idx_t *ptr, idx_t *ind)
Definition: fortran.c:92
idx_t * nn
idx_t idx_t idx_t * adjncy
void Change2CNumbering(idx_t nvtxs, idx_t *xadj, idx_t *adjncy)
Definition: fortran.c:19


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:04