NOT WORKING
I need to fix something in another place and make some test, so this commit does not comile.
This commit is contained in:
parent
286e858d66
commit
0c49723848
2 changed files with 17 additions and 19 deletions
|
|
@ -8,10 +8,10 @@ MODULE moduleSpecies
|
||||||
TYPE:: particle
|
TYPE:: particle
|
||||||
REAL(8):: r(1:3) !Position
|
REAL(8):: r(1:3) !Position
|
||||||
REAL(8):: v(1:3) !Velocity
|
REAL(8):: v(1:3) !Velocity
|
||||||
CLASS(speciesGeneric), POINTER:: species !Pointer to species associated with this particle
|
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:: 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
|
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
|
LOGICAL:: n_in !Flag that indicates if a particle is in the domain
|
||||||
REAL(8):: weight=0.D0 !weight of particle
|
REAL(8):: weight=0.D0 !weight of particle
|
||||||
|
|
||||||
|
|
@ -23,24 +23,22 @@ MODULE moduleSpecies
|
||||||
|
|
||||||
END TYPE particleArray
|
END TYPE particleArray
|
||||||
|
|
||||||
!Array of pointers for the species to be pushed
|
!Array of pointers for the particles to be pushed
|
||||||
TYPE:: particleArray_pointer
|
TYPE:: particlePointer
|
||||||
TYPE(particle), POINTER, DIMENSION(:):: p
|
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
|
!Arrays that contain the particles
|
||||||
TYPE(particle), ALLOCATABLE, TARGET, DIMENSION(:):: partInj !array of inject particles
|
TYPE(particleArray), ALLOCATABLE, TARGET, DIMENSION(:):: particles !array of particles in the domain
|
||||||
TYPE(particleArray), ALLOCATABLE, TARGET, DIMENSION(:):: partOld !array of particles from previous iteration
|
TYPE(particle), ALLOCATABLE, TARGET, DIMENSION(:):: particlesInjection !array of inject particles
|
||||||
TYPE(particleArray_pointer), ALLOCATABLE, DIMENSION(:):: particlesToPush !particles pushed in each iteration
|
TYPE(particlePointer), ALLOCATABLE, DIMENSION(:):: particlesToPush !particles pushed in each iteration
|
||||||
|
!Integers to track number of particles in domain
|
||||||
INTEGER:: nSpeciesToPush
|
INTEGER, ALLOCATABLE, DIMENSION(:):: nParticles
|
||||||
INTEGER, ALLOCATABLE, DIMENSION(:):: nPartOldToPush
|
INTEGER:: nParticlesTotal
|
||||||
|
!Number of injected particles
|
||||||
|
INTEGER, ALLOCATABLE, DIMENSION(:):: nParticlesInject
|
||||||
|
INTEGER:: nPariclesInjectTotal
|
||||||
|
|
||||||
!Generic species type
|
!Generic species type
|
||||||
TYPE, ABSTRACT:: speciesGeneric
|
TYPE, ABSTRACT:: speciesGeneric
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ MODULE moduleOutput
|
||||||
|
|
||||||
OPEN(20, file = path // folder // '/' // fileName, position = 'append', action = 'write')
|
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)
|
CLOSE(20)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue