The electric field from a triangular element is incorrect. Issue with

directional derivative depending on the definition of first node. Trying
to solve it with searching for the right first node but it is very
difficult. A solution is required to allow triangular meshes in charged
simulations.
This commit is contained in:
Jorge Gonzalez 2020-11-26 09:04:26 +01:00
commit 075530e967
11 changed files with 1028 additions and 440 deletions

View file

@ -1,94 +0,0 @@
! FPAKC main program
PROGRAM FPAKC
USE moduleInput
USE moduleErrors
USE OMP_LIB
USE moduleInject
USE moduleSolver
USE moduleOutput
USE moduleCompTime
USE moduleMesh
IMPLICIT NONE
! t = time step
INTEGER:: t = 0
! arg1 = Input argument 1 (input file)
CHARACTER(200):: arg1
! inputFile = path+name of input file
CHARACTER(:), ALLOCATABLE:: inputFile
tStep = omp_get_wtime()
!Gets the input file
CALL getarg(1, arg1)
inputFile = TRIM(arg1)
!If no input file is declared, a critical error is called
IF (inputFile == "") CALL criticalError("No input file provided", "PPartiC")
!Reads the json configuration file
CALL readConfig(inputFile)
CALL verboseError("Calculating initial EM field...")
CALL doEMField()
tStep = omp_get_wtime() - tStep
!Output initial state
CALL doOutput(t)
CALL verboseError('Starting main loop...')
!$OMP PARALLEL DEFAULT(SHARED)
DO t = 1, tmax
!Insert new particles and push them
!$OMP SINGLE
tStep = omp_get_wtime()
tPush = omp_get_wtime()
!$OMP END SINGLE
CALL doInjects()
!Push old particles
CALL doPushes()
!$OMP SINGLE
tPush = omp_get_wtime() - tPush
!Collisions
tColl = omp_get_wtime()
!$OMP END SINGLE
CALL doCollisions()
!$OMP SINGLE
tColl = omp_get_wtime() - tColl
!Reset particles
tReset = omp_get_wtime()
!$OMP END SINGLE
CALL doReset()
!$OMP SINGLE
tReset = omp_get_wtime() - tReset
!Weight
tWeight = omp_get_wtime()
!$OMP END SINGLE
CALL doScatter()
!$OMP SINGLE
tWeight = omp_get_wtime() - tWeight
tEMField = omp_get_wtime()
!$OMP END SINGLE
CALL doEMField()
!$OMP SINGLE
tEMField = omp_get_wtime() - tEMField
tStep = omp_get_wtime() - tStep
!Output data
CALL doOutput(t)
!$OMP END SINGLE
END DO
!$OMP END PARALLEL
END PROGRAM FPAKC