SPEED
CHECK_NORMAL.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

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.
 

Function/Subroutine Documentation

◆ check_normal()

subroutine check_normal ( real*8  nor_x,
real*8  nor_y,
real*8  nor_z,
integer*4  material,
integer*4  element,
integer*4  face,
integer*4  nel_glo,
real*8, dimension(nel_glo,3)  normalxyz,
integer*4, dimension(nel_glo,3)  mat_el_fac,
integer*4  yon 
)

Verifies if 2 different faces are opposite or not.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nor_xx-comp of the normal vector for the current element
[in]nor_yy-comp of the normal vector for the current element
[in]nor_zz-comp of the normal vector for the current element
[in]materialblock id for the neigh. element
[in]elementelement id for the neigh. element
[in]faceface id for the neigh. element
[in]nel_glonumber of global element dg
[in]nomalxyznomals for dg elements
[in]mat_el_facid for dg elements
[out]yon1 if the normals are opposite 0 otherwise

Definition at line 35 of file CHECK_NORMAL.f90.

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

Referenced by write_file_dgfs().

Here is the caller graph for this function: