Ice Sheet System Model  4.18
Code documentation
ExpToLevelSetx.cpp
Go to the documentation of this file.
1 
4 #ifdef HAVE_CONFIG_H
5  #include <config.h>
6 #else
7 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
8 #endif
9 
10 #include "./ExpToLevelSetx.h"
11 
12 int ExpToLevelSetx(double** pdistance,double* x, double* y, int nods, Contours* contours){
13 
14  /*output: */
15  double* distance = xNew<double>(nods);
16  for(int i=0;i<nods;i++) distance[i]=1e50;
17 
18  /*initialize thread parameters: */
20  gate.contours = contours;
21  gate.nods = nods;
22  gate.distance = distance;
23  gate.x = x;
24  gate.y = y;
25 
26  /*launch the thread manager with ExpToLevelSetxt as a core: */
27  LaunchThread(ExpToLevelSetxt,(void*)&gate,_NUMTHREADS_);
28 
29  /*Assign output pointers: */
30  *pdistance=distance;
31 
32  return 1;
33 }
ExpToLevelSetx.h
LaunchThread
void LaunchThread(void *function(void *), void *gate, int num_threads)
Definition: LaunchThread.cpp:25
Contours
Declaration of Contours class.
Definition: Contours.h:10
ExpToLevelSetxThreadStruct
Definition: ExpToLevelSetx.h:12
ExpToLevelSetxThreadStruct::x
double * x
Definition: ExpToLevelSetx.h:17
ExpToLevelSetxThreadStruct::distance
double * distance
Definition: ExpToLevelSetx.h:16
ExpToLevelSetxThreadStruct::contours
Contours * contours
Definition: ExpToLevelSetx.h:14
ExpToLevelSetxThreadStruct::y
double * y
Definition: ExpToLevelSetx.h:18
ExpToLevelSetxThreadStruct::nods
int nods
Definition: ExpToLevelSetx.h:15
ExpToLevelSetxt
void * ExpToLevelSetxt(void *vExpToLevelSetxThreadStruct)
Definition: ExpToLevelSetxt.cpp:16
ExpToLevelSetx
int ExpToLevelSetx(double **pdistance, double *x, double *y, int nods, Contours *contours)
Definition: ExpToLevelSetx.cpp:12