41 const std::array<double, 3>& r1,
44 using namespace std::placeholders;
46 const double norm = 1/L;
47 const double acc = accuracy*L;
48 const double a = r1[line];
49 const double b = r1[line] + L;
54 T1DFunction f=std::bind(f1,std::placeholders::_1,r1[1],r1[2]);
60 T1DFunction f=std::bind(f1,r1[0],std::placeholders::_1,r1[2]);
66 T1DFunction f=std::bind(f1,r1[0],r1[1],std::placeholders::_1);
71 cerr <<
"*** lineAverage is bad\n";
83 const std::array<double, 3>& r1,
87 using namespace std::placeholders;
89 const double acc = accuracy*L1*L2;
90 const double norm = 1/(L1*L2);
94 T2DFunction f = std::bind(f1,r1[0],std::placeholders::_1,std::placeholders::_2);
95 value =
Romberg(f, r1[1],r1[1]+L1, r1[2],r1[2]+L2, acc)*norm;
100 T2DFunction f = std::bind(f1,std::placeholders::_1,r1[1],std::placeholders::_2);
101 value =
Romberg(f, r1[0],r1[0]+L1, r1[2],r1[2]+L2, acc)*norm;
106 T2DFunction f = std::bind(f1,std::placeholders::_1,std::placeholders::_2,r1[2]);
107 value =
Romberg(f, r1[0],r1[0]+L1, r1[1],r1[1]+L2, acc)*norm;
111 cerr <<
"*** SurfaceAverage is bad\n";
122 const std::array<double, 3>& r1,
123 const std::array<double, 3>& r2
126 const double acc = accuracy*(r2[0]-r1[0])*(r2[1]-r1[1])*(r2[2]-r1[2]);
127 const double norm = 1.0/((r2[0]-r1[0])*(r2[1]-r1[1])*(r2[2]-r1[2]));
128 value=
Romberg(f1, r1[0],r2[0], r1[1],r2[1], r1[2],r2[2], acc)*norm;
double lineAverage(const T3DFunction &f1, coordinate line, double accuracy, const std::array< double, 3 > &r1, double L)
double volumeAverage(const T3DFunction &f1, double accuracy, const std::array< double, 3 > &r1, const std::array< double, 3 > &r2)
double surfaceAverage(const T3DFunction &f1, coordinate face, double accuracy, const std::array< double, 3 > &r1, double L1, double L2)