/[escript]/branches/trilinos_from_5897/dudley/src/CPPAdapter/MeshAdapter.h
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/CPPAdapter/MeshAdapter.h

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

revision 6078 by caltinay, Thu Mar 10 07:04:41 2016 UTC revision 6079 by caltinay, Mon Mar 21 12:22:38 2016 UTC
# Line 29  Line 29 
29  #include <trilinoswrap/types.h>  #include <trilinoswrap/types.h>
30  #endif  #endif
31    
 #include <boost/python/dict.hpp>  
   
32  #include <map>  #include <map>
33  #include <string>  #include <string>
34  #include <vector>  #include <vector>
# Line 42  enum SystemMatrixType { Line 40  enum SystemMatrixType {
40      SMT_TRILINOS = 1<<10      SMT_TRILINOS = 1<<10
41  };  };
42    
 struct null_deleter { void operator()(void const *ptr) const {} };  
   
   
43  /**  /**
44     \brief     \brief
45     MeshAdapter implements the AbstractContinuousDomain     MeshAdapter implements the AbstractContinuousDomain
# Line 60  public: Line 55  public:
55      //      //
56      // Codes for function space types supported      // Codes for function space types supported
57      static const int DegreesOfFreedom;      static const int DegreesOfFreedom;
     static const int ReducedDegreesOfFreedom;  
58      static const int Nodes;      static const int Nodes;
     static const int ReducedNodes;  
59      static const int Elements;      static const int Elements;
60      static const int ReducedElements;      static const int ReducedElements;
61      static const int FaceElements;      static const int FaceElements;
62      static const int ReducedFaceElements;      static const int ReducedFaceElements;
63      static const int Points;      static const int Points;
     static const int ContactElementsZero;  
     static const int ReducedContactElementsZero;  
     static const int ContactElementsOne;  
     static const int ReducedContactElementsOne;  
64    
65      /**      /**
66       \brief       \brief
# Line 86  public: Line 75  public:
75       May throw an exception derived from EsysException       May throw an exception derived from EsysException
76    
77       \param dudleyMesh Input - A pointer to the externally constructed       \param dudleyMesh Input - A pointer to the externally constructed
78                                 dudley mesh.The pointer passed to MeshAdapter                                 dudley mesh.
                                is deleted using a call to  
                                Dudley_Mesh_free in the MeshAdapter  
                                destructor.  
79      */      */
80      MeshAdapter(Dudley_Mesh* dudleyMesh=0);      MeshAdapter(Mesh* dudleyMesh=NULL);
81    
82      /**      /**
83       \brief       \brief
# Line 101  public: Line 87  public:
87    
88      /**      /**
89       \brief       \brief
90       Destructor for MeshAdapter. As specified in the constructor       Destructor for MeshAdapter.
      this calls Dudley_Mesh_free for the pointer given to the  
      constructor.  
91      */      */
92      ~MeshAdapter();      ~MeshAdapter();
93    
# Line 162  public: Line 146  public:
146    
147      /**      /**
148       \brief       \brief
149       return the pointer to the underlying dudley mesh structure       return the pointer to the underlying dudley mesh class
150      */      */
151      Dudley_Mesh* getDudley_Mesh() const;      Mesh* getMesh() const;
152    
153      /**      /**
154       \brief       \brief
# Line 172  public: Line 156  public:
156       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
157       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
158      */      */
159      int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;      int getTagFromSampleNo(int functionSpaceType, index_t sampleNo) const;
160    
161      /**      /**
162       \brief       \brief
163       Return the reference number of  the given sample number.       Return the reference number of  the given sample number.
164       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
165      */      */
166      const int* borrowSampleReferenceIDs(int functionSpaceType) const;      const index_t* borrowSampleReferenceIDs(int functionSpaceType) const;
167    
168      /**      /**
169       \brief       \brief
# Line 308  public: Line 292  public:
292       \brief       \brief
293       Return the number of data points summed across all MPI processes       Return the number of data points summed across all MPI processes
294      */      */
295      virtual int getNumDataPointsGlobal() const;      virtual dim_t getNumDataPointsGlobal() const;
296    
297      /**      /**
298       \brief       \brief
299       Return the number of data points per sample, and the number of samples as a pair.       Return the number of data points per sample, and the number of samples as a pair.
300       \param functionSpaceCode Input -       \param functionSpaceCode Input -
301      */      */
302      virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;      virtual std::pair<int,dim_t> getDataShape(int functionSpaceCode) const;
303    
304      /**      /**
305       \brief       \brief
# Line 383  public: Line 367  public:
367      /**      /**
368       \brief determines whether interpolation from source to target is possible.       \brief determines whether interpolation from source to target is possible.
369    */    */
370    virtual bool probeInterpolationAcross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;    virtual bool probeInterpolationAcross(int functionSpaceType_source,
371                                    const escript::AbstractDomain& targetDomain,
372                                    int functionSpaceType_target) const;
373    
374      /**      /**
375       \brief       \brief
# Line 483  public: Line 469  public:
469       adds a PDE onto a transport problem       adds a PDE onto a transport problem
470      */      */
471      virtual void addPDEToTransportProblem(      virtual void addPDEToTransportProblem(
472                       escript::AbstractTransportProblem& tp, escript::Data& source,                       escript::AbstractTransportProblem& tp,
473                       const escript::Data& M,                       escript::Data& source, const escript::Data& M,
474                       const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,                       const escript::Data& A, const escript::Data& B,
475                       const  escript::Data& X,const  escript::Data& Y,                       const escript::Data& C, const escript::Data& D,
476                         const  escript::Data& X,const escript::Data& Y,
477                       const escript::Data& d, const escript::Data& y,                       const escript::Data& d, const escript::Data& y,
478                       const escript::Data& d_contact,const escript::Data& y_contact,                       const escript::Data& d_contact,
479                       const escript::Data& d_dirac,const escript::Data& y_dirac) const;                       const escript::Data& y_contact,
480                         const escript::Data& d_dirac,
481                         const escript::Data& y_dirac) const;
482    
483      /**      /**
484       \brief       \brief
# Line 506  public: Line 495  public:
495       \brief       \brief
496        creates a TransportProblemAdapter        creates a TransportProblemAdapter
497      */      */
498      escript::ATP_ptr newTransportProblem(      escript::ATP_ptr newTransportProblem(const int blocksize,
499                        const int blocksize,                                     const escript::FunctionSpace& functionspace,
500                        const escript::FunctionSpace& functionspace,                                     int type) const;
                       const int type) const;  
