6 #ifndef OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED 7 #define OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED 14 #include <boost/algorithm/string/case_conv.hpp> 15 #include <boost/algorithm/string/trim.hpp> 18 #include <simd/Simd.h> 59 case CD_2NDT: ret =
"cd_2ndt";
break;
60 case CD_2ND: ret =
"cd_2nd";
break;
61 case CD_4TH: ret =
"cd_4th";
break;
62 case CD_6TH: ret =
"cd_6th";
break;
63 case FD_1ST: ret =
"fd_1st";
break;
64 case FD_2ND: ret =
"fd_2nd";
break;
65 case FD_3RD: ret =
"fd_3rd";
break;
66 case BD_1ST: ret =
"bd_1st";
break;
67 case BD_2ND: ret =
"bd_2nd";
break;
68 case BD_3RD: ret =
"bd_3rd";
break;
69 case FD_WENO5: ret =
"fd_weno5";
break;
70 case BD_WENO5: ret =
"bd_weno5";
break;
124 case UNKNOWN_DS: ret =
"Unknown DS scheme";
break;
125 case CD_2NDT: ret =
"Twice 2nd-order center difference";
break;
126 case CD_2ND: ret =
"2nd-order center difference";
break;
127 case CD_4TH: ret =
"4th-order center difference";
break;
128 case CD_6TH: ret =
"6th-order center difference";
break;
129 case FD_1ST: ret =
"1st-order forward difference";
break;
130 case FD_2ND: ret =
"2nd-order forward difference";
break;
131 case FD_3RD: ret =
"3rd-order forward difference";
break;
132 case BD_1ST: ret =
"1st-order backward difference";
break;
133 case BD_2ND: ret =
"2nd-order backward difference";
break;
134 case BD_3RD: ret =
"3rd-order backward difference";
break;
135 case FD_WENO5: ret =
"5th-order WENO forward difference";
break;
136 case BD_WENO5: ret =
"5th-order WENO backward difference";
break;
137 case FD_HJWENO5: ret =
"5th-order HJ-WENO forward difference";
break;
138 case BD_HJWENO5: ret =
"5th-order HJ-WENO backward difference";
break;
198 boost::to_lower(str);
219 case UNKNOWN_BIAS: ret =
"Unknown biased gradient";
break;
220 case FIRST_BIAS: ret =
"1st-order biased gradient";
break;
221 case SECOND_BIAS: ret =
"2nd-order biased gradient";
break;
222 case THIRD_BIAS: ret =
"3rd-order biased gradient";
break;
223 case WENO5_BIAS: ret =
"5th-order WENO biased gradient";
break;
224 case HJWENO5_BIAS: ret =
"5th-order HJ-WENO biased gradient";
break;
249 case TVD_RK1: ret =
"tvd_rk1";
break;
250 case TVD_RK2: ret =
"tvd_rk2";
break;
251 case TVD_RK3: ret =
"tvd_rk3";
break;
263 boost::to_lower(str);
281 case UNKNOWN_TIS: ret =
"Unknown temporal integration";
break;
282 case TVD_RK1: ret =
"Forward Euler";
break;
283 case TVD_RK2: ret =
"2nd-order Runge-Kutta";
break;
284 case TVD_RK3: ret =
"3rd-order Runge-Kutta";
break;
302 template<
typename ValueType>
304 WENO5(
const ValueType& v1,
const ValueType& v2,
const ValueType& v3,
305 const ValueType& v4,
const ValueType& v5,
float scale2 = 0.01f)
307 const double C = 13.0 / 12.0;
312 const double eps = 1.0e-6 *
static_cast<double>(scale2);
318 return static_cast<ValueType
>(
static_cast<ValueType
>(
319 A1*(2.0*v1 - 7.0*v2 + 11.0*v3) +
320 A2*(5.0*v3 - v2 + 2.0*v4) +
321 A3*(2.0*v3 + 5.0*v4 - v5))/(6.0*(A1+A2+A3)));
325 template <
typename Real>
350 template<
typename Real>
354 return GodunovsNormSqrd<Real>(isOutside,
355 gradient_m[0], gradient_p[0],
356 gradient_m[1], gradient_p[1],
357 gradient_m[2], gradient_p[2]);
362 inline simd::Float4 simdMin(
const simd::Float4& a,
const simd::Float4& b) {
363 return simd::Float4(_mm_min_ps(a.base(), b.base()));
365 inline simd::Float4 simdMax(
const simd::Float4& a,
const simd::Float4& b) {
366 return simd::Float4(_mm_max_ps(a.base(), b.base()));
369 inline float simdSum(
const simd::Float4& v);
371 inline simd::Float4
Pow2(
const simd::Float4& v) {
return v * v; }
375 WENO5<simd::Float4>(
const simd::Float4& v1,
const simd::Float4& v2,
const simd::Float4& v3,
376 const simd::Float4& v4,
const simd::Float4& v5,
float scale2)
379 using F4 = simd::Float4;
382 eps(1.0e-6f * scale2),
383 two(2.0), three(3.0), four(4.0), five(5.0), fourth(0.25),
384 A1 = F4(0.1f) /
Pow2(C*
Pow2(v1-two*v2+v3) + fourth*
Pow2(v1-four*v2+three*v3) + eps),
385 A2 = F4(0.6f) /
Pow2(C*
Pow2(v2-two*v3+v4) + fourth*
Pow2(v2-v4) + eps),
386 A3 = F4(0.3f) /
Pow2(C*
Pow2(v3-two*v4+v5) + fourth*
Pow2(three*v3-four*v4+v5) + eps);
387 return (A1 * (two * v1 - F4(7.0) * v2 + F4(11.0) * v3) +
388 A2 * (five * v3 - v2 + two * v4) +
389 A3 * (two * v3 + five * v4 - v5)) / (F4(6.0) * (A1 + A2 + A3));
394 simdSum(
const simd::Float4& v)
397 __m128 temp = _mm_add_ps(v.base(), _mm_movehl_ps(v.base(), v.base()));
399 temp = _mm_add_ss(temp, _mm_shuffle_ps(temp, temp, 1));
400 return _mm_cvtss_f32(temp);
404 GodunovsNormSqrd(
bool isOutside,
const simd::Float4& dP_m,
const simd::Float4& dP_p)
406 const simd::Float4 zero(0.0);
407 simd::Float4 v = isOutside
415 template<DScheme DiffScheme>
419 template<
typename Accessor>
420 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
422 template<
typename Accessor>
423 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
425 template<
typename Accessor>
426 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
429 template<
typename Stencil>
430 static typename Stencil::ValueType inX(
const Stencil& S);
432 template<
typename Stencil>
433 static typename Stencil::ValueType inY(
const Stencil& S);
435 template<
typename Stencil>
436 static typename Stencil::ValueType inZ(
const Stencil& S);
443 template <
typename ValueType>
444 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
449 template<
typename Accessor>
450 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
453 grid.getValue(ijk.
offsetBy(1, 0, 0)),
454 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
457 template<
typename Accessor>
458 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
461 grid.getValue(ijk.
offsetBy(0, 1, 0)),
462 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
465 template<
typename Accessor>
466 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
469 grid.getValue(ijk.
offsetBy(0, 0, 1)),
470 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
474 template<
typename Stencil>
475 static typename Stencil::ValueType
inX(
const Stencil& S)
477 return difference( S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
480 template<
typename Stencil>
481 static typename Stencil::ValueType
inY(
const Stencil& S)
483 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
486 template<
typename Stencil>
487 static typename Stencil::ValueType
inZ(
const Stencil& S)
489 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
498 template <
typename ValueType>
499 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
500 return (xp1 - xm1)*ValueType(0.5);
508 template<
typename Accessor>
509 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
512 grid.getValue(ijk.
offsetBy(1, 0, 0)),
513 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
516 template<
typename Accessor>
517 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
520 grid.getValue(ijk.
offsetBy(0, 1, 0)),
521 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
524 template<
typename Accessor>
525 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
528 grid.getValue(ijk.
offsetBy(0, 0, 1)),
529 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
534 template<
typename Stencil>
535 static typename Stencil::ValueType
inX(
const Stencil& S)
537 return difference(S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
539 template<
typename Stencil>
540 static typename Stencil::ValueType
inY(
const Stencil& S)
542 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
545 template<
typename Stencil>
546 static typename Stencil::ValueType
inZ(
const Stencil& S)
548 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
558 template <
typename ValueType>
559 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
560 const ValueType& xm1,
const ValueType& xm2 ) {
561 return ValueType(2./3.)*(xp1 - xm1) + ValueType(1./12.)*(xm2 - xp2) ;
566 template<
typename Accessor>
567 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
574 template<
typename Accessor>
575 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
579 grid.getValue(ijk.
offsetBy( 0, 2, 0)), grid.getValue(ijk.
offsetBy( 0, 1, 0)),
580 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)) );
583 template<
typename Accessor>
584 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
588 grid.getValue(ijk.
offsetBy( 0, 0, 2)), grid.getValue(ijk.
offsetBy( 0, 0, 1)),
589 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)) );
594 template<
typename Stencil>
595 static typename Stencil::ValueType
inX(
const Stencil& S)
597 return difference( S.template getValue< 2, 0, 0>(),
598 S.template getValue< 1, 0, 0>(),
599 S.template getValue<-1, 0, 0>(),
600 S.template getValue<-2, 0, 0>() );
603 template<
typename Stencil>
604 static typename Stencil::ValueType
inY(
const Stencil& S)
606 return difference( S.template getValue< 0, 2, 0>(),
607 S.template getValue< 0, 1, 0>(),
608 S.template getValue< 0,-1, 0>(),
609 S.template getValue< 0,-2, 0>() );
612 template<
typename Stencil>
613 static typename Stencil::ValueType
inZ(
const Stencil& S)
615 return difference( S.template getValue< 0, 0, 2>(),
616 S.template getValue< 0, 0, 1>(),
617 S.template getValue< 0, 0,-1>(),
618 S.template getValue< 0, 0,-2>() );
627 template <
typename ValueType>
628 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
629 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3 )
631 return ValueType(3./4.)*(xp1 - xm1) - ValueType(0.15)*(xp2 - xm2)
632 + ValueType(1./60.)*(xp3-xm3);
637 template<
typename Accessor>
638 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
646 template<
typename Accessor>
647 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
650 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
651 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk.
offsetBy( 0,-1, 0)),
652 grid.getValue(ijk.
offsetBy( 0,-2, 0)), grid.getValue(ijk.
offsetBy( 0,-3, 0)));
655 template<
typename Accessor>
656 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
659 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
660 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk.
offsetBy( 0, 0,-1)),
661 grid.getValue(ijk.
offsetBy( 0, 0,-2)), grid.getValue(ijk.
offsetBy( 0, 0,-3)));
665 template<
typename Stencil>
666 static typename Stencil::ValueType
inX(
const Stencil& S)
668 return difference(S.template getValue< 3, 0, 0>(),
669 S.template getValue< 2, 0, 0>(),
670 S.template getValue< 1, 0, 0>(),
671 S.template getValue<-1, 0, 0>(),
672 S.template getValue<-2, 0, 0>(),
673 S.template getValue<-3, 0, 0>());
676 template<
typename Stencil>
677 static typename Stencil::ValueType
inY(
const Stencil& S)
680 return difference( S.template getValue< 0, 3, 0>(),
681 S.template getValue< 0, 2, 0>(),
682 S.template getValue< 0, 1, 0>(),
683 S.template getValue< 0,-1, 0>(),
684 S.template getValue< 0,-2, 0>(),
685 S.template getValue< 0,-3, 0>());
688 template<
typename Stencil>
689 static typename Stencil::ValueType
inZ(
const Stencil& S)
692 return difference( S.template getValue< 0, 0, 3>(),
693 S.template getValue< 0, 0, 2>(),
694 S.template getValue< 0, 0, 1>(),
695 S.template getValue< 0, 0,-1>(),
696 S.template getValue< 0, 0,-2>(),
697 S.template getValue< 0, 0,-3>());
707 template <
typename ValueType>
708 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0) {
714 template<
typename Accessor>
715 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
717 return difference(grid.getValue(ijk.
offsetBy(1, 0, 0)), grid.getValue(ijk));
720 template<
typename Accessor>
721 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
723 return difference(grid.getValue(ijk.
offsetBy(0, 1, 0)), grid.getValue(ijk));
726 template<
typename Accessor>
727 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
729 return difference(grid.getValue(ijk.
offsetBy(0, 0, 1)), grid.getValue(ijk));
733 template<
typename Stencil>
734 static typename Stencil::ValueType
inX(
const Stencil& S)
736 return difference(S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>());
739 template<
typename Stencil>
740 static typename Stencil::ValueType
inY(
const Stencil& S)
742 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>());
745 template<
typename Stencil>
746 static typename Stencil::ValueType
inZ(
const Stencil& S)
748 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>());
757 template <
typename ValueType>
758 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0)
760 return ValueType(2)*xp1 -(ValueType(0.5)*xp2 + ValueType(3./2.)*xp0);
765 template<
typename Accessor>
766 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
774 template<
typename Accessor>
775 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
783 template<
typename Accessor>
784 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
794 template<
typename Stencil>
795 static typename Stencil::ValueType
inX(
const Stencil& S)
797 return difference( S.template getValue< 2, 0, 0>(),
798 S.template getValue< 1, 0, 0>(),
799 S.template getValue< 0, 0, 0>() );
802 template<
typename Stencil>
803 static typename Stencil::ValueType
inY(
const Stencil& S)
805 return difference( S.template getValue< 0, 2, 0>(),
806 S.template getValue< 0, 1, 0>(),
807 S.template getValue< 0, 0, 0>() );
810 template<
typename Stencil>
811 static typename Stencil::ValueType
inZ(
const Stencil& S)
813 return difference( S.template getValue< 0, 0, 2>(),
814 S.template getValue< 0, 0, 1>(),
815 S.template getValue< 0, 0, 0>() );
826 template<
typename ValueType>
827 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
828 const ValueType& xp1,
const ValueType& xp0)
830 return static_cast<ValueType
>(xp3/3.0 - 1.5*xp2 + 3.0*xp1 - 11.0*xp0/6.0);
835 template<
typename Accessor>
836 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
838 return difference( grid.getValue(ijk.
offsetBy(3,0,0)),
841 grid.getValue(ijk) );
844 template<
typename Accessor>
845 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
847 return difference( grid.getValue(ijk.
offsetBy(0,3,0)),
850 grid.getValue(ijk) );
853 template<
typename Accessor>
854 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
856 return difference( grid.getValue(ijk.
offsetBy(0,0,3)),
859 grid.getValue(ijk) );
864 template<
typename Stencil>
865 static typename Stencil::ValueType
inX(
const Stencil& S)
867 return difference(S.template getValue< 3, 0, 0>(),
868 S.template getValue< 2, 0, 0>(),
869 S.template getValue< 1, 0, 0>(),
870 S.template getValue< 0, 0, 0>() );
873 template<
typename Stencil>
874 static typename Stencil::ValueType
inY(
const Stencil& S)
876 return difference(S.template getValue< 0, 3, 0>(),
877 S.template getValue< 0, 2, 0>(),
878 S.template getValue< 0, 1, 0>(),
879 S.template getValue< 0, 0, 0>() );
882 template<
typename Stencil>
883 static typename Stencil::ValueType
inZ(
const Stencil& S)
885 return difference( S.template getValue< 0, 0, 3>(),
886 S.template getValue< 0, 0, 2>(),
887 S.template getValue< 0, 0, 1>(),
888 S.template getValue< 0, 0, 0>() );
898 template <
typename ValueType>
899 static ValueType
difference(
const ValueType& xm1,
const ValueType& xm0) {
905 template<
typename Accessor>
906 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
908 return difference(grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk));
911 template<
typename Accessor>
912 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
914 return difference(grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk));
917 template<
typename Accessor>
918 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
920 return difference(grid.getValue(ijk.
offsetBy(0, 0,-1)), grid.getValue(ijk));
925 template<
typename Stencil>
926 static typename Stencil::ValueType
inX(
const Stencil& S)
928 return difference(S.template getValue<-1, 0, 0>(), S.template getValue< 0, 0, 0>());
931 template<
typename Stencil>
932 static typename Stencil::ValueType
inY(
const Stencil& S)
934 return difference(S.template getValue< 0,-1, 0>(), S.template getValue< 0, 0, 0>());
937 template<
typename Stencil>
938 static typename Stencil::ValueType
inZ(
const Stencil& S)
940 return difference(S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0, 0>());
950 template <
typename ValueType>
951 static ValueType
difference(
const ValueType& xm2,
const ValueType& xm1,
const ValueType& xm0)
958 template<
typename Accessor>
959 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
961 return difference( grid.getValue(ijk.
offsetBy(-2,0,0)),
962 grid.getValue(ijk.
offsetBy(-1,0,0)),
963 grid.getValue(ijk) );
966 template<
typename Accessor>
967 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
969 return difference( grid.getValue(ijk.
offsetBy(0,-2,0)),
970 grid.getValue(ijk.
offsetBy(0,-1,0)),
971 grid.getValue(ijk) );
974 template<
typename Accessor>
975 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
977 return difference( grid.getValue(ijk.
offsetBy(0,0,-2)),
978 grid.getValue(ijk.
offsetBy(0,0,-1)),
979 grid.getValue(ijk) );
983 template<
typename Stencil>
984 static typename Stencil::ValueType
inX(
const Stencil& S)
986 return difference( S.template getValue<-2, 0, 0>(),
987 S.template getValue<-1, 0, 0>(),
988 S.template getValue< 0, 0, 0>() );
991 template<
typename Stencil>
992 static typename Stencil::ValueType
inY(
const Stencil& S)
994 return difference( S.template getValue< 0,-2, 0>(),
995 S.template getValue< 0,-1, 0>(),
996 S.template getValue< 0, 0, 0>() );
999 template<
typename Stencil>
1000 static typename Stencil::ValueType
inZ(
const Stencil& S)
1002 return difference( S.template getValue< 0, 0,-2>(),
1003 S.template getValue< 0, 0,-1>(),
1004 S.template getValue< 0, 0, 0>() );
1014 template <
typename ValueType>
1015 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
1016 const ValueType& xm1,
const ValueType& xm0)
1022 template<
typename Accessor>
1023 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1025 return difference( grid.getValue(ijk.
offsetBy(-3,0,0)),
1026 grid.getValue(ijk.
offsetBy(-2,0,0)),
1027 grid.getValue(ijk.
offsetBy(-1,0,0)),
1028 grid.getValue(ijk) );
1031 template<
typename Accessor>
1032 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1034 return difference( grid.getValue(ijk.
offsetBy( 0,-3,0)),
1035 grid.getValue(ijk.
offsetBy( 0,-2,0)),
1036 grid.getValue(ijk.
offsetBy( 0,-1,0)),
1037 grid.getValue(ijk) );
1040 template<
typename Accessor>
1041 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1043 return difference( grid.getValue(ijk.
offsetBy( 0, 0,-3)),
1044 grid.getValue(ijk.
offsetBy( 0, 0,-2)),
1045 grid.getValue(ijk.
offsetBy( 0, 0,-1)),
1046 grid.getValue(ijk) );
1050 template<
typename Stencil>
1051 static typename Stencil::ValueType
inX(
const Stencil& S)
1053 return difference( S.template getValue<-3, 0, 0>(),
1054 S.template getValue<-2, 0, 0>(),
1055 S.template getValue<-1, 0, 0>(),
1056 S.template getValue< 0, 0, 0>() );
1059 template<
typename Stencil>
1060 static typename Stencil::ValueType
inY(
const Stencil& S)
1062 return difference( S.template getValue< 0,-3, 0>(),
1063 S.template getValue< 0,-2, 0>(),
1064 S.template getValue< 0,-1, 0>(),
1065 S.template getValue< 0, 0, 0>() );
1068 template<
typename Stencil>
1069 static typename Stencil::ValueType
inZ(
const Stencil& S)
1071 return difference( S.template getValue< 0, 0,-3>(),
1072 S.template getValue< 0, 0,-2>(),
1073 S.template getValue< 0, 0,-1>(),
1074 S.template getValue< 0, 0, 0>() );
1083 template <
typename ValueType>
1084 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1085 const ValueType& xp1,
const ValueType& xp0,
1086 const ValueType& xm1,
const ValueType& xm2) {
1087 return WENO5<ValueType>(xp3, xp2, xp1, xp0, xm1)
1088 - WENO5<ValueType>(xp2, xp1, xp0, xm1, xm2);
1093 template<
typename Accessor>
1094 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1096 using ValueType =
typename Accessor::ValueType;
1098 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1099 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1100 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1101 V[3] = grid.getValue(ijk);
1102 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1103 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1105 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1108 template<
typename Accessor>
1109 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1111 using ValueType =
typename Accessor::ValueType;
1113 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1114 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1115 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1116 V[3] = grid.getValue(ijk);
1117 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1118 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1120 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1123 template<
typename Accessor>
1124 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1126 using ValueType =
typename Accessor::ValueType;
1128 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1129 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1130 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1131 V[3] = grid.getValue(ijk);
1132 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1133 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1135 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1139 template<
typename Stencil>
1140 static typename Stencil::ValueType
inX(
const Stencil& S)
1143 return static_cast<typename Stencil::ValueType
>(difference(
1144 S.template getValue< 3, 0, 0>(),
1145 S.template getValue< 2, 0, 0>(),
1146 S.template getValue< 1, 0, 0>(),
1147 S.template getValue< 0, 0, 0>(),
1148 S.template getValue<-1, 0, 0>(),
1149 S.template getValue<-2, 0, 0>() ));
1153 template<
typename Stencil>
1154 static typename Stencil::ValueType
inY(
const Stencil& S)
1156 return static_cast<typename Stencil::ValueType
>(difference(
1157 S.template getValue< 0, 3, 0>(),
1158 S.template getValue< 0, 2, 0>(),
1159 S.template getValue< 0, 1, 0>(),
1160 S.template getValue< 0, 0, 0>(),
1161 S.template getValue< 0,-1, 0>(),
1162 S.template getValue< 0,-2, 0>() ));
1165 template<
typename Stencil>
1166 static typename Stencil::ValueType
inZ(
const Stencil& S)
1168 return static_cast<typename Stencil::ValueType
>(difference(
1169 S.template getValue< 0, 0, 3>(),
1170 S.template getValue< 0, 0, 2>(),
1171 S.template getValue< 0, 0, 1>(),
1172 S.template getValue< 0, 0, 0>(),
1173 S.template getValue< 0, 0,-1>(),
1174 S.template getValue< 0, 0,-2>() ));
1183 template <
typename ValueType>
1184 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1185 const ValueType& xp1,
const ValueType& xp0,
1186 const ValueType& xm1,
const ValueType& xm2) {
1187 return WENO5<ValueType>(xp3 - xp2, xp2 - xp1, xp1 - xp0, xp0-xm1, xm1-xm2);
1191 template<
typename Accessor>
1192 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1194 using ValueType =
typename Accessor::ValueType;
1196 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1197 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1198 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1199 V[3] = grid.getValue(ijk);
1200 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1201 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1203 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1207 template<
typename Accessor>
1208 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1210 using ValueType =
typename Accessor::ValueType;
1212 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1213 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1214 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1215 V[3] = grid.getValue(ijk);
1216 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1217 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1219 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1222 template<
typename Accessor>
1223 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1225 using ValueType =
typename Accessor::ValueType;
1227 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1228 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1229 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1230 V[3] = grid.getValue(ijk);
1231 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1232 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1234 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1238 template<
typename Stencil>
1239 static typename Stencil::ValueType
inX(
const Stencil& S)
1242 return difference( S.template getValue< 3, 0, 0>(),
1243 S.template getValue< 2, 0, 0>(),
1244 S.template getValue< 1, 0, 0>(),
1245 S.template getValue< 0, 0, 0>(),
1246 S.template getValue<-1, 0, 0>(),
1247 S.template getValue<-2, 0, 0>() );
1251 template<
typename Stencil>
1252 static typename Stencil::ValueType
inY(
const Stencil& S)
1254 return difference( S.template getValue< 0, 3, 0>(),
1255 S.template getValue< 0, 2, 0>(),
1256 S.template getValue< 0, 1, 0>(),
1257 S.template getValue< 0, 0, 0>(),
1258 S.template getValue< 0,-1, 0>(),
1259 S.template getValue< 0,-2, 0>() );
1262 template<
typename Stencil>
1263 static typename Stencil::ValueType
inZ(
const Stencil& S)
1266 return difference( S.template getValue< 0, 0, 3>(),
1267 S.template getValue< 0, 0, 2>(),
1268 S.template getValue< 0, 0, 1>(),
1269 S.template getValue< 0, 0, 0>(),
1270 S.template getValue< 0, 0,-1>(),
1271 S.template getValue< 0, 0,-2>() );
1280 template<
typename ValueType>
1281 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1282 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1289 template<
typename Accessor>
1290 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1292 using ValueType =
typename Accessor::ValueType;
1294 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1295 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1296 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1297 V[3] = grid.getValue(ijk);
1298 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1299 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1301 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1304 template<
typename Accessor>
1305 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1307 using ValueType =
typename Accessor::ValueType;
1309 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1310 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1311 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1312 V[3] = grid.getValue(ijk);
1313 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1314 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1316 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1319 template<
typename Accessor>
1320 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1322 using ValueType =
typename Accessor::ValueType;
1324 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1325 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1326 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1327 V[3] = grid.getValue(ijk);
1328 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1329 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1331 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1335 template<
typename Stencil>
1336 static typename Stencil::ValueType
inX(
const Stencil& S)
1338 using ValueType =
typename Stencil::ValueType;
1340 V[0] = S.template getValue<-3, 0, 0>();
1341 V[1] = S.template getValue<-2, 0, 0>();
1342 V[2] = S.template getValue<-1, 0, 0>();
1343 V[3] = S.template getValue< 0, 0, 0>();
1344 V[4] = S.template getValue< 1, 0, 0>();
1345 V[5] = S.template getValue< 2, 0, 0>();
1347 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1350 template<
typename Stencil>
1351 static typename Stencil::ValueType
inY(
const Stencil& S)
1353 using ValueType =
typename Stencil::ValueType;
1355 V[0] = S.template getValue< 0,-3, 0>();
1356 V[1] = S.template getValue< 0,-2, 0>();
1357 V[2] = S.template getValue< 0,-1, 0>();
1358 V[3] = S.template getValue< 0, 0, 0>();
1359 V[4] = S.template getValue< 0, 1, 0>();
1360 V[5] = S.template getValue< 0, 2, 0>();
1362 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1365 template<
typename Stencil>
1366 static typename Stencil::ValueType
inZ(
const Stencil& S)
1368 using ValueType =
typename Stencil::ValueType;
1370 V[0] = S.template getValue< 0, 0,-3>();
1371 V[1] = S.template getValue< 0, 0,-2>();
1372 V[2] = S.template getValue< 0, 0,-1>();
1373 V[3] = S.template getValue< 0, 0, 0>();
1374 V[4] = S.template getValue< 0, 0, 1>();
1375 V[5] = S.template getValue< 0, 0, 2>();
1377 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1385 template<
typename ValueType>
1386 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1387 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1393 template<
typename Accessor>
1394 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1396 using ValueType =
typename Accessor::ValueType;
1398 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1399 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1400 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1401 V[3] = grid.getValue(ijk);
1402 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1403 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1405 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1408 template<
typename Accessor>
1409 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1411 using ValueType =
typename Accessor::ValueType;
1413 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1414 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1415 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1416 V[3] = grid.getValue(ijk);
1417 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1418 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1420 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1423 template<
typename Accessor>
1424 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1426 using ValueType =
typename Accessor::ValueType;
1428 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1429 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1430 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1431 V[3] = grid.getValue(ijk);
1432 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1433 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1435 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1439 template<
typename Stencil>
1440 static typename Stencil::ValueType
inX(
const Stencil& S)
1442 using ValueType =
typename Stencil::ValueType;
1444 V[0] = S.template getValue<-3, 0, 0>();
1445 V[1] = S.template getValue<-2, 0, 0>();
1446 V[2] = S.template getValue<-1, 0, 0>();
1447 V[3] = S.template getValue< 0, 0, 0>();
1448 V[4] = S.template getValue< 1, 0, 0>();
1449 V[5] = S.template getValue< 2, 0, 0>();
1451 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1454 template<
typename Stencil>
1455 static typename Stencil::ValueType
inY(
const Stencil& S)
1457 using ValueType =
typename Stencil::ValueType;
1459 V[0] = S.template getValue< 0,-3, 0>();
1460 V[1] = S.template getValue< 0,-2, 0>();
1461 V[2] = S.template getValue< 0,-1, 0>();
1462 V[3] = S.template getValue< 0, 0, 0>();
1463 V[4] = S.template getValue< 0, 1, 0>();
1464 V[5] = S.template getValue< 0, 2, 0>();
1466 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1469 template<
typename Stencil>
1470 static typename Stencil::ValueType
inZ(
const Stencil& S)
1472 using ValueType =
typename Stencil::ValueType;
1474 V[0] = S.template getValue< 0, 0,-3>();
1475 V[1] = S.template getValue< 0, 0,-2>();
1476 V[2] = S.template getValue< 0, 0,-1>();
1477 V[3] = S.template getValue< 0, 0, 0>();
1478 V[4] = S.template getValue< 0, 0, 1>();
1479 V[5] = S.template getValue< 0, 0, 2>();
1481 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1486 template<DScheme DiffScheme>
1490 template<
typename Accessor>
1491 static typename Accessor::ValueType::value_type
1497 template<
typename Accessor>
1498 static typename Accessor::ValueType::value_type
1503 template<
typename Accessor>
1504 static typename Accessor::ValueType::value_type
1512 template<
typename Stencil>
1513 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1518 template<
typename Stencil>
1519 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1524 template<
typename Stencil>
1525 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1537 template<
typename Accessor>
1538 static typename Accessor::ValueType::value_type
1542 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1545 template<
typename Accessor>
1546 static typename Accessor::ValueType::value_type
1550 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1553 template<
typename Accessor>
1554 static typename Accessor::ValueType::value_type
1558 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1562 template<
typename Stencil>
1563 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1566 S.template getValue<-1, 0, 0>()[n] );
1569 template<
typename Stencil>
1570 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1573 S.template getValue< 0,-1, 0>()[n] );
1576 template<
typename Stencil>
1577 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1580 S.template getValue< 0, 0,-1>()[n] );
1589 template<
typename Accessor>
1590 static typename Accessor::ValueType::value_type
1594 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1597 template<
typename Accessor>
1598 static typename Accessor::ValueType::value_type
1602 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1605 template<
typename Accessor>
1606 static typename Accessor::ValueType::value_type
1610 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1615 template<
typename Stencil>
1616 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1619 S.template getValue<-1, 0, 0>()[n] );
1622 template<
typename Stencil>
1623 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1626 S.template getValue< 0,-1, 0>()[n] );
1629 template<
typename Stencil>
1630 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1633 S.template getValue< 0, 0,-1>()[n] );
1644 template<
typename Accessor>
1645 static typename Accessor::ValueType::value_type
1649 grid.getValue(ijk.
offsetBy(2, 0, 0))[n], grid.getValue(ijk.
offsetBy( 1, 0, 0))[n],
1650 grid.getValue(ijk.
offsetBy(-1,0, 0))[n], grid.getValue(ijk.
offsetBy(-2, 0, 0))[n]);
1653 template<
typename Accessor>
1654 static typename Accessor::ValueType::value_type
1658 grid.getValue(ijk.
offsetBy( 0, 2, 0))[n], grid.getValue(ijk.
offsetBy( 0, 1, 0))[n],
1659 grid.getValue(ijk.
offsetBy( 0,-1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-2, 0))[n]);
1662 template<
typename Accessor>
1663 static typename Accessor::ValueType::value_type
1667 grid.getValue(ijk.
offsetBy(0,0, 2))[n], grid.getValue(ijk.
offsetBy( 0, 0, 1))[n],
1668 grid.getValue(ijk.
offsetBy(0,0,-1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-2))[n]);
1672 template<
typename Stencil>
1673 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1676 S.template getValue< 2, 0, 0>()[n], S.template getValue< 1, 0, 0>()[n],
1677 S.template getValue<-1, 0, 0>()[n], S.template getValue<-2, 0, 0>()[n] );
1680 template<
typename Stencil>
1681 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1684 S.template getValue< 0, 2, 0>()[n], S.template getValue< 0, 1, 0>()[n],
1685 S.template getValue< 0,-1, 0>()[n], S.template getValue< 0,-2, 0>()[n]);
1688 template<
typename Stencil>
1689 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1692 S.template getValue< 0, 0, 2>()[n], S.template getValue< 0, 0, 1>()[n],
1693 S.template getValue< 0, 0,-1>()[n], S.template getValue< 0, 0,-2>()[n]);
1704 template<
typename Accessor>
1705 static typename Accessor::ValueType::value_type
1709 grid.getValue(ijk.
offsetBy( 3, 0, 0))[n], grid.getValue(ijk.
offsetBy( 2, 0, 0))[n],
1710 grid.getValue(ijk.
offsetBy( 1, 0, 0))[n], grid.getValue(ijk.
offsetBy(-1, 0, 0))[n],
1711 grid.getValue(ijk.
offsetBy(-2, 0, 0))[n], grid.getValue(ijk.
offsetBy(-3, 0, 0))[n] );
1714 template<
typename Accessor>
1715 static typename Accessor::ValueType::value_type
1719 grid.getValue(ijk.
offsetBy( 0, 3, 0))[n], grid.getValue(ijk.
offsetBy( 0, 2, 0))[n],
1720 grid.getValue(ijk.
offsetBy( 0, 1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-1, 0))[n],
1721 grid.getValue(ijk.
offsetBy( 0,-2, 0))[n], grid.getValue(ijk.
offsetBy( 0,-3, 0))[n] );
1724 template<
typename Accessor>
1725 static typename Accessor::ValueType::value_type
1729 grid.getValue(ijk.
offsetBy( 0, 0, 3))[n], grid.getValue(ijk.
offsetBy( 0, 0, 2))[n],
1730 grid.getValue(ijk.
offsetBy( 0, 0, 1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-1))[n],
1731 grid.getValue(ijk.
offsetBy( 0, 0,-2))[n], grid.getValue(ijk.
offsetBy( 0, 0,-3))[n] );
1736 template<
typename Stencil>
1737 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1740 S.template getValue< 3, 0, 0>()[n], S.template getValue< 2, 0, 0>()[n],
1741 S.template getValue< 1, 0, 0>()[n], S.template getValue<-1, 0, 0>()[n],
1742 S.template getValue<-2, 0, 0>()[n], S.template getValue<-3, 0, 0>()[n] );
1745 template<
typename Stencil>
1746 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1749 S.template getValue< 0, 3, 0>()[n], S.template getValue< 0, 2, 0>()[n],
1750 S.template getValue< 0, 1, 0>()[n], S.template getValue< 0,-1, 0>()[n],
1751 S.template getValue< 0,-2, 0>()[n], S.template getValue< 0,-3, 0>()[n] );
1754 template<
typename Stencil>
1755 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1758 S.template getValue< 0, 0, 3>()[n], S.template getValue< 0, 0, 2>()[n],
1759 S.template getValue< 0, 0, 1>()[n], S.template getValue< 0, 0,-1>()[n],
1760 S.template getValue< 0, 0,-2>()[n], S.template getValue< 0, 0,-3>()[n] );
1764 template<DDScheme DiffScheme>
1768 template<
typename Accessor>
1769 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
1770 template<
typename Accessor>
1771 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
1772 template<
typename Accessor>
1773 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
1776 template<
typename Accessor>
1777 static typename Accessor::ValueType inXandY(
const Accessor& grid,
const Coord& ijk);
1779 template<
typename Accessor>
1780 static typename Accessor::ValueType inXandZ(
const Accessor& grid,
const Coord& ijk);
1782 template<
typename Accessor>
1783 static typename Accessor::ValueType inYandZ(
const Accessor& grid,
const Coord& ijk);
1787 template<
typename Stencil>
1788 static typename Stencil::ValueType inX(
const Stencil& S);
1789 template<
typename Stencil>
1790 static typename Stencil::ValueType inY(
const Stencil& S);
1791 template<
typename Stencil>
1792 static typename Stencil::ValueType inZ(
const Stencil& S);
1795 template<
typename Stencil>
1796 static typename Stencil::ValueType inXandY(
const Stencil& S);
1798 template<
typename Stencil>
1799 static typename Stencil::ValueType inXandZ(
const Stencil& S);
1801 template<
typename Stencil>
1802 static typename Stencil::ValueType inYandZ(
const Stencil& S);
1810 template <
typename ValueType>
1811 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0,
const ValueType& xm1)
1813 return xp1 + xm1 - ValueType(2)*xp0;
1816 template <
typename ValueType>
1818 const ValueType& xmyp,
const ValueType& xmym)
1820 return ValueType(0.25)*(xpyp + xmym - xpym - xmyp);
1824 template<
typename Accessor>
1825 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1827 return difference( grid.getValue(ijk.
offsetBy( 1,0,0)), grid.getValue(ijk),
1828 grid.getValue(ijk.
offsetBy(-1,0,0)) );
1831 template<
typename Accessor>
1832 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1835 return difference( grid.getValue(ijk.
offsetBy(0, 1,0)), grid.getValue(ijk),
1836 grid.getValue(ijk.
offsetBy(0,-1,0)) );
1839 template<
typename Accessor>
1840 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1842 return difference( grid.getValue(ijk.
offsetBy( 0,0, 1)), grid.getValue(ijk),
1843 grid.getValue(ijk.
offsetBy( 0,0,-1)) );
1847 template<
typename Accessor>
1848 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1850 return crossdifference(
1852 grid.getValue(ijk.
offsetBy(-1,1,0)), grid.getValue(ijk.
offsetBy(-1,-1,0)));
1856 template<
typename Accessor>
1857 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1859 return crossdifference(
1861 grid.getValue(ijk.
offsetBy(-1,0,1)), grid.getValue(ijk.
offsetBy(-1,0,-1)) );
1864 template<
typename Accessor>
1865 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
1867 return crossdifference(
1869 grid.getValue(ijk.
offsetBy(0,-1,1)), grid.getValue(ijk.
offsetBy(0,-1,-1)) );
1874 template<
typename Stencil>
1875 static typename Stencil::ValueType
inX(
const Stencil& S)
1877 return difference( S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
1878 S.template getValue<-1, 0, 0>() );
1881 template<
typename Stencil>
1882 static typename Stencil::ValueType
inY(
const Stencil& S)
1884 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
1885 S.template getValue< 0,-1, 0>() );
1888 template<
typename Stencil>
1889 static typename Stencil::ValueType
inZ(
const Stencil& S)
1891 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
1892 S.template getValue< 0, 0,-1>() );
1896 template<
typename Stencil>
1897 static typename Stencil::ValueType
inXandY(
const Stencil& S)
1899 return crossdifference(S.template getValue< 1, 1, 0>(), S.template getValue< 1,-1, 0>(),
1900 S.template getValue<-1, 1, 0>(), S.template getValue<-1,-1, 0>() );
1903 template<
typename Stencil>
1904 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
1906 return crossdifference(S.template getValue< 1, 0, 1>(), S.template getValue< 1, 0,-1>(),
1907 S.template getValue<-1, 0, 1>(), S.template getValue<-1, 0,-1>() );
1910 template<
typename Stencil>
1911 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
1913 return crossdifference(S.template getValue< 0, 1, 1>(), S.template getValue< 0, 1,-1>(),
1914 S.template getValue< 0,-1, 1>(), S.template getValue< 0,-1,-1>() );
1924 template <
typename ValueType>
1925 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0,
1926 const ValueType& xm1,
const ValueType& xm2) {
1927 return ValueType(-1./12.)*(xp2 + xm2) + ValueType(4./3.)*(xp1 + xm1) -ValueType(2.5)*xp0;
1930 template <
typename ValueType>
1932 const ValueType& xp2ym1,
const ValueType& xp2ym2,
1933 const ValueType& xp1yp2,
const ValueType& xp1yp1,
1934 const ValueType& xp1ym1,
const ValueType& xp1ym2,
1935 const ValueType& xm2yp2,
const ValueType& xm2yp1,
1936 const ValueType& xm2ym1,
const ValueType& xm2ym2,
1937 const ValueType& xm1yp2,
const ValueType& xm1yp1,
1938 const ValueType& xm1ym1,
const ValueType& xm1ym2 ) {
1940 ValueType(2./3.0)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1)-
1941 ValueType(1./12.)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1);
1943 ValueType(2./3.0)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2)-
1944 ValueType(1./12.)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2);
1946 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1952 template<
typename Accessor>
1953 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1958 grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)));
1961 template<
typename Accessor>
1962 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1967 grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk.
offsetBy(0,-2, 0)));
1970 template<
typename Accessor>
1971 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1980 template<
typename Accessor>
1981 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1983 using ValueType =
typename Accessor::ValueType;
1984 typename Accessor::ValueType tmp1 =
1987 typename Accessor::ValueType tmp2 =
1990 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1993 template<
typename Accessor>
1994 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1996 using ValueType =
typename Accessor::ValueType;
1997 typename Accessor::ValueType tmp1 =
2000 typename Accessor::ValueType tmp2 =
2003 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2006 template<
typename Accessor>
2007 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2009 using ValueType =
typename Accessor::ValueType;
2010 typename Accessor::ValueType tmp1 =
2013 typename Accessor::ValueType tmp2 =
2016 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2021 template<
typename Stencil>
2022 static typename Stencil::ValueType
inX(
const Stencil& S)
2024 return difference(S.template getValue< 2, 0, 0>(), S.template getValue< 1, 0, 0>(),
2025 S.template getValue< 0, 0, 0>(),
2026 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>() );
2029 template<
typename Stencil>
2030 static typename Stencil::ValueType
inY(
const Stencil& S)
2032 return difference(S.template getValue< 0, 2, 0>(), S.template getValue< 0, 1, 0>(),
2033 S.template getValue< 0, 0, 0>(),
2034 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>() );
2037 template<
typename Stencil>
2038 static typename Stencil::ValueType
inZ(
const Stencil& S)
2040 return difference(S.template getValue< 0, 0, 2>(), S.template getValue< 0, 0, 1>(),
2041 S.template getValue< 0, 0, 0>(),
2042 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>() );
2046 template<
typename Stencil>
2047 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2049 return crossdifference(
2050 S.template getValue< 2, 2, 0>(), S.template getValue< 2, 1, 0>(),
2051 S.template getValue< 2,-1, 0>(), S.template getValue< 2,-2, 0>(),
2052 S.template getValue< 1, 2, 0>(), S.template getValue< 1, 1, 0>(),
2053 S.template getValue< 1,-1, 0>(), S.template getValue< 1,-2, 0>(),
2054 S.template getValue<-2, 2, 0>(), S.template getValue<-2, 1, 0>(),
2055 S.template getValue<-2,-1, 0>(), S.template getValue<-2,-2, 0>(),
2056 S.template getValue<-1, 2, 0>(), S.template getValue<-1, 1, 0>(),
2057 S.template getValue<-1,-1, 0>(), S.template getValue<-1,-2, 0>() );
2060 template<
typename Stencil>
2061 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2063 return crossdifference(
2064 S.template getValue< 2, 0, 2>(), S.template getValue< 2, 0, 1>(),
2065 S.template getValue< 2, 0,-1>(), S.template getValue< 2, 0,-2>(),
2066 S.template getValue< 1, 0, 2>(), S.template getValue< 1, 0, 1>(),
2067 S.template getValue< 1, 0,-1>(), S.template getValue< 1, 0,-2>(),
2068 S.template getValue<-2, 0, 2>(), S.template getValue<-2, 0, 1>(),
2069 S.template getValue<-2, 0,-1>(), S.template getValue<-2, 0,-2>(),
2070 S.template getValue<-1, 0, 2>(), S.template getValue<-1, 0, 1>(),
2071 S.template getValue<-1, 0,-1>(), S.template getValue<-1, 0,-2>() );
2074 template<
typename Stencil>
2075 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2077 return crossdifference(
2078 S.template getValue< 0, 2, 2>(), S.template getValue< 0, 2, 1>(),
2079 S.template getValue< 0, 2,-1>(), S.template getValue< 0, 2,-2>(),
2080 S.template getValue< 0, 1, 2>(), S.template getValue< 0, 1, 1>(),
2081 S.template getValue< 0, 1,-1>(), S.template getValue< 0, 1,-2>(),
2082 S.template getValue< 0,-2, 2>(), S.template getValue< 0,-2, 1>(),
2083 S.template getValue< 0,-2,-1>(), S.template getValue< 0,-2,-2>(),
2084 S.template getValue< 0,-1, 2>(), S.template getValue< 0,-1, 1>(),
2085 S.template getValue< 0,-1,-1>(), S.template getValue< 0,-1,-2>() );
2094 template <
typename ValueType>
2095 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
2096 const ValueType& xp0,
2097 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3)
2099 return ValueType(1./90.)*(xp3 + xm3) - ValueType(3./20.)*(xp2 + xm2)
2100 + ValueType(1.5)*(xp1 + xm1) - ValueType(49./18.)*xp0;
2103 template <
typename ValueType>
2105 const ValueType& xp1ym1,
const ValueType& xm1ym1,
2106 const ValueType& xp2yp1,
const ValueType& xm2yp1,
2107 const ValueType& xp2ym1,
const ValueType& xm2ym1,
2108 const ValueType& xp3yp1,
const ValueType& xm3yp1,
2109 const ValueType& xp3ym1,
const ValueType& xm3ym1,
2110 const ValueType& xp1yp2,
const ValueType& xm1yp2,
2111 const ValueType& xp1ym2,
const ValueType& xm1ym2,
2112 const ValueType& xp2yp2,
const ValueType& xm2yp2,
2113 const ValueType& xp2ym2,
const ValueType& xm2ym2,
2114 const ValueType& xp3yp2,
const ValueType& xm3yp2,
2115 const ValueType& xp3ym2,
const ValueType& xm3ym2,
2116 const ValueType& xp1yp3,
const ValueType& xm1yp3,
2117 const ValueType& xp1ym3,
const ValueType& xm1ym3,
2118 const ValueType& xp2yp3,
const ValueType& xm2yp3,
2119 const ValueType& xp2ym3,
const ValueType& xm2ym3,
2120 const ValueType& xp3yp3,
const ValueType& xm3yp3,
2121 const ValueType& xp3ym3,
const ValueType& xm3ym3 )
2124 ValueType(0.7500)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1) -
2125 ValueType(0.1500)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1) +
2126 ValueType(1./60.)*(xp3yp1 - xm3yp1 - xp3ym1 + xm3ym1);
2129 ValueType(0.7500)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2) -
2130 ValueType(0.1500)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2) +
2131 ValueType(1./60.)*(xp3yp2 - xm3yp2 - xp3ym2 + xm3ym2);
2134 ValueType(0.7500)*(xp1yp3 - xm1yp3 - xp1ym3 + xm1ym3) -
2135 ValueType(0.1500)*(xp2yp3 - xm2yp3 - xp2ym3 + xm2ym3) +
2136 ValueType(1./60.)*(xp3yp3 - xm3yp3 - xp3ym3 + xm3ym3);
2138 return ValueType(0.75)*tmp1 - ValueType(0.15)*tmp2 + ValueType(1./60)*tmp3;
2143 template<
typename Accessor>
2144 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2147 grid.getValue(ijk.
offsetBy( 3, 0, 0)), grid.getValue(ijk.
offsetBy( 2, 0, 0)),
2148 grid.getValue(ijk.
offsetBy( 1, 0, 0)), grid.getValue(ijk),
2149 grid.getValue(ijk.
offsetBy(-1, 0, 0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)),
2150 grid.getValue(ijk.
offsetBy(-3, 0, 0)) );
2153 template<
typename Accessor>
2154 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2157 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
2158 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk),
2159 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)),
2160 grid.getValue(ijk.
offsetBy( 0,-3, 0)) );
2163 template<
typename Accessor>
2164 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2168 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
2169 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk),
2170 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)),
2171 grid.getValue(ijk.
offsetBy( 0, 0,-3)) );
2174 template<
typename Accessor>
2175 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2177 using ValueT =
typename Accessor::ValueType;
2187 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2190 template<
typename Accessor>
2191 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2193 using ValueT =
typename Accessor::ValueType;
2203 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2206 template<
typename Accessor>
2207 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2209 using ValueT =
typename Accessor::ValueType;
2219 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2224 template<
typename Stencil>
2225 static typename Stencil::ValueType
inX(
const Stencil& S)
2227 return difference( S.template getValue< 3, 0, 0>(), S.template getValue< 2, 0, 0>(),
2228 S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
2229 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>(),
2230 S.template getValue<-3, 0, 0>() );
2233 template<
typename Stencil>
2234 static typename Stencil::ValueType
inY(
const Stencil& S)
2236 return difference( S.template getValue< 0, 3, 0>(), S.template getValue< 0, 2, 0>(),
2237 S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
2238 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>(),
2239 S.template getValue< 0,-3, 0>() );
2243 template<
typename Stencil>
2244 static typename Stencil::ValueType
inZ(
const Stencil& S)
2246 return difference( S.template getValue< 0, 0, 3>(), S.template getValue< 0, 0, 2>(),
2247 S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
2248 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>(),
2249 S.template getValue< 0, 0,-3>() );
2252 template<
typename Stencil>
2253 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2255 return crossdifference( S.template getValue< 1, 1, 0>(), S.template getValue<-1, 1, 0>(),
2256 S.template getValue< 1,-1, 0>(), S.template getValue<-1,-1, 0>(),
2257 S.template getValue< 2, 1, 0>(), S.template getValue<-2, 1, 0>(),
2258 S.template getValue< 2,-1, 0>(), S.template getValue<-2,-1, 0>(),
2259 S.template getValue< 3, 1, 0>(), S.template getValue<-3, 1, 0>(),
2260 S.template getValue< 3,-1, 0>(), S.template getValue<-3,-1, 0>(),
2261 S.template getValue< 1, 2, 0>(), S.template getValue<-1, 2, 0>(),
2262 S.template getValue< 1,-2, 0>(), S.template getValue<-1,-2, 0>(),
2263 S.template getValue< 2, 2, 0>(), S.template getValue<-2, 2, 0>(),
2264 S.template getValue< 2,-2, 0>(), S.template getValue<-2,-2, 0>(),
2265 S.template getValue< 3, 2, 0>(), S.template getValue<-3, 2, 0>(),
2266 S.template getValue< 3,-2, 0>(), S.template getValue<-3,-2, 0>(),
2267 S.template getValue< 1, 3, 0>(), S.template getValue<-1, 3, 0>(),
2268 S.template getValue< 1,-3, 0>(), S.template getValue<-1,-3, 0>(),
2269 S.template getValue< 2, 3, 0>(), S.template getValue<-2, 3, 0>(),
2270 S.template getValue< 2,-3, 0>(), S.template getValue<-2,-3, 0>(),
2271 S.template getValue< 3, 3, 0>(), S.template getValue<-3, 3, 0>(),
2272 S.template getValue< 3,-3, 0>(), S.template getValue<-3,-3, 0>() );
2275 template<
typename Stencil>
2276 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2278 return crossdifference( S.template getValue< 1, 0, 1>(), S.template getValue<-1, 0, 1>(),
2279 S.template getValue< 1, 0,-1>(), S.template getValue<-1, 0,-1>(),
2280 S.template getValue< 2, 0, 1>(), S.template getValue<-2, 0, 1>(),
2281 S.template getValue< 2, 0,-1>(), S.template getValue<-2, 0,-1>(),
2282 S.template getValue< 3, 0, 1>(), S.template getValue<-3, 0, 1>(),
2283 S.template getValue< 3, 0,-1>(), S.template getValue<-3, 0,-1>(),
2284 S.template getValue< 1, 0, 2>(), S.template getValue<-1, 0, 2>(),
2285 S.template getValue< 1, 0,-2>(), S.template getValue<-1, 0,-2>(),
2286 S.template getValue< 2, 0, 2>(), S.template getValue<-2, 0, 2>(),
2287 S.template getValue< 2, 0,-2>(), S.template getValue<-2, 0,-2>(),
2288 S.template getValue< 3, 0, 2>(), S.template getValue<-3, 0, 2>(),
2289 S.template getValue< 3, 0,-2>(), S.template getValue<-3, 0,-2>(),
2290 S.template getValue< 1, 0, 3>(), S.template getValue<-1, 0, 3>(),
2291 S.template getValue< 1, 0,-3>(), S.template getValue<-1, 0,-3>(),
2292 S.template getValue< 2, 0, 3>(), S.template getValue<-2, 0, 3>(),
2293 S.template getValue< 2, 0,-3>(), S.template getValue<-2, 0,-3>(),
2294 S.template getValue< 3, 0, 3>(), S.template getValue<-3, 0, 3>(),
2295 S.template getValue< 3, 0,-3>(), S.template getValue<-3, 0,-3>() );
2298 template<
typename Stencil>
2299 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2301 return crossdifference( S.template getValue< 0, 1, 1>(), S.template getValue< 0,-1, 1>(),
2302 S.template getValue< 0, 1,-1>(), S.template getValue< 0,-1,-1>(),
2303 S.template getValue< 0, 2, 1>(), S.template getValue< 0,-2, 1>(),
2304 S.template getValue< 0, 2,-1>(), S.template getValue< 0,-2,-1>(),
2305 S.template getValue< 0, 3, 1>(), S.template getValue< 0,-3, 1>(),
2306 S.template getValue< 0, 3,-1>(), S.template getValue< 0,-3,-1>(),
2307 S.template getValue< 0, 1, 2>(), S.template getValue< 0,-1, 2>(),
2308 S.template getValue< 0, 1,-2>(), S.template getValue< 0,-1,-2>(),
2309 S.template getValue< 0, 2, 2>(), S.template getValue< 0,-2, 2>(),
2310 S.template getValue< 0, 2,-2>(), S.template getValue< 0,-2,-2>(),
2311 S.template getValue< 0, 3, 2>(), S.template getValue< 0,-3, 2>(),
2312 S.template getValue< 0, 3,-2>(), S.template getValue< 0,-3,-2>(),
2313 S.template getValue< 0, 1, 3>(), S.template getValue< 0,-1, 3>(),
2314 S.template getValue< 0, 1,-3>(), S.template getValue< 0,-1,-3>(),
2315 S.template getValue< 0, 2, 3>(), S.template getValue< 0,-2, 3>(),
2316 S.template getValue< 0, 2,-3>(), S.template getValue< 0,-2,-3>(),
2317 S.template getValue< 0, 3, 3>(), S.template getValue< 0,-3, 3>(),
2318 S.template getValue< 0, 3,-3>(), S.template getValue< 0,-3,-3>() );
2327 #endif // OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1630
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2, const ValueType &xm3)
Definition: FiniteDifference.h:628
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1840
std::string dsSchemeToMenuName(DScheme dss)
Definition: FiniteDifference.h:120
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1239
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1051
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1252
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:546
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:715
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:874
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1655
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1184
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1689
Definition: FiniteDifference.h:152
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1320
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2225
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1726
Definition: FiniteDifference.h:153
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:475
Definition: FiniteDifference.h:170
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1591
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:481
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1519
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:803
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:517
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1563
Definition: FiniteDifference.h:43
Definition: FiniteDifference.h:33
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
Definition: FiniteDifference.h:41
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:967
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1971
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:450
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1599
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1716
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1499
std::string biasedGradientSchemeToString(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:177
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1755
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1000
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:883
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:638
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:836
static ValueType difference(const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:708
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1281
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1994
TemporalIntegrationScheme stringToTemporalIntegrationScheme(const std::string &s)
Definition: FiniteDifference.h:257
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:827
Definition: FiniteDifference.h:1487
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2299
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2164
Definition: FiniteDifference.h:50
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:775
Definition: FiniteDifference.h:171
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:458
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1706
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:959
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:740
Definition: FiniteDifference.h:167
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:795
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:567
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1547
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1366
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:509
TemporalIntegrationScheme
Temporal integration schemes.
Definition: FiniteDifference.h:234
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1470
Definition: FiniteDifference.h:46
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:466
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:24
DScheme
Different discrete schemes used in the first derivatives.
Definition: FiniteDifference.h:32
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1154
Definition: FiniteDifference.h:36
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:1015
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1570
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2207
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2276
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1646
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1673
Definition: FiniteDifference.h:157
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2022
Definition: FiniteDifference.h:45
static ValueType difference(const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:951
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:984
DScheme stringToDScheme(const std::string &s)
Definition: FiniteDifference.h:78
DDScheme
Different discrete schemes used in the second derivatives.
Definition: FiniteDifference.h:150
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1140
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:1911
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:535
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:487
std::string dsSchemeToString(DScheme dss)
Definition: FiniteDifference.h:54
double Real
Definition: Types.h:60
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1875
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1192
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:746
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1109
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2047
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1290
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1623
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:1897
Definition: FiniteDifference.h:44
BiasedGradientScheme stringToBiasedGradientScheme(const std::string &s)
Definition: FiniteDifference.h:192
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2253
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2144
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1539
Definition: FiniteDifference.h:174
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1737
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2030
static ValueType difference(const ValueType &xp1, const ValueType &xp0, const ValueType &xm1)
Definition: FiniteDifference.h:1811
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1825
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1455
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1832
Real GodunovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:352
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1041
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1166
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1953
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1124
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1069
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1857
Definition: FiniteDifference.h:236
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1505
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1492
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:918
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2244
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2175
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1962
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:444
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2007
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:1931
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:559
Definition: FiniteDifference.h:42
std::string temporalIntegrationSchemeToString(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:244
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1208
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:766
Definition: Exceptions.h:13
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1424
Definition: FiniteDifference.h:34
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:854
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2075
static ValueType difference(const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:899
static ValueType crossdifference(const ValueType &xpyp, const ValueType &xpym, const ValueType &xmyp, const ValueType &xmym)
Definition: FiniteDifference.h:1817
Definition: FiniteDifference.h:241
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:575
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1440
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:727
const Type & Max(const Type &a, const Type &b)
Return the maximum of two values.
Definition: Math.h:598
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:2104
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2191
Definition: FiniteDifference.h:1765
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1305
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:304
Definition: FiniteDifference.h:47
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1094
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1032
const Type & Min(const Type &a, const Type &b)
Return the minimum of two values.
Definition: Math.h:659
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1746
Definition: FiniteDifference.h:238
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1084
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2061
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:912
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1616
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2154
Definition: FiniteDifference.h:37
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1889
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2234
Definition: FiniteDifference.h:40
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:647
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:1904
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1577
Definition: FiniteDifference.h:39
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1351
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:938
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:734
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1263
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:758
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:845
Definition: FiniteDifference.h:35
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:525
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1681
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:906
static bool difference(const bool &xp1, const bool &)
Definition: FiniteDifference.h:502
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1060
Definition: FiniteDifference.h:38
std::string temporalIntegrationSchemeToMenuName(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:277
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:499
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:1409
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:721
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:604
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1513
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:584
Definition: FiniteDifference.h:237
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:992
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1336
Definition: FiniteDifference.h:151
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:926
Definition: FiniteDifference.h:168
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:613
Definition: FiniteDifference.h:416
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2038
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1925
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:811
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:677
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:975
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:540
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1525
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1848
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:656
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1555
Type Pow2(Type x)
Return x2.
Definition: Math.h:551
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1023
Definition: FiniteDifference.h:169
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:666
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1882
Definition: FiniteDifference.h:154
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1865
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:2095
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:689
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1607
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:865
std::string biasedGradientSchemeToMenuName(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:215
BiasedGradientScheme
Biased Gradients are limited to non-centered differences.
Definition: FiniteDifference.h:165
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:932
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:784
Definition: FiniteDifference.h:235
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1664
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1394
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:595
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:202
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1981
Definition: FiniteDifference.h:166
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1223
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1386