Skip to content

Commit

Permalink
Merge branch 'master.dev' into 'master'
Browse files Browse the repository at this point in the history
Master.dev

See merge request piclas/piclas!283
  • Loading branch information
scopplestone committed Jan 17, 2020
2 parents 54e2d5b + b8fdf2c commit f30d7e5
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .gitlab/merge_request_templates/Release.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Merge Request To-Do

* [ ] Update of version number in piclas.f90 and globals_vars.f90
* [ ] Update of version number in ./src/piclaslib.f90 and ./src/globals/globals_vars.f90
* [ ] Release notes

## Regression Testing
Expand Down Expand Up @@ -31,4 +31,4 @@

### Fixes

*
*
6 changes: 3 additions & 3 deletions doc/developerguide/010_git_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ For this purpose, the developer can select the respective template for his merge

## Release and deploy

For a release, a merge of the master.dev branch into the master branch is required. This merge request should be associated with a milestone (e.g. Release 1.X.X). For this specific merge request, the template `Release` can be chosen, which contains the to-do list as well as the template for the release notes as given below. After the successful completion of all to-do's and regression checks (check-in, nightly, weekly), the master.dev branch can be merged into the master.
A new release version of PICLas is created from the **master** repository, which requires a merge of the current **master.dev** branch into the **master** branch. The corresponding merge request should be associated with a release milestone (e.g. *Release 1.X.X* within which the merge request is referenced, e.g., "See merge request !283"). Within this specific merge request, the template `Release` is chosen, which contains the to-do list as well as the template for the release notes as given below. After the successful completion of all to-do's and regression checks (check-in, nightly, weekly), the **master.dev** branch can be merged into the **master** branch.

### Release Tag

