202 |
|
input_orient*invec[2]) { |
203 |
|
for (miga[0] = rbf->ejl; miga[0] != NULL; |
204 |
|
miga[0] = nextedge(rbf,miga[0])) |
205 |
< |
if (opp_rbf(rbf,miga[0]) == rbf->next) |
205 |
> |
if (opp_rbf(rbf,miga[0]) == rbf->next) { |
206 |
> |
double nf = 1.-rbf->invec[2]*rbf->invec[2]; |
207 |
> |
if (nf > FTINY) { |
208 |
> |
nf = sqrt((1.-invec[2]*invec[2])/nf); |
209 |
> |
invec[0] = nf*rbf->invec[0]; |
210 |
> |
invec[1] = nf*rbf->invec[1]; |
211 |
> |
} |
212 |
|
return(0); |
213 |
+ |
} |
214 |
|
break; |
215 |
|
} |
216 |
|
} |
254 |
|
double t, full_dist; |
255 |
|
/* get relative position */ |
256 |
|
t = acos(DOT(invec, mig->rbfv[0]->invec)); |
257 |
< |
if (t < M_PI/GRIDRES) { /* near first DSF */ |
257 |
> |
if (t < M_PI/grid_res) { /* near first DSF */ |
258 |
|
n = sizeof(RBFNODE) + sizeof(RBFVAL)*(mig->rbfv[0]->nrbf-1); |
259 |
|
rbf = (RBFNODE *)malloc(n); |
260 |
|
if (rbf == NULL) |
263 |
|
return(rbf); |
264 |
|
} |
265 |
|
full_dist = acos(DOT(mig->rbfv[0]->invec, mig->rbfv[1]->invec)); |
266 |
< |
if (t > full_dist-M_PI/GRIDRES) { /* near second DSF */ |
266 |
> |
if (t > full_dist-M_PI/grid_res) { /* near second DSF */ |
267 |
|
n = sizeof(RBFNODE) + sizeof(RBFVAL)*(mig->rbfv[1]->nrbf-1); |
268 |
|
rbf = (RBFNODE *)malloc(n); |
269 |
|
if (rbf == NULL) |
339 |
|
return(NULL); |
340 |
|
if (miga[1] == NULL) { /* advect along edge? */ |
341 |
|
rbf = e_advect_rbf(miga[0], sivec); |
342 |
< |
rev_rbf_symmetry(rbf, sym); |
342 |
> |
if (single_plane_incident) |
343 |
> |
rotate_rbf(rbf, invec); |
344 |
> |
else |
345 |
> |
rev_rbf_symmetry(rbf, sym); |
346 |
|
return(rbf); |
347 |
|
} |
348 |
|
#ifdef DEBUG |