Implementation of 0D dummy pusher and modifications to input parameters

to allow 0D runs.
This commit is contained in:
Jorge Gonzalez 2021-04-13 17:40:33 +02:00
commit f1d74d954c
4 changed files with 29 additions and 1 deletions

View file

@ -31,6 +31,7 @@ MODULE moduleMesh0D
!NODE FUNCTIONS
!Init node
SUBROUTINE initNode0D(self, n, r)
USE moduleSpecies
IMPLICIT NONE
CLASS(meshNode0D), INTENT(out):: self
@ -39,6 +40,8 @@ MODULE moduleMesh0D
self%n = n
ALLOCATE(self%output(1:nSpecies))
END SUBROUTINE initNode0D
!Get node coordinates
@ -81,6 +84,10 @@ MODULE moduleMesh0D
CLASS(meshVol0D), INTENT(in):: self
INTEGER, ALLOCATABLE:: n(:)
ALLOCATE(n(1:1))
n = self%n1%n
END FUNCTION getNodes0D
FUNCTION randPos0D(self) RESULT(r)

View file

@ -714,6 +714,7 @@ MODULE moduleInput
SUBROUTINE readGeometry(config)
USE moduleMesh
USE moduleMeshInputGmsh2, ONLY: initGmsh2
USE moduleMeshInput0D, ONLY: init0D
USE moduleMesh3DCart, ONLY: connectMesh3DCart
USE moduleMesh2DCyl, ONLY: connectMesh2DCyl
USE moduleMesh2DCart, ONLY: connectMesh2DCart
@ -744,6 +745,9 @@ MODULE moduleInput
CALL initGmsh2(mesh)
IF (doubleMesh) CALL initGmsh2(meshColl)
CASE ("0D")
CALL init0D(mesh)
CASE DEFAULT
CALL criticalError("Mesh format " // meshFormat // " not recogniced", "readGeometry")

View file

@ -102,6 +102,9 @@ MODULE moduleSolver
CASE('1DRadCharged')
self%pushParticle => push1DRadCharged
CASE('0D')
self%pushParticle => push0D
CASE DEFAULT
CALL criticalError('Pusher ' // pusherType // ' not found','initPusher')
@ -483,6 +486,17 @@ MODULE moduleSolver
END SUBROUTINE push1DRadCharged
!Dummy pusher for 0D geometry
PURE SUBROUTINE push0D(part, tauIn)
USE moduleSpecies
USE moduleEM
IMPLICIT NONE
TYPE(particle), INTENT(inout):: part
REAL(8), INTENT(in):: tauIn
END SUBROUTINE push0D
SUBROUTINE doReset()
USE moduleSpecies
USE moduleMesh