Salome HOME
f49d943e74aab6cc348fe42ff47e91b1df711570
[tools/medcoupling.git] / src / MEDLoader / Swig / CaseIO.py
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2016  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # Author : Anthony GEAY (CEA/DEN/DM2S/STMF/LGLS)
21
22 from MEDLoader import *
23
24 class CaseIO:
25     dictMCTyp_str={NORM_HEXA8:"hexa8",NORM_POLYHED:"nfaced",NORM_QUAD4:"quad4",NORM_POLYGON:"nsided",NORM_POINT1:"point",NORM_SEG2:"bar2",NORM_SEG3:"bar3",NORM_TRI3:"tria3",NORM_TRI6:"tria6",NORM_QUAD8:"quad8",NORM_TETRA4:"tetra4",NORM_TETRA10:"tetra10",NORM_PYRA5:"pyramid5",NORM_PYRA13:"pyramid13",NORM_PENTA6:"penta6",NORM_PENTA15:"penta15",NORM_HEXA20:"hexa20"}
26     dictMCTyp = {k:bytes(v, "ascii") for k, v in list(dictMCTyp_str.items())}
27     discSpatial={ON_CELLS:"element",ON_NODES:"node"}
28     dictCompo={1:"scalar",3:"vector",6:"tensor",9:"tensor9"}
29     dictMCTyp2 = {v:k for k, v in list(dictMCTyp.items())}
30     discSpatial2 = {v:k for k, v in list(discSpatial.items())}
31     dictCompo2 = {v:k for k, v in list(dictCompo.items())}