/[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 6008 by caltinay, Wed Feb 17 23:53:30 2016 UTC revision 6009 by caltinay, Wed Mar 2 04:13:26 2016 UTC
# Line 14  Line 14 
14  *  *
15  *****************************************************************************/  *****************************************************************************/
16    
   
17  #if !defined dudley_MeshAdapter_20040526_H  #if !defined dudley_MeshAdapter_20040526_H
18  #define dudley_MeshAdapter_20040526_H  #define dudley_MeshAdapter_20040526_H
19  #include "system_dep.h"  #include "system_dep.h"
20    
21  #include "dudley/Mesh.h"  #include <dudley/Assemble.h>
22  #include "dudley/Dudley.h"  #include <dudley/Dudley.h>
23  #include "dudley/Assemble.h"  #include <dudley/Mesh.h>
24  #include "esysUtils/Esys_MPI.h"  
25    #include <escript/AbstractContinuousDomain.h>
26  #include "DudleyError.h"  #include <escript/FunctionSpace.h>
27  #include "DudleyAdapterException.h"  #include <escript/FunctionSpaceFactory.h>
   
 #include "escript/AbstractContinuousDomain.h"  
 #include "escript/FunctionSpace.h"  
 #include "escript/FunctionSpaceFactory.h"  
28    
 #include <boost/shared_ptr.hpp>  
29  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
 #include <boost/python/extract.hpp>  
30    
31  #include <map>  #include <map>
 #include <vector>  
32  #include <string>  #include <string>
33  #include <sstream>  #include <vector>
34    
35  namespace dudley {  namespace dudley {
36    
# Line 59  struct null_deleter Line 51  struct null_deleter
51     MeshAdapter implements the AbstractContinuousDomain     MeshAdapter implements the AbstractContinuousDomain
52     interface for the Dudley library.     interface for the Dudley library.
53  */  */
54    class DUDLEY_DLL_API MeshAdapter : public escript::AbstractContinuousDomain
 class MeshAdapter : public escript::AbstractContinuousDomain  
55  {  {
56   public:  public:
57    
58    //      //
59    // Codes for function space types supported      // Codes for function space types supported
60    static const int DegreesOfFreedom;      static const int DegreesOfFreedom;
61    static const int ReducedDegreesOfFreedom;      static const int ReducedDegreesOfFreedom;
62    static const int Nodes;      static const int Nodes;
63    static const int ReducedNodes;      static const int ReducedNodes;
64    static const int Elements;      static const int Elements;
65    static const int ReducedElements;      static const int ReducedElements;
66    static const int FaceElements;      static const int FaceElements;
67    static const int ReducedFaceElements;      static const int ReducedFaceElements;
68    static const int Points;      static const int Points;
69    static const int ContactElementsZero;      static const int ContactElementsZero;
70    static const int ReducedContactElementsZero;      static const int ReducedContactElementsZero;
71    static const int ContactElementsOne;      static const int ContactElementsOne;
72    static const int ReducedContactElementsOne;      static const int ReducedContactElementsOne;
73    
74    /**      /**
75       \brief       \brief
76       Constructor for MeshAdapter       Constructor for MeshAdapter
77    
# Line 97  class MeshAdapter : public escript::Abst Line 88  class MeshAdapter : public escript::Abst
88                                 is deleted using a call to                                 is deleted using a call to
89                                 Dudley_Mesh_free in the MeshAdapter                                 Dudley_Mesh_free in the MeshAdapter
90                                 destructor.                                 destructor.
91    */      */
92    DUDLEY_DLL_API      MeshAdapter(Dudley_Mesh* dudleyMesh=0);
   MeshAdapter(Dudley_Mesh* dudleyMesh=0);  
93    
94    /**      /**
95       \brief       \brief
96       Copy constructor.       Copy constructor.
97    */      */
98    DUDLEY_DLL_API      MeshAdapter(const MeshAdapter& in);
   MeshAdapter(const MeshAdapter& in);  
99    
100    /**      /**
101       \brief       \brief
102       Destructor for MeshAdapter. As specified in the constructor       Destructor for MeshAdapter. As specified in the constructor
103       this calls Dudley_Mesh_free for the pointer given to the       this calls Dudley_Mesh_free for the pointer given to the
104       constructor.       constructor.
105    */      */
106    DUDLEY_DLL_API      ~MeshAdapter();
107    ~MeshAdapter();  
108        /**
109         \brief
110         returns a reference to the MPI information wrapper for this domain
111        */
112        virtual escript::JMPI getMPI() const;
113    
114    /**      /**
115       \brief       \brief
116       return the number of processors used for this domain       return the number of processors used for this domain
117    */      */
118    DUDLEY_DLL_API      virtual int getMPISize() const;
119    virtual int getMPISize() const;  
120    /**      /**
121       \brief       \brief
122       return the number MPI rank of this processor       return the number MPI rank of this processor
123    */      */
124    
125    DUDLEY_DLL_API      virtual int getMPIRank() const;
   virtual int getMPIRank() const;  
126    
127    /**      /**
128       \brief       \brief
129       If compiled for MPI then execute an MPI_Barrier, else do nothing       If compiled for MPI then execute an MPI_Barrier, else do nothing
130    */      */
131        virtual void MPIBarrier() const;
   DUDLEY_DLL_API  
   virtual void MPIBarrier() const;  
132    
133    /**      /**
134       \brief       \brief
135       Return true if on MPI processor 0, else false       Return true if on MPI processor 0, else false
136    */      */
137        virtual bool onMasterProcessor() const;
138    
139    DUDLEY_DLL_API      MPI_Comm getMPIComm() const;
   virtual bool onMasterProcessor() const;  
140    
141    DUDLEY_DLL_API      /**
   MPI_Comm getMPIComm() const;  
   
   /**  
142       \brief       \brief
143       Write the current mesh to a file with the given name.       Write the current mesh to a file with the given name.
144       \param fileName Input - The name of the file to write to.       \param fileName Input - The name of the file to write to.
145    */      */
146    DUDLEY_DLL_API      void write(const std::string& fileName) const;
   void write(const std::string& fileName) const;  
147    
148    /**      /**
149       \brief       \brief
150       \param full       \param full
151    */      */
152    DUDLEY_DLL_API      void Print_Mesh_Info(const bool full=false) const;
   void Print_Mesh_Info(const bool full=false) const;  
153    
154    /**      /**
155       \brief       \brief
156       dumps the mesh to a file with the given name.       dumps the mesh to a file with the given name.
157       \param fileName Input - The name of the file       \param fileName Input - The name of the file
158    */      */
159    DUDLEY_DLL_API      void dump(const std::string& fileName) const;
   void dump(const std::string& fileName) const;  
160    
161    /**      /**
162       \brief       \brief
163       return the pointer to the underlying dudley mesh structure       return the pointer to the underlying dudley mesh structure
164    */      */
165    DUDLEY_DLL_API      Dudley_Mesh* getDudley_Mesh() const;
   Dudley_Mesh* getDudley_Mesh() const;  
166    
167     /**      /**
168       \brief       \brief
169       Return the tag key for the given sample number.       Return the tag key for the given sample number.
170       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
171       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
172    */      */
173    DUDLEY_DLL_API      int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
   int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;  
174    
175    /**      /**
176       \brief       \brief
177       Return the reference number of  the given sample number.       Return the reference number of  the given sample number.
178       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
179    */      */
180    DUDLEY_DLL_API      const int* borrowSampleReferenceIDs(int functionSpaceType) const;
   const int* borrowSampleReferenceIDs(int functionSpaceType) const;  
181    
182    /**      /**
183       \brief       \brief
184       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
185       for this domain.       for this domain.
186    */      */
187    DUDLEY_DLL_API      virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
   virtual bool isValidFunctionSpaceType(int functionSpaceType) const;  
188    
189    /**      /**
190       \brief       \brief
191       Return a description for this domain       Return a description for this domain
192    */      */
193    DUDLEY_DLL_API      virtual std::string getDescription() const;
   virtual std::string getDescription() const;  
194    
195    /**      /**
196       \brief       \brief
197       Return a description for the given function space type code       Return a description for the given function space type code
198    */      */
199    DUDLEY_DLL_API      virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
   virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;  
200    
201    /**      /**
202       \brief       \brief
203       Build the table of function space type names       Build the table of function space type names
204    */      */
205    DUDLEY_DLL_API      void setFunctionSpaceTypeNames();
   void setFunctionSpaceTypeNames();  
206    
207    /**      /**
208       \brief       \brief
209       Return a continuous FunctionSpace code       Return a continuous FunctionSpace code
210    */      */
211    DUDLEY_DLL_API      virtual int getContinuousFunctionCode() const;
   virtual int getContinuousFunctionCode() const;  
212    
213    /**      /**
214       \brief       \brief
215       Return a continuous on reduced order nodes FunctionSpace code       Return a continuous on reduced order nodes FunctionSpace code
216    */      */
217    DUDLEY_DLL_API      virtual int getReducedContinuousFunctionCode() const;
   virtual int getReducedContinuousFunctionCode() const;  
218    
219    /**      /**
220       \brief       \brief
221       Return a function FunctionSpace code       Return a function FunctionSpace code
222    */      */
223    DUDLEY_DLL_API      virtual int getFunctionCode() const;
   virtual int getFunctionCode() const;  
224    
225    /**      /**
226       \brief       \brief
227       Return a function with reduced integration order FunctionSpace code       Return a function with reduced integration order FunctionSpace code
228    */      */
229    DUDLEY_DLL_API      virtual int getReducedFunctionCode() const;
   virtual int getReducedFunctionCode() const;  
230    
231    /**      /**
232       \brief       \brief
233       Return a function on boundary FunctionSpace code       Return a function on boundary FunctionSpace code
234    */      */
235    DUDLEY_DLL_API      virtual int getFunctionOnBoundaryCode() const;
   virtual int getFunctionOnBoundaryCode() const;  
236    
237    /**      /**
238       \brief       \brief
239       Return a function on boundary with reduced integration order FunctionSpace code       Return a function on boundary with reduced integration order FunctionSpace code
240    */      */
241    DUDLEY_DLL_API      virtual int getReducedFunctionOnBoundaryCode() const;
   virtual int getReducedFunctionOnBoundaryCode() const;  
242    
243    /**      /**
244       \brief       \brief
245       Return a FunctionOnContactZero code       Return a FunctionOnContactZero code
246    */      */
247    DUDLEY_DLL_API      virtual int getFunctionOnContactZeroCode() const;
   virtual int getFunctionOnContactZeroCode() const;  
248    
249    /**      /**
250       \brief       \brief
251       Return a FunctionOnContactZero code  with reduced integration order       Return a FunctionOnContactZero code  with reduced integration order
252    */      */
253    DUDLEY_DLL_API      virtual int getReducedFunctionOnContactZeroCode() const;
   virtual int getReducedFunctionOnContactZeroCode() const;  
254    
255    /**      /**
256       \brief       \brief
257       Return a FunctionOnContactOne code       Return a FunctionOnContactOne code
258    */      */
259    DUDLEY_DLL_API      virtual int getFunctionOnContactOneCode() const;
   virtual int getFunctionOnContactOneCode() const;  
260    
261    /**      /**
262       \brief       \brief
263       Return a FunctionOnContactOne code  with reduced integration order       Return a FunctionOnContactOne code  with reduced integration order
264    */      */
265    DUDLEY_DLL_API      virtual int getReducedFunctionOnContactOneCode() const;
   virtual int getReducedFunctionOnContactOneCode() const;  
266    
267    /**      /**
268       \brief       \brief
269       Return a Solution code       Return a Solution code
270    */      */
271    DUDLEY_DLL_API      virtual int getSolutionCode() const;
   virtual int getSolutionCode() const;  
272    
273    /**      /**
274       \brief       \brief
275       Return a ReducedSolution code       Return a ReducedSolution code
276    */      */
277    DUDLEY_DLL_API      virtual int getReducedSolutionCode() const;
   virtual int getReducedSolutionCode() const;  
278    
279    /**      /**
280       \brief       \brief
281       Return a DiracDeltaFunctions code       Return a DiracDeltaFunctions code
282    */      */
283    DUDLEY_DLL_API      virtual int getDiracDeltaFunctionsCode() const;
   virtual int getDiracDeltaFunctionsCode() const;  
284    
285    /**      /**
          5B  
286       \brief       \brief
287    */      */
288    typedef std::map<int, std::string> FunctionSpaceNamesMapType;      typedef std::map<int, std::string> FunctionSpaceNamesMapType;
289    
290    /**      /**
291       \brief       \brief
292    */      */
293    DUDLEY_DLL_API      virtual int getDim() const;
   virtual int getDim() const;  
294    
295    /**      /**
296       \brief       \brief
297        Returns a status indicator of the domain. The status identifier should be unique over        Returns a status indicator of the domain. The status identifier should be unique over
298        the live time if the object but may be updated if changes to the domain happen, e.g.        the live time if the object but may be updated if changes to the domain happen, e.g.
299        modifications to its geometry.        modifications to its geometry.
300    
301       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
302    */      */
303    DUDLEY_DLL_API      virtual StatusType getStatus() const;
   virtual StatusType getStatus() const;  
304    
305        /**
   /**  
306       \brief       \brief
307       Return the number of data points summed across all MPI processes       Return the number of data points summed across all MPI processes
308    */      */
309    DUDLEY_DLL_API      virtual int getNumDataPointsGlobal() const;
   virtual int getNumDataPointsGlobal() const;  
310    
311    /**      /**
312       \brief       \brief
313       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.
314       \param functionSpaceCode Input -       \param functionSpaceCode Input -
315    */      */
316    DUDLEY_DLL_API      virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
   virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;  
317    
318    /**      /**
319       \brief       \brief
320       copies the location of data points into arg. The domain of arg has to match this.       copies the location of data points into arg. The domain of arg has to match this.
321       has to be implemented by the actual Domain adapter.       has to be implemented by the actual Domain adapter.
322    */      */
323    DUDLEY_DLL_API      virtual void setToX(escript::Data& arg) const;
   virtual void setToX(escript::Data& arg) const;  
324    
325    /**      /**
326       \brief       \brief
327       sets a map from a clear tag name to a tag key       sets a map from a clear tag name to a tag key
328       \param name Input - tag name.       \param name Input - tag name.
329       \param tag Input - tag key.       \param tag Input - tag key.
330    */      */
331    DUDLEY_DLL_API      virtual void setTagMap(const std::string& name, int tag);
   virtual void setTagMap(const std::string& name,  int tag);  
332    
333    /**      /**
334       \brief       \brief
335       Return the tag key for tag name.       Return the tag key for tag name.
336       \param name Input - tag name       \param name Input - tag name
337    */      */
338    DUDLEY_DLL_API      virtual int getTag(const std::string& name) const;
   virtual int getTag(const std::string& name) const;  
339    
340    /**      /**
341       \brief       \brief
342       Returns true if name is a defined tage name.       Returns true if name is a defined tage name.
343       \param name Input - tag name to be checked.       \param name Input - tag name to be checked.
344    */      */
345    DUDLEY_DLL_API      virtual bool isValidTagName(const std::string& name) const;
   virtual bool isValidTagName(const std::string& name) const;  
346    
347    /**      /**
348       \brief       \brief
349       Returns all tag names in a single string sperated by commas       Returns all tag names in a single string sperated by commas
350    */      */
351    DUDLEY_DLL_API      virtual std::string showTagNames() const;
   virtual std::string showTagNames() const;  
352    
353    /**      /**
354       \brief       \brief
355       assigns new location to the domain       assigns new location to the domain
356    */      */
357    DUDLEY_DLL_API      virtual void setNewX(const escript::Data& arg);
   virtual void setNewX(const escript::Data& arg);  
358    
359    /**      /**
360       \brief       \brief
361       interpolates data given on source onto target where source and target have to be given on the same domain.       interpolates data given on source onto target where source and target have to be given on the same domain.
362    */      */
363    DUDLEY_DLL_API      virtual void interpolateOnDomain(escript::Data& target, const escript::Data& source) const;
   virtual void interpolateOnDomain(escript::Data& target, const escript::Data& source) const;  
   
364    
365    DUDLEY_DLL_API      virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
   virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;  
366    
367    DUDLEY_DLL_API      virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
   virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;  
368    
369        /**
   /**  
370      \brief given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.      \brief given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
371      \return true is result is valid, false if not      \return true is result is valid, false if not
372    */      */
373    DUDLEY_DLL_API      bool commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
   bool  
   commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;  
374    
375    /**      /**
376       \brief       \brief
377       interpolates data given on source onto target where source and target are given on different domains.       interpolates data given on source onto target where source and target are given on different domains.
378       has to be implemented by the actual Domain adapter.      */
379    */      virtual void interpolateAcross(escript::Data& target, const escript::Data& source) const;
   DUDLEY_DLL_API  
   virtual void interpolateAcross(escript::Data& target, const escript::Data& source) const;  
380    
381    /**      /**
382    \brief determines whether interpolation from source to target is possible.       \brief determines whether interpolation from source to target is possible.
   Must be implemented by the actual Domain adapter  
383    */    */
   DUDLEY_DLL_API  
384    virtual bool probeInterpolationAcross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;    virtual bool probeInterpolationAcross(int functionSpaceType_source,const escript::AbstractDomain& targetDomain, int functionSpaceType_target) const;
385    
386    /**      /**
387       \brief       \brief
388       copies the surface normals at data points into out. The actual function space to be considered       copies the surface normals at data points into out. The actual function space to be considered
389       is defined by out. out has to be defined on this.       is defined by out. out has to be defined on this.
390    */      */
391    DUDLEY_DLL_API      virtual void setToNormal(escript::Data& out) const;
   virtual void setToNormal(escript::Data& out) const;  
392    
393    /**      /**
394       \brief       \brief
395       copies the size of samples into out. The actual function space to be considered       copies the size of samples into out. The actual function space to be considered
396       is defined by out. out has to be defined on this.       is defined by out. out has to be defined on this.
397    */      */
398    DUDLEY_DLL_API      virtual void setToSize(escript::Data& out) const;
   virtual void setToSize(escript::Data& out) const;  
399    
400    /**      /**
401       \brief       \brief
402       copies the gradient of arg into grad. The actual function space to be considered       copies the gradient of arg into grad. The actual function space to be considered
403       for the gradient is defined by grad. arg and grad have to be defined on this.       for the gradient is defined by grad. arg and grad have to be defined on this.
404    */      */
405    DUDLEY_DLL_API      virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;
   virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;  
406    
407    /**      /**
408       \brief       \brief
409       copies the integrals of the function defined by arg into integrals.       copies the integrals of the function defined by arg into integrals.
410       arg has to be defined on this.       arg has to be defined on this.
411    */      */
412    DUDLEY_DLL_API      virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
   virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;  
413    
414    /**      /**
415       \brief       \brief
416       return the identifier of the matrix type to be used for the global       return the identifier of the matrix type to be used for the global
417       stiffness matrix when a particular solver, package, preconditioner,       stiffness matrix when a particular solver, package, preconditioner,
418       and symmetric matrix is used.       and symmetric matrix is used.
419            
420       \param options a SolverBuddy instance with the desired options set       \param options a SolverBuddy instance with the desired options set
421    */      */
422    DUDLEY_DLL_API      virtual int getSystemMatrixTypeId(const boost::python::object& options) const;
   virtual int getSystemMatrixTypeId(const boost::python::object& options) const;  
423    
424    /**      /**
425       \brief       \brief
426       return the identifier of the transport problem type to be used when a particular solver, perconditioner, package       return the identifier of the transport problem type to be used when a particular solver, perconditioner, package
427       and symmetric matrix is used.       and symmetric matrix is used.
# Line 492  class MeshAdapter : public escript::Abst Line 429  class MeshAdapter : public escript::Abst
429       \param preconditioner       \param preconditioner
430       \param package       \param package
431       \param symmetry       \param symmetry
432    */      */
433    DUDLEY_DLL_API      virtual int getTransportTypeId(int solver, int preconditioner, int package,
434    virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;                                     bool symmetry) const;
435    
436    /**      /**
437       \brief       \brief
438       returns true if data on this domain and a function space of type functionSpaceCode has to       returns true if data on this domain and a function space of type functionSpaceCode has to
439       considered as cell centered data.       considered as cell centered data.
440    */      */
441    DUDLEY_DLL_API      virtual bool isCellOriented(int functionSpaceCode) const;
   virtual bool isCellOriented(int functionSpaceCode) const;  
442    
443    DUDLEY_DLL_API      virtual bool ownSample(int fs_code, index_t id) const;
   virtual bool ownSample(int fs_code, index_t id) const;  
444    
445    /**      /**
446       \brief       \brief
447       adds a PDE onto the stiffness matrix mat and a rhs       adds a PDE onto the stiffness matrix mat and a rhs
448    */      */
449    DUDLEY_DLL_API      virtual void addPDEToSystem(
   virtual void addPDEToSystem(  
450                       escript::AbstractSystemMatrix& mat, escript::Data& rhs,                       escript::AbstractSystemMatrix& mat, escript::Data& rhs,
451                       const escript::Data& A, const escript::Data& B, const escript::Data& C,                       const escript::Data& A, const escript::Data& B,
452                       const escript::Data& D, const escript::Data& X, const escript::Data& Y,                       const escript::Data& C, const escript::Data& D,
453                       const escript::Data& d, const escript::Data& y,                       const escript::Data& X, const escript::Data& Y,
454               const escript::Data& d_contact, const escript::Data& y_contact,                       const escript::Data& d, const escript::Data& y,
455                       const escript::Data& d_dirac, const escript::Data& y_dirac) const;                       const escript::Data& d_contact,
456                         const escript::Data& y_contact,
457                         const escript::Data& d_dirac,
458                         const escript::Data& y_dirac) const;
459    
460    /**      /**
461       \brief       \brief
462       adds a PDE onto the lumped stiffness matrix matrix       adds a PDE onto the lumped stiffness matrix matrix
463    */      */
464    DUDLEY_DLL_API      virtual void addPDEToLumpedSystem(escript::Data& mat,
465    virtual void addPDEToLumpedSystem(                                        const escript::Data& D,
466                       escript::Data& mat,                                        const escript::Data& d,
467                       const escript::Data& D,                                        const escript::Data& d_dirac,
468                       const escript::Data& d,                                        const bool useHRZ) const;
                      const escript::Data& d_dirac,  
                      const bool useHRZ) const;  
469    
470    /**      /**
471       \brief       \brief
472       adds a PDE onto the stiffness matrix mat and a rhs       adds a PDE onto the stiffness matrix mat and a rhs
473    */      */
474    DUDLEY_DLL_API      virtual void addPDEToRHS(escript::Data& rhs, const escript::Data& X,
475    virtual void addPDEToRHS(escript::Data& rhs,                               const escript::Data& Y, const escript::Data& y,
476                       const escript::Data& X, const escript::Data& Y,                               const escript::Data& y_contact,
477                       const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;                               const escript::Data& y_dirac) const;
478    /**  
479        /**
480       \brief       \brief
481       adds a PDE onto a transport problem       adds a PDE onto a transport problem
482    */      */
483        virtual void addPDEToTransportProblem(
   DUDLEY_DLL_API  
   virtual void addPDEToTransportProblem(  
484                       escript::AbstractTransportProblem& tp, escript::Data& source,                       escript::AbstractTransportProblem& tp, escript::Data& source,
485                       const escript::Data& M,                       const escript::Data& M,
486                       const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,                       const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,
# Line 556  class MeshAdapter : public escript::Abst Line 489  class MeshAdapter : public escript::Abst
489                       const escript::Data& d_contact,const escript::Data& y_contact,                       const escript::Data& d_contact,const escript::Data& y_contact,
490                       const escript::Data& d_dirac,const escript::Data& y_dirac) const;                       const escript::Data& d_dirac,const escript::Data& y_dirac) const;
491    
492        /**
   /**  
493       \brief       \brief
494      creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:       creates a stiffness matrix and initializes it with zeros
495    */      */
496    DUDLEY_DLL_API      escript::ASM_ptr newSystemMatrix(
497    escript::ASM_ptr newSystemMatrix(                        int row_blocksize,
                       const int row_blocksize,  
498                        const escript::FunctionSpace& row_functionspace,                        const escript::FunctionSpace& row_functionspace,
499                        const int column_blocksize,                        int column_blocksize,
500                        const escript::FunctionSpace& column_functionspace,                        const escript::FunctionSpace& column_functionspace,
501                        const int type) const;                        int type) const;
   /**  
    \brief  
     creates a TransportProblemAdapter  
   
   */  
502    
503    DUDLEY_DLL_API      /**
504    escript::ATP_ptr newTransportProblem(       \brief
505          creates a TransportProblemAdapter
506        */
507        escript::ATP_ptr newTransportProblem(
508                        const int blocksize,                        const int blocksize,
509                        const escript::FunctionSpace& functionspace,                        const escript::FunctionSpace& functionspace,
510                        const int type) const;                        const int type) const;
511    
512    /**      /**
513       \brief returns locations in the FEM nodes       \brief returns locations in the FEM nodes
514    */      */
515    DUDLEY_DLL_API      virtual escript::Data getX() const;
   virtual escript::Data getX() const;  
516    
517    /**      /**
518       \brief return boundary normals at the quadrature point on the face elements       \brief return boundary normals at the quadrature point on the face elements
519    */      */
520    DUDLEY_DLL_API      virtual escript::Data getNormal() const;
   virtual escript::Data getNormal() const;  
521    
522    /**      /**
523       \brief returns the element size       \brief returns the element size
524    */      */
525    DUDLEY_DLL_API      virtual escript::Data getSize() const;
   virtual escript::Data getSize() const;  
526    
527    /**      /**
528       \brief comparison operators       \brief comparison operators
529    */      */
530    DUDLEY_DLL_API      virtual bool operator==(const escript::AbstractDomain& other) const;
531    virtual bool operator==(const escript::AbstractDomain& other) const;      virtual bool operator!=(const escript::AbstractDomain& other) const;
   DUDLEY_DLL_API  
   virtual bool operator!=(const escript::AbstractDomain& other) const;  
532    
533    /**      /**
534       \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
535       value of mask for any its sample point.       value of mask for any its sample point.
536        */
537        virtual void setTags(int functionSpaceType, int newTag, const escript::Data& mask) const;
538    
539    */      /**
   DUDLEY_DLL_API  
   virtual void setTags(const int functionSpaceType, const int newTag, const escript::Data& mask) const;  
   
   /**  
540        \brief        \brief
541            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 number of tags in use
542    */      */
543    DUDLEY_DLL_API      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
   virtual int getNumberOfTagsInUse(int functionSpaceCode) const;  
   
   DUDLEY_DLL_API  
   virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;  
544    
545        virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
546    
547    /**      /**
548       \brief Checks if this domain allows tags for the specified functionSpaceCode.       \brief Checks if this domain allows tags for the specified functionSpaceCode.
549    */      */
550    DUDLEY_DLL_API      virtual bool canTag(int functionSpaceCode) const;
   virtual  
   bool canTag(int functionSpaceCode) const;  
   
    /**  
    \brief returns the approximation order used for a function space functionSpaceCode  
    */  
551    
552    DUDLEY_DLL_API      /**
553    virtual       \brief returns the approximation order used for a function space functionSpaceCode
554    int getApproximationOrder(const int functionSpaceCode) const;      */
555        virtual int getApproximationOrder(int functionSpaceCode) const;
556    
557        bool supportsContactElements() const;
558    
559    DUDLEY_DLL_API      virtual escript::Data randomFill(const escript::DataTypes::ShapeType& shape,
   bool supportsContactElements() const;  
     
         
   DUDLEY_DLL_API  
   virtual escript::Data randomFill(const escript::DataTypes::ShapeType& shape,  
560         const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const;                 const escript::FunctionSpace& what, long seed, const boost::python::tuple& filter) const;        
561        
562   protected:  private:
563        void extractArgsFromDict(const boost::python::dict& arg, int& numData,
  private:  
   void extractArgsFromDict(const boost::python::dict& arg, int& numData,  
564                               char**& names, escript::Data*& data,                               char**& names, escript::Data*& data,
565                               escript::Data**& dataPtr) const;                               escript::Data**& dataPtr) const;
566    
567    //      //
568    // pointer to the externally created dudley mesh      // pointer to the externally created dudley mesh
569    boost::shared_ptr<Dudley_Mesh> m_dudleyMesh;      boost::shared_ptr<Dudley_Mesh> m_dudleyMesh;
570    
571    static FunctionSpaceNamesMapType m_functionSpaceTypeNames;      static FunctionSpaceNamesMapType m_functionSpaceTypeNames;
572    
573  };  };
574    
575  } // end of namespace  } // end of namespace
576    
577  #endif  #endif
578    

Legend:
Removed from v.6008  
changed lines
  Added in v.6009

  ViewVC Help
Powered by ViewVC 1.1.26