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 = 1.0e-6 *
static_cast<double>(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>
382 {
return GodunovsNormSqrd(isOutside, dP_xm, dP_xp, dP_ym, dP_yp, dP_zm, dP_zp); }
384 template<
typename Real>
388 return GodunovsNormSqrd<Real>(isOutside,
389 gradient_m[0], gradient_p[0],
390 gradient_m[1], gradient_p[1],
391 gradient_m[2], gradient_p[2]);
394 template<
typename Real>
399 return GodunovsNormSqrd<Real>(isOutside, gradient_m, gradient_p);
404 inline simd::Float4 simdMin(
const simd::Float4& a,
const simd::Float4& b) {
405 return simd::Float4(_mm_min_ps(a.base(), b.base()));
407 inline simd::Float4 simdMax(
const simd::Float4& a,
const simd::Float4& b) {
408 return simd::Float4(_mm_max_ps(a.base(), b.base()));
411 inline float simdSum(
const simd::Float4& v);
413 inline simd::Float4
Pow2(
const simd::Float4& v) {
return v * v; }
417 WENO5<simd::Float4>(
const simd::Float4& v1,
const simd::Float4& v2,
const simd::Float4& v3,
418 const simd::Float4& v4,
const simd::Float4& v5,
float scale2)
421 typedef simd::Float4 F4;
424 eps(1.0e-6f * scale2),
425 two(2.0), three(3.0), four(4.0), five(5.0), fourth(0.25),
426 A1 = F4(0.1f) /
Pow2(C*
Pow2(v1-two*v2+v3) + fourth*
Pow2(v1-four*v2+three*v3) + eps),
427 A2 = F4(0.6f) /
Pow2(C*
Pow2(v2-two*v3+v4) + fourth*
Pow2(v2-v4) + eps),
428 A3 = F4(0.3f) /
Pow2(C*
Pow2(v3-two*v4+v5) + fourth*
Pow2(three*v3-four*v4+v5) + eps);
429 return (A1 * (two * v1 - F4(7.0) * v2 + F4(11.0) * v3) +
430 A2 * (five * v3 - v2 + two * v4) +
431 A3 * (two * v3 + five * v4 - v5)) / (F4(6.0) * (A1 + A2 + A3));
436 simdSum(
const simd::Float4& v)
439 __m128 temp = _mm_add_ps(v.base(), _mm_movehl_ps(v.base(), v.base()));
441 temp = _mm_add_ss(temp, _mm_shuffle_ps(temp, temp, 1));
442 return _mm_cvtss_f32(temp);
446 GodunovsNormSqrd(
bool isOutside,
const simd::Float4& dP_m,
const simd::Float4& dP_p)
448 const simd::Float4 zero(0.0);
449 simd::Float4 v = isOutside
456 const simd::Float4& dP_m,
457 const simd::Float4& dP_p)
463 template<DScheme DiffScheme>
467 template<
typename Accessor>
468 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
470 template<
typename Accessor>
471 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
473 template<
typename Accessor>
474 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
477 template<
typename Stencil>
478 static typename Stencil::ValueType inX(
const Stencil& S);
480 template<
typename Stencil>
481 static typename Stencil::ValueType inY(
const Stencil& S);
483 template<
typename Stencil>
484 static typename Stencil::ValueType inZ(
const Stencil& S);
491 template <
typename ValueType>
492 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
497 template<
typename Accessor>
498 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
501 grid.getValue(ijk.
offsetBy(1, 0, 0)),
502 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
505 template<
typename Accessor>
506 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
509 grid.getValue(ijk.
offsetBy(0, 1, 0)),
510 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
513 template<
typename Accessor>
514 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
517 grid.getValue(ijk.
offsetBy(0, 0, 1)),
518 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
522 template<
typename Stencil>
523 static typename Stencil::ValueType
inX(
const Stencil& S)
525 return difference( S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
528 template<
typename Stencil>
529 static typename Stencil::ValueType
inY(
const Stencil& S)
531 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
534 template<
typename Stencil>
535 static typename Stencil::ValueType
inZ(
const Stencil& S)
537 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
546 template <
typename ValueType>
547 static ValueType
difference(
const ValueType& xp1,
const ValueType& xm1) {
548 return (xp1 - xm1)*ValueType(0.5);
553 template<
typename Accessor>
554 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
557 grid.getValue(ijk.
offsetBy(1, 0, 0)),
558 grid.getValue(ijk.
offsetBy(-1, 0, 0)));
561 template<
typename Accessor>
562 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
565 grid.getValue(ijk.
offsetBy(0, 1, 0)),
566 grid.getValue(ijk.
offsetBy( 0, -1, 0)));
569 template<
typename Accessor>
570 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
573 grid.getValue(ijk.
offsetBy(0, 0, 1)),
574 grid.getValue(ijk.
offsetBy( 0, 0, -1)));
579 template<
typename Stencil>
580 static typename Stencil::ValueType
inX(
const Stencil& S)
582 return difference(S.template getValue< 1, 0, 0>(), S.template getValue<-1, 0, 0>());
584 template<
typename Stencil>
585 static typename Stencil::ValueType
inY(
const Stencil& S)
587 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0,-1, 0>());
590 template<
typename Stencil>
591 static typename Stencil::ValueType
inZ(
const Stencil& S)
593 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0,-1>());
603 template <
typename ValueType>
604 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
605 const ValueType& xm1,
const ValueType& xm2 ) {
606 return ValueType(2./3.)*(xp1 - xm1) + ValueType(1./12.)*(xm2 - xp2) ;
611 template<
typename Accessor>
612 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
619 template<
typename Accessor>
620 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
624 grid.getValue(ijk.
offsetBy( 0, 2, 0)), grid.getValue(ijk.
offsetBy( 0, 1, 0)),
625 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)) );
628 template<
typename Accessor>
629 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
633 grid.getValue(ijk.
offsetBy( 0, 0, 2)), grid.getValue(ijk.
offsetBy( 0, 0, 1)),
634 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)) );
639 template<
typename Stencil>
640 static typename Stencil::ValueType
inX(
const Stencil& S)
642 return difference( S.template getValue< 2, 0, 0>(),
643 S.template getValue< 1, 0, 0>(),
644 S.template getValue<-1, 0, 0>(),
645 S.template getValue<-2, 0, 0>() );
648 template<
typename Stencil>
649 static typename Stencil::ValueType
inY(
const Stencil& S)
651 return difference( S.template getValue< 0, 2, 0>(),
652 S.template getValue< 0, 1, 0>(),
653 S.template getValue< 0,-1, 0>(),
654 S.template getValue< 0,-2, 0>() );
657 template<
typename Stencil>
658 static typename Stencil::ValueType
inZ(
const Stencil& S)
660 return difference( S.template getValue< 0, 0, 2>(),
661 S.template getValue< 0, 0, 1>(),
662 S.template getValue< 0, 0,-1>(),
663 S.template getValue< 0, 0,-2>() );
672 template <
typename ValueType>
673 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
674 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3 )
676 return ValueType(3./4.)*(xp1 - xm1) - ValueType(0.15)*(xp2 - xm2)
677 + ValueType(1./60.)*(xp3-xm3);
682 template<
typename Accessor>
683 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
691 template<
typename Accessor>
692 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
695 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
696 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk.
offsetBy( 0,-1, 0)),
697 grid.getValue(ijk.
offsetBy( 0,-2, 0)), grid.getValue(ijk.
offsetBy( 0,-3, 0)));
700 template<
typename Accessor>
701 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
704 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
705 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk.
offsetBy( 0, 0,-1)),
706 grid.getValue(ijk.
offsetBy( 0, 0,-2)), grid.getValue(ijk.
offsetBy( 0, 0,-3)));
710 template<
typename Stencil>
711 static typename Stencil::ValueType
inX(
const Stencil& S)
713 return difference(S.template getValue< 3, 0, 0>(),
714 S.template getValue< 2, 0, 0>(),
715 S.template getValue< 1, 0, 0>(),
716 S.template getValue<-1, 0, 0>(),
717 S.template getValue<-2, 0, 0>(),
718 S.template getValue<-3, 0, 0>());
721 template<
typename Stencil>
722 static typename Stencil::ValueType
inY(
const Stencil& S)
725 return difference( S.template getValue< 0, 3, 0>(),
726 S.template getValue< 0, 2, 0>(),
727 S.template getValue< 0, 1, 0>(),
728 S.template getValue< 0,-1, 0>(),
729 S.template getValue< 0,-2, 0>(),
730 S.template getValue< 0,-3, 0>());
733 template<
typename Stencil>
734 static typename Stencil::ValueType
inZ(
const Stencil& S)
737 return difference( S.template getValue< 0, 0, 3>(),
738 S.template getValue< 0, 0, 2>(),
739 S.template getValue< 0, 0, 1>(),
740 S.template getValue< 0, 0,-1>(),
741 S.template getValue< 0, 0,-2>(),
742 S.template getValue< 0, 0,-3>());
752 template <
typename ValueType>
753 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0) {
759 template<
typename Accessor>
760 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
762 return difference(grid.getValue(ijk.
offsetBy(1, 0, 0)), grid.getValue(ijk));
765 template<
typename Accessor>
766 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
768 return difference(grid.getValue(ijk.
offsetBy(0, 1, 0)), grid.getValue(ijk));
771 template<
typename Accessor>
772 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
774 return difference(grid.getValue(ijk.
offsetBy(0, 0, 1)), grid.getValue(ijk));
778 template<
typename Stencil>
779 static typename Stencil::ValueType
inX(
const Stencil& S)
781 return difference(S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>());
784 template<
typename Stencil>
785 static typename Stencil::ValueType
inY(
const Stencil& S)
787 return difference(S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>());
790 template<
typename Stencil>
791 static typename Stencil::ValueType
inZ(
const Stencil& S)
793 return difference(S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>());
802 template <
typename ValueType>
803 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0)
805 return ValueType(2)*xp1 -(ValueType(0.5)*xp2 + ValueType(3./2.)*xp0);
810 template<
typename Accessor>
811 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
819 template<
typename Accessor>
820 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
828 template<
typename Accessor>
829 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
839 template<
typename Stencil>
840 static typename Stencil::ValueType
inX(
const Stencil& S)
842 return difference( S.template getValue< 2, 0, 0>(),
843 S.template getValue< 1, 0, 0>(),
844 S.template getValue< 0, 0, 0>() );
847 template<
typename Stencil>
848 static typename Stencil::ValueType
inY(
const Stencil& S)
850 return difference( S.template getValue< 0, 2, 0>(),
851 S.template getValue< 0, 1, 0>(),
852 S.template getValue< 0, 0, 0>() );
855 template<
typename Stencil>
856 static typename Stencil::ValueType
inZ(
const Stencil& S)
858 return difference( S.template getValue< 0, 0, 2>(),
859 S.template getValue< 0, 0, 1>(),
860 S.template getValue< 0, 0, 0>() );
871 template<
typename ValueType>
872 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
873 const ValueType& xp1,
const ValueType& xp0)
875 return static_cast<ValueType
>(xp3/3.0 - 1.5*xp2 + 3.0*xp1 - 11.0*xp0/6.0);
880 template<
typename Accessor>
881 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
883 return difference( grid.getValue(ijk.
offsetBy(3,0,0)),
886 grid.getValue(ijk) );
889 template<
typename Accessor>
890 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
892 return difference( grid.getValue(ijk.
offsetBy(0,3,0)),
895 grid.getValue(ijk) );
898 template<
typename Accessor>
899 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
901 return difference( grid.getValue(ijk.
offsetBy(0,0,3)),
904 grid.getValue(ijk) );
909 template<
typename Stencil>
910 static typename Stencil::ValueType
inX(
const Stencil& S)
912 return difference(S.template getValue< 3, 0, 0>(),
913 S.template getValue< 2, 0, 0>(),
914 S.template getValue< 1, 0, 0>(),
915 S.template getValue< 0, 0, 0>() );
918 template<
typename Stencil>
919 static typename Stencil::ValueType
inY(
const Stencil& S)
921 return difference(S.template getValue< 0, 3, 0>(),
922 S.template getValue< 0, 2, 0>(),
923 S.template getValue< 0, 1, 0>(),
924 S.template getValue< 0, 0, 0>() );
927 template<
typename Stencil>
928 static typename Stencil::ValueType
inZ(
const Stencil& S)
930 return difference( S.template getValue< 0, 0, 3>(),
931 S.template getValue< 0, 0, 2>(),
932 S.template getValue< 0, 0, 1>(),
933 S.template getValue< 0, 0, 0>() );
943 template <
typename ValueType>
944 static ValueType
difference(
const ValueType& xm1,
const ValueType& xm0) {
950 template<
typename Accessor>
951 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
953 return difference(grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk));
956 template<
typename Accessor>
957 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
959 return difference(grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk));
962 template<
typename Accessor>
963 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
965 return difference(grid.getValue(ijk.
offsetBy(0, 0,-1)), grid.getValue(ijk));
970 template<
typename Stencil>
971 static typename Stencil::ValueType
inX(
const Stencil& S)
973 return difference(S.template getValue<-1, 0, 0>(), S.template getValue< 0, 0, 0>());
976 template<
typename Stencil>
977 static typename Stencil::ValueType
inY(
const Stencil& S)
979 return difference(S.template getValue< 0,-1, 0>(), S.template getValue< 0, 0, 0>());
982 template<
typename Stencil>
983 static typename Stencil::ValueType
inZ(
const Stencil& S)
985 return difference(S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0, 0>());
995 template <
typename ValueType>
996 static ValueType
difference(
const ValueType& xm2,
const ValueType& xm1,
const ValueType& xm0)
1003 template<
typename Accessor>
1004 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1006 return difference( grid.getValue(ijk.
offsetBy(-2,0,0)),
1007 grid.getValue(ijk.
offsetBy(-1,0,0)),
1008 grid.getValue(ijk) );
1011 template<
typename Accessor>
1012 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1014 return difference( grid.getValue(ijk.
offsetBy(0,-2,0)),
1015 grid.getValue(ijk.
offsetBy(0,-1,0)),
1016 grid.getValue(ijk) );
1019 template<
typename Accessor>
1020 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1022 return difference( grid.getValue(ijk.
offsetBy(0,0,-2)),
1023 grid.getValue(ijk.
offsetBy(0,0,-1)),
1024 grid.getValue(ijk) );
1028 template<
typename Stencil>
1029 static typename Stencil::ValueType
inX(
const Stencil& S)
1031 return difference( S.template getValue<-2, 0, 0>(),
1032 S.template getValue<-1, 0, 0>(),
1033 S.template getValue< 0, 0, 0>() );
1036 template<
typename Stencil>
1037 static typename Stencil::ValueType
inY(
const Stencil& S)
1039 return difference( S.template getValue< 0,-2, 0>(),
1040 S.template getValue< 0,-1, 0>(),
1041 S.template getValue< 0, 0, 0>() );
1044 template<
typename Stencil>
1045 static typename Stencil::ValueType
inZ(
const Stencil& S)
1047 return difference( S.template getValue< 0, 0,-2>(),
1048 S.template getValue< 0, 0,-1>(),
1049 S.template getValue< 0, 0, 0>() );
1059 template <
typename ValueType>
1060 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
1061 const ValueType& xm1,
const ValueType& xm0)
1067 template<
typename Accessor>
1068 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1070 return difference( grid.getValue(ijk.
offsetBy(-3,0,0)),
1071 grid.getValue(ijk.
offsetBy(-2,0,0)),
1072 grid.getValue(ijk.
offsetBy(-1,0,0)),
1073 grid.getValue(ijk) );
1076 template<
typename Accessor>
1077 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1079 return difference( grid.getValue(ijk.
offsetBy( 0,-3,0)),
1080 grid.getValue(ijk.
offsetBy( 0,-2,0)),
1081 grid.getValue(ijk.
offsetBy( 0,-1,0)),
1082 grid.getValue(ijk) );
1085 template<
typename Accessor>
1086 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1088 return difference( grid.getValue(ijk.
offsetBy( 0, 0,-3)),
1089 grid.getValue(ijk.
offsetBy( 0, 0,-2)),
1090 grid.getValue(ijk.
offsetBy( 0, 0,-1)),
1091 grid.getValue(ijk) );
1095 template<
typename Stencil>
1096 static typename Stencil::ValueType
inX(
const Stencil& S)
1098 return difference( S.template getValue<-3, 0, 0>(),
1099 S.template getValue<-2, 0, 0>(),
1100 S.template getValue<-1, 0, 0>(),
1101 S.template getValue< 0, 0, 0>() );
1104 template<
typename Stencil>
1105 static typename Stencil::ValueType
inY(
const Stencil& S)
1107 return difference( S.template getValue< 0,-3, 0>(),
1108 S.template getValue< 0,-2, 0>(),
1109 S.template getValue< 0,-1, 0>(),
1110 S.template getValue< 0, 0, 0>() );
1113 template<
typename Stencil>
1114 static typename Stencil::ValueType
inZ(
const Stencil& S)
1116 return difference( S.template getValue< 0, 0,-3>(),
1117 S.template getValue< 0, 0,-2>(),
1118 S.template getValue< 0, 0,-1>(),
1119 S.template getValue< 0, 0, 0>() );
1128 template <
typename ValueType>
1129 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1130 const ValueType& xp1,
const ValueType& xp0,
1131 const ValueType& xm1,
const ValueType& xm2) {
1132 return WENO5<ValueType>(xp3, xp2, xp1, xp0, xm1)
1133 - WENO5<ValueType>(xp2, xp1, xp0, xm1, xm2);
1138 template<
typename Accessor>
1139 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1141 typedef typename Accessor::ValueType ValueType;
1143 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1144 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1145 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1146 V[3] = grid.getValue(ijk);
1147 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1148 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1150 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1153 template<
typename Accessor>
1154 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1156 typedef typename Accessor::ValueType ValueType;
1158 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1159 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1160 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1161 V[3] = grid.getValue(ijk);
1162 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1163 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1165 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1168 template<
typename Accessor>
1169 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1171 typedef typename Accessor::ValueType ValueType;
1173 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1174 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1175 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1176 V[3] = grid.getValue(ijk);
1177 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1178 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1180 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1184 template<
typename Stencil>
1185 static typename Stencil::ValueType
inX(
const Stencil& S)
1188 return static_cast<typename Stencil::ValueType
>(difference(
1189 S.template getValue< 3, 0, 0>(),
1190 S.template getValue< 2, 0, 0>(),
1191 S.template getValue< 1, 0, 0>(),
1192 S.template getValue< 0, 0, 0>(),
1193 S.template getValue<-1, 0, 0>(),
1194 S.template getValue<-2, 0, 0>() ));
1198 template<
typename Stencil>
1199 static typename Stencil::ValueType
inY(
const Stencil& S)
1201 return static_cast<typename Stencil::ValueType
>(difference(
1202 S.template getValue< 0, 3, 0>(),
1203 S.template getValue< 0, 2, 0>(),
1204 S.template getValue< 0, 1, 0>(),
1205 S.template getValue< 0, 0, 0>(),
1206 S.template getValue< 0,-1, 0>(),
1207 S.template getValue< 0,-2, 0>() ));
1210 template<
typename Stencil>
1211 static typename Stencil::ValueType
inZ(
const Stencil& S)
1213 return static_cast<typename Stencil::ValueType
>(difference(
1214 S.template getValue< 0, 0, 3>(),
1215 S.template getValue< 0, 0, 2>(),
1216 S.template getValue< 0, 0, 1>(),
1217 S.template getValue< 0, 0, 0>(),
1218 S.template getValue< 0, 0,-1>(),
1219 S.template getValue< 0, 0,-2>() ));
1228 template <
typename ValueType>
1229 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1230 const ValueType& xp1,
const ValueType& xp0,
1231 const ValueType& xm1,
const ValueType& xm2) {
1232 return WENO5<ValueType>(xp3 - xp2, xp2 - xp1, xp1 - xp0, xp0-xm1, xm1-xm2);
1236 template<
typename Accessor>
1237 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1239 typedef typename Accessor::ValueType ValueType;
1241 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1242 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1243 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1244 V[3] = grid.getValue(ijk);
1245 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1246 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1248 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1252 template<
typename Accessor>
1253 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1255 typedef typename Accessor::ValueType ValueType;
1257 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1258 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1259 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1260 V[3] = grid.getValue(ijk);
1261 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1262 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1264 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1267 template<
typename Accessor>
1268 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1270 typedef typename Accessor::ValueType ValueType;
1272 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1273 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1274 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1275 V[3] = grid.getValue(ijk);
1276 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1277 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1279 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1283 template<
typename Stencil>
1284 static typename Stencil::ValueType
inX(
const Stencil& S)
1287 return difference( S.template getValue< 3, 0, 0>(),
1288 S.template getValue< 2, 0, 0>(),
1289 S.template getValue< 1, 0, 0>(),
1290 S.template getValue< 0, 0, 0>(),
1291 S.template getValue<-1, 0, 0>(),
1292 S.template getValue<-2, 0, 0>() );
1296 template<
typename Stencil>
1297 static typename Stencil::ValueType
inY(
const Stencil& S)
1299 return difference( S.template getValue< 0, 3, 0>(),
1300 S.template getValue< 0, 2, 0>(),
1301 S.template getValue< 0, 1, 0>(),
1302 S.template getValue< 0, 0, 0>(),
1303 S.template getValue< 0,-1, 0>(),
1304 S.template getValue< 0,-2, 0>() );
1307 template<
typename Stencil>
1308 static typename Stencil::ValueType
inZ(
const Stencil& S)
1311 return difference( S.template getValue< 0, 0, 3>(),
1312 S.template getValue< 0, 0, 2>(),
1313 S.template getValue< 0, 0, 1>(),
1314 S.template getValue< 0, 0, 0>(),
1315 S.template getValue< 0, 0,-1>(),
1316 S.template getValue< 0, 0,-2>() );
1325 template<
typename ValueType>
1326 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1327 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1334 template<
typename Accessor>
1335 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1337 typedef typename Accessor::ValueType ValueType;
1339 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1340 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1341 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1342 V[3] = grid.getValue(ijk);
1343 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1344 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1346 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1349 template<
typename Accessor>
1350 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1352 typedef typename Accessor::ValueType ValueType;
1354 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1355 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1356 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1357 V[3] = grid.getValue(ijk);
1358 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1359 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1361 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1364 template<
typename Accessor>
1365 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1367 typedef typename Accessor::ValueType ValueType;
1369 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1370 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1371 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1372 V[3] = grid.getValue(ijk);
1373 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1374 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1376 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1380 template<
typename Stencil>
1381 static typename Stencil::ValueType
inX(
const Stencil& S)
1383 typedef typename Stencil::ValueType ValueType;
1385 V[0] = S.template getValue<-3, 0, 0>();
1386 V[1] = S.template getValue<-2, 0, 0>();
1387 V[2] = S.template getValue<-1, 0, 0>();
1388 V[3] = S.template getValue< 0, 0, 0>();
1389 V[4] = S.template getValue< 1, 0, 0>();
1390 V[5] = S.template getValue< 2, 0, 0>();
1392 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1395 template<
typename Stencil>
1396 static typename Stencil::ValueType
inY(
const Stencil& S)
1398 typedef typename Stencil::ValueType ValueType;
1400 V[0] = S.template getValue< 0,-3, 0>();
1401 V[1] = S.template getValue< 0,-2, 0>();
1402 V[2] = S.template getValue< 0,-1, 0>();
1403 V[3] = S.template getValue< 0, 0, 0>();
1404 V[4] = S.template getValue< 0, 1, 0>();
1405 V[5] = S.template getValue< 0, 2, 0>();
1407 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1410 template<
typename Stencil>
1411 static typename Stencil::ValueType
inZ(
const Stencil& S)
1413 typedef typename Stencil::ValueType ValueType;
1415 V[0] = S.template getValue< 0, 0,-3>();
1416 V[1] = S.template getValue< 0, 0,-2>();
1417 V[2] = S.template getValue< 0, 0,-1>();
1418 V[3] = S.template getValue< 0, 0, 0>();
1419 V[4] = S.template getValue< 0, 0, 1>();
1420 V[5] = S.template getValue< 0, 0, 2>();
1422 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1430 template<
typename ValueType>
1431 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1432 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1438 template<
typename Accessor>
1439 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1441 typedef typename Accessor::ValueType ValueType;
1443 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1444 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1445 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1446 V[3] = grid.getValue(ijk);
1447 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1448 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1450 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1453 template<
typename Accessor>
1454 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1456 typedef typename Accessor::ValueType ValueType;
1458 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1459 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1460 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1461 V[3] = grid.getValue(ijk);
1462 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1463 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1465 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1468 template<
typename Accessor>
1469 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1471 typedef typename Accessor::ValueType ValueType;
1473 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1474 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1475 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1476 V[3] = grid.getValue(ijk);
1477 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1478 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1480 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1484 template<
typename Stencil>
1485 static typename Stencil::ValueType
inX(
const Stencil& S)
1487 typedef typename Stencil::ValueType ValueType;
1489 V[0] = S.template getValue<-3, 0, 0>();
1490 V[1] = S.template getValue<-2, 0, 0>();
1491 V[2] = S.template getValue<-1, 0, 0>();
1492 V[3] = S.template getValue< 0, 0, 0>();
1493 V[4] = S.template getValue< 1, 0, 0>();
1494 V[5] = S.template getValue< 2, 0, 0>();
1496 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1499 template<
typename Stencil>
1500 static typename Stencil::ValueType
inY(
const Stencil& S)
1502 typedef typename Stencil::ValueType ValueType;
1504 V[0] = S.template getValue< 0,-3, 0>();
1505 V[1] = S.template getValue< 0,-2, 0>();
1506 V[2] = S.template getValue< 0,-1, 0>();
1507 V[3] = S.template getValue< 0, 0, 0>();
1508 V[4] = S.template getValue< 0, 1, 0>();
1509 V[5] = S.template getValue< 0, 2, 0>();
1511 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1514 template<
typename Stencil>
1515 static typename Stencil::ValueType
inZ(
const Stencil& S)
1517 typedef typename Stencil::ValueType ValueType;
1519 V[0] = S.template getValue< 0, 0,-3>();
1520 V[1] = S.template getValue< 0, 0,-2>();
1521 V[2] = S.template getValue< 0, 0,-1>();
1522 V[3] = S.template getValue< 0, 0, 0>();
1523 V[4] = S.template getValue< 0, 0, 1>();
1524 V[5] = S.template getValue< 0, 0, 2>();
1526 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1531 template<DScheme DiffScheme>
1535 template<
typename Accessor>
1536 static typename Accessor::ValueType::value_type
1542 template<
typename Accessor>
1543 static typename Accessor::ValueType::value_type
1548 template<
typename Accessor>
1549 static typename Accessor::ValueType::value_type
1557 template<
typename Stencil>
1558 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1563 template<
typename Stencil>
1564 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1569 template<
typename Stencil>
1570 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1582 template<
typename Accessor>
1583 static typename Accessor::ValueType::value_type
1587 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1590 template<
typename Accessor>
1591 static typename Accessor::ValueType::value_type
1595 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1598 template<
typename Accessor>
1599 static typename Accessor::ValueType::value_type
1603 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1607 template<
typename Stencil>
1608 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1611 S.template getValue<-1, 0, 0>()[n] );
1614 template<
typename Stencil>
1615 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1618 S.template getValue< 0,-1, 0>()[n] );
1621 template<
typename Stencil>
1622 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1625 S.template getValue< 0, 0,-1>()[n] );
1634 template<
typename Accessor>
1635 static typename Accessor::ValueType::value_type
1639 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1642 template<
typename Accessor>
1643 static typename Accessor::ValueType::value_type
1647 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1650 template<
typename Accessor>
1651 static typename Accessor::ValueType::value_type
1655 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1660 template<
typename Stencil>
1661 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1664 S.template getValue<-1, 0, 0>()[n] );
1667 template<
typename Stencil>
1668 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1671 S.template getValue< 0,-1, 0>()[n] );
1674 template<
typename Stencil>
1675 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1678 S.template getValue< 0, 0,-1>()[n] );
1689 template<
typename Accessor>
1690 static typename Accessor::ValueType::value_type
1694 grid.getValue(ijk.
offsetBy(2, 0, 0))[n], grid.getValue(ijk.
offsetBy( 1, 0, 0))[n],
1695 grid.getValue(ijk.
offsetBy(-1,0, 0))[n], grid.getValue(ijk.
offsetBy(-2, 0, 0))[n]);
1698 template<
typename Accessor>
1699 static typename Accessor::ValueType::value_type
1703 grid.getValue(ijk.
offsetBy( 0, 2, 0))[n], grid.getValue(ijk.
offsetBy( 0, 1, 0))[n],
1704 grid.getValue(ijk.
offsetBy( 0,-1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-2, 0))[n]);
1707 template<
typename Accessor>
1708 static typename Accessor::ValueType::value_type
1712 grid.getValue(ijk.
offsetBy(0,0, 2))[n], grid.getValue(ijk.
offsetBy( 0, 0, 1))[n],
1713 grid.getValue(ijk.
offsetBy(0,0,-1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-2))[n]);
1717 template<
typename Stencil>
1718 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1721 S.template getValue< 2, 0, 0>()[n], S.template getValue< 1, 0, 0>()[n],
1722 S.template getValue<-1, 0, 0>()[n], S.template getValue<-2, 0, 0>()[n] );
1725 template<
typename Stencil>
1726 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1729 S.template getValue< 0, 2, 0>()[n], S.template getValue< 0, 1, 0>()[n],
1730 S.template getValue< 0,-1, 0>()[n], S.template getValue< 0,-2, 0>()[n]);
1733 template<
typename Stencil>
1734 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1737 S.template getValue< 0, 0, 2>()[n], S.template getValue< 0, 0, 1>()[n],
1738 S.template getValue< 0, 0,-1>()[n], S.template getValue< 0, 0,-2>()[n]);
1749 template<
typename Accessor>
1750 static typename Accessor::ValueType::value_type
1754 grid.getValue(ijk.
offsetBy( 3, 0, 0))[n], grid.getValue(ijk.
offsetBy( 2, 0, 0))[n],
1755 grid.getValue(ijk.
offsetBy( 1, 0, 0))[n], grid.getValue(ijk.
offsetBy(-1, 0, 0))[n],
1756 grid.getValue(ijk.
offsetBy(-2, 0, 0))[n], grid.getValue(ijk.
offsetBy(-3, 0, 0))[n] );
1759 template<
typename Accessor>
1760 static typename Accessor::ValueType::value_type
1764 grid.getValue(ijk.
offsetBy( 0, 3, 0))[n], grid.getValue(ijk.
offsetBy( 0, 2, 0))[n],
1765 grid.getValue(ijk.
offsetBy( 0, 1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-1, 0))[n],
1766 grid.getValue(ijk.
offsetBy( 0,-2, 0))[n], grid.getValue(ijk.
offsetBy( 0,-3, 0))[n] );
1769 template<
typename Accessor>
1770 static typename Accessor::ValueType::value_type
1774 grid.getValue(ijk.
offsetBy( 0, 0, 3))[n], grid.getValue(ijk.
offsetBy( 0, 0, 2))[n],
1775 grid.getValue(ijk.
offsetBy( 0, 0, 1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-1))[n],
1776 grid.getValue(ijk.
offsetBy( 0, 0,-2))[n], grid.getValue(ijk.
offsetBy( 0, 0,-3))[n] );
1781 template<
typename Stencil>
1782 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1785 S.template getValue< 3, 0, 0>()[n], S.template getValue< 2, 0, 0>()[n],
1786 S.template getValue< 1, 0, 0>()[n], S.template getValue<-1, 0, 0>()[n],
1787 S.template getValue<-2, 0, 0>()[n], S.template getValue<-3, 0, 0>()[n] );
1790 template<
typename Stencil>
1791 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1794 S.template getValue< 0, 3, 0>()[n], S.template getValue< 0, 2, 0>()[n],
1795 S.template getValue< 0, 1, 0>()[n], S.template getValue< 0,-1, 0>()[n],
1796 S.template getValue< 0,-2, 0>()[n], S.template getValue< 0,-3, 0>()[n] );
1799 template<
typename Stencil>
1800 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1803 S.template getValue< 0, 0, 3>()[n], S.template getValue< 0, 0, 2>()[n],
1804 S.template getValue< 0, 0, 1>()[n], S.template getValue< 0, 0,-1>()[n],
1805 S.template getValue< 0, 0,-2>()[n], S.template getValue< 0, 0,-3>()[n] );
1809 template<DDScheme DiffScheme>
1813 template<
typename Accessor>
1814 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
1815 template<
typename Accessor>
1816 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
1817 template<
typename Accessor>
1818 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
1821 template<
typename Accessor>
1822 static typename Accessor::ValueType inXandY(
const Accessor& grid,
const Coord& ijk);
1824 template<
typename Accessor>
1825 static typename Accessor::ValueType inXandZ(
const Accessor& grid,
const Coord& ijk);
1827 template<
typename Accessor>
1828 static typename Accessor::ValueType inYandZ(
const Accessor& grid,
const Coord& ijk);
1832 template<
typename Stencil>
1833 static typename Stencil::ValueType inX(
const Stencil& S);
1834 template<
typename Stencil>
1835 static typename Stencil::ValueType inY(
const Stencil& S);
1836 template<
typename Stencil>
1837 static typename Stencil::ValueType inZ(
const Stencil& S);
1840 template<
typename Stencil>
1841 static typename Stencil::ValueType inXandY(
const Stencil& S);
1843 template<
typename Stencil>
1844 static typename Stencil::ValueType inXandZ(
const Stencil& S);
1846 template<
typename Stencil>
1847 static typename Stencil::ValueType inYandZ(
const Stencil& S);
1855 template <
typename ValueType>
1856 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0,
const ValueType& xm1)
1858 return xp1 + xm1 - ValueType(2)*xp0;
1861 template <
typename ValueType>
1863 const ValueType& xmyp,
const ValueType& xmym)
1865 return ValueType(0.25)*(xpyp + xmym - xpym - xmyp);
1869 template<
typename Accessor>
1870 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1872 return difference( grid.getValue(ijk.
offsetBy( 1,0,0)), grid.getValue(ijk),
1873 grid.getValue(ijk.
offsetBy(-1,0,0)) );
1876 template<
typename Accessor>
1877 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1880 return difference( grid.getValue(ijk.
offsetBy(0, 1,0)), grid.getValue(ijk),
1881 grid.getValue(ijk.
offsetBy(0,-1,0)) );
1884 template<
typename Accessor>
1885 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1887 return difference( grid.getValue(ijk.
offsetBy( 0,0, 1)), grid.getValue(ijk),
1888 grid.getValue(ijk.
offsetBy( 0,0,-1)) );
1892 template<
typename Accessor>
1893 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1895 return crossdifference(
1897 grid.getValue(ijk.
offsetBy(-1,1,0)), grid.getValue(ijk.
offsetBy(-1,-1,0)));
1901 template<
typename Accessor>
1902 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1904 return crossdifference(
1906 grid.getValue(ijk.
offsetBy(-1,0,1)), grid.getValue(ijk.
offsetBy(-1,0,-1)) );
1909 template<
typename Accessor>
1910 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
1912 return crossdifference(
1914 grid.getValue(ijk.
offsetBy(0,-1,1)), grid.getValue(ijk.
offsetBy(0,-1,-1)) );
1919 template<
typename Stencil>
1920 static typename Stencil::ValueType
inX(
const Stencil& S)
1922 return difference( S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
1923 S.template getValue<-1, 0, 0>() );
1926 template<
typename Stencil>
1927 static typename Stencil::ValueType
inY(
const Stencil& S)
1929 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
1930 S.template getValue< 0,-1, 0>() );
1933 template<
typename Stencil>
1934 static typename Stencil::ValueType
inZ(
const Stencil& S)
1936 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
1937 S.template getValue< 0, 0,-1>() );
1941 template<
typename Stencil>
1942 static typename Stencil::ValueType
inXandY(
const Stencil& S)
1944 return crossdifference(S.template getValue< 1, 1, 0>(), S.template getValue< 1,-1, 0>(),
1945 S.template getValue<-1, 1, 0>(), S.template getValue<-1,-1, 0>() );
1948 template<
typename Stencil>
1949 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
1951 return crossdifference(S.template getValue< 1, 0, 1>(), S.template getValue< 1, 0,-1>(),
1952 S.template getValue<-1, 0, 1>(), S.template getValue<-1, 0,-1>() );
1955 template<
typename Stencil>
1956 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
1958 return crossdifference(S.template getValue< 0, 1, 1>(), S.template getValue< 0, 1,-1>(),
1959 S.template getValue< 0,-1, 1>(), S.template getValue< 0,-1,-1>() );
1969 template <
typename ValueType>
1970 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0,
1971 const ValueType& xm1,
const ValueType& xm2) {
1972 return ValueType(-1./12.)*(xp2 + xm2) + ValueType(4./3.)*(xp1 + xm1) -ValueType(2.5)*xp0;
1975 template <
typename ValueType>
1977 const ValueType& xp2ym1,
const ValueType& xp2ym2,
1978 const ValueType& xp1yp2,
const ValueType& xp1yp1,
1979 const ValueType& xp1ym1,
const ValueType& xp1ym2,
1980 const ValueType& xm2yp2,
const ValueType& xm2yp1,
1981 const ValueType& xm2ym1,
const ValueType& xm2ym2,
1982 const ValueType& xm1yp2,
const ValueType& xm1yp1,
1983 const ValueType& xm1ym1,
const ValueType& xm1ym2 ) {
1985 ValueType(2./3.0)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1)-
1986 ValueType(1./12.)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1);
1988 ValueType(2./3.0)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2)-
1989 ValueType(1./12.)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2);
1991 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1997 template<
typename Accessor>
1998 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2003 grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)));
2006 template<
typename Accessor>
2007 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2012 grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk.
offsetBy(0,-2, 0)));
2015 template<
typename Accessor>
2016 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2025 template<
typename Accessor>
2026 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2028 typedef typename Accessor::ValueType ValueType;
2029 typename Accessor::ValueType tmp1 =
2032 typename Accessor::ValueType tmp2 =
2035 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2038 template<
typename Accessor>
2039 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2041 typedef typename Accessor::ValueType ValueType;
2042 typename Accessor::ValueType tmp1 =
2045 typename Accessor::ValueType tmp2 =
2048 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2051 template<
typename Accessor>
2052 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2054 typedef typename Accessor::ValueType ValueType;
2055 typename Accessor::ValueType tmp1 =
2058 typename Accessor::ValueType tmp2 =
2061 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2066 template<
typename Stencil>
2067 static typename Stencil::ValueType
inX(
const Stencil& S)
2069 return difference(S.template getValue< 2, 0, 0>(), S.template getValue< 1, 0, 0>(),
2070 S.template getValue< 0, 0, 0>(),
2071 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>() );
2074 template<
typename Stencil>
2075 static typename Stencil::ValueType
inY(
const Stencil& S)
2077 return difference(S.template getValue< 0, 2, 0>(), S.template getValue< 0, 1, 0>(),
2078 S.template getValue< 0, 0, 0>(),
2079 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>() );
2082 template<
typename Stencil>
2083 static typename Stencil::ValueType
inZ(
const Stencil& S)
2085 return difference(S.template getValue< 0, 0, 2>(), S.template getValue< 0, 0, 1>(),
2086 S.template getValue< 0, 0, 0>(),
2087 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>() );
2091 template<
typename Stencil>
2092 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2094 return crossdifference(
2095 S.template getValue< 2, 2, 0>(), S.template getValue< 2, 1, 0>(),
2096 S.template getValue< 2,-1, 0>(), S.template getValue< 2,-2, 0>(),
2097 S.template getValue< 1, 2, 0>(), S.template getValue< 1, 1, 0>(),
2098 S.template getValue< 1,-1, 0>(), S.template getValue< 1,-2, 0>(),
2099 S.template getValue<-2, 2, 0>(), S.template getValue<-2, 1, 0>(),
2100 S.template getValue<-2,-1, 0>(), S.template getValue<-2,-2, 0>(),
2101 S.template getValue<-1, 2, 0>(), S.template getValue<-1, 1, 0>(),
2102 S.template getValue<-1,-1, 0>(), S.template getValue<-1,-2, 0>() );
2105 template<
typename Stencil>
2106 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2108 return crossdifference(
2109 S.template getValue< 2, 0, 2>(), S.template getValue< 2, 0, 1>(),
2110 S.template getValue< 2, 0,-1>(), S.template getValue< 2, 0,-2>(),
2111 S.template getValue< 1, 0, 2>(), S.template getValue< 1, 0, 1>(),
2112 S.template getValue< 1, 0,-1>(), S.template getValue< 1, 0,-2>(),
2113 S.template getValue<-2, 0, 2>(), S.template getValue<-2, 0, 1>(),
2114 S.template getValue<-2, 0,-1>(), S.template getValue<-2, 0,-2>(),
2115 S.template getValue<-1, 0, 2>(), S.template getValue<-1, 0, 1>(),
2116 S.template getValue<-1, 0,-1>(), S.template getValue<-1, 0,-2>() );
2119 template<
typename Stencil>
2120 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2122 return crossdifference(
2123 S.template getValue< 0, 2, 2>(), S.template getValue< 0, 2, 1>(),
2124 S.template getValue< 0, 2,-1>(), S.template getValue< 0, 2,-2>(),
2125 S.template getValue< 0, 1, 2>(), S.template getValue< 0, 1, 1>(),
2126 S.template getValue< 0, 1,-1>(), S.template getValue< 0, 1,-2>(),
2127 S.template getValue< 0,-2, 2>(), S.template getValue< 0,-2, 1>(),
2128 S.template getValue< 0,-2,-1>(), S.template getValue< 0,-2,-2>(),
2129 S.template getValue< 0,-1, 2>(), S.template getValue< 0,-1, 1>(),
2130 S.template getValue< 0,-1,-1>(), S.template getValue< 0,-1,-2>() );
2139 template <
typename ValueType>
2140 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
2141 const ValueType& xp0,
2142 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3)
2144 return ValueType(1./90.)*(xp3 + xm3) - ValueType(3./20.)*(xp2 + xm2)
2145 + ValueType(1.5)*(xp1 + xm1) - ValueType(49./18.)*xp0;
2148 template <
typename ValueType>
2150 const ValueType& xp1ym1,
const ValueType& xm1ym1,
2151 const ValueType& xp2yp1,
const ValueType& xm2yp1,
2152 const ValueType& xp2ym1,
const ValueType& xm2ym1,
2153 const ValueType& xp3yp1,
const ValueType& xm3yp1,
2154 const ValueType& xp3ym1,
const ValueType& xm3ym1,
2155 const ValueType& xp1yp2,
const ValueType& xm1yp2,
2156 const ValueType& xp1ym2,
const ValueType& xm1ym2,
2157 const ValueType& xp2yp2,
const ValueType& xm2yp2,
2158 const ValueType& xp2ym2,
const ValueType& xm2ym2,
2159 const ValueType& xp3yp2,
const ValueType& xm3yp2,
2160 const ValueType& xp3ym2,
const ValueType& xm3ym2,
2161 const ValueType& xp1yp3,
const ValueType& xm1yp3,
2162 const ValueType& xp1ym3,
const ValueType& xm1ym3,
2163 const ValueType& xp2yp3,
const ValueType& xm2yp3,
2164 const ValueType& xp2ym3,
const ValueType& xm2ym3,
2165 const ValueType& xp3yp3,
const ValueType& xm3yp3,
2166 const ValueType& xp3ym3,
const ValueType& xm3ym3 )
2169 ValueType(0.7500)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1) -
2170 ValueType(0.1500)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1) +
2171 ValueType(1./60.)*(xp3yp1 - xm3yp1 - xp3ym1 + xm3ym1);
2174 ValueType(0.7500)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2) -
2175 ValueType(0.1500)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2) +
2176 ValueType(1./60.)*(xp3yp2 - xm3yp2 - xp3ym2 + xm3ym2);
2179 ValueType(0.7500)*(xp1yp3 - xm1yp3 - xp1ym3 + xm1ym3) -
2180 ValueType(0.1500)*(xp2yp3 - xm2yp3 - xp2ym3 + xm2ym3) +
2181 ValueType(1./60.)*(xp3yp3 - xm3yp3 - xp3ym3 + xm3ym3);
2183 return ValueType(0.75)*tmp1 - ValueType(0.15)*tmp2 + ValueType(1./60)*tmp3;
2188 template<
typename Accessor>
2189 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2192 grid.getValue(ijk.
offsetBy( 3, 0, 0)), grid.getValue(ijk.
offsetBy( 2, 0, 0)),
2193 grid.getValue(ijk.
offsetBy( 1, 0, 0)), grid.getValue(ijk),
2194 grid.getValue(ijk.
offsetBy(-1, 0, 0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)),
2195 grid.getValue(ijk.
offsetBy(-3, 0, 0)) );
2198 template<
typename Accessor>
2199 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2202 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
2203 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk),
2204 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)),
2205 grid.getValue(ijk.
offsetBy( 0,-3, 0)) );
2208 template<
typename Accessor>
2209 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2213 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
2214 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk),
2215 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)),
2216 grid.getValue(ijk.
offsetBy( 0, 0,-3)) );
2219 template<
typename Accessor>
2220 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2222 typedef typename Accessor::ValueType ValueT;
2232 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2235 template<
typename Accessor>
2236 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2238 typedef typename Accessor::ValueType ValueT;
2248 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2251 template<
typename Accessor>
2252 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2254 typedef typename Accessor::ValueType ValueT;
2264 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2269 template<
typename Stencil>
2270 static typename Stencil::ValueType
inX(
const Stencil& S)
2272 return difference( S.template getValue< 3, 0, 0>(), S.template getValue< 2, 0, 0>(),
2273 S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
2274 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>(),
2275 S.template getValue<-3, 0, 0>() );
2278 template<
typename Stencil>
2279 static typename Stencil::ValueType
inY(
const Stencil& S)
2281 return difference( S.template getValue< 0, 3, 0>(), S.template getValue< 0, 2, 0>(),
2282 S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
2283 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>(),
2284 S.template getValue< 0,-3, 0>() );
2288 template<
typename Stencil>
2289 static typename Stencil::ValueType
inZ(
const Stencil& S)
2291 return difference( S.template getValue< 0, 0, 3>(), S.template getValue< 0, 0, 2>(),
2292 S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
2293 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>(),
2294 S.template getValue< 0, 0,-3>() );
2297 template<
typename Stencil>
2298 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2300 return crossdifference( S.template getValue< 1, 1, 0>(), S.template getValue<-1, 1, 0>(),
2301 S.template getValue< 1,-1, 0>(), S.template getValue<-1,-1, 0>(),
2302 S.template getValue< 2, 1, 0>(), S.template getValue<-2, 1, 0>(),
2303 S.template getValue< 2,-1, 0>(), S.template getValue<-2,-1, 0>(),
2304 S.template getValue< 3, 1, 0>(), S.template getValue<-3, 1, 0>(),
2305 S.template getValue< 3,-1, 0>(), S.template getValue<-3,-1, 0>(),
2306 S.template getValue< 1, 2, 0>(), S.template getValue<-1, 2, 0>(),
2307 S.template getValue< 1,-2, 0>(), S.template getValue<-1,-2, 0>(),
2308 S.template getValue< 2, 2, 0>(), S.template getValue<-2, 2, 0>(),
2309 S.template getValue< 2,-2, 0>(), S.template getValue<-2,-2, 0>(),
2310 S.template getValue< 3, 2, 0>(), S.template getValue<-3, 2, 0>(),
2311 S.template getValue< 3,-2, 0>(), S.template getValue<-3,-2, 0>(),
2312 S.template getValue< 1, 3, 0>(), S.template getValue<-1, 3, 0>(),
2313 S.template getValue< 1,-3, 0>(), S.template getValue<-1,-3, 0>(),
2314 S.template getValue< 2, 3, 0>(), S.template getValue<-2, 3, 0>(),
2315 S.template getValue< 2,-3, 0>(), S.template getValue<-2,-3, 0>(),
2316 S.template getValue< 3, 3, 0>(), S.template getValue<-3, 3, 0>(),
2317 S.template getValue< 3,-3, 0>(), S.template getValue<-3,-3, 0>() );
2320 template<
typename Stencil>
2321 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2323 return crossdifference( S.template getValue< 1, 0, 1>(), S.template getValue<-1, 0, 1>(),
2324 S.template getValue< 1, 0,-1>(), S.template getValue<-1, 0,-1>(),
2325 S.template getValue< 2, 0, 1>(), S.template getValue<-2, 0, 1>(),
2326 S.template getValue< 2, 0,-1>(), S.template getValue<-2, 0,-1>(),
2327 S.template getValue< 3, 0, 1>(), S.template getValue<-3, 0, 1>(),
2328 S.template getValue< 3, 0,-1>(), S.template getValue<-3, 0,-1>(),
2329 S.template getValue< 1, 0, 2>(), S.template getValue<-1, 0, 2>(),
2330 S.template getValue< 1, 0,-2>(), S.template getValue<-1, 0,-2>(),
2331 S.template getValue< 2, 0, 2>(), S.template getValue<-2, 0, 2>(),
2332 S.template getValue< 2, 0,-2>(), S.template getValue<-2, 0,-2>(),
2333 S.template getValue< 3, 0, 2>(), S.template getValue<-3, 0, 2>(),
2334 S.template getValue< 3, 0,-2>(), S.template getValue<-3, 0,-2>(),
2335 S.template getValue< 1, 0, 3>(), S.template getValue<-1, 0, 3>(),
2336 S.template getValue< 1, 0,-3>(), S.template getValue<-1, 0,-3>(),
2337 S.template getValue< 2, 0, 3>(), S.template getValue<-2, 0, 3>(),
2338 S.template getValue< 2, 0,-3>(), S.template getValue<-2, 0,-3>(),
2339 S.template getValue< 3, 0, 3>(), S.template getValue<-3, 0, 3>(),
2340 S.template getValue< 3, 0,-3>(), S.template getValue<-3, 0,-3>() );
2343 template<
typename Stencil>
2344 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2346 return crossdifference( S.template getValue< 0, 1, 1>(), S.template getValue< 0,-1, 1>(),
2347 S.template getValue< 0, 1,-1>(), S.template getValue< 0,-1,-1>(),
2348 S.template getValue< 0, 2, 1>(), S.template getValue< 0,-2, 1>(),
2349 S.template getValue< 0, 2,-1>(), S.template getValue< 0,-2,-1>(),
2350 S.template getValue< 0, 3, 1>(), S.template getValue< 0,-3, 1>(),
2351 S.template getValue< 0, 3,-1>(), S.template getValue< 0,-3,-1>(),
2352 S.template getValue< 0, 1, 2>(), S.template getValue< 0,-1, 2>(),
2353 S.template getValue< 0, 1,-2>(), S.template getValue< 0,-1,-2>(),
2354 S.template getValue< 0, 2, 2>(), S.template getValue< 0,-2, 2>(),
2355 S.template getValue< 0, 2,-2>(), S.template getValue< 0,-2,-2>(),
2356 S.template getValue< 0, 3, 2>(), S.template getValue< 0,-3, 2>(),
2357 S.template getValue< 0, 3,-2>(), S.template getValue< 0,-3,-2>(),
2358 S.template getValue< 0, 1, 3>(), S.template getValue< 0,-1, 3>(),
2359 S.template getValue< 0, 1,-3>(), S.template getValue< 0,-1,-3>(),
2360 S.template getValue< 0, 2, 3>(), S.template getValue< 0,-2, 3>(),
2361 S.template getValue< 0, 2,-3>(), S.template getValue< 0,-2,-3>(),
2362 S.template getValue< 0, 3, 3>(), S.template getValue< 0,-3, 3>(),
2363 S.template getValue< 0, 3,-3>(), S.template getValue< 0,-3,-3>() );
2372 #endif // OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED Definition: FiniteDifference.h:264
Coord offsetBy(Int32 dx, Int32 dy, Int32 dz) const
Definition: Coord.h:115
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1154
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:620
Definition: FiniteDifference.h:263
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:890
Definition: FiniteDifference.h:66
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1237
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1652
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:1949
Definition: FiniteDifference.h:195
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2007
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:856
static ValueType difference(const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:753
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:1956
const Type & Max(const Type &a, const Type &b)
Return the maximum of two values.
Definition: Math.h:545
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1700
double Real
Definition: Types.h:63
Definition: FiniteDifference.h:178
TemporalIntegrationScheme
Temporal integration schemes.
Definition: FiniteDifference.h:261
Definition: FiniteDifference.h:464
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:692
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:820
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
DScheme stringToDScheme(const std::string &s)
Definition: FiniteDifference.h:105
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1077
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1751
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1550
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2039
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1169
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1608
Definition: FiniteDifference.h:198
Definition: FiniteDifference.h:64
const Type & Min(const Type &a, const Type &b)
Return the minimum of two values.
Definition: Math.h:606
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:535
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2120
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1284
Definition: FiniteDifference.h:194
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1622
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2016
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1570
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:951
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1558
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1431
Real GodunovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:386
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1012
Definition: FiniteDifference.h:71
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1998
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1800
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:562
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1592
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1910
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:529
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1326
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2067
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1396
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1661
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1297
Definition: FiniteDifference.h:193
Definition: FiniteDifference.h:61
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2236
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1129
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2026
Definition: FiniteDifference.h:1810
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1771
OPENVDB_DEPRECATED Real GudonovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:395
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1211
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1927
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:1976
DScheme
Different discrete schemes used in the first derivatives.
Definition: FiniteDifference.h:59
DDScheme
Different discrete schemes used in the second derivatives.
Definition: FiniteDifference.h:177
Definition: FiniteDifference.h:68
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1970
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:629
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1544
Definition: FiniteDifference.h:265
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1584
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2321
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1920
static ValueType difference(const ValueType &xp1, const ValueType &xp0, const ValueType &xm1)
Definition: FiniteDifference.h:1856
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:919
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1709
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1870
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1885
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1668
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:811
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1139
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:523
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:2149
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1564
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1381
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1268
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1439
std::string temporalIntegrationSchemeToMenuName(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:304
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:701
#define OPENVDB_VERSION_NAME
Definition: version.h:43
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1718
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2289
Definition: FiniteDifference.h:73
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:785
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:848
static ValueType crossdifference(const ValueType &xpyp, const ValueType &xpym, const ValueType &xmyp, const ValueType &xmym)
Definition: FiniteDifference.h:1862
std::string biasedGradientSchemeToString(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:204
Definition: FiniteDifference.h:179
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1411
Definition: FiniteDifference.h:180
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2252
std::string dsSchemeToString(DScheme dss)
Definition: FiniteDifference.h:81
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1365
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1114
Definition: FiniteDifference.h:77
Definition: FiniteDifference.h:201
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1308
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2092
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2, const ValueType &xm3)
Definition: FiniteDifference.h:673
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1893
Definition: Exceptions.h:39
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:2140
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:498
BiasedGradientScheme stringToBiasedGradientScheme(const std::string &s)
Definition: FiniteDifference.h:219
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1454
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:772
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:580
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1485
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:881
static ValueType difference(const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:944
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1029
Definition: FiniteDifference.h:60
static ValueType difference(const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:996
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2344
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:514
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1761
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:658
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:547
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1335
Definition: FiniteDifference.h:70
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:983
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1902
std::string biasedGradientSchemeToMenuName(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:242
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2189
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1691
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:591
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
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1726
TemporalIntegrationScheme stringToTemporalIntegrationScheme(const std::string &s)
Definition: FiniteDifference.h:284
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1877
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:829
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2209
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2075
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:604
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:963
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1199
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:570
Definition: FiniteDifference.h:181
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:554
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2052
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1105
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:840
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:971
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:734
Definition: FiniteDifference.h:67
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2106
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:585
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1004
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1045
Definition: FiniteDifference.h:63
Definition: FiniteDifference.h:197
Definition: FiniteDifference.h:69
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:711
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:766
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1644
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1734
Definition: FiniteDifference.h:65
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2270
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:506
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1253
std::string temporalIntegrationSchemeToString(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:271
Definition: FiniteDifference.h:184
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:492
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1020
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:977
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1037
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1096
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:48
Definition: FiniteDifference.h:72
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:779
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1350
BiasedGradientScheme
Biased Gradients are limited to non-centered differences.
Definition: FiniteDifference.h:192
Definition: FiniteDifference.h:196
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:683
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:872
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2199
Type Pow2(Type x)
Return .
Definition: Math.h:498
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2298
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:640
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1636
Definition: FiniteDifference.h:1532
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:957
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1185
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:928
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:803
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:899
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1469
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:649
std::string dsSchemeToMenuName(DScheme dss)
Definition: FiniteDifference.h:147
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1500
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:71
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2083
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:760
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2279
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1229
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2220
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:910
Definition: FiniteDifference.h:268
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1068
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:1942
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:612
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1615
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:791
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1675
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:1060
Definition: FiniteDifference.h:262
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1782
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1791
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1086
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:722
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1934
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1515
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1600
Definition: FiniteDifference.h:74
Definition: FiniteDifference.h:62
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1537