1 # Copyright (C) 2010-2015 CEA/DEN, EDF R&D
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, or (at your option) any later version.
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
21 # ATTENTION. This script is prepared for the future not for current moment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23 if not ('servermanager' in dir()):
24 from pvsimple import *
28 def LoadMultipleFiles_med(FilePath, FilePrefix):
30 TETRA_dom_fl = MEDReader( FileName = [FilePath + FilePrefix + '1' + '.med',
31 FilePath + FilePrefix + '2' + '.med',
32 FilePath + FilePrefix + '3' + '.med',
33 FilePath + FilePrefix + '4' + '.med',
34 FilePath + FilePrefix + '5' + '.med',
35 FilePath + FilePrefix + '6' + '.med'])
37 TETRA_dom_fl.CellArrays = ['Pression', 'Temp.C', 'VitesseX']
38 TETRA_dom_fl.GlobalFamilyStatus = ['1 1 1', '1 2 1', '1 3 1', '1 4 1', '1 5 1']
39 TETRA_dom_fl.GlobalEntityStatus = ['0 203', '0 304']
42 a1_Temp_C_PVLookupTable = CreateLookupTable( RGBPoints=[-1.3, 0.23, 0.3, 0.75, 200., 0.70, 0.016, 0.15],
43 VectorMode='Magnitude',
44 ColorSpace='Diverging',
45 ScalarRangeInitialized=1.0 )
48 dr.EdgeColor = [0.0, 0.0, 0.50]
49 dr.SelectionCellLabelColor = [0.0, 1.0, 0.0]
50 dr.SelectionPointLabelJustification = 'Center'
51 dr.SelectionCellLabelJustification = 'Center'
52 dr.ScalarOpacityFunction = []
53 dr.ColorArrayName = 'Temp.C'
54 dr.SelectionLineWidth = 2.0
55 dr.ScalarOpacityUnitDistance = 2.6738860338205099
56 dr.SelectionCellLabelFontSize = 24
57 dr.SelectionColor = [1.0, 0.0, 1.0]
58 dr.SelectionRepresentation = 'Wireframe'
59 dr.LookupTable = a1_Temp_C_PVLookupTable
61 rv.CameraPosition = [50.0, -29.75, 267.55447959748415]
62 rv.CameraFocalPoint = [50.0, -29.75, 0.0]
63 rv.CameraClippingRange = [248.95893480150932, 291.60779679144639]
64 rv.CenterOfRotation = [50.0, -29.75, 0.0]
65 rv.CameraParallelScale = 69.24819492232271
71 scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
72 testdir = os.path.dirname( os.path.abspath(scriptdir) )
75 if __name__ == "__main__":
76 LoadMultipleFiles_med(FilePath=testdir+"/TETRA_domaine_fluide/", FilePrefix="TETRA_domaine_fluide")