# Copyright (C) 2007-2015 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # # Author : Anthony Geay (CEA/DEN) e=MEDCalculatorBrowserLiteStruct("hfile1.med") f=e.getField(0) Power=MEDCalculatorDBFieldReal(f) Power[1:3,:,4:]^Power[5:7,:,4:] Power(1:3,:,2)+3 Power(1:3,:,2)+3.6 Power(1:3,:,2)+(3+5) (Power(1:3,:,2)+(3+5)) Power(2:4,:,5)=(Power[1:3,:,2]+(3+5)) 3+Power(1:3,:,2) 3.6+Power(1:3,:,2) (3.6+Power(1:3,:,2))*((4.2*7.8)+Power(5:7,:,2)) Power2=Power(1:3,:,2:)+(3+5) 3.6+Power2(0:2,:,2) Power=0 Power3=Power2 3.6/Power3(0:2,:,2) print 2+Power3(0:2,:,:)*4 Power4=Power3.magnitude() print Power3.getValues() Power4.applyFunc("3*x") Power6=Power(0:2,:,1:4) Power7=Power(7:9,:,4:) Power5=4*Power7.dot(Power(0:2,:,1:4))+3 del Power7