-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsolver.f90
61 lines (45 loc) · 1.44 KB
/
solver.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
subroutine solver
implicit none
call solver_kfvs
end subroutine solver
subroutine solver_kfvs
use mod_solver
use mod_struct_to_array
use mod_write_vtk, only: write_solution_vtk
implicit none
integer :: n
call struct_to_array
call donnee_initiale
call allocate_vardummy
call conditions_aux_limites
call assign_lr_cell
call calcul_derived_quantities
call calcul_conservative_vector
call timestep
!--- temps de simulation et parametres de sorties
tmax=0.3828823925d-2
nmax=floor(tmax/dt)
! debug
nmax = 500000
!--- evolution
do n=1,nmax
!-- calcul des flux
call calcul_flux
!-- iteration en temps
call calcul_rhs
call euler_time_iteration
!-- mise a jour
vect_u=vect_unew
!-- calcul de rho,ux,uy,t
call calcul_rho_ux_uy_t
!-- mise a jour cl
call conditions_aux_limites
!-- mise à jour des quantités dérivées
call calcul_derived_quantities
!-- sauvegarde resultats (format vtk, lisible par Paraview)
if (mod(n,10000) == 0) then
write(*,*) 'Writing solution file at iteration ', n, '...'
call write_solution_vtk(n)
endif
enddo
end subroutine solver_kfvs