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

« back to all changes in this revision

Viewing changes to src/bin/cchbar/get_params.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 <stdio.h>
 
2
#include <stdlib.h>
2
3
#include <math.h>
3
4
#include <libipv1/ip_lib.h>
4
5
#include <libciomr/libciomr.h>
8
9
void get_params()
9
10
{
10
11
  int errcod;
 
12
  char *junk;
11
13
 
12
14
  fndcor(&(params.memory),infile,outfile);
13
15
 
 
16
  /* compute the Tamplitude equation matrix elements (usually 0) */
 
17
  params.Tamplitude = 0;
 
18
  errcod = ip_boolean("TAMPLITUDE", &(params.Tamplitude),0);
 
19
 
14
20
  params.cachelev = 2;
15
21
  errcod = ip_data("CACHELEV", "%d", &(params.cachelev),0);
 
22
 
 
23
  params.print = 0;
 
24
  errcod = ip_data("PRINT", "%d", &(params.print),0);
 
25
 
 
26
  errcod = ip_string("WFN", &(params.wfn), 0);
 
27
 
 
28
  params.dertype = 0;
 
29
  if(ip_exist("DERTYPE",0)) {
 
30
    errcod = ip_string("DERTYPE", &(junk),0);
 
31
    if(errcod != IPE_OK) params.dertype = 0;
 
32
    else if(!strcmp(junk,"NONE")) params.dertype = 0;
 
33
    else if(!strcmp(junk,"FIRST")) params.dertype = 1;
 
34
    else if(!strcmp(junk,"RESPONSE")) params.dertype = 3; /* linear response */
 
35
    else {
 
36
      printf("Invalid value of input keyword DERTYPE: %s\n", junk);
 
37
      exit(PSI_RETURN_FAILURE); 
 
38
    }
 
39
    free(junk);
 
40
  }
 
41
 
 
42
  /* Should we use the minimal-disk algorithm for Wabei?  It's VERY slow! */
 
43
  params.wabei_lowdisk = 0;
 
44
  errcod = ip_boolean("WABEI_LOWDISK", &params.wabei_lowdisk, 0);
16
45
}
17
46