First implementation of Non-Analogue Scheme using volume weighting. The

scheme to use is chosen in the input file. Additional schemes could be
added easily.
This commit is contained in:
Jorge Gonzalez 2020-12-03 08:57:34 +01:00
commit 7859a73274
8 changed files with 151 additions and 54 deletions

View file

@ -1,6 +1,7 @@
!Contains the information about species (particles)
MODULE moduleSpecies
USE moduleCaseParam
USE OMP_LIB
IMPLICIT NONE
TYPE, ABSTRACT:: speciesGeneric
@ -44,9 +45,11 @@ MODULE moduleSpecies
!Arrays that contain the particles
TYPE(particle), ALLOCATABLE, DIMENSION(:), TARGET:: partOld !array of particles from previous iteration
TYPE(particle), ALLOCATABLE, DIMENSION(:), TARGET:: partInj !array of inject particles
INTEGER(KIND=OMP_LOCK_KIND):: lockNAScheme !Lock for the NA list of particles
CONTAINS
FUNCTION speciesName2Index(speciesName) RESULT(sp)
USE moduleErrors
IMPLICIT NONE
CHARACTER(:), ALLOCATABLE:: speciesName
@ -60,7 +63,8 @@ MODULE moduleSpecies
EXIT
END IF
END DO
!TODO: add error handling when species not found
!If no species is found, call a critical error
IF (sp == 0) CALL criticalError('Species ' // speciesName // ' not found.', 'speciesName2Index')
END FUNCTION speciesName2Index