32 #ifndef MADNESS_MRA_OPERATOR_H__INCLUDED
33 #define MADNESS_MRA_OPERATOR_H__INCLUDED
40 #include <type_traits>
56 template<
typename T, std::
size_t NDIM>
57 class SeparatedConvolution;
59 template<
typename T, std::
size_t NDIM>
62 template <
typename T,
typename R, std::
size_t NDIM, std::
size_t KDIM>
64 apply(
const SeparatedConvolution<T,KDIM>&
op,
const std::vector< Function<R,NDIM> >
f);
66 template<
typename T, std::
size_t NDIM>
67 std::vector<CCPairFunction<T,NDIM>>
apply(
const SeparatedConvolution<T,NDIM>&
op,
const std::vector<CCPairFunction<T,NDIM>>& argument);
69 template<
typename T, std::
size_t NDIM>
70 std::vector<CCPairFunction<T,NDIM>>
apply(
const SeparatedConvolution<T,NDIM/2>&
op,
const std::vector<CCPairFunction<T,NDIM>>& argument);
72 template<
typename T, std::
size_t NDIM>
73 CCPairFunction<T,NDIM>
apply(
const SeparatedConvolution<T,NDIM>&
op,
const CCPairFunction<T,NDIM>& argument);
75 template<
typename T, std::
size_t NDIM>
76 CCPairFunction<T,NDIM>
apply(
const SeparatedConvolution<T,NDIM/2>&
op,
const CCPairFunction<T,NDIM>& argument);
80 template <
typename Q, std::
size_t NDIM>
89 template <
typename Q, std::
size_t NDIM>
91 std::vector< SeparatedConvolutionInternal<Q,NDIM> >
muops;
135 template <
typename Q, std::
size_t NDIM>
161 mutable std::vector< ConvolutionND<Q,NDIM> >
ops;
166 const std::vector<long>
vk;
167 const std::vector<long>
v2k;
168 const std::vector<Slice>
s0;
182 if (
p!=1 and
p!=2)
throw std::runtime_error(
"particle must be 1 or 2");
210 static inline std::pair<Tensor<Q>,
Tensor<Q>>
239 double hi = cell_width.
normf();
249 fit.truncate_periodic_expansion(coeff, expnt, cell_width.
max(),
false);
252 return std::make_pair(coeff,expnt);
289 template <
typename T,
typename R>
300 for (std::size_t i=0; i<
NDIM; ++i) size *= dimk;
301 long dimi = size/dimk;
303 R* MADNESS_RESTRICT w1=work1.
ptr();
304 R* MADNESS_RESTRICT w2=work2.
ptr();
307 mTxmq_padding(dimi, trans[0].r, dimk, dimk, w1,
f.ptr(), trans[0].U);
309 mTxmq(dimi, trans[0].r, dimk, w1,
f.ptr(), trans[0].U, dimk);
312 size = trans[0].r * size / dimk;
314 for (std::size_t
d=1;
d<
NDIM; ++
d) {
318 mTxmq(dimi, trans[
d].r, dimk, w2, w1, trans[
d].U, dimk);
320 size = trans[
d].r * size / dimk;
330 for (std::size_t
d=0;
d<
NDIM; ++
d) {
332 dimi = size/trans[
d].r;
336 mTxmq(dimi, dimk, trans[
d].r, w2, w1, trans[
d].VT);
338 size = dimk*size/trans[
d].r;
352 template <
typename T,
typename R>
361 result2.
scale(mufac);
369 template <
typename T,
typename R>
387 for (std::size_t i=0; i<
NDIM; ++i) size *= dimk;
388 long dimi = size/dimk;
390 R* MADNESS_RESTRICT w1=work1.
ptr();
391 R* MADNESS_RESTRICT w2=work2.
ptr();
393 mTxmq(dimi, trans[0].r, dimk, w1,
f.ptr(), trans[0].U, dimk);
394 size = trans[0].r * size / dimk;
396 for (std::size_t
d=1;
d<
NDIM; ++
d) {
397 mTxmq(dimi, trans[
d].r, dimk, w2, w1, trans[
d].U, dimk);
398 size = trans[
d].r * size / dimk;
408 for (std::size_t
d=0;
d<
NDIM; ++
d) {
410 dimi = size/trans[
d].r;
411 mTxmq(dimi, dimk, trans[
d].r, w2, w1, trans[
d].VT);
412 size = dimk*size/trans[
d].r;
429 template <
typename T>
445 for (std::size_t
d=0;
d<
NDIM; ++
d) Rnorm *= ops_1d[
d]->Rnorm;
447 if (at.
r_term and (Rnorm > 1.e-20)) {
449 tol = tol/(Rnorm*
NDIM);
456 if (
NDIM==1) break_even = long(0.5*twok);
457 else if (
NDIM==2) break_even = long(0.6*twok);
458 else if (
NDIM==3) break_even=long(0.65*twok);
459 else break_even=long(0.7*twok);
460 bool rank_is_zero =
false;
461 for (std::size_t
d=0;
d<
NDIM; ++
d) {
463 for (r=0; r<twok; ++r) {
464 if (ops_1d[
d]->Rs[r] < tol)
break;
466 if (r >= break_even) {
468 trans[
d].
U = ops_1d[
d]->R.ptr();
481 trans[
d].
U = ops_1d[
d]->RU.ptr();
482 trans[
d].
VT = ops_1d[
d]->RVT.ptr();
484 trans2[
d]=ops_1d[
d]->R;
495 for (std::size_t
d=0;
d<
NDIM; ++
d) Tnorm *= ops_1d[
d]->Tnorm;
497 if (at.
t_term and (Tnorm>0.0)) {
498 tol = tol/(Tnorm*
NDIM);
501 if (
NDIM==1) break_even = long(0.5*
k);
502 else if (
NDIM==2) break_even = long(0.6*
k);
503 else if (
NDIM==3) break_even=long(0.65*
k);
504 else break_even=long(0.7*
k);
505 bool rank_is_zero =
false;
506 for (std::size_t
d=0;
d<
NDIM; ++
d) {
508 for (r=0; r<
k; ++r) {
509 if (ops_1d[
d]->Ts[r] < tol)
break;
511 if (r >= break_even) {
513 trans[
d].
U = ops_1d[
d]->T.ptr();
526 trans[
d].
U = ops_1d[
d]->TU.ptr();
527 trans[
d].
VT = ops_1d[
d]->TVT.ptr();
529 trans2[
d]=ops_1d[
d]->T;
540 template <
typename T>
557 for (std::size_t
d=0;
d<
NDIM; ++
d) Rnorm *= ops_1d[
d]->Rnorm;
558 if (Rnorm == 0.0)
return;
560 if (Rnorm > 1.e-20) {
562 tol = tol/(Rnorm*
NDIM);
572 for (std::size_t
d=0;
d<
NDIM; ++
d) {
588 trans2[
d]=ops_1d[
d]->R;
594 for (std::size_t
d=0;
d<
NDIM; ++
d) Tnorm *= ops_1d[
d]->Tnorm;
596 if (n > 0 and (Tnorm>1.e-20)) {
603 for (std::size_t
d=0;
d<
NDIM; ++
d) {
619 trans2[
d]=ops_1d[
d]->T;
639 double prodR=1.0, prodT=1.0;
640 for (std::size_t
d=0;
d<
NDIM; ++
d) {
641 prodR *=
ops[
d]->Rnormf;
642 prodT *=
ops[
d]->Tnormf;
649 double prod=1.0,
sum=0.0;
650 for (std::size_t
d=0;
d<
NDIM; ++
d) {
651 double a =
ops[
d]->NSnormf;
652 double b =
ops[
d]->Tnormf;
653 double aa = std::min(
a,
b);
656 if (bb > 0.0)
sum +=(
aa/bb);
684 for (
size_t d=0;
d<
NDIM; ++
d) {
685 double dff_tmp = ops_1d[
d]->
N_diff;
686 double duu_tmp = ops_1d[
d]->
N_diff;
687 double udf_tmp = ops_1d[
d]->
N_diff;
690 for (
size_t dd=0; dd<
NDIM; ++dd) {
692 dff_tmp *= ops_1d[dd]->
N_F;
693 duu_tmp *= ops_1d[dd]->
N_up;
695 udf_tmp *= ops_1d[dd]->
N_F;
696 for (
size_t ddd=0; ddd<
NDIM; ++ddd) {
697 if (ddd!=dd) udf += udf_tmp * ops_1d[ddd]->
N_up;
708 for (
int i=1; i<static_cast<int>(
NDIM)-1; ++i)
factorial*=
double(i);
735 for (std::size_t
d=0;
d<
NDIM; ++
d) {
773 for (std::size_t
d=0;
d<
NDIM; ++
d) {
778 op.ops[
d] =
ops[
mu].getop(
d)->mod_nonstandard(op_key);
817 const double munorm =
op.muops[
mu].norm;
818 norm += munorm*munorm;
823 return data.getptr(n,
d);
841 for (
size_t i=0; i<
NDIM; ++i) t[i]=t[i]%2;
855 const double munorm =
op.muops[
mu].norm;
856 norm += munorm*munorm;
869 for (std::size_t
d=1;
d<
NDIM; ++
d) {
882 template<
typename T,
size_t FDIM>
899 for (
int i=0; i<
k; ++i) identity(i,i)=1.0;
905 for (
size_t ii=0; ii<
NDIM; ++ii) matrices[ii+
NDIM]=identity;
907 for (
size_t ii=0; ii<
NDIM; ++ii) matrices[ii]=identity;
925 template<
typename T,
size_t FDIM>
934 for (
size_t ii=0; ii<FDIM; ++ii) matrices[ii]=
h[key.
translation()[ii]%2];
960 ,
rank(argops.size())
966 for (std::size_t
d=1;
d<
NDIM; ++
d) {
971 for (
unsigned int mu=0;
mu < argops.size(); ++
mu) {
995 ,
rank(argops.size())
1001 for (std::size_t
d=1;
d<
NDIM; ++
d) {
1036 ,
rank(coeff.dim(0))
1045 for (std::size_t
d=1;
d<
NDIM; ++
d) {
1059 for (std::size_t
d=0;
d<
NDIM; ++
d) {
1083 ,
rank(coeff.dim(0))
1089 for (std::size_t
d=1;
d<
NDIM; ++
d) {
1098 for (std::size_t
d=0;
d<
NDIM; ++
d) {
1100 std::shared_ptr<GaussianConvolution1D<double_complex> >
1112 timer_full.
print(
"op full tensor ");
1136 return getop(n,
d, source_key)->norm;
1146 template<
size_t FDIM>
1147 typename std::enable_if<FDIM!=NDIM, Key<NDIM> >
::type
1163 template<
size_t FDIM>
1164 typename std::enable_if<FDIM==NDIM, Key<NDIM> >
::type
1176 template <
typename T,
size_t FDIM>
1182 template <
typename T,
size_t FDIM>
1192 template <
typename T,
size_t LDIM>
1204 template <
typename T,
size_t LDIM>
1213 template<
typename argT>
1226 template <
typename T>
1241 if (coeff.
dim(0) ==
k) {
1257 tol = 0.01*tol/
rank;
1280 if (muop.
norm > tol) {
1282 Q fac =
ops[
mu].getfac();
1288 r(
s0).gaxpy(1.0,r0,1.0);
1308 template<
typename T>
1319 const std::vector<Slice> s00(coeff.
ndim(),
Slice(0,
k-1));
1339 tol = tol/
rank*0.01;
1347 for (
int r=0; r<coeff.
rank(); ++r) {
1367 Q fac =
ops[
mu].getfac();
1369 tol/
std::abs(fac), fac, work1, work2);
1374 final.get_svdtensor().ref_vector(
particle()-1)(s)=result;
1389 final.reduce_rank(tol2*0.5);
1404 template <
typename T>
1408 double tol,
double tol2)
const {
1421 if (coeff.
dim(0) ==
k) {
1452 std::list<GenTensor<T> > r_list;
1453 std::list<GenTensor<T> > r0_list;
1462 if (muop.
norm > tol) {
1477 Q fac =
ops[
mu].getfac();
1479 tol/
std::abs(fac), fac, work1, work2);
1483 r_list.push_back(r);
1484 r0_list.push_back(r0);
1493 if (r_list.size()>0) r_list.front()(
s0)+=result0;
1512 template<
typename T>
1516 double tol,
double tol2)
const {
1519 if (2*
NDIM==coeff.
ndim())
return 1.5;
1528 const double full_operator_cost=
pow(coeff.
dim(0),
NDIM+1);
1529 const double low_operator_cost=
pow(coeff.
dim(0),
NDIM/2+1);
1530 const double low_reduction_cost=
pow(coeff.
dim(0),
NDIM/2);
1532 double full_cost=0.0;
1533 double low_cost=0.0;
1535 long initial_rank=0;
1536 long final_rank=sqrt(coeff.
size())*0.05;
1542 if (muop.
norm > tol) {
1548 initial_rank+=nterms;
1550 full_cost+=full_operator_cost;
1553 low_cost=initial_rank*low_operator_cost + initial_rank*final_rank*low_reduction_cost;
1557 if (low_cost>0.0) ratio=full_cost/low_cost;
1573 const Key<NDIM>&
shift,
double tol,
bool do_R,
bool do_T)
const {
1575 if (not (do_R or do_T)) {
1576 print(
"no operator requested in make_tt_representation??");
1588 for (std::size_t
d=0;
d<
NDIM; ++
d) Rnorm *=
op->muops[
mu].ops[
d]->Rnorm;
1589 if (Rnorm>1.e-20) hi=
mu;
1590 if ((Rnorm<1.e-20) and (
mu<hi))
lo=
mu;
1595 long rank_eff=(hi-
lo);
1597 if (do_R and do_T) {
1612 for (
int mu=
lo, r=0;
mu<hi; ++
mu, ++r) {
1614 const Q fac =
ops[
mu].getfac();
1615 const Slice sr0(step*r, step*r, 0);
1616 const Slice sr1(step*r+step-1,step*r+step-1,0);
1617 const Slice s00(0,
k-1,1);
1620 cores[0](
_,
_ ,sr0)=muop.
ops[0]->R;
1621 for (std::size_t idim=1; idim<
NDIM-1; ++idim) {
1622 cores[idim](sr0,
_ ,
_ ,sr0)=muop.
ops[idim]->R;
1628 cores[0](s00,s00,sr1)=muop.
ops[0]->T;
1629 for (std::size_t idim=1; idim<
NDIM-1; ++idim) {
1630 cores[idim](sr1,s00,s00,sr1)=muop.
ops[idim]->T;
1632 cores[
NDIM-1](sr1,s00,s00)=muop.
ops[
NDIM-1]->T*(-fac);
1683 MADNESS_EXCEPTION(
"unknown combination of SeparatedConvolutions: feel free to extend in operator.h",1);
1703 if (left and right) {
1704 return combine(*left, *right);
1729 double hi = cell_width.
normf();
1737 fit.truncate_periodic_expansion(coeff, expnt, cell_width.
max(),
true);
1773 template <std::
size_t NDIM>
1775 SeparatedConvolution<double,NDIM>
1780 if (world.
rank()==0)
print(
"the accuracy in BSHOperator is too small, tighten the threshold",eps);
1787 template <std::
size_t NDIM>
1789 SeparatedConvolution<double,NDIM>*
1794 if (world.
rank()==0)
print(
"the accuracy in BSHOperator is too small, tighten the threshold",eps);
1802 static inline SeparatedConvolution<double,3>
1822 double hi = cell_width.
normf();
1830 fit.truncate_periodic_expansion(coeff, expnt, cell_width.
max(),
false);
1847 double hi = cell_width.
normf();
1855 fit.truncate_periodic_expansion(coeff, expnt, cell_width.
max(),
false);
1861 static inline SeparatedConvolution<double,3>
1868 double mu,
double lo,
double eps,
1875 double mu,
double lo,
double eps,
1882 template<std::
size_t NDIM=3>
1884 double mu,
double lo,
double eps,
1893 template<std::
size_t NDIM>
1895 double mu,
double lo=0.0,
double eps=0.0,
1904 template<std::
size_t NDIM>
1906 double mu,
double lo=0.0,
double eps=0.0,
1915 template<std::
size_t NDIM>
1917 double mu,
double lo,
double eps,
1926 double mu,
double lo,
double eps,
1936 double mu,
double lo,
double eps,
1947 static inline SeparatedConvolution<double,3>
1958 static inline SeparatedConvolution<double,3>*
1970 static inline SeparatedConvolution<double,3>*
1982 static inline SeparatedConvolution<double,3>
1997 double exponent = 1.0/(2.0*eps);
1999 exponents(0
L) = exponent;
2000 coeffs(0
L)=
pow(exponent/M_PI,0.5*3.0);
2007 template<std::
size_t NDIM>
2013 double exponent = 1.0/(2.0*eps);
2015 exponents(0
L) = exponent;
2016 coeffs(0
L)=
pow(exponent/M_PI,0.5*
NDIM);
2031 double hi = cell_width.
normf();
2039 fit.truncate_periodic_expansion(coeff, expnt, cell_width.
max(),
false);
2051 std::vector< std::shared_ptr< SeparatedConvolution<double,3> > >
2062 double hi = width.
normf();
2063 const bool isperiodicsum = (bc(0,0)==
BC_PERIODIC);
2064 if (isperiodicsum) hi *= 100;
2071 fit.truncate_periodic_expansion(coeff, expnt, width.
max(),
true);
2074 int rank = coeff.
dim(0);
2076 std::vector<real_convolution_3d_ptr> gradG(3);
2079 std::vector< ConvolutionND<double,3> > ops(rank);
2080 for (
int mu=0;
mu<rank;
mu++) {
2084 ops[
mu].setfac(coeff(
mu)/
c/width[
dir]);
2086 for (
int d=0;
d<3;
d++) {
2104 std::vector< std::shared_ptr< SeparatedConvolution<double,3> > >
2116 double hi = width.
normf();
2117 const bool isperiodicsum = (bc(0,0)==
BC_PERIODIC);
2118 if (isperiodicsum) hi *= 100;
2125 fit.truncate_periodic_expansion(coeff, expnt, width.
max(),
true);
2128 int rank = coeff.
dim(0);
2130 std::vector<real_convolution_3d_ptr> gradG(3);
2133 std::vector< ConvolutionND<double,3> > ops(rank);
2134 for (
int mu=0;
mu<rank;
mu++) {
2138 ops[
mu].setfac(coeff(
mu)/
c/width[
dir]);
2140 for (
int d=0;
d<3;
d++) {
2155 template <
class Archive,
class T, std::
size_t NDIM>
2164 template <
class Archive,
class T, std::
size_t NDIM>
double q(double t)
Definition: DKops.h:18
Provides routines for internal use optimized for aligned data.
long dim(int i) const
Returns the size of dimension i.
Definition: basetensor.h:147
long ndim() const
Returns the number of dimensions in the tensor.
Definition: basetensor.h:144
This class is used to specify boundary conditions for all operators.
Definition: funcdefaults.h:101
Provides the common functionality/interface of all 1D convolutions.
Definition: convolution1d.h:257
Array of 1D convolutions (one / dimension)
Definition: convolution1d.h:543
Holds displacements for applying operators to avoid replicating for all operators.
Definition: displacements.h:39
const std::vector< Key< NDIM > > & get_disp(Level n, bool isperiodicsum)
Definition: displacements.h:191
Tensor< double > h0
Definition: function_common_data.h:105
Tensor< double > h1
Definition: function_common_data.h:105
FunctionDefaults holds default paramaters as static class members.
Definition: funcdefaults.h:204
static const Tensor< double > & get_cell_width()
Returns the width of each user cell dimension.
Definition: funcdefaults.h:468
A multiresolution adaptive numerical function.
Definition: mra.h:122
static GFit BSHFit(double mu, double lo, double hi, double eps, bool prnt=false)
return a fit for the bound-state Helmholtz function
Definition: gfit.h:117
static GFit CoulombFit(double lo, double hi, double eps, bool prnt=false)
return a fit for the Coulomb function
Definition: gfit.h:102
1D convolution with (derivative) Gaussian; coeff and expnt given in simulation coordinates [0,...
Definition: convolution1d.h:683
Definition: lowranktensor.h:59
long dim(const int i) const
return the number of entries in dimension i
Definition: lowranktensor.h:391
long ndim() const
Definition: lowranktensor.h:386
constexpr bool is_full_tensor() const
Definition: gentensor.h:224
IsSupported< TensorTypeData< Q >, GenTensor< T > & >::type scale(Q fac)
Inplace multiplication by scalar of supported type (legacy name)
Definition: lowranktensor.h:426
const BaseTensor * ptr() const
might return a NULL pointer!
Definition: lowranktensor.h:709
void reduce_rank(const double &eps)
Definition: gentensor.h:217
long rank() const
Definition: gentensor.h:212
long size() const
Definition: lowranktensor.h:482
SVDTensor< T > & get_svdtensor()
Definition: gentensor.h:228
constexpr bool is_svd_tensor() const
Definition: gentensor.h:222
Key is the index for a node of the 2^NDIM-tree.
Definition: key.h:66
const Vector< Translation, NDIM > & translation() const
Definition: key.h:164
Key< NDIM+LDIM > merge_with(const Key< LDIM > &rhs) const
merge with other key (ie concatenate), use level of rhs, not of this
Definition: key.h:313
void break_apart(Key< LDIM > &key1, Key< KDIM > &key2) const
break key into two low-dimensional keys
Definition: key.h:269
int dim_per_vector(int idim) const
return the number of physical dimensions
Definition: srconf.h:665
static int max_sigma(const double &thresh, const long &rank, const Tensor< double > &w)
Definition: srconf.h:109
Tensor< T > & ref_vector(const unsigned int &idim)
return reference to one of the vectors F
Definition: srconf.h:530
Definition: SVDTensor.h:42
Convolutions in separated form (including Gaussian)
Definition: operator.h:136
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)
Definition: operator.h:1008
Timer timer_low_transf
Definition: operator.h:154
const int & particle() const
Definition: operator.h:180
bool destructive_
destroy the argument or restore it (expensive for 6d functions)
Definition: operator.h:148
int particle_
must only be 1 or 2
Definition: operator.h:147
bool isperiodicsum
Definition: operator.h:144
const double & mu() const
Definition: operator.h:191
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.
Definition: operator.h:541
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
Definition: operator.h:1165
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)
Definition: operator.h:979
std::vector< ConvolutionND< Q, NDIM > > ops
ConvolutionND keeps data for 1 term, all dimensions, 1 displacement.
Definition: operator.h:161
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())
Definition: operator.h:211
static SeparatedConvolution< Q, NDIM > combine(const SeparatedConvolution< Q, NDIM > &left, const SeparatedConvolution< Q, NDIM > &right)
combine 2 convolution operators to one
Definition: operator.h:1690
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
Definition: operator.h:926
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.
Definition: operator.h:430
friend 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
Definition: operator.h:1700
const BoundaryConditions< NDIM > & get_bc() const
Definition: operator.h:1126
double munorm2(Level n, const ConvolutionData1D< Q > *ops[]) const
Definition: operator.h:628
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
Definition: operator.h:1227
Timer timer_stats_accumulate
Definition: operator.h:156
SimpleCache< SeparatedConvolutionData< Q, NDIM >, NDIM > data
cache for all terms, dims and displacements
Definition: operator.h:171
double munorm2_ns(Level n, const ConvolutionData1D< Q > *ops[]) const
Definition: operator.h:636
virtual ~SeparatedConvolution()
Definition: operator.h:1108
SimpleCache< SeparatedConvolutionData< Q, NDIM >, 2 *NDIM > mod_data
cache for all terms, dims and displacements
Definition: operator.h:172
argT operator()(const argT &argument) const
apply this onto another suitable argument, returning the same type
Definition: operator.h:1214
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
Definition: operator.h:788
Timer timer_full
Definition: operator.h:153
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
Definition: operator.h:1405
Q opT
The apply function uses this to infer resultT=opT*inputT.
Definition: operator.h:139
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)
Definition: operator.h:1206
const std::vector< long > v2k
Definition: operator.h:167
bool doleaves
If should be applied to leaf coefficients ... false by default.
Definition: operator.h:143
Function< TENSOR_RESULT_TYPE(T, Q), FDIM > operator()(const Function< T, FDIM > &f) const
apply this operator on a function f
Definition: operator.h:1177
void print_timer() const
Definition: operator.h:1110
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)
Definition: operator.h:836
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)
Definition: operator.h:945
void apply_transformation3(const Tensor< T > trans2[NDIM], const Tensor< T > &f, const Q mufac, Tensor< R > &result) const
accumulate into result
Definition: operator.h:353
bool & modified()
Definition: operator.h:176
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
Definition: operator.h:761
const std::vector< long > vk
Definition: operator.h:166
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
Definition: operator.h:1133
static std::pair< Tensor< double >, Tensor< double > > make_coeff_for_operator(World &world, OperatorInfo info, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc())
Definition: operator.h:235
bool & destructive()
Definition: operator.h:187
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
Definition: operator.h:1183
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
Definition: operator.h:1309
void reset_timer() const
Definition: operator.h:1118
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,...
Definition: operator.h:1653
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)
Definition: operator.h:1021
const double & gamma() const
Definition: operator.h:190
int & particle()
Definition: operator.h:179
bool print_timings
Definition: operator.h:149
Timer timer_low_accumulate
Definition: operator.h:155
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
Definition: operator.h:1513
const std::vector< Slice > s0
Definition: operator.h:168
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()
Definition: operator.h:370
const bool & destructive() const
Definition: operator.h:188
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
Definition: operator.h:883
const FunctionCommonData< Q, NDIM > & cdata
Definition: operator.h:164
const int k
Definition: operator.h:163
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)
Definition: operator.h:1194
OperatorInfo info
Definition: operator.h:141
SeparatedConvolution< Q, NDIM > & set_particle(const int p)
Definition: operator.h:181
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
Definition: operator.h:1572
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
Definition: operator.h:802
Key< NDIM > keyT
Definition: operator.h:151
static const size_t opdim
Definition: operator.h:152
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
Definition: operator.h:290
void check_cubic()
Definition: operator.h:865
void initialize(const Tensor< Q > &coeff, const Tensor< double > &expnt)
Definition: operator.h:1043
const std::vector< Key< NDIM > > & get_disp(Level n) const
Definition: operator.h:1128
bool modified_
use modified NS form
Definition: operator.h:146
int rank
Definition: operator.h:165
const BoundaryConditions< NDIM > bc
Definition: operator.h:162
double munorm2_modified(Level n, const ConvolutionData1D< Q > *ops_1d[]) const
Definition: operator.h:669
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)
Definition: operator.h:1066
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
Definition: operator.h:732
const bool & modified() const
Definition: operator.h:177
static bool can_combine(const SeparatedConvolution< Q, NDIM > &left, const SeparatedConvolution< Q, NDIM > &right)
Definition: operator.h:1648
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
Definition: operator.h:1148
Simplified interface around hash_map to cache stuff for 1D.
Definition: simplecache.h:46
A slice defines a sub-range or patch of a dimension.
Definition: slice.h:103
Definition: tensortrain.h:123
TensorTrain< T > & make_operator()
convert this into an operator representation (r,k',k,r)
Definition: tensortrain.h:1188
TensorTrain< T > & make_tensor()
convert this into a tensor representation (r,k,r)
Definition: tensortrain.h:1176
std::enable_if<!std::is_arithmetic< R >::value, void >::type truncate(double eps)
recompress and truncate this TT representation
Definition: tensortrain.h:883
T * ptr()
Returns a pointer to the internal data.
Definition: tensor.h:1824
float_scalar_type normf() const
Returns the Frobenius norm of the tensor.
Definition: tensor.h:1726
T max(long *ind=0) const
Return the maximum value (and if ind is non-null, its index) in the Tensor.
Definition: tensor.h:1703
IsSupported< TensorTypeData< Q >, Tensor< T > & >::type scale(Q x)
Inplace multiplication by scalar of supported type (legacy name)
Definition: tensor.h:686
Definition: function_common_data.h:169
void print(std::string line="") const
print timer
Definition: function_common_data.h:216
void accumulate(const double time) const
accumulate timer
Definition: function_common_data.h:183
void reset() const
Definition: function_common_data.h:210
A simple, fixed dimension vector.
Definition: vector.h:64
Implements most parts of a globally addressable object (via unique ID).
Definition: world_object.h:364
World & world
The World this object belongs to. (Think globally, act locally).
Definition: world_object.h:381
void process_pending()
To be called from derived constructor to process pending messages.
Definition: world_object.h:656
World & get_world() const
Returns a reference to the world.
Definition: world_object.h:717
A parallel world class.
Definition: world.h:132
ProcessID rank() const
Returns the process rank in this World (same as MPI_Comm_rank()).
Definition: world.h:318
unsigned long id() const
Definition: world.h:313
Defines common mathematical and physical constants.
Compuates most matrix elements over 1D operators (including Gaussians)
static const double R
Definition: csqrt.cc:46
double(* f1)(const coord_3d &)
Definition: derivatives.cc:55
double(* f2)(const coord_3d &)
Definition: derivatives.cc:56
char * p(char *buf, const char *name, int k, int initial_level, double thresh, int order)
Definition: derivatives.cc:72
static double lo
Definition: dirac-hatom.cc:23
static double shift
Definition: dirac-hatom.cc:19
fit isotropic functions to a set of Gaussians with controlled precision
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
Tensor< double > op(const Tensor< double > &x)
Definition: kain.cc:508
static double pow(const double *a, const double *b)
Definition: lda.h:74
#define max(a, b)
Definition: lda.h:51
#define MADNESS_CHECK(condition)
Check a condition — even in a release build the condition is always evaluated so it can have side eff...
Definition: madness_exception.h:190
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition: madness_exception.h:119
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition: madness_exception.h:134
const double pi
Mathematical constant .
Definition: constants.h:48
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
@ BC_PERIODIC
Definition: funcdefaults.h:56
static SeparatedConvolution< double, 3 > * FGOperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.
Definition: operator.h:1959
static SeparatedConvolution< double_complex, 3 > * PeriodicBSHOperatorPtr3D(World &world, Vector< double, 3 > args, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
Definition: operator.h:1837
std::shared_ptr< real_convolution_3d > real_convolution_3d_ptr
Definition: functypedefs.h:135
static double cpu_time()
Returns the cpu time in seconds relative to an arbitrary origin.
Definition: timers.h:127
static SeparatedConvolution< double, NDIM > * BSHOperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Factory function generating separated kernel for convolution with BSH kernel in general NDIM.
Definition: operator.h:1790
SeparatedConvolution< double, 3 > real_convolution_3d
Definition: functypedefs.h:121
static SeparatedConvolution< double, 3 > SlaterF12Operator(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Definition: operator.h:1862
static SeparatedConvolution< double, 3 > * F2GOperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in ...
Definition: operator.h:1971
GenTensor< TENSOR_RESULT_TYPE(R, Q)> general_transform(const GenTensor< R > &t, const Tensor< Q > c[])
Definition: gentensor.h:274
static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > GradCoulombOperator(World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating operator for convolution with grad(1/r) in 3D.
Definition: operator.h:2052
response_space apply(World &world, std::vector< std::vector< std::shared_ptr< real_convolution_3d >>> &op, response_space &f)
Definition: basic_operators.cc:39
void fast_transpose(long n, long m, const T *a, T *MADNESS_RESTRICT b)
a(n,m) --> b(m,n) ... optimized for smallish matrices
Definition: convolution1d.h:69
static std::vector< std::shared_ptr< SeparatedConvolution< double, 3 > > > GradBSHOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating operator for convolution with grad(bsh) in 3D.
Definition: operator.h:2105
static SeparatedConvolution< double, 3 > BSHOperator3D(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
Definition: operator.h:1803
static SeparatedConvolution< double, NDIM > * SlaterOperatorPtr_ND(World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Definition: operator.h:1916
static SeparatedConvolution< double, 3 > FGOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with 1/(2 mu)*(1 - exp(-mu*r))/r in 3D.
Definition: operator.h:1948
Function< T, NDIM > copy(const Function< T, NDIM > &f, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool fence=true)
Create a new copy of the function with different distribution and optional fence.
Definition: mra.h:2002
int64_t Translation
Definition: key.h:54
static SeparatedConvolution< double, 3 > SmoothingOperator3D(World &world, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Definition: operator.h:1992
void mTxmq_padding(long dimi, long dimj, long dimk, long ext_b, cT *c, const aT *a, const bT *b)
Definition: mtxmq.h:96
static SeparatedConvolution< double_complex, 3 > PeriodicBSHOperator3D(World &world, Vector< double, 3 > args, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
Definition: operator.h:1812
static SeparatedConvolution< double_complex, 3 > PeriodicHFExchangeOperator(World &world, Vector< double, 3 > args, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with 1/r in 3D.
Definition: operator.h:1721
static SeparatedConvolution< double, NDIM > GaussOperator(World &world, double mu, double lo=0.0, double eps=0.0, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r*r)
Definition: operator.h:1894
static const Slice _(0,-1, 1)
static SeparatedConvolution< double, 3 > CoulombOperator(World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with 1/r in 3D.
Definition: operator.h:1748
int Level
Definition: key.h:55
OpType
operator types
Definition: operatorinfo.h:11
@ OT_FG12
1-exp(-r)
Definition: operatorinfo.h:18
@ OT_SLATER
1/r
Definition: operatorinfo.h:15
@ OT_GAUSS
exp(-r)
Definition: operatorinfo.h:16
@ OT_BSH
(1-exp(-r))^2/r = 1/r + exp(-2r)/r - 2 exp(-r)/r
Definition: operatorinfo.h:21
@ OT_F12
exp(-r2)
Definition: operatorinfo.h:17
@ OT_F212
(1-exp(-r))/r
Definition: operatorinfo.h:19
@ OT_UNDEFINED
Definition: operatorinfo.h:12
@ OT_G12
indicates the identity
Definition: operatorinfo.h:14
@ OT_F2G12
(1-exp(-r))^2
Definition: operatorinfo.h:20
static SeparatedConvolution< double, 3 > SlaterF12sqOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Definition: operator.h:1867
static SeparatedConvolution< double, NDIM > * GaussOperatorPtr(World &world, double mu, double lo=0.0, double eps=0.0, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r*r) in 3D.
Definition: operator.h:1905
TENSOR_RESULT_TYPE(T, R) inner(const Function< T
Computes the scalar/inner product between two functions.
Definition: vmra.h:1059
static SeparatedConvolution< double, 3 > * SlaterOperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Definition: operator.h:1925
static SeparatedConvolution< double, NDIM > SmoothingOperator(World &world, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Definition: operator.h:2008
void print(const T &t, const Ts &... ts)
Print items to std::cout (items separated by spaces) and terminate with a new line.
Definition: print.h:225
TensorType
low rank representations of tensors (see gentensor.h)
Definition: gentensor.h:120
@ TT_2D
Definition: gentensor.h:120
static SeparatedConvolution< double, 3 > * SlaterF12sqOperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Definition: operator.h:1874
Function< T, NDIM > sum(World &world, const std::vector< Function< T, NDIM > > &f, bool fence=true)
Returns new function — q = sum_i f[i].
Definition: vmra.h:1421
NDIM & f
Definition: mra.h:2416
GenTensor< T > reduce(std::list< GenTensor< T > > &addends, double eps, bool are_optimal=false)
add all the GenTensors of a given list
Definition: gentensor.h:246
static SeparatedConvolution< double, 3 > F2GOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with (1/(2 mu)*(1 - exp(-mu*r)))^2/r in ...
Definition: operator.h:1983
static SeparatedConvolution< double, 3 > * CoulombOperatorPtr(World &world, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with 1/r in 3D.
Definition: operator.h:1762
std::string type(const PairType &n)
Definition: PNOParameters.h:18
static SeparatedConvolution< double, NDIM > SlaterOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r) in 3D.
Definition: operator.h:1883
static SeparatedConvolution< double, 3 > * BSHOperatorPtr3D(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with exp(-mu*r)/(4*pi*r) in 3D.
Definition: operator.h:2023
static SeparatedConvolution< double, NDIM > BSHOperator(World &world, double mu, double lo, double eps, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), int k=FunctionDefaults< NDIM >::get_k())
Factory function generating separated kernel for convolution with BSH kernel in general NDIM.
Definition: operator.h:1776
void swap(Vector< T, N > &l, Vector< T, N > &r)
Swap the contents of two Vectors.
Definition: vector.h:497
static SeparatedConvolution< double, 3 > * SlaterF12OperatorPtr(World &world, double mu, double lo, double eps, const BoundaryConditions< 3 > &bc=FunctionDefaults< 3 >::get_bc(), int k=FunctionDefaults< 3 >::get_k())
Factory function generating separated kernel for convolution with (1 - exp(-mu*r))/(2 mu) in 3D.
Definition: operator.h:1935
void mTxmq(long dimi, long dimj, long dimk, T *MADNESS_RESTRICT c, const T *a, const T *b, long ldb=-1)
Matrix = Matrix transpose * matrix ... MKL interface version.
Definition: mxm.h:257
static const string dir
Definition: corepotential.cc:249
static void aligned_axpy(long n, T *MADNESS_RESTRICT a, const T *MADNESS_RESTRICT b, Q s)
Definition: aligned.h:75
static long abs(long a)
Definition: tensor.h:218
const double mu
Definition: navstokes_cosines.cc:95
static const double b
Definition: nonlinschro.cc:119
static const double a
Definition: nonlinschro.cc:118
double Q(double a)
Definition: relops.cc:20
static const double c
Definition: relops.cc:10
static const double L
Definition: rk.cc:46
static const double thresh
Definition: rk.cc:45
static const long k
Definition: rk.cc:44
Definition: test_ccpairfunction.cc:22
!!! Note that if Rnormf is zero then ALL of the tensors are empty
Definition: convolution1d.h:161
double N_up
Definition: convolution1d.h:172
double N_F
the norms according to Beylkin 2008, Eq. (21) ff
Definition: convolution1d.h:172
double N_diff
Definition: convolution1d.h:172
Definition: convolution1d.h:849
Definition: operatorinfo.h:58
double hi
Definition: operatorinfo.h:65
OpType type
introspection
Definition: operatorinfo.h:64
double mu
some introspection
Definition: operatorinfo.h:61
SeparatedConvolutionData keeps data for all terms, all dimensions.
Definition: operator.h:90
std::vector< SeparatedConvolutionInternal< Q, NDIM > > muops
Definition: operator.h:91
SeparatedConvolutionData(int rank)
Definition: operator.h:94
double norm
Definition: operator.h:92
SeparatedConvolutionData(const SeparatedConvolutionData< Q, NDIM > &q)
Definition: operator.h:95
Definition: operator.h:81
double norm
Definition: operator.h:82
const ConvolutionData1D< Q > * ops[NDIM]
Definition: operator.h:83
laziness for calling lists: which terms to apply
Definition: operator.h:196
bool t_term
Definition: operator.h:199
bool r_term
Definition: operator.h:198
bool any_terms() const
Definition: operator.h:200
ApplyTerms()
Definition: operator.h:197
static void load(const Archive &ar, const SeparatedConvolution< T, NDIM > *&ptr)
Definition: operator.h:2157
Default load of an object via serialize(ar, t).
Definition: archive.h:666
static void store(const Archive &ar, const SeparatedConvolution< T, NDIM > *const &ptr)
Definition: operator.h:2166
Default store of an object via serialize(ar, t).
Definition: archive.h:611
Definition: lowrankfunction.h:332
void doit(World &world)
Definition: tdse.cc:921
Prototypes for a partial interface from Tensor to LAPACK.
int factorial(int n)
Definition: test_BSHApply.cc:14
void d()
Definition: test_sig.cc:79
void e()
Definition: test_sig.cc:75
double aa
Definition: testbsh.cc:68
static const double pi
Definition: testcosine.cc:6
std::vector< double > fit(size_t m, size_t n, const std::vector< double > N, const std::vector< double > &f)
Definition: testfuns.cc:36
double h(const coord_1d &r)
Definition: testgconv.cc:68
static const std::size_t NDIM
Definition: testpdiff.cc:42
double source(const coordT &r)
Definition: testperiodic.cc:48
#define PROFILE_MEMBER_FUNC(classname)
Definition: worldprofile.h:210