Permalink
Browse files

Fix some gcc compatiblity issues

  • Loading branch information...
mfherbst committed Jun 27, 2017
1 parent 41fc385 commit 15d644c172255d6f00d1114a26c6ed9a30ae7bdc
Showing with 18 additions and 4 deletions.
  1. +2 −1 AUTORS.md
  2. +11 −0 CMakeLists.txt
  3. +1 −1 src/molsturm/OverlapMatrix.hh
  4. +4 −2 src/molsturm_iface/export_hf_results.cc
@@ -1,6 +1,7 @@
# molsturm authors
Please send bugs or suggestions to one of the principle authors below.
Please either report bugs or suggestions on [github](https://github.com/molsturm/molsturm.git)
or send them directly to the principle authors.
## Principle authors
- Michael F. Herbst (info@michael-herbst.com)
@@ -68,6 +68,17 @@ if (CMAKE_VERSION VERSION_GREATER 3.5.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
if (NOT BUILD_SHARED_LIBS)
# Since the python interface goes via a shared library
# we need to enable -fPIC even if we are actually building
# the libraries statically.
# TODO Do not do this for executables ... there we strictly
# speaking do not need this ... but then in fact
# we don't really have any other executables than the
# examples and the tests
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
# setup hard dependencies
include(cmake/setup_dependencies.cmake)
@@ -42,7 +42,7 @@ class OverlapMatrix<StoredMatrix, RestrictionType::Unrestricted>
public:
typedef gint::Integral<StoredMatrix> int_term_type;
OverlapMatrix(int_term_type S_bb)
: linalgwrap::BlockDiagonalMatrix<int_term_type, 2>({{S_bb, S_bb}}) {}
: linalgwrap::BlockDiagonalMatrix<int_term_type, 2>{{{S_bb, S_bb}}} {}
const int_term_type& block_alpha() const { return this->diag_blocks()[0]; }
const int_term_type& block_beta() const { return this->diag_blocks()[1]; }
};
@@ -246,7 +246,9 @@ HfResults export_hf_results(const State& state, const gint::ERITensor_i<scalar_t
const size_t n_bas = restricted ? fbb.n_rows() : fbb.n_rows() / 2;
const size_t n_orbs_alpha = restricted ? soln.n_ep() : soln.n_ep() / 2;
const size_t n_orbs_beta = restricted ? n_orbs_alpha : soln.n_ep() / 2;
#ifdef DEBUG
const size_t n_orbs = n_orbs_alpha + n_orbs_beta;
#endif
HfResults ret;
@@ -312,8 +314,8 @@ HfResults export_hf_results(const State& state, const gint::ERITensor_i<scalar_t
for (const auto& id_term : fbb.terms_1e()) hcore_block += id_term.second;
// The full hcore matrix (alpha-alpha and beta-beta block along the diagonal)
linalgwrap::BlockDiagonalMatrix<linalgwrap::LazyMatrixSum<matrix_type>, 2> hcore_bb(
{{hcore_block, hcore_block}});
linalgwrap::BlockDiagonalMatrix<linalgwrap::LazyMatrixSum<matrix_type>, 2> hcore_bb{
{{hcore_block, hcore_block}}};
// Compute the full one electron matrix in MO space, i.e. C^T * (Hcore_bb * C)
// => Need a dot product here, so actually the dot of all vectors with another

0 comments on commit 15d644c

Please sign in to comment.