From 7c6f22de78159d624943fba42fb6179f2464b5e9 Mon Sep 17 00:00:00 2001 From: caremoli Date: Mon, 26 Jan 2009 15:37:58 +0000 Subject: [PATCH] CCAR: add two examples with Code_Aster : ast1 and ast2 --- Examples/ast1/README.txt | 39 ++++ Examples/ast1/components.py | 52 ++++++ Examples/ast1/coupling.xml | 168 ++++++++++++++++++ Examples/ast1/f.comm | 9 + Examples/ast1/fcompo/Makefile | 16 ++ Examples/ast1/fcompo/compo.f | 116 ++++++++++++ Examples/ast1/myaster/Makefile | 52 ++++++ .../ast1/myaster/catalo/ecrire_maillage.capy | 4 + .../ast1/myaster/catalo/lecture_force.capy | 5 + Examples/ast1/myaster/catalo/yacs_init.capy | 6 + Examples/ast1/myaster/make_cata | 20 +++ Examples/ast1/myaster/src/op0078.f | 74 ++++++++ Examples/ast1/myaster/src/op0181.f | 68 +++++++ Examples/ast1/myaster/src/op0189.f | 105 +++++++++++ Examples/ast2/README.txt | 39 ++++ Examples/ast2/components.py | 61 +++++++ Examples/ast2/coupling.xml | 167 +++++++++++++++++ Examples/ast2/f.comm | 8 + Examples/ast2/fcompo/Makefile | 14 ++ Examples/ast2/fcompo/compo.f | 120 +++++++++++++ Examples/ast2/myaster/Makefile | 7 + .../ast2/myaster/catalo/ecrire_maillage.capy | 4 + .../ast2/myaster/catalo/lecture_force.capy | 5 + Examples/ast2/myaster/catalo/yacs_init.capy | 6 + Examples/ast2/myaster/config.txt | 128 +++++++++++++ Examples/ast2/myaster/make_exec | 27 +++ Examples/ast2/myaster/src/op0078.f | 74 ++++++++ Examples/ast2/myaster/src/op0181.f | 68 +++++++ Examples/ast2/myaster/src/op0189.f | 105 +++++++++++ Examples/cpp1/README.txt | 3 + Examples/cpp2/README.txt | 9 +- Examples/fort1/README.txt | 6 +- Examples/fort2/README.txt | 14 +- Examples/pyth1/README.txt | 4 +- Examples/pyth2/README.txt | 4 +- MANIFEST.in | 19 +- 36 files changed, 1604 insertions(+), 22 deletions(-) create mode 100644 Examples/ast1/README.txt create mode 100644 Examples/ast1/components.py create mode 100644 Examples/ast1/coupling.xml create mode 100644 Examples/ast1/f.comm create mode 100644 Examples/ast1/fcompo/Makefile create mode 100644 Examples/ast1/fcompo/compo.f create mode 100644 Examples/ast1/myaster/Makefile create mode 100644 Examples/ast1/myaster/catalo/ecrire_maillage.capy create mode 100644 Examples/ast1/myaster/catalo/lecture_force.capy create mode 100644 Examples/ast1/myaster/catalo/yacs_init.capy create mode 100755 Examples/ast1/myaster/make_cata create mode 100644 Examples/ast1/myaster/src/op0078.f create mode 100644 Examples/ast1/myaster/src/op0181.f create mode 100644 Examples/ast1/myaster/src/op0189.f create mode 100644 Examples/ast2/README.txt create mode 100644 Examples/ast2/components.py create mode 100644 Examples/ast2/coupling.xml create mode 100644 Examples/ast2/f.comm create mode 100644 Examples/ast2/fcompo/Makefile create mode 100644 Examples/ast2/fcompo/compo.f create mode 100644 Examples/ast2/myaster/Makefile create mode 100644 Examples/ast2/myaster/catalo/ecrire_maillage.capy create mode 100644 Examples/ast2/myaster/catalo/lecture_force.capy create mode 100644 Examples/ast2/myaster/catalo/yacs_init.capy create mode 100644 Examples/ast2/myaster/config.txt create mode 100755 Examples/ast2/myaster/make_exec create mode 100644 Examples/ast2/myaster/src/op0078.f create mode 100644 Examples/ast2/myaster/src/op0181.f create mode 100644 Examples/ast2/myaster/src/op0189.f diff --git a/Examples/ast1/README.txt b/Examples/ast1/README.txt new file mode 100644 index 0000000..6feb349 --- /dev/null +++ b/Examples/ast1/README.txt @@ -0,0 +1,39 @@ +A Code_Aster component dynamically loadable +=============================================== + +To build this example, modify the files components.py, fcompo/Makefile, myaster/Makefile +to take into account your configuration. + +1- your prerequisite file +2- your KERNEL_ROOT_DIR +3- your Code_Aster installation + +Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py :: + + source + +Build the fcompo library :: + + cd fcompo + make + +Build the Code_Aster library :: + + cd myaster + make + +process components.py :: + + python components.py + +You should get a SALOME module in source form (pycompos_SRC), its installation (install) and +a SALOME application (appli) composed of modules KERNEL, GUI, YACS and pycompos. + +To run a coupling: + + 1. start SALOME in background : ./appli/runAppli -t + 2. start a SALOME session : ./appli/runSession + 3. start YACS coupler with coupling file : driver coupling.xml + 4. examine output files in /tmp + 5. shutdown SALOME : shutdowSalome.py + 6. exit session : CTRL-D (or exit) diff --git a/Examples/ast1/components.py b/Examples/ast1/components.py new file mode 100644 index 0000000..9c7847c --- /dev/null +++ b/Examples/ast1/components.py @@ -0,0 +1,52 @@ +""" + Example with one Code_Aster component and one fortran component +""" +import os +from module_generator import Generator,Module,ASTERComponent,Service,F77Component + +context={'update':1,"prerequisites":"/local/cchris/.packages.d/envSalome50", + "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5"} +aster_root="/local/chris/ASTER/instals/NEW9" + +libfcompodir=os.path.join(os.getcwd(),"fcompo") +myasterdir=os.path.join(os.getcwd(),"myaster","bibpyt") +install_prefix="./install" +appli_dir="appli" + +c1=ASTERComponent("caster",services=[ + Service("s1",inport=[("argv","string"),("a","double"),("b","long"),("c","string")], + outport=[("d","double")], + instream=[("aa","CALCIUM_double","T"),("ab","CALCIUM_double","I"), + ("ac","CALCIUM_integer","I"),("ad","CALCIUM_real","I"), + ("ae","CALCIUM_string","I"),("af","CALCIUM_complex","I"), + ("ag","CALCIUM_logical","I"), + ], + outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I")], + ), + ], + aster_dir=aster_root, + python_path=[myasterdir], + argv=["-memjeveux","4",'-rep_outils','/local/chris/ASTER/instals/outils'], + ) + +c2=F77Component("cfort",services=[ + Service("s1",inport=[("a","double"),("b","long"),("c","string")], + outport=[("d","double"),("e","long"),("f","string")], + instream=[("a","CALCIUM_double","T"),("b","CALCIUM_double","I")], + outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I"), + ("bc","CALCIUM_integer","I"),("bd","CALCIUM_real","I"), + ("be","CALCIUM_string","I"),("bf","CALCIUM_complex","I"), + ("bg","CALCIUM_logical","I"), + ], + defs="",body="", + ), + ],libs="-L%s -lfcompo" % libfcompodir, + rlibs="-Wl,--rpath -Wl,%s" % libfcompodir) + +g=Generator(Module("astmod",components=[c1,c2],prefix=install_prefix),context) +g.generate() +g.bootstrap() +g.configure() +g.make() +g.install() +g.make_appli(appli_dir,restrict=["KERNEL","GUI","YACS"]) diff --git a/Examples/ast1/coupling.xml b/Examples/ast1/coupling.xml new file mode 100644 index 0000000..080da6e --- /dev/null +++ b/Examples/ast1/coupling.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + 23 + + + + + caster + s1 + + + + + + + + + + + + + + + + + + + + + cfort + s1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +node1ba +node2a + + +node1bb +node2b + + +node2ba +node1aa + + +node2bb +node1ab + + +node2bc +node1ac + + +node2bd +node1ad + + +node2be +node1ae + + +node2bf +node1af + + +node2bg +node1ag + + + + node1fort:8 + dataout f1 + + + node1d + node98 p1 + + + datainf1 + node2 a + + + ljdcjdc + node1 jdc + + + + node1 a + 23 + + + node1 b + 23 + + + node1 c + hello + + + + node2 b + 23 + + + node2 c + hello + + + + ljdc comm + f.comm + + + + node1 argv + -memjeveux 4 + + + + diff --git a/Examples/ast1/f.comm b/Examples/ast1/f.comm new file mode 100644 index 0000000..d4a4ae6 --- /dev/null +++ b/Examples/ast1/f.comm @@ -0,0 +1,9 @@ +print a,b,c +DEBUT(PAR_LOT="NON") +YACS_INIT(COMPO=component) + +ECRIRE_MAILLAGE() +LECTURE_FORCE() + +d=36.5 + diff --git a/Examples/ast1/fcompo/Makefile b/Examples/ast1/fcompo/Makefile new file mode 100644 index 0000000..ce601fe --- /dev/null +++ b/Examples/ast1/fcompo/Makefile @@ -0,0 +1,16 @@ +FC=g77 + +KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 + +KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic + +all: libfcompo.so + +libfcompo.so:compo.o + $(FC) -shared -o libfcompo.so compo.o ${KERNEL_LIBS} -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome -fexceptions +compo.o:compo.f + $(FC) -c compo.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions + +clean: + rm -f *.o *.so + diff --git a/Examples/ast1/fcompo/compo.f b/Examples/ast1/fcompo/compo.f new file mode 100644 index 0000000..7abff52 --- /dev/null +++ b/Examples/ast1/fcompo/compo.f @@ -0,0 +1,116 @@ + SUBROUTINE S1(compo,A,B,C,D,E,F) + include 'calcium.hf' + integer compo + real*8 a,d(*),tt,tp,t0,t1,ss,zz + integer b,e,dep,np + character*(*) c,f + character*8 tch(2) + real yd + real tcp(2) + integer tlo(3) + + open(UNIT=22,FILE='SORTIES') + write(6,*)a,b,c,compo + call flush(6) + + t0=0. + t1=1. + iter=1 + + tt=1.5 + tp=2.3 + np=12 + yd=4.3 + tch(1)="coucou" + tcp(1)=2. + tcp(2)=4. + tlo(1)=0 + tlo(2)=1 + tlo(3)=0 + CALL cpeDB(compo,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(compo,CP_ITERATION,t0,1,'bb',1,tp,info) + CALL cpeen(compo,CP_ITERATION,t0,1,'bc',1,np,info) + CALL cpere(compo,CP_ITERATION,t0,1,'bd',1,yd,info) + CALL cpech(compo,CP_ITERATION,t0,1,'be',1,tch,info) + CALL cpecp(compo,CP_ITERATION,t0,1,'bf',1,tcp,info) + CALL cpelo(compo,CP_ITERATION,t0,1,'bg',3,tlo,info) + + ss=0. + CALL cpldb(compo,CP_TEMPS,t0,t1,iter,'a',1,n,ss,info) + write(6,*)"apres cpldb(a) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(compo,CP_ITERATION,t0,t1,iter,'b',1,n,zz,info) + write(6,*)"apres cpldb(b) ",info,zz + call flush(6) + + d(1)=4.5 + e=3 + f="zzzzzzzzzzzzzzz" + write(6,*)d(1),e,f + call flush(6) + write(22,*)d(1),e,f + call flush(22) + END + + SUBROUTINE S2(compo,A,B,C) + integer compo + real*8 a,b,c + write(6,*)a,b + call flush(6) + c=a*b + write(6,*)c + call flush(6) + END + + SUBROUTINE S3(compo) + include 'calcium.hf' + integer compo + real*8 tt,tp,t0,t1,ss,zz + integer iter,n,info,zn + CHARACTER*8 tch(2) + real tcp(2) + integer tlo(3) + + t0=0. + t1=1. + tt=1.5 + tp=2.3 + + CALL cpeDB(compo,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(compo,CP_ITERATION,t0,1,'bb',1,tp,info) + call flush(6) + t0=0. + t1=1. + iter=1 + + + ss=0. + CALL cpldb(compo,CP_TEMPS,t0,t1,iter,'aa',1,n,ss,info) + write(6,*)"apres cpldb(aa) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(compo,CP_ITERATION,t0,t1,iter,'ab',1,n,zz,info) + write(6,*)"apres cpldb(ab) ",info,zz + call flush(6) + + CALL cplen(compo,CP_ITERATION,t0,t1,iter,'ac',1,n,zn,info) + write(6,*)"apres cplen(ac) ",info,zn + call flush(6) + CALL cplre(compo,CP_ITERATION,t0,t1,iter,'ad',1,n,yr,info) + write(6,*)"apres cplre(ad) ",info,yr + call flush(6) + CALL cplch(compo,CP_ITERATION,t0,t1,iter,'ae',1,n,tch,info) + write(6,*)"apres cplch(ae) ",info,tch(1) + call flush(6) + CALL cplcp(compo,CP_ITERATION,t0,t1,iter,'af',1,n,tcp,info) + write(6,*)"apres cplcp(af) ",info,tcp(1),tcp(2) + call flush(6) + CALL cpllo(compo,CP_ITERATION,t0,t1,iter,'ag',3,n,tlo,info) + write(6,*)"apres cpllo(ag) ",info,tlo(1),tlo(2),tlo(3) + call flush(6) + + END + diff --git a/Examples/ast1/myaster/Makefile b/Examples/ast1/myaster/Makefile new file mode 100644 index 0000000..4419fdb --- /dev/null +++ b/Examples/ast1/myaster/Makefile @@ -0,0 +1,52 @@ +#ASTER +ASTER_ROOT=/local/chris/ASTER/instals +#SALOME +KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 + + +ASTER_INSTALL=$(ASTER_ROOT)/NEW9 +ASTER_PUB=$(ASTER_ROOT)/public +ASTER_OUTILS=$(ASTER_ROOT)/outils + +ASTER_LIBS = -L$(ASTER_INSTALL)/lib -laster \ + -L$(ASTER_PUB)/scotch_4.0/bin -lscotch -lscotcherr \ + -L/local/chris/pkg/med23/install/lib -lmed \ + -lferm -llapack -lhdf5 + +KERNEL_INCLUDES=-I$(KERNEL_ROOT_DIR)/include/salome +KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer \ + -lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,$(KERNEL_ROOT_DIR)/lib/salome + +FC=g77 +LD=g77 +FFLAGS= +CC=gcc +SOURCES= src/op0078.f src/op0189.f src/op0181.f +OBJETS=op0078.o op0189.o op0181.o + +CATAPY=catalo/ecrire_maillage.capy catalo/lecture_force.capy catalo/yacs_init.capy + +all:pyth cata astermodule + +pyth: + cp -rf $(ASTER_INSTALL)/bibpyt . + +cata: commande/cata.py + cp -rf commande/cata.py* bibpyt/Cata + +commande/cata.py:$(CATAPY) + ./make_cata $(ASTER_ROOT)/ASTK/ASTK_SERV/bin/as_run + +astermodule:astermodule.so pyth + cp -rf astermodule.so bibpyt + +op0078.o:src/op0078.f + $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0078.f +op0189.o:src/op0189.f + $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0189.f +op0181.o:src/op0181.f + $(FC) -c -fpic $(FFLAGS) $(KERNEL_INCLUDES) src/op0181.f +astermodule.so: $(OBJETS) + $(LD) -shared -o $@ $(OBJETS) $(KERNEL_LIBS) $(ASTER_LIBS) +clean: + rm -rf *.o *.so bibpyt commande/cata.py* diff --git a/Examples/ast1/myaster/catalo/ecrire_maillage.capy b/Examples/ast1/myaster/catalo/ecrire_maillage.capy new file mode 100644 index 0000000..ae2de30 --- /dev/null +++ b/Examples/ast1/myaster/catalo/ecrire_maillage.capy @@ -0,0 +1,4 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +ECRIRE_MAILLAGE=PROC(nom="ECRIRE_MAILLAGE",op=78, + fr="Ecriture du maillage", + ) diff --git a/Examples/ast1/myaster/catalo/lecture_force.capy b/Examples/ast1/myaster/catalo/lecture_force.capy new file mode 100644 index 0000000..6bdbd0b --- /dev/null +++ b/Examples/ast1/myaster/catalo/lecture_force.capy @@ -0,0 +1,5 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +LECTURE_FORCE=PROC(nom="LECTURE_FORCE",op=189, + fr="Lecture de la force", + ) + diff --git a/Examples/ast1/myaster/catalo/yacs_init.capy b/Examples/ast1/myaster/catalo/yacs_init.capy new file mode 100644 index 0000000..9cb950e --- /dev/null +++ b/Examples/ast1/myaster/catalo/yacs_init.capy @@ -0,0 +1,6 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +YACS_INIT=PROC(nom="YACS_INIT",op=181, + fr="Initialisation YACS", + COMPO=SIMP(statut='o',typ='I'), + ) + diff --git a/Examples/ast1/myaster/make_cata b/Examples/ast1/myaster/make_cata new file mode 100755 index 0000000..37ef2fe --- /dev/null +++ b/Examples/ast1/myaster/make_cata @@ -0,0 +1,20 @@ +#!/bin/sh +cat >make-cmd << END +P debug nodebug +P mode interactif +P version NEW9 +P ncpus 1 +A args +A memjeveux 16.0 +A tpmax 300 +P facmtps 1 +P corefilesize unlimited +R capy ${PWD}/catalo D 0 +R cmde ${PWD}/commande DR 0 +P consbtc oui +P soumbtc oui +P actions make_cmde +END + + +$1 make-cmd diff --git a/Examples/ast1/myaster/src/op0078.f b/Examples/ast1/myaster/src/op0078.f new file mode 100644 index 0000000..f4d950c --- /dev/null +++ b/Examples/ast1/myaster/src/op0078.f @@ -0,0 +1,74 @@ + SUBROUTINE OP0078 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: ECRIRE_MAILLAGE +C + IMPLICIT NONE +C + INTEGER IER +C +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0078' ) +C + CHARACTER*8 MA +C + INTEGER*4 info + INTEGER IFL,IAUX + COMMON/YACS/IFL + include 'calcium.hf' + real*8 tt,tp,t0,t1 + +C +C----------------------------------------------------------------------- +C 1) ==> NOM DES STRUCTURES +C----------------------------------------------------------------------- + write(6,*) '--> OP078 :',IFL +C + t0=0. + t1=1. + tt=1.5 + tp=2.3 + + CALL cpeDB(IFL,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(IFL,CP_ITERATION,t0,1,'bb',1,tp,info) + + call flush(6) + + END + diff --git a/Examples/ast1/myaster/src/op0181.f b/Examples/ast1/myaster/src/op0181.f new file mode 100644 index 0000000..573617a --- /dev/null +++ b/Examples/ast1/myaster/src/op0181.f @@ -0,0 +1,68 @@ + SUBROUTINE OP0181 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: YACS_INIT +C + IMPLICIT NONE +C + INTEGER IER +C + +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0181' ) +C + CHARACTER*8 MA,DM,NOMG,MODELE, NOMA +C + INTEGER N1,NDIM + CHARACTER*8 CHAR + CHARACTER*16 GROUPE + CHARACTER*16 TYPE, OPER + CHARACTER*4 FONREE + CHARACTER*19 LIGRCH, LIGRMO + INTEGER IGREL, INEMA, IRET, IATYPE,NBVAL + LOGICAL LIMPR, LINFO, GETEXM + INTEGER IAUX,IFL + COMMON/YACS/IFL + include 'calcium.hf' + + CALL GETVIS(' ','COMPO',0,1,1,IFL,IAUX) + write(6,*)IFL +C + END + diff --git a/Examples/ast1/myaster/src/op0189.f b/Examples/ast1/myaster/src/op0189.f new file mode 100644 index 0000000..9c669bd --- /dev/null +++ b/Examples/ast1/myaster/src/op0189.f @@ -0,0 +1,105 @@ + SUBROUTINE OP0189 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: LECTURE_FORCE +C + IMPLICIT NONE +C + INTEGER IER +C + +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0198' ) +C + CHARACTER*8 MA,DM,NOMG,MODELE, NOMA +C + INTEGER N1,NDIM + CHARACTER*8 CHAR + CHARACTER*16 GROUPE + CHARACTER*16 TYPE, OPER + CHARACTER*4 FONREE + CHARACTER*19 LIGRCH, LIGRMO + INTEGER IGREL, INEMA, IRET, IATYPE,NBVAL + LOGICAL LIMPR, LINFO, GETEXM + INTEGER*4 NIV,IFM,iter,info,n,zn + INTEGER IAUX,IFL + COMMON/YACS/IFL + include 'calcium.hf' + real*8 tt,tp,t0,t1,ss,zz + real yr + CHARACTER*8 tch(2) + real tcp(2) + integer*4 tlo(3) + + write(6,*) '--> OP196 ' + write(6,*)IFL +C + t0=0. + t1=1. + iter=1 + + + ss=0. + CALL cpldb(IFL,CP_TEMPS,t0,t1,iter,'aa',1,n,ss,info) + write(6,*)"apres cpldb(aa) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(IFL,CP_ITERATION,t0,t1,iter,'ab',1,n,zz,info) + write(6,*)"apres cpldb(ab) ",info,zz + call flush(6) + CALL cplen(IFL,CP_ITERATION,t0,t1,iter,'ac',1,n,zn,info) + write(6,*)"apres cplen(ac) ",info,zn + call flush(6) + CALL cplre(IFL,CP_ITERATION,t0,t1,iter,'ad',1,n,yr,info) + write(6,*)"apres cplre(ad) ",info,yr + call flush(6) + CALL cplch(IFL,CP_ITERATION,t0,t1,iter,'ae',1,n,tch,info) + write(6,*)"apres cplch(ae) ",info,tch(1) + call flush(6) + CALL cplcp(IFL,CP_ITERATION,t0,t1,iter,'af',1,n,tcp,info) + write(6,*)"apres cplcp(af) ",info,tcp(1),tcp(2) + call flush(6) + CALL cpllo(IFL,CP_ITERATION,t0,t1,iter,'ag',3,n,tlo,info) + write(6,*)"apres cpllo(ag) ",info,tlo(1),tlo(2),tlo(3) + call flush(6) + +C----------------------------------------------------------------------- + END + diff --git a/Examples/ast2/README.txt b/Examples/ast2/README.txt new file mode 100644 index 0000000..d117e11 --- /dev/null +++ b/Examples/ast2/README.txt @@ -0,0 +1,39 @@ +A Code_Aster standalone component (in executable form) +=========================================================== + +To build this example, modify the files components.py, fcompo/Makefile, myaster/config.txt, myaster/Makefile +to take into account your configuration. + +1- your prerequisite file +2- your KERNEL_ROOT_DIR +3- your Code_Aster installation + +Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and execute components.py :: + + source + +process components.py :: + + python components.py + +You should get a SALOME module in source form (pycompos_SRC), its installation (install) and +a SALOME application (appli) composed of modules KERNEL, GUI, YACS and pycompos. + +Build the fcompo library :: + + cd fcompo + make + +Build the Code_Aster library :: + + cd myaster + make + +To run a coupling: + + 1. start SALOME in background : ./appli/runAppli -t + 2. start a SALOME session : ./appli/runSession + 3. start YACS coupler with coupling file : driver coupling.xml + 4. examine output files in /tmp + 5. shutdown SALOME : shutdowSalome.py + 6. exit session : CTRL-D (or exit) diff --git a/Examples/ast2/components.py b/Examples/ast2/components.py new file mode 100644 index 0000000..5f26dc7 --- /dev/null +++ b/Examples/ast2/components.py @@ -0,0 +1,61 @@ +""" + Example with one Code_Aster component and one fortran component +""" +import os +from module_generator import Generator,Module,ASTERComponent,Service,F77Component + +context={'update':1,"prerequisites":"/local/cchris/.packages.d/envSalome50", + "kernel":"/local/chris/SALOME2/RELEASES/Install/KERNEL_V5"} +aster_home="/local/chris/ASTER/instals" +aster_root=os.path.join(aster_home,"NEW9") +asrun=os.path.join(aster_home,"ASTK/ASTK_SERV/bin/as_run") + +fcompodir=os.path.join(os.getcwd(),"fcompo") +myasterdir=os.path.join(os.getcwd(),"myaster","bibpyt") +install_prefix="./install" +appli_dir="appli" +export="""F exec %s D 0 +R cmde %s D 0 +""" % (os.path.join(os.getcwd(),"myaster","aster.exe"),os.path.join(os.getcwd(),"myaster","commande")) + +c1=ASTERComponent("caster",services=[ + Service("s1",inport=[("argv","string"),("a","double"),("b","long"),("c","string")], + outport=[("d","double")], + instream=[("aa","CALCIUM_double","T"),("ab","CALCIUM_double","I"), + ("ac","CALCIUM_integer","I"),("ad","CALCIUM_real","I"), + ("ae","CALCIUM_string","I"),("af","CALCIUM_complex","I"), + ("ag","CALCIUM_logical","I"), + ], + outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I")], + ), + ], + aster_dir=aster_root, + exe_path=os.path.join(os.getcwd(),"exeaster"), + asrun=asrun, + kind="exe", + export_extras=export, + ) + +c2=F77Component("cfort",services=[ + Service("s1",inport=[("a","double"),("b","long"),("c","string")], + outport=[("d","double"),("e","long"),("f","string")], + instream=[("a","CALCIUM_double","T"),("b","CALCIUM_double","I")], + outstream=[("ba","CALCIUM_double","T"),("bb","CALCIUM_double","I"), + ("bc","CALCIUM_integer","I"),("bd","CALCIUM_real","I"), + ("be","CALCIUM_string","I"),("bf","CALCIUM_complex","I"), + ("bg","CALCIUM_logical","I"), + ], + defs="",body="", + ), + ], + kind="exe", + exe_path=os.path.join(fcompodir,"prog"), + ) + +g=Generator(Module("astmod",components=[c1,c2],prefix=install_prefix),context) +g.generate() +g.bootstrap() +g.configure() +g.make() +g.install() +g.make_appli(appli_dir,restrict=["KERNEL","GUI","YACS"]) diff --git a/Examples/ast2/coupling.xml b/Examples/ast2/coupling.xml new file mode 100644 index 0000000..95d944c --- /dev/null +++ b/Examples/ast2/coupling.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + 23 + + + + + caster + s1 + + + + + + + + + + + + + + + + + + + + + cfort + s1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +node1ba +node2a + + +node1bb +node2b + + +node2ba +node1aa + + +node2bb +node1ab + + +node2bc +node1ac + + +node2bd +node1ad + + +node2be +node1ae + + +node2bf +node1af + + +node2bg +node1ag + + + + node1fort:8 + dataout f1 + + + node1d + node98 p1 + + + datainf1 + node2 a + + + ljdcjdc + node1 jdc + + + + node1 a + 23 + + + node1 b + 23 + + + node1 c + hello + + + + node2 b + 23 + + + node2 c + hello + + + + ljdc comm + f.comm + + + + node1 argv + -memjeveux 4 + + + + diff --git a/Examples/ast2/f.comm b/Examples/ast2/f.comm new file mode 100644 index 0000000..0a8524d --- /dev/null +++ b/Examples/ast2/f.comm @@ -0,0 +1,8 @@ +print a,b,c +YACS_INIT(COMPO=component) + +ECRIRE_MAILLAGE() +LECTURE_FORCE() + +d=36.5 + diff --git a/Examples/ast2/fcompo/Makefile b/Examples/ast2/fcompo/Makefile new file mode 100644 index 0000000..fb7aa91 --- /dev/null +++ b/Examples/ast2/fcompo/Makefile @@ -0,0 +1,14 @@ + +FC=g77 + +KERNEL_ROOT_DIR=/local/chris/SALOME2/RELEASES/Install/KERNEL_V5 + +all:prog +prog:compo.o + $(FC) -o prog compo.o -L../install/lib/salome -lcfortExelib +compo.o:compo.f + $(FC) -c compo.f -I$(KERNEL_ROOT_DIR)/include/salome -fexceptions + +clean: + rm -rf *.o prog + diff --git a/Examples/ast2/fcompo/compo.f b/Examples/ast2/fcompo/compo.f new file mode 100644 index 0000000..a4423e4 --- /dev/null +++ b/Examples/ast2/fcompo/compo.f @@ -0,0 +1,120 @@ + PROGRAM P + CALL YACSINIT() + END + + SUBROUTINE S1(compo,A,B,C,D,E,F) + include 'calcium.hf' + integer compo + real*8 a,d(*),tt,tp,t0,t1,ss,zz + integer b,e,dep,np + character*(*) c,f + character*8 tch(2) + real yd + real tcp(2) + integer tlo(3) + + open(UNIT=22,FILE='SORTIES') + write(6,*)a,b,c,compo + call flush(6) + + t0=0. + t1=1. + iter=1 + + tt=1.5 + tp=2.3 + np=12 + yd=4.3 + tch(1)="coucou" + tcp(1)=2. + tcp(2)=4. + tlo(1)=0 + tlo(2)=1 + tlo(3)=0 + CALL cpeDB(compo,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(compo,CP_ITERATION,t0,1,'bb',1,tp,info) + CALL cpeen(compo,CP_ITERATION,t0,1,'bc',1,np,info) + CALL cpere(compo,CP_ITERATION,t0,1,'bd',1,yd,info) + CALL cpech(compo,CP_ITERATION,t0,1,'be',1,tch,info) + CALL cpecp(compo,CP_ITERATION,t0,1,'bf',1,tcp,info) + CALL cpelo(compo,CP_ITERATION,t0,1,'bg',3,tlo,info) + + ss=0. + CALL cpldb(compo,CP_TEMPS,t0,t1,iter,'a',1,n,ss,info) + write(6,*)"apres cpldb(a) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(compo,CP_ITERATION,t0,t1,iter,'b',1,n,zz,info) + write(6,*)"apres cpldb(b) ",info,zz + call flush(6) + + d(1)=4.5 + e=3 + f="zzzzzzzzzzzzzzz" + write(6,*)d(1),e,f + call flush(6) + write(22,*)d(1),e,f + call flush(22) + END + + SUBROUTINE S2(compo,A,B,C) + integer compo + real*8 a,b,c + write(6,*)a,b + call flush(6) + c=a*b + write(6,*)c + call flush(6) + END + + SUBROUTINE S3(compo) + include 'calcium.hf' + integer compo + real*8 tt,tp,t0,t1,ss,zz + integer iter,n,info,zn + CHARACTER*8 tch(2) + real tcp(2) + integer tlo(3) + + t0=0. + t1=1. + tt=1.5 + tp=2.3 + + CALL cpeDB(compo,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(compo,CP_ITERATION,t0,1,'bb',1,tp,info) + call flush(6) + t0=0. + t1=1. + iter=1 + + + ss=0. + CALL cpldb(compo,CP_TEMPS,t0,t1,iter,'aa',1,n,ss,info) + write(6,*)"apres cpldb(aa) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(compo,CP_ITERATION,t0,t1,iter,'ab',1,n,zz,info) + write(6,*)"apres cpldb(ab) ",info,zz + call flush(6) + + CALL cplen(compo,CP_ITERATION,t0,t1,iter,'ac',1,n,zn,info) + write(6,*)"apres cplen(ac) ",info,zn + call flush(6) + CALL cplre(compo,CP_ITERATION,t0,t1,iter,'ad',1,n,yr,info) + write(6,*)"apres cplre(ad) ",info,yr + call flush(6) + CALL cplch(compo,CP_ITERATION,t0,t1,iter,'ae',1,n,tch,info) + write(6,*)"apres cplch(ae) ",info,tch(1) + call flush(6) + CALL cplcp(compo,CP_ITERATION,t0,t1,iter,'af',1,n,tcp,info) + write(6,*)"apres cplcp(af) ",info,tcp(1),tcp(2) + call flush(6) + CALL cpllo(compo,CP_ITERATION,t0,t1,iter,'ag',3,n,tlo,info) + write(6,*)"apres cpllo(ag) ",info,tlo(1),tlo(2),tlo(3) + call flush(6) + + END + diff --git a/Examples/ast2/myaster/Makefile b/Examples/ast2/myaster/Makefile new file mode 100644 index 0000000..7a7ea2c --- /dev/null +++ b/Examples/ast2/myaster/Makefile @@ -0,0 +1,7 @@ + +#ASTER +ASTER_ROOT=/local/chris/ASTER/instals + +aster.exe: + ./make_exec $(ASTER_ROOT)/ASTK/ASTK_SERV/bin/as_run + diff --git a/Examples/ast2/myaster/catalo/ecrire_maillage.capy b/Examples/ast2/myaster/catalo/ecrire_maillage.capy new file mode 100644 index 0000000..ae2de30 --- /dev/null +++ b/Examples/ast2/myaster/catalo/ecrire_maillage.capy @@ -0,0 +1,4 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +ECRIRE_MAILLAGE=PROC(nom="ECRIRE_MAILLAGE",op=78, + fr="Ecriture du maillage", + ) diff --git a/Examples/ast2/myaster/catalo/lecture_force.capy b/Examples/ast2/myaster/catalo/lecture_force.capy new file mode 100644 index 0000000..6bdbd0b --- /dev/null +++ b/Examples/ast2/myaster/catalo/lecture_force.capy @@ -0,0 +1,5 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +LECTURE_FORCE=PROC(nom="LECTURE_FORCE",op=189, + fr="Lecture de la force", + ) + diff --git a/Examples/ast2/myaster/catalo/yacs_init.capy b/Examples/ast2/myaster/catalo/yacs_init.capy new file mode 100644 index 0000000..9cb950e --- /dev/null +++ b/Examples/ast2/myaster/catalo/yacs_init.capy @@ -0,0 +1,6 @@ +#& MODIF COMMANDE DATE 24/06/2002 AUTEUR F1BHHAJ J.ANGLES +YACS_INIT=PROC(nom="YACS_INIT",op=181, + fr="Initialisation YACS", + COMPO=SIMP(statut='o',typ='I'), + ) + diff --git a/Examples/ast2/myaster/config.txt b/Examples/ast2/myaster/config.txt new file mode 100644 index 0000000..b7cbc4f --- /dev/null +++ b/Examples/ast2/myaster/config.txt @@ -0,0 +1,128 @@ +# Configuration file +# $Id$ +# $Name$ +# +# Fields are separated by a " | " (the space is significative) +# +# Keywords : +# ENV_SH : environment script (absolute filename or relative to current directory) +# LIB : archiver +# BIBL : librairies linked with Code_Aster (with options -L/-l eventually) +# PYTHON : Python binary +# LINK : linker command +# OPTL : linker options +# CC : C compiler command +# OPTC_D : C compiler options using DEBUG mode +# OPTC_O : C compiler options using NODEBUG mode +# INCL : C include flags +# F77 : Fortran compiler command +# OPTF_D : Fortran compiler options using DEBUG mode +# OPTF_O : Fortran compiler options using NODEBUG mode +# INCLF : Fortran include flags +# F90 : Fortran 90 compiler command +# OPTF90_D : Fortran 90 compiler options using DEBUG mode +# OPTF90_O : Fortran 90 compiler options using NODEBUG mode +# INCLF90 : Fortran 90 include flags +# G77_AGLA : used only for configuration management of EDF version +# SUPERV : Code_Aster Python packages +# REPPY : name of 'bibpyt' in the temporary execution directory +# ARGPYT : main python module +# ARGEXE : arguments passed to Code_Aster executable +# REPOUT : tools directory +# MAKE_SURCH_OFFI/MAKE_CAPY_OFFI : Python modules to compiling elements catalogs +# CRP / CRS : tools to check source files and programming rules +# +ENV_SH | env | - | /local/chris/ASTER/instals/NEW9/profile.sh +# +LIB | ar | ? | /usr/bin/ar -rv +# +#BIBL | python | 2.4 | -L/usr/lib/python2.4/config -lpython2.4 +BIBL | python | 2.4 | -lpython2.4 +BIBL | med | 2.3.5 | -Wl,-R -Wl,/local/chris/pkg/med235/install/lib -L/local/chris/pkg/med235/install/lib -lmed +BIBL | hdf5 | 1.6.5 | -lhdf5 +BIBL | sys | ? | -Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm /usr/lib/libz.a +BIBL | mpi | 2 | -lmpi +BIBL | zmat | 8.3 | +BIBL | mumps | 4.3.2 | +BIBL | scotch | 4.0 | -L/local/chris/ASTER/instals/public/scotch_4.0/bin -lscotch -lcommon -lscotcherr -lscotcherrcom +BIBL | math | ? | /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/libg2c.a +BIBL | salome | ? | -L/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/lib/salome -lCalciumC -lSalomeDSCSuperv -lSalomeDSCContainer -lSalomeDatastream -lSalomeDSCSupervBasic -Wl,--rpath -Wl,/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/lib/salome +# +NOBUILD | option | ? | bibfor/from_c +# +PYTHON | python | 2.4 | /usr/bin/python +# +LINK | link | ? | /usr/bin/g77 +OPTL | link | ? | -v +# +CC | cc | ? | /usr/bin/gcc +#OPTC_D | cc | ? | -c -g -DP_LINUX -D_USE_MPI +OPTC_D | cc | ? | -c -g -DP_LINUX +#OPTC_O | cc | ? | -c -O2 -DP_LINUX -D_USE_MPI +OPTC_O | cc | ? | -c -O2 -DP_LINUX +INCL | include | ? | -I/local/chris/ASTER/instals/NEW9/bibc/include -I/usr/include/python2.4 -I/usr/include -I/usr/include/lam -I/local/chris/ASTER/instals/public/scotch_4.0/bin +# +F77 | f77 | ? | /usr/bin/g77 +OPTF_D | f77 | ? | -c -g +OPTF_O | f77 | ? | -c -O2 -I/usr/include/lam +INCLF | include | ? | -I/local/chris/SALOME2/RELEASES/Install/KERNEL_V5/include/salome +# +F90 | f90 | ? | +OPTF90_D | f90 | ? | -c -g +OPTF90_O | f90 | ? | -c -O2 +INCLF90 | include | ? | +# +G77_AGLA | g77 | ? | unused +# +SRCFOR | src | 11-04 | bibfor +#SRCF90 | src | 11-04 | bibf90 +SRCFERM | src | 11-04 | fermetur +SRCC | src | 11-04 | bibc +SRCPY | src | 11-04 | bibpyt +SRCCATA | src | 11-04 | catalo +SRCCAPY | src | 11-04 | catapy +SRCTEST | src | 11-04 | astest +SRCMAT | src | 11-04 | materiau +SRCHIST | src | 11-04 | histor +# +MAKE | build | - | debug nodebug +BIN_NODBG | bin | 11-04 | asteru +BIN_DBG | bin | 11-04 | asterd +BINCMDE | bin | 11-04 | commande +BINELE | bin | 11-04 | elements +BINPICKLED | bin | 11-04 | cata_ele.pickled +BINLIB_NODBG | bin | 11-04 | lib/libaster.a +BINLIB_DBG | bin | 11-04 | lib/libasterd.a +BINLIBF_NODBG | bin | 02-05 | lib/libferm.a +BINLIBF_DBG | bin | 02-05 | lib/libfermd.a +BINOBJ_NODBG | bin | 11-04 | obj/aster +BINOBJF_NODBG | bin | 11-04 | obj/ferm +BINOBJ_DBG | bin | 11-04 | obj/asterd +BINOBJF_DBG | bin | 11-04 | obj/fermd +# +REPPY | exec | 11-04 | Python +ARGPYT | exec | 03-02 | Execution/E_SUPERV.py +ARGEXE | exec | 03-02 | -eficas_path ./Python +# +MAKE_SURCH_OFFI | build | 11-04 | Lecture_Cata_Ele/make_surch_offi.py +MAKE_CAPY_OFFI | build | 11-04 | Lecture_Cata_Ele/make_capy_offi.py +# +REPOUT | exec | 11-04 | /local/chris/ASTER/instals/outils +REPMAT | exec | 02-05 | /local/chris/ASTER/instals/NEW9/materiau +REPDEX | exec | 02-05 | /local/chris/ASTER/instals/NEW9/datg +# +SUPERV | exec | 03-02 | Accas +SUPERV | exec | 03-02 | Build +SUPERV | exec | 03-02 | Execution +SUPERV | exec | 03-02 | Macro +SUPERV | exec | 03-02 | Messages +SUPERV | exec | 03-02 | Noyau +SUPERV | exec | 03-02 | Stanley +SUPERV | exec | 03-02 | Utilitai +SUPERV | exec | 03-02 | Validation +# +GZIP | tool | ? | ?GZIP? +CRP | tool | ? | /local/chris/ASTER/instals/outils/CRPCRS/crp_aster.sh +CRS | tool | ? | /local/chris/ASTER/instals/outils/CRPCRS/crs.sh +# +I18N | i18n | - | diff --git a/Examples/ast2/myaster/make_exec b/Examples/ast2/myaster/make_exec new file mode 100755 index 0000000..351c97a --- /dev/null +++ b/Examples/ast2/myaster/make_exec @@ -0,0 +1,27 @@ +#!/bin/sh +cat >make-exe << END +P actions make_exec +P actions make_cmde +P version NEW9 +P nomjob forma01a +P ncpus 1 +A memjeveux 4.000000 +P mem_aster 100 +A tpmax 60 +P memjob 32768 +P mpi_nbcpu 1 +P mpi_nbnoeud 1 +P tpsjob 1 +P mode batch +P soumbtc oui +P consbtc oui + +R f ${PWD}/src D 0 +F exec ${PWD}/aster.exe DR 0 +F conf ${PWD}/config.txt D 0 +R capy ${PWD}/catalo D 0 +R cmde ${PWD}/commande DR 0 +END + + +$1 make-exe diff --git a/Examples/ast2/myaster/src/op0078.f b/Examples/ast2/myaster/src/op0078.f new file mode 100644 index 0000000..f4d950c --- /dev/null +++ b/Examples/ast2/myaster/src/op0078.f @@ -0,0 +1,74 @@ + SUBROUTINE OP0078 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: ECRIRE_MAILLAGE +C + IMPLICIT NONE +C + INTEGER IER +C +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0078' ) +C + CHARACTER*8 MA +C + INTEGER*4 info + INTEGER IFL,IAUX + COMMON/YACS/IFL + include 'calcium.hf' + real*8 tt,tp,t0,t1 + +C +C----------------------------------------------------------------------- +C 1) ==> NOM DES STRUCTURES +C----------------------------------------------------------------------- + write(6,*) '--> OP078 :',IFL +C + t0=0. + t1=1. + tt=1.5 + tp=2.3 + + CALL cpeDB(IFL,CP_TEMPS,t0,1,'ba',1,tt,info) + CALL cpeDB(IFL,CP_ITERATION,t0,1,'bb',1,tp,info) + + call flush(6) + + END + diff --git a/Examples/ast2/myaster/src/op0181.f b/Examples/ast2/myaster/src/op0181.f new file mode 100644 index 0000000..573617a --- /dev/null +++ b/Examples/ast2/myaster/src/op0181.f @@ -0,0 +1,68 @@ + SUBROUTINE OP0181 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: YACS_INIT +C + IMPLICIT NONE +C + INTEGER IER +C + +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0181' ) +C + CHARACTER*8 MA,DM,NOMG,MODELE, NOMA +C + INTEGER N1,NDIM + CHARACTER*8 CHAR + CHARACTER*16 GROUPE + CHARACTER*16 TYPE, OPER + CHARACTER*4 FONREE + CHARACTER*19 LIGRCH, LIGRMO + INTEGER IGREL, INEMA, IRET, IATYPE,NBVAL + LOGICAL LIMPR, LINFO, GETEXM + INTEGER IAUX,IFL + COMMON/YACS/IFL + include 'calcium.hf' + + CALL GETVIS(' ','COMPO',0,1,1,IFL,IAUX) + write(6,*)IFL +C + END + diff --git a/Examples/ast2/myaster/src/op0189.f b/Examples/ast2/myaster/src/op0189.f new file mode 100644 index 0000000..9c669bd --- /dev/null +++ b/Examples/ast2/myaster/src/op0189.f @@ -0,0 +1,105 @@ + SUBROUTINE OP0189 ( IER ) +C ---------------------------------------------------------------------- +C CONFIGURATION MANAGEMENT OF EDF VERSION +C MODIF ALGORITH DATE 17/06/2002 AUTEUR GNICOLAS G.NICOLAS +C ====================================================================== +C COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +C THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +C IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +C THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +C (AT YOUR OPTION) ANY LATER VERSION. +C +C THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +C WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +C MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +C GENERAL PUBLIC LICENSE FOR MORE DETAILS. +C +C YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +C ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +C 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +C ====================================================================== +C COMMANDE: LECTURE_FORCE +C + IMPLICIT NONE +C + INTEGER IER +C + +C --------- DEBUT COMMUNS NORMALISES JEVEUX -------------------------- + INTEGER ZI + COMMON /IVARJE/ZI(1) + REAL*8 ZR + COMMON /RVARJE/ZR(1) + COMPLEX*16 ZC + COMMON /CVARJE/ZC(1) + LOGICAL ZL + COMMON /LVARJE/ZL(1) + CHARACTER*8 ZK8 + CHARACTER*16 ZK16 + CHARACTER*24 ZK24 + CHARACTER*32 ZK32 + CHARACTER*80 ZK80 + COMMON /KVARJE/ZK8(1),ZK16(1),ZK24(1),ZK32(1),ZK80(1) +C +C -------------- FIN DECLARATIONS NORMALISEES JEVEUX ---------------- +C 0.3. ==> VARIABLES LOCALES +C + CHARACTER*6 NOMPRO + PARAMETER ( NOMPRO = 'OP0198' ) +C + CHARACTER*8 MA,DM,NOMG,MODELE, NOMA +C + INTEGER N1,NDIM + CHARACTER*8 CHAR + CHARACTER*16 GROUPE + CHARACTER*16 TYPE, OPER + CHARACTER*4 FONREE + CHARACTER*19 LIGRCH, LIGRMO + INTEGER IGREL, INEMA, IRET, IATYPE,NBVAL + LOGICAL LIMPR, LINFO, GETEXM + INTEGER*4 NIV,IFM,iter,info,n,zn + INTEGER IAUX,IFL + COMMON/YACS/IFL + include 'calcium.hf' + real*8 tt,tp,t0,t1,ss,zz + real yr + CHARACTER*8 tch(2) + real tcp(2) + integer*4 tlo(3) + + write(6,*) '--> OP196 ' + write(6,*)IFL +C + t0=0. + t1=1. + iter=1 + + + ss=0. + CALL cpldb(IFL,CP_TEMPS,t0,t1,iter,'aa',1,n,ss,info) + write(6,*)"apres cpldb(aa) ",info,ss + call flush(6) + + zz=0. + CALL cpldb(IFL,CP_ITERATION,t0,t1,iter,'ab',1,n,zz,info) + write(6,*)"apres cpldb(ab) ",info,zz + call flush(6) + CALL cplen(IFL,CP_ITERATION,t0,t1,iter,'ac',1,n,zn,info) + write(6,*)"apres cplen(ac) ",info,zn + call flush(6) + CALL cplre(IFL,CP_ITERATION,t0,t1,iter,'ad',1,n,yr,info) + write(6,*)"apres cplre(ad) ",info,yr + call flush(6) + CALL cplch(IFL,CP_ITERATION,t0,t1,iter,'ae',1,n,tch,info) + write(6,*)"apres cplch(ae) ",info,tch(1) + call flush(6) + CALL cplcp(IFL,CP_ITERATION,t0,t1,iter,'af',1,n,tcp,info) + write(6,*)"apres cplcp(af) ",info,tcp(1),tcp(2) + call flush(6) + CALL cpllo(IFL,CP_ITERATION,t0,t1,iter,'ag',3,n,tlo,info) + write(6,*)"apres cpllo(ag) ",info,tlo(1),tlo(2),tlo(3) + call flush(6) + +C----------------------------------------------------------------------- + END + diff --git a/Examples/cpp1/README.txt b/Examples/cpp1/README.txt index f012293..efa5554 100644 --- a/Examples/cpp1/README.txt +++ b/Examples/cpp1/README.txt @@ -1,3 +1,6 @@ +A C++ component dynamically loadable +========================================= + To build this example, modify the components.py file to take into account your configuration. diff --git a/Examples/cpp2/README.txt b/Examples/cpp2/README.txt index f012293..38890cb 100644 --- a/Examples/cpp2/README.txt +++ b/Examples/cpp2/README.txt @@ -1,4 +1,7 @@ -To build this example, modify the components.py file +A C++ standalone component (executable form) +================================================= + +To build this example, modify the components.py and Makefile files to take into account your configuration. 1- your prerequisite file @@ -12,6 +15,10 @@ Then set the environment (including PYTHONPATH for YACGEN, ../.. from here and e You should get a SALOME module in source form (cppcompos_SRC), its installation (install) and a SALOME application (appli) composed of modules KERNEL, GUI, YACS and cppcompos. +To build the standalone component, run:: + + make + To run a coupling: 1. start SALOME in background : ./appli/runAppli -t diff --git a/Examples/fort1/README.txt b/Examples/fort1/README.txt index 5cef309..1d24124 100644 --- a/Examples/fort1/README.txt +++ b/Examples/fort1/README.txt @@ -1,5 +1,5 @@ -A Fortran component -====================== +A Fortran component dynamically loadable +============================================= To build this example, modify the components.py and Makefile files to take into account your configuration. @@ -19,7 +19,7 @@ and process components.py :: python components.py -You should get a SALOME module in source form (fcompos_SRC), its installation (Installfort) and +You should get a SALOME module in source form (fcompos_SRC), its installation (install) and a SALOME application (appli) composed of modules KERNEL, GUI, YACS and fcompos. To run a coupling: diff --git a/Examples/fort2/README.txt b/Examples/fort2/README.txt index 5cef309..f2ae712 100644 --- a/Examples/fort2/README.txt +++ b/Examples/fort2/README.txt @@ -1,5 +1,5 @@ -A Fortran component -====================== +A Fortran standalone component +================================= To build this example, modify the components.py and Makefile files to take into account your configuration. @@ -11,17 +11,17 @@ Then set the environment (including PYTHONPATH for YACGEN, ../.. from here):: source -Build the code1 et code2 libraries :: - - make - and process components.py :: python components.py -You should get a SALOME module in source form (fcompos_SRC), its installation (Installfort) and +You should get a SALOME module in source form (fcompos_SRC), its installation (install) and a SALOME application (appli) composed of modules KERNEL, GUI, YACS and fcompos. +Build the code1 et code2 executables :: + + make + To run a coupling: 1. start SALOME in background : ./appli/runAppli -t diff --git a/Examples/pyth1/README.txt b/Examples/pyth1/README.txt index 2f25931..54d263b 100644 --- a/Examples/pyth1/README.txt +++ b/Examples/pyth1/README.txt @@ -1,5 +1,5 @@ -A Python component -==================== +A Python component dynamically loadable +=============================================== To build this example, modify the components.py file to take into account your configuration. diff --git a/Examples/pyth2/README.txt b/Examples/pyth2/README.txt index 2f25931..706ee53 100644 --- a/Examples/pyth2/README.txt +++ b/Examples/pyth2/README.txt @@ -1,5 +1,5 @@ -A Python component -==================== +A Python standalone component (in executable form) +======================================================= To build this example, modify the components.py file to take into account your configuration. diff --git a/MANIFEST.in b/MANIFEST.in index 4611729..91bab87 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,12 @@ -include Examples/fort1/code1.f Examples/fort1/code2.f Examples/fort1/components.py Examples/fort1/coupling.xml Examples/fort1/Makefile Examples/fort1/README.txt -include Examples/cpp1/components.py Examples/cpp1/coupling.xml Examples/cpp1/README.txt -include Examples/pyth1/components.py Examples/pyth1/coupling.xml Examples/pyth1/README.txt -include Examples/fort2/code1.f Examples/fort2/code2.f Examples/fort2/components.py Examples/fort2/coupling.xml Examples/fort2/Makefile Examples/fort2/README.txt -include Examples/cpp2/components.py Examples/cpp2/coupling.xml Examples/cpp2/README.txt Examples/cpp2/Makefile Examples/cpp2/prog.cxx -include Examples/pyth2/components.py Examples/pyth2/coupling.xml Examples/pyth2/README.txt - +recursive-include Examples/fort1 *.f components.py coupling.xml Makefile README.txt +recursive-include Examples/cpp1 components.py coupling.xml README.txt +recursive-include Examples/pyth1 *.py coupling.xml README.txt +recursive-include Examples/fort2 *.f components.py coupling.xml Makefile README.txt +recursive-include Examples/cpp2 components.py coupling.xml README.txt Makefile prog.cxx +recursive-include Examples/pyth2 components.py coupling.xml README.txt +recursive-include Examples/ast1 components.py coupling.xml f.comm README.txt +recursive-include Examples/ast1/fcompo compo.f Makefile +recursive-include Examples/ast1/myaster Makefile make_cata src/*.f catalo/*.capy +recursive-include Examples/ast2 components.py coupling.xml f.comm README.txt +recursive-include Examples/ast2/fcompo compo.f Makefile +recursive-include Examples/ast2/myaster Makefile make_exec config.txt src/*.f catalo/*.capy -- 2.39.2