LIBINT  2.1.0-stable
hrr.h
1 /*
2  * This file is a part of Libint.
3  * Copyright (C) 2004-2014 Edward F. Valeev
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see http://www.gnu.org/licenses/.
17  *
18  */
19 
20 #ifndef _libint2_src_bin_libint_hrr_h_
21 #define _libint2_src_bin_libint_hrr_h_
22 
23 #include <iostream>
24 #include <sstream>
25 #include <string>
26 #include <vector>
27 #include <stdexcept>
28 #include <assert.h>
29 #include <rr.h>
30 #include <integral.h>
31 #include <algebra.h>
32 #include <dgvertex.h>
33 #include <prefactors.h>
34 #include <default_params.h>
35 #include <dims.h>
36 #include <task.h>
37 #include <context.h>
38 
39 using namespace std;
40 
41 namespace libint2 {
42 
55  template<class IntType, class BFSet, int part, FunctionPosition loc_a,
56  unsigned int pos_a, FunctionPosition loc_b, unsigned int pos_b>
57  class HRR: public RecurrenceRelation {
58 
59  public:
61  typedef BFSet BasisFunctionType;
63  typedef IntType TargetType;
64  typedef IntType ChildType;
67 
75  static SafePtr<ThisType> Instance(const SafePtr<TargetType>&, unsigned int dir = 0);
76  virtual ~HRR();
77 
81  static bool directional() {
82  if (boost::is_same<BasisFunctionType,CGShell>::value)
83  return false;
84  return true;
85  }
86 
88  unsigned int num_children() const {return nchildren_;};
90  SafePtr<TargetType> target() const {return target_;};
92  SafePtr<ChildType> child(unsigned int i) const;
94  SafePtr<DGVertex> rr_target() const {return static_pointer_cast<DGVertex,TargetType>(target());}
96  SafePtr<DGVertex> rr_child(unsigned int i) const {return static_pointer_cast<DGVertex,ChildType>(child(i));}
98  bool is_simple() const {
100  }
102  std::string spfunction_call(const SafePtr<CodeContext>& context,
103  const SafePtr<ImplicitDimensions>& dims) const;
104 
105  private:
111  HRR(const SafePtr<TargetType>&, unsigned int dir);
112 
113  unsigned int dir_;
114  SafePtr<TargetType> target_;
115  static const unsigned int max_nchildren_ = 8;
116  SafePtr<ChildType> children_[max_nchildren_];
117  unsigned int nchildren_;
118 
119  void oper_checks() const;
120 
122  std::string generate_label() const;
124  SafePtr<ImplicitDimensions> adapt_dims_(const SafePtr<ImplicitDimensions>& dims) const;
126  bool register_with_rrstack() const;
131  bool expl_high_dim() const;
132  bool expl_low_dim() const;
133  };
134 
135  template <class IntType, class F, int part,
136  FunctionPosition loc_a, unsigned int pos_a,
137  FunctionPosition loc_b, unsigned int pos_b>
138  SafePtr< HRR<IntType,F,part,loc_a,pos_a,loc_b,pos_b> >
139  HRR<IntType,F,part,loc_a,pos_a,loc_b,pos_b>::Instance(const SafePtr<TargetType>& Tint, unsigned int dir)
140  {
141  SafePtr<ThisType> this_ptr(new ThisType(Tint,dir));
142  // Do post-construction duties
143  if (this_ptr->num_children() != 0) {
144  this_ptr->register_with_rrstack();
145  return this_ptr;
146  }
147  return SafePtr<ThisType>();
148  }
149 
150  template <class IntType, class F, int part,
151  FunctionPosition loc_a, unsigned int pos_a,
152  FunctionPosition loc_b, unsigned int pos_b>
153  HRR<IntType,F,part,loc_a,pos_a,loc_b,pos_b>::HRR(const SafePtr<TargetType>& Tint, unsigned int dir) :
154  dir_(dir), target_(Tint), nchildren_(0)
155  {
156  using namespace libint2::algebra;
157  using namespace libint2::prefactor;
158 
159  // assume that always transfering from Bra to Ket and vice versa
160  assert(loc_a != loc_b);
161 
162  target_ = Tint;
163  const typename IntType::AuxQuantaType& aux = Tint->aux();
164  const typename IntType::OperType& oper = Tint->oper();
165 
166  // can move across operator only if it's multiplicative
167  if (loc_a != loc_b && oper.hermitian(part) != +1) {
168  return;
169  }
170 
171  typedef typename IntType::BraType IBraType;
172  typedef typename IntType::KetType IKetType;
173  IBraType* bra = new IBraType(Tint->bra());
174  IKetType* ket = new IKetType(Tint->ket());
175 
176  //
177  // InBra and InKet cases have to be treated explicitly since BraType and KetType don't have to match
178  //
179  if (loc_a == InKet && loc_b == InBra) {
180  F a(ket->member(part,pos_a));
181  F b(bra->member(part,pos_b));
182 
183  // See if b-1 exists
184  F bm1(b); bm1.dec(dir_);
185  if (!exists(bm1)) {
186  delete bra;
187  delete ket;
188  return;
189  }
190  bra->set_member(bm1,part,pos_b); // set b permanently to b-1_i
191 
192  {
193  F ap1(a); ap1.inc(dir_);
194  ket->set_member(ap1,part,pos_a);
195  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
196  ket->set_member(a,part,pos_a);
197  }
198 
199  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
200 
201  if (!is_simple()) { // treatment of derivative terms differs for shell sets and integrals
202  // since in computing shell sets transfer/build will occur in all 3 directions
203  // change in up to all three derivative indices will occur
204 
205  for(unsigned int xyz=0; xyz<3; ++xyz) {
206  // is a differentiated in this direction? add another term
207  if (a.deriv().d(xyz) > 0) {
208  F a_der_m1(a);
209  a_der_m1.deriv().dec(xyz);
210  ket->set_member(a_der_m1,part,pos_a);
211  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
212  ket->set_member(a,part,pos_a);
213  }
214  // is b differentiated in this direction? add another term
215  if (bm1.deriv().d(xyz) > 0) {
216  F bm1_der_m1(bm1);
217  bm1_der_m1.deriv().dec(xyz);
218  bra->set_member(bm1_der_m1,part,pos_b);
219  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
220  bra->set_member(bm1,part,pos_b);
221  }
222  }
223  }
224 
225  if (is_simple()) {
226  // ( b | a ) = ( b-1_i | a+1_i ) - AB_i ( b-1_i | a ) = ( b-1_i | a+1_i ) + BA_i ( b-1_i | a )
227  // the latter is amenable to generate fmadd instruction
228  expr_ = children_[0] + prefactors.Y_X[part][dir] * children_[1];
229 
230  // is a differentiated in this direction? add another term
231  const bool aderiv = a.deriv().d(dir_) > 0;
232  if (aderiv) {
233  F a_der_m1(a);
234  a_der_m1.deriv().dec(dir_);
235  ket->set_member(a_der_m1,part,pos_a);
236  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
237  ket->set_member(a,part,pos_a);
238  }
239 
240  // is b differentiated in this direction? add another term
241  const bool bderiv = bm1.deriv().d(dir_) > 0;
242  if (bderiv) {
243  F bm1_der_m1(bm1);
244  bm1_der_m1.deriv().dec(dir_);
245  bra->set_member(bm1_der_m1,part,pos_b);
246  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
247  bra->set_member(bm1,part,pos_b);
248  }
249 
250  if (aderiv)
251  expr_ += Vector(a.deriv())[dir_] * children_[2];
252  if (bderiv)
253  expr_ -= Vector(b.deriv())[dir_] * children_[aderiv ? 3 : 2];
254  }
255  } // a in ket, b in bra
256 
257  if (loc_a == InBra && loc_b == InKet) {
258  F a(bra->member(part,pos_a));
259  F b(ket->member(part,pos_b));
260 
261  // See if b-1 exists
262  F bm1(b); bm1.dec(dir_);
263  if (!exists(bm1)) {
264  delete bra;
265  delete ket;
266  return;
267  }
268  ket->set_member(bm1,part,pos_b); // set b permanently to b-1_i
269 
270  {
271  F ap1(a); ap1.inc(dir_);
272  bra->set_member(ap1,part,pos_a);
273  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
274  bra->set_member(a,part,pos_a);
275  }
276 
277  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
278 
279  if (!is_simple()) { // treatment of derivative terms differs for shell sets and integrals
280  // since in computing shell sets transfer/build will occur in all 3 directions
281  // change in up to all three derivative indices will occur
282 
283  for(unsigned int xyz=0; xyz<3; ++xyz) {
284  // is a differentiated in this direction? add another term
285  if (a.deriv().d(xyz) > 0) {
286  F a_der_m1(a);
287  a_der_m1.deriv().dec(xyz);
288  bra->set_member(a_der_m1,part,pos_a);
289  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
290  bra->set_member(a,part,pos_a);
291  }
292  // is b differentiated in this direction? add another term
293  if (bm1.deriv().d(xyz) > 0) {
294  F bm1_der_m1(bm1);
295  bm1_der_m1.deriv().dec(xyz);
296  ket->set_member(bm1_der_m1,part,pos_b);
297  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
298  ket->set_member(bm1,part,pos_b);
299  }
300  }
301  }
302 
303  if (is_simple()) {
304  // ( a | b) = ( a+1_i | b-1_i ) + AB_i ( a | b-1_i )
305  expr_ = children_[0] + prefactors.X_Y[part][dir] * children_[1];
306 
307  // is a differentiated in this direction? add another term
308  const bool aderiv = a.deriv().d(dir_) > 0;
309  if (aderiv) {
310  F a_der_m1(a);
311  a_der_m1.deriv().dec(dir_);
312  bra->set_member(a_der_m1,part,pos_a);
313  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
314  bra->set_member(a,part,pos_a);
315  }
316 
317  // is b differentiated in this direction? add another term
318  const bool bderiv = bm1.deriv().d(dir_) > 0;
319  if (bderiv) {
320  F bm1_der_m1(bm1);
321  bm1_der_m1.deriv().dec(dir_);
322  ket->set_member(bm1_der_m1,part,pos_b);
323  children_[nchildren_++] = IntType::Instance(*bra,*ket,aux,oper);
324  ket->set_member(bm1,part,pos_b);
325  }
326 
327  if (aderiv)
328  expr_ += Vector(a.deriv())[dir_] * children_[2];
329  if (bderiv)
330  expr_ -= Vector(b.deriv())[dir_] * children_[aderiv ? 3 : 2];
331  }
332 
333  } // a in bra, b in ket
334 
335  delete bra;
336  delete ket;
337  }
338 
339  template <class IntType, class F, int part,
340  FunctionPosition loc_a, unsigned int pos_a,
341  FunctionPosition loc_b, unsigned int pos_b>
342  bool
344  {
345  // This is an ugly hack -- add HRR's to the RRStack preemptively for targets in which all functions not involved
346  // in transfer have zero quanta. The reason is that for the HRR quartet level code to work correctly
347  // I must use these particular instances of HRR to generate the source.
348 
349  // only register RRs with for shell sets
351  return false;
352  typedef typename IntType::BraType IBraType;
353  typedef typename IntType::KetType IKetType;
354  const IBraType& bra = target_->bra();
355  const IKetType& ket = target_->ket();
356 
357  //check for nonzero quanta for all particles other than part
358  bool nonzero_quanta = false;
359  unsigned const int npart = IntType::OperatorType::Properties::np;
360  for(unsigned int p=0; p<npart; p++) {
361  if (p == part)
362  continue;
363  int nfbra = bra.num_members(p);
364  assert(nfbra == 1);
365  for(int f=0; f<nfbra; f++)
366  if (!bra.member(p,f).zero() || !bra.member(p,f).deriv().zero())
367  nonzero_quanta = true;
368  int nfket = ket.num_members(p);
369  assert(nfket == 1);
370  for(int f=0; f<nfket; f++)
371  if (!ket.member(p,f).zero() || !ket.member(p,f).deriv().zero())
372  nonzero_quanta = true;
373  }
374  // if all bfsets not involved in transfer have zero quanta then this instance needs to be added to the stack
375  if (!nonzero_quanta) {
376  SafePtr<RRStack> rrstack = RRStack::Instance();
377  SafePtr<ThisType> this_ptr =
378  const_pointer_cast<ThisType,const ThisType>(
379  static_pointer_cast<const ThisType, const ParentType>(
380  EnableSafePtrFromThis<ParentType>::SafePtr_from_this()
381  )
382  );
383  rrstack->find(this_ptr);
384  return true;
385  }
386 
387  //
388  // else create the needed instance of HRR
389  //
390 
391  // zero out unneeded bfs'
392  IBraType bra_zero(bra);
393  IKetType ket_zero(ket);
394  for(unsigned int p=0; p<npart; p++) {
395  if (p == part)
396  continue;
397  int nfbra = bra_zero.num_members(p);
398  for(int f=0; f<nfbra; f++) {
399  typedef typename IBraType::bfs_type bfs_type;
400  typedef typename IBraType::bfs_ref bfs_ref;
401  bfs_ref bfs = bra_zero.member(p,f);
402  if (!bfs.zero() || !bfs.deriv().zero()) {
403  bfs_type null_bfs;
404  swap(bfs,null_bfs);
405  }
406  }
407  int nfket = ket_zero.num_members(p);
408  for(int f=0; f<nfket; f++) {
409  typedef typename IKetType::bfs_type bfs_type;
410  typedef typename IKetType::bfs_ref bfs_ref;
411  bfs_ref bfs = ket_zero.member(p,f);
412  if (!bfs.zero() || !bfs.deriv().zero()) {
413  bfs_type null_bfs;
414  swap(bfs,null_bfs);
415  }
416  }
417  }
418 
419  // create a generic GenIntegralSet over a multiplicative operator
421  typedef typename IBraType::bfs_type bfs_type;
422  typedef EmptySet DummyQuanta;
424  DummyOper dummy_oper;
425  DummyQuanta dummy_quanta(std::vector<int>(0,0));
426  SafePtr<DummyIntegral> dummy_integral = DummyIntegral::Instance(bra_zero,ket_zero,dummy_quanta,dummy_oper);
427 
428  // Construct generic HRR and add it to the stack instead of this HRR
430  SafePtr<DummyHRR> dummy_hrr = DummyHRR::Instance(dummy_integral,dir_);
431  SafePtr<RRStack> rrstack = RRStack::Instance();
432  rrstack->find(dummy_hrr);
433  return true;
434  }
435 
436  template <class IntType, class F, int part,
437  FunctionPosition loc_a, unsigned int pos_a,
438  FunctionPosition loc_b, unsigned int pos_b>
440  {
441  oper_checks();
442  }
443 
444  template <class IntType, class F, int part,
445  FunctionPosition loc_a, unsigned int pos_a,
446  FunctionPosition loc_b, unsigned int pos_b>
447  void
449  {
450  //
451  // Here we check basic HRR applicability requirements on the integral class
452  //
453 
454 #if CHECK_SAFETY
455  // part is within the range
456  typedef typename IntType::OperatorType Oper;
457  if (part < 0 || part >= Oper::Properties::np) {
458  assert(false);
459  }
460 
461  // Cannot apply when a and b are the same
462  if (loc_a == loc_b && pos_a == pos_b) {
463  assert(false);
464  }
465 #endif
466  }
467 
468  template <class IntType, class F, int part,
469  FunctionPosition loc_a, unsigned int pos_a,
470  FunctionPosition loc_b, unsigned int pos_b>
471  SafePtr<typename HRR<IntType,F,part,loc_a,pos_a,loc_b,pos_b>::ChildType>
473  {
474  assert(i>=0 && i<nchildren_);
475 
476  unsigned int nc=0;
477  for(unsigned int c=0; c<max_nchildren_; c++) {
478  if (children_[c]) {
479  if (nc == i)
480  return children_[c];
481  nc++;
482  }
483  }
484  abort(); // unreachable
485  }
486 
487  template <class IntType, class F, int part,
488  FunctionPosition loc_a, unsigned int pos_a,
489  FunctionPosition loc_b, unsigned int pos_b>
490  std::string
492  {
493  ostringstream os;
494 
495  os << "HRR Part " << part << " "
496  << (loc_a == InBra ? "bra" : "ket") << " " << pos_a << " "
497  << (loc_b == InBra ? "bra" : "ket") << " " << pos_b << " ";
498 
499  if (loc_a == InBra) {
500  F sh_a(target_->bra(part,pos_a));
501  // HRR works for contracted and uncontracted non-differentiated functions
502  // thus only need to create the uncontracted instances
503  sh_a.uncontract();
504  os << sh_a.label() << " ";
505 
506  if (loc_b == InBra) {
507  F sh_b(target_->bra(part,pos_b));
508  sh_b.uncontract();
509  os << sh_b.label();
510  }
511  else {
512  F sh_b(target_->ket(part,pos_b));
513  sh_b.uncontract();
514  os << sh_b.label();
515  }
516  }
517  else {
518  F sh_a(target_->ket(part,pos_a));
519  sh_a.uncontract();
520  os << sh_a.label() << " ";
521 
522  if (loc_b == InBra) {
523  F sh_b(target_->bra(part,pos_b));
524  sh_b.uncontract();
525  os << sh_b.label();
526  }
527  else {
528  F sh_b(target_->ket(part,pos_b));
529  sh_b.uncontract();
530  os << sh_b.label();
531  }
532  }
533 
534  return os.str();
535  }
536 
537  template <class IntType, class F, int part,
538  FunctionPosition loc_a, unsigned int pos_a,
539  FunctionPosition loc_b, unsigned int pos_b>
540  std::string
542  const SafePtr<CodeContext>& context, const SafePtr<ImplicitDimensions>& dims) const
543  {
544  ostringstream os;
545  os << context->label_to_name(label_to_funcname(context->cparams()->api_prefix() + label()))
546  // First argument is the library object
547  << "(inteval, "
548  // Second is the target
549  << context->value_to_pointer(rr_target()->symbol());
550  // then come children
551  const unsigned int nchildren = num_children();
552  for(unsigned int c=0; c<nchildren; c++) {
553  os << ", " << context->value_to_pointer(rr_child(c)->symbol());
554  }
555  // then dimensions of basis function sets not involved in the transfer
556  unsigned int hsr = 1;
557  // a cleaner way to count the number of function sets referring
558  // to some particles is to construct a dummy integral and
559  // use subiterator policy
560  // WARNING !!!
561  for(int p=0; p<part; p++) {
562  unsigned int nbra = target_->bra().num_members(p);
563  for(unsigned int i=0; i<nbra; i++) {
564  SubIterator* iter = target_->bra().member_subiter(p,i);
565  hsr *= iter->num_iter();
566  delete iter;
567  }
568  unsigned int nket = target_->ket().num_members(p);
569  for(unsigned int i=0; i<nket; i++) {
570  SubIterator* iter = target_->ket().member_subiter(p,i);
571  hsr *= iter->num_iter();
572  delete iter;
573  }
574  }
575  // Use TaskParameters to keep track of maximum hsr
576  LibraryTaskManager& taskmgr = LibraryTaskManager::Instance();
577  taskmgr.current().params()->max_hrr_hsrank(hsr);
578 
579  // can only do a simple bra->ket or ket->bra transfer so far
580  //unsigned int isr = 1;
581  if (loc_a == loc_b && pos_a != 0 && pos_b != 0)
582  throw CodeDoesNotExist("HRR::spfunction_call -- has not been generalized yet");
583 
585  unsigned int lsr = 1;
586  unsigned int np = IntType::OperType::Properties::np;
587  for(unsigned int p=part+1; p<np; p++) {
588  unsigned int nbra = target_->bra().num_members(p);
589  for(unsigned int i=0; i<nbra; i++) {
590  SubIterator* iter = target_->bra().member_subiter(p,i);
591  lsr *= iter->num_iter();
592  delete iter;
593  }
594  unsigned int nket = target_->ket().num_members(p);
595  for(unsigned int i=0; i<nket; i++) {
596  SubIterator* iter = target_->ket().member_subiter(p,i);
597  lsr *= iter->num_iter();
598  delete iter;
599  }
600  }
601  // Use TaskParameters to keep track of maximum hsr
602  taskmgr.current().params()->max_hrr_hsrank(hsr);
603 
604  if (expl_high_dim())
605  os << "," << hsr;
606  if (expl_low_dim())
607  os << "," << lsr;
608  os << ")" << context->end_of_stat() << endl;
609  return os.str();
610  }
611 
612  template <class IntType, class F, int part,
613  FunctionPosition loc_a, unsigned int pos_a,
614  FunctionPosition loc_b, unsigned int pos_b>
615  bool
617  {
618  bool high = true;
619  if (part == 0)
620  high = false;
621  return high;
622  }
623 
624  template <class IntType, class F, int part,
625  FunctionPosition loc_a, unsigned int pos_a,
626  FunctionPosition loc_b, unsigned int pos_b>
627  bool
629  {
630  unsigned int np = IntType::OperType::Properties::np;
631  bool low = true;
632  if (part == np - 1)
633  low = false;
634  // corner case: # of particles == 1
635  if (np == 1) { // to match the interface of np != 1 need to add insert dummy argument
636  low = true;
637  }
638  return low;
639  }
640 
641  template <class IntType, class F, int part,
642  FunctionPosition loc_a, unsigned int pos_a,
643  FunctionPosition loc_b, unsigned int pos_b>
644  SafePtr<ImplicitDimensions>
645  HRR<IntType,F,part,loc_a,pos_a,loc_b,pos_b>::adapt_dims_(const SafePtr<ImplicitDimensions>& dims) const
646  {
647  bool high_rank = expl_high_dim();
648  bool low_rank = expl_low_dim();
649 
650  SafePtr<Entity> high_dim, low_dim;
651  if (high_rank) {
652  high_dim = SafePtr<Entity>(new RTimeEntity<EntityTypes::Int>("highdim"));
653  }
654  else {
655  high_dim = dims->high();
656  }
657  if (low_rank) {
658  low_dim = SafePtr<Entity>(new RTimeEntity<EntityTypes::Int>("lowdim"));
659  }
660  else {
661  low_dim = dims->low();
662  }
663 
664  SafePtr<ImplicitDimensions> localdims(new ImplicitDimensions(high_dim,low_dim,dims->vecdim()));
665  return localdims;
666  }
667 
668  };
669 
670 #endif
SafePtr< DGVertex > rr_child(unsigned int i) const
Implementation of RecurrenceRelation::child()
Definition: hrr.h:96
std::string label_to_funcname(const std::string &label)
Converts a label, e.g. name of the target node, to the name of the function to compute it...
Definition: default_params.cc:215
Manages tasks. This is a Singleton.
Definition: task.h:62
TrivialBFSet<T> defines static member result, which is true if T is a basis function set consisting o...
Definition: bfset.h:879
SafePtr< rdouble > Y_X[np][3]
Cartesian components of Y_X vectors.
Definition: prefactors.h:65
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
GenIntegralSet is a set of integrals over functions derived from BFS.
Definition: integral.h:89
Definition: stdarray.h:18
Definition: prefactors.h:159
GenOper is a single operator described by descriptor Descr.
Definition: oper.h:152
This is a vertex of a Directed Graph (DG)
Definition: dgvertex.h:42
void current(const std::string &task_label)
Makes this task current (must have been added already)
Definition: task.cc:64
RecurrenceRelation::ExprType ExprType
A short alias.
Definition: hrr.h:66
QuantumNumbersA<T,N> is a set of N quantum numbers of type T implemented in terms of a C-style array...
Definition: quanta.h:198
RTimeEntity is an Entity of type T that exists at runtime of the generated code (hence has no value k...
Definition: entity.h:99
bool is_simple() const
Implementation of RecurrenceRelation::is_simple()
Definition: hrr.h:98
AlgebraicOperator is an algebraic operator that acts on objects of type T.
Definition: algebra.h:47
Definition: algebra.h:32
Oper is OperSet characterized by properties Props.
Definition: oper.h:82
SafePtr< DGVertex > rr_target() const
Implementation of RecurrenceRelation::target()
Definition: hrr.h:94
ImplicitDimensions describes basis functions or other "degrees of freedom" not actively engaged in a ...
Definition: dims.h:43
bool exists(const IncableBFSet &A)
Return true if A is valid.
Definition: bfset.h:91
Iterator provides a base class for all object iterator classes.
Definition: iter.h:44
RecurrenceRelation describes all recurrence relations.
Definition: rr.h:100
Set of basis functions.
Definition: bfset.h:41
virtual unsigned int num_iter() const =0
Returns a number of iterations (number of elements in a set over which to iterate).
const std::string & label() const
label() returns a unique, short, descriptive label of this RR (e.g.
Definition: rr.cc:290
unsigned int num_children() const
Implementation of RecurrenceRelation::num_children()
Definition: hrr.h:88
static bool directional()
is this recurrence relation parameterized by a direction.
Definition: hrr.h:81
A generic Horizontal Recurrence Relation:
Definition: hrr.h:57
SafePtr< rdouble > X_Y[np][3]
Cartesian components of X-Y vectors.
Definition: prefactors.h:57
SafePtr< TargetType > target() const
returns pointer to the target
Definition: hrr.h:90
This exception used to indicate that some code hasn&#39;t been developed or generalized yet...
Definition: exception.h:86