vector_projection_on_plane Subroutine

public pure subroutine vector_projection_on_plane(a, b, c)

Project a vector onto a plane.

Reference

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(3) :: a

the original vector

real(kind=wp), intent(in), dimension(3) :: b

the plane to project on to (a normal vector)

real(kind=wp), intent(out), dimension(3) :: c

the projection of a onto the b plane


Calls

proc~~vector_projection_on_plane~~CallsGraph proc~vector_projection_on_plane vector_module::vector_projection_on_plane proc~vector_projection vector_module::vector_projection proc~vector_projection_on_plane->proc~vector_projection

Source Code

    pure subroutine vector_projection_on_plane(a,b,c)

    implicit none

    real(wp),dimension(3),intent(in)  :: a !! the original vector
    real(wp),dimension(3),intent(in)  :: b !! the plane to project on to (a normal vector)
    real(wp),dimension(3),intent(out) :: c !! the projection of a onto the b plane

    c = a - vector_projection(a,b)

    end subroutine vector_projection_on_plane