source: trunk/SOURCES/Heino_files/detect-assym.f90 @ 159

Last change on this file since 159 was 4, checked in by dumas, 10 years ago

initial import GRISLI trunk

File size: 2.1 KB
Line 
1!> \file detect-assym.f90
2!! Detection de symetrie par rapport a un axe donnee
3!<
4
5!> SUBROUTINE: detect_assym
6!! \author ...
7!! \date ...
8!! @note  Routine pour la detection de symetrie
9!! @param n1
10!! @param n2
11!! @param iaxe
12!! @param jaxe
13!! @param isens
14!! @param istag
15!! @param jsens
16!! @param jstag
17!! @param Tabsym
18!! @param itestsym
19!<
20
21subroutine detect_assym(n1,n2,iaxe,jaxe,isens,istag,jsens,jstag,Tabsym,itestsym)
22
23! si symetrie par rapport a axe j=jaxe
24!---------------------------------------
25! pour variables type S,H,B,ddx  (nx,ny,iaxe,jaxe,1,0,1,0  ...)
26! pour variables type sdx, ux (nx,ny,iaxe,jaxe,1,0,1,0 ...)
27! pour variables type sdy,uy (nx,ny,iaxe,jaxe,1,0,-1,1...)
28! pour variables type ddy  (nx,ny,iaxe,jaxe,1,0,1,1...)
29
30implicit none
31integer :: iaxe 
32integer :: jaxe
33integer :: jsym
34integer :: isym
35integer :: n1
36integer :: n2
37integer :: itestsym
38integer :: i,j
39integer :: isens   ! -1 negatif quand la variable change de direction +1 sinon
40integer :: istag   ! 0 quand noeud majeur, 1 quand noeuds mineurs
41integer :: jsens
42integer :: jstag
43
44real,dimension(n1,n2) :: Tabsym
45real :: testsym
46real :: maxsym
47
48itestsym=0
49
50maxsym=maxval(abs(Tabsym))
51if (maxsym.ne.0.) then
52!symetrique par rapport à jaxe la référence est le bas. Pour l'instant seulement lui
53jsym=0
54itestsym=0
55do j=jaxe+1,n2
56   jsym=jsym+1
57
58   do i=1,n1
59      testsym=abs(tabsym(i,j)-jsens*tabsym(i,jaxe-jsym+jstag))
60      testsym=testsym/maxsym
61      if (testsym.gt.1.e-8) then
62         write(6,333),i,j,jaxe-jsym+jstag,testsym,tabsym(i,j)-jsens*tabsym(i,jaxe-jsym+jstag),tabsym(i,j),tabsym(i,jaxe-jsym+jstag)
63         itestsym=itestsym+1
64      end if
65     
66   end do
67end do
68end if
69333 format("asymetrie i,j",3(i4),4(es16.8,1x))
70end subroutine detect_assym
71
72! exemples d'utilisation  noeud majeur
73!-----------------------------------------------------------------------
74!!$call detect_assym(nx,ny,0,41,1,0,1,0,H,itest_step)
75!!$
76!!$if (itest_step.gt.0) then
77!!$   write(6,*) 'apres flottab asymetrie sur H  pour time=',time
78!!$   stop
79!!$else
80!!$   write(6,*) 'apres flottab pas d asymetrie sur H  pour time=',time
81!!$
82!!$end if
83!-----------------------------------------------------------------------
84
Note: See TracBrowser for help on using the repository browser.