]> SALOME platform Git repositories - modules/med.git/blob - src/MEDCalculator/Swig/test2.spy
Salome HOME
6f90103f12a976817e270f96172ecc008a3ee39b
[modules/med.git] / src / MEDCalculator / Swig / test2.spy
1 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D
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 e=MEDCalculatorBrowserLiteStruct("hfile1.med")
21 f=e.getField(0)
22 Power=MEDCalculatorDBFieldReal(f)
23 Power[1:3,:,4:]^Power[5:7,:,4:]
24 Power(1:3,:,2)+3
25 Power(1:3,:,2)+3.6
26 Power(1:3,:,2)+(3+5)
27 (Power(1:3,:,2)+(3+5))
28 Power(2:4,:,5)=(Power[1:3,:,2]+(3+5))
29 3+Power(1:3,:,2)
30 3.6+Power(1:3,:,2)
31 (3.6+Power(1:3,:,2))*((4.2*7.8)+Power(5:7,:,2))
32 Power2=Power(1:3,:,2:)+(3+5)
33 3.6+Power2(0:2,:,2)
34 Power=0
35 Power3=Power2
36 3.6/Power3(0:2,:,2)
37 print 2+Power3(0:2,:,:)*4
38 Power4=Power3.magnitude()
39 print Power3.getValues()
40 Power4.applyFunc("3*x")
41 Power6=Power(0:2,:,1:4)
42 Power7=Power(7:9,:,4:)
43 Power5=4*Power7.dot(Power(0:2,:,1:4))+3
44 del Power7