diff --git a/src/hamiltonian/projector_all.hpp b/src/hamiltonian/projector_all.hpp index 4ec55dbd..607a1431 100644 --- a/src/hamiltonian/projector_all.hpp +++ b/src/hamiltonian/projector_all.hpp @@ -438,7 +438,7 @@ class projector_all { [proj = begin(projections_all), rproj = begin(rprojections_all), coe = begin(coeff_)] GPU_LAMBDA (auto ist, auto ilm, auto iproj){ proj[iproj][ilm][ist] *= coe[iproj][ilm]; - proj[iproj][ilm][ist] *= coe[iproj][ilm]; + rproj[iproj][ilm][ist] *= coe[iproj][ilm]; }); } diff --git a/src/observables/current.hpp b/src/observables/current.hpp index ef1f7ede..358fcc28 100644 --- a/src/observables/current.hpp +++ b/src/observables/current.hpp @@ -193,17 +193,17 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) { auto cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == 125.4365980468_a); - CHECK(cur[1] == 5.708830041_a); - CHECK(cur[2] == 116.8317675488_a); + CHECK(cur[0] == 125.0726107094_a); + CHECK(cur[1] == 4.7292765308_a); + CHECK(cur[2] == 116.5420097097_a); ham.uniform_vector_potential() = vector3{1.0, -2.0, 3.0}; cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == 87.3634379355_a); - CHECK(cur[1] == 81.8624161924_a); - CHECK(cur[2] == 2.7621022916_a); + CHECK(cur[0] == 87.0638041144_a); + CHECK(cur[1] == 80.6922069845_a); + CHECK(cur[2] == 2.5258837095_a); } @@ -223,9 +223,9 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) { cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == -13946.6008146884_a); - CHECK(cur[1] == 27893.1545901583_a); - CHECK(cur[2] == -41839.3257665369_a); + CHECK(cur[0] == -13655.6186604198_a); + CHECK(cur[1] == 27311.2419971710_a); + CHECK(cur[2] == -40966.6831884187_a); } } @@ -244,17 +244,17 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) { auto cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == 65.7213690610_a); - CHECK(cur[1] == -53.8899219217_a); - CHECK(cur[2] == 57.1274385904_a); + CHECK(cur[0] == 65.3579017395_a); + CHECK(cur[1] == -54.9266021369_a); + CHECK(cur[2] == 56.8453806312_a); ham.uniform_vector_potential() = vector3{1.0, -2.0, 3.0}; cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == 27.6768119377_a); - CHECK(cur[1] == 22.2401572043_a); - CHECK(cur[2] == -56.9484342345_a); + CHECK(cur[0] == 27.3599465174_a); + CHECK(cur[1] == 21.0517395749_a); + CHECK(cur[2] == -57.1448517995_a); } @@ -266,17 +266,17 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) { auto cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == -21918.1030676834_a); - CHECK(cur[1] == -21918.0591750074_a); - CHECK(cur[2] == -21917.8247537255_a); + CHECK(cur[0] == -21452.9748736864_a); + CHECK(cur[1] == -21453.0100725570_a); + CHECK(cur[2] == -21452.8830570262_a); ham.uniform_vector_potential() = vector3{1.0, -2.0, 3.0}; cur = observables::current(ions, electrons, ham); - CHECK(cur[0] == -35804.3953857591_a); - CHECK(cur[1] == 5977.6646234487_a); - CHECK(cur[2] == -63658.5829715723_a); + CHECK(cur[0] == -35093.1574770241_a); + CHECK(cur[1] == 5859.0105019392_a); + CHECK(cur[2] == -62394.5776586859_a); } } diff --git a/tests/silicon_lrc.cpp b/tests/silicon_lrc.cpp index 1e0ab100..ade59a94 100644 --- a/tests/silicon_lrc.cpp +++ b/tests/silicon_lrc.cpp @@ -97,11 +97,11 @@ int main(int argc, char ** argv){ data_match.check("energy step 30", energy[30], -33.418518662296); data_match.check("energy step 40", energy[40], -33.418518662423); - data_match.check("current in z step 0", jz[0], -0.157729547895); - data_match.check("current in z step 10", jz[10], -0.151911067747); - data_match.check("current in z step 20", jz[20], -0.144088608186); - data_match.check("current in z step 30", jz[30], -0.140191267000); - data_match.check("current in z step 40", jz[40], -0.135683835952); + data_match.check("current in z step 0", jz[0], -0.151225679030); + data_match.check("current in z step 10", jz[10], -0.146491063357); + data_match.check("current in z step 20", jz[20], -0.138514196446); + data_match.check("current in z step 30", jz[30], -0.132857574521); + data_match.check("current in z step 40", jz[40], -0.128278272499); data_match.check("vector potential in z step 0", Az[0], 0.005000000000); data_match.check("vector potential in z step 10", Az[10], 0.005000000000); @@ -132,11 +132,11 @@ int main(int argc, char ** argv){ data_match.check("energy step 30", energy[30], -33.418517090347); data_match.check("energy step 40", energy[40], -33.418515953351); - data_match.check("current in z step 0", jz[0], -0.157729547895); - data_match.check("current in z step 10", jz[10], -0.151948955175); - data_match.check("current in z step 20", jz[20], -0.144243229877); - data_match.check("current in z step 30", jz[30], -0.140534021619); - data_match.check("current in z step 40", jz[40], -0.136281715570); + data_match.check("current in z step 0", jz[0], -0.151225679030); + data_match.check("current in z step 10", jz[10], -0.146529575060); + data_match.check("current in z step 20", jz[20], -0.138664112001); + data_match.check("current in z step 30", jz[30], -0.133184328060); + data_match.check("current in z step 40", jz[40], -0.128841730136); data_match.check("vector potential in z step 0", Az[0], 0.005000000000); data_match.check("vector potential in z step 10", Az[10], 0.005001210192);