/[escript]/trunk/ripley/src/Brick.h
ViewVC logotype

Diff of /trunk/ripley/src/Brick.h

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

revision 4334 by caltinay, Thu Mar 21 06:00:14 2013 UTC revision 4340 by caltinay, Fri Mar 22 04:38:36 2013 UTC
# Line 161  public: Line 161  public:
161      */      */
162      virtual double getLocalCoordinate(int index, int dim) const;      virtual double getLocalCoordinate(int index, int dim) const;
163    
164        /**
165           \brief
166           returns the tuple (origin, spacing, number_of_elements)
167        */
168        virtual boost::python::tuple getGridParameters() const;
169    
170  protected:  protected:
171      virtual dim_t getNumNodes() const;      virtual dim_t getNumNodes() const;
172      virtual dim_t getNumElements() const;      virtual dim_t getNumElements() const;
# Line 169  protected: Line 175  protected:
175      virtual dim_t insertNeighbourNodes(IndexVector& index, index_t node) const;      virtual dim_t insertNeighbourNodes(IndexVector& index, index_t node) const;
176      virtual void assembleCoordinates(escript::Data& arg) const;      virtual void assembleCoordinates(escript::Data& arg) const;
177      virtual void assembleGradient(escript::Data& out, escript::Data& in) const;      virtual void assembleGradient(escript::Data& out, escript::Data& in) const;
178      virtual void assembleIntegrate(std::vector<double>& integrals, escript::Data& arg) const;      virtual void assembleIntegrate(DoubleVector& integrals, escript::Data& arg) const;
179      virtual void assemblePDESingle(Paso_SystemMatrix* mat, escript::Data& rhs,      virtual void assemblePDESingle(Paso_SystemMatrix* mat, escript::Data& rhs,
180              const escript::Data& A, const escript::Data& B,              const escript::Data& A, const escript::Data& B,
181              const escript::Data& C, const escript::Data& D,              const escript::Data& C, const escript::Data& D,
# Line 210  private: Line 216  private:
216      void populateSampleIds();      void populateSampleIds();
217      void createPattern();      void createPattern();
218      void addToMatrixAndRHS(Paso_SystemMatrix* S, escript::Data& F,      void addToMatrixAndRHS(Paso_SystemMatrix* S, escript::Data& F,
219             const std::vector<double>& EM_S, const std::vector<double>& EM_F,             const DoubleVector& EM_S, const DoubleVector& EM_F,
220             bool addS, bool addF, index_t firstNode, dim_t nEq=1, dim_t nComp=1) const;             bool addS, bool addF, index_t firstNode, dim_t nEq=1, dim_t nComp=1) const;
221    
222    
# Line 278  inline int Brick::getNumDataPointsGlobal Line 284  inline int Brick::getNumDataPointsGlobal
284    
285  inline double Brick::getLocalCoordinate(int index, int dim) const  inline double Brick::getLocalCoordinate(int index, int dim) const
286  {  {
287      EsysAssert((dim>=0 && dim<=2), "'dim' out of bounds");      EsysAssert((dim>=0 && dim<3), "'dim' out of bounds");
288      EsysAssert((index>=0 && index<m_NN[dim]), "'index' out of bounds");      EsysAssert((index>=0 && index<m_NN[dim]), "'index' out of bounds");
289      return m_origin[dim]+m_dx[dim]*(m_offset[dim]+index);      return m_origin[dim]+m_dx[dim]*(m_offset[dim]+index);
290  }  }
291    
292    inline boost::python::tuple Brick::getGridParameters() const
293    {
294        return boost::python::make_tuple(
295                boost::python::make_tuple(m_origin[0], m_origin[1], m_origin[2]),
296                boost::python::make_tuple(m_dx[0], m_dx[1], m_dx[2]),
297                boost::python::make_tuple(m_gNE[0], m_gNE[1], m_gNE[2]));
298    }
299    
300  inline Paso_SystemMatrixPattern* Brick::getPattern(bool reducedRowOrder,  inline Paso_SystemMatrixPattern* Brick::getPattern(bool reducedRowOrder,
301                                                     bool reducedColOrder) const                                                     bool reducedColOrder) const
302  {  {

Legend:
Removed from v.4334  
changed lines
  Added in v.4340

  ViewVC Help
Powered by ViewVC 1.1.26