Skip to content

Commit

Permalink
Permutation destructor added to examples. (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson authored Apr 21, 2020
1 parent 3c06b9a commit e7d98ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion Examples/HydrogenAtom/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
PROGRAM HydrogenAtom
USE DataTypesModule, ONLY : NTREAL
USE DensityMatrixSolversModule, ONLY : TRS2
USE PermutationModule, ONLY : Permutation_t, ConstructRandomPermutation
USE ProcessGridModule, ONLY : ConstructProcessGrid, DestructProcessGrid
USE PSMatrixModule, ONLY : Matrix_ps, WriteMatrixToMatrixMarket, &
& ConstructEmptyMatrix, FillMatrixFromTripletList, CopyMatrix, &
Expand Down
4 changes: 3 additions & 1 deletion Examples/OverlapMatrix/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
!> An example that shows how to compute the overlap matrix.
PROGRAM OverlapExample
USE DataTypesModule, ONLY : NTREAL
USE PermutationModule, ONLY : Permutation_t, ConstructRandomPermutation
USE PermutationModule, ONLY : Permutation_t, ConstructRandomPermutation, &
& DestructPermutation
USE ProcessGridModule, ONLY : ConstructProcessGrid, global_grid, &
& DestructProcessGrid
USE PSMatrixModule, ONLY : Matrix_ps, ConstructEmptyMatrix, &
Expand Down Expand Up @@ -124,6 +125,7 @@ PROGRAM OverlapExample

!! Cleanup
CALL PrintAllTimers()
CALL DestructPermutation(permutation)
CALL DestructMatrix(Overlap)
CALL DestructMatrix(ISQOverlap)
CALL DestructProcessGrid
Expand Down
4 changes: 3 additions & 1 deletion Examples/PremadeMatrix/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ PROGRAM PremadeMatrixProgram
USE DataTypesModule, ONLY : NTREAL
USE DensityMatrixSolversModule, ONLY : TRS2
USE LoggingModule, ONLY : EnterSubLog, ExitSubLog, WriteElement, WriteHeader
USE PermutationModule, ONLY : Permutation_t, ConstructRandomPermutation
USE PermutationModule, ONLY : Permutation_t, ConstructRandomPermutation, &
& DestructPermutation
USE ProcessGridModule, ONLY : ConstructProcessGrid, IsRoot, &
& DestructProcessGrid
USE PSMatrixModule, ONLY : Matrix_ps, ConstructMatrixFromMatrixMarket, &
Expand Down Expand Up @@ -111,6 +112,7 @@ PROGRAM PremadeMatrixProgram
CALL WriteMatrixToMatrixMarket(Density,density_file_out)

!! Cleanup
CALL DestructPermutation(permutation)
CALL DestructMatrix(Overlap)
CALL DestructMatrix(ISQOverlap)
CALL DestructMatrix(Hamiltonian)
Expand Down

0 comments on commit e7d98ed

Please sign in to comment.