New templating mechanism

4 views
Skip to first unread message

Lucas Wagner

unread,
May 4, 2011, 6:36:10 PM5/4/11
to qwalk-de...@googlegroups.com
Hi everyone,

After some comments from Paul Kent, I decided to go ahead and work on
fixing the unnecessary code duplication that has entered the wave
function/basis_function/MO objects after QWalk began to support
complex wave functions. I've begun this process by rewriting
MO_matrix as a templated class, that can go as either double or
complex<double>. By using some simple typedefs, this slots easily
into the old style, so little alteration of old code is needed.
However, I reimplemented CUTOFF_MO and the new EINSPLINE_MO (that will
replace the crusty BSPLINE_MO) in this new style. This removed around
2000 lines of nearly duplicated code.

We can clearly move this up the chain to the wave function objects,
which hopefully will help with a lot of the duplicated work that goes
on there. I'm waiting a little bit to do so, because I have some
ideas kicking around about how to help with some of the other ways we
have duplicated code. I need to look into this a bit, though.

I've been working on an improved abinit stack. I and Tim Mueller at
MIT are working out a standard stack based on abinit that hopefully
will help a bit with making the straightforward calculations actually
straightforward. You can check that out in
src/converter/abinit2qmc2.cpp. It will likely be changing quickly.

Any suggestions, comments, or found bugs in the new code would be
highly appreciated; I'm still testing out some of the new stuff.

Cheers,

Lucas

Reply all
Reply to author
Forward
0 new messages