示例#1
0
 // ctor
 cyclic(
   const rng_t &i, const rng_t &j, int hlo
 ) :
   left_halo(i.first()-hlo, i.first()-1),
   rght_edge(i.last()-hlo+1, i.last()  ),
   rght_halo(i.last()+1, i.last()+hlo  ),
   left_edge(i.first(), i.first()+hlo-1)
 {} 
示例#2
0
      void fill_halos_vctr_nrml(const arr_t &a, const rng_t &j)
      {
	using namespace idxperm;
        for (int i = 0; i < halo; ++i)
        { 
          for (int jj = j.first(); jj <= j.last(); jj++)
          {
            a(pi<d>(this->left_halo_sclr.first() + i,
                    jj + h)) 
            =
            a(pi<d>(this->left_intr_vctr.last() - i,
                    this->polar_neighbours(jj) + h));
              
          }
        }
      }
示例#3
0
      // method invoked by the solver
      void fill_halos_sclr(const arr_t &a, const rng_t &j, const bool deriv = false)
      {
	using namespace idxperm;
        for (int i = 0; i < halo; ++i)
        { 
          for (int jj = j.first(); jj <= j.last(); jj++)
          {
            a(pi<d>(this->left_halo_sclr.last() - i,
                    jj)) 
            =
            a(pi<d>(this->left_edge_sclr + i,
                    this->polar_neighbours(jj)));
              
          }
        }
      }
示例#4
0
      // ctor
      bcond_t(const rng_t &i, const int halo) :
        halo(halo),
        // sclr
	left_edge_sclr(
          i.first()
        ),
	rght_edge_sclr(
          i.last()
        ),
	left_halo_sclr(
          (i^halo).first(), 
          (i^halo).first() + halo - 1
        ),
	rght_halo_sclr(
          (i^halo).last() - (halo - 1), 
          (i^halo).last()
        ),
	left_intr_sclr(
          (i^(-1)).first(), 
          (i^(-1)).first() + halo - 1
        ),
	rght_intr_sclr(
          (i^(-1)).last() - (halo - 1), 
          (i^(-1)).last()
        ),
        // vctr
        left_halo_vctr(
          (i^h^(halo-1)).first(), 
          (i^h^(halo-1)).first() + halo - 1
        ),
        rght_halo_vctr(
          (i^h^(halo-1)).last() - (halo - 1), 
          (i^h^(halo-1)).last()
        ),
        left_intr_vctr(
          (i^h^(-1)).first(),
          (i^h^(-1)).first() + halo - 1
        ),
        rght_intr_vctr(
          (i^h^(-1)).last() - (halo - 1), 
          (i^h^(-1)).last()
        )
      {}