1207{
1208 typedef typename Data_T::BaseType T;
1209
1211
1212
1213
1214
1215
1217
1218
1219
1221 std::max(0.5,
vsP.y),
1222 std::max(0.5,
vsP.z));
1226
1227
1229 static_cast<int>(
floor(
p.y)),
1230 static_cast<int>(
floor(
p.z)));
1231
1233
1234 {
1235
1237 im = std::max(dataWindow.min.x, std::min(
c.x, dataWindow.max.x + 1));
1238 jm = std::max(dataWindow.min.y, std::min(
c.y, dataWindow.max.y));
1239 km = std::max(dataWindow.min.z, std::min(
c.z, dataWindow.max.z));
1241 im_1 = std::max(dataWindow.min.x, std::min(
im - 1, dataWindow.max.x + 1));
1242 jm_1 = std::max(dataWindow.min.y, std::min(
jm - 1, dataWindow.max.y));
1243 km_1 = std::max(dataWindow.min.z, std::min(
km - 1, dataWindow.max.z));
1245 im1 = std::max(dataWindow.min.x, std::min(
im + 1, dataWindow.max.x + 1));
1246 jm1 = std::max(dataWindow.min.y, std::min(
jm + 1, dataWindow.max.y));
1247 km1 = std::max(dataWindow.min.z, std::min(
km + 1, dataWindow.max.z));
1249 im2 = std::max(dataWindow.min.x, std::min(
im + 2, dataWindow.max.x + 1));
1250 jm2 = std::max(dataWindow.min.y, std::min(
jm + 2, dataWindow.max.y));
1251 km2 = std::max(dataWindow.min.z, std::min(
km + 2, dataWindow.max.z));
1252
1269
1286
1303
1320
1325
1327 }
1328
1329
1330
1331
1333
1334
1335 c.x =
static_cast<int>(
floor(
p.x));
1336 c.y =
static_cast<int>(
floor(
p.y));
1337 c.z =
static_cast<int>(
floor(
p.z));
1338
1340 {
1341
1343 im = std::max(dataWindow.min.x, std::min(
c.x, dataWindow.max.x));
1344 jm = std::max(dataWindow.min.y, std::min(
c.y, dataWindow.max.y + 1));
1345 km = std::max(dataWindow.min.z, std::min(
c.z, dataWindow.max.z));
1347 im_1 = std::max(dataWindow.min.x, std::min(
im - 1, dataWindow.max.x));
1348 jm_1 = std::max(dataWindow.min.y, std::min(
jm - 1, dataWindow.max.y + 1));
1349 km_1 = std::max(dataWindow.min.z, std::min(
km - 1, dataWindow.max.z));
1351 im1 = std::max(dataWindow.min.x, std::min(
im + 1, dataWindow.max.x));
1352 jm1 = std::max(dataWindow.min.y, std::min(
jm + 1, dataWindow.max.y + 1));
1353 km1 = std::max(dataWindow.min.z, std::min(
km + 1, dataWindow.max.z));
1355 im2 = std::max(dataWindow.min.x, std::min(
im + 2, dataWindow.max.x));
1356 jm2 = std::max(dataWindow.min.y, std::min(
jm + 2, dataWindow.max.y + 1));
1357 km2 = std::max(dataWindow.min.z, std::min(
km + 2, dataWindow.max.z));
1358
1375
1392
1409
1426
1431
1433 }
1434
1435
1436
1438
1439
1440 c.x =
static_cast<int>(
floor(
p.x));
1441 c.y =
static_cast<int>(
floor(
p.y));
1442 c.z =
static_cast<int>(
floor(
p.z));
1443
1445 {
1446
1448 im = std::max(dataWindow.min.x, std::min(
c.x, dataWindow.max.x));
1449 jm = std::max(dataWindow.min.y, std::min(
c.y, dataWindow.max.y));
1450 km = std::max(dataWindow.min.z, std::min(
c.z, dataWindow.max.z + 1));
1452 im_1 = std::max(dataWindow.min.x, std::min(
im - 1, dataWindow.max.x));
1453 jm_1 = std::max(dataWindow.min.y, std::min(
jm - 1, dataWindow.max.y));
1454 km_1 = std::max(dataWindow.min.z, std::min(
km - 1, dataWindow.max.z + 1));
1456 im1 = std::max(dataWindow.min.x, std::min(
im + 1, dataWindow.max.x));
1457 jm1 = std::max(dataWindow.min.y, std::min(
jm + 1, dataWindow.max.y));
1458 km1 = std::max(dataWindow.min.z, std::min(
km + 1, dataWindow.max.z + 1));
1460 im2 = std::max(dataWindow.min.x, std::min(
im + 2, dataWindow.max.x));
1461 jm2 = std::max(dataWindow.min.y, std::min(
jm + 2, dataWindow.max.y));
1462 km2 = std::max(dataWindow.min.z, std::min(
km + 2, dataWindow.max.z + 1));
1463
1480
1497
1514
1531
1536
1538 }
1539
1541}
Data_T monotonicCubicInterpolant(const Data_T &f1, const Data_T &f2, const Data_T &f3, const Data_T &f4, double t)
Monotonic cubic interpolation References: http://en.wikipedia.org/wiki/Monotone_cubic_interpolation h...
const Box3i & dataWindow() const
Returns the data window. Any coordinate inside this window is safe to pass to value() in the Field su...
const real_t & w(int i, int j, int k) const
Read access to value on w-facing wall.
const real_t & u(int i, int j, int k) const
Read access to value on u-facing wall.
const real_t & v(int i, int j, int k) const
Read access to value on v-facing wall.
FIELD3D_VEC3_T< T > floor(const FIELD3D_VEC3_T< T > &v)
Floor function for Vec3.