MPQC
3.0.0-alpha
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
31
namespace
sc
{
32
33
namespace
sma2 {
34
37
class
Array24SCExtrapData
:
public
sc::SCExtrapData
{
38
private
:
39
Array<2>
array2_;
40
Array<4>
array4_;
41
double
bound_;
42
bool
distrib2_;
43
bool
distrib4_;
44
sc::Ref<sc::MessageGrp>
msg_;
45
public
:
46
Array24SCExtrapData
(
Array<2>
&,
bool
distrib2,
47
Array<4>
&,
bool
distrib4,
48
const
sc::Ref<sc::MessageGrp>
&msg);
49
~
Array24SCExtrapData
();
50
void
save_data_state
(
sc::StateOut
&);
51
52
sc::SCExtrapData
*
copy
();
53
void
zero
();
54
void
accumulate_scaled
(
double
,
const
sc::Ref<sc::SCExtrapData>
&);
55
void
update(
Array<2>
&array2,
Array<4>
&array4);
56
};
57
60
class
Array24SCExtrapError
:
public
sc::SCExtrapError
{
61
private
:
62
Array<2>
array2_;
63
Array<4>
array4_;
64
double
bound_;
65
bool
distrib2_;
66
bool
distrib4_;
67
sc::Ref<sc::MessageGrp>
msg_;
68
public
:
69
Array24SCExtrapError
(
Array<2>
&,
bool
distrib2,
70
Array<4>
&,
bool
distrib4,
71
const
sc::Ref<sc::MessageGrp>
&msg);
72
~
Array24SCExtrapError
();
73
void
save_data_state
(
sc::StateOut
&);
74
75
double
error
();
76
double
scalar_product
(
const
sc::Ref<sc::SCExtrapError>
&);
77
};
78
81
class
Array2SCExtrapData
:
public
sc::SCExtrapData
{
82
private
:
83
Array<2>
array_;
84
double
bound_;
85
bool
distrib_;
86
sc::Ref<sc::MessageGrp>
msg_;
87
public
:
88
Array2SCExtrapData
(
Array<2>
&,
bool
distrib,
89
const
sc::Ref<sc::MessageGrp>
&msg);
90
~
Array2SCExtrapData
();
91
void
save_data_state
(
sc::StateOut
&);
92
93
sc::SCExtrapData
*
copy
();
94
void
zero
();
95
void
accumulate_scaled
(
double
,
const
sc::Ref<sc::SCExtrapData>
&);
96
void
update(
Array<2>
&array);
97
};
98
101
class
Array2SCExtrapError
:
public
sc::SCExtrapError
{
102
private
:
103
Array<2>
array_;
104
double
bound_;
105
bool
distrib_;
106
sc::Ref<sc::MessageGrp>
msg_;
107
public
:
108
Array2SCExtrapError
(
Array<2>
&,
bool
distrib,
109
const
sc::Ref<sc::MessageGrp>
&msg);
110
~
Array2SCExtrapError
();
111
void
save_data_state
(
sc::StateOut
&);
112
113
double
error
();
114
double
scalar_product
(
const
sc::Ref<sc::SCExtrapError>
&);
115
};
116
119
class
Array4SCExtrapData
:
public
sc::SCExtrapData
{
120
private
:
121
Array<4>
array_;
122
double
bound_;
123
bool
distrib_;
124
sc::Ref<sc::MessageGrp>
msg_;
125
public
:
126
Array4SCExtrapData
(
Array<4>
&,
bool
distrib,
127
const
sc::Ref<sc::MessageGrp>
&msg);
128
~
Array4SCExtrapData
();
129
void
save_data_state
(
sc::StateOut
&);
130
131
sc::SCExtrapData
*
copy
();
132
void
zero
();
133
void
accumulate_scaled
(
double
,
const
sc::Ref<sc::SCExtrapData>
&);
134
void
update(
Array<4>
&array);
135
};
136
139
class
Array4SCExtrapError
:
public
sc::SCExtrapError
{
140
private
:
141
Array<4>
array_;
142
double
bound_;
143
bool
distrib_;
144
sc::Ref<sc::MessageGrp>
msg_;
145
public
:
146
Array4SCExtrapError
(
Array<4>
&,
bool
distrib,
147
const
sc::Ref<sc::MessageGrp>
&msg);
148
~
Array4SCExtrapError
();
149
void
save_data_state
(
sc::StateOut
&);
150
151
double
error
();
152
double
scalar_product
(
const
sc::Ref<sc::SCExtrapError>
&);
153
};
154
157
class
Array6SCExtrapData
:
public
sc::SCExtrapData
{
158
private
:
159
Array<6>
array_;
160
double
bound_;
161
bool
distrib_;
162
sc::Ref<sc::MessageGrp>
msg_;
163
public
:
164
Array6SCExtrapData
(
Array<6>
&,
bool
distrib,
165
const
sc::Ref<sc::MessageGrp>
&msg);
166
~
Array6SCExtrapData
();
167
void
save_data_state
(
sc::StateOut
&);
168
169
sc::SCExtrapData
*
copy
();
170
void
zero
();
171
void
accumulate_scaled
(
double
,
const
sc::Ref<sc::SCExtrapData>
&);
172
void
update(
Array<6>
&array);
173
};
174
177
class
Array6SCExtrapError
:
public
sc::SCExtrapError
{
178
private
:
179
Array<6>
array_;
180
double
bound_;
181
bool
distrib_;
182
sc::Ref<sc::MessageGrp>
msg_;
183
public
:
184
Array6SCExtrapError
(
Array<6>
&,
bool
distrib,
185
const
sc::Ref<sc::MessageGrp>
&msg);
186
~
Array6SCExtrapError
();
187
void
save_data_state
(
sc::StateOut
&);
188
189
double
error
();
190
double
scalar_product
(
const
sc::Ref<sc::SCExtrapError>
&);
191
};
192
193
}
194
195
}
196
197
#endif
sc::sma2::Array24SCExtrapError::error
double error()
Returns some measure of the total error.
sc::sma2::Array6SCExtrapData::copy
sc::SCExtrapData * copy()
Return a copy of this.
sc::sma2::Array4SCExtrapData::copy
sc::SCExtrapData * copy()
Return a copy of this.
sc::sma2::Array2SCExtrapData::save_data_state
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::Ref< sc::MessageGrp >
sc::sma2::Array2SCExtrapError::save_data_state
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::sma2::Array24SCExtrapError
This permits an Array<2> and an Array<4> to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:60
sc::sma2::Array6SCExtrapData
This permits Array<6>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:157
sc::sma2::Array6SCExtrapData::save_data_state
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::sma2::Array2SCExtrapError::scalar_product
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
sc::sma2::Array2SCExtrapError::error
double error()
Returns some measure of the total error.
sc::sma2::Array2SCExtrapData::accumulate_scaled
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::sma2::Array6SCExtrapError::error
double error()
Returns some measure of the total error.
sc::sma2::Array2SCExtrapError
This permits Array<2>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:101
sc::sma2::Array4SCExtrapError::scalar_product
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
sc::sma2::Array6SCExtrapData::zero
void zero()
Set this to zero.
sc::sma2::Array24SCExtrapData::zero
void zero()
Set this to zero.
sc::sma2::Array24SCExtrapData
This permits an Array<2> and an Array<4> to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:37
sc::sma2::Array4SCExtrapData::save_data_state
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::sma2::Array24SCExtrapError::scalar_product
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
sc::sma2::Array< 2 >
sc::SCExtrapData
SCExtrapData hold the data to be extrapolated needed by SelfConsistentExtrapolation.
Definition:
scextrap.h:39
sc::sma2::Array6SCExtrapError::scalar_product
double scalar_product(const sc::Ref< sc::SCExtrapError > &)
Performs a scalar product between this and the given SCExtrapError.
sc::sma2::Array4SCExtrapData::accumulate_scaled
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::sma2::Array4SCExtrapError::save_data_state
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::sma2::Array2SCExtrapData
This permits Array<2>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:81
sc::StateOut
Definition:
stateout.h:71
sc::SCExtrapError
SCExtrapError holds the error data needed by SelfConsistentExtrapolation.
Definition:
scextrap.h:61
sc::sma2::Array2SCExtrapData::copy
sc::SCExtrapData * copy()
Return a copy of this.
sc::sma2::Array6SCExtrapError
This permits Array<6>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:177
sc::sma2::Array4SCExtrapData::zero
void zero()
Set this to zero.
sc::sma2::Array2SCExtrapData::zero
void zero()
Set this to zero.
sc::sma2::Array24SCExtrapData::save_data_state
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::sma2::Array4SCExtrapData
This permits Array<4>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:119
sc::sma2::Array4SCExtrapError
This permits Array<4>'s to be used with SelfConsistentExtrapolation derivatives.
Definition:
extrap.h:139
sc::sma2::Array6SCExtrapData::accumulate_scaled
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::sma2::Array24SCExtrapError::save_data_state
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::sma2::Array24SCExtrapData::copy
sc::SCExtrapData * copy()
Return a copy of this.
sc
Contains all MPQC code up to version 3.
Definition:
mpqcin.h:14
sc::sma2::Array4SCExtrapError::error
double error()
Returns some measure of the total error.
sc::sma2::Array24SCExtrapData::accumulate_scaled
void accumulate_scaled(double, const sc::Ref< sc::SCExtrapData > &)
The passed SCExtrapData is accumulated into this after applying the scaling factor.
sc::sma2::Array6SCExtrapError::save_data_state
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 ...
Generated at Sun Jan 26 2020 23:23:58 for
MPQC
3.0.0-alpha using the documentation package
Doxygen
1.8.16.