Clean-up!

Trying to reduce warnings and unused variables in the code. This should
not be in this branch.
This commit is contained in:
Jorge Gonzalez 2024-07-11 15:55:02 +02:00
commit bc8f205287
8 changed files with 23 additions and 22 deletions

View file

@ -308,7 +308,7 @@ MODULE moduleInput
LOGICAL:: found
CHARACTER(:), ALLOCATABLE:: object
INTEGER:: nInitial
INTEGER:: i, j, p, e
INTEGER:: i, p, e
CHARACTER(LEN=2):: iString
CHARACTER(:), ALLOCATABLE:: spName
INTEGER:: sp
@ -923,7 +923,6 @@ MODULE moduleInput
LOGICAL:: found
CHARACTER(:), ALLOCATABLE:: meshFormat, meshFile
REAL(8):: volume
CHARACTER(:), ALLOCATABLE:: meshFileVTU !Temporary to test VTU OUTPUT
object = 'geometry'

View file

@ -582,8 +582,6 @@ MODULE moduleMesh2DCyl
REAL(8):: detJ
REAL(8):: fPsi(1:4)
REAL(8):: dPsi(1:3, 1:4), pDer(1:3, 1:3)
REAL(8):: corrUp, corrDown
REAL(8):: dZ, r2, r1
self%volume = 0.D0

View file

@ -108,6 +108,7 @@ MODULE moduleMeshInputGmsh2
READ(10, *) totalNumElem
!Count edges and volume elements
numEdges = 0
SELECT TYPE(self)
TYPE IS(meshParticles)
self%numEdges = 0
@ -342,7 +343,7 @@ MODULE moduleMeshInputGmsh2
DO i = 1, numNodes
!Reads the density
READ(10, *), e, density(i)
READ(10, *) e, density(i)
END DO
@ -353,7 +354,7 @@ MODULE moduleMeshInputGmsh2
DO i = 1, numNodes
!Reads the velocity
READ(10, *), e, velocity(i, 1:3)
READ(10, *) e, velocity(i, 1:3)
END DO

View file

@ -275,6 +275,7 @@ MODULE moduleMeshInputVTU
END DO
!Count the number of edges
numEdges = 0
SELECT CASE(self%dimen)
CASE(3)
!Edges are triangles, type 5 in VTK

View file

@ -315,9 +315,8 @@ MODULE moduleMeshOutputVTU
CLASS(meshParticles), INTENT(in):: self
INTEGER, INTENT(in):: t
INTEGER:: n, i, fileID
INTEGER:: i, fileID
CHARACTER(:), ALLOCATABLE:: fileName, fileNameCollection
TYPE(outputFormat):: output(1:self%numNodes)
fileID = 60
@ -352,10 +351,9 @@ MODULE moduleMeshOutputVTU
CLASS(meshGeneric), INTENT(in):: self
INTEGER, INTENT(in):: t
INTEGER:: n, i, fileID
INTEGER:: fileID
CHARACTER(:), ALLOCATABLE:: fileName, fileNameCollection
CHARACTER (LEN=iterationDigits):: tstring
TYPE(outputFormat):: output(1:self%numNodes)
fileID = 62
@ -424,9 +422,8 @@ MODULE moduleMeshOutputVTU
IMPLICIT NONE
CLASS(meshParticles), INTENT(in):: self
INTEGER:: n, i, fileIDMean, fileIDDeviation
INTEGER:: i, fileIDMean, fileIDDeviation
CHARACTER(:), ALLOCATABLE:: fileNameMean, fileNameDeviation
TYPE(outputFormat):: output(1:self%numNodes)
fileIDMean = 66
fileIDDeviation = 67

View file

@ -1025,6 +1025,9 @@ MODULE moduleMesh
ALLOCATE(deltaV_ij(1:cell%listPart_in(i)%amount, 1:3))
ALLOCATE(p_ij(1:cell%listPart_in(i)%amount, 1:3))
ALLOCATE(mass_ij(1:cell%listPart_in(i)%amount))
deltaV_ij = 0.D0
p_ij = 0.D0
mass_ij = 0.D0
!Loop over particles of species_i
partTemp => cell%listPart_in(i)%head
p = 1
@ -1109,6 +1112,9 @@ MODULE moduleMesh
ALLOCATE(deltaV_ji(1:cell%listPart_in(j)%amount, 1:3))
ALLOCATE(p_ji(1:cell%listPart_in(j)%amount, 1:3))
ALLOCATE(mass_ji(1:cell%listPart_in(j)%amount))
deltaV_ji = 0.D0
p_ji = 0.D0
mass_ji = 0.D0
!Loop over particles of species_j
partTemp => cell%listPart_in(j)%head
p = 1

View file

@ -151,28 +151,29 @@ MODULE moduleInject
! Information about species and flux
self%species => species(sp)%obj
tauInject = tau(self%species%n)
! Convert units
SELECT CASE(units)
CASE ("sccm")
!Standard cubic centimeter per minute
fluxPerStep = flow*sccm2atomPerS*tauInject*ti_ref
fluxPerStep = flow*sccm2atomPerS
CASE ("A")
!Current in Ampers
fluxPerStep = flow*tauInject*ti_ref/qe
fluxPerStep = flow/qe
CASE ("Am2")
!Input current in Ampers per square meter
fluxPerStep = flow*tauInject*ti_ref*self%surface*L_ref**2/qe
fluxPerStep = flow*self%surface*L_ref**2/qe
CASE ("part/s")
!Input current in Ampers
fluxPerStep = flow*tauInject*ti_ref
fluxPerStep = flow
CASE DEFAULT
CALL criticalError("No support for units: " // units, 'initInject')
END SELECT
fluxPerStep = fluxPerStep / self%surface
fluxPerStep = fluxPerStep * tauInject * ti_ref / self%surface
!Assign particles per edge
IF (particlesPerEdge > 0) THEN
@ -307,16 +308,13 @@ MODULE moduleInject
USE moduleMesh
USE moduleRandom
USE moduleErrors
USE moduleRefParam, ONLY: L_ref
IMPLICIT NONE
CLASS(injectGeneric), INTENT(in):: self
INTEGER:: randomX
INTEGER, SAVE:: nMin, nMax !Min and Max index in partInj array
INTEGER, SAVE:: nMin
INTEGER:: i, e
INTEGER:: n, sp
CLASS(meshEdge), POINTER:: randomEdge
INTEGER:: particlesPerEdge
REAL(8):: direction(1:3)
!Insert particles

View file

@ -30,6 +30,7 @@ MODULE moduleEM
INTEGER, ALLOCATABLE:: nodes(:)
INTEGER:: n
nNodes = 1
nNodes = edge%nNodes
nodes = edge%getNodes(nNodes)