polishing
This commit is contained in:
parent
f8c5dbea71
commit
f546ffb3be
|
@ -29,13 +29,7 @@ module CPFEM2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
public
|
||||||
|
|
||||||
public :: &
|
|
||||||
CPFEM_forward, &
|
|
||||||
CPFEM_initAll, &
|
|
||||||
CPFEM_results, &
|
|
||||||
CPFEM_restartWrite
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ recursive function read_materialConfig(fileName,cnt) result(fileContent)
|
||||||
! count lines to allocate string array
|
! count lines to allocate string array
|
||||||
myTotalLines = 1
|
myTotalLines = 1
|
||||||
do l=1, len(rawData)
|
do l=1, len(rawData)
|
||||||
if (rawData(l:l) == new_line('')) myTotalLines = myTotalLines+1
|
if (rawData(l:l) == IO_EOL) myTotalLines = myTotalLines+1
|
||||||
enddo
|
enddo
|
||||||
allocate(fileContent(myTotalLines))
|
allocate(fileContent(myTotalLines))
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ recursive function read_materialConfig(fileName,cnt) result(fileContent)
|
||||||
startPos = 1
|
startPos = 1
|
||||||
l = 1
|
l = 1
|
||||||
do while (l <= myTotalLines)
|
do while (l <= myTotalLines)
|
||||||
endPos = merge(startPos + scan(rawData(startPos:),new_line('')) - 2,len(rawData),l /= myTotalLines)
|
endPos = merge(startPos + scan(rawData(startPos:),IO_EOL) - 2,len(rawData),l /= myTotalLines)
|
||||||
if (endPos - startPos > pStringLen -1) then
|
if (endPos - startPos > pStringLen -1) then
|
||||||
line = rawData(startPos:startPos+pStringLen-1)
|
line = rawData(startPos:startPos+pStringLen-1)
|
||||||
if (.not. warned) then
|
if (.not. warned) then
|
||||||
|
|
|
@ -20,8 +20,8 @@ module discretization
|
||||||
|
|
||||||
real(pReal), public, protected, dimension(:,:), allocatable :: &
|
real(pReal), public, protected, dimension(:,:), allocatable :: &
|
||||||
discretization_IPcoords0, &
|
discretization_IPcoords0, &
|
||||||
discretization_NodeCoords0, &
|
|
||||||
discretization_IPcoords, &
|
discretization_IPcoords, &
|
||||||
|
discretization_NodeCoords0, &
|
||||||
discretization_NodeCoords
|
discretization_NodeCoords
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
|
|
|
@ -172,7 +172,7 @@ subroutine readGeom(grid,geomSize,origin,microstructure,homogenization)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! get header length
|
! get header length
|
||||||
endPos = index(rawData,new_line(''))
|
endPos = index(rawData,IO_EOL)
|
||||||
if(endPos <= index(rawData,'head')) then ! ToDo: Should be 'header'
|
if(endPos <= index(rawData,'head')) then ! ToDo: Should be 'header'
|
||||||
startPos = len(rawData)
|
startPos = len(rawData)
|
||||||
call IO_error(error_ID=841, ext_msg='readGeom')
|
call IO_error(error_ID=841, ext_msg='readGeom')
|
||||||
|
@ -188,7 +188,7 @@ subroutine readGeom(grid,geomSize,origin,microstructure,homogenization)
|
||||||
origin = 0.0_pReal
|
origin = 0.0_pReal
|
||||||
l = 0
|
l = 0
|
||||||
do while (l < headerLength .and. startPos < len(rawData))
|
do while (l < headerLength .and. startPos < len(rawData))
|
||||||
endPos = startPos + index(rawData(startPos:),new_line('')) - 1
|
endPos = startPos + index(rawData(startPos:),IO_EOL) - 1
|
||||||
if (endPos < startPos) endPos = len(rawData) ! end of file without new line
|
if (endPos < startPos) endPos = len(rawData) ! end of file without new line
|
||||||
line = rawData(startPos:endPos)
|
line = rawData(startPos:endPos)
|
||||||
startPos = endPos + 1
|
startPos = endPos + 1
|
||||||
|
@ -263,7 +263,7 @@ subroutine readGeom(grid,geomSize,origin,microstructure,homogenization)
|
||||||
! read and interpret content
|
! read and interpret content
|
||||||
e = 1
|
e = 1
|
||||||
do while (startPos < len(rawData))
|
do while (startPos < len(rawData))
|
||||||
endPos = startPos + index(rawData(startPos:),new_line('')) - 1
|
endPos = startPos + index(rawData(startPos:),IO_EOL) - 1
|
||||||
if (endPos < startPos) endPos = len(rawData) ! end of file without new line
|
if (endPos < startPos) endPos = len(rawData) ! end of file without new line
|
||||||
line = rawData(startPos:endPos)
|
line = rawData(startPos:endPos)
|
||||||
startPos = endPos + 1
|
startPos = endPos + 1
|
||||||
|
@ -420,12 +420,12 @@ pure function IPneighborhood(grid)
|
||||||
+ x &
|
+ x &
|
||||||
+ 1
|
+ 1
|
||||||
IPneighborhood(2,1:6,1,e) = 1
|
IPneighborhood(2,1:6,1,e) = 1
|
||||||
IPneighborhood(3,1,1,e) = 2
|
IPneighborhood(3,1, 1,e) = 2
|
||||||
IPneighborhood(3,2,1,e) = 1
|
IPneighborhood(3,2, 1,e) = 1
|
||||||
IPneighborhood(3,3,1,e) = 4
|
IPneighborhood(3,3, 1,e) = 4
|
||||||
IPneighborhood(3,4,1,e) = 3
|
IPneighborhood(3,4, 1,e) = 3
|
||||||
IPneighborhood(3,5,1,e) = 6
|
IPneighborhood(3,5, 1,e) = 6
|
||||||
IPneighborhood(3,6,1,e) = 5
|
IPneighborhood(3,6, 1,e) = 5
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
end function IPneighborhood
|
end function IPneighborhood
|
||||||
|
|
Loading…
Reference in New Issue