Skip to content

Commit

Permalink
Add R2SCANL_{X,C}
Browse files Browse the repository at this point in the history
  • Loading branch information
wavefunction91 committed Apr 23, 2024
1 parent 3126633 commit 4d660e4
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 8 deletions.
2 changes: 2 additions & 0 deletions include/exchcxx/impl/builtin/kernels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
#include <exchcxx/impl/builtin/kernels/ft98_x.hpp>
#include <exchcxx/impl/builtin/kernels/scanl_c.hpp>
#include <exchcxx/impl/builtin/kernels/scanl_x.hpp>
#include <exchcxx/impl/builtin/kernels/r2scanl_c.hpp>
#include <exchcxx/impl/builtin/kernels/r2scanl_x.hpp>

#include <exchcxx/impl/builtin/kernels/pc07_k.hpp>
#include <exchcxx/impl/builtin/kernels/pc07opt_k.hpp>
Expand Down
32 changes: 32 additions & 0 deletions include/exchcxx/impl/builtin/kernels/r2scanl_c.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#pragma once

#include <exchcxx/impl/builtin/kernels/r2scan_c.hpp>
#include <exchcxx/impl/builtin/kernels/pc07_k.hpp>
#include <exchcxx/impl/builtin/kernels/pc07opt_k.hpp>

#include <exchcxx/impl/builtin/kernels/deorbitalized.hpp>

namespace ExchCXX {


template <>
struct kernel_traits<BuiltinR2SCANL_C> :
public kernel_traits<Deorbitalized<BuiltinR2SCAN_C, BuiltinPC07OPT_K>> {

static constexpr double dens_tol = 1e-15;
static constexpr double zeta_tol = 1e-15;
static constexpr double sigma_tol = 1.0000000000000027e-20;
static constexpr double tau_tol = 1e-20;

};

struct BuiltinR2SCANL_C : detail::BuiltinKernelImpl< BuiltinR2SCANL_C > {

BuiltinR2SCANL_C( Spin p ) :
detail::BuiltinKernelImpl< BuiltinR2SCANL_C >(p) { }

virtual ~BuiltinR2SCANL_C() = default;

};

}
32 changes: 32 additions & 0 deletions include/exchcxx/impl/builtin/kernels/r2scanl_x.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#pragma once

#include <exchcxx/impl/builtin/kernels/r2scan_x.hpp>
#include <exchcxx/impl/builtin/kernels/pc07_k.hpp>
#include <exchcxx/impl/builtin/kernels/pc07opt_k.hpp>

#include <exchcxx/impl/builtin/kernels/deorbitalized.hpp>

namespace ExchCXX {


template <>
struct kernel_traits<BuiltinR2SCANL_X> :
public kernel_traits<Deorbitalized<BuiltinR2SCAN_X, BuiltinPC07OPT_K>> {

static constexpr double dens_tol = 1e-15;
static constexpr double zeta_tol = 1e-15;
static constexpr double sigma_tol = 1.0000000000000027e-20;
static constexpr double tau_tol = 1e-20;

};

struct BuiltinR2SCANL_X : detail::BuiltinKernelImpl< BuiltinR2SCANL_X > {

BuiltinR2SCANL_X( Spin p ) :
detail::BuiltinKernelImpl< BuiltinR2SCANL_X >(p) { }

virtual ~BuiltinR2SCANL_X() = default;

};

}
8 changes: 4 additions & 4 deletions src/builtin_interface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ std::unique_ptr<BuiltinKernel>
return std::make_unique<BuiltinR2SCAN_X>( polar );
else if( kern == Kernel::R2SCAN_C )
return std::make_unique<BuiltinR2SCAN_C>( polar );
//else if( kern == Kernel::R2SCANL_X )
// return std::make_unique<BuiltinR2SCANL_X>( polar );
//else if( kern == Kernel::R2SCANL_C )
// return std::make_unique<BuiltinR2SCANL_C>( polar );
else if( kern == Kernel::R2SCANL_X )
return std::make_unique<BuiltinR2SCANL_X>( polar );
else if( kern == Kernel::R2SCANL_C )
return std::make_unique<BuiltinR2SCANL_C>( polar );
else if( kern == Kernel::FT98_X )
return std::make_unique<BuiltinFT98_X>( polar );

Expand Down
4 changes: 2 additions & 2 deletions src/builtin_kernel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ MGGA_GENERATE_HOST_HELPERS( BuiltinPC07OPT_K )

MGGA_GENERATE_HOST_HELPERS( BuiltinSCANL_C )
MGGA_GENERATE_HOST_HELPERS( BuiltinSCANL_X )
//MGGA_GENERATE_HOST_HELPERS( BuiltinR2SCANL_C )
//MGGA_GENERATE_HOST_HELPERS( BuiltinR2SCANL_X )
MGGA_GENERATE_HOST_HELPERS( BuiltinR2SCANL_C )
MGGA_GENERATE_HOST_HELPERS( BuiltinR2SCANL_X )

}
}
Expand Down
4 changes: 2 additions & 2 deletions src/cuda/builtin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,8 @@ MGGA_GENERATE_DEVICE_HELPERS( BuiltinPC07OPT_K );

MGGA_GENERATE_DEVICE_HELPERS( BuiltinSCANL_C );
MGGA_GENERATE_DEVICE_HELPERS( BuiltinSCANL_X );
//MGGA_GENERATE_DEVICE_HELPERS( BuiltinR2SCANL_C );
//MGGA_GENERATE_DEVICE_HELPERS( BuiltinR2SCANL_X );
MGGA_GENERATE_DEVICE_HELPERS( BuiltinR2SCANL_C );
MGGA_GENERATE_DEVICE_HELPERS( BuiltinR2SCANL_X );
}
}

2 changes: 2 additions & 0 deletions test/ut_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ static std::vector<ExchCXX::Kernel> builtin_supported_kernels = {
ExchCXX::Kernel::SCANL_X,
ExchCXX::Kernel::R2SCAN_X,
ExchCXX::Kernel::R2SCAN_C,
ExchCXX::Kernel::R2SCANL_X,
ExchCXX::Kernel::R2SCANL_C,
ExchCXX::Kernel::FT98_X,

ExchCXX::Kernel::PC07_K,
Expand Down

0 comments on commit 4d660e4

Please sign in to comment.