MADNESS  0.10.1
Public Member Functions | Public Attributes | Private Types | List of all members
GaussianGuess< NDIM > Class Template Reference

an N-dimensional real-valued Gaussian function More...

Inheritance diagram for GaussianGuess< NDIM >:
Inheritance graph
[legend]
Collaboration diagram for GaussianGuess< NDIM >:
Collaboration graph
[legend]

Public Member Functions

 GaussianGuess (const coordT &origin, const double alpha, const std::vector< int > ijk=std::vector< int >(NDIM))
 ctor More...
 
 GaussianGuess (const coordT &origin, const double alpha, const std::vector< int > ijk=std::vector< int >(NDIM))
 ctor More...
 
 GaussianGuess (const coordT &origin, const double alpha, int l)
 ctor More...
 
double operator() (const coordT &xyz) const
 You should implement this to return f(x) More...
 
T operator() (const coordT &xyz) const
 virtual function cannot be SFINAE'ed More...
 
template<class R = T>
std::enable_if< std::is_same< R, std::complex< double > >::value, R >::type val (const coordT &xyz) const
 
template<class R = T>
std::enable_if< std::is_same< R, double >::value, R >::type val (const coordT &xyz) const
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< double, NDIM >
 FunctionFunctorInterface ()
 
virtual ~FunctionFunctorInterface ()
 
virtual coeffT coeff (const keyT &) const
 
virtual void operator() (const Vector< double *, 1 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, double *fvals, int npts) const
 
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
virtual bool screened (const Vector< double, NDIM > &c1, const Vector< double, NDIM > &c2) const
 Can we screen this function based on the bounding box information? More...
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale More...
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6) More...
 
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply. More...
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()? More...
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< T, NDIM >
 FunctionFunctorInterface ()
 
virtual ~FunctionFunctorInterface ()
 
virtual coeffT coeff (const keyT &) const
 
virtual void operator() (const Vector< double *, 1 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, T *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, T *fvals, int npts) const
 
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
virtual bool screened (const Vector< double, NDIM > &c1, const Vector< double, NDIM > &c2) const
 Can we screen this function based on the bounding box information? More...
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale More...
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6) More...
 
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply. More...
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()? More...
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 

Public Attributes

double exponent
 exponent of the guess More...
 
std::vector< int > ijk
 cartesian exponents More...
 
int l =0
 magnetic quantum number (if T=double_complex) More...
 
coordT origin
 
double phase =double(rand()%1000)/1000.0
 complex phase (if applicable) More...
 
- Public Attributes inherited from madness::FunctionFunctorInterface< double, NDIM >
Level special_level_
 
- Public Attributes inherited from madness::FunctionFunctorInterface< T, NDIM >
Level special_level_
 

Private Types

typedef Vector< double, NDIMcoordT
 
typedef Vector< double, NDIMcoordT
 

Additional Inherited Members

- Public Types inherited from madness::FunctionFunctorInterface< double, NDIM >
typedef GenTensor< double > coeffT
 
typedef Key< NDIMkeyT
 
typedef double value_type
 
- Public Types inherited from madness::FunctionFunctorInterface< T, NDIM >
typedef GenTensor< TcoeffT
 
typedef Key< NDIMkeyT
 
typedef T value_type
 

Detailed Description

template<std::size_t NDIM>
class GaussianGuess< NDIM >

an N-dimensional real-valued Gaussian function

the function looks like [ f(r) = x^i y^j .. z^k exp(-alpha r^2) ]

Member Typedef Documentation

◆ coordT [1/2]

template<std::size_t NDIM>
typedef Vector<double, NDIM> GaussianGuess< NDIM >::coordT
private

◆ coordT [2/2]

template<std::size_t NDIM>
typedef Vector<double,NDIM> GaussianGuess< NDIM >::coordT
private

Constructor & Destructor Documentation

◆ GaussianGuess() [1/3]

template<std::size_t NDIM>
GaussianGuess< NDIM >::GaussianGuess ( const coordT origin,
const double  alpha,
const std::vector< int >  ijk = std::vector<int>(NDIM) 
)
inline

ctor

Parameters
[in]originthe origin of the Gauss function
[in]alphathe exponent exp(-alpha r^2)
[in]ijkthe monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)

◆ GaussianGuess() [2/3]

template<std::size_t NDIM>
GaussianGuess< NDIM >::GaussianGuess ( const coordT origin,
const double  alpha,
const std::vector< int >  ijk = std::vector<int>(NDIM) 
)
inline

ctor

Parameters
[in]originthe origin of the Gauss function
[in]alphathe exponent exp(-alpha r^2)
[in]ijkthe monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)

◆ GaussianGuess() [3/3]

template<std::size_t NDIM>
GaussianGuess< NDIM >::GaussianGuess ( const coordT origin,
const double  alpha,
int  l 
)
inline

ctor

Parameters
[in]originthe origin of the Gauss function
[in]alphathe exponent exp(-alpha r^2)
[in]ijkthe monomial x^i y^j z^k exp(-alpha r^2) (for NDIM)

References std::abs(), and NDIM.

Member Function Documentation

◆ operator()() [1/2]

template<std::size_t NDIM>
double GaussianGuess< NDIM >::operator() ( const coordT x) const
inlinevirtual

◆ operator()() [2/2]

template<std::size_t NDIM>
T GaussianGuess< NDIM >::operator() ( const coordT xyz) const
inlinevirtual

virtual function cannot be SFINAE'ed

Implements madness::FunctionFunctorInterface< T, NDIM >.

◆ val() [1/2]

template<std::size_t NDIM>
template<class R = T>
std::enable_if<std::is_same<R,std::complex<double> >::value, R>::type GaussianGuess< NDIM >::val ( const coordT xyz) const
inline

References e(), NDIM, madness::phase(), pow(), and T().

◆ val() [2/2]

template<std::size_t NDIM>
template<class R = T>
std::enable_if<std::is_same<R,double>::value, R>::type GaussianGuess< NDIM >::val ( const coordT xyz) const
inline

References e(), NDIM, and pow().

Member Data Documentation

◆ exponent

template<std::size_t NDIM>
double GaussianGuess< NDIM >::exponent

exponent of the guess

Referenced by GaussianGuess< NDIM >::operator()().

◆ ijk

template<std::size_t NDIM>
std::vector< int > GaussianGuess< NDIM >::ijk

cartesian exponents

Referenced by GaussianGuess< NDIM >::operator()().

◆ l

template<std::size_t NDIM>
int GaussianGuess< NDIM >::l =0

magnetic quantum number (if T=double_complex)

◆ origin

template<std::size_t NDIM>
coordT GaussianGuess< NDIM >::origin

◆ phase

template<std::size_t NDIM>
double GaussianGuess< NDIM >::phase =double(rand()%1000)/1000.0

complex phase (if applicable)


The documentation for this class was generated from the following files: