/[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 3762 by caltinay, Tue Jan 10 00:01:45 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           copies the size of samples into out. The actual function space to be
113           considered is defined by out. out has to be defined on this domain.
114        */
115        RIPLEY_DLL_API
116        virtual void setToSize(escript::Data& out) const;
117    
118        /**
119           \brief
120         returns the number of data points summed across all MPI processes         returns the number of data points summed across all MPI processes
121      */      */
122      RIPLEY_DLL_API      RIPLEY_DLL_API
# Line 142  public: Line 167  public:
167      RIPLEY_DLL_API      RIPLEY_DLL_API
168      virtual std::pair<double,double> getFirstCoordAndSpacing(dim_t dim) const;      virtual std::pair<double,double> getFirstCoordAndSpacing(dim_t dim) const;
169    
     /**  
        \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;  
   
170  protected:  protected:
171      virtual dim_t getNumNodes() const { return m_N0*m_N1; }      virtual dim_t getNumNodes() const { return m_N0*m_N1; }
172      virtual dim_t getNumElements() const { return m_NE0*m_NE1; }      virtual dim_t getNumElements() const { return m_NE0*m_NE1; }
173      virtual dim_t getNumFaceElements() const;      virtual dim_t getNumFaceElements() const;
174        virtual dim_t getNumDOF() const;
175        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 assemblePDESingle(Paso_SystemMatrix* mat, escript::Data& rhs,
178                const escript::Data& A, const escript::Data& B,
179                const escript::Data& C, const escript::Data& D,
180                const escript::Data& X, const escript::Data& Y,
181                const escript::Data& d, const escript::Data& y) const;
182        virtual void assemblePDESingleReduced(Paso_SystemMatrix* mat,
183                escript::Data& rhs, const escript::Data& A, const escript::Data& B,
184                const escript::Data& C, const escript::Data& D,
185                const escript::Data& X, const escript::Data& Y,
186                const escript::Data& d, const escript::Data& y) const;
187        virtual void assemblePDESystem(Paso_SystemMatrix* mat, escript::Data& rhs,
188                const escript::Data& A, const escript::Data& B,
189                const escript::Data& C, const escript::Data& D,
190                const escript::Data& X, const escript::Data& Y,
191                const escript::Data& d, const escript::Data& y) const;
192        virtual void assemblePDESystemReduced(Paso_SystemMatrix* mat,
193                escript::Data& rhs, const escript::Data& A, const escript::Data& B,
194                const escript::Data& C, const escript::Data& D,
195                const escript::Data& X, const escript::Data& Y,
196                const escript::Data& d, const escript::Data& y) const;
197    
198      virtual Paso_SystemMatrixPattern* getPattern(bool reducedRowOrder, bool reducedColOrder) const;      virtual Paso_SystemMatrixPattern* getPattern(bool reducedRowOrder, bool reducedColOrder) const;
199      virtual void interpolateNodesOnElements(escript::Data& out,      virtual void interpolateNodesOnElements(escript::Data& out,
200                                         escript::Data& in, bool reduced) const;                                         escript::Data& in, bool reduced) const;
201      virtual void interpolateNodesOnFaces(escript::Data& out, escript::Data& in,      virtual void interpolateNodesOnFaces(escript::Data& out, escript::Data& in,
202                                           bool reduced) const;                                           bool reduced) const;
203        virtual void nodesToDOF(escript::Data& out, escript::Data& in) const;
204        virtual void dofToNodes(escript::Data& out, escript::Data& in) const;
205    
206  private:  private:
207      void populateSampleIds();      void populateSampleIds();
208      int insertNeighbours(IndexVector& index, index_t node) const;      void createPattern();
     void generateCouplePatterns(Paso_Pattern** colPattern,  
                                 Paso_Pattern** rowPattern) const;  
209    
210      /// total number of elements in each dimension      /// total number of elements in each dimension
211      dim_t m_gNE0, m_gNE1;      dim_t m_gNE0, m_gNE1;
# Line 195  private: Line 230  private:
230      IndexVector m_faceOffset;      IndexVector m_faceOffset;
231    
232      /// vector of sample reference identifiers      /// vector of sample reference identifiers
233        IndexVector m_dofId;
234      IndexVector m_nodeId;      IndexVector m_nodeId;
235      IndexVector m_elementId;      IndexVector m_elementId;
236      IndexVector m_faceId;      IndexVector m_faceId;
237    
238      // vector with first node id on each rank      // vector with first node id on each rank
239      IndexVector m_nodeDistribution;      IndexVector m_nodeDistribution;
240    
241        // vector that maps each node to a DOF index (used for the coupler)
242        IndexVector m_dofMap;
243    
244        // Paso connector used by the system matrix and to interpolate DOF to
245        // nodes
246        Paso_Connector* m_connector;
247    
248        // the Paso System Matrix pattern
249        Paso_SystemMatrixPattern* m_pattern;
250  };  };
251    
252  } // end of namespace ripley  } // end of namespace ripley

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

  ViewVC Help
Powered by ViewVC 1.1.26