165 |
|
double d; |
166 |
|
int p[4]; |
167 |
|
int i, j; |
168 |
– |
|
169 |
– |
if ((x0 == x1) & (y0 == y1)) |
170 |
– |
return(0.); |
168 |
|
/* check radius */ |
169 |
|
p[0] = x0; p[1] = y0; p[2] = x1; p[3] = y1; |
170 |
|
for (i = 4; i--; ) { |
397 |
|
for (newmig = from_rbf->ejl; newmig != NULL; |
398 |
|
newmig = nextedge(from_rbf,newmig)) |
399 |
|
if (newmig->rbfv[1] == to_rbf) |
403 |
– |
{fprintf(stderr, "Edge already exists!\n"); |
400 |
|
return(NULL); |
405 |
– |
} |
401 |
|
/* else allocate */ |
402 |
|
#ifdef DEBUG |
403 |
|
fprintf(stderr, "Building path from (theta,phi) (%.1f,%.1f) ", |
553 |
|
static void |
554 |
|
check_normal_incidence(void) |
555 |
|
{ |
556 |
< |
static const FVECT norm_vec = {.0, .0, 1.}; |
556 |
> |
static FVECT norm_vec = {.0, .0, 1.}; |
557 |
|
const int saved_nprocs = nprocs; |
558 |
|
RBFNODE *near_rbf, *mir_rbf, *rbf; |
559 |
|
double bestd; |
560 |
|
int n; |
561 |
|
|
567 |
– |
|
562 |
|
if (dsf_list == NULL) |
563 |
|
return; /* XXX should be error? */ |
564 |
|
near_rbf = dsf_list; |
608 |
|
nprocs = 1; /* compute migration matrix */ |
609 |
|
if (create_migration(mir_rbf, near_rbf) == NULL) |
610 |
|
exit(1); /* XXX should never happen! */ |
611 |
< |
/* interpolate normal dist. */ |
611 |
> |
norm_vec[2] = input_orient; /* interpolate normal dist. */ |
612 |
|
rbf = e_advect_rbf(mig_list, norm_vec, 2*near_rbf->nrbf); |
613 |
|
nprocs = saved_nprocs; /* final clean-up */ |
614 |
|
free(mir_rbf); |