/[escript]/branches/diaplayground/ripley/src/Brick.cpp
ViewVC logotype

Diff of /branches/diaplayground/ripley/src/Brick.cpp

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

revision 4819 by caltinay, Tue Apr 1 03:50:23 2014 UTC revision 4851 by sshaw, Wed Apr 9 03:30:36 2014 UTC
# Line 63  Brick::Brick(int n0, int n1, int n2, dou Line 63  Brick::Brick(int n0, int n1, int n2, dou
63               const simap_t& tagnamestonums) :               const simap_t& tagnamestonums) :
64      RipleyDomain(3)      RipleyDomain(3)
65  {  {
66        if (n0 <= 0 || n1 <= 0 || n2 <= 0)
67            throw RipleyException("Number of elements in each spatial dimension "
68                    "must be positive");
69    
70      // ignore subdivision parameters for serial run      // ignore subdivision parameters for serial run
71      if (m_mpiInfo->size == 1) {      if (m_mpiInfo->size == 1) {
72          d0=1;          d0=1;
# Line 2642  void Brick::createPattern() Line 2646  void Brick::createPattern()
2646  }  }
2647    
2648  //private  //private
2649  void Brick::addToMatrixAndRHS(Paso_SystemMatrix* S, escript::Data& F,  void Brick::addToMatrixAndRHS(paso::SystemMatrix_ptr S, escript::Data& F,
2650           const vector<double>& EM_S, const vector<double>& EM_F, bool addS,           const vector<double>& EM_S, const vector<double>& EM_F, bool addS,
2651           bool addF, index_t firstNode, dim_t nEq, dim_t nComp) const           bool addF, index_t firstNode, dim_t nEq, dim_t nComp) const
2652  {  {
# Line 3326  int Brick::findNode(const double *coords Line 3330  int Brick::findNode(const double *coords
3330      double x = coords[0] - m_origin[0];      double x = coords[0] - m_origin[0];
3331      double y = coords[1] - m_origin[1];      double y = coords[1] - m_origin[1];
3332      double z = coords[2] - m_origin[2];      double z = coords[2] - m_origin[2];
3333        
3334        //check if the point is even inside the domain
3335        if (x < 0 || y < 0 || z < 0
3336                || x > m_length[0] || y > m_length[1] || z > m_length[2])
3337            return NOT_MINE;
3338            
3339      // distance in elements      // distance in elements
3340      int ex = (int) floor(x / m_dx[0]);      int ex = (int) floor(x / m_dx[0]);
3341      int ey = (int) floor(y / m_dx[1]);      int ey = (int) floor(y / m_dx[1]);

Legend:
Removed from v.4819  
changed lines
  Added in v.4851

  ViewVC Help
Powered by ViewVC 1.1.26