125 DO i=1,currentmodel % NumberOfSolvers
126 solver => currentmodel % Solvers(i)
127 IF ( solver % PROCEDURE == 0 ) cycle
128 when = listgetstring( solver % Values,
'Exec Solver', gotit )
130 IF ( when ==
'after simulation' .OR. when ==
'after all' )
THEN
131 CALL solveractivate( currentmodel,solver,dt,transient )
132 IF (
ASSOCIATED(solver % Variable % Values) ) lastsaved = .false.
135 IF ( solver % SolverExecWhen == solver_exec_after_all )
THEN
136 CALL solveractivate( currentmodel,solver,dt,transient )
137 IF (
ASSOCIATED(solver % Variable % Values) ) lastsaved = .false.
142 IF( .NOT. lastsaved )
THEN
143 DO i=1,currentmodel % NumberOfSolvers
144 solver => currentmodel % Solvers(i)
145 IF ( solver % PROCEDURE == 0 ) cycle
146 execthis = ( solver % SolverExecWhen == solver_exec_ahead_save)
147 when = listgetstring( solver % Values,
'Exec Solver', gotit )
148 IF ( gotit ) execthis = ( when ==
'before saving')
149 IF( execthis ) CALL solveractivate( currentmodel,solver,dt,transient )
157 IF ( .NOT.lastsaved )
THEN
158 DO i=1,currentmodel % NumberOfSolvers
159 solver => currentmodel % Solvers(i)
160 IF ( solver % PROCEDURE == 0 ) cycle
161 execthis = ( solver % SolverExecWhen == solver_exec_ahead_save)
162 when = listgetstring( solver % Values,
'Exec Solver', gotit )
163 IF ( gotit ) execthis = ( when ==
'before saving')
164 IF( execthis ) CALL solveractivate( currentmodel,solver,dt,transient )
170 DO i=1,currentmodel % NumberOfSolvers
171 solver => currentmodel % Solvers(i)
172 IF ( solver % PROCEDURE == 0 ) cycle
173 execthis = ( solver % SolverExecWhen == solver_exec_after_save)
174 when = listgetstring( solver % Values,
'Exec Solver', gotit )
175 IF ( gotit ) execthis = ( when ==
'after saving')
176 IF( execthis ) CALL solveractivate( currentmodel,solver,dt,transient )
187 IF ( initialize /= 1 ) CALL info(
'MyElmerSolver',
'*** Elmer Solver: ALL DONE ***',level=3 )
189 IF ( initialize <=0 ) CALL freemodel(currentmodel)
192 CALL trilinoscleanup()
195 IF ( parenv % PEs>1 ) CALL parallelfinalize()
196 CALL info(
'MyElmerSolver',
'The end',level=3)
subroutine savecurrent(CurrentStep)
Saves current timestep to external files.
subroutine savetopost(CurrentStep)
Saves results file to post processing file of ElmerPost format, if requested.
subroutine elmerfinalize(runs)
ElmerLib Elmer library routines
ElmerLib Elmer library routines