Skip to content

Commit d5f8cbc

Browse files
committed
update tracer interpolation
2 parents e00aeda + c810b64 commit d5f8cbc

File tree

71 files changed

+1050
-459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1050
-459
lines changed
-525 KB
Binary file not shown.
1.05 KB
Loading
-41.6 KB
Binary file not shown.
51.4 KB
Loading
689 KB
Loading

docs/src/man/AdvTwoD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The tracers can also be advected parallel by defining the maximum number of thre
107107

108108
Tracers can carry different properties such as absolute temperature or phase identification number (ID). For temperature, interpolation between centroids and tracer positions is required. Note that this implementation currently does not support fully coupled temperature-momentum simulations.
109109

110-
Alternatively, phase IDs (linked to properties like constant density or viscosity) can be advected to simulate compositional heterogeneity. Property interpolation is performed at vertices or centroids depending on the required context (e.g., viscosity for the momentum equations).
110+
Alternatively, phase IDs (linked to properties like constant density or viscosity) can be advected to simulate compositional heterogeneity. Property interpolation is performed at vertices or centroids depending on the required context (e.g., viscosity for the momentum equations). For the centroids, the extended centroid field must be used.
111111

112112
Caution is required when interpolating properties between the grid and tracers, especially when those properties influence the governing equations (e.g., viscosity in momentum conservation).
113113

docs/src/man/Ini.md

Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Initial Conditions
1+
# Specific Initialization
22

33
`GeoModBox.jl` includes several [routines](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/src/InitialCondition/2Dini.jl) or [structures](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/src/Structures.jl) to define certain parameters or initialize specific anomalies. The initial conditions can be specified for properties defined on their corresponding grid (i.e., temperature, velocity, or phase) or for tracers.
44

@@ -42,7 +42,7 @@ IniTemperature!(Ini.T,M,NC,D,x,y;Tb=P.Tbot,Ta=P.Ttop)
4242
## Initial Velocity
4343

4444
```julia
45-
IniVelocity!(type,D,VBC,NC,NV,Δ,M,x,y;ε=1e-15)
45+
IniVelocity!(type,D,VBC,NV,Δ,M,x,y;ε=1e-15)
4646
```
4747

4848
The following velocity configurations are currently supported:
@@ -57,7 +57,6 @@ The input parameters are:
5757
- type - Parameter defining the type (see above)
5858
- D - Structure or tuple containing the field arrays
5959
- VBC - Structure or tuple containing the velocity boundary conditions
60-
- NC - Structure or tuple containing the centroids parameter
6160
- NV - Structure or tuple containing the vertices parameter
6261
- Δ - Structure or tuple containing the grid resolution
6362
- M - Structure or tuple containing the geometry
@@ -121,7 +120,7 @@ The following steps are required to use tracers:
121120

122121
**1. Tracer initialization**
123122

124-
To initialize the tracers, one needs to define the number per cell, wanted noise, and what property should be advected. The remaining parameters are the general `tuples` or `structures` used in `GeoModBox.jl`.
123+
To initialize the tracers, one needs to define the number per cell, wanted noise, and what property should be advected. The tracer properties can be interpolated to the centroids or vertices using a bilinear interpoltion scheme. For the centroids, the extended centroid field must be used. The remaining parameters are the general `tuples` or `structures` used in `GeoModBox.jl`.
125124

126125
Following the definition of the required parameters for the tracer advection, the initial tracer position can be defined via the function
127126

