MADNESS  version 0.9
Public Types | Static Public Member Functions | Public 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< T > tensorT
 Type of tensor used to hold coeff. More...
 

Static Public Member Functions

static const
FunctionCommonData< T, NDIM > & 
get (int k)
 
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...
 

Public Attributes

int k
 order of the wavelet More...
 
int npt
 no. of 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 > vk
 (k,...) used to initialize Tensors More...
 
std::vector< long > v2k
 (2k,...) used to initialize Tensors More...
 
std::vector< long > vq
 (npt,...) used to initialize Tensors More...
 
Key< NDIMkey0
 Key for root node. More...
 
Tensor< double > quad_x
 quadrature points More...
 
Tensor< double > quad_w
 quadrature weights 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 > h0
 
Tensor< double > h1
 
Tensor< double > g0
 
Tensor< double > g1
 The separate blocks of twoscale coefficients. More...
 
Tensor< double > h0T
 
Tensor< double > h1T
 
Tensor< double > g0T
 
Tensor< double > g1T
 The separate blocks of twoscale coefficients. More...
 
Tensor< double > hg
 
Tensor< double > hgT
 The full twoscale coeff (2k,2k) and transpose. More...
 
Tensor< double > hgsonly
 hg[0:k,:] More...
 

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

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

Type of tensor used to hold coeff.

Member Function Documentation

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

Initialize the quadrature information.

Made public with all arguments thru interface for reuse in FunctionImpl::err_box

References madness::gauss_legendre(), madness::legendre_scaling_functions(), mu, and madness::transpose().

Referenced by madness::FunctionImpl< Q, NDIM >::errsq_local(), and madness::FunctionImpl< T, NDIM >::print_plane_local().

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

Member Data Documentation

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

The separate blocks of twoscale coefficients.

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

The separate blocks of twoscale coefficients.

template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h0
template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h0T
template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h1
template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::h1T
template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::hg
template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::hgsonly

hg[0:k,:]

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

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

Referenced by madness::FunctionImpl< Q, NDIM >::values2NScoeffs().

template<typename T, std::size_t NDIM>
int madness::FunctionCommonData< T, NDIM >::k
template<typename T, std::size_t NDIM>
Key<NDIM> madness::FunctionCommonData< T, NDIM >::key0
template<typename T, std::size_t NDIM>
int madness::FunctionCommonData< T, NDIM >::npt
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]

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

quadrature weights

template<typename T, std::size_t NDIM>
Tensor<double> madness::FunctionCommonData< T, NDIM >::quad_x
template<typename T, std::size_t NDIM>
Slice madness::FunctionCommonData< T, NDIM >::s[4]
template<typename T, std::size_t NDIM>
std::vector<Slice> madness::FunctionCommonData< T, NDIM >::s0
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.

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

(npt,...) used to initialize Tensors


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