~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/bin/cscf/sdot.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Log$
2
 
 * Revision 1.1  2000/02/04 22:52:32  evaleev
3
 
 * Initial revision
4
 
 *
5
 
/* Revision 1.2  1999/08/17 19:04:18  evaleev
6
 
/* Changed the default symmetric orthogonalization to the canonical
7
 
/* orthogonalization. Now, if near-linear dependencies in the basis are found,
8
 
/* eigenvectors of the overlap matrix with eigenvalues less than 1E-6 will be
9
 
/* left out. This will lead to num_mo != num_so, i.e. SCF eigenvector is no
10
 
/* longer a square matrix. Had to rework some routines in libfile30, and add some.
11
 
/* The progrem prints out a warning if near-linear dependencies are found. TRANSQT
12
 
/* and a whole bunch of other codes has to be fixed to work with such basis sets.
13
 
/*
14
 
/* Revision 1.1.1.1  1999/04/12 16:59:27  evaleev
15
 
/* Added a version of CSCF that can work with CINTS.
16
 
/* -Ed
17
 
 */
18
 
 
19
 
static char *rcsid = "$Id: sdot.c 2 2000-02-04 22:50:39Z evaleev $";
20
 
 
21
 
#define EXTERN
22
 
#include "includes.h"
23
 
#include "common.h"
24
 
 
25
 
void sdot(a,b,n,value)
26
 
   double **a, **b, *value;
27
 
   int n;
28
 
 
29
 
   {
30
 
      register int i,j;
31
 
      double *ta, *tb, tval;
32
 
 
33
 
      tval = 0.0;
34
 
      for (i=0; i < n; i++) {
35
 
         ta = a[i];
36
 
         tb = b[i];
37
 
         for (j=0; j <= i; j++,ta++,tb++) {
38
 
            tval += (*ta) * (*tb);
39
 
            }
40
 
         }
41
 
      *value = tval;
42
 
      }
43
 
 
44
 
void vdot(a,b,n,value)
45
 
  double *a,*b,*value;
46
 
  int n;
47
 
{
48
 
  int i;
49
 
  double tval=0.0;
50
 
 
51
 
  for(i=0; i < n ; i++) tval += a[i]*b[i];
52
 
 
53
 
  *value = tval;
54
 
  }