/[escript]/branches/refine/buckley/src/BuckleyDomain.cc
ViewVC logotype

Diff of /branches/refine/buckley/src/BuckleyDomain.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3898 by jfenwick, Wed May 16 05:17:14 2012 UTC revision 3899 by jfenwick, Thu May 17 01:29:08 2012 UTC
# Line 524  bool BuckleyDomain::canTag(int functions Line 524  bool BuckleyDomain::canTag(int functions
524      }      }
525  }  }
526    
527    // Note that Buckley uses the order +x, -x, +y, -y, +z, -z
528    // for everything whereas the standard tags(in numeric order) are
529    // left, right, front, back ,bottom, top  === -x, +x, +y, -y, -z, +z
530  int BuckleyDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const  int BuckleyDomain::getTagFromSampleNo(int functionSpaceType, int sampleNo) const
531  {  {
532      if ((functionSpaceType==disc_faces) || (functionSpaceType==red_disc_faces))      if ((functionSpaceType==disc_faces) || (functionSpaceType==red_disc_faces))
# Line 531  int BuckleyDomain::getTagFromSampleNo(in Line 534  int BuckleyDomain::getTagFromSampleNo(in
534          // now we check which of the faces that sample lies on            // now we check which of the faces that sample lies on  
535      // left, right, front, back, bottom, top      // left, right, front, back, bottom, top
536      if (sampleNo<0) return 0;      if (sampleNo<0) return 0;
537      if (sampleNo<face_cells[0].size()) return 1;      int bound=face_cells[0].size();
538      if (sampleNo<face_cells[1].size()) return 2;      if (sampleNo<bound) return 2;
539      if (sampleNo<face_cells[2].size()) return 10;      bound+=face_cells[1].size();
540      if (sampleNo<face_cells[3].size()) return 20;      if (sampleNo<bound) return 1;
541      if (sampleNo<face_cells[4].size()) return 100;      bound+=face_cells[2].size();
542      if (sampleNo<face_cells[5].size()) return 200;      if (sampleNo<bound) return 20;
543        bound+=face_cells[3].size();
544        if (sampleNo<bound) return 10;
545        bound+=face_cells[4].size();
546        if (sampleNo<bound) return 100;
547        bound+=face_cells[5].size();
548        if (sampleNo<bound) return 200;
549      return 0;      return 0;
550      }      }
551      throw BuckleyException("FunctionSpace Not supported::getTagFromSampleNo");      throw BuckleyException("FunctionSpace Not supported::getTagFromSampleNo");

Legend:
Removed from v.3898  
changed lines
  Added in v.3899

  ViewVC Help
Powered by ViewVC 1.1.26