Skip to content

Commit

Permalink
rename direct and fft options to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
otvam committed Nov 10, 2023
1 parent a9e7916 commit c83e76c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions examples/config/tolerance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"coupling_simplify": 20.0

# method for dense matrix multiplication
# - FFT for doing the multiplication with circulant tensors and FFT
# - DIRECT for standard matrix multiplication
# - DIRECT is extremely slow and memory intensive
# - DIRECT is only useful for debugging and educational purposes
"mult_type": "FFT"
# - "fft" for doing the multiplication with circulant tensors and FFT
# - "direct" for standard matrix multiplication
# - "direct" is extremely slow and memory intensive
# - "direct" is only useful for debugging and educational purposes
"mult_type": "fft"

# FFT algorithm options
"fft_options":
Expand All @@ -28,9 +28,9 @@
# - splitting the tensors reduces the memory footprint of the computation
"matrix_split": true # handling of the tensors for the FFT
# FFT library
# - SciPy FFT library is always available (integrated with SciPy)
# - FFTW has to be installed separately (available through pyFFTW)
# - CuPy is extremely fast but require GPUs compatible with the CUDA toolkit.
# - "SciPy" FFT library is always available (integrated with SciPy)
# - "FFTW" has to be installed separately (available through pyFFTW)
# - "CuPy" is extremely fast but require GPUs compatible with the CUDA toolkit.
"library": "SciPy" # FFT library
"scipy_worker": null # number of workers for SciPy (null for number of CPUs)
"fftw_thread": null # number of threads for FFTW (null for number of CPUs)
Expand All @@ -40,10 +40,10 @@
# sparse matrix factorization options
"factorization_options":
# matrix factorization library
# - SuperLU is typically slower but is always available (integrated with SciPy)
# - UMFPACK is typically faster than SuperLU (available through SciKits)
# - PARDISO is typically faster than UMFPACK (available through Pydiso)
# - PyAMG is typically slow but uses less memory (risk of convergence issues)
# - "SuperLU" is typically slower but is always available (integrated with SciPy)
# - "UMFPACK" is typically faster than SuperLU (available through SciKits)
# - "PARDISO" is typically faster than UMFPACK (available through Pydiso)
# - "PyAMG" is typically slow but uses less memory (risk of convergence issues)
"library": "SuperLU" # matrix factorization library
"pyamg_options": # options for PyAMG
"tol": 1.0e-6 # tolerance for the AMG solver convergence
Expand Down
2 changes: 1 addition & 1 deletion pypeec/lib_check/check_data_tolerance.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def check_data_tolerance(data_tolerance):
coupling_simplify = data_tolerance["coupling_simplify"]

# check data
datachecker.check_choice("mult_type", mult_type, ["FFT", "DIRECT"])
datachecker.check_choice("mult_type", mult_type, ["fft", "direct"])
datachecker.check_float("green_simplify", green_simplify, is_positive=True, can_be_zero=False)
datachecker.check_float("coupling_simplify", coupling_simplify, is_positive=True, can_be_zero=False)

Expand Down
8 changes: 4 additions & 4 deletions pypeec/lib_matrix/matrix_multiply.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def _get_multiply(data, vec_in, mult_type, flip):
Make a matrix-vector multiplication.
"""

if mult_type == "FFT":
if mult_type == "fft":
res_out = multiply_fft.get_multiply(data, vec_in, flip)
elif mult_type == "DIRECT":
elif mult_type == "direct":
res_out = multiply_direct.get_multiply(data, vec_in, flip)
else:
raise ValueError("invalid multiplication library")
Expand All @@ -48,9 +48,9 @@ def _get_prepare(name, idx_out, idx_in, mat, mult_type):
Prepare the matrix for the multiplication.
"""

if mult_type == "FFT":
if mult_type == "fft":
data = multiply_fft.get_prepare(name, idx_out, idx_in, mat)
elif mult_type == "DIRECT":
elif mult_type == "direct":
data = multiply_direct.get_prepare(name, idx_out, idx_in, mat)
else:
raise ValueError("invalid multiplication library")
Expand Down

0 comments on commit c83e76c

Please sign in to comment.