SFEMaNS  version 5.3
Reference documentation for SFEMaNS
tools.f90
Go to the documentation of this file.
2 
3 CONTAINS
4 
5  FUNCTION find_point(mesh,r,z) RESULT(n)
6 
7  USE def_type_mesh
8 
9  IMPLICIT NONE
10  TYPE(mesh_type), INTENT(IN) :: mesh !type de maillage
11  REAL(KIND=8), INTENT(IN) :: r, z
12  INTEGER :: n
13  REAL(KIND=8) :: hmax
14  INTEGER, DIMENSION(1) :: jlg
15 
16  hmax = maxval(mesh%hloc)
17 
18  jlg = minloc((mesh%rr(1,:)-r)**2 + (mesh%rr(2,:)-z)**2)
19  n = jlg(1)
20 
21  IF (((mesh%rr(1,n)-r)**2 + (mesh%rr(2,n)-z)**2) .GT. hmax**2) THEN
22  n = 0
23  END IF
24 
25  IF (n .GT. mesh%dom_np) THEN
26  n = 0
27  END IF
28 
29  RETURN
30 
31  END FUNCTION find_point
32 
33 END MODULE sfemans_tools
integer function find_point(mesh, r, z)
Definition: tools.f90:6