Version: 6.3.1

src/INTERP_KERNEL/Interpolation.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __INTERPOLATION_HXX__
00021 #define __INTERPOLATION_HXX__
00022 
00023 #include "INTERPKERNELDefines.hxx"
00024 #include "InterpolationOptions.hxx"
00025 #include "InterpKernelException.hxx"
00026 
00027 #include <string>
00028 
00029 namespace INTERP_KERNEL
00030 {
00031   template<class TrueMainInterpolator>
00032   class Interpolation : public InterpolationOptions
00033   {
00034   public:
00035     Interpolation() { }
00036     Interpolation(const InterpolationOptions& io) :InterpolationOptions(io){}
00037     //interpolation of two triangular meshes.
00038     template<class MatrixType, class MyMeshType>
00039     int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT, MatrixType& result)
00040     { return asLeaf().interpolateMeshes(meshS,meshT,result); }
00041     template<class MyMeshType, class MatrixType>
00042     int fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const char *method) { return fromToIntegralUniform(false,meshT,result,method); }
00043     template<class MyMeshType, class MatrixType>
00044     int toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const char *method) { return fromToIntegralUniform(true,meshS,result,method); }
00045     static void checkAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth) throw(INTERP_KERNEL::Exception);
00046   protected:
00047     template<class MyMeshType, class MatrixType>
00048     int fromToIntegralUniform(bool fromTo, const MyMeshType& mesh, MatrixType& result, const char *method);
00049   protected:
00050     TrueMainInterpolator& asLeaf() { return static_cast<TrueMainInterpolator&>(*this); }
00051   };
00052 }
00053 
00054 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS