The TELEMAC-MASCARET system  trunk
twcclosest.f
Go to the documentation of this file.
1 ! *********************
2  SUBROUTINE twcclosest
3 ! *********************
4 !
5 !***********************************************************************
6 ! ARTEMIS V7P4 Nov 2017
7 !***********************************************************************
8 !
9 !brief IDENTIFIES ARTEMIS BOUNDARY NODE CLOSEST TO REFERENCE POINT
10 !+ (ONLY REQUIRED FOR CALL TO ENTART, artemis.f line 489)
11 !
12 !history N.DURAND (HRW)
13 !+ Nov 2017
14 !+ V7P4
15 !
16 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 !
18  USE bief
20 !
22  IMPLICIT NONE
23 !
24 !-----------------------------------------------------------------------
25 !
26  INTEGER :: IPTFR
27  DOUBLE PRECISION :: EPS, DIST
28 !
29 !=======================================================================
30 !
31  eps = 3000.d0
32  iptfr_ref = 0
33 !
34  DO iptfr = 1 , nptfr
35  dist = dsqrt((x(mesh%NBOR%I(iptfr))-x_sfref)**2 +
36  & (y(mesh%NBOR%I(iptfr))-y_sfref)**2 )
37  IF(dist.LT.eps) THEN
38  eps = dist
39  iptfr_ref = iptfr
40  ENDIF
41  ENDDO
42 !
43  IF(iptfr_ref.EQ.0) THEN
44  WRITE(lu,201) x_sfref, y_sfref
45 ! CALL PLANTE(1)
46 ! STOP
47  ENDIF
48 !
49 !-----------------------------------------------------------------------
50 !
51 ! PRINTOUT FORMATS:
52 !
53 201 FORMAT(/,1x,'CLOSEST : PLEASE REVIEW COORDINATES FOR THE',
54  & ' REFERENCE POINT (',1f9.2,';',1f9.2,')')
55 !
56 !-----------------------------------------------------------------------
57 !
58  RETURN
59  END
double precision, dimension(:), pointer y
type(bief_mesh), target mesh
double precision, dimension(:), pointer x
subroutine twcclosest
Definition: twcclosest.f:4
Definition: bief.f:3