/[escript]/temp_trunk_copy/finley/src/CPPAdapter/MeshAdapter.h
ViewVC logotype

Diff of /temp_trunk_copy/finley/src/CPPAdapter/MeshAdapter.h

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

revision 682 by robwdcock, Mon Mar 27 02:43:09 2006 UTC revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 13  Line 13 
13                                                                                                                                                        
14  #if !defined finley_MeshAdapter_20040526_H  #if !defined finley_MeshAdapter_20040526_H
15  #define finley_MeshAdapter_20040526_H  #define finley_MeshAdapter_20040526_H
16    #include "system_dep.h"
17    
18  extern "C" {  extern "C" {
19  #include "../Mesh.h"  #include "../Mesh.h"
# Line 97  class MeshAdapter : public escript::Abst Line 98  class MeshAdapter : public escript::Abst
98                                 Finley_Mesh_deallocate in the MeshAdapter                                 Finley_Mesh_deallocate in the MeshAdapter
99                                 destructor.                                 destructor.
100    */    */
101      FINLEY_DLL_API
102    MeshAdapter(Finley_Mesh* finleyMesh=0);    MeshAdapter(Finley_Mesh* finleyMesh=0);
103    
104    /**    /**
105       \brief       \brief
106       Copy constructor.       Copy constructor.
107    */    */
108      FINLEY_DLL_API
109    MeshAdapter(const MeshAdapter& in);    MeshAdapter(const MeshAdapter& in);
110    
111    /**    /**
# Line 111  class MeshAdapter : public escript::Abst Line 114  class MeshAdapter : public escript::Abst
114       this calls Finley_Mesh_deallocate for the pointer given to the       this calls Finley_Mesh_deallocate for the pointer given to the
115       constructor.       constructor.
116    */    */
117      FINLEY_DLL_API
118    ~MeshAdapter();    ~MeshAdapter();
119    
120    /**    /**
# Line 136  class MeshAdapter : public escript::Abst Line 140  class MeshAdapter : public escript::Abst
140       Write the current mesh to a file with the given name.       Write the current mesh to a file with the given name.
141       \param fileName Input - The name of the file to write to.       \param fileName Input - The name of the file to write to.
142    */    */
143      FINLEY_DLL_API
144    void write(const std::string& fileName) const;    void write(const std::string& fileName) const;
145    
146    /**    /**
147       \brief       \brief
148       return the pointer to the underlying finley mesh structure       return the pointer to the underlying finley mesh structure
149    */    */
150      FINLEY_DLL_API
151    Finley_Mesh* getFinley_Mesh() const;    Finley_Mesh* getFinley_Mesh() const;
152    
153     /**     /**
# Line 150  class MeshAdapter : public escript::Abst Line 156  class MeshAdapter : public escript::Abst
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      FINLEY_DLL_API
160    int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;    int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
161    
162    /**    /**
# Line 158  class MeshAdapter : public escript::Abst Line 165  class MeshAdapter : public escript::Abst
165       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
166       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
167    */    */
168      FINLEY_DLL_API
169    int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;    int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;
170    
171    /**    /**
# Line 165  class MeshAdapter : public escript::Abst Line 173  class MeshAdapter : public escript::Abst
173       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
174       for this domain.       for this domain.
175    */    */
176      FINLEY_DLL_API
177    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
178    
179    /**    /**
180       \brief       \brief
181       Return a description for this domain       Return a description for this domain
182    */    */
183      FINLEY_DLL_API
184    virtual std::string getDescription() const;    virtual std::string getDescription() const;
185    
186    /**    /**
187       \brief       \brief
188       Return a description for the given function space type code       Return a description for the given function space type code
189    */    */
190      FINLEY_DLL_API
191    virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;    virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
192    
193    /**    /**
194       \brief       \brief
195       Build the table of function space type names       Build the table of function space type names
196    */    */
197      FINLEY_DLL_API
198    void setFunctionSpaceTypeNames();    void setFunctionSpaceTypeNames();
199    
200    /**    /**
201       \brief       \brief
202       Return a continuous FunctionSpace code       Return a continuous FunctionSpace code
203    */    */
204      FINLEY_DLL_API
205    virtual int getContinuousFunctionCode() const;    virtual int getContinuousFunctionCode() const;
206    
207    /**    /**
208       \brief       \brief
209       Return a functon FunctionSpace code       Return a functon FunctionSpace code
210    */    */
211      FINLEY_DLL_API
212    virtual int getFunctionCode() const;    virtual int getFunctionCode() const;
213    
214    /**    /**
215       \brief       \brief
216       Return a function on boundary FunctionSpace code       Return a function on boundary FunctionSpace code
217    */    */
218      FINLEY_DLL_API
219    virtual int getFunctionOnBoundaryCode() const;    virtual int getFunctionOnBoundaryCode() const;
220    
221    /**    /**
222       \brief       \brief
223       Return a FunctionOnContactZero code       Return a FunctionOnContactZero code
224    */    */
225      FINLEY_DLL_API
226    virtual int getFunctionOnContactZeroCode() const;    virtual int getFunctionOnContactZeroCode() const;
227    
228    /**    /**
229       \brief       \brief
230       Return a FunctionOnContactOne code       Return a FunctionOnContactOne code
231    */    */
232      FINLEY_DLL_API
233    virtual int getFunctionOnContactOneCode() const;    virtual int getFunctionOnContactOneCode() const;
234    
235    /**    /**
236       \brief       \brief
237       Return a Solution code       Return a Solution code
238    */    */
239      FINLEY_DLL_API
240    virtual int getSolutionCode() const;    virtual int getSolutionCode() const;
241    
242    /**    /**
243       \brief       \brief
244       Return a ReducedSolution code       Return a ReducedSolution code
245    */    */
246      FINLEY_DLL_API
247    virtual int getReducedSolutionCode() const;    virtual int getReducedSolutionCode() const;
248    
249    /**    /**
250       \brief       \brief
251       Return a DiracDeltaFunction code       Return a DiracDeltaFunction code
252    */    */
253      FINLEY_DLL_API
254    virtual int getDiracDeltaFunctionCode() const;    virtual int getDiracDeltaFunctionCode() const;
255    
256    /**    /**
# Line 241  class MeshAdapter : public escript::Abst Line 261  class MeshAdapter : public escript::Abst
261    /**    /**
262       \brief       \brief
263    */    */
264      FINLEY_DLL_API
265    virtual int getDim() const;    virtual int getDim() const;
266    
267    /**    /**
# Line 248  class MeshAdapter : public escript::Abst Line 269  class MeshAdapter : public escript::Abst
269       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.
270       \param functionSpaceCode Input -       \param functionSpaceCode Input -
271    */    */
272      FINLEY_DLL_API
273    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
274    
275    /**    /**
# Line 255  class MeshAdapter : public escript::Abst Line 277  class MeshAdapter : public escript::Abst
277       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.
278       has to be implemented by the actual Domain adapter.       has to be implemented by the actual Domain adapter.
279    */    */
280      FINLEY_DLL_API
281    virtual void setToX(escript::Data& arg) const;    virtual void setToX(escript::Data& arg) const;
282    
283    /**    /**
284       \brief       \brief
285       assigns new location to the domain       assigns new location to the domain
286    */    */
287      FINLEY_DLL_API
288    virtual void setNewX(const escript::Data& arg);    virtual void setNewX(const escript::Data& arg);
289    
290    /**    /**
291       \brief       \brief
292       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.
293    */    */
294      FINLEY_DLL_API
295    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
296      FINLEY_DLL_API
297    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
298    
299    /**    /**
# Line 275  class MeshAdapter : public escript::Abst Line 301  class MeshAdapter : public escript::Abst
301       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.
302       has to be implemented by the actual Domain adapter.       has to be implemented by the actual Domain adapter.
303    */    */
304      FINLEY_DLL_API
305    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
306      FINLEY_DLL_API
307    virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;    virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;
308    
309    /**    /**
# Line 283  class MeshAdapter : public escript::Abst Line 311  class MeshAdapter : public escript::Abst
311       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
312       is defined by out. out has to be defined on this.       is defined by out. out has to be defined on this.
313    */    */
314      FINLEY_DLL_API
315    virtual void setToNormal(escript::Data& out) const;    virtual void setToNormal(escript::Data& out) const;
316    
317    /**    /**
# Line 290  class MeshAdapter : public escript::Abst Line 319  class MeshAdapter : public escript::Abst
319       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
320       is defined by out. out has to be defined on this.       is defined by out. out has to be defined on this.
321    */    */
322      FINLEY_DLL_API
323    virtual void setToSize(escript::Data& out) const;    virtual void setToSize(escript::Data& out) const;
324    
325    /**    /**
# Line 297  class MeshAdapter : public escript::Abst Line 327  class MeshAdapter : public escript::Abst
327       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
328       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.
329    */    */
330      FINLEY_DLL_API
331    virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;    virtual void setToGradient(escript::Data& grad,const escript::Data& arg) const;
332    
333    /**    /**
# Line 304  class MeshAdapter : public escript::Abst Line 335  class MeshAdapter : public escript::Abst
335       copies the integrals of the function defined by arg into integrals.       copies the integrals of the function defined by arg into integrals.
336       arg has to be defined on this.       arg has to be defined on this.
337    */    */
338      FINLEY_DLL_API
339    virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;    virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
340    
341    /**    /**
# Line 313  class MeshAdapter : public escript::Abst Line 345  class MeshAdapter : public escript::Abst
345       \param solver       \param solver
346       \param symmetry       \param symmetry
347    */    */
348      FINLEY_DLL_API
349    virtual int getSystemMatrixTypeId(const int solver, const int package, const bool symmetry) const;    virtual int getSystemMatrixTypeId(const int solver, const int package, const bool symmetry) const;
350    
351    /**    /**
# Line 320  class MeshAdapter : public escript::Abst Line 353  class MeshAdapter : public escript::Abst
353       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
354       considered as cell centered data.       considered as cell centered data.
355    */    */
356      FINLEY_DLL_API
357    virtual bool isCellOriented(int functionSpaceCode) const;    virtual bool isCellOriented(int functionSpaceCode) const;
358    
359    /**    /**
# Line 328  class MeshAdapter : public escript::Abst Line 362  class MeshAdapter : public escript::Abst
362                                                                                                                                                                                                                                                                                                                                                    
363       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
364    */    */
365      FINLEY_DLL_API
366    virtual void saveDX(const std::string& filename,const boost::python::dict& arg) const;    virtual void saveDX(const std::string& filename,const boost::python::dict& arg) const;
367    
368    
# Line 337  class MeshAdapter : public escript::Abst Line 372  class MeshAdapter : public escript::Abst
372                                                                                                                                                                                                                                                                                                                                                    
373       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
374    */    */
375      FINLEY_DLL_API
376    virtual void saveVTK(const std::string& filename,const boost::python::dict& arg) const;    virtual void saveVTK(const std::string& filename,const boost::python::dict& arg) const;
377    
378    /**    /**
# Line 350  class MeshAdapter : public escript::Abst Line 386  class MeshAdapter : public escript::Abst
386       \brief       \brief
387       adds a PDE onto the stiffness matrix mat and a rhs       adds a PDE onto the stiffness matrix mat and a rhs
388    */    */
389      FINLEY_DLL_API
390    virtual void addPDEToSystem(    virtual void addPDEToSystem(
391                       SystemMatrixAdapter& mat, escript::Data& rhs,                       SystemMatrixAdapter& mat, escript::Data& rhs,
392                       const escript::Data& A, const escript::Data& B, const escript::Data& C,                       const escript::Data& A, const escript::Data& B, const escript::Data& C,
# Line 361  class MeshAdapter : public escript::Abst Line 398  class MeshAdapter : public escript::Abst
398       \brief       \brief
399       adds a PDE onto the stiffness matrix mat and a rhs       adds a PDE onto the stiffness matrix mat and a rhs
400    */    */
401      FINLEY_DLL_API
402    virtual void addPDEToRHS(escript::Data& rhs,    virtual void addPDEToRHS(escript::Data& rhs,
403                       const escript::Data& X, const escript::Data& Y,                       const escript::Data& X, const escript::Data& Y,
404                       const escript::Data& y, const escript::Data& y_contact) const;                       const escript::Data& y, const escript::Data& y_contact) const;
# Line 369  class MeshAdapter : public escript::Abst Line 407  class MeshAdapter : public escript::Abst
407       \brief       \brief
408      creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros:      creates a SystemMatrixAdapter stiffness matrix an initializes it with zeros:
409    */    */
410      FINLEY_DLL_API
411    SystemMatrixAdapter newSystemMatrix(    SystemMatrixAdapter newSystemMatrix(
412                        const int row_blocksize,                        const int row_blocksize,
413                        const escript::FunctionSpace& row_functionspace,                        const escript::FunctionSpace& row_functionspace,
# Line 379  class MeshAdapter : public escript::Abst Line 418  class MeshAdapter : public escript::Abst
418    /**    /**
419       \brief returns locations in the FEM nodes       \brief returns locations in the FEM nodes
420    */    */
421      FINLEY_DLL_API
422    virtual escript::Data getX() const;    virtual escript::Data getX() const;
423    
424    /**    /**
425       \brief return boundary normals at the quadrature point on the face elements       \brief return boundary normals at the quadrature point on the face elements
426    */    */
427      FINLEY_DLL_API
428    virtual escript::Data getNormal() const;    virtual escript::Data getNormal() const;
429    
430    /**    /**
431       \brief returns the element size       \brief returns the element size
432    */    */
433      FINLEY_DLL_API
434    virtual escript::Data getSize() const;    virtual escript::Data getSize() const;
435    
436    /**    /**
437       \brief comparison operators       \brief comparison operators
438    */    */
439      FINLEY_DLL_API
440    virtual bool operator==(const AbstractDomain& other) const;    virtual bool operator==(const AbstractDomain& other) const;
441      FINLEY_DLL_API
442    virtual bool operator!=(const AbstractDomain& other) const;    virtual bool operator!=(const AbstractDomain& other) const;
443    
444   protected:   protected:

Legend:
Removed from v.682  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26