Beispiel #1
0
        virtual void restrict(shared_ptr<ISweeper<time>> dst,
                              shared_ptr<const ISweeper<time>> src,
                              bool restrict_initial) override
        {
          auto& crse = pfasst::encap::as_encap_sweeper(dst);
          auto& fine = pfasst::encap::as_encap_sweeper(src);

          auto const crse_nodes = crse.get_nodes();
          auto const fine_nodes = fine.get_nodes();
          auto const num_crse = crse_nodes.size();
          auto const num_fine = fine_nodes.size();

          if (restrict_initial) {
            this->restrict_initial(dst, src);
          }

          int trat = (int(num_fine) - 1) / (int(num_crse) - 1);

          for (size_t m = 0; m < num_crse; m++) {
            if (crse_nodes[m] != fine_nodes[m * trat]) {
              throw NotImplementedYet("coarse nodes must be nested");
            }
            this->restrict(crse.get_state(m), fine.get_state(m * trat));
          }

          crse.reevaluate();
        }
Beispiel #2
0
      virtual void restrict(ISweeper *DST, const ISweeper *SRC) {
	auto* dst = dynamic_cast<EncapsulatedSweeperMixin<scalar>*>(DST);
	auto* src = dynamic_cast<const EncapsulatedSweeperMixin<scalar>*>(SRC);

	auto dnodes = dst->get_nodes();
	auto snodes = src->get_nodes();

	int ndst = dst->get_nodes().size();
	int nsrc = src->get_nodes().size();

	int trat = (nsrc - 1) / (ndst - 1);

	for (int m=0; m<ndst; m++) {
	  if (dnodes[m] != snodes[m*trat])
	    throw NotImplementedYet("coarse nodes must be nested");
	  this->restrict(dst->get_q(m), src->get_q(m*trat));
	}

	for (int m=0; m<ndst; m++) dst->evaluate(m);
      }
Beispiel #3
0
 virtual void interpolate(shared_ptr<Encapsulation<time>> dst,
                          shared_ptr<const Encapsulation<time>> src)
 {
   UNUSED(dst); UNUSED(src);
   throw NotImplementedYet("mlsdc/pfasst");
 }
Beispiel #4
0
      virtual void evaluate(int m) {
	throw NotImplementedYet("sweeper");
      }
Beispiel #5
0
      virtual Encapsulation<scalar>* get_pq(unsigned int m) const {
	throw NotImplementedYet("sweeper");
	return NULL;
      }
Beispiel #6
0
      virtual void set_q(const Encapsulation<scalar>* q0, unsigned int m) {
	throw NotImplementedYet("sweeper");
      }
Beispiel #7
0
      virtual void mat_apply(vector<Encapsulation<scalar>*> dst, scalar a, matrix<scalar> m,
			     vector<Encapsulation<scalar>*> src, bool zero=true) {
        throw NotImplementedYet("encap");
      }
Beispiel #8
0
      virtual void saxpy(scalar a, const Encapsulation<scalar> *) {
	throw NotImplementedYet("encap");
      }
Beispiel #9
0
      // required for host based encap helpers
      virtual void setval(scalar) {
	throw NotImplementedYet("encap");
      }
Beispiel #10
0
      virtual void recv() {
	throw NotImplementedYet("pfasst");
      }
Beispiel #11
0
      // required for time-parallel communications
      virtual void send() {
	throw NotImplementedYet("pfasst");
      }
Beispiel #12
0
      virtual void restrict(Encapsulation<scalar> *dst, const Encapsulation<scalar> *src) {
	throw NotImplementedYet("mlsdc/pfasst");
      }
Beispiel #13
0
 LevelIter cycle_top(LevelIter leviter, double t, double dt)
 {
   throw NotImplementedYet("cycle_top");
   return leviter;
 }
Beispiel #14
0
 void PolyInterpMixin<time>::restrict(shared_ptr<Encapsulation<time>> dst,
                                      shared_ptr<const Encapsulation<time>> src)
 {
   UNUSED(dst); UNUSED(src);
   throw NotImplementedYet("mlsdc/pfasst");
 }