501    
502      /**      /**
503       \brief returns locations in the FEM nodes       \brief returns locations in the FEM nodes
# Line 536  public: Line 524  public:
524       \brief assigns new tag newTag to all samples of functionspace with a positive       \brief assigns new tag newTag to all samples of functionspace with a positive
525       value of mask for any its sample point.       value of mask for any its sample point.
526      */      */
527      virtual void setTags(int functionSpaceType, int newTag, const escript::Data& mask) const;      virtual void setTags(int functionSpaceType, int newTag,
528                             const escript::Data& mask) const;
529    
530      /**      /**
531        \brief        \brief
532            return the number of tags in use and a pointer to an array with the number of tags in use         return the number of tags in use and a pointer to an array with the
533           number of tags in use
534      */      */
535      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
536    
# Line 570  private: Line 560  private:
560      esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph() const;      esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph() const;
561  #endif  #endif
562    
     void extractArgsFromDict(const boost::python::dict& arg, int& numData,  
                              char**& names, escript::Data*& data,  
                              escript::Data**& dataPtr) const;  
   
563      //      //
564      // pointer to the externally created dudley mesh      // pointer to the externally created dudley mesh
565      boost::shared_ptr<Dudley_Mesh> m_dudleyMesh;      boost::shared_ptr<Mesh> m_dudleyMesh;
566    
567      static FunctionSpaceNamesMapType m_functionSpaceTypeNames;      static FunctionSpaceNamesMapType m_functionSpaceTypeNames;
568  };  };

Legend:
Removed from v.6078  
changed lines
  Added in v.6079

  ViewVC Help
Powered by ViewVC 1.1.26