tem_determine_discreteVector Subroutine

public subroutine tem_determine_discreteVector(vector, compareVector, angle)

Compare the incoming discrete vector against a set of prevailing vectors and return the found closest prevailing integer vector

A set of real numbered unit vectors (compareVector) must be given. The integer numbered vector is compared against those and the closest integer vector overwrites the original vector.


integer, intent(inout) :: vector(:)

The given vector, will be set to the vector in compareVector that is best aligned to it.

real(kind=rk), intent(in) :: compareVector(:,:)

Set of unit vectors to select from against. size is (3, nVectors)

real(kind=rk), intent(out), optional :: angle

angle between vectors

Called by

proc~~tem_determine_discretevector~~CalledByGraph proc~tem_determine_discretevector tem_determine_discreteVector proc~tem_stencil_getlabelforcxdir tem_stencil_getLabelForcxDir proc~tem_stencil_getlabelforcxdir->proc~tem_determine_discretevector



integer, private :: iDir
integer, private :: bestIndex
real(kind=rk), private :: length
real(kind=rk), private :: rv(3)
real(kind=rk), private :: rVectIn(3)
real(kind=rk), private :: angleLoc
real(kind=rk), private :: dotProduct
real(kind=rk), private :: maxplen
real(kind=rk), private :: min_nz_comp