mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add comment.
This commit is contained in:
parent
2648e559d3
commit
ceb2e48422
5
dfs.c
5
dfs.c
@ -10,6 +10,9 @@
|
|||||||
====================================================================*/
|
====================================================================*/
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Assign color (nonnegative number) to each connected component of graph
|
||||||
|
*/
|
||||||
void dfs (int size, int *ia, int *ja, int *ncolors, int *color, int* work)
|
void dfs (int size, int *ia, int *ja, int *ncolors, int *color, int* work)
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
@ -20,7 +23,7 @@ void dfs (int size, int *ia, int *ja, int *ncolors, int *color, int* work)
|
|||||||
*ncolors = 0; /* colors are nonnegative */
|
*ncolors = 0; /* colors are nonnegative */
|
||||||
|
|
||||||
for (i=0; i<size; ++i) {
|
for (i=0; i<size; ++i) {
|
||||||
color [i] = -(ia[i+1]-ia[i]+1);
|
color [i] = -(ia[i+1]-ia[i]+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Push seeds on stack */
|
/* Push seeds on stack */
|
||||||
|
Loading…
Reference in New Issue
Block a user