Skip to content
Permalink
Browse files

{set_}scale -> prescale{d}_by

  • Loading branch information...
evaleev committed Aug 9, 2019
1 parent 309f18a commit 93f3cfa97055a0696974fb78d5f8e2471fad70c0
Showing with 10 additions and 10 deletions.
  1. +1 −1 CHANGES
  2. +1 −1 doc/wiki
  3. +2 −2 include/libint2/engine.h
  4. +2 −2 tests/unit/test-1body.cc
  5. +2 −2 tests/unit/test-2body.cc
  6. +2 −2 tests/unit/test-core.cc
@@ -6,7 +6,7 @@ Following is a brief summary of changes made in each release of Libint.
- 2019-08-09: 2.7.0-beta.1
- PR #142: fixed cmake build of fortran interface (HT @pseewald )
- PR #141: can buile shared and static libs in one shot (HT @francesco-bosia )
- added Engine::{set_}scale that allows scaling target ints
- added Engine::prescale_by that allows scaling target ints

- 2019-07-23: 2.6.0
- fixed initialization order error in unit test
Submodule wiki updated from 250c94 to c82929
@@ -798,14 +798,14 @@ class Engine {
}

/// @return the scaling factor by which the target integrals are multiplied
scalar_type scale() const {
scalar_type prescaled_by() const {
return scale_;
}

/// @param[in] sc the scaling factor by which the target integrals are multiplied
/// @note the default factor is 1
/// @return reference to @c this for daisy-chaining
Engine& set_scale(scalar_type sc) {
Engine& prescale_by(scalar_type sc) {
scale_ = sc;
return *this;
}
@@ -16,7 +16,7 @@ TEST_CASE_METHOD(libint2::unit::DefaultFixture, "electrostatic potential", "[eng
engine.set_params(make_point_charges(atoms));

const auto scale = 2.3;
engine.set_scale(scale);
engine.prescale_by(scale);
engine.compute(obs[0], obs[0]);
{
std::vector<double> shellset_ref = {
@@ -38,7 +38,7 @@ TEST_CASE_METHOD(libint2::unit::DefaultFixture, "electrostatic potential", "[eng
}
}

engine.set_scale(1);
engine.prescale_by(1);
engine.compute(obs[0], obs[1]);
{
std::vector<double> shellset_ref = {
@@ -45,8 +45,8 @@ TEST_CASE("Slater/Yukawa integrals", "[engine][2-body]") {
for (int k = -1; k <= 0; ++k) {
auto engine = Engine(k == 0 ? Operator::stg : Operator::yukawa, max_nprim, max_l);
const auto scale = 2.3;
engine.set_params(1.0).set_scale(scale);
REQUIRE(engine.scale() == scale);
engine.set_params(1.0).prescale_by(scale);
REQUIRE(engine.prescaled_by() == scale);
const auto &results = engine.results();
auto engine_ref =
Engine(k == 0 ? Operator::cgtg : Operator::cgtg_x_coulomb, max_nprim, max_l);
@@ -28,8 +28,8 @@ TEST_CASE("Engine::set", "[engine]") {
REQUIRE_THROWS_AS(Engine{}.set(Operator::overlap), Engine::using_default_initialized);
REQUIRE_THROWS_AS(Engine{}.set(BraKet::x_x), Engine::using_default_initialized);
REQUIRE_NOTHROW(Engine{}.set(CartesianShellNormalization::uniform));
REQUIRE_NOTHROW(Engine{}.set_scale(1.5));
REQUIRE_NOTHROW(Engine(Operator::overlap, 1, 0).set(CartesianShellNormalization::uniform).set_precision(1e-20).set(Operator::overlap).set_scale(1.3).set(BraKet::x_x));
REQUIRE_NOTHROW(Engine{}.prescale_by(1.5));
REQUIRE_NOTHROW(Engine(Operator::overlap, 1, 0).set(CartesianShellNormalization::uniform).set_precision(1e-20).set(Operator::overlap).prescale_by(1.3).set(BraKet::x_x));
}

template <typename RealBuf> void check_uniform(int l, RealBuf && S) {

0 comments on commit 93f3cfa

Please sign in to comment.
You can’t perform that action at this time.