MPI-AMRVAC 3.2
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
Loading...
Searching...
No Matches
mod_physicaldata.t
Go to the documentation of this file.
2 implicit none
3 save
4
5 type state
6 !> Variables, normally cell center conservative values
7 double precision, dimension(:^D&,:), allocatable :: w
8 !> Variables, cell face values
9 double precision, dimension(:^D&,:), allocatable :: ws
10 !> Variables, cell edge values
11 double precision, dimension(:^D&,:), allocatable :: we
12 !> Variables, cell corner values
13 double precision, dimension(:^D&,:), allocatable :: wc
14 !> extra variables do not need ghost cell and equation flux
15 double precision, dimension(:^D&,:), pointer :: wextra=>null()
16 !> debug scratch: arbitrary intermediate fields captured via debug_store,
17 !> flushed to a standalone .dat by save_wdebug (see mod_input_output)
18 double precision, dimension(:^D&,:), allocatable :: wdebug
19 !> Time-independent magnetic field at cell center and cell interface
20 double precision, dimension(:^D&,:,:), pointer :: b0=>null()
21 !> Time-independent electric current density at cell center
22 double precision, dimension(:^D&,:), pointer :: j0=>null()
23 !> Time-independent equi vars (B0 is not into this array)
24 double precision, dimension(:^D&,:,:), pointer :: equi_vars=>null()
25 !> Cell-center positions
26 double precision, dimension(:^D&,:), pointer :: x=>null()
27 !> Cell sizes in coordinate units
28 double precision, dimension(:^D&,:), pointer :: dx=>null()
29 !> Cell local timesteps
30 double precision, dimension(:^D&), pointer :: dt=>null()
31 !> Cell sizes at cell center in length unit
32 double precision, dimension(:^D&,:), pointer :: ds=>null()
33 !> Cell sizes at cell face in length unit
34 double precision, dimension(:^D&,:), pointer :: dsc=>null()
35 !> Volumes of a cell
36 double precision, dimension(:^D&), pointer :: dvolume=>null()
37 !> Areas of cell-center surfaces
38 double precision, dimension(:^D&,:), pointer :: surface=>null()
39 !> Areas of cell-face surfaces
40 double precision, dimension(:^D&,:), pointer :: surfacec=>null()
41 !> special values for a block
42 double precision, dimension(:), pointer :: special_values=>null()
43 !> ID of a grid block
44 integer :: igrid=-1
45 !> index range of block array in cell centers
46 integer :: ixg^l
47 !> index range of block array in cell faces
48 integer :: ixgs^l
49 !> level of AMR
50 integer :: level
51 !> If it face a physical boundary
52 logical, dimension(:), pointer :: is_physical_boundary(:) =>null()
53 end type state
54
55{^nooned
57 !> Variables, normally center
58 double precision, dimension(:^DE&,:), allocatable :: w
59 !> Variables for the cornerpositions on the slice
60 double precision, dimension(:^DE&,:), allocatable :: wc
61 !> Variables, normally center, one level coarser representative
62 double precision, dimension(:^DE&,:), allocatable :: wcoarse
63 !> Cell-center positions
64 double precision, dimension(:^DE&,:), allocatable :: x
65 !> Corner positions on the slice
66 double precision, dimension(:^DE&,:), allocatable :: xc
67 !> Cell-center positions, one level coarser representative
68 double precision, dimension(:^DE&,:), allocatable :: xcoarse
69 !> Cell sizes
70 double precision, dimension(:^DE&,:), allocatable :: dx
71 !> Cell sizes, one level coarser
72 double precision, dimension(:^D&,:), allocatable :: dxcoarse
73 !> Cell sizes in length unit
74 double precision, dimension(:^D&,:), allocatable :: ds
75 !> Volumes of a cell
76 double precision, dimension(:^DE&), allocatable :: dvolume
77 !> Volumes of a cell, one level coarser representative
78 double precision, dimension(:^DE&), allocatable :: dvolumecoarse
79 !> Areas of cell-center surfaces
80 double precision, dimension(:^DE&,:), allocatable :: surface
81 !> Areas of cell-face surfaces
82 double precision, dimension(:^DE&,:), allocatable :: surfacec
83 !> ID of a grid block
84 integer :: igrid=-1
85 end type state_sub
86}
87{^ifoned
88 type state_sub
89 !> Variables, normally center
90 double precision, dimension(:), allocatable :: w
91 !> Variables for the cornerpositions on the slice
92 double precision, dimension(:), allocatable :: wc
93 !> Variables, normally center, one level coarser representative
94 double precision, dimension(:), allocatable :: wcoarse
95 !> Cell-center positions
96 double precision, dimension(:), allocatable :: x
97 !> Corner positions on the slice
98 double precision, dimension(:), allocatable :: xc
99 !> Cell-center positions, one level coarser representative
100 double precision, dimension(:), allocatable :: xcoarse
101 !> ID of a grid block
102 integer :: igrid=-1
103 end type state_sub
104}
106 !> Variables new state
107 double precision, dimension(:^D&,:), allocatable :: w
108 !> Variables old state
109 double precision, dimension(:^D&,:), allocatable :: wold
110 end type grid_field
111 !> buffer for pole boundary
113
114 !> --- debug field dump (flushed by save_wdebug in mod_input_output) ---
115 !> when .true., intermediate fields captured in ps(:)%wdebug are written out
116 logical :: wdebug_on = .false.
117 !> number of debug slots allocated in ps(:)%wdebug
118 integer :: n_wdebug = 0
119
120 !> array of physical states for all blocks on my processor
121 type(state), dimension(:), allocatable, target :: ps
122 !> array of physical states, temp 1 for multi-step time integrator
123 type(state), dimension(:), allocatable, target :: ps1
124 !> array of physical states, temp 2 for multi-step time integrator
125 type(state), dimension(:), allocatable, target :: ps2
126 !> array of physical states, temp 3 for multi-step time integrator
127 type(state), dimension(:), allocatable, target :: ps3
128 !> array of physical states, temp 4 for multi-step time integrator
129 type(state), dimension(:), allocatable, target :: ps4
130 !> array of physical blocks, one level coarser representative
131 type(state), dimension(:), allocatable, target :: psc
132
133 !> array of physical blocks in reduced dimension
134 type(state_sub), dimension(:), allocatable, target :: ps_sub
135
136{^ifoned
137 double precision, dimension(:), allocatable :: collapseddata
138}
139{^nooned
140 double precision, dimension(:^DE&,:), allocatable :: collapseddata
141}
142 !> array of physical blocks of meshed fields for particles
143 type(grid_field), dimension(:), allocatable, target :: gridvars
144
145 !> velocities store for constrained transport
147 double precision, dimension(:^D&,:), allocatable :: vnorm,cbarmin,cbarmax
148 double precision, dimension(:^D&,:,:), allocatable :: vbarc,vbarlc,vbarrc
149 end type ct_velocity
150
151end module mod_physicaldata
type(state), dimension(:), allocatable, target ps4
array of physical states, temp 4 for multi-step time integrator
type(state_sub), dimension(:), allocatable, target ps_sub
array of physical blocks in reduced dimension
type(grid_field), dimension(:), allocatable, target gridvars
array of physical blocks of meshed fields for particles
type(state), dimension(:), allocatable, target ps2
array of physical states, temp 2 for multi-step time integrator
type(state), dimension(:), allocatable, target ps
array of physical states for all blocks on my processor
type(state), dimension(:), allocatable, target psc
array of physical blocks, one level coarser representative
integer n_wdebug
number of debug slots allocated in ps(:)wdebug
type(state), dimension(:), allocatable, target ps1
array of physical states, temp 1 for multi-step time integrator
type(state) pole_buf
buffer for pole boundary
double precision, dimension(:^de &,:), allocatable collapseddata
logical wdebug_on
— debug field dump (flushed by save_wdebug in mod_input_output) — when .true., intermediate fields ca...
type(state), dimension(:), allocatable, target ps3
array of physical states, temp 3 for multi-step time integrator
velocities store for constrained transport