61 REAL(RFREAL) :: resnorm
63 REAL(RFREAL) :: localvals(6), globalvals(6)
69 'WriteConvergence.F90' )
74 localvals(1) = global%forceX
75 localvals(2) = global%forceY
76 localvals(3) = global%forceZ
77 localvals(4) = global%massIn
78 localvals(5) = global%massOut
79 localvals(6) = global%stopRun
83 CALL mpi_allreduce( localvals,globalvals,6,mpi_rfreal,mpi_sum, &
84 global%mpiComm,global%mpierr )
85 IF (global%mpierr /= 0) CALL
errorstop( global,err_mpi_trouble,__line__ )
87 global%forceX = globalvals(1)
88 global%forceY = globalvals(2)
89 global%forceZ = globalvals(3)
90 global%massIn = globalvals(4)
91 global%massOut = globalvals(5)
92 global%stopRun = globalvals(6)
97 IF (global%flowType==flow_steady .AND. global%myProcid==masterproc)
THEN
98 IF (global%currentIter == 1)
THEN
101 resnorm = global%residual/
makenonzero(global%resInit)
105 IF (global%verbLevel /= verbose_none) &
106 WRITE(stdout,1000) solver_name,global%currentIter,log10(resnorm), &
107 global%forceX,global%forceY,global%forceZ, &
108 global%massIn,global%massOut
110 WRITE(if_conver,1010,err=10) global%currentIter,log10(resnorm), &
111 global%forceX,global%forceY,global%forceZ, &
112 global%massIn,global%massOut
116 ELSE IF (global%flowType==flow_unsteady .AND. global%myProcid==masterproc)
THEN
117 IF (global%verbLevel /= verbose_none) &
118 WRITE(stdout,2000) solver_name,global%currentTime,global%dtMin, &
119 global%forceX,global%forceY,global%forceZ, &
120 global%massIn,global%massOut
122 WRITE(if_conver,2010,err=10) global%currentTime,global%dtMin, &
123 global%forceX,global%forceY,global%forceZ, &
124 global%massIn,global%massOut
133 CALL
errorstop( global,err_file_write,__line__,
'Convergence file.' )
135 1000
FORMAT(
a,1
x,i6,1pe13.4,5e13.4)
136 1010
FORMAT( i6,1pe13.4,5e13.4)
137 2000
FORMAT(
a,1
x,1pe12.5,6e13.4)
138 2010
FORMAT( 1pe12.5,6e13.4)
subroutine registerfunction(global, funName, fileName)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine writeconvergence(global)
subroutine deregisterfunction(global)