Loading src/Geom.f90 +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ PUBLIC :: rotate_2d_vector PUBLIC :: hexagon_vertexes PUBLIC :: hex_2D_to_1D PUBLIC :: hex_1D_to_2D PUBLIC :: hex_switch_orientation INTERFACE newGeom !> @copybrief Geom::newGeom_line Loading src/Geom_Hex.f90 +15 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ PUBLIC :: rotate_2d_vector PUBLIC :: hexagon_vertexes PUBLIC :: hex_2D_to_1D PUBLIC :: hex_1D_to_2D PUBLIC :: hex_switch_orientation !> Enumerations for hexagonal unit orientations INTEGER(SIK),PARAMETER,PUBLIC :: HEX_POINTY_TOP=0 Loading Loading @@ -322,4 +323,18 @@ PURE FUNCTION hex_1D_to_2D(rings, index) RESULT(indexes) ENDFUNCTION hex_1D_to_2D ! !------------------------------------------------------------------------------- !> @brief Reverses the hexagonal geometry orientation !> @param orientation the original orientation (HEX_FLAT_TOP or HEX_POINTY_TOP) !> @returns reversed the opposite orientation (HEX_POINTY_TOP or HEX_FLAT_TOP) !> FUNCTION hex_switch_orientation(orientation) RESULT(reversed) INTEGER(SIK),INTENT(IN) :: orientation INTEGER(SIK) :: reversed REQUIRE(ANY(orientation == HEX_ORIENTATIONS)) reversed = 2_SIK - orientation ENDFUNCTION hex_switch_orientation ! ENDMODULE Geom_Hex No newline at end of file Loading
src/Geom.f90 +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ PUBLIC :: rotate_2d_vector PUBLIC :: hexagon_vertexes PUBLIC :: hex_2D_to_1D PUBLIC :: hex_1D_to_2D PUBLIC :: hex_switch_orientation INTERFACE newGeom !> @copybrief Geom::newGeom_line Loading
src/Geom_Hex.f90 +15 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ PUBLIC :: rotate_2d_vector PUBLIC :: hexagon_vertexes PUBLIC :: hex_2D_to_1D PUBLIC :: hex_1D_to_2D PUBLIC :: hex_switch_orientation !> Enumerations for hexagonal unit orientations INTEGER(SIK),PARAMETER,PUBLIC :: HEX_POINTY_TOP=0 Loading Loading @@ -322,4 +323,18 @@ PURE FUNCTION hex_1D_to_2D(rings, index) RESULT(indexes) ENDFUNCTION hex_1D_to_2D ! !------------------------------------------------------------------------------- !> @brief Reverses the hexagonal geometry orientation !> @param orientation the original orientation (HEX_FLAT_TOP or HEX_POINTY_TOP) !> @returns reversed the opposite orientation (HEX_POINTY_TOP or HEX_FLAT_TOP) !> FUNCTION hex_switch_orientation(orientation) RESULT(reversed) INTEGER(SIK),INTENT(IN) :: orientation INTEGER(SIK) :: reversed REQUIRE(ANY(orientation == HEX_ORIENTATIONS)) reversed = 2_SIK - orientation ENDFUNCTION hex_switch_orientation ! ENDMODULE Geom_Hex No newline at end of file