11module parser_tools_mod
2-
2+
33#ifdef CompileWithSMBJSON
44 use mesh_mod
55 use cells_mod
@@ -23,10 +23,6 @@ module parser_tools_mod
2323 integer :: cId
2424 type (coordinate_t) :: relPos
2525 end type
26-
27- ! type :: cable_ptr_t
28- ! type(cable_t), pointer :: p
29- ! end type
3026#endif
3127
3228contains
@@ -42,11 +38,11 @@ function getIntervalsInCellRegions(cellRegions, cellType) result (intervals)
4238 do i = 1 , size (cellRegions)
4339 if (present (cellType)) then
4440 numberOfIntervals = numberOfIntervals + count (cellRegions(i)% intervals% getType() == cellType)
45- else
41+ else
4642 numberOfIntervals = numberOfIntervals + size (cellRegions(i)% intervals)
4743 end if
4844 end do
49-
45+
5046 allocate (intervals(numberOfIntervals))
5147 copiedIntervals = 0
5248 do i = 1 , size (cellRegions)
@@ -57,12 +53,12 @@ function getIntervalsInCellRegions(cellRegions, cellType) result (intervals)
5753 end if
5854 do j = 1 , size (intervalsInRegion)
5955 copiedIntervals = copiedIntervals + 1
60- intervals(copiedIntervals) = intervalsInRegion(j)
56+ intervals(copiedIntervals) = intervalsInRegion(j)
6157 end do
6258 end do
6359
6460 end function
65-
61+
6662 function cellRegionToCoords (cellRegion , cellType , tag ) result(res)
6763 type (cell_region_t), intent (in ) :: cellRegion
6864 integer , intent (in ), optional :: cellType
@@ -75,7 +71,7 @@ function cellRegionToCoords(cellRegion, cellType, tag) result(res)
7571 intervals = getIntervalsInCellRegions([cellRegion], cellType)
7672 if (present (tag)) then
7773 cs = cellIntervalsToCoords(intervals, tag)
78- else
74+ else
7975 cs = cellIntervalsToCoords(intervals)
8076 endif
8177 res = cs
@@ -115,7 +111,7 @@ function coordsToScaledCoords(cs) result(res)
115111 res(i)% zc = - 1.0
116112 end select
117113 end do
118- end
114+ end
119115
120116 subroutine cellRegionsToScaledCoords (res , cellRegions , tag )
121117 type (coords_scaled), dimension (:), pointer :: res
@@ -124,7 +120,7 @@ subroutine cellRegionsToScaledCoords(res, cellRegions, tag)
124120 type (coords), dimension (:), allocatable :: cs
125121 type (coords_scaled), dimension (:), allocatable :: scaledCoords
126122 character (LEN= BUFSIZE), optional , intent (in ) :: tag
127-
123+
128124 intervals = getIntervalsInCellRegions(cellRegions, CELL_TYPE_LINEL)
129125 if (present (tag)) then
130126 cs = cellIntervalsToCoords(intervals, tag)
@@ -160,7 +156,7 @@ subroutine convertInterval(xi, xe, interval, dir)
160156 type (cell_interval_t), intent (in ) :: interval
161157 integer , intent (in ) :: dir
162158 integer :: a, b
163- a = interval% ini% cell(dir)
159+ a = interval% ini% cell(dir)
164160 b = interval% end% cell(dir)
165161 if (a < b) then
166162 xi = a
0 commit comments