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

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

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

revision 3711 by caltinay, Tue Dec 6 00:24:43 2011 UTC revision 3756 by caltinay, Fri Jan 6 02:35:19 2012 UTC
# Line 16  Line 16 
16    
17  #include <ripley/RipleyDomain.h>  #include <ripley/RipleyDomain.h>
18    
19  struct Paso_Pattern;  struct Paso_Connector;
20    
21  namespace ripley {  namespace ripley {
22    
# Line 92  public: Line 92  public:
92    
93      /**      /**
94         \brief         \brief
95           copies the integrals of the function defined by arg into integrals.
96           arg has to be defined on this domain.
97        */
98        RIPLEY_DLL_API
99        virtual void setToIntegrals(std::vector<double>& integrals, const escript::Data& arg) const;
100    
101        /**
102           \brief
103           copies the surface normals at data points into out. The actual function
104           space to be considered is defined by out. out has to be defined on this
105           domain.
106        */
107        RIPLEY_DLL_API
108        virtual void setToNormal(escript::Data& out) const;
109    
110        /**
111           \brief
112         returns the number of data points summed across all MPI processes         returns the number of data points summed across all MPI processes
113      */      */
114      RIPLEY_DLL_API      RIPLEY_DLL_API
# Line 142  public: Line 159  public:
159      RIPLEY_DLL_API      RIPLEY_DLL_API
160      virtual std::pair<double,double> getFirstCoordAndSpacing(dim_t dim) const;      virtual std::pair<double,double> getFirstCoordAndSpacing(dim_t dim) const;
161    
     /**  
        \brief  
        adds a PDE onto the stiffness matrix mat and rhs  
     */  
     RIPLEY_DLL_API  
     virtual void addPDEToSystem(escript::AbstractSystemMatrix& mat,  
             escript::Data& rhs, const escript::Data& A, const escript::Data& B,  
             const escript::Data& C, const escript::Data& D,  
             const escript::Data& X, const escript::Data& Y,  
             const escript::Data& d, const escript::Data& y,  
             const escript::Data& d_contact, const escript::Data& y_contact,  
             const escript::Data& d_dirac, const escript::Data& y_dirac) const;  
   
162  protected:  protected:
163      virtual dim_t getNumNodes() const { return m_N0*m_N1; }      virtual dim_t getNumNodes() const { return m_N0*m_N1; }
164      virtual dim_t getNumElements() const { return m_NE0*m_NE1; }      virtual dim_t getNumElements() const { return m_NE0*m_NE1; }
165      virtual dim_t getNumFaceElements() const;      virtual dim_t getNumFaceElements() const;
166        virtual dim_t getNumDOF() const;
167        virtual dim_t insertNeighbourNodes(IndexVector& index, index_t node) const;
168      virtual void assembleCoordinates(escript::Data& arg) const;      virtual void assembleCoordinates(escript::Data& arg) const;
169        virtual void assemblePDESingle(Paso_SystemMatrix* mat, escript::Data& rhs,
170                const escript::Data& A, const escript::Data& B,
171                const escript::Data& C, const escript::Data& D,
172                const escript::Data& X, const escript::Data& Y,
173                const escript::Data& d, const escript::Data& y) const;
174        //virtual void assemblePDESystem(Paso_SystemMatrix* mat, escript::Data& rhs,
175        //        const escript::Data& A, const escript::Data& B,
176        //        const escript::Data& C, const escript::Data& D,
177        //        const escript::Data& X, const escript::Data& Y,
178        //        const escript::Data& d, const escript::Data& y) const;
179    
180      virtual Paso_SystemMatrixPattern* getPattern(bool reducedRowOrder, bool reducedColOrder) const;      virtual Paso_SystemMatrixPattern* getPattern(bool reducedRowOrder, bool reducedColOrder) const;
181      virtual void interpolateNodesOnElements(escript::Data& out,      virtual void interpolateNodesOnElements(escript::Data& out,
182                                         escript::Data& in, bool reduced) const;                                         escript::Data& in, bool reduced) const;
183      virtual void interpolateNodesOnFaces(escript::Data& out, escript::Data& in,      virtual void interpolateNodesOnFaces(escript::Data& out, escript::Data& in,
184                                           bool reduced) const;                                           bool reduced) const;
185        virtual void nodesToDOF(escript::Data& out, escript::Data& in) const;
186        virtual void dofToNodes(escript::Data& out, escript::Data& in) const;
187    
188  private:  private:
189      void populateSampleIds();      void populateSampleIds();
190      int insertNeighbours(IndexVector& index, index_t node) const;      void createPattern();
     void generateCouplePatterns(Paso_Pattern** colPattern,  
                                 Paso_Pattern** rowPattern) const;  
191    
192      /// total number of elements in each dimension      /// total number of elements in each dimension
193      dim_t m_gNE0, m_gNE1;      dim_t m_gNE0, m_gNE1;
# Line 195  private: Line 212  private:
212      IndexVector m_faceOffset;      IndexVector m_faceOffset;
213    
214      /// vector of sample reference identifiers      /// vector of sample reference identifiers
215        IndexVector m_dofId;
216      IndexVector m_nodeId;      IndexVector m_nodeId;
217      IndexVector m_elementId;      IndexVector m_elementId;
218      IndexVector m_faceId;      IndexVector m_faceId;
219    
220      // vector with first node id on each rank      // vector with first node id on each rank
221      IndexVector m_nodeDistribution;      IndexVector m_nodeDistribution;
222    
223        // vector that maps each node to a DOF index (used for the coupler)
224        IndexVector m_dofMap;
225    
226        // Paso connector used by the system matrix and to interpolate DOF to
227        // nodes
228        Paso_Connector* m_connector;
229    
230        // the Paso System Matrix pattern
231        Paso_SystemMatrixPattern* m_pattern;
232  };  };
233    
234  } // end of namespace ripley  } // end of namespace ripley

Legend:
Removed from v.3711  
changed lines
  Added in v.3756

  ViewVC Help
Powered by ViewVC 1.1.26