@@ -151,26 +150,23 @@ To advect the temperature, the initialization is called, for example, like [here
151150

152151
```julia
153152
# Tracer Initialization ---
154-
nmx,nmy = 3,3 # tracer per cell in x and y direction
155-
noise = 1 # add noise to the initial position
156-
nmark = nmx*nmy*NC.x*NC.y # total number of tracers
157-
Aparam = :thermal # Property to be advected
158-
# Tuple required for the tracer count
153+
nmx,nmy = 3,3
154+
noise = 1
155+
nmark = nmx*nmy*NC.x*NC.y
156+
Aparam = :thermal
159157
MPC = (
160-
c = zeros(Float64,(NC.x,NC.y)), # per centroid
161-
v = zeros(Float64,(NV.x,NV.y)), # per vertices
162-
th = zeros(Float64,(nthreads(),NC.x,NC.y)), # per thread
163-
thv = zeros(Float64,(nthreads(),NV.x,NV.y)), # per thread
158+
c = zeros(Float64,(NC.x,NC.y)),
159+
v = zeros(Float64,(NV.x,NV.y)),
160+
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
161+
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
164162
)
165-
# Tuple for the tracer count and the weighting
166-
MPC1 = (
167-
PG_th = [similar(D.T) for _ = 1:nthreads()], # per thread
168-
PV_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
169-
wt_th = [similar(D.wt) for _ = 1:nthreads()], # per thread
170-
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
163+
MAVG = (
164+
PC_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
165+
PV_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
166+
wte_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
167+
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
171168
)
172-
MPC = merge(MPC,MPC1)
173-
# Function to initialize tracer distribution
169+
# MPC = merge(MPC,MPC1)
174170
Ma = IniTracer2D(Aparam,nmx,nmy,Δ,M,NC,noise,0,0)
175171
# RK4 weights ---
176172
rkw = 1.0/6.0*[1.0 2.0 2.0 1.0] # for averaging
@@ -179,7 +175,7 @@ rkv = 1.0/2.0*[1.0 1.0 2.0 2.0] # for time stepping
179175
@threads for k = 1:nmark
180176
Ma.T[k] = FromCtoM(D.T_ex, k, Ma, x, y, Δ, NC)
181177
end
182-
# Count tracer per cell ---
178+
# Count marker per cell ---
183179
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,1)
184180
```
185181

@@ -192,32 +188,32 @@ noise = 0
192188
nmark = nmx*nmy*NC.x*NC.y
193189
Aparam = :phase
194190
MPC = (
195-
c = zeros(Float64,(NC.x,NC.y)),
196-
v = zeros(Float64,(NV.x,NV.y)),
197-
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
198-
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
191+
c = zeros(Float64,(NC.x,NC.y)),
192+
v = zeros(Float64,(NV.x,NV.y)),
193+
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
194+
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
199195
)
200-
MPC1 = (
201-
PG_th = [similar(D.ρ) for _ = 1:nthreads()], # per thread
202-
PV_th = [similar(D.ηv) for _ = 1:nthreads()], # per thread
203-
wt_th = [similar(D.wt) for _ = 1:nthreads()], # per thread
204-
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
196+
MAVG = (
197+
PC_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
198+
PV_th = [similar(D.ηv) for _ = 1:nthreads()], # per thread
199+
wte_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
200+
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
205201
)
206-
MPC = merge(MPC,MPC1)
202+
# MPC = merge(MPC,MPC1)
207203
Ma = IniTracer2D(Aparam,nmx,nmy,Δ,M,NC,noise,Ini.p,phase)
208204
# RK4 weights ---
209205
rkw = 1.0/6.0*[1.0 2.0 2.0 1.0] # for averaging
210206
rkv = 1.0/2.0*[1.0 1.0 2.0 2.0] # for time stepping
211-
# Count tracer per cell ---
207+
# Count marker per cell ---
212208
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,1)
213-
# Interpolate from tracers to cell ---
214-
Markers2Cells(Ma,nmark,MPC.PG_th,D.ρ,MPC.wt_th,D.wt,x,y,Δ,Aparam,ρ)
215-
Markers2Cells(Ma,nmark,MPC.PG_th,D.p,MPC.wt_th,D.wt,x,y,Δ,Aparam,phase)
216-
Markers2Vertices(Ma,nmark,MPC.PV_th,D.ηv,MPC.wtv_th,D.wtv,x,y,Δ,Aparam,η)
217-
@. D.ηc = 0.25 * (D.ηv[1:end-1,1:end-1] +
218-
D.ηv[2:end-0,1:end-1] +
219-
D.ηv[1:end-1,2:end-0] +
220-
D.ηv[2:end-0,2:end-0])
209+
# Interpolate from markers to cell ---
210+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.ρ_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,ρ)
211+
D.ρ .= D.ρ_ex[2:end-1,2:end-1]
212+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.p_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,phase)
213+
D.p .= D.p_ex[2:end-1,2:end-1]
214+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.η_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,η)
215+
D.ηc .= D.η_ex[2:end-1,2:end-1]
216+
Markers2Vertices(Ma,nmark,MAVG.PV_th,D.ηv,MAVG.wtv_th,D.wtv,x,y,Δ,Aparam,η)
221217
```
222218

223219
**2. Tracer advection**
@@ -255,8 +251,8 @@ AdvectTracer2D(Ma,nmark,D,x,y,T.Δ[1],Δ,NC,rkw,rkv,1)
255251
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,i)
256252

257253
# Interpolate temperature from tracers to grid ---
258-
Markers2Cells(Ma,nmark,MPC.PG_th,D.T,MPC.wt_th,D.wt,x,y,Δ,Aparam,0)
259-
D.T_ex[2:end-1,2:end-1] .= D.T
254+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.T_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,0)
255+
D.T .= D.T_ex[2:end-1,2:end-1]
260256
```
261257

