Skip to content

Commit

Permalink
Fixing bug in std::vector
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Dec 5, 2023
1 parent 1fa393c commit c98a5ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pyqint/integrals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@ std::vector<double> Integrator::evaluate_geometric_derivatives(const std::vector
// Construct 2x2 matrices to hold values for the overlap,
// kinetic and two nuclear integral values, respectively.
const size_t datasz = charges.size() * 3 * sz * sz;
std::vector S(datasz, 0.0);
std::vector T(datasz, 0.0);
std::vector V(datasz, 0.0);
std::vector<double> S(datasz, 0.0);
std::vector<double> T(datasz, 0.0);
std::vector<double> V(datasz, 0.0);

// calculate the integral values using the integrator class
for(unsigned int n=0; n<charges.size(); n++) { // loop over nuclei
for(unsigned int k=0; k<3; k++) { // loop over directions

// build container for summation over nuclei
std::vector Vn(charges.size() * sz * sz, 0.0);
std::vector<double> Vn(charges.size() * sz * sz, 0.0);

#pragma omp parallel for schedule(dynamic)
for(int i=0; i<(int)sz; i++) { // have to use signed int for MSVC OpenMP here
Expand Down
2 changes: 0 additions & 2 deletions pyqint/integrals.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "cgf.h"
#include "factorials.h"

typedef std::vector<std::vector<double>> MATDOUBLE;

class Integrator {
private:
std::string compile_date;
Expand Down

0 comments on commit c98a5ee

Please sign in to comment.