Skip to content

Commit

Permalink
Cleaned Up the test_xc_integrator, removed allocation of some UKS var…
Browse files Browse the repository at this point in the history
…iables during RKS
  • Loading branch information
elambros committed Aug 9, 2023
1 parent 47a8256 commit 4417d9b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/xc_integrator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ void test_xc_integrator( ExecutionSpace ex, const RuntimeEnvironment& rt,
auto dims = dset.getDimensions();
P = matrix_type( dims[0], dims[1] );
VXC_ref = matrix_type( dims[0], dims[1] );
Pz = matrix_type( dims[0], dims[1] );
VXCz_ref = matrix_type( dims[0], dims[1] );
if (uks) {
Pz = matrix_type( dims[0], dims[1] );
VXCz_ref = matrix_type( dims[0], dims[1] );
}

dset.read( P.data() );
dset = file.getDataSet(vxc);
Expand Down Expand Up @@ -113,7 +115,7 @@ void test_xc_integrator( ExecutionSpace ex, const RuntimeEnvironment& rt,
mw.modify_weights(lb);

// Construct XC Functional
ExchCXX::Spin Spin=ExchCXX::Spin::Unpolarized; if (uks) { Spin=ExchCXX::Spin::Polarized; }
auto Spin = uks ? ExchCXX::Spin::Polarized : ExchCXX::Spin::Unpolarized;
functional_type func( ExchCXX::Backend::builtin, func_key, Spin );

// Construct XCIntegrator
Expand Down

0 comments on commit 4417d9b

Please sign in to comment.