28 #ifndef _math_isosurf_tricoef_h
29 #define _math_isosurf_tricoef_h
31 #include <util/ref/ref.h>
42 order_(order), L2_(L2), L3_(L3) {}
43 int order()
const {
return order_; }
44 double L1()
const {
return 1.0 - L2_ - L3_; }
45 double L2()
const {
return L2_; }
46 double L3()
const {
return L3_; }
48 if (order_ < t.order_)
return -1;
49 if (order_ > t.order_)
return 1;
50 if (L2_ < t.L2_)
return -1;
51 if (L2_ > t.L2_)
return 1;
52 if (L3_ < t.L3_)
return -1;
53 if (L3_ > t.L3_)
return 1;
58 #define TriInterpCoefKeyEQ(k1,k2) ((k1).cmp(k2)==0)
59 #define TriInterpCoefKeyCMP(k1,k2) ((k1).cmp(k2))
68 double& coef(
int i,
int j,
int k) {
return coef_[ijk_to_index(i,j,k)];}
69 double& rderiv(
int i,
int j,
int k) {
return rderiv_[ijk_to_index(i,j,k)];}
70 double& sderiv(
int i,
int j,
int k) {
return sderiv_[ijk_to_index(i,j,k)];}
73 ijk_to_index(
int i,
int j,
int k)
77 return (ir*(ir+1)>>1) + j;
81 order_to_nvertex(
int order)
83 return ((order+1)*(order+2)>>1);