262258
The advection of the phase and the update of the corresponding grid parameters is called, for example, like [here](https://github.com/GeoSci-FFM/GeoModBox.jl/blob/main/examples/StokesEquation/2D/FallingBlockVarEta_DC.jl):
@@ -268,14 +264,14 @@ The advection of the phase and the update of the corresponding grid parameters i
268264
AdvectTracer2D(Ma,nmark,D,x,y,T.Δ[1],Δ,NC,rkw,rkv,1)
269265
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,it)
270266

271-
# Update grid parameters from tracers distributions ---
272-
Markers2Cells(Ma,nmark,MPC.PG_th,D.ρ,MPC.wt_th,D.wt,x,y,Δ,Aparam,ρ)
273-
Markers2Cells(Ma,nmark,MPC.PG_th,D.p,MPC.wt_th,D.wt,x,y,Δ,Aparam,phase)
274-
Markers2Vertices(Ma,nmark,MPC.PV_th,D.ηv,MPC.wtv_th,D.wtv,x,y,Δ,Aparam,η)
275-
@. D.ηc = 0.25 * (D.ηv[1:end-1,1:end-1] +
276-
D.ηv[2:end-0,1:end-1] +
277-
D.ηv[1:end-1,2:end-0] +
278-
D.ηv[2:end-0,2:end-0])
267+
# Interpolate phase from tracers to grid ---
268+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.ρ_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,ρ)
269+
D.ρ .= D.ρ_ex[2:end-1,2:end-1]
270+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.p_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,phase)
271+
D.p .= D.p_ex[2:end-1,2:end-1]
272+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.η_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,η)
273+
D.ηc .= D.η_ex[2:end-1,2:end-1]
274+
Markers2Vertices(Ma,nmark,MAVG.PV_th,D.ηv,MAVG.wtv_th,D.wtv,x,y,Δ,Aparam,η)
279275
```
280276

281277
>**Note:** The tracer distribution and interpolation of tracer properties to the centroids or vertices is a very helpful feature to initialize different, more complex model setups. This will be part of future implementations.

docs/src/man/examples/Advection2D.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ D = (
168168
vxc = zeros(Float64,(NC.x,NC.y)),
169169
vyc = zeros(Float64,(NC.x,NC.y)),
170170
vc = zeros(Float64,(NC.x,NC.y)),
171+
wte = zeros(Float64,(NC.x+2,NC.y+2)),
171172
wt = zeros(Float64,(NC.x,NC.y)),
172173
wtv = zeros(Float64,(NV...)),
173174
Tmax = [0.0],
@@ -220,7 +221,7 @@ In case tracer are required one needs to initialize them in the following. For m
220221
```Julia
221222
# Tracer Advection =================================================== #
222223
if FD.Method.Adv==:tracers
223-
# Tracer Initialization ---
224+
# Tracer Initialization ---
224225
nmx,nmy = 3,3
225226
noise = 1
226227
nmark = nmx*nmy*NC.x*NC.y
@@ -231,13 +232,12 @@ if FD.Method.Adv==:tracers
231232
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
232233
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
233234
)
234-
MPC1 = (
235-
PG_th = [similar(D.T) for _ = 1:nthreads()], # per thread
235+
MAVG = (
236+
PC_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
236237
PV_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
237-
wt_th = [similar(D.wt) for _ = 1:nthreads()], # per thread
238+
wte_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
238239
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
239240
)
240-
MPC = merge(MPC,MPC1)
241241
Ma = IniTracer2D(Aparam,nmx,nmy,Δ,M,NC,noise,0,0)
242242
# RK4 weights ---
243243
rkw = 1.0/6.0*[1.0 2.0 2.0 1.0] # for averaging
@@ -315,8 +315,8 @@ for i=2:nt
315315
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,i)
316316

