feature/meshText #57
1 changed files with 31 additions and 0 deletions
Collisions done
Thanks to the advance statement the output of collisions is done.
commit
d34e72d2e8
|
|
@ -27,10 +27,26 @@ module moduleMeshOutputText
|
||||||
subroutine writeCollOutput(self, fileID)
|
subroutine writeCollOutput(self, fileID)
|
||||||
use moduleMesh
|
use moduleMesh
|
||||||
use moduleCollisions
|
use moduleCollisions
|
||||||
|
use moduleRefParam, only: L_ref
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
class(meshGeneric), intent(in):: self
|
class(meshGeneric), intent(in):: self
|
||||||
integer, intent(in):: fileID
|
integer, intent(in):: fileID
|
||||||
|
integer:: n, k, c
|
||||||
|
|
||||||
|
do n = 1, self%numCells
|
||||||
|
write(fileID, '(I0)', advance='no') n
|
||||||
|
|
||||||
|
do k = 1, nCollPairs
|
||||||
|
do c = 1, interactionMatrix(k)%amount
|
||||||
|
write(fileID, '(",",I0)', advance='no') self%cells(n)%obj%tallyColl(k)%tally(c)
|
||||||
|
|
||||||
|
end do
|
||||||
|
|
||||||
|
end do
|
||||||
|
write(fileID, *)
|
||||||
|
|
||||||
|
end do
|
||||||
|
|
||||||
end subroutine writeCollOutput
|
end subroutine writeCollOutput
|
||||||
|
|
||||||
|
|
@ -145,6 +161,8 @@ module moduleMeshOutputText
|
||||||
class(meshGeneric), intent(in):: self
|
class(meshGeneric), intent(in):: self
|
||||||
integer:: fileID
|
integer:: fileID
|
||||||
character(:), allocatable:: fileName
|
character(:), allocatable:: fileName
|
||||||
|
integer:: k, c
|
||||||
|
character (len=2):: cString
|
||||||
|
|
||||||
fileID = 62
|
fileID = 62
|
||||||
|
|
||||||
|
|
@ -153,6 +171,19 @@ module moduleMeshOutputText
|
||||||
write(*, "(6X,A15,A)") "Creating file: ", fileName
|
write(*, "(6X,A15,A)") "Creating file: ", fileName
|
||||||
open (fileID, file = path // folder // '/' // fileName)
|
open (fileID, file = path // folder // '/' // fileName)
|
||||||
|
|
||||||
|
write(fileID, '(A)', advance='no') "Cell"
|
||||||
|
do k = 1, nCollPairs
|
||||||
|
do c = 1, interactionMatrix(k)%amount
|
||||||
|
write(cString, "(I2)") c
|
||||||
|
write(fileID, '(",",A)', advance='no') 'Pair ' // interactionMatrix(k)%sp_i%name // '-' // interactionMatrix(k)%sp_j%name // ' collision ' // cString
|
||||||
|
|
||||||
|
end do
|
||||||
|
end do
|
||||||
|
|
||||||
|
write(fileID, *)
|
||||||
|
|
||||||
|
call writeCollOutput(self, fileID)
|
||||||
|
|
||||||
close(fileID)
|
close(fileID)
|
||||||
|
|
||||||
end if
|
end if
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue