Skip to content

Commit

Permalink
Cleanup: don't use "ONLY" in wrappers for your own module (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson authored Apr 8, 2023
1 parent 7399945 commit 89575c5
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Source/Wrapper/AnalysisModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the linear solvers module for calling from other languages.
MODULE AnalysisModule_wrp
USE AnalysisModule, ONLY : PivotedCholeskyDecomposition, ReduceDimension
USE AnalysisModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
4 changes: 1 addition & 3 deletions Source/Wrapper/ChebyshevSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the Chebyshev Solvers Module
MODULE ChebyshevSolversModule_wrp
USE ChebyshevSolversModule, ONLY : ChebyshevPolynomial_t, &
& ConstructPolynomial, DestructPolynomial, SetCoefficient, Compute, &
& FactorizedCompute
USE ChebyshevSolversModule
USE DataTypesModule, ONLY : NTREAL
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/DensityMatrixSolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
!> Wraps the density matrix solvers module for calling from other languages.
MODULE DensityMatrixSolversModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE DensityMatrixSolversModule, ONLY : TRS2, TRS4, HPCP, PM, ScaleAndFold, &
& EnergyDensityMatrix, DenseDensity
USE DensityMatrixSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/EigenBoundsModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!> Wraps the eigenbounds module for calling from other languages.
MODULE EigenBoundsModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE EigenBoundsModule, ONLY : GershgorinBounds, PowerBounds
USE EigenBoundsModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/EigenSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the eigensolvers module for calling from other languages.
MODULE EigenSolversModule_wrp
USE EigenSolversModule, ONLY : EigenDecomposition
USE EigenSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE PSMAtrixModule, ONLY : PrintMatrix
USE SingularValueSolversModule, ONLY : SingularValueDecomposition
Expand Down
4 changes: 1 addition & 3 deletions Source/Wrapper/ExponentialSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the exponential solvers module for calling from other languages.
MODULE ExponentialSolversModule_wrp
USE ExponentialSolversModule, ONLY : ComputeExponential, &
& ComputeExponentialPade, ComputeDenseExponential, &
& ComputeLogarithm, ComputeDenseLogarithm
USE ExponentialSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/FermiOperatorModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!> Wraps the density matrix solvers module for calling from other languages.
MODULE FermiOperatorModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE FermiOperatorModule, ONLY : ComputeDenseFOE
USE FermiOperatorModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/GeometryOptimizationModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
!> Wraps the geometry optimization module for calling from other languages.
MODULE GeometryOptimizationModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE GeometryOptimizationModule, ONLY : PurificationExtrapolate, &
& LowdinExtrapolate
USE GeometryOptimizationModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/HermiteSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the Hermite Solvers Module
MODULE HermiteSolversModule_wrp
USE HermiteSolversModule, ONLY : HermitePolynomial_t, ConstructPolynomial, &
& DestructPolynomial, SetCoefficient, Compute
USE HermiteSolversModule
USE DataTypesModule, ONLY : NTREAL
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/InverseSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the matrix inversion module for calling from other languages.
MODULE InverseSolversModule_wrp
USE InverseSolversModule, ONLY : Invert, DenseInvert, PseudoInverse
USE InverseSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/LinearSolversModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the linear solvers module for calling from other languages.
MODULE LinearSolversModule_wrp
USE LinearSolversModule, ONLY : CGSolver, CholeskyDecomposition
USE LinearSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/LoadBalancerModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the load balancer module for calling from other languages.
MODULE LoadBalancerModule_wrp
USE LoadBalancerModule, ONLY : PermuteMatrix, UndoPermuteMatrix
USE LoadBalancerModule
USE PermutationModule_wrp, ONLY : Permutation_wrp
USE PMatrixMemoryPoolModule_wrp, ONLY : MatrixMemoryPool_p_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
Expand Down
4 changes: 1 addition & 3 deletions Source/Wrapper/MatrixMemoryPoolModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> A module for wrapping the matrix memory pool data type.
MODULE MatrixMemoryPoolModule_wrp
USE MatrixMemoryPoolModule, ONLY : MatrixMemoryPool_lr, &
& MatrixMemoryPool_lc, DestructMatrixMemoryPool, &
& ConstructMatrixMemoryPool
USE MatrixMemoryPoolModule
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/PMatrixMemoryPoolModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
!> A module for wrapping the distributed sparse matrix memory pool.
MODULE PMatrixMemoryPoolModule_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE PMatrixMemoryPoolModule, ONLY : MatrixMemoryPool_p, &
& DestructMatrixMemoryPool, ConstructMatrixMemoryPool
USE PMatrixMemoryPoolModule
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
Expand Down
4 changes: 1 addition & 3 deletions Source/Wrapper/PermutationModule_wrp.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!> Wraps the permutation module for calling from other languages.
MODULE PermutationModule_wrp
USE PermutationModule, ONLY : Permutation_t, ConstructDefaultPermutation, &
& ConstructReversePermutation, ConstructRandomPermutation, &
& DestructPermutation
USE PermutationModule
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int
IMPLICIT NONE
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/PolynomialSolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
!> Wraps the polynomial solvers module for calling from other languages.
MODULE PolynomialSolversModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE PolynomialSolversModule, ONLY : Polynomial_t, ConstructPolynomial, &
& DestructPolynomial, SetCoefficient, Compute, FactorizedCompute
USE PolynomialSolversModule
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/RootSolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
!> Wraps the root solvers module for calling from other languages.
MODULE RootSolversModule_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE RootSolversModule, ONLY : ComputeRoot, ComputeInverseRoot
USE RootSolversModule
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/SMatrixAlgebraModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ MODULE SMatrixAlgebraModule_wrp
USE DataTypesModule, ONLY : NTREAL, NTCOMPLEX
USE MatrixMemoryPoolModule_wrp, ONLY : MatrixMemoryPool_lr_wrp, &
& MatrixMemoryPool_lc_wrp
USE SMatrixAlgebraModule, ONLY : ScaleMatrix, IncrementMatrix, &
& MatrixMultiply, DotMatrix, PairwiseMultiplyMatrix
USE SMatrixAlgebraModule
USE SMatrixModule, ONLY : Matrix_lsr, Matrix_lsc
USE SMatrixModule_wrp, ONLY: Matrix_lsr_wrp, Matrix_lsc_wrp
USE TripletListModule_wrp, ONLY : TripletList_r_wrp, TripletList_c_wrp
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/SignSolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
!> Wraps the sign solvers module for calling from other languages.
MODULE SignSolversModule_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SignSolversModule, ONLY : SignFunction, DenseSignFunction, &
& PolarDecomposition
USE SignSolversModule
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int
Expand Down
5 changes: 1 addition & 4 deletions Source/Wrapper/SolverParametersModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
!> A wrapper for the iterative solver parameters.
MODULE SolverParametersModule_wrp
USE DataTypesModule, ONLY : NTREAL
USE SolverParametersModule, ONLY : SolverParameters_t, &
& SetParametersConvergeDiff, SetParametersMaxIterations, &
& SetParametersThreshold, SetParametersBeVerbose, &
& SetParametersLoadBalance, DestructSolverParameters
USE SolverParametersModule
USE PermutationModule_wrp, ONLY : Permutation_wrp
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_bool, c_int
Expand Down
3 changes: 1 addition & 2 deletions Source/Wrapper/SquareRootSolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
MODULE SquareRootSolversModule_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE SquareRootSolversModule, ONLY : SquareRoot, InverseSquareRoot, &
& DenseSquareRoot, DenseInverseSquareRoot
USE SquareRootSolversModule
USE WrapperModule, ONLY : SIZE_wrp
USE ISO_C_BINDING, ONLY : c_int, c_bool
IMPLICIT NONE
Expand Down
2 changes: 1 addition & 1 deletion Source/Wrapper/TrigonometrySolversModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MODULE TrigonometrySolversModule_wrp
USE PSMatrixModule_wrp, ONLY : Matrix_ps_wrp
USE SolverParametersModule_wrp, ONLY : SolverParameters_wrp
USE TrigonometrySolversModule, ONLY : Sine, Cosine, DenseSine, DenseCosine
USE TrigonometrySolversModule
USE WrapperModule, ONLY : SIZE_wrp
USE iso_c_binding, ONLY : c_int, c_bool
IMPLICIT NONE
Expand Down
5 changes: 1 addition & 4 deletions Source/Wrapper/TripletListModule_wrp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
!> A module for wrapping the triplet list data type.
MODULE TripletListModule_wrp
USE DataTypesModule, ONLY : NTREAL, NTCOMPLEX
USE TripletListModule, ONLY : TripletList_r, TripletList_c, &
& AppendToTripletList, ResizeTripletList, &
& DestructTripletList, SetTripletAt, GetTripletAt, SortTripletList, &
& GetTripletListSize, ConstructTripletList
USE TripletListModule
USE TripletModule, ONLY : Triplet_r, Triplet_c
USE WrapperModule, ONLY : SIZE_wrp
USE iso_c_binding, ONLY : c_int
Expand Down

0 comments on commit 89575c5

Please sign in to comment.