33 #ifndef OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
34 #define OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
36 #include <openvdb/Types.h>
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 ValueType(1./3.)*xp3 - ValueType(1.5)*xp2
854 + ValueType(3.)*xp1 - ValueType(11./6.)*xp0;
859 template<
typename Accessor>
860 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
862 return difference( grid.getValue(ijk.
offsetBy(3,0,0)),
865 grid.getValue(ijk) );
868 template<
typename Accessor>
869 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
871 return difference( grid.getValue(ijk.
offsetBy(0,3,0)),
874 grid.getValue(ijk) );
877 template<
typename Accessor>
878 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
880 return difference( grid.getValue(ijk.
offsetBy(0,0,3)),
883 grid.getValue(ijk) );
888 template<
typename Stencil>
889 static typename Stencil::ValueType
inX(
const Stencil& S)
891 return difference(S.template getValue< 3, 0, 0>(),
892 S.template getValue< 2, 0, 0>(),
893 S.template getValue< 1, 0, 0>(),
894 S.template getValue< 0, 0, 0>() );
897 template<
typename Stencil>
898 static typename Stencil::ValueType
inY(
const Stencil& S)
900 return difference(S.template getValue< 0, 3, 0>(),
901 S.template getValue< 0, 2, 0>(),
902 S.template getValue< 0, 1, 0>(),
903 S.template getValue< 0, 0, 0>() );
906 template<
typename Stencil>
907 static typename Stencil::ValueType
inZ(
const Stencil& S)
909 return difference( S.template getValue< 0, 0, 3>(),
910 S.template getValue< 0, 0, 2>(),
911 S.template getValue< 0, 0, 1>(),
912 S.template getValue< 0, 0, 0>() );
922 template <
typename ValueType>
923 static ValueType
difference(
const ValueType& xm1,
const ValueType& xm0) {
929 template<
typename Accessor>
930 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
932 return difference(grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk));
935 template<
typename Accessor>
936 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
938 return difference(grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk));
941 template<
typename Accessor>
942 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
944 return difference(grid.getValue(ijk.
offsetBy(0, 0,-1)), grid.getValue(ijk));
949 template<
typename Stencil>
950 static typename Stencil::ValueType
inX(
const Stencil& S)
952 return difference(S.template getValue<-1, 0, 0>(), S.template getValue< 0, 0, 0>());
955 template<
typename Stencil>
956 static typename Stencil::ValueType
inY(
const Stencil& S)
958 return difference(S.template getValue< 0,-1, 0>(), S.template getValue< 0, 0, 0>());
961 template<
typename Stencil>
962 static typename Stencil::ValueType
inZ(
const Stencil& S)
964 return difference(S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0, 0>());
974 template <
typename ValueType>
975 static ValueType
difference(
const ValueType& xm2,
const ValueType& xm1,
const ValueType& xm0)
982 template<
typename Accessor>
983 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
985 return difference( grid.getValue(ijk.
offsetBy(-2,0,0)),
986 grid.getValue(ijk.
offsetBy(-1,0,0)),
987 grid.getValue(ijk) );
990 template<
typename Accessor>
991 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
993 return difference( grid.getValue(ijk.
offsetBy(0,-2,0)),
994 grid.getValue(ijk.
offsetBy(0,-1,0)),
995 grid.getValue(ijk) );
998 template<
typename Accessor>
999 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1001 return difference( grid.getValue(ijk.
offsetBy(0,0,-2)),
1002 grid.getValue(ijk.
offsetBy(0,0,-1)),
1003 grid.getValue(ijk) );
1007 template<
typename Stencil>
1008 static typename Stencil::ValueType
inX(
const Stencil& S)
1010 return difference( S.template getValue<-2, 0, 0>(),
1011 S.template getValue<-1, 0, 0>(),
1012 S.template getValue< 0, 0, 0>() );
1015 template<
typename Stencil>
1016 static typename Stencil::ValueType
inY(
const Stencil& S)
1018 return difference( S.template getValue< 0,-2, 0>(),
1019 S.template getValue< 0,-1, 0>(),
1020 S.template getValue< 0, 0, 0>() );
1023 template<
typename Stencil>
1024 static typename Stencil::ValueType
inZ(
const Stencil& S)
1026 return difference( S.template getValue< 0, 0,-2>(),
1027 S.template getValue< 0, 0,-1>(),
1028 S.template getValue< 0, 0, 0>() );
1038 template <
typename ValueType>
1039 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
1040 const ValueType& xm1,
const ValueType& xm0)
1046 template<
typename Accessor>
1047 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1049 return difference( grid.getValue(ijk.
offsetBy(-3,0,0)),
1050 grid.getValue(ijk.
offsetBy(-2,0,0)),
1051 grid.getValue(ijk.
offsetBy(-1,0,0)),
1052 grid.getValue(ijk) );
1055 template<
typename Accessor>
1056 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1058 return difference( grid.getValue(ijk.
offsetBy( 0,-3,0)),
1059 grid.getValue(ijk.
offsetBy( 0,-2,0)),
1060 grid.getValue(ijk.
offsetBy( 0,-1,0)),
1061 grid.getValue(ijk) );
1064 template<
typename Accessor>
1065 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1067 return difference( grid.getValue(ijk.
offsetBy( 0, 0,-3)),
1068 grid.getValue(ijk.
offsetBy( 0, 0,-2)),
1069 grid.getValue(ijk.
offsetBy( 0, 0,-1)),
1070 grid.getValue(ijk) );
1074 template<
typename Stencil>
1075 static typename Stencil::ValueType
inX(
const Stencil& S)
1077 return difference( S.template getValue<-3, 0, 0>(),
1078 S.template getValue<-2, 0, 0>(),
1079 S.template getValue<-1, 0, 0>(),
1080 S.template getValue< 0, 0, 0>() );
1083 template<
typename Stencil>
1084 static typename Stencil::ValueType
inY(
const Stencil& S)
1086 return difference( S.template getValue< 0,-3, 0>(),
1087 S.template getValue< 0,-2, 0>(),
1088 S.template getValue< 0,-1, 0>(),
1089 S.template getValue< 0, 0, 0>() );
1092 template<
typename Stencil>
1093 static typename Stencil::ValueType
inZ(
const Stencil& S)
1095 return difference( S.template getValue< 0, 0,-3>(),
1096 S.template getValue< 0, 0,-2>(),
1097 S.template getValue< 0, 0,-1>(),
1098 S.template getValue< 0, 0, 0>() );
1107 template <
typename ValueType>
1108 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1109 const ValueType& xp1,
const ValueType& xp0,
1110 const ValueType& xm1,
const ValueType& xm2) {
1111 return WENO5<ValueType>(xp3, xp2, xp1, xp0, xm1)
1112 - WENO5<ValueType>(xp2, xp1, xp0, xm1, xm2);
1117 template<
typename Accessor>
1118 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1120 typedef typename Accessor::ValueType ValueType;
1122 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1123 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1124 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1125 V[3] = grid.getValue(ijk);
1126 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1127 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1129 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1132 template<
typename Accessor>
1133 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1135 typedef typename Accessor::ValueType ValueType;
1137 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1138 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1139 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1140 V[3] = grid.getValue(ijk);
1141 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1142 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1144 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1147 template<
typename Accessor>
1148 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1150 typedef typename Accessor::ValueType ValueType;
1152 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1153 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1154 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1155 V[3] = grid.getValue(ijk);
1156 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1157 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1159 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1163 template<
typename Stencil>
1164 static typename Stencil::ValueType
inX(
const Stencil& S)
1167 return static_cast<typename Stencil::ValueType
>(difference(
1168 S.template getValue< 3, 0, 0>(),
1169 S.template getValue< 2, 0, 0>(),
1170 S.template getValue< 1, 0, 0>(),
1171 S.template getValue< 0, 0, 0>(),
1172 S.template getValue<-1, 0, 0>(),
1173 S.template getValue<-2, 0, 0>() ));
1177 template<
typename Stencil>
1178 static typename Stencil::ValueType
inY(
const Stencil& S)
1180 return static_cast<typename Stencil::ValueType
>(difference(
1181 S.template getValue< 0, 3, 0>(),
1182 S.template getValue< 0, 2, 0>(),
1183 S.template getValue< 0, 1, 0>(),
1184 S.template getValue< 0, 0, 0>(),
1185 S.template getValue< 0,-1, 0>(),
1186 S.template getValue< 0,-2, 0>() ));
1189 template<
typename Stencil>
1190 static typename Stencil::ValueType
inZ(
const Stencil& S)
1192 return static_cast<typename Stencil::ValueType
>(difference(
1193 S.template getValue< 0, 0, 3>(),
1194 S.template getValue< 0, 0, 2>(),
1195 S.template getValue< 0, 0, 1>(),
1196 S.template getValue< 0, 0, 0>(),
1197 S.template getValue< 0, 0,-1>(),
1198 S.template getValue< 0, 0,-2>() ));
1207 template <
typename ValueType>
1208 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
1209 const ValueType& xp1,
const ValueType& xp0,
1210 const ValueType& xm1,
const ValueType& xm2) {
1211 return WENO5<ValueType>(xp3 - xp2, xp2 - xp1, xp1 - xp0, xp0-xm1, xm1-xm2);
1215 template<
typename Accessor>
1216 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1218 typedef typename Accessor::ValueType ValueType;
1220 V[0] = grid.getValue(ijk.
offsetBy(3,0,0));
1221 V[1] = grid.getValue(ijk.
offsetBy(2,0,0));
1222 V[2] = grid.getValue(ijk.
offsetBy(1,0,0));
1223 V[3] = grid.getValue(ijk);
1224 V[4] = grid.getValue(ijk.
offsetBy(-1,0,0));
1225 V[5] = grid.getValue(ijk.
offsetBy(-2,0,0));
1227 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1231 template<
typename Accessor>
1232 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1234 typedef typename Accessor::ValueType ValueType;
1236 V[0] = grid.getValue(ijk.
offsetBy(0,3,0));
1237 V[1] = grid.getValue(ijk.
offsetBy(0,2,0));
1238 V[2] = grid.getValue(ijk.
offsetBy(0,1,0));
1239 V[3] = grid.getValue(ijk);
1240 V[4] = grid.getValue(ijk.
offsetBy(0,-1,0));
1241 V[5] = grid.getValue(ijk.
offsetBy(0,-2,0));
1243 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1246 template<
typename Accessor>
1247 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1249 typedef typename Accessor::ValueType ValueType;
1251 V[0] = grid.getValue(ijk.
offsetBy(0,0,3));
1252 V[1] = grid.getValue(ijk.
offsetBy(0,0,2));
1253 V[2] = grid.getValue(ijk.
offsetBy(0,0,1));
1254 V[3] = grid.getValue(ijk);
1255 V[4] = grid.getValue(ijk.
offsetBy(0,0,-1));
1256 V[5] = grid.getValue(ijk.
offsetBy(0,0,-2));
1258 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1262 template<
typename Stencil>
1263 static typename Stencil::ValueType
inX(
const Stencil& S)
1266 return difference( S.template getValue< 3, 0, 0>(),
1267 S.template getValue< 2, 0, 0>(),
1268 S.template getValue< 1, 0, 0>(),
1269 S.template getValue< 0, 0, 0>(),
1270 S.template getValue<-1, 0, 0>(),
1271 S.template getValue<-2, 0, 0>() );
1275 template<
typename Stencil>
1276 static typename Stencil::ValueType
inY(
const Stencil& S)
1278 return difference( S.template getValue< 0, 3, 0>(),
1279 S.template getValue< 0, 2, 0>(),
1280 S.template getValue< 0, 1, 0>(),
1281 S.template getValue< 0, 0, 0>(),
1282 S.template getValue< 0,-1, 0>(),
1283 S.template getValue< 0,-2, 0>() );
1286 template<
typename Stencil>
1287 static typename Stencil::ValueType
inZ(
const Stencil& S)
1290 return difference( S.template getValue< 0, 0, 3>(),
1291 S.template getValue< 0, 0, 2>(),
1292 S.template getValue< 0, 0, 1>(),
1293 S.template getValue< 0, 0, 0>(),
1294 S.template getValue< 0, 0,-1>(),
1295 S.template getValue< 0, 0,-2>() );
1304 template<
typename ValueType>
1305 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1306 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1313 template<
typename Accessor>
1314 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1316 typedef typename Accessor::ValueType ValueType;
1318 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1319 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1320 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1321 V[3] = grid.getValue(ijk);
1322 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1323 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1325 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1328 template<
typename Accessor>
1329 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1331 typedef typename Accessor::ValueType ValueType;
1333 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1334 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1335 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1336 V[3] = grid.getValue(ijk);
1337 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1338 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1340 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1343 template<
typename Accessor>
1344 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1346 typedef typename Accessor::ValueType ValueType;
1348 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1349 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1350 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1351 V[3] = grid.getValue(ijk);
1352 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1353 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1355 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1359 template<
typename Stencil>
1360 static typename Stencil::ValueType
inX(
const Stencil& S)
1362 typedef typename Stencil::ValueType ValueType;
1364 V[0] = S.template getValue<-3, 0, 0>();
1365 V[1] = S.template getValue<-2, 0, 0>();
1366 V[2] = S.template getValue<-1, 0, 0>();
1367 V[3] = S.template getValue< 0, 0, 0>();
1368 V[4] = S.template getValue< 1, 0, 0>();
1369 V[5] = S.template getValue< 2, 0, 0>();
1371 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1374 template<
typename Stencil>
1375 static typename Stencil::ValueType
inY(
const Stencil& S)
1377 typedef typename Stencil::ValueType ValueType;
1379 V[0] = S.template getValue< 0,-3, 0>();
1380 V[1] = S.template getValue< 0,-2, 0>();
1381 V[2] = S.template getValue< 0,-1, 0>();
1382 V[3] = S.template getValue< 0, 0, 0>();
1383 V[4] = S.template getValue< 0, 1, 0>();
1384 V[5] = S.template getValue< 0, 2, 0>();
1386 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1389 template<
typename Stencil>
1390 static typename Stencil::ValueType
inZ(
const Stencil& S)
1392 typedef typename Stencil::ValueType ValueType;
1394 V[0] = S.template getValue< 0, 0,-3>();
1395 V[1] = S.template getValue< 0, 0,-2>();
1396 V[2] = S.template getValue< 0, 0,-1>();
1397 V[3] = S.template getValue< 0, 0, 0>();
1398 V[4] = S.template getValue< 0, 0, 1>();
1399 V[5] = S.template getValue< 0, 0, 2>();
1401 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1409 template<
typename ValueType>
1410 static ValueType
difference(
const ValueType& xm3,
const ValueType& xm2,
const ValueType& xm1,
1411 const ValueType& xm0,
const ValueType& xp1,
const ValueType& xp2)
1417 template<
typename Accessor>
1418 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1420 typedef typename Accessor::ValueType ValueType;
1422 V[0] = grid.getValue(ijk.
offsetBy(-3,0,0));
1423 V[1] = grid.getValue(ijk.
offsetBy(-2,0,0));
1424 V[2] = grid.getValue(ijk.
offsetBy(-1,0,0));
1425 V[3] = grid.getValue(ijk);
1426 V[4] = grid.getValue(ijk.
offsetBy(1,0,0));
1427 V[5] = grid.getValue(ijk.
offsetBy(2,0,0));
1429 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1432 template<
typename Accessor>
1433 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1435 typedef typename Accessor::ValueType ValueType;
1437 V[0] = grid.getValue(ijk.
offsetBy(0,-3,0));
1438 V[1] = grid.getValue(ijk.
offsetBy(0,-2,0));
1439 V[2] = grid.getValue(ijk.
offsetBy(0,-1,0));
1440 V[3] = grid.getValue(ijk);
1441 V[4] = grid.getValue(ijk.
offsetBy(0,1,0));
1442 V[5] = grid.getValue(ijk.
offsetBy(0,2,0));
1444 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1447 template<
typename Accessor>
1448 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1450 typedef typename Accessor::ValueType ValueType;
1452 V[0] = grid.getValue(ijk.
offsetBy(0,0,-3));
1453 V[1] = grid.getValue(ijk.
offsetBy(0,0,-2));
1454 V[2] = grid.getValue(ijk.
offsetBy(0,0,-1));
1455 V[3] = grid.getValue(ijk);
1456 V[4] = grid.getValue(ijk.
offsetBy(0,0,1));
1457 V[5] = grid.getValue(ijk.
offsetBy(0,0,2));
1459 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1463 template<
typename Stencil>
1464 static typename Stencil::ValueType
inX(
const Stencil& S)
1466 typedef typename Stencil::ValueType ValueType;
1468 V[0] = S.template getValue<-3, 0, 0>();
1469 V[1] = S.template getValue<-2, 0, 0>();
1470 V[2] = S.template getValue<-1, 0, 0>();
1471 V[3] = S.template getValue< 0, 0, 0>();
1472 V[4] = S.template getValue< 1, 0, 0>();
1473 V[5] = S.template getValue< 2, 0, 0>();
1475 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1478 template<
typename Stencil>
1479 static typename Stencil::ValueType
inY(
const Stencil& S)
1481 typedef typename Stencil::ValueType ValueType;
1483 V[0] = S.template getValue< 0,-3, 0>();
1484 V[1] = S.template getValue< 0,-2, 0>();
1485 V[2] = S.template getValue< 0,-1, 0>();
1486 V[3] = S.template getValue< 0, 0, 0>();
1487 V[4] = S.template getValue< 0, 1, 0>();
1488 V[5] = S.template getValue< 0, 2, 0>();
1490 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1493 template<
typename Stencil>
1494 static typename Stencil::ValueType
inZ(
const Stencil& S)
1496 typedef typename Stencil::ValueType ValueType;
1498 V[0] = S.template getValue< 0, 0,-3>();
1499 V[1] = S.template getValue< 0, 0,-2>();
1500 V[2] = S.template getValue< 0, 0,-1>();
1501 V[3] = S.template getValue< 0, 0, 0>();
1502 V[4] = S.template getValue< 0, 0, 1>();
1503 V[5] = S.template getValue< 0, 0, 2>();
1505 return difference(V[0], V[1], V[2], V[3], V[4], V[5]);
1510 template<DScheme DiffScheme>
1514 template<
typename Accessor>
1515 static typename Accessor::ValueType::value_type
1521 template<
typename Accessor>
1522 static typename Accessor::ValueType::value_type
1527 template<
typename Accessor>
1528 static typename Accessor::ValueType::value_type
1536 template<
typename Stencil>
1537 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1542 template<
typename Stencil>
1543 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1548 template<
typename Stencil>
1549 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1561 template<
typename Accessor>
1562 static typename Accessor::ValueType::value_type
1566 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1569 template<
typename Accessor>
1570 static typename Accessor::ValueType::value_type
1574 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1577 template<
typename Accessor>
1578 static typename Accessor::ValueType::value_type
1582 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1586 template<
typename Stencil>
1587 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1590 S.template getValue<-1, 0, 0>()[n] );
1593 template<
typename Stencil>
1594 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1597 S.template getValue< 0,-1, 0>()[n] );
1600 template<
typename Stencil>
1601 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1604 S.template getValue< 0, 0,-1>()[n] );
1613 template<
typename Accessor>
1614 static typename Accessor::ValueType::value_type
1618 grid.getValue(ijk.
offsetBy(-1, 0, 0))[n] );
1621 template<
typename Accessor>
1622 static typename Accessor::ValueType::value_type
1626 grid.getValue(ijk.
offsetBy(0,-1, 0))[n] );
1629 template<
typename Accessor>
1630 static typename Accessor::ValueType::value_type
1634 grid.getValue(ijk.
offsetBy(0, 0,-1))[n] );
1639 template<
typename Stencil>
1640 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1643 S.template getValue<-1, 0, 0>()[n] );
1646 template<
typename Stencil>
1647 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1650 S.template getValue< 0,-1, 0>()[n] );
1653 template<
typename Stencil>
1654 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1657 S.template getValue< 0, 0,-1>()[n] );
1668 template<
typename Accessor>
1669 static typename Accessor::ValueType::value_type
1673 grid.getValue(ijk.
offsetBy(2, 0, 0))[n], grid.getValue(ijk.
offsetBy( 1, 0, 0))[n],
1674 grid.getValue(ijk.
offsetBy(-1,0, 0))[n], grid.getValue(ijk.
offsetBy(-2, 0, 0))[n]);
1677 template<
typename Accessor>
1678 static typename Accessor::ValueType::value_type
1682 grid.getValue(ijk.
offsetBy( 0, 2, 0))[n], grid.getValue(ijk.
offsetBy( 0, 1, 0))[n],
1683 grid.getValue(ijk.
offsetBy( 0,-1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-2, 0))[n]);
1686 template<
typename Accessor>
1687 static typename Accessor::ValueType::value_type
1691 grid.getValue(ijk.
offsetBy(0,0, 2))[n], grid.getValue(ijk.
offsetBy( 0, 0, 1))[n],
1692 grid.getValue(ijk.
offsetBy(0,0,-1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-2))[n]);
1696 template<
typename Stencil>
1697 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1700 S.template getValue< 2, 0, 0>()[n], S.template getValue< 1, 0, 0>()[n],
1701 S.template getValue<-1, 0, 0>()[n], S.template getValue<-2, 0, 0>()[n] );
1704 template<
typename Stencil>
1705 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1708 S.template getValue< 0, 2, 0>()[n], S.template getValue< 0, 1, 0>()[n],
1709 S.template getValue< 0,-1, 0>()[n], S.template getValue< 0,-2, 0>()[n]);
1712 template<
typename Stencil>
1713 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1716 S.template getValue< 0, 0, 2>()[n], S.template getValue< 0, 0, 1>()[n],
1717 S.template getValue< 0, 0,-1>()[n], S.template getValue< 0, 0,-2>()[n]);
1728 template<
typename Accessor>
1729 static typename Accessor::ValueType::value_type
1733 grid.getValue(ijk.
offsetBy( 3, 0, 0))[n], grid.getValue(ijk.
offsetBy( 2, 0, 0))[n],
1734 grid.getValue(ijk.
offsetBy( 1, 0, 0))[n], grid.getValue(ijk.
offsetBy(-1, 0, 0))[n],
1735 grid.getValue(ijk.
offsetBy(-2, 0, 0))[n], grid.getValue(ijk.
offsetBy(-3, 0, 0))[n] );
1738 template<
typename Accessor>
1739 static typename Accessor::ValueType::value_type
1743 grid.getValue(ijk.
offsetBy( 0, 3, 0))[n], grid.getValue(ijk.
offsetBy( 0, 2, 0))[n],
1744 grid.getValue(ijk.
offsetBy( 0, 1, 0))[n], grid.getValue(ijk.
offsetBy( 0,-1, 0))[n],
1745 grid.getValue(ijk.
offsetBy( 0,-2, 0))[n], grid.getValue(ijk.
offsetBy( 0,-3, 0))[n] );
1748 template<
typename Accessor>
1749 static typename Accessor::ValueType::value_type
1753 grid.getValue(ijk.
offsetBy( 0, 0, 3))[n], grid.getValue(ijk.
offsetBy( 0, 0, 2))[n],
1754 grid.getValue(ijk.
offsetBy( 0, 0, 1))[n], grid.getValue(ijk.
offsetBy( 0, 0,-1))[n],
1755 grid.getValue(ijk.
offsetBy( 0, 0,-2))[n], grid.getValue(ijk.
offsetBy( 0, 0,-3))[n] );
1760 template<
typename Stencil>
1761 static typename Stencil::ValueType::value_type
inX(
const Stencil& S,
int n)
1764 S.template getValue< 3, 0, 0>()[n], S.template getValue< 2, 0, 0>()[n],
1765 S.template getValue< 1, 0, 0>()[n], S.template getValue<-1, 0, 0>()[n],
1766 S.template getValue<-2, 0, 0>()[n], S.template getValue<-3, 0, 0>()[n] );
1769 template<
typename Stencil>
1770 static typename Stencil::ValueType::value_type
inY(
const Stencil& S,
int n)
1773 S.template getValue< 0, 3, 0>()[n], S.template getValue< 0, 2, 0>()[n],
1774 S.template getValue< 0, 1, 0>()[n], S.template getValue< 0,-1, 0>()[n],
1775 S.template getValue< 0,-2, 0>()[n], S.template getValue< 0,-3, 0>()[n] );
1778 template<
typename Stencil>
1779 static typename Stencil::ValueType::value_type
inZ(
const Stencil& S,
int n)
1782 S.template getValue< 0, 0, 3>()[n], S.template getValue< 0, 0, 2>()[n],
1783 S.template getValue< 0, 0, 1>()[n], S.template getValue< 0, 0,-1>()[n],
1784 S.template getValue< 0, 0,-2>()[n], S.template getValue< 0, 0,-3>()[n] );
1788 template<DDScheme DiffScheme>
1792 template<
typename Accessor>
1793 static typename Accessor::ValueType inX(
const Accessor& grid,
const Coord& ijk);
1794 template<
typename Accessor>
1795 static typename Accessor::ValueType inY(
const Accessor& grid,
const Coord& ijk);
1796 template<
typename Accessor>
1797 static typename Accessor::ValueType inZ(
const Accessor& grid,
const Coord& ijk);
1800 template<
typename Accessor>
1801 static typename Accessor::ValueType inXandY(
const Accessor& grid,
const Coord& ijk);
1803 template<
typename Accessor>
1804 static typename Accessor::ValueType inXandZ(
const Accessor& grid,
const Coord& ijk);
1806 template<
typename Accessor>
1807 static typename Accessor::ValueType inYandZ(
const Accessor& grid,
const Coord& ijk);
1811 template<
typename Stencil>
1812 static typename Stencil::ValueType inX(
const Stencil& S);
1813 template<
typename Stencil>
1814 static typename Stencil::ValueType inY(
const Stencil& S);
1815 template<
typename Stencil>
1816 static typename Stencil::ValueType inZ(
const Stencil& S);
1819 template<
typename Stencil>
1820 static typename Stencil::ValueType inXandY(
const Stencil& S);
1822 template<
typename Stencil>
1823 static typename Stencil::ValueType inXandZ(
const Stencil& S);
1825 template<
typename Stencil>
1826 static typename Stencil::ValueType inYandZ(
const Stencil& S);
1834 template <
typename ValueType>
1835 static ValueType
difference(
const ValueType& xp1,
const ValueType& xp0,
const ValueType& xm1)
1837 return xp1 + xm1 - ValueType(2)*xp0;
1840 template <
typename ValueType>
1842 const ValueType& xmyp,
const ValueType& xmym)
1844 return ValueType(0.25)*(xpyp + xmym - xpym - xmyp);
1848 template<
typename Accessor>
1849 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1851 return difference( grid.getValue(ijk.
offsetBy( 1,0,0)), grid.getValue(ijk),
1852 grid.getValue(ijk.
offsetBy(-1,0,0)) );
1855 template<
typename Accessor>
1856 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1859 return difference( grid.getValue(ijk.
offsetBy(0, 1,0)), grid.getValue(ijk),
1860 grid.getValue(ijk.
offsetBy(0,-1,0)) );
1863 template<
typename Accessor>
1864 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
1866 return difference( grid.getValue(ijk.
offsetBy( 0,0, 1)), grid.getValue(ijk),
1867 grid.getValue(ijk.
offsetBy( 0,0,-1)) );
1871 template<
typename Accessor>
1872 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
1874 return crossdifference(
1876 grid.getValue(ijk.
offsetBy(-1,1,0)), grid.getValue(ijk.
offsetBy(-1,-1,0)));
1880 template<
typename Accessor>
1881 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
1883 return crossdifference(
1885 grid.getValue(ijk.
offsetBy(-1,0,1)), grid.getValue(ijk.
offsetBy(-1,0,-1)) );
1888 template<
typename Accessor>
1889 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
1891 return crossdifference(
1893 grid.getValue(ijk.
offsetBy(0,-1,1)), grid.getValue(ijk.
offsetBy(0,-1,-1)) );
1898 template<
typename Stencil>
1899 static typename Stencil::ValueType
inX(
const Stencil& S)
1901 return difference( S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
1902 S.template getValue<-1, 0, 0>() );
1905 template<
typename Stencil>
1906 static typename Stencil::ValueType
inY(
const Stencil& S)
1908 return difference( S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
1909 S.template getValue< 0,-1, 0>() );
1912 template<
typename Stencil>
1913 static typename Stencil::ValueType
inZ(
const Stencil& S)
1915 return difference( S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
1916 S.template getValue< 0, 0,-1>() );
1920 template<
typename Stencil>
1921 static typename Stencil::ValueType
inXandY(
const Stencil& S)
1923 return crossdifference(S.template getValue< 1, 1, 0>(), S.template getValue< 1,-1, 0>(),
1924 S.template getValue<-1, 1, 0>(), S.template getValue<-1,-1, 0>() );
1927 template<
typename Stencil>
1928 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
1930 return crossdifference(S.template getValue< 1, 0, 1>(), S.template getValue< 1, 0,-1>(),
1931 S.template getValue<-1, 0, 1>(), S.template getValue<-1, 0,-1>() );
1934 template<
typename Stencil>
1935 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
1937 return crossdifference(S.template getValue< 0, 1, 1>(), S.template getValue< 0, 1,-1>(),
1938 S.template getValue< 0,-1, 1>(), S.template getValue< 0,-1,-1>() );
1948 template <
typename ValueType>
1949 static ValueType
difference(
const ValueType& xp2,
const ValueType& xp1,
const ValueType& xp0,
1950 const ValueType& xm1,
const ValueType& xm2) {
1951 return ValueType(-1./12.)*(xp2 + xm2) + ValueType(4./3.)*(xp1 + xm1) -ValueType(2.5)*xp0;
1954 template <
typename ValueType>
1956 const ValueType& xp2ym1,
const ValueType& xp2ym2,
1957 const ValueType& xp1yp2,
const ValueType& xp1yp1,
1958 const ValueType& xp1ym1,
const ValueType& xp1ym2,
1959 const ValueType& xm2yp2,
const ValueType& xm2yp1,
1960 const ValueType& xm2ym1,
const ValueType& xm2ym2,
1961 const ValueType& xm1yp2,
const ValueType& xm1yp1,
1962 const ValueType& xm1ym1,
const ValueType& xm1ym2 ) {
1964 ValueType(2./3.0)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1)-
1965 ValueType(1./12.)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1);
1967 ValueType(2./3.0)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2)-
1968 ValueType(1./12.)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2);
1970 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
1976 template<
typename Accessor>
1977 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
1982 grid.getValue(ijk.
offsetBy(-1,0,0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)));
1985 template<
typename Accessor>
1986 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
1991 grid.getValue(ijk.
offsetBy(0,-1,0)), grid.getValue(ijk.
offsetBy(0,-2, 0)));
1994 template<
typename Accessor>
1995 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2004 template<
typename Accessor>
2005 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2007 typedef typename Accessor::ValueType ValueType;
2008 typename Accessor::ValueType tmp1 =
2011 typename Accessor::ValueType tmp2 =
2014 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2017 template<
typename Accessor>
2018 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2020 typedef typename Accessor::ValueType ValueType;
2021 typename Accessor::ValueType tmp1 =
2024 typename Accessor::ValueType tmp2 =
2027 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2030 template<
typename Accessor>
2031 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2033 typedef typename Accessor::ValueType ValueType;
2034 typename Accessor::ValueType tmp1 =
2037 typename Accessor::ValueType tmp2 =
2040 return ValueType(2./3.)*tmp1 - ValueType(1./12.)*tmp2;
2045 template<
typename Stencil>
2046 static typename Stencil::ValueType
inX(
const Stencil& S)
2048 return difference(S.template getValue< 2, 0, 0>(), S.template getValue< 1, 0, 0>(),
2049 S.template getValue< 0, 0, 0>(),
2050 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>() );
2053 template<
typename Stencil>
2054 static typename Stencil::ValueType
inY(
const Stencil& S)
2056 return difference(S.template getValue< 0, 2, 0>(), S.template getValue< 0, 1, 0>(),
2057 S.template getValue< 0, 0, 0>(),
2058 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>() );
2061 template<
typename Stencil>
2062 static typename Stencil::ValueType
inZ(
const Stencil& S)
2064 return difference(S.template getValue< 0, 0, 2>(), S.template getValue< 0, 0, 1>(),
2065 S.template getValue< 0, 0, 0>(),
2066 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>() );
2070 template<
typename Stencil>
2071 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2073 return crossdifference(
2074 S.template getValue< 2, 2, 0>(), S.template getValue< 2, 1, 0>(),
2075 S.template getValue< 2,-1, 0>(), S.template getValue< 2,-2, 0>(),
2076 S.template getValue< 1, 2, 0>(), S.template getValue< 1, 1, 0>(),
2077 S.template getValue< 1,-1, 0>(), S.template getValue< 1,-2, 0>(),
2078 S.template getValue<-2, 2, 0>(), S.template getValue<-2, 1, 0>(),
2079 S.template getValue<-2,-1, 0>(), S.template getValue<-2,-2, 0>(),
2080 S.template getValue<-1, 2, 0>(), S.template getValue<-1, 1, 0>(),
2081 S.template getValue<-1,-1, 0>(), S.template getValue<-1,-2, 0>() );
2084 template<
typename Stencil>
2085 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2087 return crossdifference(
2088 S.template getValue< 2, 0, 2>(), S.template getValue< 2, 0, 1>(),
2089 S.template getValue< 2, 0,-1>(), S.template getValue< 2, 0,-2>(),
2090 S.template getValue< 1, 0, 2>(), S.template getValue< 1, 0, 1>(),
2091 S.template getValue< 1, 0,-1>(), S.template getValue< 1, 0,-2>(),
2092 S.template getValue<-2, 0, 2>(), S.template getValue<-2, 0, 1>(),
2093 S.template getValue<-2, 0,-1>(), S.template getValue<-2, 0,-2>(),
2094 S.template getValue<-1, 0, 2>(), S.template getValue<-1, 0, 1>(),
2095 S.template getValue<-1, 0,-1>(), S.template getValue<-1, 0,-2>() );
2098 template<
typename Stencil>
2099 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2101 return crossdifference(
2102 S.template getValue< 0, 2, 2>(), S.template getValue< 0, 2, 1>(),
2103 S.template getValue< 0, 2,-1>(), S.template getValue< 0, 2,-2>(),
2104 S.template getValue< 0, 1, 2>(), S.template getValue< 0, 1, 1>(),
2105 S.template getValue< 0, 1,-1>(), S.template getValue< 0, 1,-2>(),
2106 S.template getValue< 0,-2, 2>(), S.template getValue< 0,-2, 1>(),
2107 S.template getValue< 0,-2,-1>(), S.template getValue< 0,-2,-2>(),
2108 S.template getValue< 0,-1, 2>(), S.template getValue< 0,-1, 1>(),
2109 S.template getValue< 0,-1,-1>(), S.template getValue< 0,-1,-2>() );
2118 template <
typename ValueType>
2119 static ValueType
difference(
const ValueType& xp3,
const ValueType& xp2,
const ValueType& xp1,
2120 const ValueType& xp0,
2121 const ValueType& xm1,
const ValueType& xm2,
const ValueType& xm3)
2123 return ValueType(1./90.)*(xp3 + xm3) - ValueType(3./20.)*(xp2 + xm2)
2124 + ValueType(1.5)*(xp1 + xm1) - ValueType(49./18.)*xp0;
2127 template <
typename ValueType>
2129 const ValueType& xp1ym1,
const ValueType& xm1ym1,
2130 const ValueType& xp2yp1,
const ValueType& xm2yp1,
2131 const ValueType& xp2ym1,
const ValueType& xm2ym1,
2132 const ValueType& xp3yp1,
const ValueType& xm3yp1,
2133 const ValueType& xp3ym1,
const ValueType& xm3ym1,
2134 const ValueType& xp1yp2,
const ValueType& xm1yp2,
2135 const ValueType& xp1ym2,
const ValueType& xm1ym2,
2136 const ValueType& xp2yp2,
const ValueType& xm2yp2,
2137 const ValueType& xp2ym2,
const ValueType& xm2ym2,
2138 const ValueType& xp3yp2,
const ValueType& xm3yp2,
2139 const ValueType& xp3ym2,
const ValueType& xm3ym2,
2140 const ValueType& xp1yp3,
const ValueType& xm1yp3,
2141 const ValueType& xp1ym3,
const ValueType& xm1ym3,
2142 const ValueType& xp2yp3,
const ValueType& xm2yp3,
2143 const ValueType& xp2ym3,
const ValueType& xm2ym3,
2144 const ValueType& xp3yp3,
const ValueType& xm3yp3,
2145 const ValueType& xp3ym3,
const ValueType& xm3ym3 )
2148 ValueType(0.7500)*(xp1yp1 - xm1yp1 - xp1ym1 + xm1ym1) -
2149 ValueType(0.1500)*(xp2yp1 - xm2yp1 - xp2ym1 + xm2ym1) +
2150 ValueType(1./60.)*(xp3yp1 - xm3yp1 - xp3ym1 + xm3ym1);
2153 ValueType(0.7500)*(xp1yp2 - xm1yp2 - xp1ym2 + xm1ym2) -
2154 ValueType(0.1500)*(xp2yp2 - xm2yp2 - xp2ym2 + xm2ym2) +
2155 ValueType(1./60.)*(xp3yp2 - xm3yp2 - xp3ym2 + xm3ym2);
2158 ValueType(0.7500)*(xp1yp3 - xm1yp3 - xp1ym3 + xm1ym3) -
2159 ValueType(0.1500)*(xp2yp3 - xm2yp3 - xp2ym3 + xm2ym3) +
2160 ValueType(1./60.)*(xp3yp3 - xm3yp3 - xp3ym3 + xm3ym3);
2162 return ValueType(0.75)*tmp1 - ValueType(0.15)*tmp2 + ValueType(1./60)*tmp3;
2167 template<
typename Accessor>
2168 static typename Accessor::ValueType
inX(
const Accessor& grid,
const Coord& ijk)
2171 grid.getValue(ijk.
offsetBy( 3, 0, 0)), grid.getValue(ijk.
offsetBy( 2, 0, 0)),
2172 grid.getValue(ijk.
offsetBy( 1, 0, 0)), grid.getValue(ijk),
2173 grid.getValue(ijk.
offsetBy(-1, 0, 0)), grid.getValue(ijk.
offsetBy(-2, 0, 0)),
2174 grid.getValue(ijk.
offsetBy(-3, 0, 0)) );
2177 template<
typename Accessor>
2178 static typename Accessor::ValueType
inY(
const Accessor& grid,
const Coord& ijk)
2181 grid.getValue(ijk.
offsetBy( 0, 3, 0)), grid.getValue(ijk.
offsetBy( 0, 2, 0)),
2182 grid.getValue(ijk.
offsetBy( 0, 1, 0)), grid.getValue(ijk),
2183 grid.getValue(ijk.
offsetBy( 0,-1, 0)), grid.getValue(ijk.
offsetBy( 0,-2, 0)),
2184 grid.getValue(ijk.
offsetBy( 0,-3, 0)) );
2187 template<
typename Accessor>
2188 static typename Accessor::ValueType
inZ(
const Accessor& grid,
const Coord& ijk)
2192 grid.getValue(ijk.
offsetBy( 0, 0, 3)), grid.getValue(ijk.
offsetBy( 0, 0, 2)),
2193 grid.getValue(ijk.
offsetBy( 0, 0, 1)), grid.getValue(ijk),
2194 grid.getValue(ijk.
offsetBy( 0, 0,-1)), grid.getValue(ijk.
offsetBy( 0, 0,-2)),
2195 grid.getValue(ijk.
offsetBy( 0, 0,-3)) );
2198 template<
typename Accessor>
2199 static typename Accessor::ValueType
inXandY(
const Accessor& grid,
const Coord& ijk)
2201 typedef typename Accessor::ValueType ValueT;
2211 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2214 template<
typename Accessor>
2215 static typename Accessor::ValueType
inXandZ(
const Accessor& grid,
const Coord& ijk)
2217 typedef typename Accessor::ValueType ValueT;
2227 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2230 template<
typename Accessor>
2231 static typename Accessor::ValueType
inYandZ(
const Accessor& grid,
const Coord& ijk)
2233 typedef typename Accessor::ValueType ValueT;
2243 return ValueT(0.75*tmp1 - 0.15*tmp2 + 1./60*tmp3);
2248 template<
typename Stencil>
2249 static typename Stencil::ValueType
inX(
const Stencil& S)
2251 return difference( S.template getValue< 3, 0, 0>(), S.template getValue< 2, 0, 0>(),
2252 S.template getValue< 1, 0, 0>(), S.template getValue< 0, 0, 0>(),
2253 S.template getValue<-1, 0, 0>(), S.template getValue<-2, 0, 0>(),
2254 S.template getValue<-3, 0, 0>() );
2257 template<
typename Stencil>
2258 static typename Stencil::ValueType
inY(
const Stencil& S)
2260 return difference( S.template getValue< 0, 3, 0>(), S.template getValue< 0, 2, 0>(),
2261 S.template getValue< 0, 1, 0>(), S.template getValue< 0, 0, 0>(),
2262 S.template getValue< 0,-1, 0>(), S.template getValue< 0,-2, 0>(),
2263 S.template getValue< 0,-3, 0>() );
2267 template<
typename Stencil>
2268 static typename Stencil::ValueType
inZ(
const Stencil& S)
2270 return difference( S.template getValue< 0, 0, 3>(), S.template getValue< 0, 0, 2>(),
2271 S.template getValue< 0, 0, 1>(), S.template getValue< 0, 0, 0>(),
2272 S.template getValue< 0, 0,-1>(), S.template getValue< 0, 0,-2>(),
2273 S.template getValue< 0, 0,-3>() );
2276 template<
typename Stencil>
2277 static typename Stencil::ValueType
inXandY(
const Stencil& S)
2279 return crossdifference( S.template getValue< 1, 1, 0>(), S.template getValue<-1, 1, 0>(),
2280 S.template getValue< 1,-1, 0>(), S.template getValue<-1,-1, 0>(),
2281 S.template getValue< 2, 1, 0>(), S.template getValue<-2, 1, 0>(),
2282 S.template getValue< 2,-1, 0>(), S.template getValue<-2,-1, 0>(),
2283 S.template getValue< 3, 1, 0>(), S.template getValue<-3, 1, 0>(),
2284 S.template getValue< 3,-1, 0>(), S.template getValue<-3,-1, 0>(),
2285 S.template getValue< 1, 2, 0>(), S.template getValue<-1, 2, 0>(),
2286 S.template getValue< 1,-2, 0>(), S.template getValue<-1,-2, 0>(),
2287 S.template getValue< 2, 2, 0>(), S.template getValue<-2, 2, 0>(),
2288 S.template getValue< 2,-2, 0>(), S.template getValue<-2,-2, 0>(),
2289 S.template getValue< 3, 2, 0>(), S.template getValue<-3, 2, 0>(),
2290 S.template getValue< 3,-2, 0>(), S.template getValue<-3,-2, 0>(),
2291 S.template getValue< 1, 3, 0>(), S.template getValue<-1, 3, 0>(),
2292 S.template getValue< 1,-3, 0>(), S.template getValue<-1,-3, 0>(),
2293 S.template getValue< 2, 3, 0>(), S.template getValue<-2, 3, 0>(),
2294 S.template getValue< 2,-3, 0>(), S.template getValue<-2,-3, 0>(),
2295 S.template getValue< 3, 3, 0>(), S.template getValue<-3, 3, 0>(),
2296 S.template getValue< 3,-3, 0>(), S.template getValue<-3,-3, 0>() );
2299 template<
typename Stencil>
2300 static typename Stencil::ValueType
inXandZ(
const Stencil& S)
2302 return crossdifference( S.template getValue< 1, 0, 1>(), S.template getValue<-1, 0, 1>(),
2303 S.template getValue< 1, 0,-1>(), S.template getValue<-1, 0,-1>(),
2304 S.template getValue< 2, 0, 1>(), S.template getValue<-2, 0, 1>(),
2305 S.template getValue< 2, 0,-1>(), S.template getValue<-2, 0,-1>(),
2306 S.template getValue< 3, 0, 1>(), S.template getValue<-3, 0, 1>(),
2307 S.template getValue< 3, 0,-1>(), S.template getValue<-3, 0,-1>(),
2308 S.template getValue< 1, 0, 2>(), S.template getValue<-1, 0, 2>(),
2309 S.template getValue< 1, 0,-2>(), S.template getValue<-1, 0,-2>(),
2310 S.template getValue< 2, 0, 2>(), S.template getValue<-2, 0, 2>(),
2311 S.template getValue< 2, 0,-2>(), S.template getValue<-2, 0,-2>(),
2312 S.template getValue< 3, 0, 2>(), S.template getValue<-3, 0, 2>(),
2313 S.template getValue< 3, 0,-2>(), S.template getValue<-3, 0,-2>(),
2314 S.template getValue< 1, 0, 3>(), S.template getValue<-1, 0, 3>(),
2315 S.template getValue< 1, 0,-3>(), S.template getValue<-1, 0,-3>(),
2316 S.template getValue< 2, 0, 3>(), S.template getValue<-2, 0, 3>(),
2317 S.template getValue< 2, 0,-3>(), S.template getValue<-2, 0,-3>(),
2318 S.template getValue< 3, 0, 3>(), S.template getValue<-3, 0, 3>(),
2319 S.template getValue< 3, 0,-3>(), S.template getValue<-3, 0,-3>() );
2322 template<
typename Stencil>
2323 static typename Stencil::ValueType
inYandZ(
const Stencil& S)
2325 return crossdifference( S.template getValue< 0, 1, 1>(), S.template getValue< 0,-1, 1>(),
2326 S.template getValue< 0, 1,-1>(), S.template getValue< 0,-1,-1>(),
2327 S.template getValue< 0, 2, 1>(), S.template getValue< 0,-2, 1>(),
2328 S.template getValue< 0, 2,-1>(), S.template getValue< 0,-2,-1>(),
2329 S.template getValue< 0, 3, 1>(), S.template getValue< 0,-3, 1>(),
2330 S.template getValue< 0, 3,-1>(), S.template getValue< 0,-3,-1>(),
2331 S.template getValue< 0, 1, 2>(), S.template getValue< 0,-1, 2>(),
2332 S.template getValue< 0, 1,-2>(), S.template getValue< 0,-1,-2>(),
2333 S.template getValue< 0, 2, 2>(), S.template getValue< 0,-2, 2>(),
2334 S.template getValue< 0, 2,-2>(), S.template getValue< 0,-2,-2>(),
2335 S.template getValue< 0, 3, 2>(), S.template getValue< 0,-3, 2>(),
2336 S.template getValue< 0, 3,-2>(), S.template getValue< 0,-3,-2>(),
2337 S.template getValue< 0, 1, 3>(), S.template getValue< 0,-1, 3>(),
2338 S.template getValue< 0, 1,-3>(), S.template getValue< 0,-1,-3>(),
2339 S.template getValue< 0, 2, 3>(), S.template getValue< 0,-2, 3>(),
2340 S.template getValue< 0, 2,-3>(), S.template getValue< 0,-2,-3>(),
2341 S.template getValue< 0, 3, 3>(), S.template getValue< 0,-3, 3>(),
2342 S.template getValue< 0, 3,-3>(), S.template getValue< 0,-3,-3>() );
2351 #endif // OPENVDB_MATH_FINITEDIFFERENCE_HAS_BEEN_INCLUDED
Definition: FiniteDifference.h:201
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:569
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2268
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:2119
Definition: FiniteDifference.h:197
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1631
std::string biasedGradientSchemeToMenuName(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:242
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1516
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:750
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:507
Definition: FiniteDifference.h:265
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1986
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:1928
Definition: FiniteDifference.h:68
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1075
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:869
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2323
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1679
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:636
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:789
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:1935
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:670
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1329
Definition: FiniteDifference.h:74
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1024
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2231
Definition: FiniteDifference.h:72
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1529
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1190
Definition: FiniteDifference.h:442
General-purpose arithmetic and comparison routines, most of which accept arbitrary value types (or at...
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1549
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1730
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:807
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2018
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:582
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:942
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:548
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:889
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1579
Definition: FiniteDifference.h:61
static ValueType difference(const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:923
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1263
static ValueType difference(const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:975
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1056
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:950
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:525
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:563
static Stencil::ValueType inYandZ(const Stencil &S)
Definition: FiniteDifference.h:2099
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:962
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1563
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:744
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2168
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1995
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
Definition: FiniteDifference.h:180
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:781
Type Pow2(Type x)
Return .
Definition: Math.h:498
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2249
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1571
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1587
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2188
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1779
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:999
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:558
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1977
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1410
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1889
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:956
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1016
const Type & Min(const Type &a, const Type &b)
Return the minimum of two values.
Definition: Math.h:606
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1008
Signed (x, y, z) 32-bit integer coordinates.
Definition: Coord.h:47
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:757
Definition: FiniteDifference.h:70
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1133
Definition: FiniteDifference.h:65
Definition: FiniteDifference.h:62
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:2046
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2178
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1537
double Real
Definition: Types.h:65
Definition: FiniteDifference.h:1511
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:936
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1390
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1640
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1750
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1276
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2005
Definition: FiniteDifference.h:1789
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1344
Definition: FiniteDifference.h:60
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1906
std::string biasedGradientSchemeToString(BiasedGradientScheme bgs)
Definition: FiniteDifference.h:204
Definition: FiniteDifference.h:196
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:1955
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:738
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1523
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2258
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:532
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:476
static ValueType difference(const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1949
Definition: FiniteDifference.h:66
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:818
Definition: FiniteDifference.h:77
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:983
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1899
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2277
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1108
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:618
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:513
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:834
static Accessor::ValueType::value_type inZ(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1688
static ValueType difference(const ValueType &xp1, const ValueType &xp0, const ValueType &xm1)
Definition: FiniteDifference.h:1835
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1647
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1118
Definition: FiniteDifference.h:181
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:1849
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1543
Definition: FiniteDifference.h:179
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:627
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1864
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1418
Definition: FiniteDifference.h:262
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
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2199
#define OPENVDB_VERSION_NAME
Definition: version.h:43
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1247
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:860
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1697
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:590
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:769
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:689
static ValueType crossdifference(const ValueType &xpyp, const ValueType &xpym, const ValueType &xmyp, const ValueType &xmym)
Definition: FiniteDifference.h:1841
std::string temporalIntegrationSchemeToString(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:271
Definition: FiniteDifference.h:71
Definition: FiniteDifference.h:64
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1375
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1093
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:878
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1360
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0, const ValueType &xp1, const ValueType &xp2)
Definition: FiniteDifference.h:1305
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:484
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:2071
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:598
static ValueType difference(const ValueType &xp1, const ValueType &xm1)
Definition: FiniteDifference.h:470
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:798
Definition: Exceptions.h:39
static Accessor::ValueType inXandY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1872
Definition: FiniteDifference.h:195
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1287
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1464
Definition: FiniteDifference.h:63
Definition: FiniteDifference.h:178
static ValueType difference(const ValueType &xm3, const ValueType &xm2, const ValueType &xm1, const ValueType &xm0)
Definition: FiniteDifference.h:1039
Definition: FiniteDifference.h:69
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1314
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1740
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1433
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1065
static ValueType difference(const ValueType &xp1, const ValueType &xp0)
Definition: FiniteDifference.h:731
Definition: FiniteDifference.h:184
Definition: FiniteDifference.h:73
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1881
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:501
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:930
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1670
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1705
Definition: FiniteDifference.h:264
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:898
BiasedGradientScheme stringToBiasedGradientScheme(const std::string &s)
Definition: FiniteDifference.h:219
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:991
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1856
Definition: FiniteDifference.h:268
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:2054
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
const Type & Max(const Type &a, const Type &b)
Return the maximum of two values.
Definition: Math.h:545
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::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1594
static Accessor::ValueType inYandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2031
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:700
BiasedGradientScheme
Biased Gradients are limited to non-centered differences.
Definition: FiniteDifference.h:192
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2085
static Accessor::ValueType::value_type inY(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1623
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1713
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:712
static Accessor::ValueType inXandZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:2215
Coord offsetBy(Int32 dx, Int32 dy, Int32 dz) const
Definition: Coord.h:102
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1047
static Accessor::ValueType inY(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1232
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:679
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:907
std::string dsSchemeToMenuName(DScheme dss)
Definition: FiniteDifference.h:147
DScheme stringToDScheme(const std::string &s)
Definition: FiniteDifference.h:105
Real GudonovsNormSqrd(bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
Definition: FiniteDifference.h:379
static Accessor::ValueType::value_type inX(const Accessor &grid, const Coord &ijk, int n)
Definition: FiniteDifference.h:1615
Definition: FiniteDifference.h:198
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:71
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:2062
std::string dsSchemeToString(DScheme dss)
Definition: FiniteDifference.h:81
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1448
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1479
Definition: FiniteDifference.h:194
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1601
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:607
static Accessor::ValueType inZ(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1148
TemporalIntegrationScheme stringToTemporalIntegrationScheme(const std::string &s)
Definition: FiniteDifference.h:284
static ValueType difference(const ValueType &xp3, const ValueType &xp2, const ValueType &xp1, const ValueType &xp0, const ValueType &xm1, const ValueType &xm2)
Definition: FiniteDifference.h:1208
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1178
Definition: FiniteDifference.h:263
static Stencil::ValueType inX(const Stencil &S)
Definition: FiniteDifference.h:1164
static Stencil::ValueType inXandY(const Stencil &S)
Definition: FiniteDifference.h:1921
static Stencil::ValueType inXandZ(const Stencil &S)
Definition: FiniteDifference.h:2300
static Stencil::ValueType::value_type inZ(const Stencil &S, int n)
Definition: FiniteDifference.h:1654
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:763
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:826
std::string temporalIntegrationSchemeToMenuName(TemporalIntegrationScheme tis)
Definition: FiniteDifference.h:304
Definition: FiniteDifference.h:193
static Stencil::ValueType::value_type inY(const Stencil &S, int n)
Definition: FiniteDifference.h:1770
static Stencil::ValueType inY(const Stencil &S)
Definition: FiniteDifference.h:1084
static Stencil::ValueType::value_type inX(const Stencil &S, int n)
Definition: FiniteDifference.h:1761
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:661
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1913
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:2128
Definition: FiniteDifference.h:67
static Accessor::ValueType inX(const Accessor &grid, const Coord &ijk)
Definition: FiniteDifference.h:1216
static Stencil::ValueType inZ(const Stencil &S)
Definition: FiniteDifference.h:1494
TemporalIntegrationScheme
Temporal integration schemes.
Definition: FiniteDifference.h:261