Ice Sheet System Model
4.18
Code documentation
src
c
modules
PropagateFlagsFromConnectivityx
PropagateFlagsFromConnectivityx.cpp
Go to the documentation of this file.
1
4
#include "
./PropagateFlagsFromConnectivityx.h
"
5
6
#include "../../shared/shared.h"
7
#include "../../toolkits/toolkits.h"
8
9
void
RecursivePropagation
(
double
* pool,
double
* connectivity,
int
index,
double
* flags);
10
11
void
PropagateFlagsFromConnectivityx
(
double
* pool,
double
* connectivity,
int
index,
double
* flags){
12
13
/*Call recursive propagation routine: */
14
RecursivePropagation
(pool, connectivity,index, flags);
15
}
16
17
void
RecursivePropagation
(
double
* pool,
double
* connectivity,
int
index,
double
* flags){
18
19
int
i;
20
int
newel;
21
22
/*if this element (index) belongs to the pool already, skip: */
23
if
(pool[index-1])
return
;
24
25
/*if this element does not belong to the flags set, skip: */
26
if
(flags[index-1]==0)
return
;
27
28
/*put this element (index), which belongs to the flags, into the pool: */
29
pool[index-1]=1;
30
31
/*now, propagate recursively using connectivity of this element: */
32
for
(i=0;i<3;i++){
33
newel=(int)*(connectivity+(index-1)*3+i);
34
RecursivePropagation
(pool, connectivity, newel, flags);
35
}
36
}
PropagateFlagsFromConnectivityx
void PropagateFlagsFromConnectivityx(double *pool, double *connectivity, int index, double *flags)
Definition:
PropagateFlagsFromConnectivityx.cpp:11
RecursivePropagation
void RecursivePropagation(double *pool, double *connectivity, int index, double *flags)
Definition:
PropagateFlagsFromConnectivityx.cpp:17
PropagateFlagsFromConnectivityx.h
Generated on Thu Jul 2 2020 08:09:19 for Ice Sheet System Model by
1.8.19