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
 
 GaussianGuess (const coordT &origin, const double alpha, const std::vector< int > ijk=std::vector< int >(NDIM))
 ctor
 
 GaussianGuess (const coordT &origin, const double alpha, int l)
 ctor
 
double operator() (const coordT &xyz) const
 You should implement this to return f(x)
 
T operator() (const coordT &xyz) const
 virtual function cannot be SFINAE'ed
 
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?
 
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?
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6)
 
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply.
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()?
 
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?
 
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?
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6)
 
virtual std::vector< Vector< double, NDIM > > special_points () const
 Override this to return list of special points to be refined more deeply.
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()?
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 

Public Attributes

double exponent
 exponent of the guess
 
std::vector< int > ijk
 cartesian exponents
 
int l =0
 magnetic quantum number (if T=double_complex)
 
coordT origin
 
double phase =double(rand()%1000)/1000.0
 complex phase (if applicable)
 
- 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)

References GaussianGuess< NDIM >::ijk, and GaussianGuess< NDIM >::l.

◆ 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(), GaussianGuess< NDIM >::ijk, GaussianGuess< NDIM >::l, 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< double, NDIM >.

References GaussianGuess< NDIM >::val().

◆ 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

◆ 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

Member Data Documentation

◆ exponent

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

exponent of the guess

Referenced by GaussianGuess< NDIM >::operator()(), and GaussianGuess< NDIM >::val().

◆ ijk

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

◆ l

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

magnetic quantum number (if T=double_complex)

Referenced by GaussianGuess< NDIM >::GaussianGuess(), and GaussianGuess< NDIM >::GaussianGuess().

◆ 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)

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


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