317317
# Interpolate temperature from tracers to grid ---
318-
Markers2Cells(Ma,nmark,MPC.PG_th,D.T,MPC.wt_th,D.wt,x,y,Δ,Aparam,0)
319-
D.T_ex[2:end-1,2:end-1] .= D.T
318+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.T_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,0)
319+
D.T .= D.T_ex[2:end-1,2:end-1]
320320
end
321321

322322
display(string("ΔT = ",((maximum(filter(!isnan,D.T))-D.Tmax[1])/D.Tmax[1])*100))

docs/src/man/examples/AdvectionRestest2D.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ To enable visualization, the output path and filename for the animation are defi
167167
vyc = zeros(Float64,(NC.x,NC.y)),
168168
vc = zeros(Float64,(NC.x,NC.y)),
169169
wt = zeros(Float64,(NC.x,NC.y)),
170+
wte = zeros(Float64,(NC.x+2,NC.y+2)),
170171
wtv = zeros(Float64,(NV...)),
171172
Tmax = [0.0],
172173
Tmin = [0.0],
@@ -228,13 +229,13 @@ In case tracer are required one needs to initialize them in the following. For m
228229
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
229230
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
230231
)
231-
MPC1 = (
232-
PG_th = [similar(D.T) for _ = 1:nthreads()], # per thread
232+
MAVG = (
233+
PC_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
233234
PV_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
234-
wt_th = [similar(D.wt) for _ = 1:nthreads()], # per thread
235+
wte_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
235236
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
236237
)
237-
MPC = merge(MPC,MPC1)
238+
# MPC = merge(MPC,MPC1)
238239
Ma = IniTracer2D(Aparam,nmx,nmy,Δ,M,NC,noise,0,0)
239240
# RK4 weights ---
240241
rkw = 1.0/6.0*[1.0 2.0 2.0 1.0] # for averaging
@@ -312,8 +313,8 @@ Now, one can start the time loop and the advection.
312313
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,i)
313314

314315
# Interpolate temperature from tracers to grid ---
315-
Markers2Cells(Ma,nmark,MPC.PG_th,D.T,MPC.wt_th,D.wt,x,y,Δ,Aparam,0)
316-
D.T_ex[2:end-1,2:end-1] .= D.T
316+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.T_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,0)
317+
D.T .= D.T_ex[2:end-1,2:end-1]
317318
end
318319

319320
display(string("ΔT = ",((maximum(filter(!isnan,D.T))-D.Tmax[1])/D.Tmax[1])*100))

