~ubuntu-branches/ubuntu/maverick/openturns/maverick

« back to all changes in this revision

Viewing changes to wrappers/WrapperTemplates/wrapper_linked_with_F77_function/test.py

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2008-11-18 06:32:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081118063222-pa0qncclrerrqkg2
Tags: 0.12.2-1
* New upstream release
* Bug fix: "New upstream release available (0.12.2)", thanks to Jerome
  Robert (Closes: #506005).
* Applied patch by J. Robert.
* debian/control: build-depends on libxml2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#                                               -*- Python -*-
 
2
#
 
3
#  @file  test_wcode.py
 
4
#  @brief A test file for the wrapper code
 
5
#
 
6
#  (C) Copyright 2005-2007 EDF-EADS-Phimeca
 
7
#
 
8
#  This library is free software; you can redistribute it and/or
 
9
#  modify it under the terms of the GNU Lesser General Public
 
10
#  License as published by the Free Software Foundation; either
 
11
#  version 2.1 of the License.
 
12
#
 
13
#  This library is distributed in the hope that it will be useful
 
14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
#  Lesser General Public License for more details.
 
17
#
 
18
#  You should have received a copy of the GNU Lesser General Public
 
19
#  License along with this library; if not, write to the Free Software
 
20
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 
21
#
 
22
#  @author: $LastChangedBy: dutka $
 
23
#  @date:   $LastChangedDate: 2007-10-05 23:15:55 +0200 (ven, 05 oct 2007) $
 
24
#  Id:      $Id: test_wcode.py 556 2007-10-05 21:15:55Z dutka $
 
25
#
 
26
#  This script imports the OpenTURNS environment in Python, loads
 
27
#  ths wrapper and the wrapped code, and then calls it.
 
28
#
 
29
from openturns import *
 
30
 
 
31
f = NumericalMathFunction("wcode")
 
32
print "f = ", f
 
33
 
 
34
inP = NumericalPoint(f.getInputNumericalPointDimension())
 
35
for i in range(inP.getDimension()):
 
36
    inP[i] = 10. * (i + 1)
 
37
print "inP = ", inP
 
38
 
 
39
outP = f(inP)
 
40
print "outP = ", outP