gatherVar Module Subroutine

module subroutine gatherVar(this, localVec, globVec, varIsDist)

Gather variable values into global vector for output on rank 0. If globVec in not allocated it will be allocated to the correct size, otherwise it is assumed it is of the correct size.

Arguments

Type IntentOptional Attributes Name
class(MPIController), intent(inout) :: this
real(kind=rk), intent(in), dimension(:) :: localVec

Local vector to gather

real(kind=rk), intent(inout), allocatable, dimension(:) :: globVec

Global vector on rank 0 to gather into

logical, intent(in) :: varIsDist

Set to true if the gathered variable is a distribution