~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to salome/fsi_coupling/src/FSI_ASTER/FSI_ASTER_component.py

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-01 17:43:32 UTC
  • mto: (6.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20111101174332-tl4vk45no0x3emc3
Tags: upstream-2.1.0
ImportĀ upstreamĀ versionĀ 2.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
#-------------------------------------------------------------------------------
 
4
 
 
5
# This file is part of Code_Saturne, a general-purpose CFD tool.
 
6
#
 
7
# Copyright (C) 1998-2011 EDF S.A.
 
8
#
 
9
# This program is free software; you can redistribute it and/or modify it under
 
10
# the terms of the GNU General Public License as published by the Free Software
 
11
# Foundation; either version 2 of the License, or (at your option) any later
 
12
# version.
 
13
#
 
14
# This program is distributed in the hope that it will be useful, but WITHOUT
 
15
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
16
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
17
# details.
 
18
#
 
19
# You should have received a copy of the GNU General Public License along with
 
20
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
21
# Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
22
 
 
23
#-------------------------------------------------------------------------------
 
24
 
 
25
import sys,os
 
26
from omniORB import CORBA
 
27
from FSI_ASTER_module import FSI_ASTER
 
28
 
 
29
if __name__ == '__main__':
 
30
 
 
31
  print sys.argv
 
32
  orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
 
33
  poa = orb.resolve_initial_references("RootPOA")
 
34
  print "ORB and POA initialized",orb,poa
 
35
  sys.stdout.flush()
 
36
  sys.stderr.flush()
 
37
 
 
38
  container=orb.string_to_object(os.getenv("SALOME_CONTAINER"))
 
39
  containerName=os.getenv("SALOME_CONTAINERNAME")
 
40
  instanceName=os.getenv("SALOME_INSTANCE")
 
41
 
 
42
  compo=FSI_ASTER(orb,poa,container,containerName, instanceName, "FSI_ASTER")
 
43
  comp_o = compo._this()
 
44
  comp_iors = orb.object_to_string(comp_o)
 
45
  print "ior aster",comp_iors
 
46
 
 
47
  sys.stdout.flush()
 
48
  sys.stderr.flush()
 
49
 
 
50
  #activate the POA
 
51
  poaManager = poa._get_the_POAManager()
 
52
  poaManager.activate()
 
53
 
 
54
  orb.run()
 
55
  print "fin du composant aster standalone"
 
56