~ubuntu-branches/ubuntu/trusty/psicode/trusty

« back to all changes in this revision

Viewing changes to src/bin/ccenergy/denom.cc

  • 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
/*! \file
 
2
    \ingroup CCENERGY
 
3
    \brief Enter brief description of file here 
 
4
*/
 
5
#include <cstdio>
 
6
#include <cstdlib>
 
7
#include <libdpd/dpd.h>
 
8
#include "Params.h"
 
9
#include "Local.h"
 
10
#define EXTERN
 
11
#include "globals.h"
 
12
 
 
13
namespace psi { namespace ccenergy {
 
14
 
 
15
void local_filter_T1(dpdfile2 *T1);
 
16
void dijabT2(void);
 
17
 
 
18
/* apply denominators to t1 and t2 */
 
19
 
 
20
void denom(void)
 
21
{
 
22
  dpdfile2 newtIA, dIA, tIA, newtia, dia, tia;
 
23
 
 
24
  if (params.ref == 0) {
 
25
    dpd_file2_init(&newtIA, CC_OEI, 0, 0, 1, "New tIA");
 
26
    dpd_file2_copy(&newtIA, CC_OEI, "New tIA Increment");
 
27
    dpd_file2_close(&newtIA);
 
28
 
 
29
    dpd_file2_init(&newtIA, CC_OEI, 0, 0, 1, "New tIA Increment");
 
30
    if(params.local && local.filter_singles) {
 
31
      local_filter_T1(&newtIA);
 
32
    }
 
33
    else {
 
34
      dpd_file2_init(&dIA, CC_OEI, 0, 0, 1, "dIA");
 
35
      dpd_file2_dirprd(&dIA, &newtIA);
 
36
      dpd_file2_close(&dIA);
 
37
    }
 
38
    dpd_file2_close(&newtIA);
 
39
 
 
40
    /* Add the new increment to the old tIA to get the New tIA */
 
41
    dpd_file2_init(&tIA, CC_OEI, 0, 0, 1, "tIA");
 
42
    dpd_file2_copy(&tIA, CC_OEI, "New tIA");
 
43
    dpd_file2_close(&tIA);
 
44
    dpd_file2_init(&newtIA, CC_OEI, 0, 0, 1, "New tIA");
 
45
    dpd_file2_init(&tIA, CC_OEI, 0, 0, 1, "New tIA Increment");
 
46
    dpd_file2_axpy(&tIA, &newtIA, 1, 0);
 
47
    dpd_file2_close(&tIA);
 
48
    dpd_file2_close(&newtIA);
 
49
  }
 
50
  else if (params.ref == 1) {
 
51
    dpd_file2_init(&newtIA, CC_OEI, 0, 0, 1, "New tIA");
 
52
    dpd_file2_init(&dIA, CC_OEI, 0, 0, 1, "dIA");
 
53
    dpd_file2_dirprd(&dIA, &newtIA);
 
54
    dpd_file2_close(&dIA);
 
55
    dpd_file2_close(&newtIA); 
 
56
 
 
57
    dpd_file2_init(&newtia, CC_OEI, 0, 0, 1, "New tia");
 
58
    dpd_file2_init(&dia, CC_OEI, 0, 0, 1, "dia");
 
59
    dpd_file2_dirprd(&dia, &newtia);
 
60
    dpd_file2_close(&dia);
 
61
    dpd_file2_close(&newtia);
 
62
  }
 
63
  else if (params.ref == 2) {
 
64
    dpd_file2_init(&newtIA, CC_OEI, 0, 0, 1, "New tIA");
 
65
    dpd_file2_init(&dIA, CC_OEI, 0, 0, 1, "dIA");
 
66
    dpd_file2_dirprd(&dIA, &newtIA);
 
67
    dpd_file2_close(&dIA);
 
68
    dpd_file2_close(&newtIA);
 
69
 
 
70
    dpd_file2_init(&newtia, CC_OEI, 0, 2, 3, "New tia");
 
71
    dpd_file2_init(&dia, CC_OEI, 0, 2, 3, "dia");
 
72
    dpd_file2_dirprd(&dia, &newtia);
 
73
    dpd_file2_close(&dia);
 
74
    dpd_file2_close(&newtia);
 
75
  }
 
76
 
 
77
  dijabT2(); 
 
78
 
 
79
  return;
 
80
}
 
81
}} // namespace psi::ccenergy