MADNESS 0.10.1
|
Implements derivatives operators with variety of boundary conditions on simulation domain. More...
#include <derivative.h>
Public Types | |
typedef std::pair< keyT, coeffT > | argT |
typedef GenTensor< T > | coeffT |
holding the node's coeffs (possibly low rank) | |
typedef WorldContainer< Key< NDIM >, FunctionNode< T, NDIM > > | dcT |
typedef Function< T, NDIM > | functionT |
typedef FunctionImpl< T, NDIM > | implT |
typedef Key< NDIM > | keyT |
typedef FunctionNode< T, NDIM > | nodeT |
typedef T | opT |
typedef Tensor< T > | tensorT |
Public Types inherited from madness::DerivativeBase< T, NDIM > | |
typedef std::pair< keyT, coeffT > | argT |
typedef GenTensor< T > | coeffT |
holding the node's coeffs (possibly low rank) | |
typedef WorldContainer< Key< NDIM >, FunctionNode< T, NDIM > > | dcT |
typedef Function< T, NDIM > | functionT |
typedef FunctionImpl< T, NDIM > | implT |
typedef Key< NDIM > | keyT |
typedef FunctionNode< T, NDIM > | nodeT |
typedef Tensor< T > | tensorT |
regular tensors, like rm, etc | |
Public Types inherited from madness::WorldObject< DerivativeBase< T, NDIM > > | |
typedef WorldObject< DerivativeBase< T, NDIM > > | objT |
Public Member Functions | |
Derivative (World &world, std::size_t axis, const BoundaryConditions< NDIM > &bc=FunctionDefaults< NDIM >::get_bc(), const functionT g1=functionT(), const functionT g2=functionT(), int k=FunctionDefaults< NDIM >::get_k()) | |
Constructs a derivative operator. | |
virtual | ~Derivative () |
void | read_from_file (const std::string &filename, unsigned int order=1) |
void | set_ble1 () |
void | set_ble2 () |
void | set_bspline1 () |
void | set_bspline2 () |
void | set_bspline3 () |
void | set_is_first () |
void | set_is_second () |
void | set_is_third () |
Public Member Functions inherited from madness::DerivativeBase< T, NDIM > | |
DerivativeBase (World &world, std::size_t axis, int k, BoundaryConditions< NDIM > bc) | |
virtual | ~DerivativeBase () |
void | do_diff1 (const implT *f, implT *df, const keyT &key, const argT &left, const argT ¢er, const argT &right) const |
Future< argT > | find_neighbor (const implT *f, const Key< NDIM > &key, int step) const |
void | forward_do_diff1 (const implT *f, implT *df, const keyT &key, const argT &left, const argT ¢er, const argT &right) const |
Key< NDIM > | neighbor (const keyT &key, int step) const |
Function< T, NDIM > | operator() (const functionT &f, bool fence=true) const |
Differentiate w.r.t. given coordinate (x=0, y=1, ...) with optional fence. | |
template<typename Archive > | |
void | serialize (const Archive &ar) const |
Public Member Functions inherited from madness::WorldObject< DerivativeBase< T, NDIM > > | |
WorldObject (const WorldObject &other) | |
WorldObject (World &world) | |
Constructor that associates an object (via the derived class) with a globally unique ID. | |
virtual | ~WorldObject () |
World & | get_world () const |
Returns a reference to the world . | |
const uniqueidT & | id () const |
Returns the globally unique object ID. | |
WorldObject & | operator= (const WorldObject &)=delete |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9) const |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1) . | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)() . | |
Public Member Functions inherited from madness::WorldObjectBase | |
virtual | ~WorldObjectBase ()=default |
Private Types | |
typedef DerivativeBase< T, NDIM > | baseT |
Private Member Functions | |
void | do_diff2b (const implT *f, implT *df, const keyT &key, const argT &left, const argT ¢er, const argT &right) const |
void | do_diff2i (const implT *f, implT *df, const keyT &key, const argT &left, const argT ¢er, const argT &right) const |
void | initCoefficients () |
Private Attributes | |
Tensor< double > | bv_left |
Tensor< double > | bv_right |
Blocks of the derivative operator for the boundary contribution. | |
const functionT | g1 |
Function describing the boundary condition on the right side. | |
const functionT | g2 |
Function describing the boundary condition on the left side. | |
bool | is_second |
bool | is_third |
Tensor< double > | left_r0 |
Blocks of the derivative for the left boundary. | |
Tensor< double > | left_r0t |
Blocks of the derivative for the left boundary. | |
Tensor< double > | left_rm |
Tensor< double > | left_rmt |
Tensor< double > | r0 |
Tensor< double > | r0_bsp |
Tensor< double > | r0_bsp_t |
Tensor< double > | r0t |
Tensor< double > | right_r0 |
Tensor< double > | right_r0t |
Tensor< double > | right_rp |
Blocks of the derivative for the right boundary. | |
Tensor< double > | right_rpt |
Blocks of the derivative for the right boundary. | |
Tensor< double > | rm |
Tensor< double > | rm_bsp |
Tensor< double > | rm_bsp_t |
Tensor< double > | rmt |
Tensor< double > | rp |
Blocks of the derivative operator. | |
Tensor< double > | rp_bsp |
Tensor< double > | rp_bsp_t |
Tensor< double > | rpt |
Blocks of the derivative operator, transposed. | |
Additional Inherited Members | |
Static Public Member Functions inherited from madness::DerivativeBase< T, NDIM > | |
static bool | enforce_bc (int bc_left, int bc_right, Level n, Translation &l) |
Protected Member Functions inherited from madness::WorldObject< DerivativeBase< T, NDIM > > | |
void | process_pending () |
To be called from derived constructor to process pending messages. | |
Protected Attributes inherited from madness::DerivativeBase< T, NDIM > | |
const std::size_t | axis |
Axis along which the operation is performed. | |
const BoundaryConditions< NDIM > | bc |
const int | k |
Number of wavelets of the function. | |
const std::vector< long > | vk |
(k,...) used to initialize Tensors | |
World & | world |
Implements derivatives operators with variety of boundary conditions on simulation domain.
typedef std::pair<keyT,coeffT> madness::Derivative< T, NDIM >::argT |
|
private |
holding the node's coeffs (possibly low rank)
typedef WorldContainer< Key<NDIM> , FunctionNode<T, NDIM> > madness::Derivative< T, NDIM >::dcT |
typedef Function<T,NDIM> madness::Derivative< T, NDIM >::functionT |
typedef FunctionImpl<T,NDIM> madness::Derivative< T, NDIM >::implT |
typedef FunctionNode<T,NDIM> madness::Derivative< T, NDIM >::nodeT |
typedef T madness::Derivative< T, NDIM >::opT |
|
inline |
Constructs a derivative operator.
world | The world |
axis | The direction to differentiate |
bc | Boundary conditions (default from FunctionDefaults) |
g1 | Function providing left boundary value (default empty) |
g2 | Function providing right boundary value (default empty) |
k | Wavelet order (default from FunctionDefaults) |
References madness::DerivativeBase< T, NDIM >::axis, madness::Derivative< T, NDIM >::g1, madness::Derivative< T, NDIM >::g2, madness::Derivative< T, NDIM >::initCoefficients(), MADNESS_ASSERT, NDIM, and madness::WorldObject< DerivativeBase< T, NDIM > >::process_pending().
|
inlinevirtual |
|
inlineprivatevirtual |
Implements madness::DerivativeBase< T, NDIM >.
References madness::DerivativeBase< T, NDIM >::axis, madness::DerivativeBase< T, NDIM >::bc, madness::BC_DIRICHLET, madness::BC_FREE, madness::BC_NEUMANN, madness::BC_PERIODIC, madness::BC_ZERO, madness::BC_ZERONEUMANN, madness::Derivative< T, NDIM >::bv_left, madness::Derivative< T, NDIM >::bv_right, madness::copy(), d, madness::GenTensor< T >::full_tensor_copy(), madness::Derivative< T, NDIM >::g1, madness::Derivative< T, NDIM >::g2, madness::Future< T >::get(), madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::FunctionDefaults< NDIM >::get_rcell_width(), madness::FunctionImpl< T, NDIM >::get_tensor_type(), madness::FunctionImpl< T, NDIM >::get_thresh(), madness::inner(), madness::Derivative< T, NDIM >::is_second, madness::Derivative< T, NDIM >::is_third, madness::DerivativeBase< T, NDIM >::k, madness::Derivative< T, NDIM >::left_r0t, madness::Derivative< T, NDIM >::left_rmt, madness::Key< NDIM >::level(), NDIM, madness::outer(), madness::FunctionImpl< T, NDIM >::parent_to_child(), pow(), madness::WorldContainer< keyT, valueT, hashfunT >::replace(), madness::Derivative< T, NDIM >::right_r0t, madness::Derivative< T, NDIM >::right_rpt, madness::transform_dir(), and madness::Key< NDIM >::translation().
|
inlineprivatevirtual |
Implements madness::DerivativeBase< T, NDIM >.
References madness::DerivativeBase< T, NDIM >::axis, d, madness::FunctionImpl< T, NDIM >::get_coeffs(), madness::FunctionDefaults< NDIM >::get_rcell_width(), madness::FunctionImpl< T, NDIM >::get_thresh(), madness::Derivative< T, NDIM >::is_second, madness::Derivative< T, NDIM >::is_third, madness::Key< NDIM >::level(), madness::FunctionImpl< T, NDIM >::parent_to_child(), pow(), madness::Derivative< T, NDIM >::r0t, madness::WorldContainer< keyT, valueT, hashfunT >::replace(), madness::Derivative< T, NDIM >::rmt, madness::Derivative< T, NDIM >::rpt, and madness::transform_dir().
|
inlineprivate |
References madness::DerivativeBase< T, NDIM >::axis, madness::DerivativeBase< T, NDIM >::bc, madness::BC_DIRICHLET, madness::BC_FREE, madness::BC_NEUMANN, madness::BC_ZERO, madness::BC_ZERONEUMANN, madness::Derivative< T, NDIM >::bv_left, madness::Derivative< T, NDIM >::bv_right, madness::Derivative< T, NDIM >::is_second, madness::Derivative< T, NDIM >::is_third, madness::DerivativeBase< T, NDIM >::k, madness::Derivative< T, NDIM >::left_r0, madness::Derivative< T, NDIM >::left_r0t, madness::Derivative< T, NDIM >::left_rm, madness::Derivative< T, NDIM >::left_rmt, pow(), madness::Derivative< T, NDIM >::r0, madness::Derivative< T, NDIM >::r0t, madness::Derivative< T, NDIM >::right_r0, madness::Derivative< T, NDIM >::right_r0t, madness::Derivative< T, NDIM >::right_rp, madness::Derivative< T, NDIM >::right_rpt, madness::Derivative< T, NDIM >::rm, madness::Derivative< T, NDIM >::rmt, madness::Derivative< T, NDIM >::rp, madness::Derivative< T, NDIM >::rpt, and madness::transpose().
Referenced by madness::Derivative< T, NDIM >::Derivative().
|
inline |
References madness::f, madness::filename, madness::DerivativeBase< T, NDIM >::k, madness::Derivative< T, NDIM >::left_r0, madness::Derivative< T, NDIM >::left_r0t, madness::Derivative< T, NDIM >::left_rm, madness::Derivative< T, NDIM >::left_rmt, m, MADNESS_CHECK, madness::Derivative< T, NDIM >::r0, madness::Derivative< T, NDIM >::r0_bsp, madness::Derivative< T, NDIM >::r0_bsp_t, madness::Derivative< T, NDIM >::r0t, madness::Derivative< T, NDIM >::right_r0, madness::Derivative< T, NDIM >::right_r0t, madness::Derivative< T, NDIM >::right_rp, madness::Derivative< T, NDIM >::right_rpt, madness::Derivative< T, NDIM >::rm, madness::Derivative< T, NDIM >::rm_bsp, madness::Derivative< T, NDIM >::rm_bsp_t, madness::Derivative< T, NDIM >::rmt, madness::Derivative< T, NDIM >::rp, madness::Derivative< T, NDIM >::rp_bsp, madness::Derivative< T, NDIM >::rp_bsp_t, madness::Derivative< T, NDIM >::rpt, madness::Derivative< T, NDIM >::set_is_first(), madness::Derivative< T, NDIM >::set_is_second(), madness::Derivative< T, NDIM >::set_is_third(), and madness::transpose().
Referenced by madness::Derivative< T, NDIM >::set_ble1(), madness::Derivative< T, NDIM >::set_ble2(), madness::Derivative< T, NDIM >::set_bspline1(), madness::Derivative< T, NDIM >::set_bspline2(), and madness::Derivative< T, NDIM >::set_bspline3().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References madness::Derivative< T, NDIM >::is_third.
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
inline |
References madness::Derivative< T, NDIM >::is_second, and madness::Derivative< T, NDIM >::is_third.
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
inline |
References madness::Derivative< T, NDIM >::is_second, and madness::Derivative< T, NDIM >::is_third.
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
|
private |
Blocks of the derivative operator for the boundary contribution.
Referenced by madness::Derivative< T, NDIM >::do_diff2b(), and madness::Derivative< T, NDIM >::initCoefficients().
|
private |
Function describing the boundary condition on the right side.
Referenced by madness::Derivative< T, NDIM >::Derivative(), and madness::Derivative< T, NDIM >::do_diff2b().
|
private |
Function describing the boundary condition on the left side.
Referenced by madness::Derivative< T, NDIM >::Derivative(), and madness::Derivative< T, NDIM >::do_diff2b().
|
private |
|
private |
Referenced by madness::Derivative< T, NDIM >::do_diff2b(), madness::Derivative< T, NDIM >::do_diff2i(), madness::Derivative< T, NDIM >::initCoefficients(), madness::Derivative< T, NDIM >::set_is_first(), madness::Derivative< T, NDIM >::set_is_second(), and madness::Derivative< T, NDIM >::set_is_third().
|
private |
Blocks of the derivative for the left boundary.
Referenced by madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().
|
private |
Blocks of the derivative for the left boundary.
Referenced by madness::Derivative< T, NDIM >::do_diff2b(), madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().
|
private |
|
private |
|
private |
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
|
private |
|
private |
|
private |
Blocks of the derivative for the right boundary.
Referenced by madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().
|
private |
Blocks of the derivative for the right boundary.
Referenced by madness::Derivative< T, NDIM >::do_diff2b(), madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().
|
private |
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
|
private |
Blocks of the derivative operator.
Referenced by madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
Referenced by madness::Derivative< T, NDIM >::read_from_file().
|
private |
Blocks of the derivative operator, transposed.
Referenced by madness::Derivative< T, NDIM >::do_diff2i(), madness::Derivative< T, NDIM >::initCoefficients(), and madness::Derivative< T, NDIM >::read_from_file().