Skip to content

Commit

Permalink
more_fast_2
Browse files Browse the repository at this point in the history
  • Loading branch information
fobos123deimos committed Aug 6, 2024
1 parent da41186 commit ddfbe14
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = fast_wave
version = 1.1.0
version = 1.1.1
description = Package for the calculation of the time-independent wavefunction.
author = Matheus Gomes Cordeiro
author_email = matheusgomescord@gmail.com
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = fh.read()

name = "fast_wave"
version = "1.1.0"
version = "1.1.1"
description = "Package for the calculation of the time-independent wavefunction."
author_email = "matheusgomescord@gmail.com"
url = "https://github.com/pikachu123deimos/fast-wave"
Expand Down
20 changes: 12 additions & 8 deletions src/fast_wave/wavefunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,14 +637,18 @@ def wavefunction(s_mode: bool = True, o_dimensional: bool = True, complex_bool:
try:

# Basic functionality test
test_output_udsm = wavefunction_smod(2, 10.0)
test_output_udmm = wavefunction_mmod(2, 10.0)
test_output_mdsm = wavefunction_smmd(2, np.array([10.0,4.5]))
test_output_mdsm = wavefunction_mmmd(2, np.array([10.0,4.5]))
test_output_c_udsm = c_wavefunction_smod(2, 10.0 + 0.0j)
test_output_c_udmm = c_wavefunction_mmod(2, 10.0 + 0.0j)
test_output_c_mdsm = c_wavefunction_smmd(2, np.array([10.0 + 0.0j,4.5 + 0.0j]))
test_output_c_mdsm = c_wavefunction_mmmd(2, np.array([10.0 + 0.0j,4.5 + 0.0j]))
test_output_smod = wavefunction_smod(2, 10.0)
test_output_smod_less_fast = wavefunction_smod(2, 10.0, more_fast=False)
test_output_mmod = wavefunction_mmod(2, 10.0)
test_output_smmd = wavefunction_smmd(2, np.array([10.0,4.5]))
test_output_smmd_less_fast = wavefunction_smmd(2, np.array([10.0,4.5]), more_fast=False)
test_output_mmmd = wavefunction_mmmd(2, np.array([10.0,4.5]))
test_output_c_smod = c_wavefunction_smod(2, 10.0 + 0.0j)
test_output_c_smod_less_fast = c_wavefunction_smod(2, 10.0 + 0.0j, more_fast=False)
test_output_c_mmod = c_wavefunction_mmod(2, 10.0 + 0.0j)
test_output_c_smmd = c_wavefunction_smmd(2, np.array([10.0 + 0.0j,4.5 + 0.0j]))
test_output_c_smmd_less_fast = c_wavefunction_smmd(2, np.array([10.0 + 0.0j,4.5 + 0.0j]), more_fast=False)
test_output_c_mmmd = c_wavefunction_mmmd(2, np.array([10.0 + 0.0j,4.5 + 0.0j]))
compilation_test = True
print(f"Functionality Test Passed: {compilation_test}")
except Exception as e:
Expand Down
12 changes: 12 additions & 0 deletions tests/test_wavefunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,36 @@ def test_wavefunction_computation():
# Testing basic functionality
test_output_odsm = wave_smod(2, 10.0)
assert isinstance(test_output_odsm, float)

test_output_odsm_less_fast = wave_smod(2, 10.0, more_fast = False)
assert isinstance(test_output_odsm_less_fast, float)

test_output_odmm = wave_mmod(2, 10.0)
assert isinstance(test_output_odmm, np.ndarray)

test_output_mdsm = wave_smmd(2, np.array([10.0, 4.5]))
assert isinstance(test_output_mdsm, np.ndarray)

test_output_mdsm_less_fast = wave_smmd(2, np.array([10.0, 4.5]), more_fast = False)
assert isinstance(test_output_mdsm_less_fast, np.ndarray)

test_output_mdmm = wave_mmmd(2, np.array([10.0, 4.5]))
assert isinstance(test_output_mdmm, np.ndarray)

test_output_c_odsm = c_wave_smod(2, 10.0 + 0.0j)
assert isinstance(test_output_c_odsm, complex)

test_output_c_odsm_less_fast = c_wave_smod(2, 10.0 + 0.0j, more_fast = False)
assert isinstance(test_output_c_odsm_less_fast, complex)

test_output_c_odmm = c_wave_mmod(2, 10.0 + 0.0j)
assert isinstance(test_output_c_odmm, np.ndarray)

test_output_c_mdsm = c_wave_smmd(2, np.array([10.0 + 0.0j, 4.5 + 0.0j]))
assert isinstance(test_output_c_mdsm, np.ndarray)

test_output_c_mdsm_less_fast = c_wave_smmd(2, np.array([10.0 + 0.0j, 4.5 + 0.0j]), more_fast = False)
assert isinstance(test_output_c_mdsm_less_fast, np.ndarray)

test_output_c_mdmm = c_wave_mmmd(2, np.array([10.0 + 0.0j, 4.5 + 0.0j]))
assert isinstance(test_output_c_mdmm, np.ndarray)
Expand Down

0 comments on commit ddfbe14

Please sign in to comment.