6 #ifndef OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED 7 #define OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED 17 #include <simd/Simd.h> 58 case CD_2NDT: ret =
"cd_2ndt";
break;
59 case CD_2ND: ret =
"cd_2nd";
break;
60 case CD_4TH: ret =
"cd_4th";
break;
61 case CD_6TH: ret =
"cd_6th";
break;
62 case FD_1ST: ret =
"fd_1st";
break;
63 case FD_2ND: ret =
"fd_2nd";
break;
64 case FD_3RD: ret =
"fd_3rd";
break;
65 case BD_1ST: ret =
"bd_1st";
break;
66 case BD_2ND: ret =
"bd_2nd";
break;
67 case BD_3RD: ret =
"bd_3rd";
break;
68 case FD_WENO5: ret =
"fd_weno5";
break;
69 case BD_WENO5: ret =
"bd_weno5";
break;
123 case UNKNOWN_DS: ret =
"Unknown DS scheme";
break;
124 case CD_2NDT: ret =
"Twice 2nd-order center difference";
break;
125 case CD_2ND: ret =
"2nd-order center difference";
break;
126 case CD_4TH: ret =
"4th-order center difference";
break;
127 case CD_6TH: ret =
"6th-order center difference";
break;
128 case FD_1ST: ret =
"1st-order forward difference";
break;
129 case FD_2ND: ret =
"2nd-order forward difference";
break;
130 case FD_3RD: ret =
"3rd-order forward difference";
break;
131 case BD_1ST: ret =
"1st-order backward difference";
break;
132 case BD_2ND: ret =
"2nd-order backward difference";
break;
133 case BD_3RD: ret =
"3rd-order backward difference";
break;
134 case FD_WENO5: ret =
"5th-order WENO forward difference";
break;
135 case BD_WENO5: ret =
"5th-order WENO backward difference";
break;
136 case FD_HJWENO5: ret =
"5th-order HJ-WENO forward difference";
break;
137 case BD_HJWENO5: ret =
"5th-order HJ-WENO backward difference";
break;
218 case UNKNOWN_BIAS: ret =
"Unknown biased gradient";
break;
219 case FIRST_BIAS: ret =
"1st-order biased gradient";
break;
220 case SECOND_BIAS: ret =
"2nd-order biased gradient";
break;
221 case THIRD_BIAS: ret =
"3rd-order biased gradient";
break;
222 case WENO5_BIAS: ret =
"5th-order WENO biased gradient";
break;
223 case HJWENO5_BIAS: ret =
"5th-order HJ-WENO biased gradient";
break;
248 case TVD_RK1: ret =
"tvd_rk1";
break;
249 case TVD_RK2: ret =
"tvd_rk2";
break;
250 case TVD_RK3: ret =
"tvd_rk3";
break;
280 case UNKNOWN_TIS: ret =
"Unknown temporal integration";
break;
281 case TVD_RK1: ret =
"Forward Euler";
break;
282 case TVD_RK2: ret =
"2nd-order Runge-Kutta";
break;
283 case TVD_RK3: ret =
"3rd-order Runge-Kutta";
break;
301 template<
typename ValueType>
303 WENO5(
const ValueType& v1,
const ValueType& v2,
const ValueType& v3,
304 const ValueType& v4,
const ValueType& v5,
float scale2 = 0.01f)
306 const double C = 13.0 / 12.0;
311 const double eps = 1.0e-6 *
static_cast<double>(scale2);
317 return static_cast<ValueType
>(
static_cast<ValueType
>(
318 A1*(2.0*v1 - 7.0*v2 + 11.0*v3) +
319 A2*(5.0*v3 - v2 + 2.0*v4) +
320 A3*(2.0*v3 + 5.0*v4 - v5))/(6.0*(A1+A2+A3)));
324 template <
typename Real>
349 template<
typename Real>
353 return GodunovsNormSqrd<Real>(isOutside,
354 gradient_m[0], gradient_p[0],
355 gradient_m[1], gradient_p[1],
356 gradient_m[2], gradient_p[2]);
361 inline simd::Float4 simdMin(
const simd::Float4& a,
const simd::Float4& b) {
362 return simd::Float4(_mm_min_ps(a.base(), b.base()));
364 inline simd::Float4 simdMax(
const simd::Float4& a,
const simd::Float4& b) {
365 return simd::Float4(_mm_max_ps(a.base(), b.base()));
368 inline float simdSum(
const simd::Float4& v);
370 inline simd::Float4
Pow2(
const simd::Float4& v) {
return v * v; }
374 WENO5<simd::Float4>(
const simd::Float4& v1,
const simd::Float4& v2,
const simd::Float4& v3,
375 const simd::Float4& v4,
const simd::Float4& v5,
float scale2)
378 using F4 = simd::Float4;
381 eps(1.0e-6f * scale2),
382 two(2.0), three(3.0), four(4.0), five(5.0), fourth(0.25),
383 A1 = F4(0.1f) /
Pow2(C*
Pow2(v1-two*v2+v3) + fourth*
Pow2(v1-four*v2+three*v3) + eps),
384 A2 = F4(0.6f) /
Pow2(C*
Pow2(v2-two*v3+v4) + fourth*
Pow2(v2-v4) + eps),
385 A3 = F4(0.3f) /
Pow2(C*
Pow2(v3-two*v4+v5) + fourth*
Pow2(three*v3-four*v4+v5) + eps);
386 return (A1 * (two * v1 - F4(7.0) * v2 + F4(11.0) * v3) +
387 A2 * (five * v3 - v2 + two * v4) +
388 A3 * (two * v3 + five * v4 - v5)) / (F4(6.0) * (A1 + A2 + A3));
393 simdSum(
const simd::Float4& v)
396 __m128 temp = _mm_add_ps(v.base(), _mm_movehl_ps(v.base(), v.base()));
398 temp = _mm_add_ss(temp, _mm_shuffle_ps(temp, temp, 1));
399 return _mm_cvtss_f32(temp);
403 GodunovsNormSqrd(
bool isOutside,
const simd::Float4& dP_m,
const simd::Float4& dP_p)
405 const simd::Float4 zero(0.0);
406 simd::Float4 v = isOutside
414 template<DScheme DiffScheme>
418 template<
typename Accessor>
419 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
421 template<
typename Accessor>
422 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
424 template<
typename Accessor>
425 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
428 template<
typename Stencil>
429 static typename Stencil::ValueType inX(
const Stencil& S);
431 template<
typename Stencil>
432 static typename Stencil::ValueType inY(
const Stencil& S);
434 template<
typename Stencil>
435 static typename Stencil::ValueType inZ(
const Stencil& S);
442 template <
typename ValueType>
443 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
448 template<
typename Accessor>
449 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
452 grid.getValue(ijk.
offsetBy(1, 0, 0)),
453 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
456 template<
typename Accessor>
457 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
460 grid.getValue(ijk.
offsetBy(0, 1, 0)),
461 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
464 template<
typename Accessor>
465 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
468 grid.getValue(ijk.
offsetBy(0, 0, 1)),
469 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
473 template<
typename Stencil>
474 static typename Stencil::ValueType
inX(
const Stencil& S)
476 return difference( S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
479 template<
typename Stencil>
480 static typename Stencil::ValueType
inY(
const Stencil& S)
482 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
485 template<
typename Stencil>
486 static typename Stencil::ValueType
inZ(
const Stencil& S)
488 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
497 template <
typename ValueType>
498 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
499 return (xp1 - xm1)*ValueType(0.5);
507 template<
typename Accessor>
508 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
511 grid.getValue(ijk.
offsetBy(1, 0, 0)),
512 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
515 template<
typename Accessor>
516 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
519 grid.getValue(ijk.
offsetBy(0, 1, 0)),
520 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
523 template<
typename Accessor>
524 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
527 grid.getValue(ijk.
offsetBy(0, 0, 1)),
528 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
533 template<
typename Stencil>
534 static typename Stencil::ValueType
inX(
const Stencil& S)
536 return difference(S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
538 template<
typename Stencil>
539 static typename Stencil::ValueType
inY(
const Stencil& S)
541 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
544 template<
typename Stencil>
545 static typename Stencil::ValueType
inZ(
const Stencil& S)
547 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
557 template <
typename ValueType>
558 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
559 const ValueType& xm1,
const ValueType& xm2 ) {
560 return ValueType(2./3.)*(xp1 - xm1) + ValueType(1./12.)*(xm2 - xp2) ;
565 template<
typename Accessor>
566 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
573 template<
typename Accessor>
574 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
578 grid.getValue(ijk.
offsetBy( 0, 2, 0)), grid.getValue(ijk.
offsetBy( 0, 1, 0)),
579 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)) );
582 template<
typename Accessor>
583 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
587 grid.getValue(ijk.
offsetBy( 0, 0, 2)), grid.getValue(ijk.
offsetBy( 0, 0, 1)),
588 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)) );
593 template<
typename Stencil>
594 static typename Stencil::ValueType
inX(
const Stencil& S)
596 return difference( S.template getValue< 2, 0, 0>(),
597 S.template getValue< 1, 0, 0>(),
598 S.template getValue<-1, 0, 0>(),
599 S.template getValue<-2, 0, 0>() );
602 template<
typename Stencil>
603 static typename Stencil::ValueType
inY(
const Stencil& S)
605 return difference( S.template getValue< 0, 2, 0>(),
606 S.template getValue< 0, 1, 0>(),
607 S.template getValue< 0,-1, 0>(),
608 S.template getValue< 0,-2, 0>() );
611 template<
typename Stencil>
612 static typename Stencil::ValueType
inZ(
const Stencil& S)
614 return difference( S.template getValue< 0, 0, 2>(),
615 S.template getValue< 0, 0, 1>(),
616 S.template getValue< 0, 0,-1>(),
617 S.template getValue< 0, 0,-2>() );
626 template <
typename ValueType>
627 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
628 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3 )
630 return ValueType(3./4.)*(xp1 - xm1) - ValueType(0.15)*(xp2 - xm2)
631 + ValueType(1./60.)*(xp3-xm3);
636 template<
typename Accessor>
637 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
645 template<
typename Accessor>
646 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
649 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
650 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk.
offsetBy( 0,-1, 0)),
651 grid.getValue(ijk.
offsetBy( 0,-2, 0)), grid.getValue(ijk.
offsetBy( 0,-3, 0)));
654 template<
typename Accessor>
655 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
658 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
659 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk.
offsetBy( 0, 0,-1)),
660 grid.getValue(ijk.
offsetBy( 0, 0,-2)), grid.getValue(ijk.
offsetBy( 0, 0,-3)));
664 template<
typename Stencil>
665 static typename Stencil::ValueType
inX(
const Stencil& S)
667 return difference(S.template getValue< 3, 0, 0>(),
668 S.template getValue< 2, 0, 0>(),
669 S.template getValue< 1, 0, 0>(),
670 S.template getValue<-1, 0, 0>(),
671 S.template getValue<-2, 0, 0>(),
672 S.template getValue<-3, 0, 0>());
675 template<
typename Stencil>
676 static typename Stencil::ValueType
inY(
const Stencil& S)
679 return difference( S.template getValue< 0, 3, 0>(),
680 S.template getValue< 0, 2, 0>(),
681 S.template getValue< 0, 1, 0>(),
682 S.template getValue< 0,-1, 0>(),
683 S.template getValue< 0,-2, 0>(),
684 S.template getValue< 0,-3, 0>());
687 template<
typename Stencil>
688 static typename Stencil::ValueType
inZ(
const Stencil& S)
691 return difference( S.template getValue< 0, 0, 3>(),
692 S.template getValue< 0, 0, 2>(),
693 S.template getValue< 0, 0, 1>(),
694 S.template getValue< 0, 0,-1>(),
695 S.template getValue< 0, 0,-2>(),
696 S.template getValue< 0, 0,-3>());
706 template <
typename ValueType>
707 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0) {
713 template<
typename Accessor>
714 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
716 return difference(grid.getValue(ijk.
offsetBy(1, 0, 0)), grid.getValue(ijk));
719 template<
typename Accessor>
720 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
722 return difference(grid.getValue(ijk.
offsetBy(0, 1, 0)), grid.getValue(ijk));
725 template<
typename Accessor>
726 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
728 return difference(grid.getValue(ijk.
offsetBy(0, 0, 1)), grid.getValue(ijk));
732 template<
typename Stencil>
733 static typename Stencil::ValueType
inX(
const Stencil& S)
735 return difference(S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>());
738 template<
typename Stencil>
739 static typename Stencil::ValueType
inY(
const Stencil& S)
741 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>());
744 template<
typename Stencil>
745 static typename Stencil::ValueType
inZ(
const Stencil& S)
747 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>());
756 template <
typename ValueType>
757 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0)
759 return ValueType(2)*xp1 -(ValueType(0.5)*xp2 + ValueType(3./2.)*xp0);
764 template<
typename Accessor>
765 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
773 template<
typename Accessor>
774 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
782 template<
typename Accessor>
783 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
793 template<
typename Stencil>
794 static typename Stencil::ValueType
inX(
const Stencil& S)
796 return difference( S.template getValue< 2, 0, 0>(),
797 S.template getValue< 1, 0, 0>(),
798 S.template getValue< 0, 0, 0>() );
801 template<
typename Stencil>
802 static typename Stencil::ValueType
inY(
const Stencil& S)
804 return difference( S.template getValue< 0, 2, 0>(),
805 S.template getValue< 0, 1, 0>(),
806 S.template getValue< 0, 0, 0>() );
809 template<
typename Stencil>
810 static typename Stencil::ValueType
inZ(
const Stencil& S)
812 return difference( S.template getValue< 0, 0, 2>(),
813 S.template getValue< 0, 0, 1>(),
814 S.template getValue< 0, 0, 0>() );
825 template<
typename ValueType>
826 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
827 const ValueType& xp1,
const ValueType& xp0)
829 return static_cast<ValueType
>(xp3/3.0 - 1.5*xp2 + 3.0*xp1 - 11.0*xp0/6.0);
834 template<
typename Accessor>
835 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
837 return difference( grid.getValue(ijk.
offsetBy(3,0,0)),
840 grid.getValue(ijk) );
843 template<
typename Accessor>
844 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
846 return difference( grid.getValue(ijk.
offsetBy(0,3,0)),
849 grid.getValue(ijk) );
852 template<
typename Accessor>
853 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
855 return difference( grid.getValue(ijk.
offsetBy(0,0,3)),
858 grid.getValue(ijk) );
863 template<
typename Stencil>
864 static typename Stencil::ValueType
inX(
const Stencil& S)
866 return difference(S.template getValue< 3, 0, 0>(),
867 S.template getValue< 2, 0, 0>(),
868 S.template getValue< 1, 0, 0>(),
869 S.template getValue< 0, 0, 0>() );
872 template<
typename Stencil>
873 static typename Stencil::ValueType
inY(
const Stencil& S)
875 return difference(S.template getValue< 0, 3, 0>(),
876 S.template getValue< 0, 2, 0>(),
877 S.template getValue< 0, 1, 0>(),
878 S.template getValue< 0, 0, 0>() );
881 template<
typename Stencil>
882 static typename Stencil::ValueType
inZ(
const Stencil& S)
884 return difference( S.template getValue< 0, 0, 3>(),
885 S.template getValue< 0, 0, 2>(),
886 S.template getValue< 0, 0, 1>(),
887 S.template getValue< 0, 0, 0>() );
897 template <
typename ValueType>
898 static ValueType
difference(
const ValueType& xm1,
const ValueType& xm0) {
904 template<
typename Accessor>
905 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
907 return difference(grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk));
910 template<
typename Accessor>
911 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
913 return difference(grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk));
916 template<
typename Accessor>
917 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
919 return difference(grid.getValue(ijk.
offsetBy(0, 0,-1)), grid.getValue(ijk));
924 template<
typename Stencil>
925 static typename Stencil::ValueType
inX(
const Stencil& S)
927 return difference(S.template getValue<-1, 0, 0>(), S.template getValue< 0, 0, 0>());
930 template<
typename Stencil>
931 static typename Stencil::ValueType
inY(
const Stencil& S)
933 return difference(S.template getValue< 0,-1, 0>(), S.template getValue< 0, 0, 0>());
936 template<
typename Stencil>
937 static typename Stencil::ValueType
inZ(
const Stencil& S)
939 return difference(S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0, 0>());
949 template <
typename ValueType>
950 static ValueType
difference(
const ValueType& xm2,
const ValueType& xm1,
const ValueType& xm0)
957 template<
typename Accessor>
958 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
960 return difference( grid.getValue(ijk.
offsetBy(-2,0,0)),
961 grid.getValue(ijk.
offsetBy(-1,0,0)),
962 grid.getValue(ijk) );
965 template<
typename Accessor>
966 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
968 return difference( grid.getValue(ijk.
offsetBy(0,-2,0)),
969 grid.getValue(ijk.
offsetBy(0,-1,0)),
970 grid.getValue(ijk) );
973 template<
typename Accessor>
974 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
976 return difference( grid.getValue(ijk.
offsetBy(0,0,-2)),
977 grid.getValue(ijk.
offsetBy(0,0,-1)),
978 grid.getValue(ijk) );
982 template<
typename Stencil>
983 static typename Stencil::ValueType
inX(
const Stencil& S)
985 return difference( S.template getValue<-2, 0, 0>(),
986 S.template getValue<-1, 0, 0>(),
987 S.template getValue< 0, 0, 0>() );
990 template<
typename Stencil>
991 static typename Stencil::ValueType
inY(
const Stencil& S)
993 return difference( S.template getValue< 0,-2, 0>(),
994 S.template getValue< 0,-1, 0>(),
995 S.template getValue< 0, 0, 0>() );
998 template<
typename Stencil>
999 static typename Stencil::ValueType
inZ(
const Stencil& S)
1001 return difference( S.template getValue< 0, 0,-2>(),
1002 S.template getValue< 0, 0,-1>(),
1003 S.template getValue< 0, 0, 0>() );
1013 template <
typename ValueType>
1014 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
1015 const ValueType& xm1,
const ValueType& xm0)
1021 template<
typename Accessor>
1022 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1024 return difference( grid.getValue(ijk.
offsetBy(-3,0,0)),
1025 grid.getValue(ijk.
offsetBy(-2,0,0)),
1026 grid.getValue(ijk.
offsetBy(-1,0,0)),
1027 grid.getValue(ijk) );
1030 template<
typename Accessor>
1031 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1033 return difference( grid.getValue(ijk.
offsetBy( 0,-3,0)),
1034 grid.getValue(ijk.
offsetBy( 0,-2,0)),
1035 grid.getValue(ijk.
offsetBy( 0,-1,0)),
1036 grid.getValue(ijk) );
1039 template<
typename Accessor>
1040 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1042 return difference( grid.getValue(ijk.
offsetBy( 0, 0,-3)),
1043 grid.getValue(ijk.
offsetBy( 0, 0,-2)),
1044 grid.getValue(ijk.
offsetBy( 0, 0,-1)),
1045 grid.getValue(ijk) );
1049 template<
typename Stencil>
1050 static typename Stencil::ValueType
inX(
const Stencil& S)
1052 return difference( S.template getValue<-3, 0, 0>(),
1053 S.template getValue<-2, 0, 0>(),
1054 S.template getValue<-1, 0, 0>(),
1055 S.template getValue< 0, 0, 0>() );
1058 template<
typename Stencil>
1059 static typename Stencil::ValueType
inY(
const Stencil& S)
1061 return difference( S.template getValue< 0,-3, 0>(),
1062 S.template getValue< 0,-2, 0>(),
1063 S.template getValue< 0,-1, 0>(),
1064 S.template getValue< 0, 0, 0>() );
1067 template<
typename Stencil>
1068 static typename Stencil::ValueType
inZ(
const Stencil& S)
1070 return difference( S.template getValue< 0, 0,-3>(),
1071 S.template getValue< 0, 0,-2>(),
1072 S.template getValue< 0, 0,-1>(),
1073 S.template getValue< 0, 0, 0>() );
1082 template <
typename ValueType>
1083 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1084 const ValueType& xp1,
const ValueType& xp0,
1085 const ValueType& xm1,
const ValueType& xm2) {
1086 return WENO5<ValueType>(xp3, xp2, xp1, xp0, xm1)
1087 - WENO5<ValueType>(xp2, xp1, xp0, xm1, xm2);
1092 template<
typename Accessor>
1093 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1095 using ValueType =
typename Accessor::ValueType;
1097 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1098 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1099 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1100 V[3] = grid.getValue(ijk);
1101 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1102 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1104 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1107 template<
typename Accessor>
1108 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1110 using ValueType =
typename Accessor::ValueType;
1112 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1113 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1114 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1115 V[3] = grid.getValue(ijk);
1116 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1117 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1119 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1122 template<
typename Accessor>
1123 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1125 using ValueType =
typename Accessor::ValueType;
1127 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1128 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1129 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1130 V[3] = grid.getValue(ijk);
1131 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1132 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1134 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1138 template<
typename Stencil>
1139 static typename Stencil::ValueType
inX(
const Stencil& S)
1142 return static_cast<typename Stencil::ValueType
>(difference(
1143 S.template getValue< 3, 0, 0>(),
1144 S.template getValue< 2, 0, 0>(),
1145 S.template getValue< 1, 0, 0>(),
1146 S.template getValue< 0, 0, 0>(),
1147 S.template getValue<-1, 0, 0>(),
1148 S.template getValue<-2, 0, 0>() ));
1152 template<
typename Stencil>
1153 static typename Stencil::ValueType
inY(
const Stencil& S)
1155 return static_cast<typename Stencil::ValueType
>(difference(
1156 S.template getValue< 0, 3, 0>(),
1157 S.template getValue< 0, 2, 0>(),
1158 S.template getValue< 0, 1, 0>(),
1159 S.template getValue< 0, 0, 0>(),
1160 S.template getValue< 0,-1, 0>(),
1161 S.template getValue< 0,-2, 0>() ));
1164 template<
typename Stencil>
1165 static typename Stencil::ValueType
inZ(
const Stencil& S)
1167 return static_cast<typename Stencil::ValueType
>(difference(
1168 S.template getValue< 0, 0, 3>(),
1169 S.template getValue< 0, 0, 2>(),
1170 S.template getValue< 0, 0, 1>(),
1171 S.template getValue< 0, 0, 0>(),
1172 S.template getValue< 0, 0,-1>(),
1173 S.template getValue< 0, 0,-2>() ));
1182 template <
typename ValueType>
1183 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1184 const ValueType& xp1,
const ValueType& xp0,
1185 const ValueType& xm1,
const ValueType& xm2) {
1186 return WENO5<ValueType>(xp3 - xp2, xp2 - xp1, xp1 - xp0, xp0-xm1, xm1-xm2);
1190 template<
typename Accessor>
1191 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1193 using ValueType =
typename Accessor::ValueType;
1195 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1196 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1197 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1198 V[3] = grid.getValue(ijk);
1199 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1200 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1202 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1206 template<
typename Accessor>
1207 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1209 using ValueType =
typename Accessor::ValueType;
1211 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1212 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1213 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1214 V[3] = grid.getValue(ijk);
1215 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1216 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1218 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1221 template<
typename Accessor>
1222 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1224 using ValueType =
typename Accessor::ValueType;
1226 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1227 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1228 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1229 V[3] = grid.getValue(ijk);
1230 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1231 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1233 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1237 template<
typename Stencil>
1238 static typename Stencil::ValueType
inX(
const Stencil& S)
1241 return difference( S.template getValue< 3, 0, 0>(),
1242 S.template getValue< 2, 0, 0>(),
1243 S.template getValue< 1, 0, 0>(),
1244 S.template getValue< 0, 0, 0>(),
1245 S.template getValue<-1, 0, 0>(),
1246 S.template getValue<-2, 0, 0>() );
1250 template<
typename Stencil>
1251 static typename Stencil::ValueType
inY(
const Stencil& S)
1253 return difference( S.template getValue< 0, 3, 0>(),
1254 S.template getValue< 0, 2, 0>(),
1255 S.template getValue< 0, 1, 0>(),
1256 S.template getValue< 0, 0, 0>(),
1257 S.template getValue< 0,-1, 0>(),
1258 S.template getValue< 0,-2, 0>() );
1261 template<
typename Stencil>
1262 static typename Stencil::ValueType
inZ(
const Stencil& S)
1265 return difference( S.template getValue< 0, 0, 3>(),
1266 S.template getValue< 0, 0, 2>(),
1267 S.template getValue< 0, 0, 1>(),
1268 S.template getValue< 0, 0, 0>(),
1269 S.template getValue< 0, 0,-1>(),
1270 S.template getValue< 0, 0,-2>() );
1279 template<
typename ValueType>
1280 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1281 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1288 template<
typename Accessor>
1289 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1291 using ValueType =
typename Accessor::ValueType;
1293 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1294 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1295 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1296 V[3] = grid.getValue(ijk);
1297 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1298 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1300 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1303 template<
typename Accessor>
1304 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1306 using ValueType =
typename Accessor::ValueType;
1308 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1309 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1310 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1311 V[3] = grid.getValue(ijk);
1312 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1313 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1315 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1318 template<
typename Accessor>
1319 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1321 using ValueType =
typename Accessor::ValueType;
1323 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1324 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1325 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1326 V[3] = grid.getValue(ijk);
1327 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1328 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1330 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1334 template<
typename Stencil>
1335 static typename Stencil::ValueType
inX(
const Stencil& S)
1337 using ValueType =
typename Stencil::ValueType;
1339 V[0] = S.template getValue<-3, 0, 0>();
1340 V[1] = S.template getValue<-2, 0, 0>();
1341 V[2] = S.template getValue<-1, 0, 0>();
1342 V[3] = S.template getValue< 0, 0, 0>();
1343 V[4] = S.template getValue< 1, 0, 0>();
1344 V[5] = S.template getValue< 2, 0, 0>();
1346 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1349 template<
typename Stencil>
1350 static typename Stencil::ValueType
inY(
const Stencil& S)
1352 using ValueType =
typename Stencil::ValueType;
1354 V[0] = S.template getValue< 0,-3, 0>();
1355 V[1] = S.template getValue< 0,-2, 0>();
1356 V[2] = S.template getValue< 0,-1, 0>();
1357 V[3] = S.template getValue< 0, 0, 0>();
1358 V[4] = S.template getValue< 0, 1, 0>();
1359 V[5] = S.template getValue< 0, 2, 0>();
1361 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1364 template<
typename Stencil>
1365 static typename Stencil::ValueType
inZ(
const Stencil& S)
1367 using ValueType =
typename Stencil::ValueType;
1369 V[0] = S.template getValue< 0, 0,-3>();
1370 V[1] = S.template getValue< 0, 0,-2>();
1371 V[2] = S.template getValue< 0, 0,-1>();
1372 V[3] = S.template getValue< 0, 0, 0>();
1373 V[4] = S.template getValue< 0, 0, 1>();
1374 V[5] = S.template getValue< 0, 0, 2>();
1376 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1384 template<
typename ValueType>
1385 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1386 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1392 template<
typename Accessor>
1393 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1395 using ValueType =
typename Accessor::ValueType;
1397 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1398 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1399 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1400 V[3] = grid.getValue(ijk);
1401 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1402 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1404 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1407 template<
typename Accessor>
1408 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1410 using ValueType =
typename Accessor::ValueType;
1412 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1413 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1414 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1415 V[3] = grid.getValue(ijk);
1416 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1417 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1419 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1422 template<
typename Accessor>
1423 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1425 using ValueType =
typename Accessor::ValueType;
1427 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1428 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1429 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1430 V[3] = grid.getValue(ijk);
1431 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1432 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1434 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1438 template<
typename Stencil>
1439 static typename Stencil::ValueType
inX(
const Stencil& S)
1441 using ValueType =
typename Stencil::ValueType;
1443 V[0] = S.template getValue<-3, 0, 0>();
1444 V[1] = S.template getValue<-2, 0, 0>();
1445 V[2] = S.template getValue<-1, 0, 0>();
1446 V[3] = S.template getValue< 0, 0, 0>();
1447 V[4] = S.template getValue< 1, 0, 0>();
1448 V[5] = S.template getValue< 2, 0, 0>();
1450 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1453 template<
typename Stencil>
1454 static typename Stencil::ValueType
inY(
const Stencil& S)
1456 using ValueType =
typename Stencil::ValueType;
1458 V[0] = S.template getValue< 0,-3, 0>();
1459 V[1] = S.template getValue< 0,-2, 0>();
1460 V[2] = S.template getValue< 0,-1, 0>();
1461 V[3] = S.template getValue< 0, 0, 0>();
1462 V[4] = S.template getValue< 0, 1, 0>();
1463 V[5] = S.template getValue< 0, 2, 0>();
1465 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1468 template<
typename Stencil>
1469 static typename Stencil::ValueType
inZ(
const Stencil& S)
1471 using ValueType =
typename Stencil::ValueType;
1473 V[0] = S.template getValue< 0, 0,-3>();
1474 V[1] = S.template getValue< 0, 0,-2>();
1475 V[2] = S.template getValue< 0, 0,-1>();
1476 V[3] = S.template getValue< 0, 0, 0>();
1477 V[4] = S.template getValue< 0, 0, 1>();
1478 V[5] = S.template getValue< 0, 0, 2>();
1480 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1485 template<DScheme DiffScheme>
1489 template<
typename Accessor>
1490 static typename Accessor::ValueType::value_type
1496 template<
typename Accessor>
1497 static typename Accessor::ValueType::value_type
1502 template<
typename Accessor>
1503 static typename Accessor::ValueType::value_type
1511 template<
typename Stencil>
1512 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1517 template<
typename Stencil>
1518 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1523 template<
typename Stencil>
1524 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1536 template<
typename Accessor>
1537 static typename Accessor::ValueType::value_type
1541 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1544 template<
typename Accessor>
1545 static typename Accessor::ValueType::value_type
1549 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1552 template<
typename Accessor>
1553 static typename Accessor::ValueType::value_type
1557 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1561 template<
typename Stencil>
1562 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1565 S.template getValue<-1, 0, 0>()[n] );
1568 template<
typename Stencil>
1569 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1572 S.template getValue< 0,-1, 0>()[n] );
1575 template<
typename Stencil>
1576 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1579 S.template getValue< 0, 0,-1>()[n] );
1588 template<
typename Accessor>
1589 static typename Accessor::ValueType::value_type
1593 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1596 template<
typename Accessor>
1597 static typename Accessor::ValueType::value_type
1601 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1604 template<
typename Accessor>
1605 static typename Accessor::ValueType::value_type
1609 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1614 template<
typename Stencil>
1615 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1618 S.template getValue<-1, 0, 0>()[n] );
1621 template<
typename Stencil>
1622 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1625 S.template getValue< 0,-1, 0>()[n] );
1628 template<
typename Stencil>
1629 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1632 S.template getValue< 0, 0,-1>()[n] );
1643 template<
typename Accessor>
1644 static typename Accessor::ValueType::value_type
1648 grid.getValue(ijk.
offsetBy(2, 0, 0))[n], grid.getValue(ijk.
offsetBy( 1, 0, 0))[n],
1649 grid.getValue(ijk.
offsetBy(-1,0, 0))[n], grid.getValue(ijk.
offsetBy(-2, 0, 0))[n]);
1652 template<
typename Accessor>
1653 static typename Accessor::ValueType::value_type
1657 grid.getValue(ijk.
offsetBy( 0, 2, 0))[n], grid.getValue(ijk.
offsetBy( 0, 1, 0))[n],
1658 grid.getValue(ijk.
offsetBy( 0,-1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-2, 0))[n]);
1661 template<
typename Accessor>
1662 static typename Accessor::ValueType::value_type
1666 grid.getValue(ijk.
offsetBy(0,0, 2))[n], grid.getValue(ijk.
offsetBy( 0, 0, 1))[n],
1667 grid.getValue(ijk.
offsetBy(0,0,-1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-2))[n]);
1671 template<
typename Stencil>
1672 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1675 S.template getValue< 2, 0, 0>()[n], S.template getValue< 1, 0, 0>()[n],
1676 S.template getValue<-1, 0, 0>()[n], S.template getValue<-2, 0, 0>()[n] );
1679 template<
typename Stencil>
1680 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1683 S.template getValue< 0, 2, 0>()[n], S.template getValue< 0, 1, 0>()[n],
1684 S.template getValue< 0,-1, 0>()[n], S.template getValue< 0,-2, 0>()[n]);
1687 template<
typename Stencil>
1688 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1691 S.template getValue< 0, 0, 2>()[n], S.template getValue< 0, 0, 1>()[n],
1692 S.template getValue< 0, 0,-1>()[n], S.template getValue< 0, 0,-2>()[n]);
1703 template<
typename Accessor>
1704 static typename Accessor::ValueType::value_type
1708 grid.getValue(ijk.
offsetBy( 3, 0, 0))[n], grid.getValue(ijk.
offsetBy( 2, 0, 0))[n],
1709 grid.getValue(ijk.
offsetBy( 1, 0, 0))[n], grid.getValue(ijk.
offsetBy(-1, 0, 0))[n],
1710 grid.getValue(ijk.
offsetBy(-2, 0, 0))[n], grid.getValue(ijk.
offsetBy(-3, 0, 0))[n] );
1713 template<
typename Accessor>
1714 static typename Accessor::ValueType::value_type
1718 grid.getValue(ijk.
offsetBy( 0, 3, 0))[n], grid.getValue(ijk.
offsetBy( 0, 2, 0))[n],
1719 grid.getValue(ijk.
offsetBy( 0, 1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-1, 0))[n],
1720 grid.getValue(ijk.
offsetBy( 0,-2, 0))[n], grid.getValue(ijk.
offsetBy( 0,-3, 0))[n] );
1723 template<
typename Accessor>
1724 static typename Accessor::ValueType::value_type
1728 grid.getValue(ijk.
offsetBy( 0, 0, 3))[n], grid.getValue(ijk.
offsetBy( 0, 0, 2))[n],
1729 grid.getValue(ijk.
offsetBy( 0, 0, 1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-1))[n],
1730 grid.getValue(ijk.
offsetBy( 0, 0,-2))[n], grid.getValue(ijk.
offsetBy( 0, 0,-3))[n] );
1735 template<
typename Stencil>
1736 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1739 S.template getValue< 3, 0, 0>()[n], S.template getValue< 2, 0, 0>()[n],
1740 S.template getValue< 1, 0, 0>()[n], S.template getValue<-1, 0, 0>()[n],
1741 S.template getValue<-2, 0, 0>()[n], S.template getValue<-3, 0, 0>()[n] );
1744 template<
typename Stencil>
1745 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1748 S.template getValue< 0, 3, 0>()[n], S.template getValue< 0, 2, 0>()[n],
1749 S.template getValue< 0, 1, 0>()[n], S.template getValue< 0,-1, 0>()[n],
1750 S.template getValue< 0,-2, 0>()[n], S.template getValue< 0,-3, 0>()[n] );
1753 template<
typename Stencil>
1754 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1757 S.template getValue< 0, 0, 3>()[n], S.template getValue< 0, 0, 2>()[n],
1758 S.template getValue< 0, 0, 1>()[n], S.template getValue< 0, 0,-1>()[n],
1759 S.template getValue< 0, 0,-2>()[n], S.template getValue< 0, 0,-3>()[n] );
1763 template<DDScheme DiffScheme>
1767 template<
typename Accessor>
1768 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
1769 template<
typename Accessor>
1770 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
1771 template<
typename Accessor>
1772 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
1775 template<
typename Accessor>
1776 static typename Accessor::ValueType inXandY(
const Accessor& grid,
const Coord& ijk);
1778 template<
typename Accessor>
1779 static typename Accessor::ValueType inXandZ(
const Accessor& grid,
const Coord& ijk);
1781 template<
typename Accessor>
1782 static typename Accessor::ValueType inYandZ(
const Accessor& grid,
const Coord& ijk);
1786 template<
typename Stencil>
1787 static typename Stencil::ValueType inX(
const Stencil& S);
1788 template<
typename Stencil>
1789 static typename Stencil::ValueType inY(
const Stencil& S);
1790 template<
typename Stencil>
1791 static typename Stencil::ValueType inZ(
const Stencil& S);
1794 template<
typename Stencil>
1795 static typename Stencil::ValueType inXandY(
const Stencil& S);
1797 template<
typename Stencil>
1798 static typename Stencil::ValueType inXandZ(
const Stencil& S);
1800 template<
typename Stencil>
1801 static typename Stencil::ValueType inYandZ(
const Stencil& S);
1809 template <
typename ValueType>
1810 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0,
const ValueType& xm1)
1812 return xp1 + xm1 - ValueType(2)*xp0;
1815 template <
typename ValueType>
1817 const ValueType& xmyp,
const ValueType& xmym)
1819 return ValueType(0.25)*(xpyp + xmym - xpym - xmyp);
1823 template<
typename Accessor>
1824 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1826 return difference( grid.getValue(ijk.
offsetBy( 1,0,0)), grid.getValue(ijk),
1827 grid.getValue(ijk.
offsetBy(-1,0,0)) );
1830 template<
typename Accessor>
1831 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1834 return difference( grid.getValue(ijk.
offsetBy(0, 1,0)), grid.getValue(ijk),
1835 grid.getValue(ijk.
offsetBy(0,-1,0)) );
1838 template<
typename Accessor>
1839 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1841 return difference( grid.getValue(ijk.
offsetBy( 0,0, 1)), grid.getValue(ijk),
1842 grid.getValue(ijk.
offsetBy( 0,0,-1)) );
1846 template<
typename Accessor>
1847 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1849 return crossdifference(
1851 grid.getValue(ijk.
offsetBy(-1,1,0)), grid.getValue(ijk.
offsetBy(-1,-1,0)));
1855 template<
typename Accessor>
1856 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1858 return crossdifference(
1860 grid.getValue(ijk.
offsetBy(-1,0,1)), grid.getValue(ijk.
offsetBy(-1,0,-1)) );
1863 template<
typename Accessor>
1864 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
1866 return crossdifference(
1868 grid.getValue(ijk.
offsetBy(0,-1,1)), grid.getValue(ijk.
offsetBy(0,-1,-1)) );
1873 template<
typename Stencil>
1874 static typename Stencil::ValueType
inX(
const Stencil& S)
1876 return difference( S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
1877 S.template getValue<-1, 0, 0>() );
1880 template<
typename Stencil>
1881 static typename Stencil::ValueType
inY(
const Stencil& S)
1883 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
1884 S.template getValue< 0,-1, 0>() );
1887 template<
typename Stencil>
1888 static typename Stencil::ValueType
inZ(
const Stencil& S)
1890 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
1891 S.template getValue< 0, 0,-1>() );
1895 template<
typename Stencil>
1896 static typename Stencil::ValueType
inXandY(
const Stencil& S)
1898 return crossdifference(S.template getValue< 1, 1, 0>(), S.template getValue< 1,-1, 0>(),
1899 S.template getValue<-1, 1, 0>(), S.template getValue<-1,-1, 0>() );
1902 template<
typename Stencil>
1903 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
1905 return crossdifference(S.template getValue< 1, 0, 1>(), S.template getValue< 1, 0,-1>(),
1906 S.template getValue<-1, 0, 1>(), S.template getValue<-1, 0,-1>() );
1909 template<
typename Stencil>
1910 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
1912 return crossdifference(S.template getValue< 0, 1, 1>(), S.template getValue< 0, 1,-1>(),
1913 S.template getValue< 0,-1, 1>(), S.template getValue< 0,-1,-1>() );
1923 template <
typename ValueType>
1924 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0,
1925 const ValueType& xm1,
const ValueType& xm2) {
1926 return ValueType(-1./12.)*(xp2 + xm2) + ValueType(4./3.)*(xp1 + xm1) -ValueType(2.5)*xp0;
1929 template <
typename ValueType>
1931 const ValueType& xp2ym1,
const ValueType& xp2ym2,
1932 const ValueType& xp1yp2,
const ValueType& xp1yp1,
1933 const ValueType& xp1ym1,
const ValueType& xp1ym2,
1934 const ValueType& xm2yp2,
const ValueType& xm2yp1,
1935 const ValueType& xm2ym1,
const ValueType& xm2ym2,
1936 const ValueType& xm1yp2,
const ValueType& xm1yp1,
1937 const ValueType& xm1ym1,
const ValueType& xm1ym2 ) {
1939 ValueType(2./3.0)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1)-
1940 ValueType(1./12.)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1);
1942 ValueType(2./3.0)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2)-
1943 ValueType(1./12.)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2);
1945 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1951 template<
typename Accessor>
1952 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1957 grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)));
1960 template<
typename Accessor>
1961 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1966 grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk.
offsetBy(0,-2, 0)));
1969 template<
typename Accessor>
1970 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1979 template<
typename Accessor>
1980 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1982 using ValueType =
typename Accessor::ValueType;
1983 typename Accessor::ValueType tmp1 =
1986 typename Accessor::ValueType tmp2 =
1989 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1992 template<
typename Accessor>
1993 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1995 using ValueType =
typename Accessor::ValueType;
1996 typename Accessor::ValueType tmp1 =
1999 typename Accessor::ValueType tmp2 =
2002 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2005 template<
typename Accessor>
2006 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2008 using ValueType =
typename Accessor::ValueType;
2009 typename Accessor::ValueType tmp1 =
2012 typename Accessor::ValueType tmp2 =
2015 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2020 template<
typename Stencil>
2021 static typename Stencil::ValueType
inX(
const Stencil& S)
2023 return difference(S.template getValue< 2, 0, 0>(), S.template getValue< 1, 0, 0>(),
2024 S.template getValue< 0, 0, 0>(),
2025 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>() );
2028 template<
typename Stencil>
2029 static typename Stencil::ValueType
inY(
const Stencil& S)
2031 return difference(S.template getValue< 0, 2, 0>(), S.template getValue< 0, 1, 0>(),
2032 S.template getValue< 0, 0, 0>(),
2033 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>() );
2036 template<
typename Stencil>
2037 static typename Stencil::ValueType
inZ(
const Stencil& S)
2039 return difference(S.template getValue< 0, 0, 2>(), S.template getValue< 0, 0, 1>(),
2040 S.template getValue< 0, 0, 0>(),
2041 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>() );
2045 template<
typename Stencil>
2046 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2048 return crossdifference(
2049 S.template getValue< 2, 2, 0>(), S.template getValue< 2, 1, 0>(),
2050 S.template getValue< 2,-1, 0>(), S.template getValue< 2,-2, 0>(),
2051 S.template getValue< 1, 2, 0>(), S.template getValue< 1, 1, 0>(),
2052 S.template getValue< 1,-1, 0>(), S.template getValue< 1,-2, 0>(),
2053 S.template getValue<-2, 2, 0>(), S.template getValue<-2, 1, 0>(),
2054 S.template getValue<-2,-1, 0>(), S.template getValue<-2,-2, 0>(),
2055 S.template getValue<-1, 2, 0>(), S.template getValue<-1, 1, 0>(),
2056 S.template getValue<-1,-1, 0>(), S.template getValue<-1,-2, 0>() );
2059 template<
typename Stencil>
2060 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2062 return crossdifference(
2063 S.template getValue< 2, 0, 2>(), S.template getValue< 2, 0, 1>(),
2064 S.template getValue< 2, 0,-1>(), S.template getValue< 2, 0,-2>(),
2065 S.template getValue< 1, 0, 2>(), S.template getValue< 1, 0, 1>(),
2066 S.template getValue< 1, 0,-1>(), S.template getValue< 1, 0,-2>(),
2067 S.template getValue<-2, 0, 2>(), S.template getValue<-2, 0, 1>(),
2068 S.template getValue<-2, 0,-1>(), S.template getValue<-2, 0,-2>(),
2069 S.template getValue<-1, 0, 2>(), S.template getValue<-1, 0, 1>(),
2070 S.template getValue<-1, 0,-1>(), S.template getValue<-1, 0,-2>() );
2073 template<
typename Stencil>
2074 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2076 return crossdifference(
2077 S.template getValue< 0, 2, 2>(), S.template getValue< 0, 2, 1>(),
2078 S.template getValue< 0, 2,-1>(), S.template getValue< 0, 2,-2>(),
2079 S.template getValue< 0, 1, 2>(), S.template getValue< 0, 1, 1>(),
2080 S.template getValue< 0, 1,-1>(), S.template getValue< 0, 1,-2>(),
2081 S.template getValue< 0,-2, 2>(), S.template getValue< 0,-2, 1>(),
2082 S.template getValue< 0,-2,-1>(), S.template getValue< 0,-2,-2>(),
2083 S.template getValue< 0,-1, 2>(), S.template getValue< 0,-1, 1>(),
2084 S.template getValue< 0,-1,-1>(), S.template getValue< 0,-1,-2>() );
2093 template <
typename ValueType>
2094 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
2095 const ValueType& xp0,
2096 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3)
2098 return ValueType(1./90.)*(xp3 + xm3) - ValueType(3./20.)*(xp2 + xm2)
2099 + ValueType(1.5)*(xp1 + xm1) - ValueType(49./18.)*xp0;
2102 template <
typename ValueType>
2104 const ValueType& xp1ym1,
const ValueType& xm1ym1,
2105 const ValueType& xp2yp1,
const ValueType& xm2yp1,
2106 const ValueType& xp2ym1,
const ValueType& xm2ym1,
2107 const ValueType& xp3yp1,
const ValueType& xm3yp1,
2108 const ValueType& xp3ym1,
const ValueType& xm3ym1,
2109 const ValueType& xp1yp2,
const ValueType& xm1yp2,
2110 const ValueType& xp1ym2,
const ValueType& xm1ym2,
2111 const ValueType& xp2yp2,
const ValueType& xm2yp2,
2112 const ValueType& xp2ym2,
const ValueType& xm2ym2,
2113 const ValueType& xp3yp2,
const ValueType& xm3yp2,
2114 const ValueType& xp3ym2,
const ValueType& xm3ym2,
2115 const ValueType& xp1yp3,
const ValueType& xm1yp3,
2116 const ValueType& xp1ym3,
const ValueType& xm1ym3,
2117 const ValueType& xp2yp3,
const ValueType& xm2yp3,
2118 const ValueType& xp2ym3,
const ValueType& xm2ym3,
2119 const ValueType& xp3yp3,
const ValueType& xm3yp3,
2120 const ValueType& xp3ym3,
const ValueType& xm3ym3 )
2123 ValueType(0.7500)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1) -
2124 ValueType(0.1500)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1) +
2125 ValueType(1./60.)*(xp3yp1 - xm3yp1 - xp3ym1 + xm3ym1);
2128 ValueType(0.7500)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2) -
2129 ValueType(0.1500)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2) +
2130 ValueType(1./60.)*(xp3yp2 - xm3yp2 - xp3ym2 + xm3ym2);
2133 ValueType(0.7500)*(xp1yp3 - xm1yp3 - xp1ym3 + xm1ym3) -
2134 ValueType(0.1500)*(xp2yp3 - xm2yp3 - xp2ym3 + xm2ym3) +
2135 ValueType(1./60.)*(xp3yp3 - xm3yp3 - xp3ym3 + xm3ym3);
2137 return ValueType(0.75)*tmp1 - ValueType(0.15)*tmp2 + ValueType(1./60)*tmp3;
2142 template<
typename Accessor>
2143 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2146 grid.getValue(ijk.
offsetBy( 3, 0, 0)), grid.getValue(ijk.
offsetBy( 2, 0, 0)),
2147 grid.getValue(ijk.
offsetBy( 1, 0, 0)), grid.getValue(ijk),
2148 grid.getValue(ijk.
offsetBy(-1, 0, 0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)),
2149 grid.getValue(ijk.
offsetBy(-3, 0, 0)) );
2152 template<
typename Accessor>
2153 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2156 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
2157 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk),
2158 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)),
2159 grid.getValue(ijk.
offsetBy( 0,-3, 0)) );
2162 template<
typename Accessor>
2163 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2167 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
2168 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk),
2169 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)),
2170 grid.getValue(ijk.
offsetBy( 0, 0,-3)) );
2173 template<
typename Accessor>
2174 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2176 using ValueT =
typename Accessor::ValueType;
2186 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2189 template<
typename Accessor>
2190 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2192 using ValueT =
typename Accessor::ValueType;
2202 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2205 template<
typename Accessor>
2206 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2208 using ValueT =
typename Accessor::ValueType;
2218 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2223 template<
typename Stencil>
2224 static typename Stencil::ValueType
inX(
const Stencil& S)
2226 return difference( S.template getValue< 3, 0, 0>(), S.template getValue< 2, 0, 0>(),
2227 S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
2228 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>(),
2229 S.template getValue<-3, 0, 0>() );
2232 template<
typename Stencil>
2233 static typename Stencil::ValueType
inY(
const Stencil& S)
2235 return difference( S.template getValue< 0, 3, 0>(), S.template getValue< 0, 2, 0>(),
2236 S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
2237 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>(),
2238 S.template getValue< 0,-3, 0>() );
2242 template<
typename Stencil>
2243 static typename Stencil::ValueType
inZ(
const Stencil& S)
2245 return difference( S.template getValue< 0, 0, 3>(), S.template getValue< 0, 0, 2>(),
2246 S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
2247 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>(),
2248 S.template getValue< 0, 0,-3>() );
2251 template<
typename Stencil>
2252 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2254 return crossdifference( S.template getValue< 1, 1, 0>(), S.template getValue<-1, 1, 0>(),
2255 S.template getValue< 1,-1, 0>(), S.template getValue<-1,-1, 0>(),
2256 S.template getValue< 2, 1, 0>(), S.template getValue<-2, 1, 0>(),
2257 S.template getValue< 2,-1, 0>(), S.template getValue<-2,-1, 0>(),
2258 S.template getValue< 3, 1, 0>(), S.template getValue<-3, 1, 0>(),
2259 S.template getValue< 3,-1, 0>(), S.template getValue<-3,-1, 0>(),
2260 S.template getValue< 1, 2, 0>(), S.template getValue<-1, 2, 0>(),
2261 S.template getValue< 1,-2, 0>(), S.template getValue<-1,-2, 0>(),
2262 S.template getValue< 2, 2, 0>(), S.template getValue<-2, 2, 0>(),
2263 S.template getValue< 2,-2, 0>(), S.template getValue<-2,-2, 0>(),
2264 S.template getValue< 3, 2, 0>(), S.template getValue<-3, 2, 0>(),
2265 S.template getValue< 3,-2, 0>(), S.template getValue<-3,-2, 0>(),
2266 S.template getValue< 1, 3, 0>(), S.template getValue<-1, 3, 0>(),
2267 S.template getValue< 1,-3, 0>(), S.template getValue<-1,-3, 0>(),
2268 S.template getValue< 2, 3, 0>(), S.template getValue<-2, 3, 0>(),
2269 S.template getValue< 2,-3, 0>(), S.template getValue<-2,-3, 0>(),
2270 S.template getValue< 3, 3, 0>(), S.template getValue<-3, 3, 0>(),
2271 S.template getValue< 3,-3, 0>(), S.template getValue<-3,-3, 0>() );
2274 template<
typename Stencil>
2275 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2277 return crossdifference( S.template getValue< 1, 0, 1>(), S.template getValue<-1, 0, 1>(),
2278 S.template getValue< 1, 0,-1>(), S.template getValue<-1, 0,-1>(),
2279 S.template getValue< 2, 0, 1>(), S.template getValue<-2, 0, 1>(),
2280 S.template getValue< 2, 0,-1>(), S.template getValue<-2, 0,-1>(),
2281 S.template getValue< 3, 0, 1>(), S.template getValue<-3, 0, 1>(),
2282 S.template getValue< 3, 0,-1>(), S.template getValue<-3, 0,-1>(),
2283 S.template getValue< 1, 0, 2>(), S.template getValue<-1, 0, 2>(),
2284 S.template getValue< 1, 0,-2>(), S.template getValue<-1, 0,-2>(),
2285 S.template getValue< 2, 0, 2>(), S.template getValue<-2, 0, 2>(),
2286 S.template getValue< 2, 0,-2>(), S.template getValue<-2, 0,-2>(),
2287 S.template getValue< 3, 0, 2>(), S.template getValue<-3, 0, 2>(),
2288 S.template getValue< 3, 0,-2>(), S.template getValue<-3, 0,-2>(),
2289 S.template getValue< 1, 0, 3>(), S.template getValue<-1, 0, 3>(),
2290 S.template getValue< 1, 0,-3>(), S.template getValue<-1, 0,-3>(),
2291 S.template getValue< 2, 0, 3>(), S.template getValue<-2, 0, 3>(),
2292 S.template getValue< 2, 0,-3>(), S.template getValue<-2, 0,-3>(),
2293 S.template getValue< 3, 0, 3>(), S.template getValue<-3, 0, 3>(),
2294 S.template getValue< 3, 0,-3>(), S.template getValue<-3, 0,-3>() );
2297 template<
typename Stencil>
2298 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2300 return crossdifference( S.template getValue< 0, 1, 1>(), S.template getValue< 0,-1, 1>(),
2301 S.template getValue< 0, 1,-1>(), S.template getValue< 0,-1,-1>(),
2302 S.template getValue< 0, 2, 1>(), S.template getValue< 0,-2, 1>(),
2303 S.template getValue< 0, 2,-1>(), S.template getValue< 0,-2,-1>(),
2304 S.template getValue< 0, 3, 1>(), S.template getValue< 0,-3, 1>(),
2305 S.template getValue< 0, 3,-1>(), S.template getValue< 0,-3,-1>(),
2306 S.template getValue< 0, 1, 2>(), S.template getValue< 0,-1, 2>(),
2307 S.template getValue< 0, 1,-2>(), S.template getValue< 0,-1,-2>(),
2308 S.template getValue< 0, 2, 2>(), S.template getValue< 0,-2, 2>(),
2309 S.template getValue< 0, 2,-2>(), S.template getValue< 0,-2,-2>(),
2310 S.template getValue< 0, 3, 2>(), S.template getValue< 0,-3, 2>(),
2311 S.template getValue< 0, 3,-2>(), S.template getValue< 0,-3,-2>(),
2312 S.template getValue< 0, 1, 3>(), S.template getValue< 0,-1, 3>(),
2313 S.template getValue< 0, 1,-3>(), S.template getValue< 0,-1,-3>(),
2314 S.template getValue< 0, 2, 3>(), S.template getValue< 0,-2, 3>(),
2315 S.template getValue< 0, 2,-3>(), S.template getValue< 0,-2,-3>(),
2316 S.template getValue< 0, 3, 3>(), S.template getValue< 0,-3, 3>(),
2317 S.template getValue< 0, 3,-3>(), S.template getValue< 0,-3,-3>() );
2326 #endif // OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1705
Definition: FiniteDifference.h:166
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1439
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1874
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:603
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:873
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:844
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:545
Definition: FiniteDifference.h:35
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1304
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2006
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2153
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1280
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1569
std::string dsSchemeToString(DScheme dss)
Definition: FiniteDifference.h:53
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1183
static bool difference(const bool &xp1, const bool &)
Definition: FiniteDifference.h:501
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:726
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1562
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2275
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1319
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:688
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1590
Definition: FiniteDifference.h:44
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1022
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1725
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:794
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1629
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1289
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2074
BiasedGradientScheme
Biased Gradients are limited to non-centered differences.
Definition: FiniteDifference.h:164
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1524
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:999
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2163
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1408
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2298
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1498
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:655
static ValueType crossdifference(const ValueType &xp1yp1, const ValueType &xm1yp1, const ValueType &xp1ym1, const ValueType &xm1ym1, const ValueType &xp2yp1, const ValueType &xm2yp1, const ValueType &xp2ym1, const ValueType &xm2ym1, const ValueType &xp3yp1, const ValueType &xm3yp1, const ValueType &xp3ym1, const ValueType &xm3ym1, const ValueType &xp1yp2, const ValueType &xm1yp2, const ValueType &xp1ym2, const ValueType &xm1ym2, const ValueType &xp2yp2, const ValueType &xm2yp2, const ValueType &xp2ym2, const ValueType &xm2ym2, const ValueType &xp3yp2, const ValueType &xm3yp2, const ValueType &xp3ym2, const ValueType &xm3ym2, const ValueType &xp1yp3, const ValueType &xm1yp3, const ValueType &xp1ym3, const ValueType &xm1ym3, const ValueType &xp2yp3, const ValueType &xm2yp3, const ValueType &xp2ym3, const ValueType &xm2ym3, const ValueType &xp3yp3, const ValueType &xm3yp3, const ValueType &xp3ym3, const ValueType &xm3ym3)
Definition: FiniteDifference.h:2103
Definition: FiniteDifference.h:169
Definition: FiniteDifference.h:156
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1745
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1824
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1688
Definition: FiniteDifference.h:41
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1663
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:612
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1924
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:534
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:1910
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1083
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:24
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:498
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:983
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:714
ValueType WENO5(const ValueType &v1, const ValueType &v2, const ValueType &v3, const ValueType &v4, const ValueType &v5, float scale2=0.01f)
Implementation of nominally fifth-order finite-difference WENO.
Definition: FiniteDifference.h:303
DDScheme
Different discrete schemes used in the second derivatives.
Definition: FiniteDifference.h:149
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2233
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:826
Definition: FiniteDifference.h:167
Definition: FiniteDifference.h:173
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:882
static ValueType crossdifference(const ValueType &xp2yp2, const ValueType &xp2yp1, const ValueType &xp2ym1, const ValueType &xp2ym2, const ValueType &xp1yp2, const ValueType &xp1yp1, const ValueType &xp1ym1, const ValueType &xp1ym2, const ValueType &xm2yp2, const ValueType &xm2yp1, const ValueType &xm2ym1, const ValueType &xm2ym2, const ValueType &xm1yp2, const ValueType &xm1yp1, const ValueType &xm1ym1, const ValueType &xm1ym2)
Definition: FiniteDifference.h:1930
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1491
Definition: FiniteDifference.h:46
static ValueType difference(const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:950
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:474
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:583
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1139
Definition: FiniteDifference.h:49
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1622
Definition: FiniteDifference.h:165
Definition: FiniteDifference.h:151
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1546
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2060
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1715
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:594
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:508
double Real
Definition: Types.h:60
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1736
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1888
TemporalIntegrationScheme stringToTemporalIntegrationScheme(const std::string &s)
Definition: FiniteDifference.h:256
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1518
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1093
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1222
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:457
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:958
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2243
Definition: FiniteDifference.h:150
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1191
Definition: FiniteDifference.h:45
static ValueType difference(const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:707
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1454
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2, const ValueType &xm3)
Definition: FiniteDifference.h:2094
Definition: FiniteDifference.h:34
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1831
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2037
Definition: FiniteDifference.h:42
Definition: FiniteDifference.h:168
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:665
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1512
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1153
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1615
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:835
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:1896
Definition: FiniteDifference.h:38
Definition: FiniteDifference.h:236
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1881
void to_lower(std::string &s)
Definition: Name.h:96
Definition: FiniteDifference.h:37
Definition: FiniteDifference.h:235
Definition: FiniteDifference.h:43
Definition: FiniteDifference.h:36
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:566
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1262
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1385
Definition: FiniteDifference.h:1486
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1238
static ValueType difference(const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:898
const Type & Min(const Type &a, const Type &b)
Return the minimum of two values.
Definition: Math.h:656
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:1903
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1839
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:864
TemporalIntegrationScheme
Temporal integration schemes.
Definition: FiniteDifference.h:233
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1123
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:745
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:558
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1952
std::string biasedGradientSchemeToString(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:176
std::string dsSchemeToMenuName(DScheme dss)
Definition: FiniteDifference.h:119
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2143
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:637
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1068
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:524
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2224
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2046
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1980
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:757
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1645
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:539
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1606
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1538
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:465
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2252
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1993
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:931
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1847
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1365
Definition: Exceptions.h:13
Definition: FiniteDifference.h:153
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1050
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:911
Definition: FiniteDifference.h:32
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1961
Definition: FiniteDifference.h:40
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:486
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1040
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:974
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2029
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:966
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:765
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:991
Definition: FiniteDifference.h:170
const Type & Max(const Type &a, const Type &b)
Return the maximum of two values.
Definition: Math.h:595
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:516
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1754
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2021
DScheme
Different discrete schemes used in the first derivatives.
Definition: FiniteDifference.h:31
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1598
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:733
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1335
Definition: FiniteDifference.h:39
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2190
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1504
Real GodunovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:351
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1864
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:720
static ValueType crossdifference(const ValueType &xpyp, const ValueType &xpym, const ValueType &xmyp, const ValueType &xmym)
Definition: FiniteDifference.h:1816
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2174
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:853
Definition: FiniteDifference.h:415
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:783
Coord offsetBy(Int32 dx, Int32 dy, Int32 dz) const
Definition: Coord.h:91
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:774
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1059
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1554
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1654
DScheme stringToDScheme(const std::string &s)
Definition: FiniteDifference.h:77
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:449
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:925
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:480
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1165
std::string temporalIntegrationSchemeToString(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:243
Definition: FiniteDifference.h:234
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2, const ValueType &xm3)
Definition: FiniteDifference.h:627
std::string temporalIntegrationSchemeToMenuName(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:276
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2206
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1350
std::string biasedGradientSchemeToMenuName(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:214
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1672
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:937
void trim(std::string &s)
Definition: Name.h:83
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:810
Type Pow2(Type x)
Return x2.
Definition: Math.h:548
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1680
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1108
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:646
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:739
BiasedGradientScheme stringToBiasedGradientScheme(const std::string &s)
Definition: FiniteDifference.h:191
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1423
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:443
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:905
Definition: FiniteDifference.h:33
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1393
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
static ValueType difference(const ValueType &xp1, const ValueType &xp0, const ValueType &xm1)
Definition: FiniteDifference.h:1810
Definition: FiniteDifference.h:240
Definition: FiniteDifference.h:1764
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:802
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1251
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1207
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:676
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1031
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1970
Definition: FiniteDifference.h:152
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:574
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1576
Definition: FiniteDifference.h:237
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:917
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1856
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:1014
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:212
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1469