Salome HOME
e653dbdc3a8ea7db6eeb5f1913ea803ac9df3b9d
[modules/med.git] / src / MEDMEM / DataTest / constituedump.sh
1 #!/bin/sh
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 #
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23
24 #  File   : constituedump.sh
25 #  Module : MED
26 #
27 cd Data
28 for i in `ls *.med`
29 do
30         echo "constitution de $i : 1er maillage"
31         mdump $i > ${i}.coor.dump << EOF
32 1
33 1
34 1
35 EOF
36 cp ${i}.coor.dump ${i}.ent.dump
37 done
38
39 for i in `echo zzzz121b.med`
40 do
41         echo "constitution de $i : 2nd maillage"
42         mdump $i > ${i}.2.coor.dump << EOF
43 1
44 1
45 2
46 EOF
47 cp ${i}.2.coor.dump ${i}.2.ent.dump
48 done
49
50 mv *.dump ../Ref
51 cd ../Ref
52
53 for j in `ls *.ent.dump`
54 do
55 echo "Traitement de $j  : "
56 vi ${j} << EOF
57 :/INFORMATIONS GENERALES
58 :-2
59 :1,.d
60 :/Nombre de familles
61 :.,\$d
62 :wq
63 EOF
64 done
65
66 for j in `ls *.coor.dump`
67 do
68 echo "Traitement de $j  : "
69 vi ${j} << EOF
70 :/NOEUDS DU MAILLAGE
71 :-2
72 :1,.d
73 :/Coordonnees des noeuds
74 : +2
75 :.,\$d
76 :wq
77 EOF
78 done
79
80