28 #ifndef _math_isosurf_tricoef_h
29 #define _math_isosurf_tricoef_h
35 #include <util/ref/ref.h>
46 order_(order), L2_(L2), L3_(L3) {}
47 int order()
const {
return order_; }
48 double L1()
const {
return 1.0 - L2_ - L3_; }
49 double L2()
const {
return L2_; }
50 double L3()
const {
return L3_; }
52 if (order_ < t.order_)
return -1;
53 if (order_ > t.order_)
return 1;
54 if (L2_ < t.L2_)
return -1;
55 if (L2_ > t.L2_)
return 1;
56 if (L3_ < t.L3_)
return -1;
57 if (L3_ > t.L3_)
return 1;
62 #define TriInterpCoefKeyEQ(k1,k2) ((k1).cmp(k2)==0)
63 #define TriInterpCoefKeyCMP(k1,k2) ((k1).cmp(k2))
72 double& coef(
int i,
int j,
int k) {
return coef_[ijk_to_index(i,j,k)];}
73 double& rderiv(
int i,
int j,
int k) {
return rderiv_[ijk_to_index(i,j,k)];}
74 double& sderiv(
int i,
int j,
int k) {
return sderiv_[ijk_to_index(i,j,k)];}
77 ijk_to_index(
int i,
int j,
int k)
81 return (ir*(ir+1)>>1) + j;
85 order_to_nvertex(
int order)
87 return ((order+1)*(order+2)>>1);