A release can be created through the web interface ([Repository -> Tags](https://gitlab.com/piclas/piclas/tags) -> New tag), as the `Tag name` the new version should be used
A new release tag can be created through the web interface ([Repository -> Tags](https://gitlab.com/piclas/piclas/tags) -> New tag) and as the `Tag name`, the new version number is used, e.g.,

v1.X.X

The tag should be created from the `master` branch and the `Message` left empty. The release notes, which were compiled within the corresponding milestone, shall be given in the following format
The tag is then created from the **master** branch repository and the `Message` is left empty. The release notes, which were used within the corresponding milestone, shall be given in the following format

## Release 1.X.X

Expand Down
15 changes: 14 additions & 1 deletion doc/developerguide/040_reggie.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ Latest test: on ubuntu (18.04), 3 Jul 2019
```
sudo chown -R gitlab-runner:gitlab-runner /var/lib/gitlab-runner/.ssh/
```
If the runner is used to push to remote repositories, add the public key under *deploy keys*
and execute, e.g.,
```
sudo -u gitlab-runner git clone [email protected]:piclas-framework/piclas.git piclas_github
```
to establish the first connection with the new repository and add the repo IP to the list of
known hosts.
6. Start pipeline in gitlab or github for testing of reggie
NOTE: Interesting information is found in `/etc/systemd/system/gitlab-runner.service`.
Expand Down Expand Up @@ -258,13 +265,19 @@ check_interval = 0
```
### Automatic Deployment to other platforms
1. Add the required ssh key to the deploy keys on the respective platform (e.g. github)
1. Clone a code from the platform to update the list of known hosts. Do not forget to copy the
information to the correct location for the runner to have access to the platform
```
sudo cp~/.ssh/.ssh/known_hosts /var/lib/gitlab-runner/.ssh/known_hosts
```
1. PICLas deployment in performed by the gitlab runner in the *deployment stage*
This might have to be performed via the gitlab-runner user, which can be accomplished by
executing the following command
```
sudo -u gitlab-runner git clone [email protected]:piclas-framework/piclas.git piclas_github
```
1. PICLas deployment is performed by the gitlab runner in the *deployment stage*
```
github:
stage: deploy
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ Particles-BGK-UseQuantVibEn=T
Particles-BGK-DoVibRelaxation=T
! BGK Refinement
Particles-BGK-DoCellAdaptation=T
Particles-BGK-MinPartsPerCell=50
Particles-BGK-MinPartsPerCell=12
Particles-BGK-SplittingDens = 3.8E20
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ Particles-FP-DoVibRelaxation = T
Particles-FP-UseQuantVibEn = T
! FP Refinement
Particles-FP-DoCellAdaptation = T
Particles-FP-MinPartsPerCell = 50
Particles-FP-MinPartsPerCell = 12
2 changes: 1 addition & 1 deletion src/globals/globals_vars.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MODULE MOD_Globals_Vars
! GLOBAL VARIABLES
!-----------------------------------------------------------------------------------------------------------------------------------
CHARACTER(LEN=6),PARAMETER :: ProgramName = 'PICLas' !> name of this program
REAL,PARAMETER :: FileVersion = 1.5 !> FileVersion number saved in each hdf5 file with hdf5 header
REAL,PARAMETER :: FileVersion = 1.51 !> FileVersion number saved in each hdf5 file with hdf5 header
REAL :: FileVersionHDF5 !> FileVersion number read from hdf5 restart file
REAL :: WallTime !> Wall time needed by a simulation (is not reset by
!> performing a load balance step, only by user restart)
Expand Down
18 changes: 7 additions & 11 deletions src/particles/bgk/bgk_adaptation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -544,13 +544,13 @@ SUBROUTINE BGK_quadtree_adapt(iElem)
!===================================================================================================================================
! MODULES
USE MOD_TimeDisc_Vars ,ONLY: TEnd, Time
USE MOD_DSMC_ParticlePairing ,ONLY: GeoCoordToMap2D
USE MOD_DSMC_Vars ,ONLY: tTreeNode, ElemNodeVol, DSMC, RadialWeighting
USE MOD_Particle_Mesh_Vars ,ONLY: GEO
USE MOD_Particle_Vars ,ONLY: PEM, PartState, PartPosRef,Species,WriteMacroVolumeValues, usevMPF
USE MOD_Particle_Tracking_Vars ,ONLY: DoRefMapping
USE MOD_BGK_CollOperator ,ONLY: BGK_CollisionOperator
USE MOD_BGK_Vars ,ONLY: BGKMinPartPerCell,BGKSplittingDens!,BGKMovingAverage,ElemNodeAveraging,BGKMovingAverageLength
USE MOD_Eval_xyz ,ONLY: GetPositionInRefElem
USE MOD_FP_CollOperator ,ONLY: FP_CollisionOperator
USE MOD_BGK_Vars ,ONLY: BGKInitDone,BGK_MeanRelaxFactor,BGK_MeanRelaxFactorCounter,BGK_MaxRelaxFactor
USE MOD_BGK_Vars ,ONLY: BGK_QualityFacSamp, BGK_MaxRotRelaxFactor
Expand Down Expand Up @@ -612,17 +612,13 @@ SUBROUTINE BGK_quadtree_adapt(iElem)

! The quadtree refinement is performed if either the particle number or number density is above a user-given limit
IF(nPart.GE.(2.*BGKMinPartPerCell).AND.(Dens.GT.BGKSplittingDens)) THEN
ALLOCATE(TreeNode%MappedPartStates(1:3,1:nPart))
ALLOCATE(TreeNode%MappedPartStates(1:2,1:nPart))
TreeNode%PNum_Node = nPart
IF (DoRefMapping) THEN
DO iLoop = 1, nPart
TreeNode%MappedPartStates(1:3,iLoop)=PartPosRef(1:3,TreeNode%iPartIndx_Node(iLoop))
END DO
ELSE ! position in reference space [-1,1] has to be computed
DO iLoop = 1, nPart
CALL GetPositionInRefElem(PartState(1:3,TreeNode%iPartIndx_Node(iLoop)),TreeNode%MappedPartStates(1:3,iLoop),iElem)
END DO
END IF ! DoRefMapping
iPart = PEM%pStart(iElem) ! create particle index list for pairing
DO iLoop = 1, nPart
CALL GeoCoordToMap2D(PartState(1:2,iPart), TreeNode%MappedPartStates(1:2,iLoop), iElem)
iPart = PEM%pNext(iPart)
END DO
TreeNode%NodeDepth = 1
TreeNode%MidPoint(1:3) = (/0.0,0.0,0.0/)
! Start of the recursive routine, which will descend further down the quadtree until the aforementioned criteria are fulfilled
Expand Down
20 changes: 12 additions & 8 deletions src/particles/bgk/bgk_colloperator.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
INTEGER :: INFO, nNotRelax, nRotRelax, nVibRelax
REAL :: TRot, betaV, OldEnRot, RotExp, VibExp, NewEnRot, NewEnVib, vBulkRelaxOld(3),vBulkRelax(3)
REAL :: CellTempRelax, vBulkAver(3), u2Aver, nPartAver, dtCell
REAL :: partWeight, totalWeight, totalWeightRelax
REAL :: partWeight, totalWeight, totalWeightRelax, totalWeight2
#ifdef CODE_ANALYZE
REAL :: Energy_old,Energy_new,Momentum_old(3),Momentum_new(3)
INTEGER :: iMom
Expand All @@ -110,12 +110,13 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
u2 = 0.0; u0ij = 0.0; u0i = 0.0; u2i = 0.0
Evib = 0.0; ERot = 0.0
u2Aver = 0.0; vBulkRelax = 0.0; vBulkRelaxOld = 0.0
totalWeight = 0.0; dtCell = 0.0; totalWeightRelax = 0.0
totalWeight = 0.0; dtCell = 0.0; totalWeightRelax = 0.0; totalWeight2 = 0.0

! 1.) Summing up the relative velocities and their square to calculate the moments
DO iLoop = 1, nPart
partWeight = GetParticleWeight(iPartIndx_Node(iLoop))
totalWeight = totalWeight + partWeight
totalWeight2 = totalWeight2 + partWeight*partWeight
V_rel(1:3)=PartState(4:6,iPartIndx_Node(iLoop))-vBulkAll(1:3)
IF (BGKMovingAverage) u2Aver = u2Aver + DOTPRODUCT(PartState(4:6,iPartIndx_Node(iLoop)))
vmag2 = V_rel(1)**2 + V_rel(2)**2 + V_rel(3)**2
Expand Down Expand Up @@ -150,11 +151,12 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
u2i = u2i*nPart*nPart/((nPart-1.)*(nPart-2.)*totalWeight)
END IF

u2 = u2*nPart/((nPart-1.)*totalWeight)
!u2 = u2*nPart/((nPart-1.)*totalWeight)
u0ij = u0ij/totalWeight
u0i(1:3) = u0i(1:3)/totalWeight
trace = u0ij(1,1)+u0ij(2,2)+u0ij(3,3)
CellTemp = Species(1)%MassIC * u2 / (3.0*BoltzmannConst)
CellTemp = Species(1)%MassIC * u2 / (3.0*BoltzmannConst * (totalWeight - totalWeight2/totalWeight))
u2 = u2 / totalWeight

IF(usevMPF.OR.RadialWeighting%DoRadialWeighting) THEN
! totalWeight contains the weighted particle number
Expand Down Expand Up @@ -290,7 +292,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
END IF
!Rotation
CALL RANDOM_NUMBER(iRan)
ProbAddPart = 1.-RotExp
ProbAddPart = (1.-RotExp)
IF (ProbAddPart.GT.iRan) THEN
nRotRelax = nRotRelax + 1
iPartIndx_NodeRelaxRot(nRotRelax) = iPartIndx_Node(iLoop)
Expand All @@ -299,7 +301,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
! Vibration
IF(BGKDoVibRelaxation) THEN
CALL RANDOM_NUMBER(iRan)
ProbAddPart = 1.-VibExp
ProbAddPart = (1.-VibExp)
IF (ProbAddPart.GT.iRan) THEN
nVibRelax = nVibRelax + 1
iPartIndx_NodeRelaxVib(nVibRelax) = iPartIndx_Node(iLoop)
Expand Down Expand Up @@ -394,9 +396,11 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av
ELSE
KronDelta = 0.0
END IF
! SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) &
! *(Species(1)%MassIC/(BoltzmannConst*CellTemp)*nPart/(nPart-1.) &
! *(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta)
SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) &
*(Species(1)%MassIC/(BoltzmannConst*CellTemp)*nPart/(nPart-1.) &
*(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta)
*(3./u2*(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta)
! SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) &
! *(Species(1)%MassIC/(BoltzmannConst*CellTemp) &
! *(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta)
Expand Down
2 changes: 1 addition & 1 deletion src/particles/bgk/bgk_init.f90
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ SUBROUTINE InitBGK()
IF(CoupledBGKDSMC) THEN
BGKDSMCSwitchDens = GETREAL('Particles-BGK-DSMC-SwitchDens')
ELSE
IF(RadialWeighting%DoRadialWeighting) RadialWeighting%PerformCloning = .FALSE.
IF(RadialWeighting%DoRadialWeighting) RadialWeighting%PerformCloning = .TRUE.
END IF
! Octree-based cell refinement, up to a certain number of particles
DoBGKCellAdaptation = GETLOGICAL('Particles-BGK-DoCellAdaptation')
Expand Down
2 changes: 1 addition & 1 deletion src/piclaslib.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SUBROUTINE InitializePiclas()
SWRITE(UNIT_stdOut,'(A)')" | ) ___) (___| (____/\| (____/\| ) ( |/\____) |"
SWRITE(UNIT_stdOut,'(A)')" |/ \_______/(_______/(_______/|/ \|\_______)"
SWRITE(UNIT_stdOut,'(132(" "))')
SWRITE(UNIT_stdOut,'(A)')"piclas version 1.5.0"
SWRITE(UNIT_stdOut,'(A)')"piclas version 1.5.1"
SWRITE(UNIT_stdOut,'(132("="))')

CALL ParseCommandlineArguments()
Expand Down

0 comments on commit f30d7e5

Please sign in to comment.