Almost done, just have to check the examples

This commit is contained in:
Jorge Gonzalez 2026-03-11 20:57:23 +01:00
commit 493f7b9785
5 changed files with 14 additions and 14 deletions

View file

@ -492,7 +492,7 @@ MODULE moduleInput
CALL config%get(object // '.cpuTime', timeOutput, found)
CALL config%get(object // '.numColl', collOutput, found)
CALL config%get(object // '.EMField', emOutput, found)
call config%get(object // '.boundaryParticle', boundaryParticleOutput, found)
call config%get(object // '.boundariesParticle', boundaryParticleOutput, found)
CALL config%get(object // '.triggerCPUTime', triggerCPUTime, found)
IF (.NOT. found) THEN

View file

@ -50,7 +50,6 @@ MODULE moduleMeshOutput0D
CLASS(meshGeneric), INTENT(in):: self
CHARACTER(:), ALLOCATABLE:: fileName
INTEGER:: k
character(:), allocatable:: kString
fileName = formatFileName('Output', 'Collisions', 'csv')
IF (timeStep == tInitial) THEN

View file

@ -34,6 +34,7 @@ MODULE moduleOutput
integer, parameter:: fileID_boundaryParticle = 30 ! Particle boundaries
integer, parameter:: fileID_boundaryEM = 31 ! EM boundaries
integer, parameter:: fileID_reference = 40 ! Reference values
integer, parameter:: fileID_time =50 ! Computation time
!Output for each node
TYPE, PUBLIC:: outputNode
@ -243,7 +244,7 @@ MODULE moduleOutput
END SUBROUTINE calculateOutput
SUBROUTINE printTime(first)
SUBROUTINE writeTime(first)
USE moduleSpecies
USE moduleCompTime
USE moduleCaseParam, ONLY: timeStep
@ -252,31 +253,31 @@ MODULE moduleOutput
LOGICAL, INTENT(in), OPTIONAL:: first
CHARACTER(:), ALLOCATABLE:: fileName
fileName = 'cpuTime.dat'
fileName = 'cpuTime.csv'
IF (timeOutput) THEN
IF (PRESENT(first)) THEN
IF (first) THEN
OPEN(20, file = generateFilePath(fileName), action = 'write')
WRITE(20, "(A1, 8X, A1, 9X, A1, 7(A20))") "#","t","n","total (s)","push (s)","reset (s)", &
"collision (s)","coulomb (s)", &
"weighting (s)","EMField (s)"
OPEN(fileID_time, file = generateFilePath(fileName), action = 'write')
WRITE(fileID_time, "(*("//fmtColStr//"))") "t","n","total (s)","push (s)","reset (s)", &
"collision (s)","coulomb (s)", &
"weighting (s)","EMField (s)"
call informFileCreation(fileName)
CLOSE(20)
CLOSE(fileID_time)
END IF
END IF
OPEN(20, file = generateFilePath(fileName), position = 'append', action = 'write')
OPEN(fileID_time, file = generateFilePath(fileName), position = 'append', action = 'write')
WRITE (20, "(I10, I10, 7(ES20.6E3))") timeStep, nPartOld, tStep, tPush, tReset, tColl, tCoul, tWeight, tEMField
WRITE (fileID_time, "(*("//fmtColInt//"),*("//fmtColReal//"))") timeStep, nPartOld, tStep, tPush, tReset, tColl, tCoul, tWeight, tEMField
CLOSE(20)
CLOSE(fileID_time)
END IF
END SUBROUTINE printTime
END SUBROUTINE writeTime
! Write file with reference values
subroutine writeReference()

View file

@ -564,7 +564,7 @@ MODULE moduleSolver
!Reset CPU Time counter
counterCPUTime = 0
CALL printTime(timeStep == 0)
CALL writeTime(timeStep == 0)
END IF