diff --git a/src/modules/moduleSpecies.f90 b/src/modules/moduleSpecies.f90 index e1b552b..d039247 100644 --- a/src/modules/moduleSpecies.f90 +++ b/src/modules/moduleSpecies.f90 @@ -8,10 +8,10 @@ MODULE moduleSpecies TYPE:: particle REAL(8):: r(1:3) !Position REAL(8):: v(1:3) !Velocity - CLASS(speciesGeneric), POINTER:: species !Pointer to species associated with this particle - INTEGER:: cell !Index of element in which the particle is located. TODO: Make these pointers + CLASS(speciesGeneric), POINTER:: species !Pointer to particle's species + INTEGER:: cell !Index of element in which the particle is located TODO: Make these pointers INTEGER:: cellColl !Index of element in which the particle is located in the Collision Mesh - REAL(8):: Xi(1:3) !Logical coordinates of particle in element e_p. + REAL(8):: Xi(1:3) !Logical coordinates of particle in cell LOGICAL:: n_in !Flag that indicates if a particle is in the domain REAL(8):: weight=0.D0 !weight of particle @@ -23,24 +23,22 @@ MODULE moduleSpecies END TYPE particleArray - !Array of pointers for the species to be pushed - TYPE:: particleArray_pointer - TYPE(particle), POINTER, DIMENSION(:):: p + !Array of pointers for the particles to be pushed + TYPE:: particlePointer + TYPE(particle), POINTER:: p - END TYPE particleArray_pointer + END TYPE particlePointer - !Number of old particles - INTEGER, ALLOCATABLE, DIMENSION(:):: nPartOld - INTEGER:: nPartOldTotal - !Number of injected particles - INTEGER:: nPartInj !Arrays that contain the particles - TYPE(particle), ALLOCATABLE, TARGET, DIMENSION(:):: partInj !array of inject particles - TYPE(particleArray), ALLOCATABLE, TARGET, DIMENSION(:):: partOld !array of particles from previous iteration - TYPE(particleArray_pointer), ALLOCATABLE, DIMENSION(:):: particlesToPush !particles pushed in each iteration - - INTEGER:: nSpeciesToPush - INTEGER, ALLOCATABLE, DIMENSION(:):: nPartOldToPush + TYPE(particleArray), ALLOCATABLE, TARGET, DIMENSION(:):: particles !array of particles in the domain + TYPE(particle), ALLOCATABLE, TARGET, DIMENSION(:):: particlesInjection !array of inject particles + TYPE(particlePointer), ALLOCATABLE, DIMENSION(:):: particlesToPush !particles pushed in each iteration + !Integers to track number of particles in domain + INTEGER, ALLOCATABLE, DIMENSION(:):: nParticles + INTEGER:: nParticlesTotal + !Number of injected particles + INTEGER, ALLOCATABLE, DIMENSION(:):: nParticlesInject + INTEGER:: nPariclesInjectTotal !Generic species type TYPE, ABSTRACT:: speciesGeneric diff --git a/src/modules/output/moduleOutput.f90 b/src/modules/output/moduleOutput.f90 index 2cb94f6..16ed1b4 100644 --- a/src/modules/output/moduleOutput.f90 +++ b/src/modules/output/moduleOutput.f90 @@ -187,7 +187,7 @@ MODULE moduleOutput OPEN(20, file = path // folder // '/' // fileName, position = 'append', action = 'write') - WRITE (20, "(I10, I10, 7(ES20.6E3))") t, nPartOld, tStep, tPush, tReset, tColl, tCoul, tWeight, tEMField + WRITE (20, "(I10, I10, 7(ES20.6E3))") t, nParticlesTotal, tStep, tPush, tReset, tColl, tCoul, tWeight, tEMField CLOSE(20)