/[escript]/branches/intelc_win32/bruce/src/Bruce.h
ViewVC logotype

Diff of /branches/intelc_win32/bruce/src/Bruce.h

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

trunk/bruce/src/Bruce.h revision 734 by robwdcock, Mon Mar 27 02:43:09 2006 UTC branches/intelc_win32/bruce/src/Bruce.h revision 742 by woo409, Sat Jun 24 11:27:16 2006 UTC
# Line 13  Line 13 
13    
14  #if !defined bruce_Bruce_20050829_H  #if !defined bruce_Bruce_20050829_H
15  #define bruce_Bruce_20050829_H  #define bruce_Bruce_20050829_H
16    #include "system_dep.h"
17  #include "escript/AbstractDomain.h"  #include "escript/AbstractDomain.h"
18  #include "escript/AbstractContinuousDomain.h"  #include "escript/AbstractContinuousDomain.h"
19  #include "escript/FunctionSpace.h"  #include "escript/FunctionSpace.h"
20  #include "escript/Data.h"  #include "escript/Data.h"
21    
22    
23  #include <string>  #include <string>
24  #include <vector>  #include <vector>
25    
# Line 38  class Bruce : public escript::AbstractCo Line 39  class Bruce : public escript::AbstractCo
39    
40    //    //
41    // Codes for function space types supported    // Codes for function space types supported
42      BRUCE_DLL_API
43    static const int ContinuousFunction;  // data is on the nodes    static const int ContinuousFunction;  // data is on the nodes
44      BRUCE_DLL_API
45    static const int Function;            // data is on the cell centres    static const int Function;            // data is on the cell centres
46    
47    //    //
# Line 57  class Bruce : public escript::AbstractCo Line 60  class Bruce : public escript::AbstractCo
60       Default constructor for Bruce.       Default constructor for Bruce.
61       Creates a null Bruce object.       Creates a null Bruce object.
62    */    */
63      BRUCE_DLL_API
64    Bruce();    Bruce();
65    
66    /**    /**
# Line 79  class Bruce : public escript::AbstractCo Line 83  class Bruce : public escript::AbstractCo
83       The integers n0,n1,n2 specify the dumber of data-points along each       The integers n0,n1,n2 specify the dumber of data-points along each
84       axis in the domain.       axis in the domain.
85    */    */
86      BRUCE_DLL_API
87    Bruce(DimVec v0, DimVec v1, DimVec v2,    Bruce(DimVec v0, DimVec v1, DimVec v2,
88          int n0, int n1, int n2,          int n0, int n1, int n2,
89          DimVec origin);          DimVec origin);
# Line 87  class Bruce : public escript::AbstractCo Line 92  class Bruce : public escript::AbstractCo
92       \brief       \brief
93       Copy constructor.       Copy constructor.
94    */    */
95      BRUCE_DLL_API
96    Bruce(const Bruce& other);    Bruce(const Bruce& other);
97    
98    /**    /**
99       \brief       \brief
100       Destructor for Bruce.       Destructor for Bruce.
101    */    */
102      BRUCE_DLL_API
103    ~Bruce();    ~Bruce();
104    
105    /**    /**
106       \brief       \brief
107       Return this as an AbstractContinuousDomain.       Return this as an AbstractContinuousDomain.
108    */    */
109      BRUCE_DLL_API
110    inline    inline
111    const AbstractContinuousDomain&    const AbstractContinuousDomain&
112    asAbstractContinuousDomain() const    asAbstractContinuousDomain() const
# Line 110  class Bruce : public escript::AbstractCo Line 118  class Bruce : public escript::AbstractCo
118       \brief       \brief
119       Return this as an AbstractDomain.       Return this as an AbstractDomain.
120    */    */
121      BRUCE_DLL_API
122    inline    inline
123    const AbstractDomain&    const AbstractDomain&
124    asAbstractDomain() const    asAbstractDomain() const
# Line 121  class Bruce : public escript::AbstractCo Line 130  class Bruce : public escript::AbstractCo
130       \brief       \brief
131       Return a description for this domain.       Return a description for this domain.
132    */    */
133      BRUCE_DLL_API
134    virtual    virtual
135    inline    inline
136    std::string    std::string
# Line 134  class Bruce : public escript::AbstractCo Line 144  class Bruce : public escript::AbstractCo
144       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
145       for this domain.       for this domain.
146    */    */
147      BRUCE_DLL_API
148    virtual    virtual
149    bool    bool
150    isValidFunctionSpaceType(int functionSpaceCode) const;    isValidFunctionSpaceType(int functionSpaceCode) const;
# Line 142  class Bruce : public escript::AbstractCo Line 153  class Bruce : public escript::AbstractCo
153       \brief       \brief
154       Return a description for the given function space type code.       Return a description for the given function space type code.
155    */    */
156      BRUCE_DLL_API
157    virtual    virtual
158    std::string    std::string
159    functionSpaceTypeAsString(int functionSpaceCode) const;    functionSpaceTypeAsString(int functionSpaceCode) const;
# Line 150  class Bruce : public escript::AbstractCo Line 162  class Bruce : public escript::AbstractCo
162       \brief       \brief
163       Return a continuous FunctionSpace code.       Return a continuous FunctionSpace code.
164    */    */
165      BRUCE_DLL_API
166    virtual    virtual
167    inline    inline
168    int    int
# Line 162  class Bruce : public escript::AbstractCo Line 175  class Bruce : public escript::AbstractCo
175       \brief       \brief
176       Return a function FunctionSpace code.       Return a function FunctionSpace code.
177    */    */
178      BRUCE_DLL_API
179    virtual    virtual
180    inline    inline
181    int    int
# Line 174  class Bruce : public escript::AbstractCo Line 188  class Bruce : public escript::AbstractCo
188       \brief       \brief
189       Return the spatial dimension of the mesh.       Return the spatial dimension of the mesh.
190    */    */
191      BRUCE_DLL_API
192    virtual    virtual
193    inline    inline
194    int    int
# Line 187  class Bruce : public escript::AbstractCo Line 202  class Bruce : public escript::AbstractCo
202       Return the number of data points per sample, and the number of samples       Return the number of data points per sample, and the number of samples
203       needed to represent data on parts of the mesh.       needed to represent data on parts of the mesh.
204    */    */
205      BRUCE_DLL_API
206    virtual    virtual
207    std::pair<int,int>    std::pair<int,int>
208    getDataShape(int functionSpaceCode) const;    getDataShape(int functionSpaceCode) const;
# Line 196  class Bruce : public escript::AbstractCo Line 212  class Bruce : public escript::AbstractCo
212       Return the number of samples       Return the number of samples
213       needed to represent data on parts of the mesh.       needed to represent data on parts of the mesh.
214    */    */
215      BRUCE_DLL_API
216    int    int
217    getNumSamples(int functionSpaceCode) const;    getNumSamples(int functionSpaceCode) const;
218    
# Line 204  class Bruce : public escript::AbstractCo Line 221  class Bruce : public escript::AbstractCo
221       Return the number of data-points per sample       Return the number of data-points per sample
222       needed to represent data on parts of the mesh.       needed to represent data on parts of the mesh.
223    */    */
224      BRUCE_DLL_API
225    inline    inline
226    int    int
227    getNumDataPointsPerSample(int functionSpaceCode) const    getNumDataPointsPerSample(int functionSpaceCode) const
# Line 215  class Bruce : public escript::AbstractCo Line 233  class Bruce : public escript::AbstractCo
233       \brief       \brief
234       Returns the locations in the domain of the FEM nodes.       Returns the locations in the domain of the FEM nodes.
235    */    */
236      BRUCE_DLL_API
237    virtual    virtual
238    escript::Data    escript::Data
239    getX() const;    getX() const;
# Line 223  class Bruce : public escript::AbstractCo Line 242  class Bruce : public escript::AbstractCo
242       \brief       \brief
243       Copies the location of data points on the domain into out.       Copies the location of data points on the domain into out.
244    */    */
245      BRUCE_DLL_API
246    virtual    virtual
247    void    void
248    setToX(escript::Data& out) const;    setToX(escript::Data& out) const;
# Line 231  class Bruce : public escript::AbstractCo Line 251  class Bruce : public escript::AbstractCo
251       \brief       \brief
252       Returns the element size.       Returns the element size.
253    */    */
254      BRUCE_DLL_API
255    virtual    virtual
256    escript::Data    escript::Data
257    getSize() const;    getSize() const;
# Line 239  class Bruce : public escript::AbstractCo Line 260  class Bruce : public escript::AbstractCo
260       \brief       \brief
261       Copies the size of samples into out.       Copies the size of samples into out.
262    */    */
263      BRUCE_DLL_API
264    virtual    virtual
265    void    void
266    setToSize(escript::Data& out) const;    setToSize(escript::Data& out) const;
# Line 248  class Bruce : public escript::AbstractCo Line 270  class Bruce : public escript::AbstractCo
270       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
271       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.
272    */    */
273      BRUCE_DLL_API
274    virtual    virtual
275    void    void
276    setToGradient(escript::Data& grad,    setToGradient(escript::Data& grad,
# Line 257  class Bruce : public escript::AbstractCo Line 280  class Bruce : public escript::AbstractCo
280       \brief       \brief
281       Comparison operators.       Comparison operators.
282    */    */
283      BRUCE_DLL_API
284    virtual bool operator==(const AbstractDomain& other) const;    virtual bool operator==(const AbstractDomain& other) const;
285      BRUCE_DLL_API
286    virtual bool operator!=(const AbstractDomain& other) const;    virtual bool operator!=(const AbstractDomain& other) const;
287    
288    /*    /*
# Line 265  class Bruce : public escript::AbstractCo Line 290  class Bruce : public escript::AbstractCo
290       Return the tag key for the given sample number.       Return the tag key for the given sample number.
291       NB: tags are not implemented on Bruce, so this method always returns 0.       NB: tags are not implemented on Bruce, so this method always returns 0.
292    */    */
293      BRUCE_DLL_API
294    virtual    virtual
295    inline    inline
296    int    int
# Line 278  class Bruce : public escript::AbstractCo Line 304  class Bruce : public escript::AbstractCo
304       \brief       \brief
305       Return the reference number of the given sample number.       Return the reference number of the given sample number.
306    */    */
307      BRUCE_DLL_API
308    virtual    virtual
309    int    int
310    getReferenceNoFromSampleNo(int functionSpaceCode,    getReferenceNoFromSampleNo(int functionSpaceCode,
# Line 289  class Bruce : public escript::AbstractCo Line 316  class Bruce : public escript::AbstractCo
316       The dictionary consists of pairs of Data objects plus a name       The dictionary consists of pairs of Data objects plus a name
317       for each. Each Data object must be defined on this domain.       for each. Each Data object must be defined on this domain.
318    */    */
319      BRUCE_DLL_API
320    virtual    virtual
321    void    void
322    saveVTK(const std::string& filename,    saveVTK(const std::string& filename,
# Line 299  class Bruce : public escript::AbstractCo Line 327  class Bruce : public escript::AbstractCo
327       Interpolates data given on source onto target where source and target       Interpolates data given on source onto target where source and target
328       have to be given on the same domain.       have to be given on the same domain.
329    */    */
330      BRUCE_DLL_API
331    virtual    virtual
332    void    void
333    interpolateOnDomain(escript::Data& target,    interpolateOnDomain(escript::Data& target,
334                        const escript::Data& source) const;                        const escript::Data& source) const;
335    
336      BRUCE_DLL_API
337    virtual    virtual
338    bool    bool
339    probeInterpolationOnDomain(int functionSpaceType_source,    probeInterpolationOnDomain(int functionSpaceType_source,
# Line 314  class Bruce : public escript::AbstractCo Line 344  class Bruce : public escript::AbstractCo
344       Interpolates data given on source onto target where source and target       Interpolates data given on source onto target where source and target
345       are given on different domains.       are given on different domains.
346    */    */
347      BRUCE_DLL_API
348    virtual    virtual
349    void    void
350    interpolateACross(escript::Data& target,    interpolateACross(escript::Data& target,
351                      const escript::Data& source) const;                      const escript::Data& source) const;
352    
353      BRUCE_DLL_API
354    virtual    virtual
355    bool    bool
356    probeInterpolationACross(int functionSpaceType_source,    probeInterpolationACross(int functionSpaceType_source,
# Line 331  class Bruce : public escript::AbstractCo Line 363  class Bruce : public escript::AbstractCo
363       \brief       \brief
364       Build the table of function space type names.       Build the table of function space type names.
365    */    */
366      BRUCE_DLL_API
367    void    void
368    setFunctionSpaceTypeNames();    setFunctionSpaceTypeNames();
369    
# Line 338  class Bruce : public escript::AbstractCo Line 371  class Bruce : public escript::AbstractCo
371       \brief       \brief
372       Ensure the parameters supplied to the constructor are valid.       Ensure the parameters supplied to the constructor are valid.
373    */    */
374      BRUCE_DLL_API
375    bool    bool
376    checkParameters();    checkParameters();
377    
# Line 345  class Bruce : public escript::AbstractCo Line 379  class Bruce : public escript::AbstractCo
379       \brief       \brief
380       Check if all components of vector are zero.       Check if all components of vector are zero.
381    */    */
382      BRUCE_DLL_API
383    static    static
384    bool    bool
385    isZero(DimVec vec);    isZero(DimVec vec);

Legend:
Removed from v.734  
changed lines
  Added in v.742

  ViewVC Help
Powered by ViewVC 1.1.26