MADNESS  0.10.1
leafop.h
Go to the documentation of this file.
1 /*
2  This file is part of MADNESS.
3 
4  Copyright (C) 2007,2010 Oak Ridge National Laboratory
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 
20  For more information please contact:
21 
22  Robert J. Harrison
23  Oak Ridge National Laboratory
24  One Bethel Valley Road
25  P.O. Box 2008, MS-6367
26 
27  email: harrisonrj@ornl.gov
28  tel: 865-241-3937
29  fax: 865-572-0680
30 */
31 
32 /*
33 * Leafop.h
34  *
35  * Created on: Apr 12, 2016
36  * Author: kottmanj
37  *
38  * Definition of Operators which operate on leaf boxes
39  * includes special operators for cuspy funtions (f12 applications) which enforce deeper refinement on the "diagonal" boxes (coordinate r1 == coordinate r2)
40  *
41  */
42 
43 #ifndef SRC_MADNESS_MRA_LEAFOP_H_
44 #define SRC_MADNESS_MRA_LEAFOP_H_
45 
46 namespace madness {
47 
48 // forward declarations
49 template<std::size_t NDIM>
50 class Key;
51 
52 template<typename T>
53 class GenTensor;
54 
55 template<typename T, std::size_t NDIM>
56 class SeparatedConvolution;
57 
58 /// helper structure for the Leaf_op
59 /// The class has an operator which decides if a given key belongs to a special box (needs further refinement up to a special level)
60 /// this is the default class which always gives back false
61 template<typename T, std::size_t NDIM>
62 struct Specialbox_op {
63 public:
65 
66  virtual ~Specialbox_op() {}
67 
68  virtual std::string name() const { return "default special box which only checks for the special points"; }
69 
70  /// the operator which deceides if the given box is special
71  /// @param[in] the key of the current box
72  /// @param[in] the function which will be constructed (if it is needed)
73  /// @param[out] bool which states if the box is special or not
74  virtual bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f = NULL) const { return false; }
75 
76  // check if on of the special points is in the current box (or at low refinement level in a neighbouring box)
77  /// @param[in] the key of the box
78  /// @param[in] the function which will be constructed (if it is needed)
79  bool
80  check_special_points(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {
81  const std::vector<Vector<double, NDIM> >& special_points = f->get_special_points();
82  if (special_points.empty()) return false;
83  // level 0 and 1 has only boundary boxes
84  if (key.level() > 1 and box_is_at_boundary(key)) return false;
85  // check for all special points if they are neighbours of the current box
87  std::vector<bool> bperiodic = bc.is_periodic();
88  for (size_t i = 0; i < special_points.size(); ++i) {
90  user_to_sim(special_points[i], simpt);
91  Key<NDIM> specialkey = simpt2key(simpt, key.level());
92  // use adaptive scheme: if we are at a low level refine also neighbours
93  int ll = get_half_of_special_level(f->get_special_level());
94  if (ll < f->get_initial_level()) ll = f->get_initial_level();
95  if (key.level() > ll) {
96  if (specialkey == key) return true;
97  else return false;
98  } else {
99  if (specialkey.is_neighbor_of(key, bperiodic)) return true;
100  else return false;
101  }
102  }
103  return false;
104  }
105 
106 
107  template<typename Archive>
108  void
109  serialize(Archive& ar) {}
110 
111  /// Determine if a given box is at the boundary of the simulation box
112  /// @param[in] the key of the current box
113  /// Since boxes of level 0 and 1 are always at the boundary this case should be avoided
114  /// if the boundary conditions are periodic then all boxes are boundary boxes
115  virtual bool box_is_at_boundary(const Key<NDIM>& key) const {
116  // l runs from l=0 to l=2^n-1 for every dimension
117  // if one l is = 2^n or 0 we are at the boundary
118  // note that boxes of level 0 and 1 are always boundary boxes
119  for (size_t i = 0; i < NDIM; i++) {
120  if (key.translation()[i] == 0 or key.translation()[i] == pow(2, key.level()) - 1) {
121  if (FunctionDefaults<NDIM>::get_bc()(i, 0) != BC_PERIODIC)return true;
122  }
123  }
124  return false;
125  }
126 
127  // if you want to use milder refinement conditions for special boxes with increasing refinement level
128  // Cuspybox_op needs this
130  size_t ll = sl;
131  if (sl % 2 == 0) ll = sl / 2;
132  else ll = (sl + 1) / 2;
133  return ll;
134  }
135 
136 };
137 
138 /// the high_dimensional key is broken appart into two lower dimensional keys, if they are neighbours of each other then refinement
139 /// up to the special_level is enforced
140 /// For general class description see the base class Specialbox_op
141 template<typename T, std::size_t NDIM>
142 struct ElectronCuspyBox_op : public Specialbox_op<T, NDIM> {
143 public:
145 
147 
148  template<typename Archive>
149  void serialize(Archive& ar) {}
150 
151  std::string name() const { return "Cuspybox_op"; }
152 
153  /// Operator which decides if the key belongs to a special box
154  /// The key is broken appart in two lower dimensional keys (for electron cusps this is 6D -> 2x3D)
155  /// if the keys are neighbours then refinement up to the special level is enforced (means the 6D box is close to the cusp or contains it)
156  /// if the refinement level is already beyond half of the special_level then refinement is only enforded if the broken keys are the same (6D box contains cusp)
157  bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {
158  // do not treat boundary boxes beyond level 2 as special (level 1 and 0 consist only of boundary boxes)
159  if (not(key.level() < 2)) {
160  if (this->box_is_at_boundary(key)) return false;
161  }
162 
163  if (NDIM % 2 != 0) MADNESS_EXCEPTION("Cuspybox_op only valid for even dimensions",
164  1); // if uneven dims are needed just make a new class with NDIM+1/2 and NDIM-LDIM
166  std::vector<bool> bperiodic = bc.is_periodic();
167  Key<NDIM / 2> key1;
168  Key<NDIM / 2> key2;
169  key.break_apart(key1, key2);
170  int ll = this->get_half_of_special_level();
171  if (ll < f->get_initial_level()) ll = f->get_initial_level();
172  if (key.level() > ll) {
173  if (key1 == key2) return true;
174  else return false;
175  } else {
176  if (key1.is_neighbor_of(key2, bperiodic)) return true;
177  else return false;
178  }
179  MADNESS_EXCEPTION("We should not end up here (check further of cuspy box)", 1);
180  return false;
181  }
182 
183 };
184 
185 /// This works similar to the Cuspybox_op: The key is broken apart (2N-dimensional -> 2x N-Dimensional)
186 /// then it is checked if one of the lower dimensional keys contains a lower dimensional special points (which will be the nuclear-coordinates)
187 template<typename T, std::size_t NDIM>
188 struct NuclearCuspyBox_op : public Specialbox_op<T, NDIM> {
189 public:
191  // failsafe
192  if (NDIM % 2 != 0) MADNESS_EXCEPTION("NuclearCuspyBox works only for even dimensions", 1);
193  }
194 
195  NuclearCuspyBox_op(const size_t p) : particle(p) {
196  // failsafe
197  if (NDIM % 2 != 0) MADNESS_EXCEPTION("NuclearCuspyBox works only for even dimensions", 1);
198  MADNESS_ASSERT(particle == 1 or particle == 2 or particle == 0);
199  }
200 
202 
203  // particle==0: check both particles
204  // particle==1 or particle==2: check only particle1 or 2
205  int particle;
206 
207  template<typename Archive>
208  void serialize(Archive& ar) { ar & particle; }
209 
210  std::string name() const { return "Cuspybox_op for nuclear cusps"; }
211 
212  /// Operator which decides if the key belongs to a special box
213  /// The key is broken appart in two lower dimensional keys (6D -> 2x3D)
214  /// The special points should be given in a format which can also be broken appart
215  /// so: 6D special_points = (3D-special-points, 3D-special-points)
216  /// if the refinement level is already beyond half of the special_level then refinement is only enforded if the broken keys are the same (6D box contains cusp)
217  bool operator()(const Key<NDIM>& key, const FunctionImpl<T, NDIM> *const f) const {
218  if (not(key.level() < 2)) {
219  if (this->box_is_at_boundary(key)) return false;
220  }
221  MADNESS_ASSERT(particle == 1 or particle == 2 or particle == 0);
222  if (f == NULL) MADNESS_EXCEPTION("NuclearCuspyBox: Pointer to function is NULL", 1);
223  const std::vector<Vector<double, NDIM> >& special_points = f->get_special_points();
224  if (special_points.empty()) MADNESS_EXCEPTION(
225  "Demanded NuclearCuspyBox but the special points of the function are empty", 1);
226 
227  // break the special points into 3D points
228  std::vector<Vector<double, NDIM / 2> > lowdim_sp;
229  for (size_t i = 0; i < special_points.size(); i++) {
230  Vector<double, NDIM / 2> lowdim_tmp;
231  for (size_t j = 0; j < NDIM / 2; j++) {
232  lowdim_tmp[j] = special_points[i][j];
233  // check if the formatting is correct
234  if (special_points[i][j] != special_points[i][NDIM / 2 + j]) MADNESS_EXCEPTION(
235  "NuclearCuspyBox: Wrong format of special_point: ", 1);
236  }
237  lowdim_sp.push_back(lowdim_tmp);
238  }
239 
240  // now break the key appart and check if one if the results is in the neighbourhood of a special point
241  BoundaryConditions<NDIM / 2> bc = FunctionDefaults<NDIM / 2>::get_bc();
242  std::vector<bool> bperiodic = bc.is_periodic();
243  Key<NDIM / 2> key1;
244  Key<NDIM / 2> key2;
245 
246  key.break_apart(key1, key2);
247  for (size_t i = 0; i < lowdim_sp.size(); ++i) {
248  Vector<double, NDIM / 2> simpt;
249  user_to_sim(lowdim_sp[i], simpt);
250  Key<NDIM / 2> specialkey = simpt2key(simpt, key1.level());
251  // use adaptive scheme: if we are at a low level refine also neighbours
252  int ll = this->get_half_of_special_level(f->get_special_level());
253  if (ll < f->get_initial_level()) ll = f->get_initial_level();
254  if (key.level() > ll) {
255  if (particle == 1 and specialkey == key1) return true;
256  else if (particle == 2 and specialkey == key2) return true;
257  else if (particle == 0 and (specialkey == key1 or specialkey == key2)) return true;
258  else return false;
259  } else {
260  if (particle == 1 and specialkey.is_neighbor_of(key1, bperiodic)) return true;
261  else if (particle == 2 and specialkey.is_neighbor_of(key2, bperiodic)) return true;
262  else if (particle == 0 and
263  (specialkey.is_neighbor_of(key1, bperiodic) or specialkey.is_neighbor_of(key2, bperiodic)))
264  return true;
265  else return false;
266  }
267  }
268  return false;
269  }
270 
271 
272 };
273 
274 template<typename T, std::size_t NDIM, typename opT, typename specialboxT>
275 class Leaf_op {
276 public:
277  /// the function which the operators use (in most cases this function is also the function that will be constructed)
279  /// the operator which is used for screening (null pointer means no screening)
280  const opT *op;
281  /// special box structure: has an operator which decides if a given key belongs to a special box
282  /// the base class Specialbox_op<T,NDIM> just gives back false for every key
283  /// the derived class Cuspybox_op<T,NDIM> is used for potentials containing cusps at coalescence points of electrons
284  specialboxT specialbox;
285 
286  /// pre or post screening (see if this is the general_leaf_op or the leaf_op_other)
287  virtual bool
289  return false;
290  }
291 
293  : f(NULL), op(NULL), specialbox(specialboxT()) {
294  }
295 
296  Leaf_op(const FunctionImpl<T, NDIM> *const tmp)
297  : f(tmp), op(NULL), specialbox(specialboxT()) {
298  }
299 
300  Leaf_op(const FunctionImpl<T, NDIM> *const tmp, specialboxT& sb)
301  : f(tmp), op(NULL), specialbox(sb) {
302  }
303 
304  Leaf_op(const FunctionImpl<T, NDIM> *const tmp, const opT *const ope, specialboxT& sb)
305  : f(tmp), op(ope), specialbox(sb) {
306  }
307 
308  Leaf_op(const Leaf_op& other) : f(other.f), op(other.op), specialbox(other.specialbox) {}
309 
310  virtual
312  }
313 
314  virtual std::string
315  name() const {
316  return "general_leaf_op";
317  }
318 
319  /// make sanity check
320  virtual void
321  sanity() const {
322  if (f == NULL) MADNESS_EXCEPTION(("Error in " + name() + " pointer to function is NULL").c_str(), 1);
323  }
324 
325 public:
326  /// pre-determination
327  /// the decision if the current box will be a leaf box is made from information of another function
328  /// this is needed for on demand function
329  /// not that the on-demand function that is beeing constructed is not the function in this class
330  virtual bool
331  pre_screening(const Key<NDIM>& key) const {
332  MADNESS_EXCEPTION("pre-screening was called for leaf_op != leaf_op_other", 1);
333  return false;
334  }
335 
336  /// post-determination
337  /// determination if the box will be a leaf box after the coefficients are made
338  /// the function that is beeing constructed is the function in this class
339  /// the function will use the opartor op in order to screen, if op is a NULL pointer the result is always: false
340  /// @param[in] key: the key to the current box
341  /// @param[in] coeff: Coefficients of the current box
342  virtual bool
343  post_screening(const Key<NDIM>& key, const GenTensor<T>& coeff) const {
344  if (op == NULL) return false;
345  if (key.level() < this->f->get_initial_level()) return false;
346  sanity();
347  const double cnorm = coeff.normf();
349  std::vector<bool> bperiodic = bc.is_periodic();
350 
351  typedef Key<opT::opdim> opkeyT;
352  const opkeyT source = op->get_source_key(key);
353 
354  const double thresh = (this->f->truncate_tol(this->f->get_thresh(), key));
355  const std::vector<opkeyT>& disp = op->get_disp(key.level());
356  const opkeyT& d = *disp.begin(); // use the zero-displacement for screening
357  const double opnorm = op->norm(key.level(), d, source);
358  const double norm = opnorm * cnorm;
359 
360  return norm < thresh;
361  }
362 
363  /// determines if a node is well represented compared to the parents
364  /// @param[in] key the FunctionNode which we want to determine if it's a leaf node
365  /// @param[in] coeff the coeffs of key
366  /// @param[in] parent the coeffs of key's parent node
367  /// @return is the FunctionNode of key a leaf node?
368  bool
369  compare_to_parent(const Key<NDIM>& key, const GenTensor<T>& coeff, const GenTensor<T>& parent) const {
370  if (key.level() < this->f->get_initial_level()) return false;
371  //this->sanity();
372  if (parent.has_no_data()) return false;
373  if (key.level() < this->f->get_initial_level()) return false;
374  GenTensor<T> upsampled = this->f->upsample(key, parent);
375  upsampled.scale(-1.0);
376  upsampled += coeff;
377  const double dnorm = upsampled.normf();
378  const bool is_leaf = (dnorm < this->f->truncate_tol(this->f->get_thresh(), key.level()));
379  return is_leaf;
380  }
381 
382  /// check if the box is a special box
383  /// first check: Is one of the special points defined in the function f in the current box or a neighbour box
384  /// second check: Is the box special according to the specialbox operator (see class description of Specialbox_op)
385  /// @param[in] the key of the box
386  bool
388  if (key.level() > f->get_special_level()) return false;
389  else if (specialbox.check_special_points(key, f)) return true;
390  else if (specialbox(key, f)) return true;
391  else return false;
392  }
393 
394  template<typename Archive>
395  void
396  serialize(Archive& ar) {
397  ar & this->f & this->specialbox;
398  }
399 
400 };
401 
402 /// leaf_op for construction of an on-demand function
403 /// the function in the class is the function which defines the structure of the on-demand function
404 /// means: The tree of the function which is to construct will mirror the tree-structure of the function in this class (function variable defined in base-class)
405 template<typename T, std::size_t NDIM>
406 class Leaf_op_other : public Leaf_op<T, NDIM, SeparatedConvolution<double, NDIM>, Specialbox_op<T, NDIM> > {
407  std::string
408  name() const {
409  return "leaf_op_other";
410  }
411  /// we only need the pre-determination based on the already constructed function f
412  /// if f at box(key) is a leaf then return true
413 public:
414  bool
416  return true;
417  }
418 
420  }
421 
423  this->f = f_;
424  }
425 
427  : Leaf_op<T, NDIM, SeparatedConvolution<double, NDIM>, Specialbox_op<T, NDIM> >(other.f) {}
428 
429  bool
430  pre_screening(const Key<NDIM>& key) const {
431  MADNESS_ASSERT(this->f->get_coeffs().is_local(key));
432  return (not this->f->get_coeffs().find(key).get()->second.has_children());
433  }
434 
435  void sanity() const {
436  if (this->f == 0) MADNESS_EXCEPTION("Leaf_op_other: f is NULL pointer", 1);
437  if (this->op != 0) MADNESS_EXCEPTION("Leaf_op_other: Screening operator was set", 1);
438  }
439 
440  /// this should never be called for this leaf_op since the function in this class as already constructed
441  bool
442  post_screening(const Key<NDIM>& key, const GenTensor<T>& G) const {
443  MADNESS_EXCEPTION("post-determination was called for leaf_op_other", 1);
444  return false;
445  }
446 
447  /// this should never be called for this leaf_op since the function in this class as already constructed
448  bool
449  compare_to_parent(const Key<NDIM>& key, const GenTensor<T>& a, const GenTensor<T>& b) const {
450  MADNESS_EXCEPTION("compare-to-parent was called for leaf_op_other", 1);
451  return false;
452  }
453 
454  /// this should never be called for this leaf_op since the function in this class as already constructed
455  bool
457  MADNESS_EXCEPTION("special_refinement_needed was called for leaf_op_other", 1);
458  return false;
459  }
460 
461  template<typename Archive>
462  void
463  serialize(Archive& ar) {
464  ar & this->f;
465  }
466 
467 };
468 
469 } /* namespace madness */
470 
471 #endif /* SRC_MADNESS_MRA_LEAFOP_H_ */
Definition: test_derivative.cc:24
This class is used to specify boundary conditions for all operators.
Definition: funcdefaults.h:101
std::vector< bool > is_periodic() const
Convenience for application of integral operators.
Definition: funcdefaults.h:166
FunctionDefaults holds default paramaters as static class members.
Definition: funcdefaults.h:204
static const BoundaryConditions< NDIM > & get_bc()
Returns the default boundary conditions.
Definition: funcdefaults.h:413
FunctionImpl holds all Function state to facilitate shallow copy semantics.
Definition: funcimpl.h:941
double get_thresh() const
Definition: mraimpl.h:307
coeffT upsample(const keyT &key, const coeffT &coeff) const
upsample the sum coefficients of level 1 to sum coeffs on level n+1
Definition: mraimpl.h:1210
int get_special_level() const
Definition: funcimpl.h:964
double truncate_tol(double tol, const keyT &key) const
Returns the truncation threshold according to truncate_method.
Definition: mraimpl.h:628
Definition: lowranktensor.h:59
IsSupported< TensorTypeData< Q >, GenTensor< T > & >::type scale(Q fac)
Inplace multiplication by scalar of supported type (legacy name)
Definition: lowranktensor.h:426
bool has_no_data() const
Definition: gentensor.h:211
float_scalar_type normf() const
Definition: lowranktensor.h:406
Key is the index for a node of the 2^NDIM-tree.
Definition: key.h:66
Level level() const
Definition: key.h:159
const Vector< Translation, NDIM > & translation() const
Definition: key.h:164
void break_apart(Key< LDIM > &key1, Key< KDIM > &key2) const
break key into two low-dimensional keys
Definition: key.h:269
bool is_neighbor_of(const Key &key, const std::vector< bool > &bperiodic) const
Assuming keys are at the same level, returns true if displaced by no more than 1 in any direction.
Definition: key.h:222
Definition: leafop.h:406
void serialize(Archive &ar)
Definition: leafop.h:463
bool compare_to_parent(const Key< NDIM > &key, const GenTensor< T > &a, const GenTensor< T > &b) const
this should never be called for this leaf_op since the function in this class as already constructed
Definition: leafop.h:449
bool post_screening(const Key< NDIM > &key, const GenTensor< T > &G) const
this should never be called for this leaf_op since the function in this class as already constructed
Definition: leafop.h:442
void sanity() const
make sanity check
Definition: leafop.h:435
Leaf_op_other(const FunctionImpl< T, NDIM > *const f_)
Definition: leafop.h:422
Leaf_op_other(const Leaf_op_other &other)
Definition: leafop.h:426
bool do_pre_screening() const
Definition: leafop.h:415
Leaf_op_other()
Definition: leafop.h:419
bool special_refinement_needed(const Key< NDIM > &key) const
this should never be called for this leaf_op since the function in this class as already constructed
Definition: leafop.h:456
bool pre_screening(const Key< NDIM > &key) const
Definition: leafop.h:430
std::string name() const
Definition: leafop.h:408
Definition: leafop.h:275
specialboxT specialbox
Definition: leafop.h:284
virtual bool do_pre_screening() const
pre or post screening (see if this is the general_leaf_op or the leaf_op_other)
Definition: leafop.h:288
virtual bool pre_screening(const Key< NDIM > &key) const
Definition: leafop.h:331
bool special_refinement_needed(const Key< NDIM > &key) const
Definition: leafop.h:387
virtual bool post_screening(const Key< NDIM > &key, const GenTensor< T > &coeff) const
Definition: leafop.h:343
void serialize(Archive &ar)
Definition: leafop.h:396
Leaf_op()
Definition: leafop.h:292
const opT * op
the operator which is used for screening (null pointer means no screening)
Definition: leafop.h:280
Leaf_op(const Leaf_op &other)
Definition: leafop.h:308
virtual ~Leaf_op()
Definition: leafop.h:311
Leaf_op(const FunctionImpl< T, NDIM > *const tmp, specialboxT &sb)
Definition: leafop.h:300
bool compare_to_parent(const Key< NDIM > &key, const GenTensor< T > &coeff, const GenTensor< T > &parent) const
Definition: leafop.h:369
Leaf_op(const FunctionImpl< T, NDIM > *const tmp, const opT *const ope, specialboxT &sb)
Definition: leafop.h:304
const FunctionImpl< T, NDIM > * f
the function which the operators use (in most cases this function is also the function that will be c...
Definition: leafop.h:278
virtual std::string name() const
Definition: leafop.h:315
virtual void sanity() const
make sanity check
Definition: leafop.h:321
Leaf_op(const FunctionImpl< T, NDIM > *const tmp)
Definition: leafop.h:296
Convolutions in separated form (including Gaussian)
Definition: operator.h:136
char * p(char *buf, const char *name, int k, int initial_level, double thresh, int order)
Definition: derivatives.cc:72
auto T(World &world, response_space &f) -> response_space
Definition: global_functions.cc:34
static double pow(const double *a, const double *b)
Definition: lda.h:74
#define MADNESS_EXCEPTION(msg, value)
Macro for throwing a MADNESS exception.
Definition: madness_exception.h:119
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition: madness_exception.h:134
double norm(const T &t)
Definition: adquad.h:42
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
@ BC_PERIODIC
Definition: funcdefaults.h:56
static Key< NDIM > simpt2key(const Vector< T, NDIM > &pt, Level n)
Definition: funcdefaults.h:533
static void user_to_sim(const Vector< double, NDIM > &xuser, Vector< double, NDIM > &xsim)
Convert user coords (cell[][]) to simulation coords ([0,1]^ndim)
Definition: funcdefaults.h:524
NDIM & f
Definition: mra.h:2416
static const double b
Definition: nonlinschro.cc:119
static const double a
Definition: nonlinschro.cc:118
static const double thresh
Definition: rk.cc:45
Definition: test_dc.cc:47
Definition: leafop.h:142
~ElectronCuspyBox_op()
Definition: leafop.h:146
std::string name() const
Definition: leafop.h:151
bool operator()(const Key< NDIM > &key, const FunctionImpl< T, NDIM > *const f) const
Definition: leafop.h:157
void serialize(Archive &ar)
Definition: leafop.h:149
ElectronCuspyBox_op()
Definition: leafop.h:144
Definition: leafop.h:188
std::string name() const
Definition: leafop.h:210
int particle
Definition: leafop.h:205
bool operator()(const Key< NDIM > &key, const FunctionImpl< T, NDIM > *const f) const
Definition: leafop.h:217
NuclearCuspyBox_op()
Definition: leafop.h:190
~NuclearCuspyBox_op()
Definition: leafop.h:201
NuclearCuspyBox_op(const size_t p)
Definition: leafop.h:195
void serialize(Archive &ar)
Definition: leafop.h:208
Definition: leafop.h:62
Specialbox_op()
Definition: leafop.h:64
size_t get_half_of_special_level(const size_t &sl=FunctionDefaults< NDIM >::get_special_level()) const
Definition: leafop.h:129
virtual bool box_is_at_boundary(const Key< NDIM > &key) const
Definition: leafop.h:115
virtual ~Specialbox_op()
Definition: leafop.h:66
bool check_special_points(const Key< NDIM > &key, const FunctionImpl< T, NDIM > *const f) const
Definition: leafop.h:80
void serialize(Archive &ar)
Definition: leafop.h:109
virtual std::string name() const
Definition: leafop.h:68
virtual bool operator()(const Key< NDIM > &key, const FunctionImpl< T, NDIM > *const f=NULL) const
Definition: leafop.h:74
Definition: lowrankfunction.h:332
void d()
Definition: test_sig.cc:79
static const std::size_t NDIM
Definition: testpdiff.cc:42
double source(const coordT &r)
Definition: testperiodic.cc:48