~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libint/emit_hrr_build_macro.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include <math.h>
2
2
#include <stdio.h>
3
3
#include "build_libint.h"
 
4
#include <libint/constants.h>
4
5
 
5
6
extern FILE *outfile, *hrr_header;
6
7
extern LibintParams_t Params;
7
8
 
8
9
extern void punt(char *);
9
 
static int hash(int a[2][3], int b[2]);
10
10
 
11
11
int emit_hrr_build_macro()
12
12
{
34
34
  int curr_count,curr_subfunction;
35
35
  int num_subfunctions, subbatch_length;
36
36
  int f;
37
 
  static int io[] = {1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153};
38
 
  static const char am_letter[] = "0pdfghiklmnoqrtuvwxyz";
39
37
  char code_name[20];
40
38
  char function_name[18];
41
39
  char **subfunction_name;
220
218
}
221
219
 
222
220
 
223
 
/*----------------------------------------------------------------------------------
224
 
  hash(a,b) returns a number of the (a[0] a[1]) type product within a doublet.
225
 
  a contains x y and z exponents of functions on centers A and B, and b contains
226
 
  their angular momenta
227
 
 ----------------------------------------------------------------------------------*/
228
 
 
229
 
int hash(a, b)
230
 
  int a[2][3];
231
 
  int b[2];
232
 
{
233
 
  int c[2] = {0,0};
234
 
  int i;
235
 
  static int io[] = {0,1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153};
236
 
 
237
 
  if(b[0]){
238
 
    i=b[0]-a[0][0];
239
 
    c[0]=i+io[i]-a[0][1];
240
 
    }
241
 
  if(b[1]){
242
 
    i=b[1]-a[1][0];
243
 
    c[1]=i+io[i]-a[1][1];
244
 
    }
245
 
 
246
 
  return c[0]*io[b[1]+1]+c[1];
247
 
}