The main documentation of the Get_Coordinates_Nodes_of_Cells_Multi_Mesh Procedure contains additional explanation of this code listing.
subroutine Get_Coordinates_NoC_MMesh (Coordinates_Nodes_of_Cells, Mesh)
! Input variable.
type(Multi_Mesh_type), intent(inout) :: Mesh ! Mesh object.
! Input/Output variable.
! Coordinates_Nodes_of_Cells BNV.
type(real,3) :: Coordinates_Nodes_of_Cells
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! Verify requirements.
VERIFY(Valid_State(Mesh),5) ! Mesh is valid.
! Coordinates_Cells is valid.
VERIFY(Valid_State(Coordinates_Nodes_of_Cells),5)
! Coordinates_Cells has correct dimensions.
VERIFY(SIZE(Coordinates_Nodes_of_Cells,1) == Mesh%NDimensions,5)
VERIFY(SIZE(Coordinates_Nodes_of_Cells,2) == Mesh%NCells_PE,5)
VERIFY(SIZE(Coordinates_Nodes_of_Cells,3) == Mesh%Nodes_per_Cell,5)
! Initializations.
if (.not.Initialized(Mesh%Coordinates_Nodes_of_Cells_CA)) then
call Initialize (Mesh%Coordinates_Nodes_of_Cells_CA, &
Mesh%Nodes_of_Cells_Index, 2, &
dim1=Mesh%NDimensions)
end if
! Gather node coordinates to cells.
Mesh%Coordinates_Nodes_of_Cells_CA = Mesh%Coordinates_Nodes_DV
Coordinates_Nodes_of_Cells = Mesh%Coordinates_Nodes_of_Cells_CA
! Verify guarantees.
VERIFY(Valid_State(Mesh),5) ! Mesh is valid.
! Coordinates_Cells is valid.
VERIFY(Valid_State(Coordinates_Nodes_of_Cells),5)
return
end subroutine Get_Coordinates_NoC_MMesh