mirror of
https://github.com/JHUAPL/kaiju.git
synced 2026-01-09 18:57:53 -05:00
Exposing option to smooth bvol and electric potential before gradient calculation in xml
This commit is contained in:
@@ -70,6 +70,7 @@ module raijudefs
|
||||
real(rp), parameter :: def_cfl = 0.3
|
||||
real(rp), parameter :: cflMax = 0.3
|
||||
logical, parameter :: def_doUseVelLRs = .true.
|
||||
logical, parameter :: def_doSmoothGrads = .true.
|
||||
|
||||
! Domain limits
|
||||
! Buffer not allowed beyond min of maxTail and maxSun
|
||||
|
||||
@@ -226,6 +226,8 @@ module raijutypes
|
||||
!! For debug
|
||||
logical :: writeGhosts
|
||||
!! For debug
|
||||
logical :: doSmoothGrads
|
||||
!! Whether or not we smooth variables (bvol and electric potential) before taking gradients
|
||||
logical :: doClockConsoleOut
|
||||
!! If we are driving, output clock info
|
||||
logical :: doOutput_potGrads
|
||||
|
||||
@@ -264,7 +264,7 @@ module raijuPreAdvancer
|
||||
|
||||
associate(sh=>Grid%shGrid)
|
||||
! Gauss-Green calculation of cell-averaged gradients
|
||||
call potExB(Grid%shGrid, State, pExB, doSmoothO=.true., isGCornerO=isGCorner) ! [V]
|
||||
call potExB(Grid%shGrid, State, pExB, doSmoothO=Model%doSmoothGrads, isGCornerO=isGCorner) ! [V]
|
||||
call potCorot(Model%planet, Grid%shGrid, pCorot, Model%doGeoCorot) ! [V]
|
||||
call calcGradIJ_cc(Model%planet%rp_m, Grid, isGCorner, pExB , State%gradPotE_cc , doLimO=.true. ) ! [V/m]
|
||||
call calcGradIJ_cc(Model%planet%rp_m, Grid, isGCorner, pCorot, State%gradPotCorot_cc, doLimO=.false.) ! [V/m]
|
||||
@@ -273,7 +273,7 @@ module raijuPreAdvancer
|
||||
! lambda is constant, so just need grad(V^(-2/3) )
|
||||
call calcGradVM_cc(Model%planet%rp_m, Model%planet%ri_m, Model%planet%magMoment, &
|
||||
Grid, isGCorner, State%bvol, State%gradVM_cc, &
|
||||
doSmoothO=.true., doLimO=.true.)
|
||||
doSmoothO=Model%doSmoothGrads, doLimO=.true.)
|
||||
end associate
|
||||
|
||||
end subroutine calcPotGrads_cc
|
||||
|
||||
@@ -175,6 +175,7 @@ module raijustarter
|
||||
Model%activeDomRad = abs(Model%activeDomRad)
|
||||
|
||||
!---Solver ---!
|
||||
call iXML%Set_Val(Model%doSmoothGrads,'sim/doSmoothGrads',def_doSmoothGrads)
|
||||
call iXML%Set_Val(Model%doUseVelLRs,'sim/useVelLRs',def_doUseVelLRs)
|
||||
call iXML%Set_Val(Model%maxItersPerSec,'sim/maxIter',def_maxItersPerSec)
|
||||
call iXML%Set_Val(Model%maxOrder,'sim/maxOrder',7)
|
||||
|
||||
Reference in New Issue
Block a user