|
MADNESS 0.10.1
|
FunctionImpl holds all Function state to facilitate shallow copy semantics. More...
#include <funcimpl.h>


Classes | |
| struct | add_op |
| add two functions f and g: result=alpha * f + beta * g More... | |
| struct | coeff_value_adaptor |
| struct | do_accumulate_trees |
| merge the coefficent boxes of this into result's tree More... | |
| struct | do_average |
| "put" this on g More... | |
| struct | do_change_tensor_type |
| change representation of nodes' coeffs to low rank, optional fence More... | |
| struct | do_check_symmetry_local |
| check symmetry wrt particle exchange More... | |
| struct | do_compute_snorm_and_dnorm |
| compute the norm of the wavelet coefficients More... | |
| struct | do_consolidate_buffer |
| struct | do_convert_to_color |
| struct | do_dot_local |
| compute the inner product of this range with other More... | |
| class | do_err_box |
| struct | do_gaxpy_inplace |
| functor for the gaxpy_inplace method More... | |
| struct | do_inner_ext_local_ffi |
| struct | do_inner_local |
| compute the inner product of this range with other More... | |
| struct | do_inner_local_on_demand |
| compute the inner product of this range with other More... | |
| struct | do_keep_sum_coeffs |
| keep only the sum coefficients in each node More... | |
| struct | do_map_and_mirror |
| mirror dimensions of this, write result on f More... | |
| struct | do_mapdim |
| map this on f More... | |
| struct | do_mirror |
| mirror dimensions of this, write result on f More... | |
| struct | do_norm2sq_local |
| struct | do_op_args |
| laziness More... | |
| struct | do_reduce_rank |
| reduce the rank of the nodes, optional fence More... | |
| struct | do_standard |
| Changes non-standard compressed form to standard compressed form. More... | |
| struct | do_truncate_NS_leafs |
| given an NS tree resulting from a convolution, truncate leafs if appropriate More... | |
| struct | do_unary_op_value_inplace |
| struct | hartree_op |
| Hartree product of two LDIM functions to yield a NDIM = 2*LDIM function. More... | |
| struct | multiply_op |
| perform this multiplication: h(1,2) = f(1,2) * g(1) More... | |
| struct | pointwise_multiplier |
| struct | project_out_op |
| project the low-dim function g on the hi-dim function f: result(x) = <f(x,y) | g(y)> More... | |
| struct | recursive_apply_op |
| recursive part of recursive_apply More... | |
| struct | recursive_apply_op2 |
| recursive part of recursive_apply More... | |
| struct | recursive_apply_op_vec |
| recursive part of recursive_apply for a vector of matched pairs More... | |
| struct | remove_internal_coeffs |
| remove all coefficients of internal nodes More... | |
| struct | remove_leaf_coeffs |
| remove all coefficients of leaf nodes More... | |
| struct | true_refine_test |
| struct | Vphi_ij_u_op_NS |
| struct | Vphi_op_NS |
| given a ket and the 1- and 2-electron potentials, construct the function V phi More... | |
Public Types | |
| typedef GenTensor< T > | coeffT |
| Type of tensor used to hold coeffs. | |
| typedef std::pair< coeffT, std::pair< double, double > > | compressT |
| s coefficients plus the (snorm_tree, dnorm_tree) pair propagated up by compress | |
| typedef Vector< double, NDIM > | coordT |
| Type of vector holding coordinates. | |
| typedef std::pair< const keyT, nodeT > | datumT |
| Type of entry in container. | |
| typedef WorldContainer< keyT, nodeT > | dcT |
| Type of container holding the coefficients. | |
| typedef FunctionImpl< T, NDIM > | implT |
| Type of this class (implementation). | |
| typedef Key< NDIM > | keyT |
| Type of key. | |
| typedef ConcurrentHashMap< keyT, mapvecT > | mapT |
| Type of the map returned by make_key_vec_map. | |
| typedef std::vector< std::pair< int, const coeffT * > > | mapvecT |
| Type of the entry in the map returned by make_key_vec_map. | |
| typedef FunctionNode< T, NDIM > | nodeT |
| Type of node. | |
| typedef std::shared_ptr< FunctionImpl< T, NDIM > > | pimplT |
| pointer to this class | |
| typedef Range< typename dcT::const_iterator > | rangeT |
| typedef Range< typename dcT::const_iterator > | rangeT |
| typedef Range< typename dcT::const_iterator > | rangeT |
| typedef Tensor< T > | tensorT |
| Type of tensor for anything but to hold coeffs. | |
| typedef Vector< Translation, NDIM > | tranT |
| Type of array holding translation. | |
| typedef T | typeT |
| Public Types inherited from madness::WorldObject< FunctionImpl< T, NDIM > > | |
| typedef WorldObject< FunctionImpl< T, NDIM > > | objT |
Public Member Functions | |
| FunctionImpl (const FunctionFactory< T, NDIM > &factory) | |
| Initialize function impl from data in factory. | |
| template<typename Q> | |
| FunctionImpl (const FunctionImpl< Q, NDIM > &other, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool dozero) | |
| Copy constructor. | |
| template<typename Q> | |
| FunctionImpl (World &world, const FunctionImpl< Q, NDIM > &other, const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > &pmap, bool dozero) | |
| Copy constructor. | |
| virtual | ~FunctionImpl () |
| void | abs_inplace (bool fence) |
| void | abs_square_inplace (bool fence) |
| void | accumulate_timer (const double time) const |
| template<typename Q, typename R> | |
| void | accumulate_trees (FunctionImpl< Q, NDIM > &result, const R alpha, const bool fence=true) const |
| merge the trees of this and other, while multiplying them with the alpha or beta, resp | |
| void | add_keys_to_map (mapT *map, int index) const |
| Adds keys to union of local keys with specified index. | |
| void | add_scalar_inplace (T t, bool fence) |
| Adds a constant to the function. Local operation, optional fence. | |
| template<typename opT, typename R> | |
| void | apply (opT &op, const FunctionImpl< R, NDIM > &f, bool fence) |
| apply an operator on f to return this | |
| template<typename opT, typename R> | |
| void | apply_1d_realspace_push (const opT &op, const FunctionImpl< R, NDIM > *f, int axis, bool fence) |
| template<typename opT, typename R> | |
| void | apply_1d_realspace_push_op (const archive::archive_ptr< const opT > &pop, int axis, const keyT &key, const Tensor< R > &c) |
| template<typename opT, typename R> | |
| void | apply_source_driven (opT &op, const FunctionImpl< R, NDIM > &f, bool fence) |
| similar to apply, but for low rank coeffs | |
| coeffT | assemble_coefficients (const keyT &key, const coeffT &coeff_ket, const coeffT &vpotential1, const coeffT &vpotential2, const tensorT &veri) const |
| given several coefficient tensors, assemble a result tensor | |
| bool | autorefine_square_test (const keyT &key, const nodeT &t) const |
| Returns true if this block of coeffs needs autorefining. | |
| void | average (const implT &rhs) |
| take the average of two functions, similar to: this=0.5*(this+rhs) | |
| template<typename L, typename R, typename opT> | |
| void | binaryXX (const FunctionImpl< L, NDIM > *left, const FunctionImpl< R, NDIM > *right, const opT &op, bool fence) |
| template<typename L, typename R, typename opT> | |
| void | binaryXXa (const keyT &key, const FunctionImpl< L, NDIM > *left, const Tensor< L > &lcin, const FunctionImpl< R, NDIM > *right, const Tensor< R > &rcin, const opT &op) |
| void | broaden (const array_of_bools< NDIM > &is_periodic, bool fence) |
| void | broaden_op (const keyT &key, const std::vector< Future< bool > > &v) |
| void | change_tensor_type1 (const TensorArgs &targs, bool fence) |
| change the tensor type of the coefficients in the FunctionNode | |
| void | change_tree_state (const TreeState finalstate, bool fence=true) |
| change the tree state of this function, might or might not respect fence! | |
| double | check_symmetry_local () const |
| Returns some asymmetry measure ... no comms. | |
| std::vector< Slice > | child_patch (const keyT &child) const |
| Returns patch referring to coeffs of child in parent box. | |
| void | chop_at_level (const int n, const bool fence=true) |
| remove all nodes with level higher than n | |
| template<typename Q> | |
| GenTensor< Q > | coeffs2values (const keyT &key, const GenTensor< Q > &coeff) const |
| template<typename Q> | |
| Tensor< Q > | coeffs2values (const keyT &key, const Tensor< Q > &coeff) const |
| void | compress (const TreeState newstate, bool fence) |
| compress the wave function | |
| compressT | compress_op (const keyT &key, const std::vector< Future< compressT > > &v, bool nonstandard) |
| calculate the wavelet coefficients using the sum coefficients of all child nodes | |
| Future< compressT > | compress_spawn (const keyT &key, bool nonstandard, bool keepleaves, bool redundant1) |
| Invoked on node where key is local. | |
| void | compute_snorm_and_dnorm (bool fence=true) |
| compute norm of s and d coefficients for all nodes | |
| template<typename Q> | |
| void | copy_coeffs (const FunctionImpl< Q, NDIM > &other, bool fence) |
| Copy coeffs from other into self. | |
| template<typename Q> | |
| void | copy_coeffs_different_world (const FunctionImpl< Q, NDIM > &other) |
| Copy coefficients from other funcimpl with possibly different world and on a different node. | |
| template<typename Q> | |
| void | copy_coeffs_same_world (const FunctionImpl< Q, NDIM > &other, bool fence) |
| Copy coeffs from other into self. | |
| template<typename Q> | |
| void | copy_remote_coeffs_from_pid (const ProcessID pid, const FunctionImpl< Q, NDIM > &other) |
| void | diff (const DerivativeBase< T, NDIM > *D, const implT *f, bool fence) |
| template<std::size_t LDIM> | |
| void | dirac_convolution_op (const keyT &key, const nodeT &node, FunctionImpl< T, LDIM > *f) const |
| The operator. | |
| void | distribute (std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > newmap) const |
| template<typename opT, typename R> | |
| void | do_apply (const opT *op, const keyT &key, const Tensor< R > &c) |
| apply an operator on the coeffs c (at node key) | |
| template<typename opT, typename R> | |
| double | do_apply_directed_screening (const opT *op, const keyT &key, const coeffT &coeff, const bool &do_kernel) |
| apply an operator on the coeffs c (at node key) | |
| template<typename opT, typename R, size_t OPDIM> | |
| void | do_apply_kernel (const opT *op, const Tensor< R > &c, const do_op_args< OPDIM > &args) |
| for fine-grain parallelism: call the apply method of an operator in a separate task | |
| template<typename opT, typename R, size_t OPDIM> | |
| double | do_apply_kernel2 (const opT *op, const Tensor< R > &c, const do_op_args< OPDIM > &args, const TensorArgs &apply_targs) |
| same as do_apply_kernel, but use full rank tensors as input and low rank tensors as output | |
| template<typename opT, typename R, size_t OPDIM> | |
| double | do_apply_kernel3 (const opT *op, const GenTensor< R > &coeff, const do_op_args< OPDIM > &args, const TensorArgs &apply_targs) |
| same as do_apply_kernel2, but use low rank tensors as input and low rank tensors as output | |
| template<typename L, typename R, typename opT> | |
| void | do_binary_op (const keyT &key, const Tensor< L > &left, const std::pair< keyT, Tensor< R > > &arg, const opT &op) |
| Functor for the binary_op method. | |
| void | do_diff1 (const DerivativeBase< T, NDIM > *D, const implT *f, const keyT &key, const std::pair< keyT, coeffT > &left, const std::pair< keyT, coeffT > ¢er, const std::pair< keyT, coeffT > &right) |
| template<std::size_t LDIM> | |
| void | do_dirac_convolution (FunctionImpl< T, LDIM > *f, bool fence) const |
| template<typename L, typename R> | |
| void | do_mul (const keyT &key, const Tensor< L > &left, const std::pair< keyT, Tensor< R > > &arg) |
| Functor for the mul method. | |
| void | do_print_grid (const std::string filename, const std::vector< keyT > &keys) const |
| print the grid in xyz format | |
| void | do_print_plane (const std::string filename, std::vector< Tensor< double > > plotinfo, const int xaxis, const int yaxis, const coordT el2) |
| print the MRA structure | |
| void | do_print_tree (const keyT &key, std::ostream &os, Level maxlevel) const |
| Functor for the do_print_tree method. | |
| void | do_print_tree_graphviz (const keyT &key, std::ostream &os, Level maxlevel) const |
| Functor for the do_print_tree method (using GraphViz). | |
| void | do_print_tree_json (const keyT &key, std::multimap< Level, std::tuple< tranT, std::string > > &data, Level maxlevel) const |
| Functor for the do_print_tree_json method. | |
| template<size_t LDIM> | |
| void | do_project_out (const coeffT &fcoeff, const std::pair< keyT, coeffT > gpair, const keyT &gkey, const Key< NDIM > &dest, const int dim) const |
| compute the inner product of two nodes of only some dimensions and accumulate on result | |
| void | do_square_inplace (const keyT &key) |
| void | do_square_inplace2 (const keyT &parent, const keyT &child, const tensorT &parent_coeff) |
| tensorT | downsample (const keyT &key, const std::vector< Future< coeffT > > &v) const |
| downsample the sum coefficients of level n+1 to sum coeffs on level n | |
| void | erase (const Level &max_level) |
| truncate tree at a certain level | |
| template<typename opT> | |
| double | err_box (const keyT &key, const nodeT &node, const opT &func, int npt, const Tensor< double > &qx, const Tensor< double > &quad_phit, const Tensor< double > &quad_phiw) const |
| Returns the square of the error norm in the box labeled by key. | |
| template<typename opT> | |
| double | errsq_local (const opT &func) const |
| Returns the sum of squares of errors from local info ... no comms. | |
| void | eval (const Vector< double, NDIM > &xin, const keyT &keyin, const typename Future< T >::remote_refT &ref) |
| Evaluate the function at a point in simulation coordinates. | |
| T | eval_cube (Level n, coordT &x, const tensorT &c) const |
| std::vector< std::pair< bool, T > > | eval_local_only (const std::vector< Vector< double, NDIM > > &xin, Level maxlevel) |
| std::pair< bool, T > | eval_local_only (const Vector< double, NDIM > &xin, Level maxlevel) |
| Evaluate function only if point is local returning (true,value); otherwise return (false,0.0). | |
| void | eval_local_only (const Vector< double, NDIM > *xin, std::size_t npt, Level maxlevel, std::pair< bool, T > *results) |
| Tensor< T > | eval_plot_cube (const coordT &plotlo, const coordT &plothi, const std::vector< long > &npt, const bool eval_refine=false) const |
| void | evaldepthpt (const Vector< double, NDIM > &xin, const keyT &keyin, const typename Future< Level >::remote_refT &ref) |
| Get the depth of the tree at a point in simulation coordinates. | |
| void | evalR (const Vector< double, NDIM > &xin, const keyT &keyin, const typename Future< long >::remote_refT &ref) |
| Get the rank of leaf box of the tree at a point in simulation coordinates. | |
| bool | exists_and_has_children (const keyT &key) const |
| bool | exists_and_is_leaf (const keyT &key) const |
| void | fcube (const keyT &key, const FunctionFunctorInterface< T, NDIM > &f, const Tensor< double > &qx, tensorT &fval) const |
| Evaluate function at quadrature points in the specified box. | |
| void | fcube (const keyT &key, T(*f)(const coordT &), const Tensor< double > &qx, tensorT &fval) const |
| Evaluate function at quadrature points in the specified box. | |
| template<typename Q> | |
| GenTensor< Q > | fcube_for_mul (const keyT &child, const keyT &parent, const GenTensor< Q > &coeff) const |
| Compute the function values for multiplication. | |
| template<typename Q> | |
| Tensor< Q > | fcube_for_mul (const keyT &child, const keyT &parent, const Tensor< Q > &coeff) const |
| Compute the function values for multiplication. | |
| coeffT | filter (const coeffT &s) const |
| tensorT | filter (const tensorT &s) const |
| Transform sum coefficients at level n to sums+differences at level n-1. | |
| double | finalize_apply () |
| after apply we need to do some cleanup; | |
| void | finalize_sum () |
| after summing up we need to do some cleanup; | |
| std::pair< Key< NDIM >, ShallowNode< T, NDIM > > | find_datum (keyT key) const |
| return the a std::pair<key, node>, which MUST exist | |
| Future< std::pair< keyT, coeffT > > | find_me (const keyT &key) const |
| find_me. Called by diff_bdry to get coefficients of boundary function | |
| template<typename opT> | |
| void | flo_unary_op_node_inplace (const opT &op, bool fence) |
| template<typename opT> | |
| void | flo_unary_op_node_inplace (const opT &op, bool fence) const |
| void | forward_do_diff1 (const DerivativeBase< T, NDIM > *D, const implT *f, const keyT &key, const std::pair< keyT, coeffT > &left, const std::pair< keyT, coeffT > ¢er, const std::pair< keyT, coeffT > &right) |
| template<typename coeff_opT, typename apply_opT> | |
| void | forward_traverse (const coeff_opT &coeff_op, const apply_opT &apply_op, const keyT &key) const |
| traverse a non-existing tree | |
| template<typename L, typename R> | |
| void | gaxpy (T alpha, const FunctionImpl< L, NDIM > &left, T beta, const FunctionImpl< R, NDIM > &right, bool fence) |
| Invoked by result to perform result += alpha*left+beta*right in wavelet basis. | |
| template<typename L> | |
| void | gaxpy_ext (const FunctionImpl< L, NDIM > *left, T(*f)(const coordT &), T alpha, T beta, double tol, bool fence) |
| template<typename L> | |
| tensorT | gaxpy_ext_node (keyT key, Tensor< L > lc, T(*f)(const coordT &), T alpha, T beta) const |
| template<typename L> | |
| void | gaxpy_ext_recursive (const keyT &key, const FunctionImpl< L, NDIM > *left, Tensor< L > lcin, tensorT c, T(*f)(const coordT &), T alpha, T beta, double tol, bool below_leaf) |
| template<typename Q, typename R> | |
| void | gaxpy_inplace (const T &alpha, const FunctionImpl< Q, NDIM > &other, const R &beta, bool fence) |
| Inplace general bilinear operation. | |
| template<typename Q, typename R> | |
| void | gaxpy_inplace_reconstructed (const T &alpha, const FunctionImpl< Q, NDIM > &g, const R &beta, const bool fence) |
| void | gaxpy_oop_reconstructed (const double alpha, const implT &f, const double beta, const implT &g, const bool fence) |
| perform: this= alpha*f + beta*g, invoked by result | |
| bool | get_autorefine () const |
| const FunctionCommonData< T, NDIM > & | get_cdata () const |
| const Tensor< double > & | get_cell () const |
| return the simulation cell | |
| dcT & | get_coeffs () |
| const dcT & | get_coeffs () const |
| template<std::size_t CDIM> | |
| std::tuple< std::set< Key< NDIM > >, std::map< Key< CDIM >, double > > | get_contraction_node_lists (const std::size_t n, const std::array< int, CDIM > &v) const |
| for contraction two functions f(x,z) = \int g(x,y) h(y,z) dy | |
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | get_functor () |
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | get_functor () const |
| int | get_initial_level () const |
| getter | |
| int | get_k () const |
| Future< double > | get_norm_tree_recursive (const keyT &key) const |
| const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > & | get_pmap () const |
| int | get_special_level () const |
| const std::vector< Vector< double, NDIM > > & | get_special_points () const |
| TensorArgs | get_tensor_args () const |
| TensorType | get_tensor_type () const |
| double | get_thresh () const |
| TreeState | get_tree_state () const |
| int | get_truncate_mode () const |
| void | halo_clear () const |
| Discard the neighbor halo, freeing the staged coefficients. | |
| bool | halo_enabled () const |
| Is a neighbor halo staged on this function? | |
| bool | halo_probe (const keyT &key, coeffT &out) const |
| Look up a staged neighbor; on a hit copy its coefficients, which are empty for an interior node. | |
| std::size_t | halo_size () const |
| How many neighbor nodes are staged on this rank; zero if no halo. | |
| template<std::size_t LDIM, typename leaf_opT> | |
| void | hartree_product (const std::vector< std::shared_ptr< FunctionImpl< T, LDIM > > > p1, const std::vector< std::shared_ptr< FunctionImpl< T, LDIM > > > p2, const leaf_opT &leaf_op, bool fence) |
| given two functions of LDIM, perform the Hartree/Kronecker/outer product | |
| bool | has_coefficients_on_leaves_only () const |
| Returns true if only the leaves of this tree carry its coefficients. | |
| bool | has_leaves () const |
| bool | has_summable_coefficients () const |
| Returns true if summing over the local nodes yields the function. | |
| T | inner_adaptive_local (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > f, const bool leaf_refine) const |
| T | inner_adaptive_recursive (keyT key, const tensorT &c, const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > f, const bool leaf_refine, T old_inner=T(0)) const |
| T | inner_ext_local (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > f, const bool leaf_refine) const |
| T | inner_ext_node (keyT key, tensorT c, const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > f) const |
| Return the inner product with an external function on a specified function node. | |
| T | inner_ext_recursive (keyT key, tensorT c, const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > f, const bool leaf_refine, T old_inner=T(0)) const |
| template<typename opT, size_t LDIM> | |
| T | inner_ij_u_eri (const opT &leaf_op, const FunctionImpl< T, NDIM > *u, const FunctionImpl< T, LDIM > *i_func, const FunctionImpl< T, LDIM > *j_func, const FunctionImpl< T, NDIM > *eri, double target_precision=0.0, int oversampling=1) const |
| compute <eri(1,2) | u(1,2) * [i(1)] * [j(2)]> adaptively using Vphi_ij_u_op_NS | |
| void | insert_serialized_coeffs (std::vector< unsigned char > &v) |
| insert coeffs from vector archive into this | |
| void | insert_zero_down_to_initial_level (const keyT &key) |
| Initialize nodes to zero function at initial_level of refinement. | |
| bool | is_compressed () const |
| Returns true if the function is compressed. | |
| bool | is_nonstandard () const |
| bool | is_nonstandard_with_leaves () const |
| bool | is_on_demand () const |
| bool | is_reconstructed () const |
| Returns true if the function is compressed. | |
| bool | is_redundant () const |
| Returns true if the function is redundant. | |
| bool | is_redundant_after_merge () const |
| Returns true if the function is redundant_after_merge. | |
| const keyT & | key0 () const |
| Returns cdata.key0. | |
| template<typename Archive> | |
| void | load (Archive &ar) |
| std::vector< keyT > | local_leaf_keys () const |
| return the keys of the local leaf boxes | |
| MADNESS_ASSERT (this->is_redundant()==g.is_redundant()) | |
| MADNESS_ASSERT (this->is_redundant()==g.is_redundant()) | |
| MADNESS_CHECK (this->is_reconstructed()) | |
| compressT | make_redundant_op (const keyT &key, const std::vector< Future< compressT > > &v) |
| similar to compress_op, but insert only the sum coefficients in the tree | |
| template<typename opT> | |
| void | make_Vphi (const opT &leaf_op, const bool fence=true) |
| assemble the function V*phi using V and phi given from the functor | |
| template<typename opT, size_t LDIM> | |
| void | make_Vphi_ij_u (const opT &leaf_op, const FunctionImpl< T, NDIM > *u, const FunctionImpl< T, LDIM > *i_func=nullptr, const FunctionImpl< T, LDIM > *j_func=nullptr, bool fence=true, double target_precision=0.0, int oversampling=1) |
| build this = u * [i(1)] * [j(2)] adaptively using Vphi_ij_u_op_NS | |
| template<typename opT, std::size_t LDIM> | |
| void | make_Vphi_only (const opT &leaf_op, FunctionImpl< T, NDIM > *ket, FunctionImpl< T, LDIM > *v1, FunctionImpl< T, LDIM > *v2, FunctionImpl< T, LDIM > *p1, FunctionImpl< T, LDIM > *p2, FunctionImpl< T, NDIM > *eri, const bool fence=true) |
| assemble the function V*phi using V and phi given from the functor | |
| void | map_and_mirror (const implT &f, const std::vector< long > &map, const std::vector< long > &mirror, bool fence) |
| map and mirror the translation index and the coefficients, result on this | |
| void | mapdim (const implT &f, const std::vector< long > &map, bool fence) |
| Permute the dimensions of f according to map, result on this. | |
| std::size_t | max_depth () const |
| Returns the maximum depth of the tree ... collective ... global sum/broadcast. | |
| std::size_t | max_local_depth () const |
| Returns the maximum local depth of the tree ... no communications. | |
| std::size_t | max_nodes () const |
| Returns the max number of nodes on a processor. | |
| std::size_t | min_nodes () const |
| Returns the min number of nodes on a processor. | |
| void | mirror (const implT &f, const std::vector< long > &mirror, bool fence) |
| mirror the dimensions of f according to map, result on this | |
| template<typename R> | |
| Tensor< TENSOR_RESULT_TYPE(T, R)> | mul (const Tensor< T > &c1, const Tensor< R > &c2, const int npt, const keyT &key) const |
| multiply the values of two coefficient tensors using a custom number of grid points | |
| template<typename opT> | |
| void | multi_to_multi_op_values (const opT &op, const std::vector< implT * > &vin, std::vector< implT * > &vout, const bool fence=true) |
| Inplace operate on many functions (impl's) with an operator within a certain box. | |
| template<typename opT> | |
| void | multi_to_multi_op_values_doit (const keyT &key, const opT &op, const std::vector< implT * > &vin, std::vector< implT * > &vout) |
| Inplace operate on many functions (impl's) with an operator within a certain box. | |
| template<typename opT> | |
| void | multiop_values (const opT &op, const std::vector< implT * > &v) |
| template<typename opT> | |
| void | multiop_values_doit (const keyT &key, const opT &op, const std::vector< implT * > &v) |
| coeffT | multiply (const coeffT &val_ket, const coeffT &val_pot, int particle) const |
| multiply the ket with a one-electron potential rr(1,2)= f(1,2)*g(1) | |
| template<size_t LDIM> | |
| void | multiply (const implT *f, const FunctionImpl< T, LDIM > *g, const int particle) |
| multiply f (a pair function of NDIM) with an orbital g (LDIM=NDIM/2) | |
| template<typename L, typename R> | |
| void | mulXX (const FunctionImpl< L, NDIM > *left, const FunctionImpl< R, NDIM > *right, double tol, bool fence) |
| template<typename L, typename R> | |
| void | mulXXa (const keyT &key, const FunctionImpl< L, NDIM > *left, const Tensor< L > &lcin, const FunctionImpl< R, NDIM > *right, const Tensor< R > &rcin, double tol) |
| template<typename L, typename R> | |
| void | mulXXvec (const FunctionImpl< L, NDIM > *left, const std::vector< const FunctionImpl< R, NDIM > * > &vright, const std::vector< FunctionImpl< T, NDIM > * > &vresult, double tol, bool fence) |
| template<typename L, typename R> | |
| void | mulXXveca (const keyT &key, const FunctionImpl< L, NDIM > *left, const Tensor< L > &lcin, const std::vector< const FunctionImpl< R, NDIM > * > vrightin, const std::vector< Tensor< R > > &vrcin, const std::vector< FunctionImpl< T, NDIM > * > vresultin, double tol) |
| std::size_t | nCoeff () const |
| Returns the number of coefficients in the function ... collective global sum. | |
| std::size_t | nCoeff_local () const |
| Returns the number of coefficients in the function for this MPI rank. | |
| keyT | neighbor (const keyT &key, const keyT &disp, const array_of_bools< NDIM > &is_periodic) const |
| Returns key of general neighbor enforcing BC. | |
| keyT | neighbor_in_volume (const keyT &key, const keyT &disp) const |
| Returns key of general neighbor that resides in-volume. | |
| bool | noautorefine (const keyT &key, const tensorT &t) const |
| Always returns false (for when autorefine is not wanted). | |
| double | norm2sq_local () const |
| Returns the square of the local norm ... no comms. | |
| void | norm_tree (bool fence) |
| compute for each FunctionNode the norm of the function inside that node | |
| double | norm_tree_op (const keyT &key, const std::vector< Future< double > > &v) |
| Future< double > | norm_tree_spawn (const keyT &key) |
| template<typename Q> | |
| GenTensor< Q > | NS_fcube_for_mul (const keyT &child, const keyT &parent, const GenTensor< Q > &coeff, const bool s_only) const |
| Compute the function values for multiplication. | |
| template<typename Q> | |
| GenTensor< Q > | NScoeffs2values (const keyT &key, const GenTensor< Q > &coeff, const bool s_only) const |
| convert S or NS coeffs to values on a 2k grid of the children | |
| const coeffT | parent_to_child (const coeffT &s, const keyT &parent, const keyT &child) const |
| Directly project parent coeffs to child coeffs. | |
| coeffT | parent_to_child_NS (const keyT &child, const keyT &parent, const coeffT &coeff) const |
| Directly project parent NS coeffs to child NS coeffs. | |
| template<typename Q, std::size_t LDIM, typename R, std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2> | |
| void | partial_inner (const FunctionImpl< Q, LDIM > &g, const FunctionImpl< R, KDIM > &h, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2) |
| invoked by result | |
| template<typename Q, std::size_t LDIM, typename R, std::size_t KDIM, std::size_t CDIM = (KDIM + LDIM - NDIM) / 2> | |
| void | partial_inner_contract (const FunctionImpl< Q, LDIM > *g, const FunctionImpl< R, KDIM > *h, const std::array< int, CDIM > v1, const std::array< int, CDIM > v2, const Key< NDIM > &key, const std::list< Key< CDIM > > &j_key_list) |
| tensor contraction part of partial_inner | |
| void | phi_for_mul (Level np, Translation lp, Level nc, Translation lc, Tensor< double > &phi) const |
| Compute the Legendre scaling functions for multiplication. | |
| void | plot_cube_kernel (archive::archive_ptr< Tensor< T > > ptr, const keyT &key, const coordT &plotlo, const coordT &plothi, const std::vector< long > &npt, bool eval_refine) const |
| void | print_grid (const std::string filename) const |
| void | print_info () const |
| Prints summary of data distribution. | |
| void | print_plane (const std::string filename, const int xaxis, const int yaxis, const coordT &el2) |
| Print a plane ("xy", "xz", or "yz") containing the point x to file. | |
| Tensor< double > | print_plane_local (const int xaxis, const int yaxis, const coordT &el2) |
| collect the data for a plot of the MRA structure locally on each node | |
| void | print_size (const std::string name) const |
| print tree size and size | |
| void | print_stats () const |
| print the number of configurations per node | |
| void | print_timer () const |
| void | print_tree (std::ostream &os=std::cout, Level maxlevel=10000) const |
| void | print_tree_graphviz (std::ostream &os=std::cout, Level maxlevel=10000) const |
| void | print_tree_json (std::ostream &os=std::cout, Level maxlevel=10000) const |
| template<typename R> | |
| void | print_type_in_compilation_error (R &&) |
| void | project (const implT &old, bool fence) |
| Projects old function into new basis (only in reconstructed form). | |
| tensorT | project (const keyT &key) const |
| template<size_t LDIM> | |
| void | project_out (FunctionImpl< T, NDIM-LDIM > *result, const FunctionImpl< T, LDIM > *gimpl, const int dim, const bool fence) |
| project the low-dim function g on the hi-dim function f: result(x) = <this(x,y) | g(y)> | |
| template<size_t LDIM> | |
| void | project_out2 (const FunctionImpl< T, LDIM+NDIM > *f, const FunctionImpl< T, LDIM > *g, const int dim) |
| project the low-dim function g on the hi-dim function f: this(x) = <f(x,y) | g(y)> | |
| void | project_refine_op (const keyT &key, bool do_refine, const std::vector< Vector< double, NDIM > > &specialpts) |
| void | put_in_box (ProcessID from, long nl, long ni) const |
| rangeT | range (coeffs.begin(), coeffs.end()) |
| template<size_t FDIM> | |
| std::enable_if< NDIM==FDIM >::type | read_grid (const std::string keyfile, const std::string gridfile, std::shared_ptr< FunctionFunctorInterface< double, NDIM > > vnuc_functor) |
| read data from a grid | |
| template<size_t FDIM> | |
| std::enable_if< NDIM==FDIM >::type | read_grid2 (const std::string gridfile, std::shared_ptr< FunctionFunctorInterface< double, NDIM > > vnuc_functor) |
| read data from a grid | |
| std::size_t | real_size () const |
| Returns the number of coefficients in the function ... collective global sum. | |
| void | receive_halo (const std::vector< std::pair< keyT, coeffT > > &buf) const |
| Insert pushed neighbor nodes into the halo; runs as a task, concurrently with other pushes. | |
| void | reconstruct (bool fence) |
| reconstruct this tree – respects fence | |
| void | reconstruct_op (const keyT &key, const coeffT &s, const bool accumulate_NS=true) |
| template<std::size_t CDIM, std::size_t ODIM, std::size_t FDIM = NDIM+ODIM-2*CDIM> | |
| std::multimap< Key< FDIM >, std::list< Key< CDIM > > > | recur_down_for_contraction_map (const keyT &key, const nodeT &node, const std::array< int, CDIM > &v_this, const std::array< int, CDIM > &v_other, const std::set< Key< ODIM > > &ij_other_list, const std::map< Key< CDIM >, double > &j_other_list, bool this_first, const double thresh) |
| make a map of all nodes that will contribute to a partial inner product | |
| template<typename opT, std::size_t LDIM> | |
| void | recursive_apply (opT &apply_op, const FunctionImpl< T, LDIM > *fimpl, const FunctionImpl< T, LDIM > *gimpl, const bool fence) |
| traverse a non-existing tree, make its coeffs and apply an operator | |
| template<typename opT> | |
| void | recursive_apply (opT &apply_op, const implT *fimpl, implT *rimpl, const bool fence) |
| traverse an existing tree and apply an operator | |
| template<typename opT, std::size_t LDIM> | |
| void | recursive_apply (opT &apply_op, const std::vector< const FunctionImpl< T, LDIM > * > &fimpls, const std::vector< const FunctionImpl< T, LDIM > * > &gimpls, const bool fence) |
| traverse a non-existing tree for a sum of hartree products and apply an operator | |
| return world taskq | reduce (range, do_inner_local_on_demand< R >(this, &gimpl)) |
| return world taskq | reduce (rangeT(coeffs.begin(), coeffs.end()), do_dot_local< R >(&g, leaves_only)) |
| return world taskq | reduce (rangeT(coeffs.begin(), coeffs.end()), do_inner_local< R >(&g, leaves_only)) |
| void | reduce_rank (const double thresh, bool fence) |
| reduce the rank of the coefficients tensors | |
| template<typename opT> | |
| void | refine (const opT &op, bool fence) |
| template<typename opT> | |
| void | refine_op (const opT &op, const keyT &key) |
| template<typename opT> | |
| void | refine_spawn (const opT &op, const keyT &key) |
| void | refine_to_common_level (const std::vector< FunctionImpl< T, NDIM > * > &v, const std::vector< tensorT > &c, const keyT key) |
| Refine multiple functions down to the same finest level. | |
| void | remove_internal_coefficients (const bool fence) |
| void | remove_leaf_coefficients (const bool fence) |
| void | replicate (bool fence=true) |
| void | replicate_on_hosts (bool fence=true) |
| void | reset_timer () |
| void | scale_inplace (const T q, bool fence) |
| In-place scale by a constant. | |
| template<typename Q, typename F> | |
| void | scale_oop (const Q q, const FunctionImpl< F, NDIM > &f, bool fence) |
| Out-of-place scale by a constant. | |
| std::vector< unsigned char > | serialize_remote_coeffs () |
| invoked by copy_remote_coeffs_from_pid to serialize local coeffs | |
| void | set_autorefine (bool value) |
| void | set_functor (const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > functor1) |
| void | set_tensor_args (const TensorArgs &t) |
| void | set_thresh (double value) |
| void | set_tree_state (const TreeState &state) |
| void | set_truncate_mode (int mode) |
| std::size_t | size () const |
| Returns the number of coefficients in the function ... collective global sum. | |
| std::size_t | size_local () const |
| Returns the number of coefficients in the function for each rank. | |
| void | sock_it_to_me (const keyT &key, const RemoteReference< FutureImpl< std::pair< keyT, coeffT > > > &ref) const |
| Walk up the tree returning pair(key,node) for first node with coefficients. | |
| void | sock_it_to_me_too (const keyT &key, const RemoteReference< FutureImpl< std::pair< keyT, coeffT > > > &ref) const |
| void | square_inplace (bool fence) |
| Pointwise squaring of function with optional global fence. | |
| void | standard (bool fence) |
| Changes non-standard compressed form to standard compressed form. | |
| template<typename Archive> | |
| void | store (Archive &ar) |
| void | sum_down (bool fence) |
| After 1d push operator must sum coeffs down the tree to restore correct scaling function coefficients. | |
| void | sum_down_spawn (const keyT &key, const coeffT &s) |
| is this the same as trickle_down() ? | |
| template<typename R> | |
| TENSOR_RESULT_TYPE (T, R) dot_local(const FunctionImpl< R | |
| Returns the dot product ASSUMING same distribution. | |
| template<typename R> | |
| TENSOR_RESULT_TYPE (T, R) inner_local(const FunctionImpl< R | |
| Returns the inner product ASSUMING same distribution. | |
| template<typename R> | |
| TENSOR_RESULT_TYPE (T, R) inner_local_on_demand(const FunctionImpl< R | |
| Returns the inner product of this with function g constructed on-the-fly. | |
| typedef | TENSOR_RESULT_TYPE (T, R) resultT |
| typedef | TENSOR_RESULT_TYPE (T, R) resultT |
| T | trace_local () const |
Returns int(f(x),x) in local volume. | |
| template<typename coeff_opT, typename apply_opT> | |
| void | traverse_tree (const coeff_opT &coeff_op, const apply_opT &apply_op, const keyT &key) const |
| traverse a non-existing tree | |
| std::size_t | tree_size () const |
| Returns the size of the tree structure of the function ... collective global sum. | |
| void | trickle_down (bool fence) |
| sum all the contributions from all scales after applying an operator in mod-NS form | |
| void | trickle_down_op (const keyT &key, const coeffT &s) |
| sum all the contributions from all scales after applying an operator in mod-NS form | |
| void | truncate (double tol, bool fence) |
| Truncate according to the threshold with optional global fence. | |
| bool | truncate_op (const keyT &key, double tol, const std::vector< Future< bool > > &v) |
| coeffT | truncate_reconstructed_op (const keyT &key, const std::vector< Future< coeffT > > &v, const double tol) |
| given the sum coefficients of all children, truncate or not | |
| Future< coeffT > | truncate_reconstructed_spawn (const keyT &key, const double tol) |
| truncate using a tree in reconstructed form | |
| Future< bool > | truncate_spawn (const keyT &key, double tol) |
| Returns true if after truncation this node has coefficients. | |
| double | truncate_tol (double tol, const keyT &key) const |
| Returns the truncation threshold according to truncate_method. | |
| template<typename opT> | |
| void | unary_op_coeff_inplace (const opT &op, bool fence) |
| template<typename opT> | |
| void | unary_op_node_inplace (const opT &op, bool fence) |
| template<typename opT> | |
| void | unary_op_value_inplace (const opT &op, bool fence) |
| template<typename Q, typename opT> | |
| void | unaryXX (const FunctionImpl< Q, NDIM > *func, const opT &op, bool fence) |
| template<typename Q, typename opT> | |
| void | unaryXXa (const keyT &key, const FunctionImpl< Q, NDIM > *func, const opT &op) |
| template<typename Q, typename opT> | |
| void | unaryXXvalues (const FunctionImpl< Q, NDIM > *func, const opT &op, bool fence) |
| void | undo_redundant (const bool fence) |
| convert this from redundant to standard reconstructed form | |
| void | undo_replicate (bool fence=true) |
| coeffT | unfilter (const coeffT &s) const |
| tensorT | unfilter (const tensorT &s) const |
| Transform sums+differences at level n to sum coefficients at level n+1. | |
| void | unset_functor () |
| coeffT | upsample (const keyT &key, const coeffT &coeff) const |
| upsample the sum coefficients of level 1 to sum coeffs on level n+1 | |
| template<typename Q> | |
| GenTensor< Q > | values2coeffs (const keyT &key, const GenTensor< Q > &values) const |
| template<typename Q> | |
| Tensor< Q > | values2coeffs (const keyT &key, const Tensor< Q > &values) const |
| template<typename Q> | |
| GenTensor< Q > | values2NScoeffs (const keyT &key, const GenTensor< Q > &values) const |
| convert function values of the a child generation directly to NS coeffs | |
| bool | verify_parents_and_children () const |
| check that parents and children are consistent | |
| void | verify_tree () const |
| Verify tree is properly constructed ... global synchronization involved. | |
| bool | verify_tree_state_local () const |
| check that the tree state and the coeffs are consistent | |
| double | vol_nsphere (int n, double R) |
| template<typename Q, typename R> | |
| void | vtransform (const std::vector< std::shared_ptr< FunctionImpl< R, NDIM > > > &vright, const Tensor< Q > &c, const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > &vleft, double tol, bool fence) |
| template<typename Q, typename R> | |
| void | vtransform_doit (const std::shared_ptr< FunctionImpl< R, NDIM > > &right, const Tensor< Q > &c, const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > &vleft, double tol) |
| void | zero_norm_tree () |
| Public Member Functions inherited from madness::WorldObject< FunctionImpl< 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 () |
| 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 () |
| World & | get_world () const |
| World & | get_world_noexcept () const noexcept |
| Get the world to which this object belongs, without risking a throw. | |
| const uniqueidT & | id () const |
| Returns the globally unique object ID. | |
| bool | world_is_alive () const noexcept |
| Reports whether the world to which this object belongs still exists. | |
Static Public Member Functions | |
| template<typename Real> | |
| static std::enable_if_t< std::is_floating_point_v< Real >, Real > | conj (const Real x) |
| template<typename Real> | |
| static std::complex< Real > | conj (const std::complex< Real > &x) |
| template<typename R> | |
| static void | do_dot_localX (const typename mapT::iterator lstart, const typename mapT::iterator lend, typename FunctionImpl< R, NDIM >::mapT *rmap_ptr, const bool sym, Tensor< TENSOR_RESULT_TYPE(T, R)> *result_ptr, Mutex *mutex) |
| template<typename R> | |
| static void | do_inner_localX (const typename mapT::iterator lstart, const typename mapT::iterator lend, typename FunctionImpl< R, NDIM >::mapT *rmap_ptr, const bool sym, Tensor< TENSOR_RESULT_TYPE(T, R) > *result_ptr, Mutex *mutex) |
| template<typename R> | |
| static Tensor< TENSOR_RESULT_TYPE(T, R)> | dot_local (const std::vector< const FunctionImpl< T, NDIM > * > &left, const std::vector< const FunctionImpl< R, NDIM > * > &right, bool sym) |
| template<typename R> | |
| static Tensor< TENSOR_RESULT_TYPE(T, R) > | inner_local (const std::vector< const FunctionImpl< T, NDIM > * > &left, const std::vector< const FunctionImpl< R, NDIM > * > &right, bool sym) |
| static mapT | make_key_vec_map (const std::vector< const FunctionImpl< T, NDIM > * > &v) |
| Returns map of union of local keys to vector of indexes of functions containing that key. | |
| static void | tnorm (const GenTensor< T > &t, double *lo, double *hi) |
| static void | tnorm (const SVDTensor< T > &t, double *lo, double *hi, const int particle) |
| static void | tnorm (const tensorT &t, double *lo, double *hi) |
| Computes norm of low/high-order polyn. coeffs for autorefinement test. | |
Public Attributes | |
| long | box_interior [1000] |
| long | box_leaf [1000] |
| NDIM &gimpl | const |
| NDIM &g | const |
| AtomicInt | large |
| bool | leaves_only =(this->is_redundant()) |
| AtomicInt | small |
| Timer | timer_accumulate |
| Timer | timer_change_tensor_type |
| Timer | timer_compress_svd |
| Timer | timer_filter |
| Timer | timer_lr_result |
| Timer | timer_target_driven |
| World & | world |
Private Types | |
| typedef WorldObject< FunctionImpl< T, NDIM > > | woT |
| Base class world object type. | |
Private Member Functions | |
| FunctionImpl (const FunctionImpl< T, NDIM > &p) | |
| void | make_redundant (const bool fence) |
| convert this to redundant, i.e. have sum coefficients on all levels | |
Private Attributes | |
| bool | autorefine |
| If true, autorefine where appropriate. | |
| const FunctionCommonData< T, NDIM > & | cdata |
| const Tensor< double > | cell |
| the size of the root cell in each dimension, unchangeable | |
| dcT | coeffs |
| The coefficients. | |
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | functor |
| int | initial_level |
| Initial level for refinement. | |
| int | k |
| Wavelet order. | |
| int | max_refine_level |
| Do not refine below this level. | |
| std::atomic< ConcurrentHashMap< keyT, coeffT > * > | neighbor_halo_ {nullptr} |
| Neighbor coefficients pushed here by whoever owns them; null until something stages. | |
| int | special_level |
| Minimium level for refinement on special points. | |
| std::vector< Vector< double, NDIM > > | special_points |
| special points for further refinement (needed for composite functions or multiplication) | |
| TensorArgs | targs |
| type of tensor to be used in the FunctionNodes | |
| double | thresh |
| Screening threshold. | |
| TreeState | tree_state |
| int | truncate_mode |
| 0=default=(|d|<thresh), 1=(|d|<thresh/2^n), 2=(|d|<thresh/4^n); | |
| bool | truncate_on_project |
| If true projection inserts at level n-1 not n. | |
Friends | |
| template<typename Q, std::size_t D> | |
| class | FunctionImpl |
| hashT | hash_value (const FunctionImpl< T, NDIM > *pimpl) |
Hash a pointer to FunctionImpl. | |
| hashT | hash_value (const std::shared_ptr< FunctionImpl< T, NDIM > > impl) |
Hash a shared_ptr to FunctionImpl. | |
Additional Inherited Members | |
| Protected Member Functions inherited from madness::WorldObject< FunctionImpl< T, NDIM > > | |
| void | process_pending () |
| To be called from derived constructor to process pending messages. | |
| Protected Member Functions inherited from madness::WorldObjectBase | |
| WorldObjectBase (const WorldObjectBase &other) | |
| Copy constructor; produces an unregistered object. | |
| WorldObjectBase (World &w) | |
| Construct a new WorldObjectBase. | |
| World & | get_world_unchecked () const noexcept |
| Unchecked access to the memoized world reference. | |
| template<typename DerivedT> | |
| void | register_self (DerivedT *this_ptr) |
| Registers this object with its world, making it globally addressable. | |
FunctionImpl holds all Function state to facilitate shallow copy semantics.
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<FunctionImpl>.
The FunctionImpl inherits all of the functionality of WorldContainer (to store the coefficients) and WorldObject<WorldContainer> (used for RMI and for its unqiue id).
The class methods are public to avoid painful multiple friend template declarations for Function and FunctionImpl ... but this trust should not be abused ... NOTHING except FunctionImpl methods should mess with FunctionImplData. The LB stuff might have to be an exception.
| typedef GenTensor<T> madness::FunctionImpl< T, NDIM >::coeffT |
Type of tensor used to hold coeffs.
| typedef std::pair<coeffT, std::pair<double,double> > madness::FunctionImpl< T, NDIM >::compressT |
s coefficients plus the (snorm_tree, dnorm_tree) pair propagated up by compress
| typedef Vector<double,NDIM> madness::FunctionImpl< T, NDIM >::coordT |
Type of vector holding coordinates.
| typedef std::pair<const keyT,nodeT> madness::FunctionImpl< T, NDIM >::datumT |
Type of entry in container.
| typedef WorldContainer<keyT,nodeT> madness::FunctionImpl< T, NDIM >::dcT |
Type of container holding the coefficients.
| typedef FunctionImpl<T,NDIM> madness::FunctionImpl< T, NDIM >::implT |
Type of this class (implementation).
| typedef Key<NDIM> madness::FunctionImpl< T, NDIM >::keyT |
Type of key.
| typedef ConcurrentHashMap< keyT, mapvecT > madness::FunctionImpl< T, NDIM >::mapT |
Type of the map returned by make_key_vec_map.
| typedef std::vector< std::pair<int,const coeffT*> > madness::FunctionImpl< T, NDIM >::mapvecT |
Type of the entry in the map returned by make_key_vec_map.
| typedef FunctionNode<T,NDIM> madness::FunctionImpl< T, NDIM >::nodeT |
Type of node.
| typedef std::shared_ptr< FunctionImpl<T,NDIM> > madness::FunctionImpl< T, NDIM >::pimplT |
pointer to this class
| typedef Range<typename dcT::const_iterator> madness::FunctionImpl< T, NDIM >::rangeT |
| typedef Range<typename dcT::const_iterator> madness::FunctionImpl< T, NDIM >::rangeT |
| typedef Range<typename dcT::const_iterator> madness::FunctionImpl< T, NDIM >::rangeT |
| typedef Tensor<T> madness::FunctionImpl< T, NDIM >::tensorT |
Type of tensor for anything but to hold coeffs.
| typedef Vector<Translation,NDIM> madness::FunctionImpl< T, NDIM >::tranT |
Type of array holding translation.
| typedef T madness::FunctionImpl< T, NDIM >::typeT |
|
private |
Base class world object type.
|
private |
|
inline |
Initialize function impl from data in factory.
|
inline |
Copy constructor.
Allocates a new function in preparation for a deep copy
By default takes pmap from other but can also specify a different pmap. Does not copy the coefficients ... creates an empty container.
|
inline |
Copy constructor.
Allocates a new function in preparation for a deep copy
By default takes pmap from other but can also specify a different pmap. Does not copy the coefficients ... creates an empty container.
uses a different world for the new function
|
inlinevirtual |
| void madness::FunctionImpl< T, NDIM >::abs_inplace | ( | bool | fence | ) |
References abs_inplace(), and unary_op_value_inplace().
Referenced by abs_inplace().
| void madness::FunctionImpl< T, NDIM >::abs_square_inplace | ( | bool | fence | ) |
References abs_square_inplace(), and unary_op_value_inplace().
Referenced by abs_square_inplace().
| void madness::FunctionImpl< T, NDIM >::accumulate_timer | ( | const double | time | ) | const |
References accumulate_timer(), and timer_accumulate.
Referenced by accumulate_timer().
|
inline |
merge the trees of this and other, while multiplying them with the alpha or beta, resp
result and rhs do not have to have the same distribution or live in the same world result+=alpha* this
| [in] | alpha | prefactor for this |
|
inline |
Adds keys to union of local keys with specified index.
Referenced by madness::FunctionImpl< T, LDIM >::make_key_vec_map().
| void madness::FunctionImpl< T, NDIM >::add_scalar_inplace | ( | T | t, |
| bool | fence ) |
Adds a constant to the function. Local operation, optional fence.
In scaling function basis must add value to first polyn in each box with appropriate scaling for level. In wavelet basis need only add at level zero.
| [in] | t | the scalar to be added |
References add_scalar_inplace(), cdata, madness::change_tensor_type(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::GenTensor< T >::full_tensor(), madness::FunctionDefaults< NDIM >::tt, madness::FunctionDefaults< NDIM >::get_cell_volume(), get_tensor_args(), madness::FunctionNode< T, NDIM >::has_coeff(), is_compressed(), L, MADNESS_ASSERT, NDIM, pow(), targs, madness::TT_FULL, madness::ttt, ttt, and world.
Referenced by add_scalar_inplace().
|
inline |
apply an operator on f to return this
|
inline |
|
inline |
|
inline |
similar to apply, but for low rank coeffs
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::assemble_coefficients | ( | const keyT & | key, |
| const coeffT & | coeff_ket, | ||
| const coeffT & | vpotential1, | ||
| const coeffT & | vpotential2, | ||
| const tensorT & | veri ) const |
given several coefficient tensors, assemble a result tensor
the result looks like: (v(1,2) + v(1) + v(2)) |ket(1,2)> or (v(1,2) + v(1) + v(2)) |p(1) p(2)> i.e. coefficients for the ket and coefficients for the two particles are mutually exclusive. All potential terms are optional, just pass in empty coeffs.
| [in] | key | the key of the FunctionNode to which these coeffs belong |
| [in] | coeff_ket | coefficients of the ket |
| [in] | vpotential1 | function values of the potential for particle 1 |
| [in] | vpotential2 | function values of the potential for particle 2 |
| [in] | veri | function values for the 2-particle potential |
the result looks like: (v(1,2) + v(1) + v(2)) |ket(1,2)> or (v(1,2) + v(1) + v(2)) |p(1) p(2)> i.e. coefficients for the ket and coefficients for the two particles are mutually exclusive. All potential terms are optional, just pass in empty coeffs.
| [in] | key | the key of the FunctionNode to which these coeffs belong |
| [in] | cket | coefficients of the ket |
| [in] | vpotential1 | function values of the potential for particle 1 |
| [in] | vpotential2 | function values of the potential for particle 2 |
| [in] | veri | function values for the 2-particle potential |
References assemble_coefficients(), coeffs2values(), madness::GenTensor< T >::convert(), madness::GenTensor< T >::dims(), madness::GenTensor< T >::full_tensor(), madness::GenTensor< T >::full_tensor_copy(), get_tensor_args(), madness::GenTensor< T >::has_data(), madness::Tensor< T >::has_data(), MADNESS_ASSERT, multiply(), madness::GenTensor< T >::ndim(), madness::GenTensor< T >::reduce_rank(), thresh, madness::TT_2D, and values2coeffs().
Referenced by assemble_coefficients().
| bool madness::FunctionImpl< T, NDIM >::autorefine_square_test | ( | const keyT & | key, |
| const nodeT & | t ) const |
Returns true if this block of coeffs needs autorefining.
References autorefine_square_test(), madness::FunctionNode< T, NDIM >::coeff(), madness::GenTensor< T >::full_tensor(), lo, test(), thresh, tnorm(), and truncate_tol().
Referenced by autorefine_square_test().
| void madness::FunctionImpl< T, NDIM >::average | ( | const implT & | rhs | ) |
take the average of two functions, similar to: this=0.5*(this+rhs)
works in either basis and also in nonstandard form
References average(), flo_unary_op_node_inplace(), scale_inplace(), and targs.
Referenced by average().
|
inline |
Performs binary operation on two functions (impl's). Delegates to the binaryXXa() method
| [in] | left | pointer to the left function impl |
| [in] | right | pointer to the right function impl |
| [in] | op | the binary operator |
|
inline |
Both left and right functions are in the scaling function basis
| [in] | key | the key to the current function node (box) |
| [in] | left | the function impl associated with the left function |
| [in] | lcin | the scaling function coefficients associated with the current box in the left function |
| [in] | right | the function impl associated with the right function |
| [in] | rcin | the scaling function coefficients associated with the current box in the right function |
| [in] | op | the binary operator |
Referenced by madness::FunctionImpl< T, LDIM >::binaryXX().
| void madness::FunctionImpl< T, NDIM >::broaden | ( | const array_of_bools< NDIM > & | is_periodic, |
| bool | fence ) |
References broaden(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::get_norm_tree(), madness::FunctionNode< T, NDIM >::has_coeff(), MADNESS_CHECK, madness::GenTensor< T >::normf(), madness::FunctionNode< T, NDIM >::set_norm_tree(), thresh, and truncate_tol().
Referenced by broaden().
| void madness::FunctionImpl< T, NDIM >::broaden_op | ( | const keyT & | key, |
| const std::vector< Future< bool > > & | v ) |
References broaden_op(), refine_op(), and v.
Referenced by broaden_op().
| void madness::FunctionImpl< T, NDIM >::change_tensor_type1 | ( | const TensorArgs & | targs, |
| bool | fence ) |
change the tensor type of the coefficients in the FunctionNode
| [in] | targs | target tensor arguments (threshold and full/low rank) |
References change_tensor_type1(), flo_unary_op_node_inplace(), and targs.
Referenced by change_tensor_type1().
| void madness::FunctionImpl< T, NDIM >::change_tree_state | ( | const TreeState | finalstate, |
| bool | fence = true ) |
change the tree state of this function, might or might not respect fence!
References change_tree_state(), and get_tree_state().
Referenced by change_tree_state(), and madness::partial_mul().
| double madness::FunctionImpl< T, NDIM >::check_symmetry_local | ( | ) | const |
Returns some asymmetry measure ... no comms.
References FunctionImpl, check_symmetry_local(), coeffs, PROFILE_MEMBER_FUNC, and world.
Referenced by check_symmetry_local().
| std::vector< Slice > madness::FunctionImpl< T, NDIM >::child_patch | ( | const keyT & | child | ) | const |
Returns patch referring to coeffs of child in parent box.
Returns patch referring to coeffs of child in parent box
| [in] | child | the key to the child function node (box) |
References cdata, child_patch(), NDIM, and madness::Key< NDIM >::translation().
Referenced by madness::FunctionImpl< T, LDIM >::binaryXXa(), child_patch(), compress_op(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, LDIM >::inner_ext_recursive(), make_redundant_op(), madness::FunctionImpl< T, LDIM >::mulXXa(), madness::FunctionImpl< T, LDIM >::mulXXveca(), project_refine_op(), reconstruct_op(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), madness::FunctionImpl< T, LDIM >::refine_op(), refine_to_common_level(), sum_down_spawn(), and truncate_reconstructed_op().
| void madness::FunctionImpl< T, NDIM >::chop_at_level | ( | const int | n, |
| const bool | fence = true ) |
remove all nodes with level higher than n
reduce the rank of the coefficients tensors
| [in] | targs | target tensor arguments (threshold and full/low rank) |
References chop_at_level(), coeffs, madness::Key< NDIM >::level(), and madness::FunctionNode< T, NDIM >::set_is_leaf().
Referenced by chop_at_level().
|
inline |
Return the values when given the coeffs in scaling function basis
| [in] | key | the key of the function node (box) |
| [in] | coeff | the tensor of scaling function coefficients for function node (box) |
Referenced by assemble_coefficients(), madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::FunctionImpl< T, LDIM >::multi_to_multi_op_values_doit(), and madness::FunctionImpl< T, LDIM >::multiop_values_doit().
|
inline |
Return the scaling function coeffs when given the function values at the quadrature points
| [in] | key | the key of the function node (box) |
| void madness::FunctionImpl< T, NDIM >::compress | ( | const TreeState | newstate, |
| bool | fence ) |
compress the wave function
after application there will be sum coefficients at the root level, and difference coefficients at all other levels; furthermore:
| [in] | nonstandard | keep sum coeffs at all other levels, except leaves |
| [in] | keepleaves | keep sum coeffs (but no diff coeffs) at leaves |
| [in] | redundant | keep only sum coeffs at all levels, discard difference coeffs |
References compress(), is_reconstructed(), MADNESS_CHECK_THROW, madness::nonstandard, madness::nonstandard_with_leaves, madness::redundant, set_tree_state(), and tree_state.
Referenced by compress().
| FunctionImpl< T, NDIM >::compressT madness::FunctionImpl< T, NDIM >::compress_op | ( | const keyT & | key, |
| const std::vector< Future< compressT > > & | v, | ||
| bool | nonstandard1 ) |
calculate the wavelet coefficients using the sum coefficients of all child nodes
also propagates norm_tree and dnorm_tree for all nodes
| [in] | key | this's key |
| [in] | v | sum coefficients and propagated norms of the child nodes |
| [in] | nonstandard | keep the sum coefficients with the wavelet coefficients |
| [in] | key | this's key |
| [in] | v | sum coefficients and propagated norms of the child nodes |
| [in] | nonstandard | keep the sum coefficients with the wavelet coefficients |
References cdata, child_patch(), coeffs, compress_op(), copy(), cpu_time(), d, filter(), madness::Key< NDIM >::level(), MADNESS_CHECK, MADNESS_CHECK_THROW, norm_tree(), madness::GenTensor< T >::normf(), targs, madness::TensorArgs::thresh, timer_compress_svd, timer_filter, and v.
Referenced by compress_op(), and compress_spawn().
| Future< typename FunctionImpl< T, NDIM >::compressT > madness::FunctionImpl< T, NDIM >::compress_spawn | ( | const keyT & | key, |
| bool | nonstandard1, | ||
| bool | keepleaves, | ||
| bool | redundant1 ) |
Invoked on node where key is local.
will insert
References coeffs, compress_op(), compress_spawn(), madness::future_vector_factory(), madness::FunctionNode< T, NDIM >::has_children(), madness::TaskAttributes::hipri(), MADNESS_ASSERT, make_redundant_op(), NDIM, print(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), v, and world.
Referenced by compress_spawn().
| void madness::FunctionImpl< T, NDIM >::compute_snorm_and_dnorm | ( | bool | fence = true | ) |
compute norm of s and d coefficients for all nodes
| [in] | targs | target tensor arguments (threshold and full/low rank) |
References cdata, compute_snorm_and_dnorm(), and flo_unary_op_node_inplace().
Referenced by compute_snorm_and_dnorm().
|
inlinestatic |
|
inlinestatic |
|
inline |
Copy coeffs from other into self.
this and other might live in different worlds
|
inline |
Copy coefficients from other funcimpl with possibly different world and on a different node.
Referenced by madness::FunctionImpl< T, LDIM >::copy_coeffs().
|
inline |
Copy coeffs from other into self.
Referenced by madness::FunctionImpl< T, LDIM >::copy_coeffs(), and madness::FunctionImpl< T, LDIM >::copy_remote_coeffs_from_pid().
|
inline |
Copy coefficients from other funcimpl with possibly different world and on a different node to this
< Type of this class (implementation)
Referenced by madness::FunctionImpl< T, LDIM >::copy_coeffs_different_world().
| void madness::FunctionImpl< T, NDIM >::diff | ( | const DerivativeBase< T, NDIM > * | D, |
| const implT * | f, | ||
| bool | fence ) |
References coeffs, diff(), do_diff1(), madness::f, madness::TaskAttributes::hipri(), and world.
Referenced by diff().
|
inline |
|
inline |
|
inline |
apply an operator on the coeffs c (at node key)
the result is accumulated inplace to this's tree at various FunctionNodes
| [in] | op | the operator to act on the source function |
| [in] | key | key of the source FunctionNode of f which is processed |
| [in] | c | coeffs of the FunctionNode of f which is processed |
|
inline |
apply an operator on the coeffs c (at node key)
invoked by result; the result is accumulated inplace to this's tree at various FunctionNodes
| [in] | op | the operator to act on the source function |
| [in] | key | key of the source FunctionNode of f which is processed (see "source") |
| [in] | coeff | coeffs of FunctionNode being processed |
| [in] | do_kernel | true: do the 0-disp only; false: do everything but the kernel |
Referenced by madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::operator()(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::operator()(), and madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::operator()().
|
inline |
for fine-grain parallelism: call the apply method of an operator in a separate task
| [in] | op | the operator working on our function |
| [in] | c | full rank tensor holding the NS coefficients |
| [in] | args | laziness holding norm of the coefficients, displacement, destination, .. |
|
inline |
same as do_apply_kernel, but use full rank tensors as input and low rank tensors as output
| [in] | op | the operator working on our function |
| [in] | c | full rank tensor holding the NS coefficients |
| [in] | args | laziness holding norm of the coefficients, displacement, destination, .. |
| [in] | apply_targs | TensorArgs with tightened threshold for accumulation |
Referenced by madness::FunctionImpl< T, LDIM >::do_apply_directed_screening().
|
inline |
same as do_apply_kernel2, but use low rank tensors as input and low rank tensors as output
| [in] | op | the operator working on our function |
| [in] | coeff | full rank tensor holding the NS coefficients |
| [in] | args | laziness holding norm of the coefficients, displacement, destination, .. |
| [in] | apply_targs | TensorArgs with tightened threshold for accumulation |
Referenced by madness::FunctionImpl< T, LDIM >::do_apply_directed_screening().
|
inline |
Functor for the binary_op method.
Referenced by madness::FunctionImpl< T, LDIM >::binaryXXa().
| void madness::FunctionImpl< T, NDIM >::do_diff1 | ( | const DerivativeBase< T, NDIM > * | D, |
| const implT * | f, | ||
| const keyT & | key, | ||
| const std::pair< keyT, coeffT > & | left, | ||
| const std::pair< keyT, coeffT > & | center, | ||
| const std::pair< keyT, coeffT > & | right ) |
References do_diff1(), and madness::f.
Referenced by diff(), do_diff1(), and madness::DerivativeBase< T, NDIM >::submit_op::operator()().
|
inline |
|
inlinestatic |
Referenced by madness::FunctionImpl< T, LDIM >::dot_local().
|
inlinestatic |
Referenced by madness::FunctionImpl< T, LDIM >::inner_local().
|
inline |
Functor for the mul method.
Referenced by madness::FunctionImpl< T, LDIM >::mulXXa().
| void madness::FunctionImpl< T, NDIM >::do_print_grid | ( | const std::string | filename, |
| const std::vector< keyT > & | keys ) const |
print the grid in xyz format
the quadrature points and the key information will be written to file,
| [in] | filename | where the quadrature points will be written to |
| [in] | keys | all leaf keys |
References c, cdata, cell, d, madness::BaseTensor::dim(), do_print_grid(), madness::filename, madness::FunctionDefaults< NDIM >::cell_width, madness::FunctionDefaults< NDIM >::get_cell(), madness::FunctionDefaults< NDIM >::get_cell_width(), h(), k, madness::Key< NDIM >::level(), MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, madness::power(), madness::Key< NDIM >::translation(), and world.
Referenced by do_print_grid(), and print_grid().
| void madness::FunctionImpl< T, NDIM >::do_print_plane | ( | const std::string | filename, |
| std::vector< Tensor< double > > | plotinfo, | ||
| const int | xaxis, | ||
| const int | yaxis, | ||
| const coordT | el2 ) |
print the MRA structure
Functor for the print_plane method
| [in] | filename | the filename for the output |
| [in] | plotinfo | plotting parameters |
| [in] | xaxis | the x-axis in the plot (can be any axis of the MRA box) |
| [in] | yaxis | the y-axis in the plot (can be any axis of the MRA box) |
References cell, madness::BaseTensor::dim(), do_print_plane(), madness::Tensor< T >::end(), madness::filename, madness::FunctionDefaults< NDIM >::get_cell(), madness::Tensor< T >::has_data(), MADNESS_ASSERT, and world.
Referenced by do_print_plane(), and print_plane().
| void madness::FunctionImpl< T, NDIM >::do_print_tree | ( | const keyT & | key, |
| std::ostream & | os, | ||
| Level | maxlevel ) const |
Functor for the do_print_tree method.
References coeffs, do_print_tree(), madness::FunctionNode< T, NDIM >::has_children(), and madness::Key< NDIM >::level().
Referenced by do_print_tree(), and print_tree().
| void madness::FunctionImpl< T, NDIM >::do_print_tree_graphviz | ( | const keyT & | key, |
| std::ostream & | os, | ||
| Level | maxlevel ) const |
Functor for the do_print_tree method (using GraphViz).
References coeffs, do_print_tree_graphviz(), madness::Future< void >::value, madness::FunctionNode< T, NDIM >::has_children(), madness::Key< NDIM >::level(), NDIM, and madness::Key< NDIM >::translation().
Referenced by do_print_tree_graphviz(), and print_tree_graphviz().
| void madness::FunctionImpl< T, NDIM >::do_print_tree_json | ( | const keyT & | key, |
| std::multimap< Level, std::tuple< tranT, std::string > > & | data, | ||
| Level | maxlevel ) const |
Functor for the do_print_tree_json method.
References coeffs, do_print_tree_json(), madness::FunctionCommonData< T, NDIM >::data, madness::FunctionNode< T, NDIM >::has_children(), madness::Key< NDIM >::level(), MADNESS_EXCEPTION, madness::FunctionNode< T, NDIM >::print_json(), and madness::Key< NDIM >::translation().
Referenced by do_print_tree_json(), and print_tree_json().
|
inline |
compute the inner product of two nodes of only some dimensions and accumulate on result
invoked by result
| [in] | fcoeff | coefficients of high dimension LDIM+NDIM |
| [in] | gpair | key and coeffs of low dimension LDIM (possibly a parent node) |
| [in] | gkey | key of actual low dim node (possibly the same as gpair.first, iff gnode exists) |
| [in] | dest | destination node for the result |
| [in] | dim | which dimensions should be contracted: 0..LDIM-1 or LDIM..NDIM+LDIM-1 |
| void madness::FunctionImpl< T, NDIM >::do_square_inplace | ( | const keyT & | key | ) |
| void madness::FunctionImpl< T, NDIM >::do_square_inplace2 | ( | const keyT & | parent, |
| const keyT & | child, | ||
| const tensorT & | parent_coeff ) |
|
inlinestatic |
Referenced by madness::matrix_dot().
| FunctionImpl< T, NDIM >::tensorT madness::FunctionImpl< T, NDIM >::downsample | ( | const keyT & | key, |
| const std::vector< Future< coeffT > > & | v ) const |
downsample the sum coefficients of level n+1 to sum coeffs on level n
specialization of the filter method, will yield only the sum coefficients
| [in] | key | key of level n |
| [in] | v | vector of sum coefficients of level n+1 |
specialization of the filter method, will yield only the sum coefficients
| [in] | key | key of level n |
| [in] | v | vector of sum coefficients of level n+1 |
| [in] | args | TensorArguments for possible low rank approximations |
References cdata, downsample(), madness::general_transform(), h(), NDIM, and v.
Referenced by downsample().
| void madness::FunctionImpl< T, NDIM >::erase | ( | const Level & | max_level | ) |
truncate tree at a certain level
truncate tree at a certain level
| [in] | max_level | truncate tree below this level |
References coeffs, erase(), madness::Key< NDIM >::level(), make_redundant(), madness::FunctionNode< T, NDIM >::set_has_children(), and undo_redundant().
Referenced by erase().
|
inline |
Returns the square of the error norm in the box labeled by key.
Assumed to be invoked locally but it would be easy to eliminate this assumption
|
inline |
Returns the sum of squares of errors from local info ... no comms.
| void madness::FunctionImpl< T, NDIM >::eval | ( | const Vector< double, NDIM > & | xin, |
| const keyT & | keyin, | ||
| const typename Future< T >::remote_refT & | ref ) |
Evaluate the function at a point in simulation coordinates.
Only the invoking process will get the result via the remote reference to a future. Active messages may be sent to other nodes.
References FunctionImpl, madness::FunctionNode< T, NDIM >::coeff(), coeffs, eval(), eval_cube(), madness::GenTensor< T >::full_tensor(), madness::Future< T >::get(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::TaskAttributes::hipri(), madness::Key< NDIM >::level(), madness::WorldObject< FunctionImpl< T, NDIM > >::me, NDIM, PROFILE_MEMBER_FUNC, madness::Future< T >::set(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), madness::Key< NDIM >::translation(), world, and xi.
Referenced by eval().
| T madness::FunctionImpl< T, NDIM >::eval_cube | ( | Level | n, |
| coordT & | x, | ||
| const tensorT & | c ) const |
References FunctionImpl, a, c, cdata, eval_cube(), madness::detail::eval_scratch(), evalR(), madness::FunctionDefaults< NDIM >::cell_volume, madness::general_fast_transform(), madness::FunctionDefaults< NDIM >::get_cell_volume(), k, madness::legendre_scaling_functions(), MADNESS_ASSERT, madness::MAXK, NDIM, p(), PROFILE_MEMBER_FUNC, q(), madness::sum(), and TENSOR_RESULT_TYPE.
Referenced by eval(), eval_cube(), eval_local_only(), and eval_local_only().
| std::vector< std::pair< bool, T > > madness::FunctionImpl< T, NDIM >::eval_local_only | ( | const std::vector< Vector< double, NDIM > > & | xin, |
| Level | maxlevel ) |
Batched eval_local_only returning a fresh vector (see the pointer core above for semantics). maxlevel is the maximum depth to search down to — the max local depth can be computed with max_local_depth();
References eval_local_only().
| std::pair< bool, T > madness::FunctionImpl< T, NDIM >::eval_local_only | ( | const Vector< double, NDIM > & | xin, |
| Level | maxlevel ) |
Evaluate function only if point is local returning (true,value); otherwise return (false,0.0).
maxlevel is the maximum depth to search down to — the max local depth can be computed with max_local_depth();
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, eval_cube(), eval_local_only(), madness::GenTensor< T >::full_tensor(), madness::Future< T >::get(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::Key< NDIM >::level(), madness::WorldObject< FunctionImpl< T, NDIM > >::me, NDIM, madness::Key< NDIM >::translation(), world, and xi.
Referenced by eval_local_only(), eval_local_only(), and eval_local_only().
| void madness::FunctionImpl< T, NDIM >::eval_local_only | ( | const Vector< double, NDIM > * | xin, |
| std::size_t | npt, | ||
| Level | maxlevel, | ||
| std::pair< bool, T > * | results ) |
Allocation-free core of the batched eval_local_only: writes one (local?,value) pair per point, in input order, into results[0..npt). Consecutive points in the same leaf box share that box's descent and coefficient fetch (last-box memoization); each point is evaluated by the same eval_cube on the same tensor as the single-point path, so results are bit-for-bit identical. No communications.
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, eval_cube(), eval_local_only(), madness::GenTensor< T >::full_tensor(), madness::Future< T >::get(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::Key< NDIM >::level(), madness::WorldObject< FunctionImpl< T, NDIM > >::me, NDIM, madness::same, madness::Key< NDIM >::translation(), world, and xi.
| Tensor< T > madness::FunctionImpl< T, NDIM >::eval_plot_cube | ( | const coordT & | plotlo, |
| const coordT & | plothi, | ||
| const std::vector< long > & | npt, | ||
| const bool | eval_refine = false ) const |
Evaluate a cube/slice of points ... plotlo and plothi are already in simulation coordinates No communications
| [in] | plotlo | the coordinate of the starting point |
| [in] | plothi | the coordinate of the ending point |
| [in] | npt | the number of points in each dimension |
Set plot_refine=true to get a plot of the refinment levels of the given function (defaulted to false in prototype).
References FunctionImpl, coeffs, eval_plot_cube(), is_reconstructed(), MADNESS_ASSERT, NDIM, and PROFILE_MEMBER_FUNC.
Referenced by eval_plot_cube().
| void madness::FunctionImpl< T, NDIM >::evaldepthpt | ( | const Vector< double, NDIM > & | xin, |
| const keyT & | keyin, | ||
| const typename Future< Level >::remote_refT & | ref ) |
Get the depth of the tree at a point in simulation coordinates.
Only the invoking process will get the result via the remote reference to a future. Active messages may be sent to other nodes.
This function is a minimally-modified version of eval()
References FunctionImpl, coeffs, evaldepthpt(), madness::Future< T >::get(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::TaskAttributes::hipri(), madness::Key< NDIM >::level(), madness::WorldObject< FunctionImpl< T, NDIM > >::me, NDIM, PROFILE_MEMBER_FUNC, madness::Future< T >::set(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), madness::Key< NDIM >::translation(), world, and xi.
Referenced by evaldepthpt().
| void madness::FunctionImpl< T, NDIM >::evalR | ( | const Vector< double, NDIM > & | xin, |
| const keyT & | keyin, | ||
| const typename Future< long >::remote_refT & | ref ) |
Get the rank of leaf box of the tree at a point in simulation coordinates.
Only the invoking process will get the result via the remote reference to a future. Active messages may be sent to other nodes.
This function is a minimally-modified version of eval()
References FunctionImpl, madness::FunctionNode< T, NDIM >::coeff(), coeffs, evalR(), madness::Future< T >::get(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::TaskAttributes::hipri(), madness::Key< NDIM >::level(), madness::WorldObject< FunctionImpl< T, NDIM > >::me, NDIM, PROFILE_MEMBER_FUNC, madness::GenTensor< T >::rank(), madness::Future< T >::set(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), madness::Key< NDIM >::translation(), world, and xi.
Referenced by eval_cube(), and evalR().
| bool madness::FunctionImpl< T, NDIM >::exists_and_has_children | ( | const keyT & | key | ) | const |
References coeffs, and exists_and_has_children().
Referenced by exists_and_has_children().
| bool madness::FunctionImpl< T, NDIM >::exists_and_is_leaf | ( | const keyT & | key | ) | const |
References coeffs, and exists_and_is_leaf().
Referenced by exists_and_is_leaf().
| void madness::FunctionImpl< T, NDIM >::fcube | ( | const keyT & | key, |
| const FunctionFunctorInterface< T, NDIM > & | f, | ||
| const Tensor< double > & | qx, | ||
| tensorT & | fval ) const |
Evaluate function at quadrature points in the specified box.
| [in] | key | the key indicating where the quadrature points are located |
| [in] | f | the interface to the elementary function |
| [in] | qx | quadrature points on a level=0 box |
| [out] | fval | values |
References madness::f, madness::fcube(), and fcube().
Referenced by madness::composite_product_op_NS< T, NDIM, opT, LDIM >::eri_coeffs(), madness::FunctionImpl< T, LDIM >::err_box(), fcube(), fcube(), and madness::FunctionImpl< T, LDIM >::inner_ext_node().
| void madness::FunctionImpl< T, NDIM >::fcube | ( | const keyT & | key, |
| T(* | f )(const coordT &), | ||
| const Tensor< double > & | qx, | ||
| tensorT & | fval ) const |
Evaluate function at quadrature points in the specified box.
| [in] | key | the key indicating where the quadrature points are located |
| [in] | f | the interface to the elementary function |
| [in] | qx | quadrature points on a level=0 box |
| [out] | fval | values |
References madness::f, madness::fcube(), and fcube().
|
inline |
Compute the function values for multiplication.
Given coefficients from a parent cell, compute the value of the functions at the quadrature points of a child
| [in] | child | the key for the child function node (box) |
| [in] | parent | the key for the parent function node (box) |
| [in] | coeff | the coefficients of scaling function basis of the parent box |
|
inline |
Compute the function values for multiplication.
Given coefficients from a parent cell, compute the value of the functions at the quadrature points of a child
| [in] | child | the key for the child function node (box) |
| [in] | parent | the key for the parent function node (box) |
| [in] | coeff | the coefficients of scaling function basis of the parent box |
Referenced by madness::FunctionImpl< T, LDIM >::do_binary_op(), madness::FunctionImpl< T, LDIM >::do_mul(), and parent_to_child().
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::filter | ( | const coeffT & | s | ) | const |
References cdata, filter(), and transform().
| FunctionImpl< T, NDIM >::tensorT madness::FunctionImpl< T, NDIM >::filter | ( | const tensorT & | s | ) | const |
Transform sum coefficients at level n to sums+differences at level n-1.
Given scaling function coefficients s[n][l][i] and s[n][l+1][i] return the scaling function and wavelet coefficients at the coarser level. I.e., decompose Vn using Vn = Vn-1 + Wn-1.
Returns a new tensor and has no side effects. Works for any number of dimensions.
No communication involved.
References cdata, madness::fast_transform(), filter(), and w().
Referenced by compress_op(), filter(), filter(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), make_redundant_op(), project_refine_op(), and truncate_reconstructed_op().
| double madness::FunctionImpl< T, NDIM >::finalize_apply | ( | ) |
after apply we need to do some cleanup;
forces fence
References finalize_apply(), flo_unary_op_node_inplace(), madness::print_timings, targs, madness::TensorArgs::thresh, madness::wall_time(), and world.
Referenced by finalize_apply().
| void madness::FunctionImpl< T, NDIM >::finalize_sum | ( | ) |
after summing up we need to do some cleanup;
forces fence
References finalize_sum().
Referenced by finalize_sum().
| std::pair< Key< NDIM >, ShallowNode< T, NDIM > > madness::FunctionImpl< T, NDIM >::find_datum | ( | keyT | key | ) | const |
return the a std::pair<key, node>, which MUST exist
References coeffs, find_datum(), and MADNESS_ASSERT.
Referenced by madness::CoeffTracker< T, LDIM >::activate(), and find_datum().
| Future< std::pair< Key< NDIM >, GenTensor< T > > > madness::FunctionImpl< T, NDIM >::find_me | ( | const keyT & | key | ) | const |
find_me. Called by diff_bdry to get coefficients of boundary function
References coeffs, find_me(), madness::TaskAttributes::hipri(), madness::Future< T >::remote_ref(), sock_it_to_me_too(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), and world.
Referenced by find_me().
|
inline |
Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence
| [in] | op | the unary operator for the coefficients |
Referenced by madness::FunctionImpl< T, LDIM >::accumulate_trees(), average(), change_tensor_type1(), madness::composite_inner_apply(), madness::composite_product_apply(), compute_snorm_and_dnorm(), finalize_apply(), madness::FunctionImpl< T, LDIM >::inner_ij_u_eri(), madness::FunctionImpl< T, LDIM >::make_Vphi(), map_and_mirror(), mapdim(), mirror(), reduce_rank(), and standard().
|
inline |
Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence
| [in] | op | the unary operator for the coefficients |
| void madness::FunctionImpl< T, NDIM >::forward_do_diff1 | ( | const DerivativeBase< T, NDIM > * | D, |
| const implT * | f, | ||
| const keyT & | key, | ||
| const std::pair< keyT, coeffT > & | left, | ||
| const std::pair< keyT, coeffT > & | center, | ||
| const std::pair< keyT, coeffT > & | right ) |
References madness::f, and forward_do_diff1().
Referenced by madness::DerivativeBase< T, NDIM >::forward_do_diff1(), and forward_do_diff1().
|
inline |
traverse a non-existing tree
part II: activate coeff_op, i.e. retrieve all the necessary remote boxes (communication)
| [in] | coeff_op | operator making the coefficients that needs activation |
| [in] | apply_op | just passing thru |
| [in] | key | the key we are working on |
Referenced by madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), gaxpy_oop_reconstructed(), and madness::FunctionImpl< T, LDIM >::traverse_tree().
|
inline |
Invoked by result to perform result += alpha*left+beta*right in wavelet basis.
Does not assume that any of result, left, right have the same distribution. For most purposes result will start as an empty so actually are implementing out of place gaxpy. If all functions have the same distribution there is no communication except for the optional fence.
|
inline |
|
inline |
Return the gaxpy product with an external function on a specified function node.
| [in] | key | Key of the function node on which to compute gaxpy |
| [in] | lc | Tensor of coefficients for the function at the function node given by key |
| [in] | f | Pointer to function of type T that takes coordT arguments. This is the externally provided function and the right argument of gaxpy. |
| [in] | alpha | prefactor of c Tensor for gaxpy |
| [in] | beta | prefactor of fcoeffs for gaxpy |
Referenced by madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive().
|
inline |
Return out of place gaxpy using recursive descent.
| [in] | key | Key of the function node on which to compute gaxpy |
| [in] | left | FunctionImpl, left argument of gaxpy |
| [in] | lcin | coefficients of left at this node |
| [in] | c | coefficients of gaxpy product at this node |
| [in] | f | pointer to function of type T that takes coordT arguments. This is the externally provided function and the right argument of gaxpy. |
| [in] | alpha | prefactor of left argument for gaxpy |
| [in] | beta | prefactor of right argument for gaxpy |
| [in] | tol | convergence tolerance...when the norm of the gaxpy's difference coefficients is less than tol, we are done. |
Referenced by madness::FunctionImpl< T, LDIM >::gaxpy_ext().
|
inline |
Inplace general bilinear operation.
this's world can differ from other's world this = alpha * this + beta * other
| [in] | alpha | prefactor for the current function impl |
| [in] | other | the other function impl |
| [in] | beta | prefactor for other |
Referenced by madness::FunctionImpl< T, LDIM >::gaxpy_inplace_reconstructed(), and madness::FunctionImpl< T, NDIM >::do_gaxpy_inplace< Q, R >::operator()().
|
inline |
perform inplace gaxpy: this = alpha*this + beta*other
| [in] | alpha | prefactor for this |
| [in] | beta | prefactor for other |
| [in] | g | the other function, reconstructed |
| void madness::FunctionImpl< T, NDIM >::gaxpy_oop_reconstructed | ( | const double | alpha, |
| const implT & | f, | ||
| const double | beta, | ||
| const implT & | g, | ||
| const bool | fence ) |
perform: this= alpha*f + beta*g, invoked by result
f and g are reconstructed, so we can save on the compress operation, walk down the joint tree, and add leaf coefficients; effectively refines to common finest level. nothing returned, but leaves this's tree reconstructed and as sum of f and g
| [in] | alpha | prefactor for f |
| [in] | f | first addend |
| [in] | beta | prefactor for g |
| [in] | g | second addend |
f and g are reconstructed, so we can save on the compress operation, walk down the joint tree, and add leaf coefficients; effectively refines to common finest level.
| [in] | alpha | prefactor for f |
| [in] | f | first addend |
| [in] | beta | prefactor for g |
| [in] | g | second addend |
References alpha, beta, cdata, coeffs, madness::f, forward_traverse(), madness::g, gaxpy_oop_reconstructed(), MADNESS_CHECK_THROW, madness::reconstructed, set_tree_state(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), and world.
Referenced by gaxpy_oop_reconstructed().
| bool madness::FunctionImpl< T, NDIM >::get_autorefine | ( | ) | const |
References autorefine, and get_autorefine().
Referenced by get_autorefine().
| const FunctionCommonData< T, NDIM > & madness::FunctionImpl< T, NDIM >::get_cdata | ( | ) | const |
References cdata, and get_cdata().
Referenced by madness::composite_inner_apply(), madness::composite_product_apply(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::eri_coeffs(), get_cdata(), madness::FunctionImpl< T, LDIM >::get_contraction_node_lists(), madness::FunctionImpl< T, LDIM >::partial_inner_contract(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), and madness::composite_product_op_NS< T, NDIM, opT, LDIM >::sd_norm_extra().
|
inline |
return the simulation cell
| FunctionImpl< T, NDIM >::dcT & madness::FunctionImpl< T, NDIM >::get_coeffs | ( | ) |
References coeffs, and get_coeffs().
| const FunctionImpl< T, NDIM >::dcT & madness::FunctionImpl< T, NDIM >::get_coeffs | ( | ) | const |
References coeffs, and get_coeffs().
Referenced by madness::composite_inner_apply(), madness::composite_product_apply(), madness::FunctionImpl< T, LDIM >::copy_coeffs_different_world(), madness::DerivativeBase< T, NDIM >::do_diff1(), madness::Derivative< double, 1 >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), get_coeffs(), get_coeffs(), madness::FunctionImpl< T, LDIM >::get_contraction_node_lists(), madness::FunctionImpl< T, LDIM >::inner_ij_u_eri(), madness::innerXX(), madness::FunctionImpl< T, LDIM >::insert_serialized_coeffs(), madness::FunctionImpl< T, LDIM >::partial_inner(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), madness::FunctionImpl< T, LDIM >::serialize_remote_coeffs(), and test_node_replicated_function().
|
inline |
for contraction two functions f(x,z) = \int g(x,y) h(y,z) dy
find all nodes with d coefficients and return a list of complete keys and of keys holding only the y dimension, also the maximum norm of all d for the j dimension
| [in] | n | the scale |
| [in] | v | array holding the indices of the integration variable |
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > madness::FunctionImpl< T, NDIM >::get_functor | ( | ) |
References functor, get_functor(), and MADNESS_ASSERT.
Referenced by madness::composite_product_op_NS< T, NDIM, opT, LDIM >::eri_coeffs(), get_functor(), get_functor(), madness::FunctionImpl< T, LDIM >::make_Vphi(), and print_plane_local().
| std::shared_ptr< FunctionFunctorInterface< T, NDIM > > madness::FunctionImpl< T, NDIM >::get_functor | ( | ) | const |
References functor, get_functor(), and MADNESS_ASSERT.
|
inline |
getter
| int madness::FunctionImpl< T, NDIM >::get_k | ( | ) | const |
Referenced by get_k(), reconstruct_op(), and verify_tree_state_local().
| Future< double > madness::FunctionImpl< T, NDIM >::get_norm_tree_recursive | ( | const keyT & | key | ) | const |
| const std::shared_ptr< WorldDCPmapInterface< Key< NDIM > > > & madness::FunctionImpl< T, NDIM >::get_pmap | ( | ) | const |
References coeffs, and get_pmap().
Referenced by madness::composite_inner_apply(), madness::FunctionImpl< T, LDIM >::copy_coeffs_different_world(), and get_pmap().
|
inline |
|
inline |
| TensorArgs madness::FunctionImpl< T, NDIM >::get_tensor_args | ( | ) | const |
References get_tensor_args(), and targs.
Referenced by add_scalar_inplace(), assemble_coefficients(), madness::composite_inner_apply(), madness::composite_product_apply(), get_tensor_args(), madness::FunctionImpl< T, LDIM >::inner_ij_u_eri(), madness::FunctionImpl< T, LDIM >::make_Vphi(), and madness::FunctionImpl< T, LDIM >::partial_inner_contract().
| TensorType madness::FunctionImpl< T, NDIM >::get_tensor_type | ( | ) | const |
References get_tensor_type(), and targs.
Referenced by madness::Derivative< double, 1 >::do_diff2b(), get_tensor_type(), and madness::FunctionImpl< T, LDIM >::partial_inner_contract().
| double madness::FunctionImpl< T, NDIM >::get_thresh | ( | ) | const |
References get_thresh(), and thresh.
Referenced by madness::FunctionImpl< T, NDIM >::do_truncate_NS_leafs::do_truncate_NS_leafs(), madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), madness::composite_inner_apply(), madness::composite_product_apply(), madness::Derivative< double, 1 >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::finalize(), get_thresh(), madness::FunctionImpl< T, LDIM >::inner_ij_u_eri(), refop::operator()(), refop::operator()(), madness::FunctionImpl< T, LDIM >::partial_inner_contract(), and madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening().
|
inline |
Referenced by change_tree_state(), and verify_tree_state_local().
|
inline |
|
inline |
Discard the neighbor halo, freeing the staged coefficients.
Requires a quiescent window: it frees a table that halo_probe may be reading.
Referenced by madness::FunctionImpl< T, LDIM >::~FunctionImpl().
|
inline |
Is a neighbor halo staged on this function?
|
inline |
Look up a staged neighbor; on a hit copy its coefficients, which are empty for an interior node.
|
inline |
How many neighbor nodes are staged on this rank; zero if no halo.
|
inline |
given two functions of LDIM, perform the Hartree/Kronecker/outer product
|Phi(1,2)> = |phi(1)> x |phi(2)>
| [in] | p1 | FunctionImpl of particle 1 |
| [in] | p2 | FunctionImpl of particle 2 |
| [in] | leaf_op | operator determining of a given box will be a leaf |
| bool madness::FunctionImpl< T, NDIM >::has_coefficients_on_leaves_only | ( | ) | const |
Returns true if only the leaves of this tree carry its coefficients.
redundant and nonstandard_with_leaves keep s coefficients on the internal nodes as well, so a sum over all nodes counts the function more than once; the leaves alone are exactly the reconstructed tree, which is why change_tree_state(reconstructed) is nothing but remove_internal_coefficients() for these two states.
References has_coefficients_on_leaves_only(), madness::nonstandard_with_leaves, madness::redundant, and tree_state.
Referenced by has_coefficients_on_leaves_only(), has_summable_coefficients(), and trace_local().
| bool madness::FunctionImpl< T, NDIM >::has_leaves | ( | ) | const |
References has_leaves(), madness::nonstandard_with_leaves, and tree_state.
Referenced by has_leaves().
| bool madness::FunctionImpl< T, NDIM >::has_summable_coefficients | ( | ) | const |
Returns true if summing over the local nodes yields the function.
The precondition of norm2sq_local() and trace_local(): the tree holds its coefficients exactly once. reconstructed and compressed do so outright, the two states above once the internal nodes are skipped. redundant_after_merge is a sum that has not been collapsed yet, and nonstandard / nonstandard_after_apply have no leaf coefficients to single out, so neither qualifies.
References has_coefficients_on_leaves_only(), has_summable_coefficients(), is_compressed(), and is_reconstructed().
Referenced by has_summable_coefficients(), norm2sq_local(), print_size(), and trace_local().
|
inline |
Return the local part of inner product with external function ... no communication.
| [in] | f | Reference to FunctionFunctorInterface. This is the externally provided function |
| [in] | leaf_refine | boolean switch to turn on/off refinement past leaf nodes |
|
inline |
Call inner_ext_node recursively until convergence.
| [in] | key | Key of the function node on which to compute inner product (the domain of integration) |
| [in] | c | coeffs for the function at the node given by key |
| [in] | f | Reference to FunctionFunctorInterface. This is the externally provided function |
| [in] | leaf_refine | boolean switch to turn on/off refinement past leaf nodes |
| [in] | old_inner | the inner product on the parent function node |
Referenced by madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive().
|
inline |
Return the local part of inner product with external function ... no communication.
| [in] | f | Reference to FunctionFunctorInterface. This is the externally provided function |
| [in] | leaf_refine | boolean switch to turn on/off refinement past leaf nodes |
|
inline |
Return the inner product with an external function on a specified function node.
| [in] | key | Key of the function node to compute the inner product on. (the domain of integration) |
| [in] | c | Tensor of coefficients for the function at the function node given by key |
| [in] | f | Reference to FunctionFunctorInterface. This is the externally provided function |
Referenced by madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), and madness::FunctionImpl< T, LDIM >::inner_ext_recursive().
|
inline |
Call inner_ext_node recursively until convergence.
| [in] | key | Key of the function node on which to compute inner product (the domain of integration) |
| [in] | c | coeffs for the function at the node given by key |
| [in] | f | Reference to FunctionFunctorInterface. This is the externally provided function |
| [in] | leaf_refine | boolean switch to turn on/off refinement past leaf nodes |
| [in] | old_inner | the inner product on the parent function node |
Referenced by madness::FunctionImpl< T, LDIM >::inner_ext_recursive().
|
inline |
compute <eri(1,2) | u(1,2) * [i(1)] * [j(2)]> adaptively using Vphi_ij_u_op_NS
Must be called collectively on all MPI ranks. All of u, i_func, j_func must be in NS form; i_func, j_func must be replicated. eri must be on-demand (provides_coeff() or evaluatable via fcube).
| [in] | leaf_op | operator deciding leaf status |
| [in] | u | pair function u(1,2), NS form |
| [in] | i_func | orbital i(1), NS form, replicated; may be null |
| [in] | j_func | orbital j(2), NS form, replicated; may be null |
| [in] | eri | exact on-demand 2-particle operator g(1,2) |
|
inlinestatic |
Referenced by madness::matrix_inner().
|
inline |
insert coeffs from vector archive into this
Referenced by madness::FunctionImpl< T, LDIM >::copy_remote_coeffs_from_pid().
| void madness::FunctionImpl< T, NDIM >::insert_zero_down_to_initial_level | ( | const keyT & | key | ) |
Initialize nodes to zero function at initial_level of refinement.
Works for either basis. No communication.
References FunctionImpl, cdata, coeffs, initial_level, insert_zero_down_to_initial_level(), is_compressed(), madness::Key< NDIM >::level(), PROFILE_MEMBER_FUNC, and targs.
Referenced by madness::FunctionImpl< T, LDIM >::FunctionImpl(), madness::FunctionImpl< T, LDIM >::FunctionImpl(), and insert_zero_down_to_initial_level().
| bool madness::FunctionImpl< T, NDIM >::is_compressed | ( | ) | const |
Returns true if the function is compressed.
References madness::compressed, is_compressed(), and tree_state.
Referenced by add_scalar_inplace(), has_summable_coefficients(), insert_zero_down_to_initial_level(), is_compressed(), print_stats(), standard(), trace_local(), and truncate().
| bool madness::FunctionImpl< T, NDIM >::is_nonstandard | ( | ) | const |
References is_nonstandard(), madness::nonstandard, and tree_state.
Referenced by is_nonstandard().
| bool madness::FunctionImpl< T, NDIM >::is_nonstandard_with_leaves | ( | ) | const |
References is_nonstandard_with_leaves(), madness::nonstandard_with_leaves, and tree_state.
Referenced by is_nonstandard_with_leaves(), and reconstruct().
| bool madness::FunctionImpl< T, NDIM >::is_on_demand | ( | ) | const |
| bool madness::FunctionImpl< T, NDIM >::is_reconstructed | ( | ) | const |
Returns true if the function is compressed.
Returns true if the function is reconstructed.
References is_reconstructed(), madness::reconstructed, and tree_state.
Referenced by compress(), eval_plot_cube(), has_summable_coefficients(), is_reconstructed(), and reconstruct().
| bool madness::FunctionImpl< T, NDIM >::is_redundant | ( | ) | const |
Returns true if the function is redundant.
References is_redundant(), madness::redundant, and tree_state.
Referenced by is_redundant(), and reconstruct().
| bool madness::FunctionImpl< T, NDIM >::is_redundant_after_merge | ( | ) | const |
Returns true if the function is redundant_after_merge.
References is_redundant_after_merge(), madness::redundant_after_merge, and tree_state.
Referenced by is_redundant_after_merge().
| const FunctionImpl< T, NDIM >::keyT & madness::FunctionImpl< T, NDIM >::key0 | ( | ) | const |
Returns cdata.key0.
Referenced by key0(), and madness::FunctionImpl< T, LDIM >::partial_inner().
|
inline |
| std::vector< typename FunctionImpl< T, NDIM >::keyT > madness::FunctionImpl< T, NDIM >::local_leaf_keys | ( | ) | const |
return the keys of the local leaf boxes
References coeffs, madness::FunctionNode< T, NDIM >::is_leaf(), and local_leaf_keys().
Referenced by local_leaf_keys(), and print_grid().
| madness::FunctionImpl< T, NDIM >::MADNESS_ASSERT | ( | this-> | is_redundant() = =g.is_redundant() | ) |
| madness::FunctionImpl< T, NDIM >::MADNESS_ASSERT | ( | this-> | is_redundant() = =g.is_redundant() | ) |
| madness::FunctionImpl< T, NDIM >::MADNESS_CHECK | ( | this-> | is_reconstructed() | ) |
|
inlinestatic |
Returns map of union of local keys to vector of indexes of functions containing that key.
Local concurrency and synchronization only; no communication
Referenced by madness::FunctionImpl< T, LDIM >::dot_local(), and madness::FunctionImpl< T, LDIM >::inner_local().
|
private |
convert this to redundant, i.e. have sum coefficients on all levels
References make_redundant().
Referenced by erase(), and make_redundant().
| FunctionImpl< T, NDIM >::compressT madness::FunctionImpl< T, NDIM >::make_redundant_op | ( | const keyT & | key, |
| const std::vector< Future< compressT > > & | v ) |
similar to compress_op, but insert only the sum coefficients in the tree
also propagates norm_tree and dnorm_tree for all nodes
| [in] | key | this's key |
| [in] | v | sum coefficients and propagated norms of the child nodes |
also sets snorm, dnorm, norm_tree and dnorm_tree for all nodes
| [in] | key | this's key |
| [in] | v | sum coefficients and propagated norms of the child nodes |
References cdata, child_patch(), coeffs, copy(), d, filter(), MADNESS_CHECK, make_redundant_op(), norm_tree(), targs, madness::TensorArgs::thresh, and v.
Referenced by compress_spawn(), and make_redundant_op().
|
inline |
assemble the function V*phi using V and phi given from the functor
this function must have been constructed using the CompositeFunctorInterface. The interface provides one- and two-electron potentials, and the ket, which are assembled to give V*phi.
| [in] | leaf_op | operator to decide if a given node is a leaf node |
| [in] | fence | global fence |
|
inline |
build this = u * [i(1)] * [j(2)] adaptively using Vphi_ij_u_op_NS
All of u, i_func, j_func must be in redundant form. i_func and j_func must be replicated to all ranks (make_redundant). On return (after fence) this is in redundant_after_merge state; caller must call flo_unary_op_node_inplace(do_consolidate_buffer(...)) then sum_down(true) and set_tree_state(reconstructed) to finalise.
| [in] | leaf_op | operator deciding leaf status (e.g. Leaf_op_other mirroring u) |
| [in] | u | pair function u(1,2), NS form |
| [in] | i_func | orbital i(1), NS form, replicated; may be null |
| [in] | j_func | orbital j(2), NS form, replicated; may be null |
| [in] | fence | global fence after completion |
|
inline |
assemble the function V*phi using V and phi given from the functor
this function must have been constructed using the CompositeFunctorInterface. The interface provides one- and two-electron potentials, and the ket, which are assembled to give V*phi.
| [in] | leaf_op | operator to decide if a given node is a leaf node |
| [in] | fence | global fence |
Referenced by madness::FunctionImpl< T, LDIM >::make_Vphi().
| void madness::FunctionImpl< T, NDIM >::map_and_mirror | ( | const implT & | f, |
| const std::vector< long > & | map, | ||
| const std::vector< long > & | mirror, | ||
| bool | fence ) |
map and mirror the translation index and the coefficients, result on this
first map the dimensions, the mirror! this = mirror(map(f))
References FunctionImpl, madness::f, flo_unary_op_node_inplace(), madness::GaussianConvolution1DCache< double >::map, map_and_mirror(), mirror(), and PROFILE_MEMBER_FUNC.
Referenced by map_and_mirror().
| void madness::FunctionImpl< T, NDIM >::mapdim | ( | const implT & | f, |
| const std::vector< long > & | map, | ||
| bool | fence ) |
Permute the dimensions of f according to map, result on this.
References FunctionImpl, madness::f, flo_unary_op_node_inplace(), madness::GaussianConvolution1DCache< double >::map, mapdim(), and PROFILE_MEMBER_FUNC.
Referenced by mapdim().
| std::size_t madness::FunctionImpl< T, NDIM >::max_depth | ( | ) | const |
Returns the maximum depth of the tree ... collective ... global sum/broadcast.
References max_depth(), max_local_depth(), and world.
Referenced by max_depth().
| std::size_t madness::FunctionImpl< T, NDIM >::max_local_depth | ( | ) | const |
Returns the maximum local depth of the tree ... no communications.
References coeffs, and max_local_depth().
Referenced by max_depth(), and max_local_depth().
| std::size_t madness::FunctionImpl< T, NDIM >::max_nodes | ( | ) | const |
Returns the max number of nodes on a processor.
References coeffs, max_nodes(), and world.
Referenced by max_nodes().
| std::size_t madness::FunctionImpl< T, NDIM >::min_nodes | ( | ) | const |
Returns the min number of nodes on a processor.
References coeffs, min_nodes(), and world.
Referenced by min_nodes().
| void madness::FunctionImpl< T, NDIM >::mirror | ( | const implT & | f, |
| const std::vector< long > & | mirror, | ||
| bool | fence ) |
mirror the dimensions of f according to map, result on this
mirror the dimensions of f according to mirror, result on this
References FunctionImpl, madness::f, flo_unary_op_node_inplace(), mirror(), and PROFILE_MEMBER_FUNC.
Referenced by map_and_mirror(), and mirror().
|
inline |
multiply the values of two coefficient tensors using a custom number of grid points
note both coefficient tensors have to refer to the same key!
| [in] | c1 | a tensor holding coefficients |
| [in] | c2 | another tensor holding coeffs |
| [in] | npt | number of grid points (optional, default is cdata.npt) |
|
inline |
Inplace operate on many functions (impl's) with an operator within a certain box.
Assumes all functions have been refined down to the same level
| [in] | op | the operator |
| [in] | vin | the vector of function impl's on which to be operated |
| [out] | vout | the resulting vector of function impl's |
|
inline |
Inplace operate on many functions (impl's) with an operator within a certain box.
| [in] | key | the key of the current function node (box) |
| [in] | op | the operator |
| [in] | vin | the vector of function impl's on which to be operated |
| [out] | vout | the resulting vector of function impl's |
|
inline |
Inplace operate on many functions (impl's) with an operator within a certain box Assumes all functions have been refined down to the same level
| [in] | op | the operator |
| [in] | v | the vector of function impl's on which to be operated |
|
inline |
Inplace operate on many functions (impl's) with an operator within a certain box
| [in] | key | the key of the current function node (box) |
| [in] | op | the operator |
| [in] | v | the vector of function impl's on which to be operated |
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::multiply | ( | const coeffT & | val_ket, |
| const coeffT & | val_pot, | ||
| int | particle ) const |
multiply the ket with a one-electron potential rr(1,2)= f(1,2)*g(1)
| [in] | val_ket | function values of f(1,2) |
| [in] | val_pot | function values of g(1) |
| [in] | particle | if 0 then g(1), if 1 then g(2) |
References cdata, copy(), madness::GenTensor< T >::emul(), madness::GenTensor< T >::full_tensor(), madness::GenTensor< T >::is_full_tensor(), madness::GenTensor< T >::is_svd_tensor(), MADNESS_ASSERT, multiply(), NDIM, madness::outer(), targs, and madness::GenTensor< T >::tensor_type().
|
inline |
multiply f (a pair function of NDIM) with an orbital g (LDIM=NDIM/2)
as in (with h(1,2)=*this) : h(1,2) = g(1) * f(1,2) use tnorm as a measure to determine if f (=*this) must be refined
| [in] | f | the NDIM function f=f(1,2) |
| [in] | g | the LDIM function g(1) (or g(2)) |
| [in] | particle | 1 or 2, as in g(1) or g(2) |
Referenced by assemble_coefficients(), and multiply().
|
inline |
Multiplies two functions (impl's) together. Delegates to the mulXXa() method
| [in] | left | pointer to the left function impl |
| [in] | right | pointer to the right function impl |
| [in] | tol | numerical tolerance |
|
inline |
Multiplication using recursive descent and assuming same distribution Both left and right functions are in the scaling function basis
| [in] | key | the key to the current function node (box) |
| [in] | left | the function impl associated with the left function |
| [in] | lcin | the scaling function coefficients associated with the current box in the left function |
| [in] | right | the function impl associated with the right function |
| [in] | rcin | the scaling function coefficients associated with the current box in the right function |
Referenced by madness::FunctionImpl< T, LDIM >::mulXX().
|
inline |
Multiplies a function (impl) with a vector of functions (impl's). Delegates to the mulXXveca() method.
| [in] | left | pointer to the left function impl |
| [in] | vright | vector of pointers to the right function impl's |
| [in] | tol | numerical tolerance |
| [out] | vresult | vector of pointers to the resulting function impl's |
|
inline |
Both left and right functions are in the scaling function basis
| [in] | key | the key to the current function node (box) |
| [in] | left | the function impl associated with the left function |
| [in] | lcin | the scaling function coefficients associated with the current box in the left function |
| [in] | vrightin | the vector of function impl's associated with the vector of right functions |
| [in] | vrcin | the vector scaling function coefficients associated with the current box in the right functions |
| [out] | vresultin | the vector of resulting functions (impl's) |
Referenced by madness::FunctionImpl< T, LDIM >::mulXXvec().
| std::size_t madness::FunctionImpl< T, NDIM >::nCoeff | ( | ) | const |
Returns the number of coefficients in the function ... collective global sum.
References nCoeff(), nCoeff_local(), madness::sum(), and world.
Referenced by nCoeff(), and print_size().
| std::size_t madness::FunctionImpl< T, NDIM >::nCoeff_local | ( | ) | const |
Returns the number of coefficients in the function for this MPI rank.
Returns the number of coefficients in the function on this MPI rank.
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), madness::GenTensor< T >::nCoeff(), nCoeff_local(), and madness::sum().
Referenced by nCoeff(), and nCoeff_local().
| Key< NDIM > madness::FunctionImpl< T, NDIM >::neighbor | ( | const keyT & | key, |
| const keyT & | disp, | ||
| const array_of_bools< NDIM > & | is_periodic ) const |
Returns key of general neighbor enforcing BC.
Out of volume keys are mapped to enforce the BC as follows.
References axis, madness::enforce_bc(), madness::Key< NDIM >::invalid(), madness::Key< NDIM >::level(), NDIM, neighbor(), and madness::Key< NDIM >::translation().
Referenced by madness::FunctionImpl< T, LDIM >::do_apply(), and neighbor().
| Key< NDIM > madness::FunctionImpl< T, NDIM >::neighbor_in_volume | ( | const keyT & | key, |
| const keyT & | disp ) const |
Returns key of general neighbor that resides in-volume.
Out of volume keys are mapped to invalid()
References axis, madness::enforce_in_volume(), madness::Key< NDIM >::invalid(), madness::Key< NDIM >::level(), NDIM, neighbor_in_volume(), and madness::Key< NDIM >::translation().
Referenced by madness::FunctionImpl< T, LDIM >::do_apply_directed_screening(), and neighbor_in_volume().
| bool madness::FunctionImpl< T, NDIM >::noautorefine | ( | const keyT & | key, |
| const tensorT & | t ) const |
Always returns false (for when autorefine is not wanted).
References noautorefine().
Referenced by noautorefine().
| double madness::FunctionImpl< T, NDIM >::norm2sq_local | ( | ) | const |
Returns the square of the local norm ... no comms.
Requires has_summable_coefficients(); throws otherwise, because on a tree that carries its coefficients on more than one level the sum is not the norm. Internal nodes are skipped where they are the duplicates, so no state change is needed to ask for the norm.
References FunctionImpl, coeffs, has_summable_coefficients(), MADNESS_CHECK_THROW, norm2sq_local(), PROFILE_MEMBER_FUNC, and world.
Referenced by norm2sq_local(), and print_size().
| void madness::FunctionImpl< T, NDIM >::norm_tree | ( | bool | fence | ) |
compute for each FunctionNode the norm of the function inside that node
References cdata, coeffs, norm_tree(), norm_tree_spawn(), and world.
Referenced by compress_op(), make_redundant_op(), and norm_tree().
| double madness::FunctionImpl< T, NDIM >::norm_tree_op | ( | const keyT & | key, |
| const std::vector< Future< double > > & | v ) |
References coeffs, madness::Future< void >::value, norm_tree_op(), madness::FunctionNode< T, NDIM >::set_norm_tree(), madness::sum(), and v.
Referenced by norm_tree_op().
| Future< double > madness::FunctionImpl< T, NDIM >::norm_tree_spawn | ( | const keyT & | key | ) |
References coeffs, madness::FunctionNode< T, NDIM >::has_children(), and norm_tree_spawn().
Referenced by norm_tree(), and norm_tree_spawn().
|
inline |
Compute the function values for multiplication.
Given S or NS coefficients from a parent cell, compute the value of the functions at the quadrature points of a child currently restricted to special cases
| [in] | child | key of the box in which we compute values |
| [in] | parent | key of the parent box holding the coeffs |
| [in] | coeff | coeffs of the parent box |
| [in] | s_only | sanity check to avoid unintended discard of d coeffs |
|
inline |
convert S or NS coeffs to values on a 2k grid of the children
equivalent to unfiltering the NS coeffs and then converting all child S-coeffs to values in their respective boxes. If only S coeffs are provided d coeffs are assumed to be zero. Reverse operation to values2NScoeffs().
| [in] | key | the key of the current S or NS coeffs, level n |
| [in] | coeff | coeffs in S or NS form; if S then d coeffs are assumed zero |
| [in] | s_only | sanity check to avoid unintended discard of d coeffs |
| const GenTensor< T > madness::FunctionImpl< T, NDIM >::parent_to_child | ( | const coeffT & | s, |
| const keyT & | parent, | ||
| const keyT & | child ) const |
Directly project parent coeffs to child coeffs.
Currently used by diff, but other uses can be anticipated
| [in] | child | the key whose coeffs we are requesting |
| [in] | parent | the (leaf) key of our function |
| [in] | s | the (leaf) coeffs belonging to parent |
References cdata, fcube_for_mul(), madness::FunctionDefaults< NDIM >::get_cell_volume(), madness::Key< NDIM >::is_invalid(), madness::Key< NDIM >::level(), NDIM, parent_to_child(), pow(), madness::GenTensor< T >::scale(), and transform().
Referenced by madness::Derivative< double, 1 >::do_diff2b(), madness::Derivative< double, 1 >::do_diff2i(), madness::FunctionImpl< T, LDIM >::do_project_out(), and parent_to_child().
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::parent_to_child_NS | ( | const keyT & | child, |
| const keyT & | parent, | ||
| const coeffT & | coeff ) const |
Directly project parent NS coeffs to child NS coeffs.
return the NS coefficients if parent and child are the same, or construct sum coeffs from the parents and "add" zero wavelet coeffs
| [in] | child | the key whose coeffs we are requesting |
| [in] | parent | the (leaf) key of our function |
| [in] | coeff | the (leaf) coeffs belonging to parent |
References madness::GenTensor< T >::dim(), madness::f, madness::Key< NDIM >::level(), MADNESS_ASSERT, MADNESS_EXCEPTION, parent_to_child_NS(), and madness::GenTensor< T >::tensor_type().
Referenced by parent_to_child_NS().
|
inline |
|
inline |
tensor contraction part of partial_inner
| [in] | g | rhs of the inner product |
| [in] | h | lhs of the inner product |
| [in] | v1 | dimensions of g to be contracted |
| [in] | v2 | dimensions of h to be contracted |
| [in] | key | key of result's (this) FunctionNode |
| [in] | j_key_list | list of contraction index-j keys contributing to this' node |
| void madness::FunctionImpl< T, NDIM >::phi_for_mul | ( | Level | np, |
| Translation | lp, | ||
| Level | nc, | ||
| Translation | lc, | ||
| Tensor< double > & | phi ) const |
Compute the Legendre scaling functions for multiplication.
Evaluate parent polyn at quadrature points of a child. The prefactor of 2^n/2 is included. The tensor must be preallocated as phi(k,npt). Refer to the implementation notes for more info.
| [in] | np | level of the parent function node (box) |
| [in] | nc | level of the child function node (box) |
| [in] | lp | translation of the parent function node (box) |
| [in] | lc | translation of the child function node (box) |
| [out] | phi | tensor of the legendre scaling functions |
References cdata, e(), k, madness::legendre_scaling_functions(), MADNESS_ASSERT, mu, np, p(), phi_for_mul(), pow(), madness::scale(), and madness::Tensor< T >::scale().
Referenced by madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::FunctionImpl< T, LDIM >::fcube_for_mul(), madness::FunctionImpl< T, LDIM >::NS_fcube_for_mul(), and phi_for_mul().
| void madness::FunctionImpl< T, NDIM >::print_grid | ( | const std::string | filename | ) | const |
print the grid (the roots of the quadrature of each leaf box) of this function in user xyz coordinates
| [in] | filename | the filename for the output |
print the grid (the roots of the quadrature of each leaf box) of this function in user xyz coordinates
References do_print_grid(), madness::filename, local_leaf_keys(), print_grid(), and world.
Referenced by print_grid().
| void madness::FunctionImpl< T, NDIM >::print_info | ( | ) | const |
Prints summary of data distribution.
References box_interior, box_leaf, coeffs, madness::FunctionNode< T, NDIM >::is_leaf(), print_info(), put_in_box(), madness::WorldObject< FunctionImpl< T, NDIM > >::send(), and world.
Referenced by print_info().
| void madness::FunctionImpl< T, NDIM >::print_plane | ( | const std::string | filename, |
| const int | xaxis, | ||
| const int | yaxis, | ||
| const coordT & | el2 ) |
Print a plane ("xy", "xz", or "yz") containing the point x to file.
works for all dimensions; we walk through the tree, and if a leaf node inside the sub-cell touches the plane we print it in pstricks format
References do_print_plane(), madness::filename, print_plane(), print_plane_local(), and world.
Referenced by print_plane().
| Tensor< double > madness::FunctionImpl< T, NDIM >::print_plane_local | ( | const int | xaxis, |
| const int | yaxis, | ||
| const coordT & | el2 ) |
collect the data for a plot of the MRA structure locally on each node
| [in] | xaxis | the x-axis in the plot (can be any axis of the MRA box) |
| [in] | yaxis | the y-axis in the plot (can be any axis of the MRA box) |
| [in] | el2 | needs a description |
| [in] | xaxis | the x-axis in the plot (can be any axis of the MRA box) |
| [in] | yaxis | the y-axis in the plot (can be any axis of the MRA box) |
| [in] | el2 |
References madness::_(), madness::FunctionCommonData< T, NDIM >::_init_quadrature(), cdata, madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::error(), madness::FunctionDefaults< NDIM >::get_cell(), madness::FunctionDefaults< NDIM >::get_cell_width(), get_functor(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::FunctionNode< T, NDIM >::is_leaf(), k, madness::Key< NDIM >::level(), op(), print_plane_local(), madness::GenTensor< T >::rank(), madness::scale(), madness::Key< NDIM >::thisKeyContains(), madness::Key< NDIM >::translation(), and madness::user_to_sim().
Referenced by print_plane(), and print_plane_local().
| void madness::FunctionImpl< T, NDIM >::print_size | ( | const std::string | name | ) | const |
print tree size and size
References d, has_summable_coefficients(), madness::name(), nCoeff(), norm(), norm2sq_local(), print(), print_size(), tree_size(), madness::wall_time(), and world.
Referenced by print_size().
| void madness::FunctionImpl< T, NDIM >::print_stats | ( | ) | const |
print the number of configurations per node
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), is_compressed(), k, k0, NDIM, print(), print_stats(), madness::Tensor< T >::ptr(), madness::GenTensor< T >::rank(), madness::BaseTensor::size(), targs, madness::TT_FULL, and world.
Referenced by print_stats().
| void madness::FunctionImpl< T, NDIM >::print_timer | ( | ) | const |
References print_timer(), timer_accumulate, timer_lr_result, timer_target_driven, and world.
Referenced by print_timer().
| void madness::FunctionImpl< T, NDIM >::print_tree | ( | std::ostream & | os = std::cout, |
| Level | maxlevel = 10000 ) const |
Prints the coeffs tree of the current function impl
| [in] | maxlevel | the maximum level of the tree for printing |
| [out] | os | the ostream to where the output is sent |
References cdata, do_print_tree(), print_tree(), and world.
Referenced by print_tree().
| void madness::FunctionImpl< T, NDIM >::print_tree_graphviz | ( | std::ostream & | os = std::cout, |
| Level | maxlevel = 10000 ) const |
Prints the coeffs tree of the current function impl (using GraphViz)
| [in] | maxlevel | the maximum level of the tree for printing |
| [out] | os | the ostream to where the output is sent |
References cdata, do_print_tree_graphviz(), print_tree_graphviz(), and world.
Referenced by print_tree_graphviz().
| void madness::FunctionImpl< T, NDIM >::print_tree_json | ( | std::ostream & | os = std::cout, |
| Level | maxlevel = 10000 ) const |
Same as print_tree() but in JSON format
| [out] | os | the ostream to where the output is sent |
| [in] | maxlevel | the maximum level of the tree for printing |
References cdata, do_print_tree_json(), madness::FunctionCommonData< T, NDIM >::data, print_tree_json(), range(), and world.
Referenced by print_tree_json().
|
inline |
| void madness::FunctionImpl< T, NDIM >::project | ( | const implT & | old, |
| bool | fence ) |
Projects old function into new basis (only in reconstructed form).
References madness::WorldContainer< keyT, valueT, hashfunT >::begin(), c, cdata, madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::WorldContainer< keyT, valueT, hashfunT >::end(), madness::FunctionNode< T, NDIM >::has_coeff(), NDIM, project(), targs, and world.
| Tensor< T > madness::FunctionImpl< T, NDIM >::project | ( | const keyT & | key | ) | const |
Compute by projection the scaling function coeffs in specified box
| [in] | key | the key to the current function node (box) |
References cdata, madness::fast_transform(), madness::fcube(), functor, madness::FunctionDefaults< NDIM >::get_cell_volume(), madness::Key< NDIM >::level(), MADNESS_ASSERT, MADNESS_EXCEPTION, NDIM, pow(), project(), and madness::Tensor< T >::scale().
|
inline |
project the low-dim function g on the hi-dim function f: result(x) = <this(x,y) | g(y)>
invoked by the hi-dim function, a function of NDIM+LDIM Upon return, result matches this, with contributions on all scales
| [in] | result | lo-dim function of NDIM-LDIM |
| [in] | gimpl | lo-dim function of LDIM |
| [in] | dim | over which dimensions to be integrated: 0..LDIM or LDIM..LDIM+NDIM-1 |
|
inline |
| void madness::FunctionImpl< T, NDIM >::project_refine_op | ( | const keyT & | key, |
| bool | do_refine, | ||
| const std::vector< Vector< double, NDIM > > & | specialpts ) |
Projection with optional refinement w/ special points
| [in] | key | the key to the current function node (box) |
| [in] | do_refine | should we continue refinement? |
| [in] | specialpts | vector of special points in the function where we need to refine at a much finer level |
project the functor into this functionimpl, and "return" a tree in reconstructed, rank-reduced form.
| [in] | key | current FunctionNode |
| [in] | do_refine | |
| [in] | specialpts | in case these are very spiky functions – don't undersample |
References cdata, child_patch(), coeffs, copy(), d, filter(), madness::FunctionDefaults< NDIM >::bc, madness::FunctionDefaults< NDIM >::get_bc(), madness::FunctionDefaults< NDIM >::get_project_randomize(), madness::FunctionDefaults< NDIM >::get_tensor_type(), madness::Key< NDIM >::is_neighbor_of(), madness::Key< NDIM >::level(), max_refine_level, p(), project(), project_refine_op(), s0, simpt2key(), special_level, targs, madness::WorldObject< FunctionImpl< T, NDIM > >::task(), thresh, truncate_on_project, truncate_tol(), madness::user_to_sim(), and world.
Referenced by madness::FunctionImpl< T, LDIM >::FunctionImpl(), and project_refine_op().
| void madness::FunctionImpl< T, NDIM >::put_in_box | ( | ProcessID | from, |
| long | nl, | ||
| long | ni ) const |
References box_interior, box_leaf, put_in_box(), and world.
Referenced by print_info(), and put_in_box().
| rangeT madness::FunctionImpl< T, NDIM >::range | ( | coeffs. | begin(), |
| coeffs. | end() ) |
Referenced by madness::FunctionImpl< T, LDIM >::errsq_local(), and print_tree_json().
|
inline |
read data from a grid
| [in] | keyfile | file with keys and grid points for each key |
| [in] | gridfile | file with grid points, w/o key, but with same ordering |
| [in] | vnuc_functor | subtract the values of this functor if regularization is needed |
|
inline |
read data from a grid
| [in] | gridfile | file with keys and grid points and values for each key |
| [in] | vnuc_functor | subtract the values of this functor if regularization is needed |
| std::size_t madness::FunctionImpl< T, NDIM >::real_size | ( | ) | const |
Returns the number of coefficients in the function ... collective global sum.
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), real_size(), madness::GenTensor< T >::real_size(), madness::sum(), and world.
Referenced by real_size().
|
inline |
Insert pushed neighbor nodes into the halo; runs as a task, concurrently with other pushes.
Allocates the table on the first push, so staging needs no collective set-up.
Referenced by madness::DerivativeBase< T, NDIM >::stage_halo().
| void madness::FunctionImpl< T, NDIM >::reconstruct | ( | bool | fence | ) |
reconstruct this tree – respects fence
References is_nonstandard_with_leaves(), is_reconstructed(), is_redundant(), reconstruct(), madness::reconstructed, and set_tree_state().
Referenced by madness::innerXX(), and reconstruct().
| void madness::FunctionImpl< T, NDIM >::reconstruct_op | ( | const keyT & | key, |
| const coeffT & | s, | ||
| const bool | accumulate_NS = true ) |
References cdata, child_patch(), madness::FunctionNode< T, NDIM >::clear_coeff(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, copy(), d, get_k(), madness::FunctionNode< T, NDIM >::has_children(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::FunctionNode< T, NDIM >::is_leaf(), madness::Key< NDIM >::level(), MADNESS_ASSERT, reconstruct_op(), madness::GenTensor< T >::reduce_rank(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::FunctionNode< T, NDIM >::set_has_children(), targs, madness::WorldObject< FunctionImpl< T, NDIM > >::task(), thresh, and unfilter().
Referenced by reconstruct_op().
|
inline |
make a map of all nodes that will contribute to a partial inner product
given the list of d coefficient-holding nodes of the other function: recur down h if snorm * dnorm > tol and key n−jx ∈ other−ij-list. Make s coefficients if necessary. Make list of nodes n − ijk as map(n-ik, list(j)).
!! WILL ADD NEW S NODES TO THIS TREE THAT MUST BE REMOVED TO AVOID INCONSISTENT TREE STRUCTURE !!
| [in] | key | for recursion |
| [in] | node | corresponds to key |
| [in] | v_this | this' dimension that are contracted |
| [in] | v_other | other's dimension that are contracted |
| [in] | ij_other_list | list of nodes of the other function that will be contracted (and their parents) |
| [in] | j_other_list | list of column nodes of the other function that will be contracted (and their parents) |
| [in] | max_d_norm | max d coeff norm of the nodes in j_list |
| [in] | this_first | are the remaining coeffs of this functions first or last in the result function |
| [in] | thresh | threshold for including nodes in the contraction: snorm*dnorm > thresh |
| CDIM | dimension to be contracted |
| ODIM | dimensions of the other function |
| FDIM | dimensions of the final function |
Referenced by madness::FunctionImpl< T, LDIM >::partial_inner(), and madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map().
|
inline |
traverse a non-existing tree, make its coeffs and apply an operator
invoked by result here we use the fact that the hi-dim NS coefficients on all scales are exactly the outer product of the underlying low-dim functions (also in NS form), so we don't need to construct the full hi-dim tree and then turn it into NS form.
| [in] | apply_op | the operator acting on the NS tree |
| [in] | fimpl | the funcimpl of the function of particle 1 |
| [in] | gimpl | the funcimpl of the function of particle 2 |
|
inline |
traverse an existing tree and apply an operator
invoked by result
| [in] | apply_op | the operator acting on the NS tree |
| [in] | fimpl | the funcimpl of the source function |
| [in] | rimpl | a dummy function for recursive_op to insert data |
|
inline |
traverse a non-existing tree for a sum of hartree products and apply an operator
invoked by result Fuses the loop over matched pairs into a single tree traversal: result = op( Σ_i f_i(1) * g_i(2) ) The hi-dim NS coefficients are the sum of outer products of the underlying low-dim functions (in NS form), formed on the fly.
| [in] | apply_op | the operator acting on the NS tree |
| [in] | fimpls | vector of funcimpls of particle 1 |
| [in] | gimpls | vector of funcimpls of particle 2 |
| return world taskq madness::FunctionImpl< T, NDIM >::reduce | ( | range | , |
| do_inner_local_on_demand< R > | this, &gimpl ) |
| return world taskq madness::FunctionImpl< T, NDIM >::reduce | ( | rangeT(coeffs.begin(), coeffs.end()) | , |
| do_dot_local< R > &, | leaves_only ) |
| return world taskq madness::FunctionImpl< T, NDIM >::reduce | ( | rangeT(coeffs.begin(), coeffs.end()) | , |
| do_inner_local< R > &, | leaves_only ) |
| void madness::FunctionImpl< T, NDIM >::reduce_rank | ( | const double | thresh, |
| bool | fence ) |
reduce the rank of the coefficients tensors
| [in] | targs | target tensor arguments (threshold and full/low rank) |
References flo_unary_op_node_inplace(), reduce_rank(), and thresh.
Referenced by reduce_rank().
|
inline |
|
inline |
Referenced by broaden_op().
|
inline |
| void madness::FunctionImpl< T, NDIM >::refine_to_common_level | ( | const std::vector< FunctionImpl< T, NDIM > * > & | v, |
| const std::vector< tensorT > & | c, | ||
| const keyT | key ) |
Refine multiple functions down to the same finest level.
| v | the vector of functions we are refining. |
| key | the current node. |
| c | the vector of coefficients passed from above. |
| [v] | is the vector of functions we are refining. |
| [key] | is the current node. |
| [c] | is the vector of coefficients passed from above. |
References FunctionImpl, c, cdata, child_patch(), coeffs, copy(), d, MADNESS_ASSERT, MADNESS_CHECK, refine_to_common_level(), size(), targs, madness::WorldObject< FunctionImpl< T, NDIM > >::task(), unfilter(), v, and world.
Referenced by refine_to_common_level().
| void madness::FunctionImpl< T, NDIM >::remove_internal_coefficients | ( | const bool | fence | ) |
Referenced by madness::FunctionImpl< Q, NDIM >::key0().
| void madness::FunctionImpl< T, NDIM >::remove_leaf_coefficients | ( | const bool | fence | ) |
Referenced by madness::FunctionImpl< Q, NDIM >::print_tree().
|
inline |
|
inline |
| void madness::FunctionImpl< T, NDIM >::reset_timer | ( | ) |
References reset_timer(), timer_accumulate, timer_lr_result, timer_target_driven, and world.
Referenced by reset_timer().
| void madness::FunctionImpl< T, NDIM >::scale_inplace | ( | const T | q, |
| bool | fence ) |
In-place scale by a constant.
References q(), scale_inplace(), and unary_op_node_inplace().
Referenced by average(), madness::FunctionImpl< T, LDIM >::gaxpy_inplace(), and scale_inplace().
|
inline |
Out-of-place scale by a constant.
|
inline |
invoked by copy_remote_coeffs_from_pid to serialize local coeffs
| void madness::FunctionImpl< T, NDIM >::set_autorefine | ( | bool | value | ) |
References autorefine, madness::Future< void >::value, and set_autorefine().
Referenced by set_autorefine().
| void madness::FunctionImpl< T, NDIM >::set_functor | ( | const std::shared_ptr< FunctionFunctorInterface< T, NDIM > > | functor1 | ) |
References functor, madness::on_demand, set_functor(), and set_tree_state().
Referenced by set_functor().
| void madness::FunctionImpl< T, NDIM >::set_tensor_args | ( | const TensorArgs & | t | ) |
References set_tensor_args(), and targs.
Referenced by set_tensor_args().
| void madness::FunctionImpl< T, NDIM >::set_thresh | ( | double | value | ) |
References madness::Future< void >::value, set_thresh(), and thresh.
Referenced by set_thresh().
|
inline |
Referenced by madness::FunctionImpl< T, LDIM >::apply(), madness::FunctionImpl< T, LDIM >::apply_source_driven(), madness::composite_product_apply(), compress(), gaxpy_oop_reconstructed(), madness::FunctionImpl< T, LDIM >::hartree_product(), madness::FunctionImpl< T, LDIM >::make_Vphi(), madness::FunctionImpl< T, LDIM >::make_Vphi_ij_u(), madness::FunctionImpl< T, LDIM >::make_Vphi_only(), madness::FunctionImpl< T, LDIM >::multiply(), madness::FunctionImpl< T, LDIM >::project_out2(), reconstruct(), madness::FunctionImpl< T, LDIM >::recursive_apply(), madness::FunctionImpl< T, LDIM >::recursive_apply(), madness::FunctionImpl< T, LDIM >::recursive_apply(), set_functor(), standard(), trickle_down(), and unset_functor().
|
inline |
| std::size_t madness::FunctionImpl< T, NDIM >::size | ( | ) | const |
Returns the number of coefficients in the function ... collective global sum.
References size(), size_local(), madness::sum(), and world.
Referenced by madness::FunctionImpl< T, LDIM >::do_dot_localX(), madness::FunctionImpl< T, LDIM >::do_inner_localX(), madness::FunctionImpl< T, LDIM >::mulXXveca(), madness::FunctionImpl< T, LDIM >::partial_inner(), refine_to_common_level(), and size().
| std::size_t madness::FunctionImpl< T, NDIM >::size_local | ( | ) | const |
Returns the number of coefficients in the function for each rank.
References coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), madness::FunctionNode< T, NDIM >::size(), size_local(), and madness::sum().
Referenced by size(), and size_local().
| void madness::FunctionImpl< T, NDIM >::sock_it_to_me | ( | const keyT & | key, |
| const RemoteReference< FutureImpl< std::pair< keyT, coeffT > > > & | ref ) const |
Walk up the tree returning pair(key,node) for first node with coefficients.
Three possibilities.
1) The coeffs are present and returned with the key of the containing node.
2) The coeffs are further up the tree ... the request is forwarded up.
3) The coeffs are futher down the tree ... an empty tensor is returned.
!! This routine is crying out for an optimization to manage the number of messages being sent ... presently each parent is fetched 2^(n*d) times where n is the no. of levels between the level of evaluation and the parent. Alternatively, reimplement multiply as a downward tree walk and just pass the parent down. Slightly less parallelism but much less communication.
References madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), madness::Future< T >::set(), and sock_it_to_me().
Referenced by madness::DerivativeBase< T, NDIM >::find_neighbor(), madness::FunctionImpl< T, LDIM >::project_out2(), and sock_it_to_me().
| void madness::FunctionImpl< T, NDIM >::sock_it_to_me_too | ( | const keyT & | key, |
| const RemoteReference< FutureImpl< std::pair< keyT, coeffT > > > & | ref ) const |
As above, except 3) The coeffs are constructed from the avg of nodes further down the tree
References FunctionImpl, madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_coeff(), madness::TaskAttributes::hipri(), madness::Key< NDIM >::parent(), PROFILE_MEMBER_FUNC, project(), madness::Future< T >::set(), sock_it_to_me_too(), targs, and madness::WorldObject< FunctionImpl< T, NDIM > >::task().
Referenced by find_me(), and sock_it_to_me_too().
| void madness::FunctionImpl< T, NDIM >::square_inplace | ( | bool | fence | ) |
Pointwise squaring of function with optional global fence.
If not autorefining, local computation only if not fencing. If autorefining, may result in asynchronous communication.
References square_inplace(), and unary_op_value_inplace().
Referenced by square_inplace().
| void madness::FunctionImpl< T, NDIM >::standard | ( | bool | fence | ) |
Changes non-standard compressed form to standard compressed form.
References madness::compressed, flo_unary_op_node_inplace(), is_compressed(), set_tree_state(), and standard().
Referenced by standard().
|
inline |
| void madness::FunctionImpl< T, NDIM >::sum_down | ( | bool | fence | ) |
After 1d push operator must sum coeffs down the tree to restore correct scaling function coefficients.
References cdata, coeffs, madness::reconstructed, sum_down(), sum_down_spawn(), tree_state, and world.
Referenced by madness::composite_product_apply(), madness::FunctionImpl< T, LDIM >::gaxpy_inplace_reconstructed(), madness::FunctionImpl< T, LDIM >::make_Vphi(), and sum_down().
| void madness::FunctionImpl< T, NDIM >::sum_down_spawn | ( | const keyT & | key, |
| const coeffT & | s ) |
is this the same as trickle_down() ?
References c, cdata, child_patch(), madness::FunctionNode< T, NDIM >::clear_coeff(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, copy(), d, madness::FunctionNode< T, NDIM >::has_children(), sum_down_spawn(), targs, madness::WorldObject< FunctionImpl< T, NDIM > >::task(), and unfilter().
Referenced by sum_down(), and sum_down_spawn().
| madness::FunctionImpl< T, NDIM >::TENSOR_RESULT_TYPE | ( | T | , |
| R | ) const |
Returns the dot product ASSUMING same distribution.
handles compressed and redundant form
| madness::FunctionImpl< T, NDIM >::TENSOR_RESULT_TYPE | ( | T | , |
| R | ) const |
Returns the inner product ASSUMING same distribution.
handles compressed and redundant form
| madness::FunctionImpl< T, NDIM >::TENSOR_RESULT_TYPE | ( | T | , |
| R | ) const |
Returns the inner product of this with function g constructed on-the-fly.
the leaf boxes of this' MRA tree defines the inner product
| typedef madness::FunctionImpl< T, NDIM >::TENSOR_RESULT_TYPE | ( | T | , |
| R | ) |
| typedef madness::FunctionImpl< T, NDIM >::TENSOR_RESULT_TYPE | ( | T | , |
| R | ) |
|
static |
|
static |
|
static |
Computes norm of low/high-order polyn. coeffs for autorefinement test.
t is a k^d tensor. In order to screen the autorefinement during multiplication compute the norms of ... lo ... the block of t for all polynomials of order < k/2 ... hi ... the block of t for all polynomials of order >= k/2
k=5 0,1,2,3,4 --> 0,1,2 ... 3,4 k=6 0,1,2,3,4,5 --> 0,1,2 ... 3,4,5
k=number of wavelets, so k=5 means max order is 4, so max exactly representable squarable polynomial is of order 2.
References cdata, copy(), madness::BaseTensor::dim(), madness::Tensor< T >::fill(), madness::FunctionCommonData< T, NDIM >::get(), lo, madness::Tensor< T >::normf(), and tnorm().
Referenced by madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::pointwise_multiplier(), autorefine_square_test(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), refop::operator()(), refop::operator()(), tnorm(), tnorm(), and tnorm().
| T madness::FunctionImpl< T, NDIM >::trace_local | ( | ) | const |
Returns int(f(x),x) in local volume.
References FunctionImpl, cdata, madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::GenTensor< T >::full_tensor(), madness::FunctionDefaults< NDIM >::get_cell_volume(), madness::FunctionNode< T, NDIM >::has_children(), madness::FunctionNode< T, NDIM >::has_coeff(), has_coefficients_on_leaves_only(), has_summable_coefficients(), is_compressed(), leaves_only, madness::Key< NDIM >::level(), MADNESS_CHECK_THROW, NDIM, pow(), PROFILE_MEMBER_FUNC, madness::sum(), trace_local(), and world.
Referenced by trace_local().
|
inline |
traverse a non-existing tree
part I: make the coefficients, process them and continue the recursion if necessary
| [in] | coeff_op | operator making the coefficients and determining them being leaves |
| [in] | apply_op | operator processing the coefficients |
| [in] | key | the key we are currently working on |
| std::size_t madness::FunctionImpl< T, NDIM >::tree_size | ( | ) | const |
Returns the size of the tree structure of the function ... collective global sum.
References coeffs, madness::sum(), tree_size(), and world.
Referenced by print_size(), and tree_size().
| void madness::FunctionImpl< T, NDIM >::trickle_down | ( | bool | fence | ) |
sum all the contributions from all scales after applying an operator in mod-NS form
References cdata, coeffs, madness::reconstructed, set_tree_state(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), trickle_down(), trickle_down_op(), and world.
Referenced by trickle_down().
| void madness::FunctionImpl< T, NDIM >::trickle_down_op | ( | const keyT & | key, |
| const coeffT & | s ) |
sum all the contributions from all scales after applying an operator in mod-NS form
cf reconstruct_op
References cdata, madness::FunctionNode< T, NDIM >::clear_coeff(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, d, madness::FunctionNode< T, NDIM >::has_children(), madness::GenTensor< T >::has_no_data(), madness::Key< NDIM >::level(), targs, and trickle_down_op().
Referenced by trickle_down(), and trickle_down_op().
| void madness::FunctionImpl< T, NDIM >::truncate | ( | double | tol, |
| bool | fence ) |
Truncate according to the threshold with optional global fence.
If thresh<=0 the default value of this->thresh is used
| [in] | tol | the truncation tolerance |
If thresh<=0 the default value of this->thresh is used
References cdata, coeffs, is_compressed(), thresh, truncate(), truncate_reconstructed_spawn(), truncate_spawn(), and world.
Referenced by truncate().
| bool madness::FunctionImpl< T, NDIM >::truncate_op | ( | const keyT & | key, |
| double | tol, | ||
| const std::vector< Future< bool > > & | v ) |
Actually do the truncate operation
| [in] | key | the key to the current function node being evaluated for truncation |
| [in] | tol | the tolerance for thresholding |
| [in] | v | vector of Future<bool>'s that specify whether the current nodes children have coeffs |
References cdata, madness::FunctionNode< T, NDIM >::clear_coeff(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::FunctionNode< T, NDIM >::has_children(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::Key< NDIM >::level(), NDIM, madness::GenTensor< T >::normf(), madness::FunctionNode< T, NDIM >::set_coeff(), madness::FunctionNode< T, NDIM >::set_has_children(), targs, truncate_op(), truncate_tol(), and v.
Referenced by truncate_op(), and truncate_spawn().
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::truncate_reconstructed_op | ( | const keyT & | key, |
| const std::vector< Future< coeffT > > & | v, | ||
| const double | tol ) |
given the sum coefficients of all children, truncate or not
References cdata, child_patch(), coeffs, copy(), d, madness::error(), filter(), madness::Key< NDIM >::level(), MADNESS_ASSERT, MADNESS_CHECK, madness::FunctionNode< T, NDIM >::set_has_children(), targs, truncate_reconstructed_op(), truncate_tol(), and v.
Referenced by truncate_reconstructed_op().
| Future< typename FunctionImpl< T, NDIM >::coeffT > madness::FunctionImpl< T, NDIM >::truncate_reconstructed_spawn | ( | const keyT & | key, |
| const double | tol ) |
truncate using a tree in reconstructed form
must be invoked where key is local
References truncate_reconstructed_spawn().
Referenced by truncate(), and truncate_reconstructed_spawn().
| Future< bool > madness::FunctionImpl< T, NDIM >::truncate_spawn | ( | const keyT & | key, |
| double | tol ) |
Returns true if after truncation this node has coefficients.
Assumed to be invoked on process owning key. Possible non-blocking communication.
| [in] | key | the key of the current function node |
References madness::FunctionNode< T, NDIM >::clear_coeff(), madness::FunctionNode< T, NDIM >::coeff(), coeffs, madness::future_vector_factory(), madness::TaskAttributes::generator(), madness::FunctionNode< T, NDIM >::has_children(), madness::FunctionNode< T, NDIM >::has_coeff(), madness::Key< NDIM >::level(), NDIM, madness::GenTensor< T >::normf(), madness::WorldObject< FunctionImpl< T, NDIM > >::task(), truncate_op(), truncate_spawn(), truncate_tol(), v, and world.
Referenced by truncate(), and truncate_spawn().
| double madness::FunctionImpl< T, NDIM >::truncate_tol | ( | double | tol, |
| const keyT & | key ) const |
Returns the truncation threshold according to truncate_method.
here is our handwaving argument: this threshold will give each FunctionNode an error of less than tol. The total error can then be as high as sqrt(#nodes) * tol. Therefore in order to account for higher dimensions: divide tol by about the root of number of siblings (2^NDIM) that have a large error when we refine along a deep branch of the tree.
Returns the truncation threshold according to truncate_method
All modes scale tol with the box size h_n = L/2^n at level n (L = cell_min_width). The positive modes tighten the threshold at fine levels so that high-frequency content is kept accurately — appropriate when the function itself or its derivatives must be pointwise accurate. The negative modes loosen the threshold at fine levels — appropriate when the function will immediately be passed to a smoothing integral operator that suppresses high-frequency content anyway.
Design rationale for each mode:
Mode 0: t_n = tol (uniform, level-independent) Simplest choice. No level weighting; each wavelet coefficient is kept if it exceeds tol regardless of its scale.
Mode 1: t_n = tol * min(1, L/2^n) Designed for first-derivative accuracy. A level-n coefficient of magnitude t_n contributes t_n * (2^n/L) to ||∇f||, so this mode makes every level contribute at most tol to the gradient error. Clamped to tol at coarse levels (L/2^n > 1).
Mode 2: t_n = tol * min(1, (L/2^n)^2) Designed for second-derivative (Laplacian) accuracy. Each level contributes at most tol to ||∇²f||. Tighter than mode 1 at fine levels; same tol at coarse levels.
Mode 3: t_n = tol/2^{NDIM/2} * min(1, L/2^n) Like mode 1 but with an extra 1/2^{NDIM/2} prefactor intended to account for the growing number of tree nodes in higher dimensions. See inline comment below for the (disputed) justification.
Mode 4: t_n = tol * min(1, (L/2^n)^{NDIM/2}) Rigorous L2 bound for NDIM dimensions: if each node's L2 error is at most t_n, then the total L2 error is at most tol when the level-n box volume (L/2^n)^NDIM is used to weight the sum. Recovers mode 1 for NDIM=2 and mode 2 for NDIM=4.
Mode -1: t_n = tol * max(1, 2^n/L) [dual of mode 1] Designed for accuracy after applying a first-order smoothing operator S with ||S||_{k} ~ 1/k (e.g. a Poisson-type convolution). If the representation error at level n has L2 norm t_n, the error after S is ~t_n * (L/2^n). Setting t_n = tol * (2^n/L) ensures ||S(f-f̃)||₂ ≤ const*tol while allowing much coarser fine-level representation. CAUTION: the resulting f̃ is only meaningful as input to such an S; derivatives and inner products with non-smooth functions will be wrong.
Mode -2: t_n = tol * max(1, (2^n/L)^2) [dual of mode 2] Designed for accuracy after applying the resolvent G = (T-E)^{-1}, whose Fourier-space symbol is G(k) = 2/(k²+μ²) ~ 2/k² for k >> μ. A level-n error of magnitude t_n survives G as ~t_n*(L/2^n)². Setting t_n = tol*(2^n/L)² guarantees ||G(f-f̃)||â‚‚ ≤ const*tol while aggressively pruning fine levels (factor ~(2^n/L)² looser than mode 0 at level n). The coarse-level floor (where max clamps to 1) is unchanged — coarse-level errors pass through G at amplitude ~1/|E| and are only reduced by tightening tol itself, not by choosing this mode. CAUTION: same as mode -1 — use only for intermediates fed into G. Modes 1, 2 and 3 scale the tolerance by the physical width of the box. The width of an anisotropic cell has to be reduced to one number, and that is the geometric mean, volume^(1/NDIM) – not the smallest dimension, which would tie the tolerance to the cell's aspect ratio rather than to its resolution. Cubic cells are unaffected: there the two agree.
References madness::FunctionDefaults< NDIM >::get_cell_geometric_mean_width(), madness::FunctionDefaults< NDIM >::get_cell_min_width(), L, madness::Key< NDIM >::level(), MADNESS_EXCEPTION, NDIM, pow(), truncate_mode, and truncate_tol().
Referenced by madness::FunctionImpl< T, LDIM >::apply_1d_realspace_push_op(), autorefine_square_test(), broaden(), madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), madness::FunctionImpl< T, LDIM >::do_apply(), madness::FunctionImpl< T, LDIM >::do_apply_directed_screening(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::finalize(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, LDIM >::mulXXa(), madness::FunctionImpl< T, LDIM >::mulXXveca(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::operator()(), refop::operator()(), refop::operator()(), madness::Leaf_op< T, NDIM, opT, specialboxT >::post_screening(), project_refine_op(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), madness::FunctionImpl< T, NDIM >::multiply_op< LDIM >::screen(), truncate_op(), truncate_reconstructed_op(), truncate_spawn(), truncate_tol(), and madness::FunctionImpl< T, LDIM >::vtransform_doit().
|
inline |
Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence
| [in] | op | the unary operator for the coefficients |
|
inline |
Unary operation applied inplace to the coefficients WITHOUT refinement, optional fence
| [in] | op | the unary operator for the coefficients |
Referenced by scale_inplace().
|
inline |
Unary operation applied inplace to the values with optional refinement and fence
| [in] | op | the unary operator for the values |
Referenced by abs_inplace(), abs_square_inplace(), and square_inplace().
|
inline |
Performs unary operation on function impl. Delegates to the unaryXXa() method
| [in] | func | function impl of the operand |
| [in] | op | the unary operator |
|
inline |
Out of place unary operation on function impl The skeleton algorithm should resemble something like
*this = op(*func)
| [in] | key | the key of the current function node (box) |
| [in] | func | the function impl on which to be operated |
| [in] | op | the unary operator |
Referenced by madness::FunctionImpl< T, LDIM >::unaryXX(), and madness::FunctionImpl< T, LDIM >::unaryXXvalues().
|
inline |
Performs unary operation on function impl. Delegates to the unaryXXa() method
| [in] | func | function impl of the operand |
| [in] | op | the unary operator |
| void madness::FunctionImpl< T, NDIM >::undo_redundant | ( | const bool | fence | ) |
convert this from redundant to standard reconstructed form
Referenced by erase(), madness::partial_mul(), and madness::FunctionImpl< Q, NDIM >::print_tree_json().
|
inline |
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::unfilter | ( | const coeffT & | s | ) | const |
References cdata, transform(), and unfilter().
| FunctionImpl< T, NDIM >::tensorT madness::FunctionImpl< T, NDIM >::unfilter | ( | const tensorT & | s | ) | const |
Transform sums+differences at level n to sum coefficients at level n+1.
Given scaling function and wavelet coefficients (s and d) returns the scaling function coefficients at the next finer level. I.e., reconstruct Vn using Vn = Vn-1 + Wn-1.
Returns a new tensor and has no side effects
If (sonly) ... then ss is only the scaling function coeff (and assume the d are zero). Works for any number of dimensions.
No communication involved.
References cdata, madness::fast_transform(), unfilter(), and w().
Referenced by madness::FunctionImpl< T, LDIM >::binaryXXa(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, LDIM >::inner_adaptive_recursive(), madness::FunctionImpl< T, LDIM >::inner_ext_recursive(), madness::FunctionImpl< T, LDIM >::mulXXa(), madness::FunctionImpl< T, LDIM >::mulXXveca(), reconstruct_op(), madness::FunctionImpl< T, LDIM >::recur_down_for_contraction_map(), madness::FunctionImpl< T, LDIM >::refine_op(), refine_to_common_level(), sum_down_spawn(), unfilter(), and unfilter().
| void madness::FunctionImpl< T, NDIM >::unset_functor | ( | ) |
References functor, set_tree_state(), madness::unknown, and unset_functor().
Referenced by madness::FunctionImpl< T, LDIM >::make_Vphi(), and unset_functor().
| FunctionImpl< T, NDIM >::coeffT madness::FunctionImpl< T, NDIM >::upsample | ( | const keyT & | key, |
| const coeffT & | coeff ) const |
upsample the sum coefficients of level 1 to sum coeffs on level n+1
specialization of the unfilter method, will transform only the sum coefficients
| [in] | key | key of level n+1 |
| [in] | coeff | sum coefficients of level n (does NOT belong to key!!) |
specialization of the unfilter method, will transform only the sum coefficients
| [in] | key | key of level n+1 |
| [in] | coeff | sum coefficients of level n (does NOT belong to key!!) |
| [in] | args | TensorArguments for possible low rank approximations |
References cdata, madness::general_transform(), h(), NDIM, madness::Key< NDIM >::translation(), and upsample().
Referenced by madness::Leaf_op< T, NDIM, opT, specialboxT >::compare_to_parent(), and upsample().
|
inline |
Referenced by assemble_coefficients(), madness::composite_product_op_NS< T, NDIM, opT, LDIM >::eri_coeffs(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_node(), madness::FunctionImpl< T, LDIM >::inner_ext_node(), madness::FunctionImpl< T, LDIM >::multi_to_multi_op_values_doit(), madness::FunctionImpl< T, LDIM >::multiop_values_doit(), madness::FunctionImpl< T, LDIM >::read_grid(), and madness::FunctionImpl< T, LDIM >::read_grid2().
|
inline |
|
inline |
convert function values of the a child generation directly to NS coeffs
equivalent to converting the function values to 2^NDIM S coeffs and then filtering them to NS coeffs. Reverse operation to NScoeffs2values().
| [in] | key | key of the parent of the generation |
| [in] | values | tensor holding function values of the 2^NDIM children of key |
| bool madness::FunctionImpl< T, NDIM >::verify_parents_and_children | ( | ) | const |
check that parents and children are consistent
will not check proper size of coefficients global communication
References coeffs, and verify_parents_and_children().
Referenced by verify_parents_and_children(), and verify_tree().
| void madness::FunctionImpl< T, NDIM >::verify_tree | ( | ) | const |
Verify tree is properly constructed ... global synchronization involved.
If an inconsistency is detected, prints a message describing the error and then throws a madness exception.
This is a reasonably quick and scalable operation that is useful for debugging and paranoia.
References FunctionImpl, MADNESS_CHECK_THROW, PROFILE_MEMBER_FUNC, verify_parents_and_children(), verify_tree(), verify_tree_state_local(), and world.
Referenced by verify_tree().
| bool madness::FunctionImpl< T, NDIM >::verify_tree_state_local | ( | ) | const |
check that the tree state and the coeffs are consistent
will not check existence of children and/or parents no communication
References c, coeffs, madness::compressed, get_k(), get_tree_state(), k, MADNESS_EXCEPTION, madness::nonstandard, madness::nonstandard_after_apply, madness::nonstandard_with_leaves, print(), madness::reconstructed, madness::redundant, madness::redundant_after_merge, and verify_tree_state_local().
Referenced by verify_tree(), and verify_tree_state_local().
|
inline |
Referenced by madness::FunctionImpl< T, LDIM >::do_apply().
|
inline |
Transforms a vector of functions left[i] = sum[j] right[j]*c[j,i] using sparsity
| [in] | vright | vector of functions (impl's) on which to be transformed |
| [in] | c | the tensor (matrix) transformer |
| [in] | vleft | vector of of the newly transformed functions (impl's) |
|
inline |
| void madness::FunctionImpl< T, NDIM >::zero_norm_tree | ( | ) |
References coeffs, madness::NORM_TREE_UNCOMPUTED, and zero_norm_tree().
Referenced by zero_norm_tree().
|
friend |
Referenced by madness::FunctionImpl< T, NDIM >::coeff_value_adaptor< Q, opT >::coeff_value_adaptor(), madness::FunctionImpl< T, NDIM >::do_accumulate_trees< Q, R >::do_accumulate_trees(), madness::FunctionImpl< T, NDIM >::do_dot_local< R >::do_dot_local(), madness::FunctionImpl< T, NDIM >::do_gaxpy_inplace< Q, R >::do_gaxpy_inplace(), madness::FunctionImpl< T, NDIM >::do_inner_local< R >::do_inner_local(), madness::FunctionImpl< T, NDIM >::do_inner_local_on_demand< R >::do_inner_local_on_demand(), check_symmetry_local(), eval(), eval_cube(), eval_plot_cube(), evaldepthpt(), evalR(), insert_zero_down_to_initial_level(), map_and_mirror(), mapdim(), mirror(), norm2sq_local(), refine_to_common_level(), sock_it_to_me_too(), trace_local(), and verify_tree().
|
friend |
Hash a pointer to FunctionImpl.
| [in] | impl | pointer to a FunctionImpl |
Referenced by madness::FunctionImpl< T, LDIM >::hash_value, and madness::FunctionImpl< T, LDIM >::hash_value.
|
friend |
|
private |
If true, autorefine where appropriate.
Referenced by get_autorefine(), and set_autorefine().
|
mutable |
Referenced by print_info(), and put_in_box().
|
mutable |
Referenced by print_info(), and put_in_box().
|
private |
Referenced by add_scalar_inplace(), child_patch(), compress_op(), compute_snorm_and_dnorm(), madness::FunctionImpl< T, LDIM >::copy_coeffs_different_world(), do_print_grid(), downsample(), eval_cube(), filter(), filter(), gaxpy_oop_reconstructed(), get_cdata(), insert_zero_down_to_initial_level(), key0(), make_redundant_op(), multiply(), norm_tree(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), parent_to_child(), phi_for_mul(), print_plane_local(), print_tree(), print_tree_graphviz(), print_tree_json(), project(), project(), project_refine_op(), reconstruct_op(), refine_to_common_level(), sum_down(), sum_down_spawn(), tnorm(), tnorm(), tnorm(), trace_local(), trickle_down(), trickle_down_op(), truncate(), truncate_op(), truncate_reconstructed_op(), unfilter(), unfilter(), and upsample().
|
private |
the size of the root cell in each dimension, unchangeable
Referenced by do_print_grid(), do_print_plane(), madness::FunctionImpl< T, LDIM >::read_grid(), and madness::FunctionImpl< T, LDIM >::read_grid2().
|
private |
The coefficients.
Referenced by add_scalar_inplace(), madness::FunctionImpl< T, LDIM >::binaryXXa(), broaden(), check_symmetry_local(), chop_at_level(), compress_op(), compress_spawn(), madness::FunctionImpl< T, NDIM >::Vphi_ij_u_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, NDIM >::Vphi_op_NS< opT, LDIM >::continue_recursion(), madness::FunctionImpl< T, LDIM >::copy_coeffs_same_world(), diff(), do_print_tree(), do_print_tree_graphviz(), do_print_tree_json(), erase(), eval(), eval_local_only(), eval_local_only(), eval_plot_cube(), evaldepthpt(), evalR(), exists_and_has_children(), exists_and_is_leaf(), find_datum(), find_me(), madness::FunctionImpl< T, LDIM >::gaxpy(), madness::FunctionImpl< T, LDIM >::gaxpy_ext_recursive(), madness::FunctionImpl< T, LDIM >::gaxpy_inplace(), gaxpy_oop_reconstructed(), get_coeffs(), get_coeffs(), get_norm_tree_recursive(), get_pmap(), insert_zero_down_to_initial_level(), local_leaf_keys(), make_redundant_op(), max_local_depth(), max_nodes(), min_nodes(), madness::FunctionImpl< T, LDIM >::mulXXa(), madness::FunctionImpl< T, LDIM >::mulXXveca(), nCoeff_local(), norm2sq_local(), norm_tree(), norm_tree_op(), norm_tree_spawn(), print_info(), print_plane_local(), print_stats(), project(), project_refine_op(), real_size(), reconstruct_op(), refine_to_common_level(), size_local(), sock_it_to_me(), sock_it_to_me_too(), sum_down(), sum_down_spawn(), trace_local(), tree_size(), trickle_down(), trickle_down_op(), truncate(), truncate_op(), truncate_reconstructed_op(), truncate_spawn(), verify_parents_and_children(), verify_tree_state_local(), madness::FunctionImpl< T, LDIM >::vtransform_doit(), and zero_norm_tree().
| NDIM& gimpl madness::FunctionImpl< T, NDIM >::const |
| NDIM &g madness::FunctionImpl< T, NDIM >::const |
|
private |
Referenced by get_functor(), get_functor(), project(), set_functor(), and unset_functor().
|
private |
Initial level for refinement.
Referenced by insert_zero_down_to_initial_level().
|
private |
Wavelet order.
Referenced by do_print_grid(), eval_cube(), get_k(), madness::FunctionImpl< T, NDIM >::do_map_and_mirror::operator()(), madness::FunctionImpl< T, NDIM >::do_mirror::operator()(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), madness::FunctionImpl< T, NDIM >::project_out_op< LDIM >::operator()(), phi_for_mul(), print_plane_local(), print_stats(), and verify_tree_state_local().
| AtomicInt madness::FunctionImpl< T, NDIM >::large |
| bool madness::FunctionImpl< T, NDIM >::leaves_only =(this->is_redundant()) |
Referenced by trace_local().
|
private |
Do not refine below this level.
Referenced by project_refine_op().
|
mutableprivate |
Neighbor coefficients pushed here by whoever owns them; null until something stages.
Values mirror what sock_it_to_me returns for the same key: coefficients for a same-level leaf, empty for an interior node, absent when the neighbor is coarser and the consumer must walk up. Which nodes get pushed is the operator's business, not the table's — see DerivativeBase::stage_halo.
Allocated on the first push, so functions that never stage one do not carry it: a ConcurrentHashMap default-constructs 1021 bins, ~32 kB per function.
| AtomicInt madness::FunctionImpl< T, NDIM >::small |
|
private |
Minimium level for refinement on special points.
Referenced by project_refine_op().
|
private |
special points for further refinement (needed for composite functions or multiplication)
|
private |
type of tensor to be used in the FunctionNodes
Referenced by madness::FunctionImpl< T, NDIM >::do_reduce_rank::do_reduce_rank(), add_scalar_inplace(), average(), change_tensor_type1(), compress_op(), finalize_apply(), get_tensor_args(), get_tensor_type(), insert_zero_down_to_initial_level(), make_redundant_op(), multiply(), madness::FunctionImpl< T, NDIM >::pointwise_multiplier< LDIM >::operator()(), print_stats(), project(), project_refine_op(), reconstruct_op(), refine_to_common_level(), set_tensor_args(), sock_it_to_me_too(), sum_down_spawn(), trickle_down_op(), truncate_op(), and truncate_reconstructed_op().
|
private |
Screening threshold.
Referenced by madness::FunctionImpl< T, NDIM >::do_reduce_rank::do_reduce_rank(), assemble_coefficients(), autorefine_square_test(), broaden(), madness::FunctionImpl< T, NDIM >::recursive_apply_op2< opT >::finalize(), madness::FunctionImpl< T, NDIM >::recursive_apply_op< opT, LDIM >::finalize(), madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::finalize(), get_thresh(), project_refine_op(), reconstruct_op(), reduce_rank(), set_thresh(), and truncate().
| Timer madness::FunctionImpl< T, NDIM >::timer_accumulate |
Referenced by accumulate_timer(), print_timer(), and reset_timer().
| Timer madness::FunctionImpl< T, NDIM >::timer_change_tensor_type |
| Timer madness::FunctionImpl< T, NDIM >::timer_compress_svd |
Referenced by compress_op().
| Timer madness::FunctionImpl< T, NDIM >::timer_filter |
Referenced by compress_op().
| Timer madness::FunctionImpl< T, NDIM >::timer_lr_result |
Referenced by print_timer(), and reset_timer().
| Timer madness::FunctionImpl< T, NDIM >::timer_target_driven |
Referenced by print_timer(), and reset_timer().
|
private |
|
private |
0=default=(|d|<thresh), 1=(|d|<thresh/2^n), 2=(|d|<thresh/4^n);
Referenced by truncate_tol().
|
private |
If true projection inserts at level n-1 not n.
Referenced by project_refine_op().
| World& madness::FunctionImpl< T, NDIM >::world |
Referenced by add_scalar_inplace(), check_symmetry_local(), madness::composite_product_apply(), compress_spawn(), madness::FunctionImpl< T, LDIM >::copy_coeffs(), madness::FunctionImpl< T, LDIM >::copy_coeffs_different_world(), madness::FunctionImpl< T, LDIM >::copy_remote_coeffs_from_pid(), diff(), do_print_grid(), do_print_plane(), eval(), eval_local_only(), eval_local_only(), evaldepthpt(), evalR(), finalize_apply(), find_me(), madness::FunctionImpl< T, LDIM >::gaxpy_inplace(), gaxpy_oop_reconstructed(), max_depth(), max_nodes(), min_nodes(), nCoeff(), norm2sq_local(), norm_tree(), print_grid(), print_info(), print_plane(), print_size(), print_stats(), print_timer(), print_tree(), print_tree_graphviz(), print_tree_json(), project(), project_refine_op(), put_in_box(), real_size(), refine_to_common_level(), reset_timer(), size(), madness::DerivativeBase< T, NDIM >::submit_diff_tasks(), sum_down(), trace_local(), tree_size(), trickle_down(), truncate(), truncate_spawn(), and verify_tree().