/[escript]/trunk/escript/src/DataFactory.h
ViewVC logotype

Annotation of /trunk/escript/src/DataFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 757 - (hide annotations)
Mon Jun 26 13:12:56 2006 UTC (13 years, 3 months ago) by woo409
File MIME type: text/plain
File size: 2952 byte(s)
+ Merge of intelc_win32 branch (revision 741:755) with trunk. Tested on iVEC altix (run_tests and py_tests all pass)

1 jgs 82 // $Id$
2     /*
3 elspeth 615 ************************************************************
4     * Copyright 2006 by ACcESS MNRF *
5     * *
6     * http://www.access.edu.au *
7     * Primary Business: Queensland, Australia *
8     * Licensed under the Open Software License version 3.0 *
9     * http://www.opensource.org/licenses/osl-3.0.php *
10     * *
11     ************************************************************
12 jgs 82 */
13    
14     #if !defined escript_DataFactory_20040721_H
15     #define escript_DataFactory_20040721_H
16 woo409 757 #include "system_dep.h"
17 jgs 82
18 jgs 474 #include "FunctionSpace.h"
19     #include "Data.h"
20 jgs 82
21     #include <boost/python/object.hpp>
22    
23     namespace escript {
24    
25     /**
26     \brief
27     A collection of factory functions for creating Data objects which contain
28     data points of various shapes.
29     */
30    
31     /**
32     \brief
33     Return a Data object containing scalar data-points.
34     ie: rank 0 data-points.
35     \param value - Input - Single value applied to all Data.
36     \param what - Input - A description of what this data represents.
37     \param expanded - Input - if true fill the entire container with
38     the value. Otherwise a more efficient storage
39     mechanism will be used.
40     */
41 woo409 757 ESCRIPT_DLL_API Data
42 jgs 82 Scalar(double value,
43     const FunctionSpace& what=FunctionSpace(),
44     bool expanded=false);
45    
46     /**
47     \brief
48     Return a Data object containing vector data-points.
49     ie: rank 1 data-points.
50     */
51 woo409 757 ESCRIPT_DLL_API Data
52 jgs 82 Vector(double value,
53     const FunctionSpace& what=FunctionSpace(),
54     bool expanded=false);
55    
56     /**
57     \brief
58     Return a Data object containing tensor datapoints.
59     ie: rank 2 data-points.
60     */
61 woo409 757 ESCRIPT_DLL_API Data
62 jgs 82 Tensor(double value,
63     const FunctionSpace& what=FunctionSpace(),
64     bool expanded=false);
65    
66     /**
67     \brief
68     Return a Data object containing tensor3 datapoints.
69     ie: rank 3 data-points.
70     */
71 woo409 757 ESCRIPT_DLL_API Data
72 jgs 82 Tensor3(double value,
73     const FunctionSpace& what=FunctionSpace(),
74     bool expanded=false);
75    
76     /**
77     \brief
78     Return a Data object containing tensor4 datapoints.
79     ie: rank 4 data-points.
80     */
81 woo409 757 ESCRIPT_DLL_API Data
82 jgs 82 Tensor4(double value,
83     const FunctionSpace& what=FunctionSpace(),
84     bool expanded=false);
85    
86     /**
87     \brief
88     Tries to convert value into a Data object on FunctionSpace what.
89     If value is already a Data object, the object is returned if it is defined on what otherwise
90     interpolated data of values are returned. If value is not a data object it is tried to generate
91     the corresponding data object. escript::DataEmpty() is returned if value is identified as empty.
92     */
93 woo409 757 ESCRIPT_DLL_API Data
94 jgs 82 convertToData(const boost::python::object& value,
95     const FunctionSpace& what=FunctionSpace());
96    
97     } // end of namespace
98    
99     #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26