Normal vector for the plate (computed using right hand rule).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | v1 |
first vertex of the triangle [x,y,z] |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v2 |
second vertex of the triangle [x,y,z] |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v3 |
third vertex of the triangle [x,y,z] |
surface normal vector
pure function normal(v1,v2,v3) result(n) implicit none real(wp),dimension(3),intent(in) :: v1 !! first vertex of the triangle [x,y,z] real(wp),dimension(3),intent(in) :: v2 !! second vertex of the triangle [x,y,z] real(wp),dimension(3),intent(in) :: v3 !! third vertex of the triangle [x,y,z] real(wp),dimension(3) :: n !! surface normal vector n = unit( cross( v2-v1, v3-v1 ) ) end function normal