The main documentation of the Get Value Multi_Mesh Functions contains additional explanation of this code listing.
define([POINTER_ACCESS_ROUTINE],[ pushdef([VALUE], [$1]) pushdef([VALUE_Result], expand(VALUE_Result)) pushdef([Get_POINTER_VALUE_Multi_Mesh], expand(Get_VALUE_Multi_Mesh)) function Get_POINTER_VALUE_Multi_Mesh (Mesh) result(VALUE_Result) ! Input variable. type(Multi_Mesh_type), target, intent(inout) :: Mesh ! Mesh object. ! Input/Output variable. ! Pointer to requested Base Structure. type(Base_Structure_type), pointer :: VALUE_Result !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Verify requirements. VERIFY(Valid_State(Mesh),5) ! Mesh is valid. ! Assign the pointer. VALUE_Result => Mesh%VALUE ! Verify guarantees. VERIFY(Valid_State(Mesh),5) ! Mesh is valid. return end function Get_POINTER_VALUE_Multi_Mesh popdef([VALUE]) popdef([VALUE_Result]) popdef([Get_POINTER_VALUE_Multi_Mesh]) ]) fortext([Value], [Cell_Structure Node_Structure Face_Structure],[ POINTER_ACCESS_ROUTINE(Value) ]) define([ACCESS_ROUTINE],[ pushdef([VALUE], [$1]) ifelse([$2], [2], [pushdef([DIMENSION], [, dimension(2)])], [pushdef([DIMENSION], [])]) pushdef([Get_VALUE_Multi_Mesh], expand(Get_VALUE_Multi_Mesh)) function Get_VALUE_Multi_Mesh (Mesh) result(VALUE) ! Input/Output variables. ! Base_Mesh object. type(Multi_Mesh_type), intent(in) :: Mesh ! Output variables. type(integer) DIMENSION :: VALUE ! Multi_Mesh value to be output. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Verify requirements. VERIFY(Valid_State(Mesh),5) ! Mesh is valid. ! Set value. VALUE = Mesh%VALUE ! Verify guarantees - none. return end function Get_VALUE_Multi_Mesh popdef([VALUE]) popdef([DIMENSION]) popdef([Get_VALUE_Multi_Mesh]) ]) fortext([Value], [First_Cell_PE Last_Cell_PE NCells_PE NCells_Total dnl First_Node_PE Last_Node_PE NNodes_PE NNodes_Total dnl First_Face_PE Last_Face_PE NFaces_PE NFaces_Total dnl Faces_per_Cell NDimensions],[ ACCESS_ROUTINE(Value) ]) fortext([Value], [Range_Cells_PE Range_Nodes_PE Range_Faces_PE],[ ACCESS_ROUTINE(Value, 2) ]) function Get_Name_Multi_Mesh (Mesh) result(Name) ! Input variable. type(Multi_Mesh_type), intent(in) :: Mesh ! Variable to be queried. ! Output variable. type(character,name_length) :: Name ! Name of Mesh. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Verify requirements. VERIFY(Valid_State(Mesh),5) ! Mesh is valid. ! Set the value. Name = Mesh%Name ! Verify guarantees - none. return end function Get_Name_Multi_Mesh