Skip to content

Commit

Permalink
Renamed DgMomentCalc to DistFuncMomentDG
Browse files Browse the repository at this point in the history
  • Loading branch information
kltrbrds committed Feb 22, 2023
1 parent 0e3448a commit bd853e4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion App/Sources/VmSteadyStateSource.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function VmSteadyStateSource:setConfGrid(grid) self.confGrid = grid end

function VmSteadyStateSource:createSolver(mySpecies, extField)

self.dgIntegratedMoms = Updater.DgMomentCalc {
self.dgIntegratedMoms = Updater.DistFuncMomentDG {
onGrid = mySpecies.grid, confBasis = mySpecies.confBasis,
phaseBasis = mySpecies.basis, moment = "M0",
isIntegrated = true,
Expand Down
30 changes: 15 additions & 15 deletions Updater/DgMomentCalc.lua → Updater/DistFuncMomentDG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ void gkyl_dg_updater_moment_release(struct gkyl_dg_updater_moment* moment);
]]

-- Moment updater object
local DgMomentCalc = Proto(UpdaterBase)
local DistFuncMomentDG = Proto(UpdaterBase)

function DgMomentCalc:init(tbl)
DgMomentCalc.super.init(self, tbl) -- Setup base object.
function DistFuncMomentDG:init(tbl)
DistFuncMomentDG.super.init(self, tbl) -- Setup base object.

self._onGrid = assert(tbl.onGrid, "Updater.DgMomentCalc: Must specify grid to use with 'onGrid'.")
self._confBasis = assert(tbl.confBasis, "Updater.DgMomentCalc: Must specify configuration space basis with 'confBasis'.")
self._phaseBasis = assert(tbl.phaseBasis, "Updater.DgMomentCalc: Must specify phase space basis with 'confBasis'.")
self._onGrid = assert(tbl.onGrid, "Updater.DistFuncMomentDG: Must specify grid to use with 'onGrid'.")
self._confBasis = assert(tbl.confBasis, "Updater.DistFuncMomentDG: Must specify configuration space basis with 'confBasis'.")
self._phaseBasis = assert(tbl.phaseBasis, "Updater.DistFuncMomentDG: Must specify phase space basis with 'confBasis'.")
self._modelId = "GKYL_MODEL_DEFAULT"
self._moment = assert(tbl.moment, "Updater.DgMomentCalc: Must specify moment type with 'moment'.")
self._isIntegrated = assert(tbl.isIntegrated, "Updater.DgMomentCalc: Must specify if integrated moment with 'isIntegrated'.")
self._moment = assert(tbl.moment, "Updater.DistFuncMomentDG: Must specify moment type with 'moment'.")
self._isIntegrated = assert(tbl.isIntegrated, "Updater.DistFuncMomentDG: Must specify if integrated moment with 'isIntegrated'.")

local useGPU = xsys.pickBool(tbl.useDevice, GKYL_USE_GPU)

Expand All @@ -110,19 +110,19 @@ function DgMomentCalc:init(tbl)
end

-- Advance method.
function DgMomentCalc:_advance(tCurr, inFld, outFld)
local qIn = assert(inFld[1], "DgMomentCalc.advance: Must specify an input field")
local mOut = assert(outFld[1], "DgMomentCalc.advance: Must specify an output field")
function DistFuncMomentDG:_advance(tCurr, inFld, outFld)
local qIn = assert(inFld[1], "DistFuncMomentDG.advance: Must specify an input field")
local mOut = assert(outFld[1], "DistFuncMomentDG.advance: Must specify an output field")

local phaseRange = qIn:localExtRange()
local confRange = mOut:localExtRange()

ffiC.gkyl_dg_updater_moment_advance(self._zero, phaseRange, confRange, nil, nil, nil, nil, nil, nil, qIn._zero, mOut._zero)
end

function DgMomentCalc:_advanceOnDevice(tCurr, inFld, outFld)
local qIn = assert(inFld[1], "DgMomentCalc.advance: Must specify an input field")
local mOut = assert(outFld[1], "DgMomentCalc.advance: Must specify an output field")
function DistFuncMomentDG:_advanceOnDevice(tCurr, inFld, outFld)
local qIn = assert(inFld[1], "DistFuncMomentDG.advance: Must specify an input field")
local mOut = assert(outFld[1], "DistFuncMomentDG.advance: Must specify an output field")

local phaseRange = qIn:localExtRange()
local confRange = mOut:localExtRange()
Expand All @@ -131,4 +131,4 @@ function DgMomentCalc:_advanceOnDevice(tCurr, inFld, outFld)
end


return DgMomentCalc
return DistFuncMomentDG
4 changes: 2 additions & 2 deletions Updater/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local CartFieldInterpolate = require "Updater.CartFieldInterpolate"
local ChargeExchange = require "Updater.ChargeExchange"
local ConfToPhase = require "Updater.ConfToPhase"
local CrossPrimMoments = require "Updater.CrossPrimMoments"
local DgMomentCalc = require "Updater.DgMomentCalc"
local DistFuncMomentDG = require "Updater.DistFuncMomentDG"
local DiscontGenPoisson = require "Updater.DiscontGenPoisson"
local DiscontPoisson = require "Updater.DiscontPoisson"
local DistFuncMomentCalc = require "Updater.DistFuncMomentCalc"
Expand Down Expand Up @@ -79,7 +79,7 @@ return {
ChargeExchange = ChargeExchange,
ConfToPhase = ConfToPhase,
CrossPrimMoments = CrossPrimMoments,
DgMomentCalc = DgMomentCalc,
DistFuncMomentDG = DistFuncMomentDG,
DiscontGenPoisson = DiscontGenPoisson,
DiscontPoisson = DiscontPoisson,
DistFuncMomentCalc = DistFuncMomentCalc,
Expand Down

0 comments on commit bd853e4

Please sign in to comment.