Ice Sheet System Model
4.18
Code documentation
src
c
modules
ContourToMeshx
ContourToMeshxt.cpp
Go to the documentation of this file.
1
5
#ifdef HAVE_CONFIG_H
6
#include <config.h>
7
#else
8
#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
9
#endif
10
11
#include "
./ContourToMeshx.h
"
12
13
void
*
ContourToMeshxt
(
void
* vpthread_handle){
14
15
/*gate variables :*/
16
ContourToMeshxThreadStruct
*gate = NULL;
17
pthread_handle
*handle = NULL;
18
int
i,i1,i0;
19
20
/*recover handle and gate: */
21
handle = (
pthread_handle
*)vpthread_handle;
22
gate = (
ContourToMeshxThreadStruct
*)handle->
gate
;
23
int
my_thread = handle->
id
;
24
int
num_threads = handle->
num
;
25
26
/*recover parameters :*/
27
Contours
* contours = gate->
contours
;
28
int
nods = gate->
nods
;
29
int
edgevalue = gate->
edgevalue
;
30
double
*in_nod = gate->
in_nod
;
31
double
*x = gate->
x
;
32
double
*y = gate->
y
;
33
34
/*distribute indices across threads :*/
35
PartitionRange
(&i0,&i1,nods,num_threads,my_thread);
36
37
/*Loop through all contours: */
38
for
(i=0;i<contours->Size();i++){
39
Contour<double>
* contour=(
Contour<double>
*)contours->GetObjectByOffset(i);
40
IsInPoly
(in_nod,contour->
x
,contour->
y
,contour->
nods
,x,y,i0,i1,edgevalue);
41
}
42
43
return
NULL;
44
}
pthread_handle::id
int id
Definition:
issm_threads.h:12
ContourToMeshxThreadStruct::contours
Contours * contours
Definition:
ContourToMeshx.h:14
pthread_handle::num
int num
Definition:
issm_threads.h:13
Contours
Declaration of Contours class.
Definition:
Contours.h:10
ContourToMeshx.h
Contour
Definition:
Contour.h:15
ContourToMeshxThreadStruct
Definition:
ContourToMeshx.h:12
pthread_handle
Definition:
issm_threads.h:10
ContourToMeshxThreadStruct::edgevalue
int edgevalue
Definition:
ContourToMeshx.h:16
ContourToMeshxThreadStruct::nods
int nods
Definition:
ContourToMeshx.h:15
PartitionRange
void PartitionRange(int *pi0, int *pi1, int num_el, int num_threads, int my_thread)
Definition:
PartitionRange.cpp:13
ContourToMeshxt
void * ContourToMeshxt(void *vpthread_handle)
Definition:
ContourToMeshxt.cpp:13
Contour::nods
int nods
Definition:
Contour.h:20
ContourToMeshxThreadStruct::x
double * x
Definition:
ContourToMeshx.h:18
ContourToMeshxThreadStruct::y
double * y
Definition:
ContourToMeshx.h:19
Contour::y
doubletype * y
Definition:
Contour.h:22
Contour::x
doubletype * x
Definition:
Contour.h:21
pthread_handle::gate
void * gate
Definition:
issm_threads.h:11
ContourToMeshxThreadStruct::in_nod
double * in_nod
Definition:
ContourToMeshx.h:17
IsInPoly
int IsInPoly(doubletype *in, double *xc, double *yc, int numvertices, double *x, double *y, int i0, int i1, int edgevalue)
Definition:
exp.h:17
Generated on Thu Jul 2 2020 08:09:19 for Ice Sheet System Model by
1.8.19