1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
open (input1,'<xyztop.txt') || die "Pb d'ouverture du fichier";
open (output1,'>Noeuds1.txt');
$Dx=5;
$Dy=10;
$Dz=0.5;
$Nx = 56;
$Ny = 40;
$Nz = 80;
$nx = $Nx+1;
$ny = $Ny+1;
$nz = $Nz+1;
$i=1;
$n=100;
for ($i=1;$i=$n;$i++)
{
$ligne=<input1>;
@coo=split(" ",$ligne);
@tab=("$coo[4]");
pop (@tab);
# print "@tab";
$Ix=3;
$Iy=6;
$Iztop=20;
$Izbottom=16;
@tab=("$coo[4]");
# print "@tab";
for($j=$Iztop;$j=$Izbottom;$j=$j-1)
{
$tab[$j]=($Ix+($Iy-1)*$nx+($j-1)*$nx*$ny);
$num=$tab[j];
push(@tab,$num,);
}
print output1 "$tab[0]";
print output1 "\n";
print output1 "$tab[1]";
print output1 "\n";
for($j=$Iztop-1;$j=$Izbottom+1;$j=$j-1)
{
print output1 "$tab[$j];";
}
print output1 "\n";
print output1 $tab[$#tab];
} |