SPEED
CHECK_NORMAL.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
33
34
35 subroutine check_normal(nor_x, nor_y, nor_z, &
36 material, element, face, &
37 nel_glo, normalxyz, mat_el_fac, yon)
38
39 implicit none
40
41 integer*4 :: i
42 integer*4 :: material, element, face, yon, nel_glo
43 integer*4, dimension(nel_glo,3) :: mat_el_fac
44
45 real*8 :: nor_x, nor_y, nor_z, res
46 real*8, dimension(nel_glo,3) :: normalxyz
47
48 yon = 0
49
50 do i = 1, nel_glo
51
52 if(material .eq. mat_el_fac(i,1) .and. &
53 element .eq. mat_el_fac(i,2) .and. &
54 face .eq. mat_el_fac(i,3) ) then
55
56 res = dsqrt(dabs(nor_x + normalxyz(i,1))**2 + dabs(nor_y + normalxyz(i,2))**2 + dabs(nor_z + normalxyz(i,3))**2)
57
58 if(res .le. 5.d-2) yon = 1
59
60 endif
61
62 enddo
63
64
65
66 end subroutine check_normal
subroutine check_normal(nor_x, nor_y, nor_z, material, element, face, nel_glo, normalxyz, mat_el_fac, yon)
Verifies if 2 different faces are opposite or not.