MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
fjt.h
1//
2// fjt.h
3//
4// Copyright (C) 2001 Edward Valeev
5//
6// Author: Edward Valeev <evaleev@vt.edu>
7// Maintainer: EV
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _chemistry_qc_basis_fjt_h
29#define _chemistry_qc_basis_fjt_h
30
31#include <util/ref/ref.h>
32
33namespace sc {
34
36 class Fjt: virtual public RefCount {
37 public:
38 Fjt();
39 ~Fjt();
44 virtual double *values(int J, double T) =0;
45 };
46
47#define TAYLOR_INTERPOLATION_ORDER 6
48#define TAYLOR_INTERPOLATION_AND_RECURSION 0 // compute F_lmax(T) and then iterate down to F_0(T)? Else use interpolation only
50 class Taylor_Fjt : public Fjt {
51 static double relative_zero_;
52 public:
53 static const int max_interp_order = 8;
54
55 Taylor_Fjt(unsigned int jmax, double accuracy);
58 double *values(int J, double T);
59 private:
60 double **grid_; /* Table of "exact" Fm(T) values. Row index corresponds to
61 values of T (max_T+1 rows), column index to values
62 of m (max_m+1 columns) */
63 double delT_; /* The step size for T, depends on cutoff */
64 double oodelT_; /* 1.0 / delT_, see above */
65 double cutoff_; /* Tolerance cutoff used in all computations of Fm(T) */
66 int interp_order_; /* Order of (Taylor) interpolation */
67 int max_m_; /* Maximum value of m in the table, depends on cutoff
68 and the number of terms in Taylor interpolation */
69 int max_T_; /* Maximum index of T in the table, depends on cutoff
70 and m */
71 double *T_crit_; /* Maximum T for each row, depends on cutoff;
72 for a given m and T_idx <= max_T_idx[m] use Taylor interpolation,
73 for a given m and T_idx > max_T_idx[m] use the asymptotic formula */
74 double *F_; /* Here computed values of Fj(T) are stored */
75
76 class ExpensiveMath {
77 public:
78 ExpensiveMath(int ifac, int idf);
79 ~ExpensiveMath();
80 double *fac;
81 double *df;
82 };
83 ExpensiveMath ExpMath_;
84 };
85
88 class FJT: public Fjt {
89 private:
90 double **gtable;
91
92 int maxj;
93 double *denomarray;
94 double wval_infinity;
95 int itable_infinity;
96
97 double *int_fjttable;
98
99 int ngtable() const { return maxj + 7; }
100 public:
101 FJT(int n);
102 ~FJT();
104 double *values(int J, double T);
105 };
106
107} // end of namespace sc
108
109#endif // header guard
110
111// Local Variables:
112// mode: c++
113// c-file-style: "CLJ"
114// End:
"Old" intv3 code from Curt Computes F_j(T) using 6-th order Taylor interpolation
Definition fjt.h:88
double * values(int J, double T)
implementation of Fjt::values()
Evaluates the Boys function F_j(T)
Definition fjt.h:36
virtual double * values(int J, double T)=0
Computed F_j(T) for every 0 <= j <= J (total of J+1 doubles).
The base class for all reference counted objects.
Definition ref.h:192
Uses Taylor interpolation of up to 8-th order to compute the Boys function.
Definition fjt.h:50
double * values(int J, double T)
Implements Fjt::values()
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.