MADNESS 0.10.1
|
Convolutions in separated form (including Gaussian) More...
#include <operator.h>
Classes | |
struct | ApplyTerms |
laziness for calling lists: which terms to apply More... | |
struct | Transformation |
too lazy for extended calling lists More... | |
Public Types | |
typedef Key< NDIM > | keyT |
typedef Q | opT |
The apply function uses this to infer resultT=opT*inputT. | |
Public Types inherited from madness::WorldObject< SeparatedConvolution< Q, NDIM > > | |
typedef WorldObject< SeparatedConvolution< Q, NDIM > > | objT |
Public Member Functions | |
SeparatedConvolution (World &world, const OperatorInfo info1, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k(), bool doleaves=false) | |
Constructor for Gaussian Convolutions (mostly for backward compatability) | |
SeparatedConvolution (World &world, const Tensor< Q > &coeff, const Tensor< double > &expnt, double lo, double thresh, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k(), bool doleaves=false, double mu=0.0) | |
Constructor for Gaussian Convolutions (mostly for backward compatability) | |
SeparatedConvolution (World &world, std::vector< ConvolutionND< Q, NDIM > > &argops, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), long k=FunctionDefaults< NDIM >::get_k(), bool doleaves=false) | |
SeparatedConvolution (World &world, std::vector< std::shared_ptr< Convolution1D< Q > > > &argops, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), long k=FunctionDefaults< NDIM >::get_k(), bool doleaves=false) | |
SeparatedConvolution (World &world, Vector< double, NDIM > args, const Tensor< Q > &coeff, const Tensor< double > &expnt, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k(), bool doleaves=false) | |
WSTHORNTON Constructor for Gaussian Convolutions (mostly for backward compatability) | |
virtual | ~SeparatedConvolution () |
template<typename T > | |
Tensor< TENSOR_RESULT_TYPE(T, Q)> | apply (const Key< NDIM > &source, const Key< NDIM > &shift, const Tensor< T > &coeff, double tol) const |
apply this operator on coefficients in full rank form | |
template<typename T > | |
GenTensor< TENSOR_RESULT_TYPE(T, Q)> | apply2 (const Key< NDIM > &source, const Key< NDIM > &shift, const GenTensor< T > &coeff, double tol, double tol2) const |
apply this operator on coefficients in low rank form | |
template<typename T > | |
GenTensor< TENSOR_RESULT_TYPE(T, Q)> | apply2_lowdim (const Key< NDIM > &source, const Key< NDIM > &shift, const GenTensor< T > &coeff, double tol, double tol2) const |
apply this operator on only 1 particle of the coefficients in low rank form | |
bool & | destructive () |
const bool & | destructive () const |
template<typename T > | |
double | estimate_costs (const Key< NDIM > &source, const Key< NDIM > &shift, const GenTensor< T > &coeff, double tol, double tol2) const |
estimate the ratio of cost of full rank versus low rank | |
const double & | gamma () const |
const BoundaryConditions< NDIM > & | get_bc () const |
const std::vector< Key< NDIM > > & | get_disp (Level n) const |
template<size_t FDIM> | |
std::enable_if< FDIM!=NDIM, Key< NDIM > >::type | get_source_key (const Key< FDIM > key) const |
return that part of a hi-dim key that serves as the base for displacements of this operator | |
template<size_t FDIM> | |
std::enable_if< FDIM==NDIM, Key< NDIM > >::type | get_source_key (const Key< FDIM > key) const |
return that part of a hi-dim key that serves as the base for displacements of this operator | |
void | initialize (const Tensor< Q > &coeff, const Tensor< double > &expnt) |
TensorTrain< double > | make_tt_representation (const Key< NDIM > &source, const Key< NDIM > &shift, double tol, bool do_R, bool do_T) const |
construct the tensortrain representation of the operator | |
bool & | modified () |
const bool & | modified () const |
const double & | mu () const |
double | norm (Level n, const Key< NDIM > &d, const Key< NDIM > &source_key) const |
return the operator norm for all terms, all dimensions and 1 displacement | |
template<typename argT > | |
argT | operator() (const argT &argument) const |
apply this onto another suitable argument, returning the same type | |
template<typename T , size_t FDIM> | |
Function< TENSOR_RESULT_TYPE(T, Q), FDIM > | operator() (const Function< T, FDIM > &f) const |
apply this operator on a function f | |
template<typename T , size_t LDIM> | |
Function< TENSOR_RESULT_TYPE(T, Q), LDIM+LDIM > | operator() (const Function< T, LDIM > &f1, const Function< Q, LDIM > &f2) const |
apply this operator on a separable function f(1,2) = f(1) f(2) | |
template<typename T , size_t FDIM> | |
std::vector< Function< TENSOR_RESULT_TYPE(T, Q), FDIM > > | operator() (const std::vector< Function< T, FDIM > > &f) const |
apply this on a vector of functions | |
template<typename T , size_t LDIM> | |
Function< TENSOR_RESULT_TYPE(T, Q), LDIM+LDIM > | operator() (const std::vector< Function< T, LDIM > > &f1, const std::vector< Function< Q, LDIM > > &f2) const |
apply this operator on a sum of separable functions f(1,2) = \sum_i f_i(1) f_i(2) | |
int & | particle () |
const int & | particle () const |
void | print_timer () const |
void | reset_timer () const |
SeparatedConvolution< Q, NDIM > & | set_particle (const int p) |
Public Member Functions inherited from madness::WorldObject< SeparatedConvolution< Q, NDIM > > | |
WorldObject (const WorldObject &other) | |
WorldObject (World &world) | |
Constructor that associates an object (via the derived class) with a globally unique ID. | |
virtual | ~WorldObject () |
World & | get_world () const |
Returns a reference to the world . | |
const uniqueidT & | id () const |
Returns the globally unique object ID. | |
WorldObject & | operator= (const WorldObject &)=delete |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9) const |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)() . | |
Public Member Functions inherited from madness::WorldObjectBase | |
virtual | ~WorldObjectBase ()=default |
Static Public Member Functions | |
static bool | can_combine (const SeparatedConvolution< Q, NDIM > &left, const SeparatedConvolution< Q, NDIM > &right) |
static SeparatedConvolution< Q, NDIM > | combine (const SeparatedConvolution< Q, NDIM > &left, const SeparatedConvolution< Q, NDIM > &right) |
combine 2 convolution operators to one | |
static OperatorInfo | combine_OT (const SeparatedConvolution< Q, NDIM > &left, const SeparatedConvolution< Q, NDIM > &right) |
return operator type and other info of the combined operator (e.g. fg = f(1,2)* g(1,2) | |
Public Attributes | |
bool | destructive_ =false |
destroy the argument or restore it (expensive for 6d functions) | |
bool | doleaves |
If should be applied to leaf coefficients ... false by default. | |
OperatorInfo | info |
bool | isperiodicsum |
bool | modified_ =false |
use modified NS form | |
int | particle_ =1 |
must only be 1 or 2 | |
bool | print_timings =false |
Timer | timer_full |
Timer | timer_low_accumulate |
Timer | timer_low_transf |
Timer | timer_stats_accumulate |
Static Public Attributes | |
static const size_t | opdim =NDIM |
Private Member Functions | |
template<typename T , typename R > | |
void | apply_transformation (long dimk, const Transformation trans[NDIM], const Tensor< T > &f, Tensor< R > &work1, Tensor< R > &work2, const Q mufac, Tensor< R > &result) const |
template<typename T , typename R > | |
void | apply_transformation2 (Level n, long dimk, double tol, const Tensor< T > trans2[NDIM], const GenTensor< T > &f, GenTensor< R > &work1, GenTensor< R > &work2, const Q mufac, GenTensor< R > &result) const |
don't accumulate, since we want to do this at apply() | |
template<typename T , typename R > | |
void | apply_transformation3 (const Tensor< T > trans2[NDIM], const Tensor< T > &f, const Q mufac, Tensor< R > &result) const |
accumulate into result | |
void | check_cubic () |
const SeparatedConvolutionInternal< Q, NDIM > | getmuop (int mu, Level n, const Key< NDIM > &disp) const |
get the transformation matrices for 1 term and all dimensions and one displacement | |
const SeparatedConvolutionInternal< Q, NDIM > | getmuop_modified (int mu, Level n, const Key< NDIM > &disp, const Key< NDIM > &source) const |
get the transformation matrices for 1 term and all dimensions and one displacement | |
const SeparatedConvolutionData< Q, NDIM > * | getop (Level n, const Key< NDIM > &d, const Key< NDIM > &source) const |
get the data for all terms and all dimensions for one displacement | |
const SeparatedConvolutionData< Q, NDIM > * | getop_modified (Level n, const Key< NDIM > &disp, const Key< NDIM > &source) const |
get the data for all terms and all dimensions for one displacement (modified NS form) | |
const SeparatedConvolutionData< Q, NDIM > * | getop_ns (Level n, const Key< NDIM > &d) const |
get the data for all terms and all dimensions for one displacement | |
double | munorm2 (Level n, const ConvolutionData1D< Q > *ops[]) const |
double | munorm2_modified (Level n, const ConvolutionData1D< Q > *ops_1d[]) const |
double | munorm2_ns (Level n, const ConvolutionData1D< Q > *ops[]) const |
template<typename T > | |
void | muopxv_fast (ApplyTerms at, const ConvolutionData1D< Q > *const ops_1d[NDIM], const Tensor< T > &f, const Tensor< T > &f0, Tensor< TENSOR_RESULT_TYPE(T, Q)> &result, Tensor< TENSOR_RESULT_TYPE(T, Q)> &result0, double tol, const Q mufac, Tensor< TENSOR_RESULT_TYPE(T, Q)> &work1, Tensor< TENSOR_RESULT_TYPE(T, Q)> &work2) const |
Apply one of the separated terms, accumulating into the result. | |
template<typename T > | |
void | muopxv_fast2 (Level n, const ConvolutionData1D< Q > *const ops_1d[NDIM], const GenTensor< T > &f, const GenTensor< T > &f0, GenTensor< TENSOR_RESULT_TYPE(T, Q)> &result, GenTensor< TENSOR_RESULT_TYPE(T, Q)> &result0, double tol, const Q mufac, GenTensor< TENSOR_RESULT_TYPE(T, Q)> &work1, GenTensor< TENSOR_RESULT_TYPE(T, Q)> &work2) const |
Apply one of the separated terms, accumulating into the result. | |
template<typename T , size_t FDIM> | |
GenTensor< T > | partial_upsample (const Key< FDIM > &key, const GenTensor< T > &coeff, const int particle) const |
upsample some of the dimensions of coeff to its child indicated by key | |
template<typename T , size_t FDIM> | |
GenTensor< T > | upsample (const Key< FDIM > &key, const GenTensor< T > &coeff) const |
upsample the sum coefficients of level 1 to sum coeffs on level n+1 | |
Static Private Member Functions | |
static std::pair< Tensor< Q >, Tensor< Q > > | make_coeff_for_operator (World &world, double mu, double lo, double eps, OpType type, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc()) |
static std::pair< Tensor< double >, Tensor< double > > | make_coeff_for_operator (World &world, OperatorInfo info, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc()) |
Private Attributes | |
const BoundaryConditions< NDIM > | bc |
const FunctionCommonData< Q, NDIM > & | cdata |
SimpleCache< SeparatedConvolutionData< Q, NDIM >, NDIM > | data |
cache for all terms, dims and displacements | |
const int | k |
SimpleCache< SeparatedConvolutionData< Q, NDIM >, 2 *NDIM > | mod_data |
cache for all terms, dims and displacements | |
std::vector< ConvolutionND< Q, NDIM > > | ops |
ConvolutionND keeps data for 1 term, all dimensions, 1 displacement. | |
int | rank |
const std::vector< Slice > | s0 |
const std::vector< long > | v2k |
const std::vector< long > | vk |
Friends | |
SeparatedConvolution< Q, NDIM > | combine (const std::shared_ptr< SeparatedConvolution< Q, NDIM > > left, const std::shared_ptr< SeparatedConvolution< Q, NDIM > > right) |
combine 2 convolution operators to one | |
Additional Inherited Members | |
Protected Member Functions inherited from madness::WorldObject< SeparatedConvolution< Q, NDIM > > | |
void | process_pending () |
To be called from derived constructor to process pending messages. | |
Convolutions in separated form (including Gaussian)
typedef Key<NDIM> madness::SeparatedConvolution< Q, NDIM >::keyT |
typedef Q madness::SeparatedConvolution< Q, NDIM >::opT |
The apply function uses this to infer resultT=opT*inputT.
|
inline |
|
inline |
|
inline |
Constructor for Gaussian Convolutions (mostly for backward compatability)
References madness::SeparatedConvolution< Q, NDIM >::bc, madness::SeparatedConvolution< Q, NDIM >::info, madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), madness::SeparatedConvolution< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::rank, madness::OperatorInfo::type, and madness::WorldObject< SeparatedConvolution< Q, NDIM > >::world.
|
inline |
Constructor for Gaussian Convolutions (mostly for backward compatability)
References madness::SeparatedConvolution< Q, NDIM >::initialize().
|
inline |
WSTHORNTON Constructor for Gaussian Convolutions (mostly for backward compatability)
References madness::SeparatedConvolution< Q, NDIM >::bc, c, d, madness::FunctionDefaults< NDIM >::get_cell_width(), madness::SeparatedConvolution< Q, NDIM >::isperiodicsum, madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, madness::SeparatedConvolution< Q, NDIM >::mu(), NDIM, madness::SeparatedConvolution< Q, NDIM >::ops, madness::constants::pi, and madness::SeparatedConvolution< Q, NDIM >::rank.
|
inlinevirtual |
|
inline |
apply this operator on coefficients in full rank form
[in] | coeff | source coeffs in full rank |
[in] | source | the source key |
[in] | shift | the displacement, where the source coeffs come from |
[in] | tol | thresh/#neigh*cnorm |
SeparatedConvolutionData keeps data for all terms and all dimensions and 1 displacement
References std::abs(), madness::Timer::accumulate(), madness::copy(), madness::cpu_time(), madness::BaseTensor::dim(), madness::SeparatedConvolution< Q, NDIM >::getop(), madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, madness::SeparatedConvolution< Q, NDIM >::modified(), madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast(), NDIM, madness::BaseTensor::ndim(), madness::SeparatedConvolutionInternal< Q, NDIM >::norm, op(), madness::SeparatedConvolutionInternal< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::ops, Q(), madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::r_term, madness::SeparatedConvolution< Q, NDIM >::rank, madness::SeparatedConvolution< Q, NDIM >::s0, shift, source(), T(), madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::t_term, TENSOR_RESULT_TYPE, madness::SeparatedConvolution< Q, NDIM >::timer_full, madness::SeparatedConvolution< Q, NDIM >::v2k, and madness::SeparatedConvolution< Q, NDIM >::vk.
|
inline |
apply this operator on coefficients in low rank form
[in] | coeff | source coeffs in SVD (=optimal!) form |
[in] | tol | thresh/#neigh*cnorm |
[in] | tol2 | thresh/#neigh |
References std::abs(), madness::Timer::accumulate(), madness::copy(), madness::cpu_time(), madness::GenTensor< T >::dim(), madness::GenTensor< T >::get_svdtensor(), madness::SeparatedConvolution< Q, NDIM >::getop(), madness::GenTensor< T >::is_svd_tensor(), madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), madness::SeparatedConvolution< Q, NDIM >::modified(), madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast2(), NDIM, madness::GenTensor< T >::ndim(), madness::SeparatedConvolutionInternal< Q, NDIM >::norm, op(), madness::SeparatedConvolutionInternal< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::ops, PROFILE_MEMBER_FUNC, Q(), madness::SeparatedConvolution< Q, NDIM >::rank, madness::GenTensor< T >::rank(), madness::reduce(), madness::SeparatedConvolution< Q, NDIM >::s0, shift, source(), T(), TENSOR_RESULT_TYPE, madness::SeparatedConvolution< Q, NDIM >::timer_low_accumulate, madness::SeparatedConvolution< Q, NDIM >::timer_low_transf, madness::SeparatedConvolution< Q, NDIM >::timer_stats_accumulate, madness::TT_2D, madness::SeparatedConvolution< Q, NDIM >::v2k, and madness::SeparatedConvolution< Q, NDIM >::vk.
|
inline |
apply this operator on only 1 particle of the coefficients in low rank form
note the unfortunate mess with NDIM: here NDIM is the operator dimension, and FDIM is the function's dimension, whereas in the function we have OPDIM for the operator and NDIM for the function
T | the dimension of the function this operator is applied on. |
[in] | coeff | source coeffs in SVD (=optimal!) form, in high dimensionality (FDIM) |
[in] | source | the source key in low dimensionality (NDIM) |
[in] | shift | the displacement in low dimensionality (NDIM) |
[in] | tol | thresh/(#neigh*cnorm) |
[in] | tol2 | thresh/#neigh |
References madness::_(), std::abs(), madness::Timer::accumulate(), madness::copy(), madness::cpu_time(), madness::GenTensor< T >::dim(), madness::SRConf< T >::dim_per_vector(), madness::SeparatedConvolution< Q, NDIM >::doleaves, madness::GenTensor< T >::get_svdtensor(), madness::SeparatedConvolution< Q, NDIM >::getop(), madness::GenTensor< T >::is_svd_tensor(), madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, madness::SeparatedConvolution< Q, NDIM >::modified(), madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast(), NDIM, madness::GenTensor< T >::ndim(), op(), madness::SeparatedConvolutionInternal< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::particle(), Q(), madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::r_term, madness::SeparatedConvolution< Q, NDIM >::rank, madness::GenTensor< T >::rank(), madness::GenTensor< T >::reduce_rank(), madness::SRConf< T >::ref_vector(), shift, source(), T(), madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::t_term, TENSOR_RESULT_TYPE, madness::SeparatedConvolution< Q, NDIM >::timer_low_accumulate, madness::SeparatedConvolution< Q, NDIM >::timer_low_transf, madness::SeparatedConvolution< Q, NDIM >::v2k, and madness::SeparatedConvolution< Q, NDIM >::vk.
|
inlineprivate |
accumulate into result
References madness::aligned_axpy(), d, doit(), madness::f, madness::fast_transpose(), madness::mTxmq(), madness::mTxmq_padding(), NDIM, madness::Tensor< T >::ptr(), and R.
Referenced by madness::SeparatedConvolution< Q, NDIM >::muopxv_fast().
|
inlineprivate |
don't accumulate, since we want to do this at apply()
References madness::aligned_axpy(), d, doit(), madness::f, madness::fast_transpose(), madness::general_transform(), madness::mTxmq(), NDIM, madness::GenTensor< T >::ptr(), R, and madness::GenTensor< T >::scale().
Referenced by madness::SeparatedConvolution< Q, NDIM >::muopxv_fast2().
|
inlineprivate |
accumulate into result
References madness::f, madness::general_transform(), and madness::Tensor< T >::scale().
|
inlinestatic |
References madness::SeparatedConvolution< Q, NDIM >::combine_OT(), madness::OT_UNDEFINED, and madness::type().
Referenced by madness::SeparatedConvolution< Q, NDIM >::combine().
|
inlineprivate |
References d, e(), madness::FunctionDefaults< NDIM >::get_cell_width(), L, MADNESS_CHECK, and NDIM.
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution().
|
inlinestatic |
combine 2 convolution operators to one
References madness::SeparatedConvolution< Q, NDIM >::bc, madness::SeparatedConvolution< Q, NDIM >::can_combine(), madness::SeparatedConvolution< Q, NDIM >::combine_OT(), madness::WorldObject< Derived >::get_world(), madness::World::id(), madness::SeparatedConvolution< Q, NDIM >::info, madness::SeparatedConvolution< Q, NDIM >::k, and MADNESS_CHECK.
|
inlinestatic |
return operator type and other info of the combined operator (e.g. fg = f(1,2)* g(1,2)
References madness::SeparatedConvolution< Q, NDIM >::info, MADNESS_CHECK, MADNESS_EXCEPTION, madness::OperatorInfo::mu, madness::OT_F12, madness::OT_F212, madness::OT_F2G12, madness::OT_FG12, madness::OT_G12, madness::OT_GAUSS, madness::OT_SLATER, and madness::OperatorInfo::type.
Referenced by madness::SeparatedConvolution< Q, NDIM >::can_combine(), and madness::SeparatedConvolution< Q, NDIM >::combine().
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::destructive_.
Referenced by madness::MP2::guess_mp1_3(), main(), and madness::MP2::solve_residual_equations().
|
inline |
|
inline |
estimate the ratio of cost of full rank versus low rank
[in] | source | source key |
[in] | shift | displacement |
[in] | tol | thresh/#neigh/cnorm |
[in] | tol2 | thresh/#neigh |
References madness::GenTensor< T >::dim(), madness::GenTensor< T >::get_svdtensor(), madness::SeparatedConvolution< Q, NDIM >::getop(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), MADNESS_ASSERT, madness::SRConf< T >::max_sigma(), madness::SeparatedConvolution< Q, NDIM >::mu(), NDIM, madness::GenTensor< T >::ndim(), madness::SeparatedConvolutionInternal< Q, NDIM >::norm, op(), pow(), madness::SeparatedConvolution< Q, NDIM >::rank, madness::GenTensor< T >::rank(), shift, madness::GenTensor< T >::size(), and source().
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::info, and madness::OperatorInfo::mu.
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::bc.
|
inline |
return that part of a hi-dim key that serves as the base for displacements of this operator
if the function and the operator have the same dimension return key if the function has a higher dimension than the operator (e.g. in the exchange operator) return only that part of key that corresponds to the particle this operator works on
[in] | key | hi-dim key |
References madness::Key< NDIM >::break_apart(), NDIM, madness::SeparatedConvolution< Q, NDIM >::particle(), and source().
|
inline |
return that part of a hi-dim key that serves as the base for displacements of this operator
if the function and the operator have the same dimension return key if the function has a higher dimension than the operator (e.g. in the exchange operator) return only that part of key that corresponds to the particle this operator works on
[in] | key | hi-dim key |
|
inlineprivate |
get the transformation matrices for 1 term and all dimensions and one displacement
use ConvolutionND, which uses ConvolutionData1D to collect the transformation matrices
References std::abs(), d, madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::munorm2(), NDIM, op(), madness::SeparatedConvolution< Q, NDIM >::ops, and madness::Key< NDIM >::translation().
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop_ns().
|
inlineprivate |
get the transformation matrices for 1 term and all dimensions and one displacement
use ConvolutionND, which uses ConvolutionData1D to collect the transformation matrices
References std::abs(), d, madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::munorm2(), NDIM, op(), madness::SeparatedConvolution< Q, NDIM >::ops, source(), and madness::Key< NDIM >::translation().
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop_modified().
|
inlineprivate |
get the data for all terms and all dimensions for one displacement
References d, madness::SeparatedConvolution< Q, NDIM >::getop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_ns(), madness::SeparatedConvolution< Q, NDIM >::modified(), and source().
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), and madness::SeparatedConvolution< Q, NDIM >::norm().
|
inlineprivate |
get the data for all terms and all dimensions for one displacement (modified NS form)
remember that the operator in the modified NS form is not Toeplitz, so we need information about the displacement and the source key
[in] | n | level (=scale) (actually redundant, since included in source) |
[in] | disp | displacement key |
[in] | source | source key |
References madness::SeparatedConvolution< Q, NDIM >::getmuop_modified(), madness::Key< NDIM >::merge_with(), madness::SeparatedConvolution< Q, NDIM >::mod_data, madness::SeparatedConvolution< Q, NDIM >::mu(), NDIM, madness::SeparatedConvolution< Q, NDIM >::norm(), op(), p(), madness::SeparatedConvolution< Q, NDIM >::rank, and source().
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop().
|
inlineprivate |
get the data for all terms and all dimensions for one displacement
uses SeparatedConvolutionInternal (ConvolutionND, ConvolutionData1D) to construct the transformation matrices.
[in] | d | displacement |
References d, madness::SeparatedConvolution< Q, NDIM >::getmuop(), madness::SeparatedConvolution< Q, NDIM >::mu(), madness::SeparatedConvolution< Q, NDIM >::norm(), op(), p(), and madness::SeparatedConvolution< Q, NDIM >::rank.
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop().
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::bc, c, d, madness::FunctionDefaults< NDIM >::get_cell_width(), madness::SeparatedConvolution< Q, NDIM >::isperiodicsum, madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, madness::SeparatedConvolution< Q, NDIM >::mu(), NDIM, madness::SeparatedConvolution< Q, NDIM >::ops, pi, madness::constants::pi, Q(), and madness::SeparatedConvolution< Q, NDIM >::rank.
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), and madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution().
|
inlinestaticprivate |
References madness::SeparatedConvolution< Q, NDIM >::bc, madness::SeparatedConvolution< Q, NDIM >::info, lo, madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), madness::SeparatedConvolution< Q, NDIM >::mu(), madness::type(), and madness::WorldObject< SeparatedConvolution< Q, NDIM > >::world.
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), and madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator().
|
inlinestaticprivate |
|
inline |
construct the tensortrain representation of the operator
[in] | source | source coefficient box |
[in] | shift | displacement |
[in] | tol | threshold for the TT truncation |
[in] | do_R | compute the R term of the operator (2k^d) |
[in] | do_T | compute the T term of the operator (k^d), including factor -1 Both do_R and do_T may be used simultaneously, then the final operator will have dimensions (2k^d) |
References madness::_(), d, madness::SeparatedConvolution< Q, NDIM >::getop(), madness::SeparatedConvolution< Q, NDIM >::k, lo, MADNESS_EXCEPTION, madness::TensorTrain< T >::make_operator(), madness::TensorTrain< T >::make_tensor(), madness::SeparatedConvolution< Q, NDIM >::mu(), NDIM, op(), madness::SeparatedConvolutionInternal< Q, NDIM >::ops, madness::SeparatedConvolution< Q, NDIM >::ops, madness::print(), Q(), madness::SeparatedConvolution< Q, NDIM >::rank, shift, source(), and madness::TensorTrain< T >::truncate().
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::modified_.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), apply_U_mix(), apply_U_ncf(), apply_V(), compute_energy(), compute_R2f2_psi(), madness::SeparatedConvolution< Q, NDIM >::getop(), madness::MP2::make_Uphi0(), madness::MP2::multiply_with_0th_order_Hamiltonian(), madness::SeparatedConvolution< Q, NDIM >::munorm2(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast2(), reconstruct_psi(), test_recursive_application(), test_U_el(), madness::CC2::update_constant_part_adc2(), madness::CC2::update_constant_part_cc2_gs(), madness::CC2::update_constant_part_cispd(), and madness::CC2::update_constant_part_lrcc2().
|
inline |
|
inline |
References madness::SeparatedConvolution< Q, NDIM >::info, and madness::OperatorInfo::mu.
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::SeparatedConvolution< Q, NDIM >::getmuop(), madness::SeparatedConvolution< Q, NDIM >::getmuop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_ns(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), and madness::SeparatedConvolution< Q, NDIM >::make_tt_representation().
|
inlineprivate |
Computes the Frobenius norm of one of the separated terms ... WITHOUT FACTOR INCLUDED compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal
References madness::SeparatedConvolution< Q, NDIM >::modified(), madness::SeparatedConvolution< Q, NDIM >::munorm2_modified(), madness::SeparatedConvolution< Q, NDIM >::munorm2_ns(), and madness::SeparatedConvolution< Q, NDIM >::ops.
Referenced by madness::SeparatedConvolution< Q, NDIM >::getmuop(), and madness::SeparatedConvolution< Q, NDIM >::getmuop_modified().
|
inlineprivate |
Computes the operator norm of one of the separated terms of the modified NS form ... WITHOUT FACTOR INCLUDED compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal
References d, factorial(), madness::ConvolutionData1D< Q >::N_diff, madness::ConvolutionData1D< Q >::N_F, madness::ConvolutionData1D< Q >::N_up, NDIM, madness::SeparatedConvolution< Q, NDIM >::norm(), and PROFILE_MEMBER_FUNC.
Referenced by madness::SeparatedConvolution< Q, NDIM >::munorm2().
|
inlineprivate |
Computes the Frobenius norm of one of the separated terms for the NS form ... WITHOUT FACTOR INCLUDED compute for 1 term, all dim, 1 disp, essentially for SeparatedConvolutionInternal
References a, aa, b, d, NDIM, madness::SeparatedConvolution< Q, NDIM >::ops, and sum.
Referenced by madness::SeparatedConvolution< Q, NDIM >::munorm2().
|
inlineprivate |
Apply one of the separated terms, accumulating into the result.
References madness::SeparatedConvolution< Q, NDIM >::apply_transformation(), d, madness::f, madness::SeparatedConvolution< Q, NDIM >::k, madness::SeparatedConvolution< Q, NDIM >::modified(), NDIM, madness::SeparatedConvolution< Q, NDIM >::Transformation::r, madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::r_term, madness::SeparatedConvolution< Q, NDIM >::ApplyTerms::t_term, madness::SeparatedConvolution< Q, NDIM >::Transformation::U, and madness::SeparatedConvolution< Q, NDIM >::Transformation::VT.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply(), and madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim().
|
inlineprivate |
Apply one of the separated terms, accumulating into the result.
References madness::SeparatedConvolution< Q, NDIM >::apply_transformation2(), d, madness::f, madness::SeparatedConvolution< Q, NDIM >::k, madness::SeparatedConvolution< Q, NDIM >::modified(), NDIM, and PROFILE_MEMBER_FUNC.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply2().
|
inline |
return the operator norm for all terms, all dimensions and 1 displacement
References d, and madness::SeparatedConvolution< Q, NDIM >::getop().
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_ns(), and madness::SeparatedConvolution< Q, NDIM >::munorm2_modified().
|
inline |
apply this onto another suitable argument, returning the same type
argT must implement argT::apply(const SeparatedConvolution& op, const argT& arg)
References madness::apply().
|
inline |
apply this operator on a function f
the operator does not need to have the same dimension as the function, e,g, the Poisson kernel for the exchange operator acts only on 1 electron of a given (pair) function.
[in] | f | a function of same or different dimension as this operator |
References madness::apply(), and madness::f.
|
inline |
apply this on a vector of functions
References madness::apply(), and madness::f.
|
inlineprivate |
upsample some of the dimensions of coeff to its child indicated by key
[in] | coeff | the coeffs of dim 2*NDIM that will be upsampled |
[in] | key | the key indicating the child – only some dimensions will be "reproductive" |
[in] | particle | if 0: upsample dimensions 0-2 if 1: upsample dimensions 3-5 |
References madness::SeparatedConvolution< Q, NDIM >::cdata, madness::GenTensor< T >::dim(), madness::general_transform(), h(), madness::FunctionCommonData< T, NDIM >::h0, madness::FunctionCommonData< T, NDIM >::h1, madness::SeparatedConvolution< Q, NDIM >::k, MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, madness::GenTensor< T >::ndim(), madness::GenTensor< T >::rank(), and madness::Key< NDIM >::translation().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References p(), and madness::SeparatedConvolution< Q, NDIM >::particle_.
Referenced by madness::MP3::compute_mp3_ghij(), and madness::MP3::compute_mp3_ghij_fast().
|
inlineprivate |
upsample the sum coefficients of level 1 to sum coeffs on level n+1
specialization of the unfilter method, will transform only the sum coefficients
[in] | key | key of level n+1 |
[in] | coeff | sum coefficients of level n (does NOT belong to key!!) |
References madness::SeparatedConvolution< Q, NDIM >::cdata, madness::general_transform(), h(), madness::FunctionCommonData< T, NDIM >::h0, madness::FunctionCommonData< T, NDIM >::h1, and madness::Key< NDIM >::translation().
|
friend |
combine 2 convolution operators to one
Referenced by madness::LRFunctorF12< T, NDIM, LDIM >::norm2().
|
private |
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::combine(), madness::SeparatedConvolution< Q, NDIM >::get_bc(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), and madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator().
|
private |
|
mutableprivate |
cache for all terms, dims and displacements
bool madness::SeparatedConvolution< Q, NDIM >::destructive_ =false |
destroy the argument or restore it (expensive for 6d functions)
Referenced by madness::SeparatedConvolution< Q, NDIM >::destructive(), and madness::SeparatedConvolution< Q, NDIM >::destructive().
bool madness::SeparatedConvolution< Q, NDIM >::doleaves |
If should be applied to leaf coefficients ... false by default.
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim().
OperatorInfo madness::SeparatedConvolution< Q, NDIM >::info |
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::combine(), madness::SeparatedConvolution< Q, NDIM >::combine_OT(), madness::SeparatedConvolution< Q, NDIM >::gamma(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), madness::SeparatedConvolution< Q, NDIM >::make_coeff_for_operator(), and madness::SeparatedConvolution< Q, NDIM >::mu().
bool madness::SeparatedConvolution< Q, NDIM >::isperiodicsum |
If true the operator 1D kernels have been summed over lattice translations and may be non-zero at both ends of the unit cell
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::get_disp(), and madness::SeparatedConvolution< Q, NDIM >::initialize().
|
private |
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::SeparatedConvolution< Q, NDIM >::combine(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast(), madness::SeparatedConvolution< Q, NDIM >::muopxv_fast2(), and madness::SeparatedConvolution< Q, NDIM >::partial_upsample().
|
mutableprivate |
cache for all terms, dims and displacements
Referenced by madness::SeparatedConvolution< Q, NDIM >::getop_modified().
bool madness::SeparatedConvolution< Q, NDIM >::modified_ =false |
use modified NS form
Referenced by madness::SeparatedConvolution< Q, NDIM >::modified(), and madness::SeparatedConvolution< Q, NDIM >::modified().
|
static |
|
mutableprivate |
ConvolutionND keeps data for 1 term, all dimensions, 1 displacement.
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::SeparatedConvolution< Q, NDIM >::getmuop(), madness::SeparatedConvolution< Q, NDIM >::getmuop_modified(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::SeparatedConvolution< Q, NDIM >::munorm2(), and madness::SeparatedConvolution< Q, NDIM >::munorm2_ns().
int madness::SeparatedConvolution< Q, NDIM >::particle_ =1 |
must only be 1 or 2
Referenced by madness::SeparatedConvolution< Q, NDIM >::particle(), madness::SeparatedConvolution< Q, NDIM >::particle(), and madness::SeparatedConvolution< Q, NDIM >::set_particle().
bool madness::SeparatedConvolution< Q, NDIM >::print_timings =false |
|
private |
Referenced by madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::SeparatedConvolution(), madness::SeparatedConvolution< Q, NDIM >::apply(), madness::SeparatedConvolution< Q, NDIM >::apply2(), madness::SeparatedConvolution< Q, NDIM >::apply2_lowdim(), madness::SeparatedConvolution< Q, NDIM >::estimate_costs(), madness::SeparatedConvolution< Q, NDIM >::getop_modified(), madness::SeparatedConvolution< Q, NDIM >::getop_ns(), madness::SeparatedConvolution< Q, NDIM >::initialize(), madness::SeparatedConvolution< Q, NDIM >::make_tt_representation(), madness::SeparatedConvolution< Q, NDIM >::print_timer(), and madness::SeparatedConvolution< Q, NDIM >::reset_timer().
|
private |
Timer madness::SeparatedConvolution< Q, NDIM >::timer_full |
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply().
Timer madness::SeparatedConvolution< Q, NDIM >::timer_low_accumulate |
Timer madness::SeparatedConvolution< Q, NDIM >::timer_low_transf |
Timer madness::SeparatedConvolution< Q, NDIM >::timer_stats_accumulate |
Referenced by madness::SeparatedConvolution< Q, NDIM >::apply2().
|
private |
|
private |