Skip to content

Commit 9dc194b

Browse files
committed
Remove transport coefficients from derived quantities
1 parent 0181456 commit 9dc194b

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

unstructured/adapt.f90

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ subroutine adapt_by_psi
233233
i_control%err_p_old = 0.
234234
n_control%err_i = 0.
235235
n_control%err_p_old = 0.
236+
call define_transport_coefficients(1)
236237
call derived_quantities(1)
237238
!ke_previous = ekin
238239
end subroutine adapt_by_psi
@@ -405,8 +406,10 @@ subroutine adapt_by_error
405406
n_control%err_p_old = 0.
406407
call reset_scalars
407408
if(eqsubtract.eq.1) then
408-
call derived_quantities(0)
409+
call define_transport_coefficients(0)
410+
call derived_quantities(0)
409411
end if
412+
call define_transport_coefficients(1)
410413
call derived_quantities(1)
411414
meshAdapted =1
412415
end if

unstructured/newpar.f90

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ Program Reducedquintic
275275
if(ntime.eq.0 .or. (ntime.eq.ntime0 .and. eqsubtract.eq.1)) then
276276

277277
if(eqsubtract.eq.1) then
278+
call define_transport_coefficients(0)
278279
call derived_quantities(0)
279280
if(iwrite_aux_vars.eq.1) call calculate_auxiliary_fields(0)
280281
end if
@@ -293,6 +294,7 @@ Program Reducedquintic
293294

294295
! Calculate all quantities derived from basic fields
295296
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297+
call define_transport_coefficients(1)
296298
call derived_quantities(1)
297299

298300

@@ -682,6 +684,7 @@ subroutine derived_quantities(ilin)
682684
use diagnostics
683685
use sparse
684686
use transport_coefficients
687+
use auxiliary_fields
685688

686689
implicit none
687690

@@ -692,10 +695,14 @@ subroutine derived_quantities(ilin)
692695

693696
vectype :: temp
694697

695-
! Density and temperature are now updated within define_transport_coefficients
696-
if(myrank.eq.0 .and. iprint.ge.2) print *, " transport coefficients"
697-
call define_transport_coefficients(ilin)
698-
698+
! Update density and temperature
699+
if(myrank.eq.0 .and. iprint.ge.2) print *, " Calculate electron density and temperatures"
700+
call calculate_ne(ilin, den_field(ilin), ne_field(ilin), eqsubtract)
701+
if(itemp.eq.0 .and. (numvar.eq.3 .or. ipres.gt.0) .and. imp_temp.eq.0) &
702+
call calculate_temperatures(ilin, te_field(ilin), ti_field(ilin), &
703+
pe_field(ilin), p_field(ilin), ne_field(ilin), &
704+
den_field(ilin),eqsubtract)
705+
699706
! Find lcfs
700707
! ~~~~~~~~~
701708
if(myrank.eq.0 .and. iprint.ge.2) print *, " finding lcfs"

0 commit comments

Comments
 (0)