00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2007 Driss Yakoubi 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: SpectralConformTransformation.cpp,v 1.2 2007/08/14 15:46:02 yakoubix Exp $ 00019 00020 #include <SpectralConformTransformation.hpp> 00021 #include <Interval.hpp> 00022 00023 SpectralConformTransformation:: 00024 SpectralConformTransformation(const Interval& interval) 00025 : __interval(interval) 00026 { 00027 ; 00028 } 00029 00030 SpectralConformTransformation:: 00031 SpectralConformTransformation(const SpectralConformTransformation& s) 00032 : __interval(s.__interval) 00033 { 00034 ; 00035 } 00036 00037 SpectralConformTransformation::~ 00038 SpectralConformTransformation() 00039 { 00040 ; 00041 } 00042 00043 00044 real_t SpectralConformTransformation:: 00045 operator()(const real_t& x) const 00046 { 00047 return (__interval.b()-__interval.a())/2 *x + (__interval.b()+__interval.a())/2; 00048 } 00049 00050 real_t SpectralConformTransformation:: 00051 inverse(const real_t& x) const 00052 { 00053 return 2./(__interval.b()-__interval.a())*x - (__interval.b()+__interval.a())/(__interval.b()-__interval.a()); 00054 } 00055 00056 real_t SpectralConformTransformation:: 00057 inverseDeterminant() const 00058 { 00059 return 2./(__interval.b() -__interval.a()); 00060 } 00061 00062 real_t SpectralConformTransformation:: 00063 determinant() const 00064 { 00065 return (__interval.b() -__interval.a())/2.; 00066 }
1.5.6