From e9c63cd687e5afe6daed48088ac06ec6d20724bf Mon Sep 17 00:00:00 2001 From: caremoli Date: Wed, 12 Jan 2011 18:12:19 +0000 Subject: [PATCH] CCAR: update examples --- Examples/ast1/components.py | 2 +- Examples/ast2/components.py | 2 +- Examples/calcium1/code1.f | 2 ++ Examples/calcium1/components.py | 10 ++++++++-- Examples/calcium2/components.py | 2 +- Examples/context.py | 10 +++++----- Examples/cpp1/components.py | 2 +- Examples/cpp2/components.py | 2 +- Examples/fort1/components.py | 2 +- Examples/fort2/components.py | 2 +- Examples/makefile.inc | 2 +- Examples/paco1/components.py | 2 +- Examples/paco2/components.py | 2 +- Examples/paco3/components.py | 2 +- Examples/pyth2/components.py | 2 +- 15 files changed, 27 insertions(+), 19 deletions(-) diff --git a/Examples/ast1/components.py b/Examples/ast1/components.py index 2243a4b..fe95ac6 100644 --- a/Examples/ast1/components.py +++ b/Examples/ast1/components.py @@ -21,10 +21,10 @@ Example with one Code_Aster component and one fortran component """ import os -from module_generator import Generator,Module,ASTERComponent,Service,F77Component #import context from .. execfile("../context.py") +from module_generator import Generator,Module,ASTERComponent,Service,F77Component aster_root=os.path.join(aster_home,aster_version) diff --git a/Examples/ast2/components.py b/Examples/ast2/components.py index 3a75703..97148a6 100644 --- a/Examples/ast2/components.py +++ b/Examples/ast2/components.py @@ -21,10 +21,10 @@ Example with one Code_Aster component and one fortran component """ import os -from module_generator import Generator,Module,ASTERComponent,Service,F77Component #import context from .. execfile("../context.py") +from module_generator import Generator,Module,ASTERComponent,Service,F77Component aster_root=os.path.join(aster_home,aster_version) diff --git a/Examples/calcium1/code1.f b/Examples/calcium1/code1.f index d6b7546..bc3cc83 100644 --- a/Examples/calcium1/code1.f +++ b/Examples/calcium1/code1.f @@ -263,6 +263,8 @@ C read write(6,*)'info=',info call flush(6) + CALL cpfin(compo,CP_ARRET,info) + c=a+b return end diff --git a/Examples/calcium1/components.py b/Examples/calcium1/components.py index 85e08c0..b2bab04 100644 --- a/Examples/calcium1/components.py +++ b/Examples/calcium1/components.py @@ -18,10 +18,9 @@ # import os -from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component - #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component # C++ component @@ -46,6 +45,10 @@ rsval[0]=mystring1; rsval[1]=mystring2; rsval[2]=mystring3; +char instance_name[72]; +info = cp_cd(component,instance_name); +std::cerr << "instance_name: " << instance_name << std::endl; + val[0]=3.2; val[1]=5.2; val[2]=9.8; @@ -198,6 +201,8 @@ std::cerr << "info: " << info << std::endl; info=cp_effi(component,(char*)"aa",3); std::cerr << "info: " << info << std::endl; +cp_fin(component,CP_ARRET); + c=2*rval[0]; std::cerr << "c: " << c << std::endl; """ @@ -239,6 +244,7 @@ body=""" info,name= calcium.cp_cd(component) print "name=",name print "info=",info + dep=calcium.CP_ITERATION #double diff --git a/Examples/calcium2/components.py b/Examples/calcium2/components.py index e571047..8f26160 100644 --- a/Examples/calcium2/components.py +++ b/Examples/calcium2/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,PYComponent,CPPComponent,F77Component # C++ component diff --git a/Examples/context.py b/Examples/context.py index 0d6ab8e..35f4d86 100644 --- a/Examples/context.py +++ b/Examples/context.py @@ -18,15 +18,15 @@ # import os,sys -#sys.path.insert(0,"../..") +sys.path.insert(0,"../..") -KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V5") -GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V5") -YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V5") +KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V6") +GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V6") +YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V6") context={'update':1, "makeflags":"", - "prerequisites":"/local/cchris/.packages.d/envSalome51main", + "prerequisites":"/local/cchris/.packages.d/envSalome6main", "kernel":KERNEL_ROOT_DIR, "gui":GUI_ROOT_DIR, } diff --git a/Examples/cpp1/components.py b/Examples/cpp1/components.py index 169c376..0b6a1fd 100644 --- a/Examples/cpp1/components.py +++ b/Examples/cpp1/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,CPPComponent #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,CPPComponent cwd=os.getcwd() diff --git a/Examples/cpp2/components.py b/Examples/cpp2/components.py index a2eab50..9ebe8db 100644 --- a/Examples/cpp2/components.py +++ b/Examples/cpp2/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,CPPComponent #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,CPPComponent cwd=os.getcwd() diff --git a/Examples/fort1/components.py b/Examples/fort1/components.py index 5948ed3..9e0912f 100644 --- a/Examples/fort1/components.py +++ b/Examples/fort1/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,F77Component #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,F77Component cwd=os.getcwd() diff --git a/Examples/fort2/components.py b/Examples/fort2/components.py index c33fa5d..ae24e07 100644 --- a/Examples/fort2/components.py +++ b/Examples/fort2/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,F77Component #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,F77Component cwd=os.getcwd() diff --git a/Examples/makefile.inc b/Examples/makefile.inc index 7b69741..e659cb2 100644 --- a/Examples/makefile.inc +++ b/Examples/makefile.inc @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5 +KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V6 ASTER_ROOT=/local/cchris/Aster/V10.1/aster ASTER_VERSION=STA10.1 diff --git a/Examples/paco1/components.py b/Examples/paco1/components.py index 430dba3..fb0721d 100644 --- a/Examples/paco1/components.py +++ b/Examples/paco1/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,PACOComponent #import context from .. execfile("../pacocontext.py") +from module_generator import Generator,Module,Service,PACOComponent cwd=os.getcwd() diff --git a/Examples/paco2/components.py b/Examples/paco2/components.py index f152d96..e2a9ef3 100644 --- a/Examples/paco2/components.py +++ b/Examples/paco2/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,PACOComponent #import context from .. execfile("../pacocontext.py") +from module_generator import Generator,Module,Service,PACOComponent cwd=os.getcwd() diff --git a/Examples/paco3/components.py b/Examples/paco3/components.py index 5ec5ec1..8aea2d0 100644 --- a/Examples/paco3/components.py +++ b/Examples/paco3/components.py @@ -19,10 +19,10 @@ # import os -from module_generator import Generator,Module,Service,PACOComponent #import context from .. execfile("../pacocontext.py") +from module_generator import Generator,Module,Service,PACOComponent cwd=os.getcwd() diff --git a/Examples/pyth2/components.py b/Examples/pyth2/components.py index bc8ef03..250b30b 100644 --- a/Examples/pyth2/components.py +++ b/Examples/pyth2/components.py @@ -18,10 +18,10 @@ # import os -from module_generator import Generator,Module,Service,PYComponent #import context from .. execfile("../context.py") +from module_generator import Generator,Module,Service,PYComponent cwd=os.getcwd() -- 2.39.2