Commit 3983d5dd by Francois Gygi

randomize: return if basis is zero


git-svn-id: http://qboxcode.org/svn/qb/trunk@398 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 7d43498f
......@@ -3,7 +3,7 @@
// SlaterDet.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: SlaterDet.C,v 1.35 2005-03-17 17:18:27 fgygi Exp $
// $Id: SlaterDet.C,v 1.36 2005-05-31 18:16:46 fgygi Exp $
#include "SlaterDet.h"
#include "FourierTransform.h"
......@@ -943,6 +943,8 @@ double SlaterDet::ortho_error(void)
////////////////////////////////////////////////////////////////////////////////
void SlaterDet::randomize(double amplitude)
{
if ( basis_->size() == 0 )
return;
// Note: randomization results depend on the process grid size and shape
srand48(ctxt_.myproc());
for ( int n = 0; n < c_.nloc(); n++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment