Changeset debc65
- Timestamp:
- Oct 5, 2012, 10:58:05 AM (13 years ago)
- Children:
- b88be2
- Parents:
- cd2e34
- File:
-
- 1 edited
-
src/bin/mpqc/mpqc.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/bin/mpqc/mpqc.cc
rcd2e34 rdebc65 1696 1696 max.z() = min.z() + data.sampled_grid.size/AtomicLengthToAngstroem; 1697 1697 const int gridpoints = pow(2,data.sampled_grid.level); 1698 // due to periodic boundary conditions, we don't need gridpoints-1 here 1699 // TODO: in case of open boundary conditions, we need data on the right 1700 // hand side boundary as well 1698 1701 delta = (data.sampled_grid.size/AtomicLengthToAngstroem) / (double) gridpoints; 1699 1702 std::cout << "Grid starts at " << min … … 1714 1717 for (size_t y=0; y< gridpoints; ++y, r.y() += delta) { 1715 1718 for (size_t z=0; z< gridpoints; ++z, r.z() += delta) { 1716 if (((r.x() < bmin.x()-boundary) || (r.x() > bmax.x()+boundary))1717 || ((r.y() < bmin.y()-boundary) || (r.y() > bmax.y()+boundary))1718 || ((r.z() < bmin.z()-boundary) || (r.z() > bmax.y()+boundary))) {1719 if (((r.x() < (bmin.x()-boundary)) || (r.x() > (bmax.x()+boundary))) 1720 || ((r.y() < (bmin.y()-boundary)) || (r.y() > (bmax.y()+boundary))) 1721 || ((r.z() < (bmin.z()-boundary)) || (r.z() > (bmax.z()+boundary)))) { 1719 1722 data.sampled_grid.sampled_grid.push_back(0.); 1720 1723 } else { … … 1737 1740 integral_value += *diter; 1738 1741 integral_value *= pow(delta*AtomicLengthToAngstroem,3); 1739 const double normalization = scf->nelectron()/integral_value; 1742 const double normalization = 1743 ((integral_value == 0) && (scf->nelectron() == 0)) ? 1744 1. : scf->nelectron()/integral_value; 1740 1745 std::cout << "Created " << data.sampled_grid.sampled_grid.size() << " grid points " 1741 1746 << " with integral value of " << integral_value
Note:
See TracChangeset
for help on using the changeset viewer.
