1 #ifndef Trapezoid2RectangleMappingX_h
2 #define Trapezoid2RectangleMappingX_h
27 k_ = 2 /
h * (bovera - 1.) / (bovera + 1.);
30 std::cout <<
"Trapezoid2RectangleMappingX constructed with x0,y0 " << x0 <<
" " << y0 <<
" b/a= " << bovera
31 <<
" h= " <<
h << std::endl;
38 std::cout <<
"Trapezoid2RectangleMappingX constructed with x0,y0 " << x0 <<
" " << y0 <<
" k= " <<
k << std::endl;
42 void rectangle(
double xtrap,
double ytrap,
double& xrec,
double& yrec)
const {
45 xrec = (xtrap - x0_) / (1. + yrec * k_);
47 xrec = xtrap - x0_ + k_ * yrec;
50 std::cout << xtrap <<
" " << ytrap <<
" transformed to rectangle " << xrec <<
" " << yrec << std::endl;
54 void trapezoid(
double xrec,
double yrec,
double& xtrap,
double& ytrap)
const {
56 xtrap = x0_ + xrec * (1. + yrec * k_);
58 xtrap = x0_ + xrec - k_ * yrec;
62 std::cout << xrec <<
" " << yrec <<
" transformed to trapezoid " << xtrap <<
" " << ytrap << std::endl;