1 # -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2011-2014 CEA/DEN, EDF R&D
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.
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.
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
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author : Guillaume Boulant (EDF)
23 # ===================================================================
24 # Th module must be imported as global in the SALOME python console to
25 # provide the user with documentation on fields operations.
26 # ===================================================================
31 In this python console, you manipulate variables that identifies
32 field objects. These variables are proxy objects towards the real
33 MED fields stored as MEDCoupling instances in the SALOME
36 What you can do with this proxy object:
38 - you can manipulate this object in algebric operations (+,-,*,/):
42 >>> div = f1 / f2 (an exception is raised in case of division by 0)
43 >>> square = pow(f1, 2)
45 - the operande could be a scalar numerical value:
47 >>> scaling = 3.8 * f1
49 - any combination of this operations can be done on a single instruction:
53 - you can request some helper functions on this object:
54 >>> doc : print the user documentation for field operations
55 >>> print f : print the main properties of the field f (name, values, ...)
56 >>> f.dup() : create a dublicate of the field f
57 >>> dup(f) : do the same thing
58 >>> f.visu() : display the modulus of this field using VISU post-processor.
62 return UserGuide.__doc__
64 def __call__(self, command):
65 print "help on command %s"%command