|
MADNESS 0.10.1
|
Destination screening of the apply of an integral operator. More...
#include <madness/mra/key.h>#include <madness/mra/supbound.h>#include <madness/world/madness_exception.h>#include <madness/world/world.h>#include <cstdio>#include <algorithm>#include <array>#include <atomic>#include <functional>#include <memory>#include <vector>

Go to the source code of this file.
Classes | |
| class | madness::ApplyScreenHandle< NDIM > |
| struct | madness::ApplyScreenStats |
| class | madness::SupBoundScreen< NDIM > |
Namespaces | |
| namespace | madness |
| Namespace for all elements and tools of MADNESS. | |
Typedefs | |
| template<std::size_t NDIM> | |
| using | madness::apply_screen_t = std::function<double(const Key<NDIM>&)> |
| per destination box, a bound on the size of what the result of the apply will be multiplied with | |
Destination screening of the apply of an integral operator.
The result of an apply is often multiplied with another function afterwards (the exchange operator: K f = sum_i ket_i * P(bra_i f)). A contribution to a box in which that multiplier is negligible is then never used, and need not be computed (Yanai, Fann, Gan, Harrison, Beylkin, JCP 121, 6680 (2004), eq. 17). A screen answers, per destination box, a bound on the multiplier's largest magnitude there (supbound.h). FunctionImpl::do_apply skips a block whose contribution times that bound, capped at one, is negligible, computes a kept block with its per-term tolerance loosened by the same factor, and accumulates it only if its norm times the factor is significant; a skipped block still counts as used by the shell loop. A skipped block leaves at most the block's share of the tolerance in the product function, since ||s du||_2 <= sup|s| ||du||_2. The tasks of one apply carry the screen (ApplyScreenHandle; apply_only, and the vector apply(world, op, f, screens)); without one, do_apply is unchanged.