MADNESS 0.10.1
fcwf.h
Go to the documentation of this file.
1#ifndef MADNESS_APPS_MOLDFT_FCWF_H_INCLUDED
2#define MADNESS_APPS_MOLDFT_FCWF_H_INCLUDED
3
4#include <madness/mra/mra.h>
6#include <vector>
7#include <math.h>
8#include <complex>
9
10using namespace madness;
11
12class Fcwf{
13 std::vector<complex_function_3d> m_psi;
15
16public:
17
18 Fcwf();
19
20 Fcwf(const complex_function_3d& wf1,
21 const complex_function_3d& wf2,
22 const complex_function_3d& wf3,
23 const complex_function_3d& wf4);
24
25 Fcwf(World& world);
26
27 complex_function_3d& operator[](const int i);
28
29 const complex_function_3d& operator[](const int i) const ;
30
31 explicit Fcwf(std::vector<complex_function_3d>& phi);
32
33 bool getinitialize();
34
35 bool getinitialize() const ;
36
37 unsigned int size();
38
39 unsigned int size() const ;
40
41 Fcwf(const Fcwf& phi);
42
43 Fcwf operator=(const Fcwf& phi);
44
45 Fcwf operator-(const Fcwf& phi) const ;
46
47 Fcwf operator+(const Fcwf& phi);
48
49 Fcwf operator*(std::complex<double> a) const ;
50
51 void scale(std::complex<double> a);
52
53 Fcwf operator+=(const Fcwf& phi);
54
55 Fcwf operator-=(const Fcwf& phi);
56
57 double norm2();
58
59 void normalize();
60
62
64
65 void truncate();
66
67 std::complex<double> inner(World& world, const Fcwf& phi) const;
68
69 void apply(World& world, real_convolution_3d& op);
70
71 void apply(World& world, complex_derivative_3d& D);
72
73 void reconstruct();
74
75 void compress();
76
78
79};
80
81std::complex<double> inner(const Fcwf& psi, const Fcwf& phi);
82
83Fcwf apply(World& world, real_convolution_3d& op, const Fcwf& psi);
84
86
88
90
92
94
96
97std::complex<double> inner(std::vector<Fcwf>& a, std::vector<Fcwf>& b);
98
99std::vector<Fcwf> operator*(const std::vector<Fcwf>& psis, std::complex<double> a);
100
101std::vector<Fcwf> operator*(std::complex<double> a, const std::vector<Fcwf>& psis);
102
103void operator+=(std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi);
104
105std::vector<Fcwf> operator-(const std::vector<Fcwf>& phi, const std::vector<Fcwf>& psi);
106
107Tensor<std::complex<double>> matrix_inner(World& world, std::vector<Fcwf>& a, std::vector<Fcwf>& b);
108
109std::vector<Fcwf> transform(World& world, std::vector<Fcwf>& a, Tensor<std::complex<double>> U);
110
111//allocator class needed for KAIN
114 unsigned int m_size;
115 public:
116 //Constructor
117 Fcwf_vector_allocator(World& world, unsigned int m_size);
118
119 //Overloading () operator
120 std::vector<Fcwf> operator()();
121
122 //Copy Constructor
124
125 void set_size(int size);
126};
127
128#endif
129
130//kthxbye
Definition fcwf.h:112
unsigned int m_size
Definition fcwf.h:114
void set_size(int size)
Definition fcwf.cc:426
Fcwf_vector_allocator operator=(const Fcwf_vector_allocator &other)
Definition fcwf.cc:421
std::vector< Fcwf > operator()()
Definition fcwf.cc:412
World & world
Definition fcwf.h:113
Definition fcwf.h:12
void scale(std::complex< double > a)
Definition fcwf.cc:144
Fcwf operator+=(const Fcwf &phi)
Definition fcwf.cc:152
Fcwf operator+(const Fcwf &phi)
Definition fcwf.cc:117
complex_function_3d & operator[](const int i)
Definition fcwf.cc:38
Fcwf KramersPair()
Definition fcwf.cc:266
Fcwf()
Definition fcwf.cc:11
bool m_initialized
Definition fcwf.h:14
void apply(World &world, real_convolution_3d &op)
Definition fcwf.cc:256
void normalize()
Definition fcwf.cc:203
void truncate()
Definition fcwf.cc:232
void reconstruct()
Definition fcwf.cc:517
Fcwf operator-=(const Fcwf &phi)
Definition fcwf.cc:169
std::vector< complex_function_3d > m_psi
Definition fcwf.h:13
Fcwf operator*(std::complex< double > a) const
Definition fcwf.cc:134
Fcwf operator-(const Fcwf &phi) const
Definition fcwf.cc:99
unsigned int size()
Definition fcwf.cc:70
std::complex< double > inner(World &world, const Fcwf &phi) const
Definition fcwf.cc:240
bool getinitialize()
Definition fcwf.cc:61
Fcwf operator=(const Fcwf &phi)
Definition fcwf.cc:92
double norm2()
Definition fcwf.cc:187
void compress()
Definition fcwf.cc:523
Implements derivatives operators with variety of boundary conditions on simulation domain.
Definition derivative.h:266
A multiresolution adaptive numerical function.
Definition mra.h:122
A tensor is a multidimension array.
Definition tensor.h:317
A parallel world class.
Definition world.h:132
real_function_3d squaremod(Fcwf &psi)
Definition fcwf.cc:295
void operator+=(std::vector< Fcwf > &phi, const std::vector< Fcwf > &psi)
Definition fcwf.cc:375
Tensor< std::complex< double > > matrix_inner(World &world, std::vector< Fcwf > &a, std::vector< Fcwf > &b)
Definition fcwf.cc:431
real_function_3d squaremod_large(Fcwf &psi)
Definition fcwf.cc:311
Fcwf apply(World &world, real_convolution_3d &op, const Fcwf &psi)
Definition fcwf.cc:281
std::vector< Fcwf > operator-(const std::vector< Fcwf > &phi, const std::vector< Fcwf > &psi)
Definition fcwf.cc:388
std::vector< Fcwf > operator*(const std::vector< Fcwf > &psis, std::complex< double > a)
Definition fcwf.cc:354
real_function_3d squaremod_small(Fcwf &psi)
Definition fcwf.cc:303
std::complex< double > inner(const Fcwf &psi, const Fcwf &phi)
Definition fcwf.cc:275
Fcwf copy(Fcwf psi)
Definition fcwf.cc:338
complex_function_3d inner_func(World &world, Fcwf &psi, Fcwf &phi)
Definition fcwf.cc:318
std::vector< Fcwf > transform(World &world, std::vector< Fcwf > &a, Tensor< std::complex< double > > U)
Definition fcwf.cc:477
double psi(const Vector< double, 3 > &r)
Definition hatom_energy.cc:78
Tensor< double > op(const Tensor< double > &x)
Definition kain.cc:508
Main include file for MADNESS and defines Function interface.
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
static const double b
Definition nonlinschro.cc:119
static const double a
Definition nonlinschro.cc:118
Implements most functionality of separated operators.
Definition test_ar.cc:204