Ice Sheet System Model  4.18
Code documentation
Functions
PropagateFlagsFromConnectivityx.cpp File Reference
#include "./PropagateFlagsFromConnectivityx.h"
#include "../../shared/shared.h"
#include "../../toolkits/toolkits.h"

Go to the source code of this file.

Functions

void RecursivePropagation (double *pool, double *connectivity, int index, double *flags)
 
void PropagateFlagsFromConnectivityx (double *pool, double *connectivity, int index, double *flags)
 

Function Documentation

◆ RecursivePropagation()

void RecursivePropagation ( double *  pool,
double *  connectivity,
int  index,
double *  flags 
)

Definition at line 17 of file PropagateFlagsFromConnectivityx.cpp.

17  {
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 at line 11 of file PropagateFlagsFromConnectivityx.cpp.

11  {
12 
13  /*Call recursive propagation routine: */
14  RecursivePropagation(pool, connectivity,index, flags);
15 }
RecursivePropagation
void RecursivePropagation(double *pool, double *connectivity, int index, double *flags)
Definition: PropagateFlagsFromConnectivityx.cpp:17