33 #ifndef OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
34 #define OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
41 #include <boost/algorithm/string/case_conv.hpp>
42 #include <boost/algorithm/string/trim.hpp>
45 #include <simd/Simd.h>
86 case CD_2NDT: ret =
"cd_2ndt";
break;
87 case CD_2ND: ret =
"cd_2nd";
break;
88 case CD_4TH: ret =
"cd_4th";
break;
89 case CD_6TH: ret =
"cd_6th";
break;
90 case FD_1ST: ret =
"fd_1st";
break;
91 case FD_2ND: ret =
"fd_2nd";
break;
92 case FD_3RD: ret =
"fd_3rd";
break;
93 case BD_1ST: ret =
"bd_1st";
break;
94 case BD_2ND: ret =
"bd_2nd";
break;
95 case BD_3RD: ret =
"bd_3rd";
break;
96 case FD_WENO5: ret =
"fd_weno5";
break;
97 case BD_WENO5: ret =
"bd_weno5";
break;
111 boost::to_lower(str);
151 case UNKNOWN_DS: ret =
"Unknown DS scheme";
break;
152 case CD_2NDT: ret =
"Twice 2nd-order center difference";
break;
153 case CD_2ND: ret =
"2nd-order center difference";
break;
154 case CD_4TH: ret =
"4th-order center difference";
break;
155 case CD_6TH: ret =
"6th-order center difference";
break;
156 case FD_1ST: ret =
"1st-order forward difference";
break;
157 case FD_2ND: ret =
"2nd-order forward difference";
break;
158 case FD_3RD: ret =
"3rd-order forward difference";
break;
159 case BD_1ST: ret =
"1st-order backward difference";
break;
160 case BD_2ND: ret =
"2nd-order backward difference";
break;
161 case BD_3RD: ret =
"3rd-order backward difference";
break;
162 case FD_WENO5: ret =
"5th-order WENO forward difference";
break;
163 case BD_WENO5: ret =
"5th-order WENO backward difference";
break;
164 case FD_HJWENO5: ret =
"5th-order HJ-WENO forward difference";
break;
165 case BD_HJWENO5: ret =
"5th-order HJ-WENO backward difference";
break;
225 boost::to_lower(str);
246 case UNKNOWN_BIAS: ret =
"Unknown biased gradient";
break;
247 case FIRST_BIAS: ret =
"1st-order biased gradient";
break;
248 case SECOND_BIAS: ret =
"2nd-order biased gradient";
break;
249 case THIRD_BIAS: ret =
"3rd-order biased gradient";
break;
250 case WENO5_BIAS: ret =
"5th-order WENO biased gradient";
break;
251 case HJWENO5_BIAS: ret =
"5th-order HJ-WENO biased gradient";
break;
276 case TVD_RK1: ret =
"tvd_rk1";
break;
277 case TVD_RK2: ret =
"tvd_rk2";
break;
278 case TVD_RK3: ret =
"tvd_rk3";
break;
290 boost::to_lower(str);
308 case UNKNOWN_TIS: ret =
"Unknown temporal integration";
break;
309 case TVD_RK1: ret =
"Forward Euler";
break;
310 case TVD_RK2: ret =
"2nd-order Runge-Kutta";
break;
311 case TVD_RK3: ret =
"3rd-order Runge-Kutta";
break;
329 template<
typename ValueType>
331 WENO5(
const ValueType& v1,
const ValueType& v2,
const ValueType& v3,
332 const ValueType& v4,
const ValueType& v5,
float scale2 = 0.01f)
334 const double C = 13.0 / 12.0;
339 const double eps = 1e-6 * scale2;
345 return static_cast<ValueType
>(
static_cast<ValueType
>(
346 A1*(2.0*v1 - 7.0*v2 + 11.0*v3) +
347 A2*(5.0*v3 - v2 + 2.0*v4) +
348 A3*(2.0*v3 + 5.0*v4 - v5))/(6.0*(A1+A2+A3)));
352 template <
typename Real>
377 template<
typename Real>
381 return GudonovsNormSqrd<Real>(isOutside,
382 gradient_m[0], gradient_p[0],
383 gradient_m[1], gradient_p[1],
384 gradient_m[2], gradient_p[2]);
389 inline simd::Float4 simdMin(
const simd::Float4& a,
const simd::Float4& b) {
390 return simd::Float4(_mm_min_ps(a.base(), b.base()));
392 inline simd::Float4 simdMax(
const simd::Float4& a,
const simd::Float4& b) {
393 return simd::Float4(_mm_max_ps(a.base(), b.base()));
396 inline float simdSum(
const simd::Float4& v);
398 inline simd::Float4
Pow2(
const simd::Float4& v) {
return v * v; }
402 WENO5<simd::Float4>(
const simd::Float4& v1,
const simd::Float4& v2,
const simd::Float4& v3,
403 const simd::Float4& v4,
const simd::Float4& v5,
float scale2)
406 typedef simd::Float4 F4;
409 eps(1.0e-6f * scale2),
410 two(2.0), three(3.0), four(4.0), five(5.0), fourth(0.25),
411 A1 = F4(0.1f) /
Pow2(C*
Pow2(v1-two*v2+v3) + fourth*
Pow2(v1-four*v2+three*v3) + eps),
412 A2 = F4(0.6f) /
Pow2(C*
Pow2(v2-two*v3+v4) + fourth*
Pow2(v2-v4) + eps),
413 A3 = F4(0.3f) /
Pow2(C*
Pow2(v3-two*v4+v5) + fourth*
Pow2(three*v3-four*v4+v5) + eps);
414 return (A1 * (two * v1 - F4(7.0) * v2 + F4(11.0) * v3) +
415 A2 * (five * v3 - v2 + two * v4) +
416 A3 * (two * v3 + five * v4 - v5)) / (F4(6.0) * (A1 + A2 + A3));
421 simdSum(
const simd::Float4& v)
424 __m128 temp = _mm_add_ps(v.base(), _mm_movehl_ps(v.base(), v.base()));
426 temp = _mm_add_ss(temp, _mm_shuffle_ps(temp, temp, 1));
427 return _mm_cvtss_f32(temp);
431 GudonovsNormSqrd(
bool isOutside,
const simd::Float4& dP_m,
const simd::Float4& dP_p)
433 const simd::Float4 zero(0.0);
434 simd::Float4 v = isOutside
436 : simdMax(math::
Pow2(simdMin(dP_m, zero)), math::
Pow2(simdMax(dP_p, zero)));
441 template<DScheme DiffScheme>
445 template<
typename Accessor>
446 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
448 template<
typename Accessor>
449 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
451 template<
typename Accessor>
452 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
455 template<
typename Stencil>
456 static typename Stencil::ValueType inX(
const Stencil& S);
458 template<
typename Stencil>
459 static typename Stencil::ValueType inY(
const Stencil& S);
461 template<
typename Stencil>
462 static typename Stencil::ValueType inZ(
const Stencil& S);
469 template <
typename ValueType>
470 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
475 template<
typename Accessor>
476 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
479 grid.getValue(ijk.
offsetBy(1, 0, 0)),
480 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
483 template<
typename Accessor>
484 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
487 grid.getValue(ijk.
offsetBy(0, 1, 0)),
488 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
491 template<
typename Accessor>
492 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
495 grid.getValue(ijk.
offsetBy(0, 0, 1)),
496 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
500 template<
typename Stencil>
501 static typename Stencil::ValueType
inX(
const Stencil& S)
503 return difference( S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
506 template<
typename Stencil>
507 static typename Stencil::ValueType
inY(
const Stencil& S)
509 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
512 template<
typename Stencil>
513 static typename Stencil::ValueType
inZ(
const Stencil& S)
515 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
524 template <
typename ValueType>
525 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
526 return (xp1 - xm1)*ValueType(0.5);
531 template<
typename Accessor>
532 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
535 grid.getValue(ijk.
offsetBy(1, 0, 0)),
536 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
539 template<
typename Accessor>
540 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
543 grid.getValue(ijk.
offsetBy(0, 1, 0)),
544 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
547 template<
typename Accessor>
548 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
551 grid.getValue(ijk.
offsetBy(0, 0, 1)),
552 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
557 template<
typename Stencil>
558 static typename Stencil::ValueType
inX(
const Stencil& S)
560 return difference(S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
562 template<
typename Stencil>
563 static typename Stencil::ValueType
inY(
const Stencil& S)
565 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
568 template<
typename Stencil>
569 static typename Stencil::ValueType
inZ(
const Stencil& S)
571 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
581 template <
typename ValueType>
582 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
583 const ValueType& xm1,
const ValueType& xm2 ) {
584 return ValueType(2./3.)*(xp1 - xm1) + ValueType(1./12.)*(xm2 - xp2) ;
589 template<
typename Accessor>
590 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
597 template<
typename Accessor>
598 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
602 grid.getValue(ijk.
offsetBy( 0, 2, 0)), grid.getValue(ijk.
offsetBy( 0, 1, 0)),
603 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)) );
606 template<
typename Accessor>
607 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
611 grid.getValue(ijk.
offsetBy( 0, 0, 2)), grid.getValue(ijk.
offsetBy( 0, 0, 1)),
612 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)) );
617 template<
typename Stencil>
618 static typename Stencil::ValueType
inX(
const Stencil& S)
620 return difference( S.template getValue< 2, 0, 0>(),
621 S.template getValue< 1, 0, 0>(),
622 S.template getValue<-1, 0, 0>(),
623 S.template getValue<-2, 0, 0>() );
626 template<
typename Stencil>
627 static typename Stencil::ValueType
inY(
const Stencil& S)
629 return difference( S.template getValue< 0, 2, 0>(),
630 S.template getValue< 0, 1, 0>(),
631 S.template getValue< 0,-1, 0>(),
632 S.template getValue< 0,-2, 0>() );
635 template<
typename Stencil>
636 static typename Stencil::ValueType
inZ(
const Stencil& S)
638 return difference( S.template getValue< 0, 0, 2>(),
639 S.template getValue< 0, 0, 1>(),
640 S.template getValue< 0, 0,-1>(),
641 S.template getValue< 0, 0,-2>() );
650 template <
typename ValueType>
651 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
652 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3 )
654 return ValueType(3./4.)*(xp1 - xm1) - ValueType(0.15)*(xp2 - xm2)
655 + ValueType(1./60.)*(xp3-xm3);
660 template<
typename Accessor>
661 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
669 template<
typename Accessor>
670 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
673 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
674 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk.
offsetBy( 0,-1, 0)),
675 grid.getValue(ijk.
offsetBy( 0,-2, 0)), grid.getValue(ijk.
offsetBy( 0,-3, 0)));
678 template<
typename Accessor>
679 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
682 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
683 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk.
offsetBy( 0, 0,-1)),
684 grid.getValue(ijk.
offsetBy( 0, 0,-2)), grid.getValue(ijk.
offsetBy( 0, 0,-3)));
688 template<
typename Stencil>
689 static typename Stencil::ValueType
inX(
const Stencil& S)
691 return difference(S.template getValue< 3, 0, 0>(),
692 S.template getValue< 2, 0, 0>(),
693 S.template getValue< 1, 0, 0>(),
694 S.template getValue<-1, 0, 0>(),
695 S.template getValue<-2, 0, 0>(),
696 S.template getValue<-3, 0, 0>());
699 template<
typename Stencil>
700 static typename Stencil::ValueType
inY(
const Stencil& S)
703 return difference( S.template getValue< 0, 3, 0>(),
704 S.template getValue< 0, 2, 0>(),
705 S.template getValue< 0, 1, 0>(),
706 S.template getValue< 0,-1, 0>(),
707 S.template getValue< 0,-2, 0>(),
708 S.template getValue< 0,-3, 0>());
711 template<
typename Stencil>
712 static typename Stencil::ValueType
inZ(
const Stencil& S)
715 return difference( S.template getValue< 0, 0, 3>(),
716 S.template getValue< 0, 0, 2>(),
717 S.template getValue< 0, 0, 1>(),
718 S.template getValue< 0, 0,-1>(),
719 S.template getValue< 0, 0,-2>(),
720 S.template getValue< 0, 0,-3>());
730 template <
typename ValueType>
731 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0) {
737 template<
typename Accessor>
738 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
740 return difference(grid.getValue(ijk.
offsetBy(1, 0, 0)), grid.getValue(ijk));
743 template<
typename Accessor>
744 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
746 return difference(grid.getValue(ijk.
offsetBy(0, 1, 0)), grid.getValue(ijk));
749 template<
typename Accessor>
750 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
752 return difference(grid.getValue(ijk.
offsetBy(0, 0, 1)), grid.getValue(ijk));
756 template<
typename Stencil>
757 static typename Stencil::ValueType
inX(
const Stencil& S)
759 return difference(S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>());
762 template<
typename Stencil>
763 static typename Stencil::ValueType
inY(
const Stencil& S)
765 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>());
768 template<
typename Stencil>
769 static typename Stencil::ValueType
inZ(
const Stencil& S)
771 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>());
780 template <
typename ValueType>
781 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0)
783 return ValueType(2)*xp1 -(ValueType(0.5)*xp2 + ValueType(3./2.)*xp0);
788 template<
typename Accessor>
789 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
797 template<
typename Accessor>
798 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
806 template<
typename Accessor>
807 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
817 template<
typename Stencil>
818 static typename Stencil::ValueType
inX(
const Stencil& S)
820 return difference( S.template getValue< 2, 0, 0>(),
821 S.template getValue< 1, 0, 0>(),
822 S.template getValue< 0, 0, 0>() );
825 template<
typename Stencil>
826 static typename Stencil::ValueType
inY(
const Stencil& S)
828 return difference( S.template getValue< 0, 2, 0>(),
829 S.template getValue< 0, 1, 0>(),
830 S.template getValue< 0, 0, 0>() );
833 template<
typename Stencil>
834 static typename Stencil::ValueType
inZ(
const Stencil& S)
836 return difference( S.template getValue< 0, 0, 2>(),
837 S.template getValue< 0, 0, 1>(),
838 S.template getValue< 0, 0, 0>() );
849 template<
typename ValueType>
850 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
851 const ValueType& xp1,
const ValueType& xp0)
853 return static_cast<ValueType
>(xp3/3.0 - 1.5*xp2 + 3.0*xp1 - 11.0*xp0/6.0);
858 template<
typename Accessor>
859 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
861 return difference( grid.getValue(ijk.
offsetBy(3,0,0)),
864 grid.getValue(ijk) );
867 template<
typename Accessor>
868 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
870 return difference( grid.getValue(ijk.
offsetBy(0,3,0)),
873 grid.getValue(ijk) );
876 template<
typename Accessor>
877 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
879 return difference( grid.getValue(ijk.
offsetBy(0,0,3)),
882 grid.getValue(ijk) );
887 template<
typename Stencil>
888 static typename Stencil::ValueType
inX(
const Stencil& S)
890 return difference(S.template getValue< 3, 0, 0>(),
891 S.template getValue< 2, 0, 0>(),
892 S.template getValue< 1, 0, 0>(),
893 S.template getValue< 0, 0, 0>() );
896 template<
typename Stencil>
897 static typename Stencil::ValueType
inY(
const Stencil& S)
899 return difference(S.template getValue< 0, 3, 0>(),
900 S.template getValue< 0, 2, 0>(),
901 S.template getValue< 0, 1, 0>(),
902 S.template getValue< 0, 0, 0>() );
905 template<
typename Stencil>
906 static typename Stencil::ValueType
inZ(
const Stencil& S)
908 return difference( S.template getValue< 0, 0, 3>(),
909 S.template getValue< 0, 0, 2>(),
910 S.template getValue< 0, 0, 1>(),
911 S.template getValue< 0, 0, 0>() );
921 template <
typename ValueType>
922 static ValueType
difference(
const ValueType& xm1,
const ValueType& xm0) {
928 template<
typename Accessor>
929 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
931 return difference(grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk));
934 template<
typename Accessor>
935 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
937 return difference(grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk));
940 template<
typename Accessor>
941 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
943 return difference(grid.getValue(ijk.
offsetBy(0, 0,-1)), grid.getValue(ijk));
948 template<
typename Stencil>
949 static typename Stencil::ValueType
inX(
const Stencil& S)
951 return difference(S.template getValue<-1, 0, 0>(), S.template getValue< 0, 0, 0>());
954 template<
typename Stencil>
955 static typename Stencil::ValueType
inY(
const Stencil& S)
957 return difference(S.template getValue< 0,-1, 0>(), S.template getValue< 0, 0, 0>());
960 template<
typename Stencil>
961 static typename Stencil::ValueType
inZ(
const Stencil& S)
963 return difference(S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0, 0>());
973 template <
typename ValueType>
974 static ValueType
difference(
const ValueType& xm2,
const ValueType& xm1,
const ValueType& xm0)
981 template<
typename Accessor>
982 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
984 return difference( grid.getValue(ijk.
offsetBy(-2,0,0)),
985 grid.getValue(ijk.
offsetBy(-1,0,0)),
986 grid.getValue(ijk) );
989 template<
typename Accessor>
990 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
992 return difference( grid.getValue(ijk.
offsetBy(0,-2,0)),
993 grid.getValue(ijk.
offsetBy(0,-1,0)),
994 grid.getValue(ijk) );
997 template<
typename Accessor>
998 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1000 return difference( grid.getValue(ijk.
offsetBy(0,0,-2)),
1001 grid.getValue(ijk.
offsetBy(0,0,-1)),
1002 grid.getValue(ijk) );
1006 template<
typename Stencil>
1007 static typename Stencil::ValueType
inX(
const Stencil& S)
1009 return difference( S.template getValue<-2, 0, 0>(),
1010 S.template getValue<-1, 0, 0>(),
1011 S.template getValue< 0, 0, 0>() );
1014 template<
typename Stencil>
1015 static typename Stencil::ValueType
inY(
const Stencil& S)
1017 return difference( S.template getValue< 0,-2, 0>(),
1018 S.template getValue< 0,-1, 0>(),
1019 S.template getValue< 0, 0, 0>() );
1022 template<
typename Stencil>
1023 static typename Stencil::ValueType
inZ(
const Stencil& S)
1025 return difference( S.template getValue< 0, 0,-2>(),
1026 S.template getValue< 0, 0,-1>(),
1027 S.template getValue< 0, 0, 0>() );
1037 template <
typename ValueType>
1038 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
1039 const ValueType& xm1,
const ValueType& xm0)
1045 template<
typename Accessor>
1046 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1048 return difference( grid.getValue(ijk.
offsetBy(-3,0,0)),
1049 grid.getValue(ijk.
offsetBy(-2,0,0)),
1050 grid.getValue(ijk.
offsetBy(-1,0,0)),
1051 grid.getValue(ijk) );
1054 template<
typename Accessor>
1055 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1057 return difference( grid.getValue(ijk.
offsetBy( 0,-3,0)),
1058 grid.getValue(ijk.
offsetBy( 0,-2,0)),
1059 grid.getValue(ijk.
offsetBy( 0,-1,0)),
1060 grid.getValue(ijk) );
1063 template<
typename Accessor>
1064 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1066 return difference( grid.getValue(ijk.
offsetBy( 0, 0,-3)),
1067 grid.getValue(ijk.
offsetBy( 0, 0,-2)),
1068 grid.getValue(ijk.
offsetBy( 0, 0,-1)),
1069 grid.getValue(ijk) );
1073 template<
typename Stencil>
1074 static typename Stencil::ValueType
inX(
const Stencil& S)
1076 return difference( S.template getValue<-3, 0, 0>(),
1077 S.template getValue<-2, 0, 0>(),
1078 S.template getValue<-1, 0, 0>(),
1079 S.template getValue< 0, 0, 0>() );
1082 template<
typename Stencil>
1083 static typename Stencil::ValueType
inY(
const Stencil& S)
1085 return difference( S.template getValue< 0,-3, 0>(),
1086 S.template getValue< 0,-2, 0>(),
1087 S.template getValue< 0,-1, 0>(),
1088 S.template getValue< 0, 0, 0>() );
1091 template<
typename Stencil>
1092 static typename Stencil::ValueType
inZ(
const Stencil& S)
1094 return difference( S.template getValue< 0, 0,-3>(),
1095 S.template getValue< 0, 0,-2>(),
1096 S.template getValue< 0, 0,-1>(),
1097 S.template getValue< 0, 0, 0>() );
1106 template <
typename ValueType>
1107 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1108 const ValueType& xp1,
const ValueType& xp0,
1109 const ValueType& xm1,
const ValueType& xm2) {
1110 return WENO5<ValueType>(xp3, xp2, xp1, xp0, xm1)
1111 - WENO5<ValueType>(xp2, xp1, xp0, xm1, xm2);
1116 template<
typename Accessor>
1117 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1119 typedef typename Accessor::ValueType ValueType;
1121 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1122 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1123 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1124 V[3] = grid.getValue(ijk);
1125 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1126 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1128 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1131 template<
typename Accessor>
1132 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1134 typedef typename Accessor::ValueType ValueType;
1136 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1137 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1138 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1139 V[3] = grid.getValue(ijk);
1140 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1141 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1143 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1146 template<
typename Accessor>
1147 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1149 typedef typename Accessor::ValueType ValueType;
1151 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1152 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1153 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1154 V[3] = grid.getValue(ijk);
1155 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1156 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1158 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1162 template<
typename Stencil>
1163 static typename Stencil::ValueType
inX(
const Stencil& S)
1166 return static_cast<typename Stencil::ValueType
>(difference(
1167 S.template getValue< 3, 0, 0>(),
1168 S.template getValue< 2, 0, 0>(),
1169 S.template getValue< 1, 0, 0>(),
1170 S.template getValue< 0, 0, 0>(),
1171 S.template getValue<-1, 0, 0>(),
1172 S.template getValue<-2, 0, 0>() ));
1176 template<
typename Stencil>
1177 static typename Stencil::ValueType
inY(
const Stencil& S)
1179 return static_cast<typename Stencil::ValueType
>(difference(
1180 S.template getValue< 0, 3, 0>(),
1181 S.template getValue< 0, 2, 0>(),
1182 S.template getValue< 0, 1, 0>(),
1183 S.template getValue< 0, 0, 0>(),
1184 S.template getValue< 0,-1, 0>(),
1185 S.template getValue< 0,-2, 0>() ));
1188 template<
typename Stencil>
1189 static typename Stencil::ValueType
inZ(
const Stencil& S)
1191 return static_cast<typename Stencil::ValueType
>(difference(
1192 S.template getValue< 0, 0, 3>(),
1193 S.template getValue< 0, 0, 2>(),
1194 S.template getValue< 0, 0, 1>(),
1195 S.template getValue< 0, 0, 0>(),
1196 S.template getValue< 0, 0,-1>(),
1197 S.template getValue< 0, 0,-2>() ));
1206 template <
typename ValueType>
1207 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1208 const ValueType& xp1,
const ValueType& xp0,
1209 const ValueType& xm1,
const ValueType& xm2) {
1210 return WENO5<ValueType>(xp3 - xp2, xp2 - xp1, xp1 - xp0, xp0-xm1, xm1-xm2);
1214 template<
typename Accessor>
1215 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1217 typedef typename Accessor::ValueType ValueType;
1219 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1220 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1221 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1222 V[3] = grid.getValue(ijk);
1223 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1224 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1226 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1230 template<
typename Accessor>
1231 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1233 typedef typename Accessor::ValueType ValueType;
1235 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1236 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1237 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1238 V[3] = grid.getValue(ijk);
1239 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1240 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1242 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1245 template<
typename Accessor>
1246 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1248 typedef typename Accessor::ValueType ValueType;
1250 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1251 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1252 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1253 V[3] = grid.getValue(ijk);
1254 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1255 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1257 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1261 template<
typename Stencil>
1262 static typename Stencil::ValueType
inX(
const Stencil& S)
1265 return difference( S.template getValue< 3, 0, 0>(),
1266 S.template getValue< 2, 0, 0>(),
1267 S.template getValue< 1, 0, 0>(),
1268 S.template getValue< 0, 0, 0>(),
1269 S.template getValue<-1, 0, 0>(),
1270 S.template getValue<-2, 0, 0>() );
1274 template<
typename Stencil>
1275 static typename Stencil::ValueType
inY(
const Stencil& S)
1277 return difference( S.template getValue< 0, 3, 0>(),
1278 S.template getValue< 0, 2, 0>(),
1279 S.template getValue< 0, 1, 0>(),
1280 S.template getValue< 0, 0, 0>(),
1281 S.template getValue< 0,-1, 0>(),
1282 S.template getValue< 0,-2, 0>() );
1285 template<
typename Stencil>
1286 static typename Stencil::ValueType
inZ(
const Stencil& S)
1289 return difference( S.template getValue< 0, 0, 3>(),
1290 S.template getValue< 0, 0, 2>(),
1291 S.template getValue< 0, 0, 1>(),
1292 S.template getValue< 0, 0, 0>(),
1293 S.template getValue< 0, 0,-1>(),
1294 S.template getValue< 0, 0,-2>() );
1303 template<
typename ValueType>
1304 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1305 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1312 template<
typename Accessor>
1313 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1315 typedef typename Accessor::ValueType ValueType;
1317 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1318 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1319 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1320 V[3] = grid.getValue(ijk);
1321 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1322 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1324 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1327 template<
typename Accessor>
1328 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1330 typedef typename Accessor::ValueType ValueType;
1332 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1333 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1334 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1335 V[3] = grid.getValue(ijk);
1336 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1337 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1339 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1342 template<
typename Accessor>
1343 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1345 typedef typename Accessor::ValueType ValueType;
1347 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1348 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1349 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1350 V[3] = grid.getValue(ijk);
1351 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1352 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1354 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1358 template<
typename Stencil>
1359 static typename Stencil::ValueType
inX(
const Stencil& S)
1361 typedef typename Stencil::ValueType ValueType;
1363 V[0] = S.template getValue<-3, 0, 0>();
1364 V[1] = S.template getValue<-2, 0, 0>();
1365 V[2] = S.template getValue<-1, 0, 0>();
1366 V[3] = S.template getValue< 0, 0, 0>();
1367 V[4] = S.template getValue< 1, 0, 0>();
1368 V[5] = S.template getValue< 2, 0, 0>();
1370 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1373 template<
typename Stencil>
1374 static typename Stencil::ValueType
inY(
const Stencil& S)
1376 typedef typename Stencil::ValueType ValueType;
1378 V[0] = S.template getValue< 0,-3, 0>();
1379 V[1] = S.template getValue< 0,-2, 0>();
1380 V[2] = S.template getValue< 0,-1, 0>();
1381 V[3] = S.template getValue< 0, 0, 0>();
1382 V[4] = S.template getValue< 0, 1, 0>();
1383 V[5] = S.template getValue< 0, 2, 0>();
1385 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1388 template<
typename Stencil>
1389 static typename Stencil::ValueType
inZ(
const Stencil& S)
1391 typedef typename Stencil::ValueType ValueType;
1393 V[0] = S.template getValue< 0, 0,-3>();
1394 V[1] = S.template getValue< 0, 0,-2>();
1395 V[2] = S.template getValue< 0, 0,-1>();
1396 V[3] = S.template getValue< 0, 0, 0>();
1397 V[4] = S.template getValue< 0, 0, 1>();
1398 V[5] = S.template getValue< 0, 0, 2>();
1400 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1408 template<
typename ValueType>
1409 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1410 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1416 template<
typename Accessor>
1417 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1419 typedef typename Accessor::ValueType ValueType;
1421 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1422 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1423 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1424 V[3] = grid.getValue(ijk);
1425 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1426 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1428 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1431 template<
typename Accessor>
1432 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1434 typedef typename Accessor::ValueType ValueType;
1436 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1437 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1438 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1439 V[3] = grid.getValue(ijk);
1440 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1441 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1443 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1446 template<
typename Accessor>
1447 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1449 typedef typename Accessor::ValueType ValueType;
1451 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1452 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1453 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1454 V[3] = grid.getValue(ijk);
1455 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1456 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1458 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1462 template<
typename Stencil>
1463 static typename Stencil::ValueType
inX(
const Stencil& S)
1465 typedef typename Stencil::ValueType ValueType;
1467 V[0] = S.template getValue<-3, 0, 0>();
1468 V[1] = S.template getValue<-2, 0, 0>();
1469 V[2] = S.template getValue<-1, 0, 0>();
1470 V[3] = S.template getValue< 0, 0, 0>();
1471 V[4] = S.template getValue< 1, 0, 0>();
1472 V[5] = S.template getValue< 2, 0, 0>();
1474 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1477 template<
typename Stencil>
1478 static typename Stencil::ValueType
inY(
const Stencil& S)
1480 typedef typename Stencil::ValueType ValueType;
1482 V[0] = S.template getValue< 0,-3, 0>();
1483 V[1] = S.template getValue< 0,-2, 0>();
1484 V[2] = S.template getValue< 0,-1, 0>();
1485 V[3] = S.template getValue< 0, 0, 0>();
1486 V[4] = S.template getValue< 0, 1, 0>();
1487 V[5] = S.template getValue< 0, 2, 0>();
1489 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1492 template<
typename Stencil>
1493 static typename Stencil::ValueType
inZ(
const Stencil& S)
1495 typedef typename Stencil::ValueType ValueType;
1497 V[0] = S.template getValue< 0, 0,-3>();
1498 V[1] = S.template getValue< 0, 0,-2>();
1499 V[2] = S.template getValue< 0, 0,-1>();
1500 V[3] = S.template getValue< 0, 0, 0>();
1501 V[4] = S.template getValue< 0, 0, 1>();
1502 V[5] = S.template getValue< 0, 0, 2>();
1504 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1509 template<DScheme DiffScheme>
1513 template<
typename Accessor>
1514 static typename Accessor::ValueType::value_type
1520 template<
typename Accessor>
1521 static typename Accessor::ValueType::value_type
1526 template<
typename Accessor>
1527 static typename Accessor::ValueType::value_type
1535 template<
typename Stencil>
1536 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1541 template<
typename Stencil>
1542 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1547 template<
typename Stencil>
1548 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1560 template<
typename Accessor>
1561 static typename Accessor::ValueType::value_type
1565 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1568 template<
typename Accessor>
1569 static typename Accessor::ValueType::value_type
1573 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1576 template<
typename Accessor>
1577 static typename Accessor::ValueType::value_type
1581 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1585 template<
typename Stencil>
1586 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1589 S.template getValue<-1, 0, 0>()[n] );
1592 template<
typename Stencil>
1593 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1596 S.template getValue< 0,-1, 0>()[n] );
1599 template<
typename Stencil>
1600 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1603 S.template getValue< 0, 0,-1>()[n] );
1612 template<
typename Accessor>
1613 static typename Accessor::ValueType::value_type
1617 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1620 template<
typename Accessor>
1621 static typename Accessor::ValueType::value_type
1625 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1628 template<
typename Accessor>
1629 static typename Accessor::ValueType::value_type
1633 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1638 template<
typename Stencil>
1639 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1642 S.template getValue<-1, 0, 0>()[n] );
1645 template<
typename Stencil>
1646 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1649 S.template getValue< 0,-1, 0>()[n] );
1652 template<
typename Stencil>
1653 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1656 S.template getValue< 0, 0,-1>()[n] );
1667 template<
typename Accessor>
1668 static typename Accessor::ValueType::value_type
1672 grid.getValue(ijk.
offsetBy(2, 0, 0))[n], grid.getValue(ijk.
offsetBy( 1, 0, 0))[n],
1673 grid.getValue(ijk.
offsetBy(-1,0, 0))[n], grid.getValue(ijk.
offsetBy(-2, 0, 0))[n]);
1676 template<
typename Accessor>
1677 static typename Accessor::ValueType::value_type
1681 grid.getValue(ijk.
offsetBy( 0, 2, 0))[n], grid.getValue(ijk.
offsetBy( 0, 1, 0))[n],
1682 grid.getValue(ijk.
offsetBy( 0,-1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-2, 0))[n]);
1685 template<
typename Accessor>
1686 static typename Accessor::ValueType::value_type
1690 grid.getValue(ijk.
offsetBy(0,0, 2))[n], grid.getValue(ijk.
offsetBy( 0, 0, 1))[n],
1691 grid.getValue(ijk.
offsetBy(0,0,-1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-2))[n]);
1695 template<
typename Stencil>
1696 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1699 S.template getValue< 2, 0, 0>()[n], S.template getValue< 1, 0, 0>()[n],
1700 S.template getValue<-1, 0, 0>()[n], S.template getValue<-2, 0, 0>()[n] );
1703 template<
typename Stencil>
1704 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1707 S.template getValue< 0, 2, 0>()[n], S.template getValue< 0, 1, 0>()[n],
1708 S.template getValue< 0,-1, 0>()[n], S.template getValue< 0,-2, 0>()[n]);
1711 template<
typename Stencil>
1712 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1715 S.template getValue< 0, 0, 2>()[n], S.template getValue< 0, 0, 1>()[n],
1716 S.template getValue< 0, 0,-1>()[n], S.template getValue< 0, 0,-2>()[n]);
1727 template<
typename Accessor>
1728 static typename Accessor::ValueType::value_type
1732 grid.getValue(ijk.
offsetBy( 3, 0, 0))[n], grid.getValue(ijk.
offsetBy( 2, 0, 0))[n],
1733 grid.getValue(ijk.
offsetBy( 1, 0, 0))[n], grid.getValue(ijk.
offsetBy(-1, 0, 0))[n],
1734 grid.getValue(ijk.
offsetBy(-2, 0, 0))[n], grid.getValue(ijk.
offsetBy(-3, 0, 0))[n] );
1737 template<
typename Accessor>
1738 static typename Accessor::ValueType::value_type
1742 grid.getValue(ijk.
offsetBy( 0, 3, 0))[n], grid.getValue(ijk.
offsetBy( 0, 2, 0))[n],
1743 grid.getValue(ijk.
offsetBy( 0, 1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-1, 0))[n],
1744 grid.getValue(ijk.
offsetBy( 0,-2, 0))[n], grid.getValue(ijk.
offsetBy( 0,-3, 0))[n] );
1747 template<
typename Accessor>
1748 static typename Accessor::ValueType::value_type
1752 grid.getValue(ijk.
offsetBy( 0, 0, 3))[n], grid.getValue(ijk.
offsetBy( 0, 0, 2))[n],
1753 grid.getValue(ijk.
offsetBy( 0, 0, 1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-1))[n],
1754 grid.getValue(ijk.
offsetBy( 0, 0,-2))[n], grid.getValue(ijk.
offsetBy( 0, 0,-3))[n] );
1759 template<
typename Stencil>
1760 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1763 S.template getValue< 3, 0, 0>()[n], S.template getValue< 2, 0, 0>()[n],
1764 S.template getValue< 1, 0, 0>()[n], S.template getValue<-1, 0, 0>()[n],
1765 S.template getValue<-2, 0, 0>()[n], S.template getValue<-3, 0, 0>()[n] );
1768 template<
typename Stencil>
1769 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1772 S.template getValue< 0, 3, 0>()[n], S.template getValue< 0, 2, 0>()[n],
1773 S.template getValue< 0, 1, 0>()[n], S.template getValue< 0,-1, 0>()[n],
1774 S.template getValue< 0,-2, 0>()[n], S.template getValue< 0,-3, 0>()[n] );
1777 template<
typename Stencil>
1778 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1781 S.template getValue< 0, 0, 3>()[n], S.template getValue< 0, 0, 2>()[n],
1782 S.template getValue< 0, 0, 1>()[n], S.template getValue< 0, 0,-1>()[n],
1783 S.template getValue< 0, 0,-2>()[n], S.template getValue< 0, 0,-3>()[n] );
1787 template<DDScheme DiffScheme>
1791 template<
typename Accessor>
1792 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
1793 template<
typename Accessor>
1794 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
1795 template<
typename Accessor>
1796 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
1799 template<
typename Accessor>
1800 static typename Accessor::ValueType inXandY(
const Accessor& grid,
const Coord& ijk);
1802 template<
typename Accessor>
1803 static typename Accessor::ValueType inXandZ(
const Accessor& grid,
const Coord& ijk);
1805 template<
typename Accessor>
1806 static typename Accessor::ValueType inYandZ(
const Accessor& grid,
const Coord& ijk);
1810 template<
typename Stencil>
1811 static typename Stencil::ValueType inX(
const Stencil& S);
1812 template<
typename Stencil>
1813 static typename Stencil::ValueType inY(
const Stencil& S);
1814 template<
typename Stencil>
1815 static typename Stencil::ValueType inZ(
const Stencil& S);
1818 template<
typename Stencil>
1819 static typename Stencil::ValueType inXandY(
const Stencil& S);
1821 template<
typename Stencil>
1822 static typename Stencil::ValueType inXandZ(
const Stencil& S);
1824 template<
typename Stencil>
1825 static typename Stencil::ValueType inYandZ(
const Stencil& S);
1833 template <
typename ValueType>
1834 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0,
const ValueType& xm1)
1836 return xp1 + xm1 - ValueType(2)*xp0;
1839 template <
typename ValueType>
1841 const ValueType& xmyp,
const ValueType& xmym)
1843 return ValueType(0.25)*(xpyp + xmym - xpym - xmyp);
1847 template<
typename Accessor>
1848 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1850 return difference( grid.getValue(ijk.
offsetBy( 1,0,0)), grid.getValue(ijk),
1851 grid.getValue(ijk.
offsetBy(-1,0,0)) );
1854 template<
typename Accessor>
1855 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1858 return difference( grid.getValue(ijk.
offsetBy(0, 1,0)), grid.getValue(ijk),
1859 grid.getValue(ijk.
offsetBy(0,-1,0)) );
1862 template<
typename Accessor>
1863 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1865 return difference( grid.getValue(ijk.
offsetBy( 0,0, 1)), grid.getValue(ijk),
1866 grid.getValue(ijk.
offsetBy( 0,0,-1)) );
1870 template<
typename Accessor>
1871 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1873 return crossdifference(
1875 grid.getValue(ijk.
offsetBy(-1,1,0)), grid.getValue(ijk.
offsetBy(-1,-1,0)));
1879 template<
typename Accessor>
1880 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1882 return crossdifference(
1884 grid.getValue(ijk.
offsetBy(-1,0,1)), grid.getValue(ijk.
offsetBy(-1,0,-1)) );
1887 template<
typename Accessor>
1888 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
1890 return crossdifference(
1892 grid.getValue(ijk.
offsetBy(0,-1,1)), grid.getValue(ijk.
offsetBy(0,-1,-1)) );
1897 template<
typename Stencil>
1898 static typename Stencil::ValueType
inX(
const Stencil& S)
1900 return difference( S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
1901 S.template getValue<-1, 0, 0>() );
1904 template<
typename Stencil>
1905 static typename Stencil::ValueType
inY(
const Stencil& S)
1907 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
1908 S.template getValue< 0,-1, 0>() );
1911 template<
typename Stencil>
1912 static typename Stencil::ValueType
inZ(
const Stencil& S)
1914 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
1915 S.template getValue< 0, 0,-1>() );
1919 template<
typename Stencil>
1920 static typename Stencil::ValueType
inXandY(
const Stencil& S)
1922 return crossdifference(S.template getValue< 1, 1, 0>(), S.template getValue< 1,-1, 0>(),
1923 S.template getValue<-1, 1, 0>(), S.template getValue<-1,-1, 0>() );
1926 template<
typename Stencil>
1927 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
1929 return crossdifference(S.template getValue< 1, 0, 1>(), S.template getValue< 1, 0,-1>(),
1930 S.template getValue<-1, 0, 1>(), S.template getValue<-1, 0,-1>() );
1933 template<
typename Stencil>
1934 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
1936 return crossdifference(S.template getValue< 0, 1, 1>(), S.template getValue< 0, 1,-1>(),
1937 S.template getValue< 0,-1, 1>(), S.template getValue< 0,-1,-1>() );
1947 template <
typename ValueType>
1948 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0,
1949 const ValueType& xm1,
const ValueType& xm2) {
1950 return ValueType(-1./12.)*(xp2 + xm2) + ValueType(4./3.)*(xp1 + xm1) -ValueType(2.5)*xp0;
1953 template <
typename ValueType>
1955 const ValueType& xp2ym1,
const ValueType& xp2ym2,
1956 const ValueType& xp1yp2,
const ValueType& xp1yp1,
1957 const ValueType& xp1ym1,
const ValueType& xp1ym2,
1958 const ValueType& xm2yp2,
const ValueType& xm2yp1,
1959 const ValueType& xm2ym1,
const ValueType& xm2ym2,
1960 const ValueType& xm1yp2,
const ValueType& xm1yp1,
1961 const ValueType& xm1ym1,
const ValueType& xm1ym2 ) {
1963 ValueType(2./3.0)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1)-
1964 ValueType(1./12.)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1);
1966 ValueType(2./3.0)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2)-
1967 ValueType(1./12.)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2);
1969 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1975 template<
typename Accessor>
1976 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1981 grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)));
1984 template<
typename Accessor>
1985 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1990 grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk.
offsetBy(0,-2, 0)));
1993 template<
typename Accessor>
1994 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2003 template<
typename Accessor>
2004 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2006 typedef typename Accessor::ValueType ValueType;
2007 typename Accessor::ValueType tmp1 =
2010 typename Accessor::ValueType tmp2 =
2013 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2016 template<
typename Accessor>
2017 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2019 typedef typename Accessor::ValueType ValueType;
2020 typename Accessor::ValueType tmp1 =
2023 typename Accessor::ValueType tmp2 =
2026 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2029 template<
typename Accessor>
2030 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2032 typedef typename Accessor::ValueType ValueType;
2033 typename Accessor::ValueType tmp1 =
2036 typename Accessor::ValueType tmp2 =
2039 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2044 template<
typename Stencil>
2045 static typename Stencil::ValueType
inX(
const Stencil& S)
2047 return difference(S.template getValue< 2, 0, 0>(), S.template getValue< 1, 0, 0>(),
2048 S.template getValue< 0, 0, 0>(),
2049 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>() );
2052 template<
typename Stencil>
2053 static typename Stencil::ValueType
inY(
const Stencil& S)
2055 return difference(S.template getValue< 0, 2, 0>(), S.template getValue< 0, 1, 0>(),
2056 S.template getValue< 0, 0, 0>(),
2057 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>() );
2060 template<
typename Stencil>
2061 static typename Stencil::ValueType
inZ(
const Stencil& S)
2063 return difference(S.template getValue< 0, 0, 2>(), S.template getValue< 0, 0, 1>(),
2064 S.template getValue< 0, 0, 0>(),
2065 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>() );
2069 template<
typename Stencil>
2070 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2072 return crossdifference(
2073 S.template getValue< 2, 2, 0>(), S.template getValue< 2, 1, 0>(),
2074 S.template getValue< 2,-1, 0>(), S.template getValue< 2,-2, 0>(),
2075 S.template getValue< 1, 2, 0>(), S.template getValue< 1, 1, 0>(),
2076 S.template getValue< 1,-1, 0>(), S.template getValue< 1,-2, 0>(),
2077 S.template getValue<-2, 2, 0>(), S.template getValue<-2, 1, 0>(),
2078 S.template getValue<-2,-1, 0>(), S.template getValue<-2,-2, 0>(),
2079 S.template getValue<-1, 2, 0>(), S.template getValue<-1, 1, 0>(),
2080 S.template getValue<-1,-1, 0>(), S.template getValue<-1,-2, 0>() );
2083 template<
typename Stencil>
2084 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2086 return crossdifference(
2087 S.template getValue< 2, 0, 2>(), S.template getValue< 2, 0, 1>(),
2088 S.template getValue< 2, 0,-1>(), S.template getValue< 2, 0,-2>(),
2089 S.template getValue< 1, 0, 2>(), S.template getValue< 1, 0, 1>(),
2090 S.template getValue< 1, 0,-1>(), S.template getValue< 1, 0,-2>(),
2091 S.template getValue<-2, 0, 2>(), S.template getValue<-2, 0, 1>(),
2092 S.template getValue<-2, 0,-1>(), S.template getValue<-2, 0,-2>(),
2093 S.template getValue<-1, 0, 2>(), S.template getValue<-1, 0, 1>(),
2094 S.template getValue<-1, 0,-1>(), S.template getValue<-1, 0,-2>() );
2097 template<
typename Stencil>
2098 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2100 return crossdifference(
2101 S.template getValue< 0, 2, 2>(), S.template getValue< 0, 2, 1>(),
2102 S.template getValue< 0, 2,-1>(), S.template getValue< 0, 2,-2>(),
2103 S.template getValue< 0, 1, 2>(), S.template getValue< 0, 1, 1>(),
2104 S.template getValue< 0, 1,-1>(), S.template getValue< 0, 1,-2>(),
2105 S.template getValue< 0,-2, 2>(), S.template getValue< 0,-2, 1>(),
2106 S.template getValue< 0,-2,-1>(), S.template getValue< 0,-2,-2>(),
2107 S.template getValue< 0,-1, 2>(), S.template getValue< 0,-1, 1>(),
2108 S.template getValue< 0,-1,-1>(), S.template getValue< 0,-1,-2>() );
2117 template <
typename ValueType>
2118 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
2119 const ValueType& xp0,
2120 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3)
2122 return ValueType(1./90.)*(xp3 + xm3) - ValueType(3./20.)*(xp2 + xm2)
2123 + ValueType(1.5)*(xp1 + xm1) - ValueType(49./18.)*xp0;
2126 template <
typename ValueType>
2128 const ValueType& xp1ym1,
const ValueType& xm1ym1,
2129 const ValueType& xp2yp1,
const ValueType& xm2yp1,
2130 const ValueType& xp2ym1,
const ValueType& xm2ym1,
2131 const ValueType& xp3yp1,
const ValueType& xm3yp1,
2132 const ValueType& xp3ym1,
const ValueType& xm3ym1,
2133 const ValueType& xp1yp2,
const ValueType& xm1yp2,
2134 const ValueType& xp1ym2,
const ValueType& xm1ym2,
2135 const ValueType& xp2yp2,
const ValueType& xm2yp2,
2136 const ValueType& xp2ym2,
const ValueType& xm2ym2,
2137 const ValueType& xp3yp2,
const ValueType& xm3yp2,
2138 const ValueType& xp3ym2,
const ValueType& xm3ym2,
2139 const ValueType& xp1yp3,
const ValueType& xm1yp3,
2140 const ValueType& xp1ym3,
const ValueType& xm1ym3,
2141 const ValueType& xp2yp3,
const ValueType& xm2yp3,
2142 const ValueType& xp2ym3,
const ValueType& xm2ym3,
2143 const ValueType& xp3yp3,
const ValueType& xm3yp3,
2144 const ValueType& xp3ym3,
const ValueType& xm3ym3 )
2147 ValueType(0.7500)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1) -
2148 ValueType(0.1500)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1) +
2149 ValueType(1./60.)*(xp3yp1 - xm3yp1 - xp3ym1 + xm3ym1);
2152 ValueType(0.7500)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2) -
2153 ValueType(0.1500)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2) +
2154 ValueType(1./60.)*(xp3yp2 - xm3yp2 - xp3ym2 + xm3ym2);
2157 ValueType(0.7500)*(xp1yp3 - xm1yp3 - xp1ym3 + xm1ym3) -
2158 ValueType(0.1500)*(xp2yp3 - xm2yp3 - xp2ym3 + xm2ym3) +
2159 ValueType(1./60.)*(xp3yp3 - xm3yp3 - xp3ym3 + xm3ym3);
2161 return ValueType(0.75)*tmp1 - ValueType(0.15)*tmp2 + ValueType(1./60)*tmp3;
2166 template<
typename Accessor>
2167 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2170 grid.getValue(ijk.
offsetBy( 3, 0, 0)), grid.getValue(ijk.
offsetBy( 2, 0, 0)),
2171 grid.getValue(ijk.
offsetBy( 1, 0, 0)), grid.getValue(ijk),
2172 grid.getValue(ijk.
offsetBy(-1, 0, 0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)),
2173 grid.getValue(ijk.
offsetBy(-3, 0, 0)) );
2176 template<
typename Accessor>
2177 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2180 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
2181 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk),
2182 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)),
2183 grid.getValue(ijk.
offsetBy( 0,-3, 0)) );
2186 template<
typename Accessor>
2187 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2191 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
2192 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk),
2193 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)),
2194 grid.getValue(ijk.
offsetBy( 0, 0,-3)) );
2197 template<
typename Accessor>
2198 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2200 typedef typename Accessor::ValueType ValueT;
2210 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2213 template<
typename Accessor>
2214 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2216 typedef typename Accessor::ValueType ValueT;
2226 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2229 template<
typename Accessor>
2230 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2232 typedef typename Accessor::ValueType ValueT;
2242 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2247 template<
typename Stencil>
2248 static typename Stencil::ValueType
inX(
const Stencil& S)
2250 return difference( S.template getValue< 3, 0, 0>(), S.template getValue< 2, 0, 0>(),
2251 S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
2252 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>(),
2253 S.template getValue<-3, 0, 0>() );
2256 template<
typename Stencil>
2257 static typename Stencil::ValueType
inY(
const Stencil& S)
2259 return difference( S.template getValue< 0, 3, 0>(), S.template getValue< 0, 2, 0>(),
2260 S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
2261 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>(),
2262 S.template getValue< 0,-3, 0>() );
2266 template<
typename Stencil>
2267 static typename Stencil::ValueType
inZ(
const Stencil& S)
2269 return difference( S.template getValue< 0, 0, 3>(), S.template getValue< 0, 0, 2>(),
2270 S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
2271 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>(),
2272 S.template getValue< 0, 0,-3>() );
2275 template<
typename Stencil>
2276 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2278 return crossdifference( S.template getValue< 1, 1, 0>(), S.template getValue<-1, 1, 0>(),
2279 S.template getValue< 1,-1, 0>(), S.template getValue<-1,-1, 0>(),
2280 S.template getValue< 2, 1, 0>(), S.template getValue<-2, 1, 0>(),
2281 S.template getValue< 2,-1, 0>(), S.template getValue<-2,-1, 0>(),
2282 S.template getValue< 3, 1, 0>(), S.template getValue<-3, 1, 0>(),
2283 S.template getValue< 3,-1, 0>(), S.template getValue<-3,-1, 0>(),
2284 S.template getValue< 1, 2, 0>(), S.template getValue<-1, 2, 0>(),
2285 S.template getValue< 1,-2, 0>(), S.template getValue<-1,-2, 0>(),
2286 S.template getValue< 2, 2, 0>(), S.template getValue<-2, 2, 0>(),
2287 S.template getValue< 2,-2, 0>(), S.template getValue<-2,-2, 0>(),
2288 S.template getValue< 3, 2, 0>(), S.template getValue<-3, 2, 0>(),
2289 S.template getValue< 3,-2, 0>(), S.template getValue<-3,-2, 0>(),
2290 S.template getValue< 1, 3, 0>(), S.template getValue<-1, 3, 0>(),
2291 S.template getValue< 1,-3, 0>(), S.template getValue<-1,-3, 0>(),
2292 S.template getValue< 2, 3, 0>(), S.template getValue<-2, 3, 0>(),
2293 S.template getValue< 2,-3, 0>(), S.template getValue<-2,-3, 0>(),
2294 S.template getValue< 3, 3, 0>(), S.template getValue<-3, 3, 0>(),
2295 S.template getValue< 3,-3, 0>(), S.template getValue<-3,-3, 0>() );
2298 template<
typename Stencil>
2299 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2301 return crossdifference( S.template getValue< 1, 0, 1>(), S.template getValue<-1, 0, 1>(),
2302 S.template getValue< 1, 0,-1>(), S.template getValue<-1, 0,-1>(),
2303 S.template getValue< 2, 0, 1>(), S.template getValue<-2, 0, 1>(),
2304 S.template getValue< 2, 0,-1>(), S.template getValue<-2, 0,-1>(),
2305 S.template getValue< 3, 0, 1>(), S.template getValue<-3, 0, 1>(),
2306 S.template getValue< 3, 0,-1>(), S.template getValue<-3, 0,-1>(),
2307 S.template getValue< 1, 0, 2>(), S.template getValue<-1, 0, 2>(),
2308 S.template getValue< 1, 0,-2>(), S.template getValue<-1, 0,-2>(),
2309 S.template getValue< 2, 0, 2>(), S.template getValue<-2, 0, 2>(),
2310 S.template getValue< 2, 0,-2>(), S.template getValue<-2, 0,-2>(),
2311 S.template getValue< 3, 0, 2>(), S.template getValue<-3, 0, 2>(),
2312 S.template getValue< 3, 0,-2>(), S.template getValue<-3, 0,-2>(),
2313 S.template getValue< 1, 0, 3>(), S.template getValue<-1, 0, 3>(),
2314 S.template getValue< 1, 0,-3>(), S.template getValue<-1, 0,-3>(),
2315 S.template getValue< 2, 0, 3>(), S.template getValue<-2, 0, 3>(),
2316 S.template getValue< 2, 0,-3>(), S.template getValue<-2, 0,-3>(),
2317 S.template getValue< 3, 0, 3>(), S.template getValue<-3, 0, 3>(),
2318 S.template getValue< 3, 0,-3>(), S.template getValue<-3, 0,-3>() );
2321 template<
typename Stencil>
2322 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2324 return crossdifference( S.template getValue< 0, 1, 1>(), S.template getValue< 0,-1, 1>(),
2325 S.template getValue< 0, 1,-1>(), S.template getValue< 0,-1,-1>(),
2326 S.template getValue< 0, 2, 1>(), S.template getValue< 0,-2, 1>(),
2327 S.template getValue< 0, 2,-1>(), S.template getValue< 0,-2,-1>(),
2328 S.template getValue< 0, 3, 1>(), S.template getValue< 0,-3, 1>(),
2329 S.template getValue< 0, 3,-1>(), S.template getValue< 0,-3,-1>(),
2330 S.template getValue< 0, 1, 2>(), S.template getValue< 0,-1, 2>(),
2331 S.template getValue< 0, 1,-2>(), S.template getValue< 0,-1,-2>(),
2332 S.template getValue< 0, 2, 2>(), S.template getValue< 0,-2, 2>(),
2333 S.template getValue< 0, 2,-2>(), S.template getValue< 0,-2,-2>(),
2334 S.template getValue< 0, 3, 2>(), S.template getValue< 0,-3, 2>(),
2335 S.template getValue< 0, 3,-2>(), S.template getValue< 0,-3,-2>(),
2336 S.template getValue< 0, 1, 3>(), S.template getValue< 0,-1, 3>(),
2337 S.template getValue< 0, 1,-3>(), S.template getValue< 0,-1,-3>(),
2338 S.template getValue< 0, 2, 3>(), S.template getValue< 0,-2, 3>(),
2339 S.template getValue< 0, 2,-3>(), S.template getValue< 0,-2,-3>(),
2340 S.template getValue< 0, 3, 3>(), S.template getValue< 0,-3, 3>(),
2341 S.template getValue< 0, 3,-3>(), S.template getValue< 0,-3,-3>() );
2350 #endif // OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:569
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2322
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:750
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1074
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1678
Definition: FiniteDifference.h:70
Definition: FiniteDifference.h:65
Definition: FiniteDifference.h:198
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:868
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:789
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:636
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1578
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:670
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1023
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1359
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2070
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
Definition: FiniteDifference.h:60
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:807
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2230
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:582
Definition: FiniteDifference.h:263
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:941
TemporalIntegrationScheme stringToTemporalIntegrationScheme(const std::string &s)
Definition: FiniteDifference.h:284
Definition: FiniteDifference.h:66
Definition: FiniteDifference.h:77
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1739
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2167
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:888
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2177
Coord offsetBy(Int32 dx, Int32 dy, Int32 dz) const
Definition: Coord.h:111
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:548
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1639
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2299
static ValueType difference(const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:974
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:949
Definition: FiniteDifference.h:193
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1262
static ValueType difference(const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:922
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1055
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:563
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:525
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1880
Definition: FiniteDifference.h:181
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1313
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:961
std::string temporalIntegrationSchemeToMenuName(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:304
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1542
Definition: FiniteDifference.h:179
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1207
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:744
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:781
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1855
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:558
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2053
std::string biasedGradientSchemeToString(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:204
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:998
Definition: FiniteDifference.h:197
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:955
BiasedGradientScheme stringToBiasedGradientScheme(const std::string &s)
Definition: FiniteDifference.h:219
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1015
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1007
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2030
DScheme stringToDScheme(const std::string &s)
Definition: FiniteDifference.h:105
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:757
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:47
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2084
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:1920
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:476
Definition: FiniteDifference.h:64
Definition: FiniteDifference.h:1510
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:935
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1528
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1147
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1177
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2061
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:738
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1646
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:532
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2214
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1246
Definition: FiniteDifference.h:195
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1463
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:818
Definition: FiniteDifference.h:63
Definition: FiniteDifference.h:178
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:982
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:618
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:1927
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1600
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1769
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:834
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1562
Definition: FiniteDifference.h:184
DDScheme
Different discrete schemes used in the second derivatives.
Definition: FiniteDifference.h:177
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:627
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1696
Definition: FiniteDifference.h:180
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2267
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:1934
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:2118
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:470
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1409
#define OPENVDB_VERSION_NAME
Definition: version.h:43
std::string biasedGradientSchemeToMenuName(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:242
Real GudonovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:379
DScheme
Different discrete schemes used in the first derivatives.
Definition: FiniteDifference.h:59
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:859
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:513
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:492
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:590
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:689
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:769
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1478
Definition: FiniteDifference.h:62
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1704
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:877
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1163
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1092
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1760
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1189
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1215
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1447
Definition: FiniteDifference.h:196
Definition: FiniteDifference.h:442
Definition: Exceptions.h:39
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:501
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1622
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:598
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:798
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1729
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2198
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1985
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:1038
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1888
static ValueType difference(const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:731
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1064
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1912
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:484
const Type & Max(const Type &a, const Type &b)
Return the maximum of two values.
Definition: Math.h:561
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:929
Definition: FiniteDifference.h:262
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:897
Type Pow2(Type x)
Return .
Definition: Math.h:514
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1328
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:990
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1669
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1515
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1712
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2017
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1275
Definition: FiniteDifference.h:194
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1522
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:540
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:850
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2, const ValueType &xm3)
Definition: FiniteDifference.h:651
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:700
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1586
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1389
Definition: FiniteDifference.h:71
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1417
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2098
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1343
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1898
double Real
Definition: Types.h:64
BiasedGradientScheme
Biased Gradients are limited to non-centered differences.
Definition: FiniteDifference.h:192
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1994
static ValueType difference(const ValueType &xp1, const ValueType &xp0, const ValueType &xm1)
Definition: FiniteDifference.h:1834
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2257
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1286
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1848
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:712
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1548
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1778
Definition: FiniteDifference.h:1788
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1653
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1046
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1593
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1432
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1976
Definition: FiniteDifference.h:67
Definition: FiniteDifference.h:201
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2276
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1107
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2248
Definition: FiniteDifference.h:69
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:679
Definition: FiniteDifference.h:265
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:906
Definition: FiniteDifference.h:68
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2045
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:2127
std::string temporalIntegrationSchemeToString(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:271
Definition: FiniteDifference.h:73
static ValueType crossdifference(const ValueType &xpyp, const ValueType &xpym, const ValueType &xmyp, const ValueType &xmym)
Definition: FiniteDifference.h:1840
Definition: FiniteDifference.h:74
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1132
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1687
Definition: FiniteDifference.h:264
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2004
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:71
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1905
Definition: FiniteDifference.h:72
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:1954
Definition: FiniteDifference.h:268
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1948
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:507
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:607
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1374
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1871
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1304
const Type & Min(const Type &a, const Type &b)
Return the minimum of two values.
Definition: Math.h:622
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:763
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1536
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:826
Definition: FiniteDifference.h:61
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1493
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1083
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1749
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1630
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:661
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1863
std::string dsSchemeToMenuName(DScheme dss)
Definition: FiniteDifference.h:147
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1231
TemporalIntegrationScheme
Temporal integration schemes.
Definition: FiniteDifference.h:261
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1117
std::string dsSchemeToString(DScheme dss)
Definition: FiniteDifference.h:81
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1614
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2187
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1570
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:331