MADNESS  0.10.1
Public Types | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes | List of all members
madness::FunctionCommonData< T, NDIM > Class Template Reference

FunctionCommonData holds all Function data common for given k. More...

#include <function_common_data.h>

Collaboration diagram for madness::FunctionCommonData< T, NDIM >:
Collaboration graph
[legend]

Public Types

typedef Tensor< TtensorT
 Type of tensor used to hold coeff. More...
 

Static Public Member Functions

static void _init_quadrature (int k, int npt, Tensor< double > &quad_x, Tensor< double > &quad_w, Tensor< double > &quad_phi, Tensor< double > &quad_phiw, Tensor< double > &quad_phit)
 Initialize the quadrature information. More...
 
static const FunctionCommonData< T, NDIM > & get (int k)
 

Public Attributes

Tensor< double > g0
 
Tensor< double > g0T
 
Tensor< double > g1
 The separate blocks of twoscale coefficients. More...
 
Tensor< double > g1T
 The separate blocks of twoscale coefficients. More...
 
Tensor< double > h0
 
Tensor< double > h0T
 
Tensor< double > h1
 
Tensor< double > h1T
 
Tensor< double > hg
 
Tensor< double > hgsonly
 hg[0:k,:] More...
 
Tensor< double > hgT
 The full twoscale coeff (2k,2k) and transpose. More...
 
int k
 order of the wavelet More...
 
Key< NDIMkey0
 Key for root node. More...
 
int npt
 no. of quadrature points More...
 
Tensor< double > quad_phi
 quad_phi(i,j) = at x[i] value of phi[j] More...
 
Tensor< double > quad_phit
 transpose of quad_phi More...
 
Tensor< double > quad_phiw
 quad_phiw(i,j) = at x[i] value of w[i]*phi[j] More...
 
Tensor< double > quad_w
 quadrature weights More...
 
Tensor< double > quad_x
 quadrature points More...
 
Slice s [4]
 s[0]=Slice(0,k-1), s[1]=Slice(k,2*k-1), etc. More...
 
std::vector< Slices0
 s[0] in each dimension to get scaling coeff More...
 
std::vector< Slicesh
 Slice(0,(k-1)/2) in each dimension for autorefine test. More...
 
std::vector< long > v2k
 (2k,...) used to initialize Tensors More...
 
std::vector< long > vk
 (k,...) used to initialize Tensors More...
 
std::vector< long > vq
 (npt,...) used to initialize Tensors More...
 

Private Member Functions

 FunctionCommonData (int k)
 Private. Do first use initialization via get. More...
 
void _init_twoscale ()
 Private. Initialize the twoscale coefficients. More...
 

Static Private Attributes

static const FunctionCommonData< T, NDIM > * data [MAXK] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
 

Detailed Description

template<typename T, std::size_t NDIM>
class madness::FunctionCommonData< T, NDIM >

FunctionCommonData holds all Function data common for given k.

Since Function assignment and copy constructors are shallow it greatly simplifies maintaining consistent state to have all (permanent) state encapsulated in a single class. The state is shared between instances using a shared_ptr. Also, separating shared from instance specific state accelerates the constructor, which is important for massive parallelism, and permitting inexpensive use of temporaries. The default copy constructor and assignment operator are used but are probably never invoked.

Member Typedef Documentation

◆ tensorT

template<typename T , std::size_t NDIM>
typedef Tensor<T> madness::FunctionCommonData< T, NDIM >::tensorT

Type of tensor used to hold coeff.

Constructor & Destructor Documentation

◆ FunctionCommonData()

template<typename T , std::size_t NDIM>
madness::FunctionCommonData< T, NDIM >::FunctionCommonData ( int  k)
inlineprivate

Member Function Documentation

◆ _init_quadrature()

template<typename T , std::size_t NDIM>
void madness::FunctionCommonData< T, NDIM >::_init_quadrature ( int  k,
int  npt,
Tensor< double > &  quad_x,
Tensor< double > &  quad_w,
Tensor< double > &  quad_phi,
Tensor< double > &  quad_phiw,
Tensor< double > &  quad_phit 
)
static

◆ _init_twoscale()

template<typename T , std::size_t NDIM>
void madness::FunctionCommonData< T, NDIM >::_init_twoscale
private

Private. Initialize the twoscale coefficients.

References madness::_(), madness::copy(), k, madness::transpose(), and madness::two_scale_hg().

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ get()

template<typename T , std::size_t NDIM>
static const FunctionCommonData<T, NDIM>& madness::FunctionCommonData< T, NDIM >::get ( int  k)
inlinestatic

Member Data Documentation

◆ data

template<typename T , std::size_t NDIM>
const FunctionCommonData< T, NDIM > * madness::FunctionCommonData< T, NDIM >::data = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
staticprivate

◆ g0

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::g0

◆ g0T

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::g0T

◆ g1

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::g1

The separate blocks of twoscale coefficients.

◆ g1T

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::g1T

The separate blocks of twoscale coefficients.

◆ h0

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h0

◆ h0T

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h0T

◆ h1

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h1

◆ h1T

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h1T

◆ hg

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::hg

◆ hgsonly

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::hgsonly

hg[0:k,:]

◆ hgT

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::hgT

The full twoscale coeff (2k,2k) and transpose.

◆ k

template<typename T , std::size_t NDIM>
int madness::FunctionCommonData< T, NDIM >::k

◆ key0

template<typename T , std::size_t NDIM>
Key<NDIM> madness::FunctionCommonData< T, NDIM >::key0

◆ npt

template<typename T , std::size_t NDIM>
int madness::FunctionCommonData< T, NDIM >::npt

no. of quadrature points

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ quad_phi

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_phi

quad_phi(i,j) = at x[i] value of phi[j]

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ quad_phit

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_phit

◆ quad_phiw

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_phiw

quad_phiw(i,j) = at x[i] value of w[i]*phi[j]

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData(), and madness::FunctionImpl< T, NDIM >::mul().

◆ quad_w

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_w

◆ quad_x

template<typename T , std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_x

◆ s

template<typename T , std::size_t NDIM>
Slice madness::FunctionCommonData< T, NDIM >::s[4]

s[0]=Slice(0,k-1), s[1]=Slice(k,2*k-1), etc.

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ s0

template<typename T , std::size_t NDIM>
std::vector<Slice> madness::FunctionCommonData< T, NDIM >::s0

◆ sh

template<typename T , std::size_t NDIM>
std::vector<Slice> madness::FunctionCommonData< T, NDIM >::sh

Slice(0,(k-1)/2) in each dimension for autorefine test.

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ v2k

template<typename T , std::size_t NDIM>
std::vector<long> madness::FunctionCommonData< T, NDIM >::v2k

(2k,...) used to initialize Tensors

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().

◆ vk

template<typename T , std::size_t NDIM>
std::vector<long> madness::FunctionCommonData< T, NDIM >::vk

◆ vq

template<typename T , std::size_t NDIM>
std::vector<long> madness::FunctionCommonData< T, NDIM >::vq

(npt,...) used to initialize Tensors

Referenced by madness::FunctionCommonData< T, NDIM >::FunctionCommonData().


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