MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
extrap.h
1
2/*
3 * Copyright 2009 Sandia Corporation. Under the terms of Contract
4 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
5 * retains certain rights in this software.
6 *
7 * This file is a part of the MPQC LMP2 library.
8 *
9 * The MPQC LMP2 library is free software: you can redistribute it
10 * and/or modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation, either
12 * version 3 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this program. If not, see
21 * <http://www.gnu.org/licenses/>.
22 *
23 */
24
25#ifndef _chemistry_qc_lmp2_extrap_h
26#define _chemistry_qc_lmp2_extrap_h
27
28#include <math/optimize/scextrap.h>
29#include <chemistry/qc/lmp2/sma.h>
30
31namespace sc {
32
33namespace sma2 {
34
38 private:
39 Array<2> array2_;
40 Array<4> array4_;
41 double bound_;
42 bool distrib2_;
43 bool distrib4_;
45 public:
46 Array24SCExtrapData(Array<2>&, bool distrib2,
47 Array<4>&, bool distrib4,
48 const sc::Ref<sc::MessageGrp>&msg);
51
53 void zero();
55 void update(Array<2> &array2, Array<4> &array4);
56};
57
61 private:
62 Array<2> array2_;
63 Array<4> array4_;
64 double bound_;
65 bool distrib2_;
66 bool distrib4_;
68 public:
69 Array24SCExtrapError(Array<2>&, bool distrib2,
70 Array<4>&, bool distrib4,
71 const sc::Ref<sc::MessageGrp>&msg);
74
75 double error();
77};
78
82 private:
83 Array<2> array_;
84 double bound_;
85 bool distrib_;
87 public:
88 Array2SCExtrapData(Array<2>&, bool distrib,
89 const sc::Ref<sc::MessageGrp>&msg);
92
94 void zero();
96 void update(Array<2> &array);
97};
98
102 private:
103 Array<2> array_;
104 double bound_;
105 bool distrib_;
107 public:
108 Array2SCExtrapError(Array<2>&,bool distrib,
109 const sc::Ref<sc::MessageGrp>&msg);
112
113 double error();
115};
116
120 private:
121 Array<4> array_;
122 double bound_;
123 bool distrib_;
125 public:
126 Array4SCExtrapData(Array<4>&,bool distrib,
127 const sc::Ref<sc::MessageGrp>&msg);
130
132 void zero();
134 void update(Array<4> &array);
135};
136
140 private:
141 Array<4> array_;
142 double bound_;
143 bool distrib_;
145 public:
146 Array4SCExtrapError(Array<4>&,bool distrib,
147 const sc::Ref<sc::MessageGrp>&msg);
150
151 double error();
153};
154
158 private:
159 Array<6> array_;
160 double bound_;
161 bool distrib_;
163 public:
164 Array6SCExtrapData(Array<6>&,bool distrib,
165 const sc::Ref<sc::MessageGrp>&msg);
168
170 void zero();
172 void update(Array<6> &array);
173};
174
178 private:
179 Array<6> array_;
180 double bound_;
181 bool distrib_;
183 public:
184 Array6SCExtrapError(Array<6>&,bool distrib,
185 const sc::Ref<sc::MessageGrp>&msg);
188
189 double error();
191};
192
193}
194
195}
196
197#endif
A template class that maintains references counts.
Definition ref.h:361
SCExtrapData hold the data to be extrapolated needed by SelfConsistentExtrapolation.
Definition scextrap.h:39
SCExtrapError holds the error data needed by SelfConsistentExtrapolation.
Definition scextrap.h:61
Serializes fundamental and user-defined types.
Definition stateout.h:71
This permits an Array<2> and an Array<4> to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:37
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::SCExtrapData * copy()
Return a copy of this.
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
void zero()
Set this to zero.
This permits an Array<2> and an Array<4> to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:60
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
double error()
Returns some measure of the total error.
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
This permits Array<2>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:81
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::SCExtrapData * copy()
Return a copy of this.
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void zero()
Set this to zero.
This permits Array<2>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:101
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
double error()
Returns some measure of the total error.
This permits Array<4>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:119
void zero()
Set this to zero.
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::SCExtrapData * copy()
Return a copy of this.
This permits Array<4>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:139
double error()
Returns some measure of the total error.
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
This permits Array<6>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:157
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::SCExtrapData * copy()
Return a copy of this.
void zero()
Set this to zero.
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
This permits Array<6>'s to be used with SelfConsistentExtrapolation derivatives.
Definition extrap.h:177
void save_data_state(sc::StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
double error()
Returns some measure of the total error.
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
Implements a block sparse tensor.
Definition sma.h:1247
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.