root / src / addligne.f90
Historique | Voir | Annoter | Télécharger (2,64 ko)
1 |
SUBROUTINE AddLigne(i,n1,n2,n3,n4,ind_zmat,val_zmat,x,y,z) |
---|---|
2 |
|
3 |
!---------------------------------------------------------------------- |
4 |
! Copyright 2003-2014 Ecole Normale Supérieure de Lyon, |
5 |
! Centre National de la Recherche Scientifique, |
6 |
! Université Claude Bernard Lyon 1. All rights reserved. |
7 |
! |
8 |
! This work is registered with the Agency for the Protection of Programs |
9 |
! as IDDN.FR.001.100009.000.S.P.2014.000.30625 |
10 |
! |
11 |
! Authors: P. Fleurat-Lessard, P. Dayal |
12 |
! Contact: optnpath@gmail.com |
13 |
! |
14 |
! This file is part of "Opt'n Path". |
15 |
! |
16 |
! "Opt'n Path" is free software: you can redistribute it and/or modify |
17 |
! it under the terms of the GNU Affero General Public License as |
18 |
! published by the Free Software Foundation, either version 3 of the License, |
19 |
! or (at your option) any later version. |
20 |
! |
21 |
! "Opt'n Path" is distributed in the hope that it will be useful, |
22 |
! but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 |
! |
24 |
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
25 |
! GNU Affero General Public License for more details. |
26 |
! |
27 |
! You should have received a copy of the GNU Affero General Public License |
28 |
! along with "Opt'n Path". If not, see <http://www.gnu.org/licenses/>. |
29 |
! |
30 |
! Contact The Office of Technology Licensing, valorisation@ens-lyon.fr, |
31 |
! for commercial licensing opportunities. |
32 |
!---------------------------------------------------------------------- |
33 |
|
34 |
use Path_module, only : Nat, KINT, KREAL |
35 |
|
36 |
integer(KINT) :: ind_zmat(Nat, 5) |
37 |
real(KREAL) :: x(Nat), y(Nat), z(Nat), val_zmat(Nat, 3) |
38 |
|
39 |
real(KREAL) :: vx1,vy1,vz1,norm1 |
40 |
real(KREAL) :: vx2,vy2,vz2,norm2 |
41 |
real(KREAL) :: vx3,vy3,vz3,norm3 |
42 |
real(KREAL) :: vx4,vy4,vz4,norm4 |
43 |
real(KREAL) :: vx5,vy5,vz5,norm5 |
44 |
real(KREAL) :: val,val_d |
45 |
|
46 |
! WRITE(IOOUT,*) 'Addligne:',i,n1,n2,n3,n4 |
47 |
|
48 |
CALL vecteur(n2,n1,x,y,z,vx1,vy1,vz1,norm1) |
49 |
|
50 |
CALL vecteur(n2,n3,x,y,z,vx2,vy2,vz2,norm2) |
51 |
val=angle(vx1,vy1,vz1,norm1, & |
52 |
vx2,vy2,vz2,norm2) |
53 |
|
54 |
CALL vecteur(n3,n4,x,y,z,vx3,vy3,vz3,norm3) |
55 |
CALL produit_vect(vx1,vy1,vz1, & |
56 |
vx2,vy2,vz2, & |
57 |
vx4,vy4,vz4,norm4) |
58 |
CALL produit_vect(vx3,vy3,vz3, & |
59 |
vx2,vy2,vz2, & |
60 |
vx5,vy5,vz5,norm5) |
61 |
|
62 |
val_d=angle_d(vx4,vy4,vz4,norm4, & |
63 |
vx5,vy5,vz5,norm5, & |
64 |
vx2,vy2,vz2,norm2) |
65 |
|
66 |
! write(*,11) n1,n2,norm1,n3,val,n4,val_d |
67 |
! 11 format (2(1x,i3),1x,f8.4,2(1x,i3,1x,f8.3)) |
68 |
|
69 |
ind_zmat(i,1)=n1 |
70 |
ind_zmat(i,2)=n2 |
71 |
ind_zmat(i,3)=n3 |
72 |
ind_zmat(i,4)=n4 |
73 |
ind_zmat(i,5)=0 |
74 |
val_zmat(i,1)=norm1 |
75 |
val_zmat(i,2)=val |
76 |
val_zmat(i,3)=val_d |
77 |
|
78 |
! WRITE(*,*) "Addligne",i,n1,n2,n3,n4,norm1,val,val_d |
79 |
END |
80 |
|
81 |
|