docs/src/man/examples/FallingBlockBenchmark.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ In the following, the data arrays are initialized.
204204
vyc = zeros(Float64,NC...),
205205
vc = zeros(Float64,NC...),
206206
wt = zeros(Float64,(NC.x,NC.y)),
207+
wte = zeros(Float64,(NC.x+2,NC.y+2)),
207208
wtv = zeros(Float64,(NV.x,NV.y)),
208209
ηc = zeros(Float64,NC...),
209210
ηv = zeros(Float64,NV...),
@@ -243,32 +244,32 @@ In case tracers are used, the tracers are initialized in the following. Alternat
243244
nmark = nmx*nmy*NC.x*NC.y
244245
Aparam = :phase
245246
MPC = (
246-
c = zeros(Float64,(NC.x,NC.y)),
247-
v = zeros(Float64,(NV.x,NV.y)),
248-
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
249-
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
247+
c = zeros(Float64,(NC.x,NC.y)),
248+
v = zeros(Float64,(NV.x,NV.y)),
249+
th = zeros(Float64,(nthreads(),NC.x,NC.y)),
250+
thv = zeros(Float64,(nthreads(),NV.x,NV.y)),
250251
)
251-
MPC1 = (
252-
PG_th = [similar(D.ρ) for _ = 1:nthreads()], # per thread
253-
PV_th = [similar(D.ηv) for _ = 1:nthreads()], # per thread
254-
wt_th = [similar(D.wt) for _ = 1:nthreads()], # per thread
255-
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
252+
MAVG = (
253+
PC_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
254+
PV_th = [similar(D.ηv) for _ = 1:nthreads()], # per thread
255+
wte_th = [similar(D.wte) for _ = 1:nthreads()], # per thread
256+
wtv_th = [similar(D.wtv) for _ = 1:nthreads()], # per thread
256257
)
257-
MPC = merge(MPC,MPC1)
258+
# MPC = merge(MPC,MPC1)
258259
Ma = IniTracer2D(Aparam,nmx,nmy,Δ,M,NC,noise,Ini.p,phase)
259260
# RK4 weights ---
260261
rkw = 1.0/6.0*[1.0 2.0 2.0 1.0] # for averaging
261262
rkv = 1.0/2.0*[1.0 1.0 2.0 2.0] # for time stepping
262263
# Count marker per cell ---
263264
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,1)
264265
# Interpolate from markers to cell ---
265-
Markers2Cells(Ma,nmark,MPC.PG_th,D.ρ,MPC.wt_th,D.wt,x,y,Δ,Aparam,ρ)
266-
Markers2Cells(Ma,nmark,MPC.PG_th,D.p,MPC.wt_th,D.wt,x,y,Δ,Aparam,phase)
267-
Markers2Vertices(Ma,nmark,MPC.PV_th,D.ηv,MPC.wtv_th,D.wtv,x,y,Δ,Aparam,η)
268-
@. D.ηc = 0.25 * (D.ηv[1:end-1,1:end-1] +
269-
D.ηv[2:end-0,1:end-1] +
270-
D.ηv[1:end-1,2:end-0] +
271-
D.ηv[2:end-0,2:end-0])
266+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.ρ_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,ρ)
267+
D.ρ .= D.ρ_ex[2:end-1,2:end-1]
268+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.p_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,phase)
269+
D.p .= D.p_ex[2:end-1,2:end-1]
270+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.η_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,η)
271+
D.ηc .= D.η_ex[2:end-1,2:end-1]
272+
Markers2Vertices(Ma,nmark,MAVG.PV_th,D.ηv,MAVG.wtv_th,D.wtv,x,y,Δ,Aparam,η)
272273
else
273274
# ----------------------------------------------------------- #
274275
# Initial Condition ========================================= #
@@ -471,13 +472,13 @@ In the following the advection is conducted. For more details on this, please re
471472
AdvectTracer2D(Ma,nmark,D,x,y,T.Δ[1],Δ,NC,rkw,rkv,1)
472473
CountMPC(Ma,nmark,MPC,M,x,y,Δ,NC,NV,it)
473474
# Interpolate phase from tracers to grid ---
474-
Markers2Cells(Ma,nmark,MPC.PG_th,D.ρ,MPC.wt_th,D.wt,x,y,Δ,Aparam,ρ)
475-
Markers2Cells(Ma,nmark,MPC.PG_th,D.p,MPC.wt_th,D.wt,x,y,Δ,Aparam,phase)
476-
Markers2Vertices(Ma,nmark,MPC.PV_th,D.ηv,MPC.wtv_th,D.wtv,x,y,Δ,Aparam,η)
477-
@. D.ηc = 0.25 * (D.ηv[1:end-1,1:end-1] +
478-
D.ηv[2:end-0,1:end-1] +
479-
D.ηv[1:end-1,2:end-0] +
480-
D.ηv[2:end-0,2:end-0])
475+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.ρ_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,ρ)
476+
D.ρ .= D.ρ_ex[2:end-1,2:end-1]
477+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.p_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,phase)
478+
D.p .= D.p_ex[2:end-1,2:end-1]
479+
Markers2Cells(Ma,nmark,MAVG.PC_th,D.η_ex,MAVG.wte_th,D.wte,x,y,Δ,Aparam,η)
480+
D.ηc .= D.η_ex[2:end-1,2:end-1]
481+
Markers2Vertices(Ma,nmark,MAVG.PV_th,D.ηv,MAVG.wtv_th,D.wtv,x,y,Δ,Aparam,η)
481482
end
482483
if FD.Method.Adv!=:tracers
483484
# --- Vertices -

0 commit comments

Comments
 (0)