Commit Graph

13 Commits

Author SHA1 Message Date
François Coppens
8d63dd1701 The algorithm now works for the following 4x4 example with 2 updates:
S = [1,0,1,-1; 0,1,1,0; -1,0,-1,0; 1,1,1,1]
S_inv = [1,-1,1,1; 1,0,2,1; -1,1,-2,-1; -1,0,-1,0]
u1 = [0,-2,0,0]
u2 = [0,-1,0,0]
upd_idx = [2,4]

To go from Maponi's examples where the number of updates is always equal
to the the dimension of the matrix, and the decomposition is always
diagonal, to cases with a non-diagonal decomposition and a number of
updates unequal to its size, the following changed needed to be made:

* in the calculation of the {y0k} an extra inner for-loop needs to be
  added to make it a full matrix-vector multiplication due to the fact
  that A0 is not a diagonal matrix

* in some places the use of the update-order vector p needs
  the be replaced with that of upd_idx to make sure the correct
  component of the ylk is selected and the proper rank-1 matrices are
  constructed

* when a matrix is passed from Fortran to C++ with 2D adressing, it is
  passed in colum-major order. The passed matrix needs to be transposed
  before passing to C++. Doing this inside the algorithm will break
  compatibility with called from C/C++.
2021-02-22 15:41:30 +01:00
François Coppens
5b56a8e8a7 Debugging in progress... 2021-02-22 15:38:39 +01:00
François
48c27eb47e * Modified Maponi algo 3 so that it can be used with a number of updates
that is smaller than the size of the Slater-matrix
* Removed the Slater-matrix as an argument, since it is not used in the
  algo.
* Added a manual 4x4 example to debug MaponiA3 to work with a number of
  updates that is smaller than the size of the Slater-matrix
* Added a new Octave script to quickly check if the computes inverse is
  correct.
2021-02-22 15:34:34 +01:00
François Coppens
6b699143b5 Added some test output in the Fortran prgram to load into Octave for quick checking. 2021-02-12 17:48:49 +01:00
François Coppens
1b3a1d9d22 Added QMCChem test dataset with 3 updates. Renamed files, added the Fortran program QMCChem_dataset_test.f90 to start testing the QMCChem dataset. Wrote and tested Fortran code to import the test dataset. 2021-02-12 12:04:21 +01:00
Pablo Oliveira
da41c57ee2 No need to zero out breakdown vector 2021-02-09 15:09:37 +01:00
Pablo Oliveira
2d2085f739 Simplify initialization with 0 2021-02-09 15:07:55 +01:00
Pablo Oliveira
b9efd7ef0b Optimize out the U 2021-02-09 15:05:11 +01:00
Pablo Oliveira
aa78f94177 Apply clang-format 2021-02-09 14:46:28 +01:00
Pablo Oliveira
b575cda8d6 Optimize out Identity matrix 2021-02-09 14:44:54 +01:00
Pablo Oliveira
6f34f485d3 C++ redesign of data-structures
- Use flat arrays
- Use real type for all matrices
- Merge _f MaponiA3 files
2021-02-09 14:34:39 +01:00
François Coppens
84fffdb7fa Prepared the example matrix of Example 8 of the paper and its
decomposition in the Fortran code and made a basic call to the
subroutine MYSUBROUTINE, which is bound to the C++ void function
'Sherman-Morrison();. For now compilation fails with lots of undefined
references.'
2021-02-04 13:12:47 +01:00
François Coppens
090847247d Prepared the main Fortran infrastructure for the C++ calls. Updated the makefile. 2021-02-04 11:39:00 +01:00