1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef MEDMEM_REMAPPER_HXX_
21 #define MEDMEM_REMAPPER_HXX_
23 #include "MEDMEM_Mesh.hxx"
24 #include "MEDMEM_Field.hxx"
26 #include "MEDNormalizedUnstructuredMesh.hxx"
27 #include "MEDNormalizedUnstructuredMesh.txx"
28 #include "InterpKernelMatrix.hxx"
29 #include "InterpolationOptions.hxx"
33 class MEDMEM_EXPORT MEDMEM_REMAPPER : public INTERP_KERNEL::InterpolationOptions
37 virtual ~MEDMEM_REMAPPER();
38 int prepare(const MEDMEM::MESH& source_mesh, const MEDMEM::MESH& target_mesh, const char *method);
39 void transfer(const MEDMEM::FIELD<double>& source_field, MEDMEM::FIELD<double>& target_field);
40 void reverseTransfer(MEDMEM::FIELD<double>& source_field, const MEDMEM::FIELD<double>& target_field);
41 MEDMEM::FIELD<double> * transferField(const MEDMEM::FIELD<double>& source_field);
42 MEDMEM::FIELD<double> * reverseTransferField(const MEDMEM::FIELD<double>& target_field);
43 void printMatrixInfo();
44 int setOptionDouble(const std::string& key, double value);
45 int setOptionInt(const std::string& key, int value);
46 int setOptionString(const std::string& key, std::string& value);
48 INTERP_KERNEL::Matrix<double, INTERP_KERNEL::ALL_FORTRAN_MODE>* _matrix;
49 MEDMEM::FIELD<double>* getSupportVolumes(const MEDMEM::SUPPORT& support);
50 std::vector<double> _deno_multiply;
51 std::vector<double> _deno_reverse_multiply;
54 string _sourceFieldType;
55 string _targetFieldType;
56 const MEDMEM::MESH * _sourceMesh;
57 const MEDMEM::MESH * _targetMesh;
58 const MEDMEM::SUPPORT * _sourceSupport;
59 const MEDMEM::SUPPORT * _targetSupport;
63 #endif /*REMAPPER_HXX_*/