Statistiques
| Révision :

root / src / addligne.f90

Historique | Voir | Annoter | Télécharger (2,64 ko)

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