]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/MEDMEM_Remapper.hxx
Salome HOME
Fix problem of make distcheck
[modules/med.git] / src / MEDMEM / MEDMEM_Remapper.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef MEDMEM_REMAPPER_HXX_
21 #define MEDMEM_REMAPPER_HXX_
22
23 #include "MEDMEM_Mesh.hxx"
24 #include "MEDMEM_Field.hxx"
25 #include "MEDMEM.hxx"
26 #include "MEDNormalizedUnstructuredMesh.hxx"
27 #include "MEDNormalizedUnstructuredMesh.txx"
28 #include "InterpKernelMatrix.hxx"
29 #include "InterpolationOptions.hxx"
30
31
32
33 class MEDMEM_EXPORT MEDMEM_REMAPPER : public INTERP_KERNEL::InterpolationOptions
34 {
35 public:
36   MEDMEM_REMAPPER();
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);
47 private :
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;
52   int _nb_rows;
53   int _nb_cols;
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;
60 };
61
62
63 #endif /*REMAPPER_HXX_*/