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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 757 - (show 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 // $Id$
2 /*
3 ************************************************************
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 */
13
14 #if !defined escript_DataFactory_20040721_H
15 #define escript_DataFactory_20040721_H
16 #include "system_dep.h"
17
18 #include "FunctionSpace.h"
19 #include "Data.h"
20
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 ESCRIPT_DLL_API Data
42 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 ESCRIPT_DLL_API Data
52 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 ESCRIPT_DLL_API Data
62 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 ESCRIPT_DLL_API Data
72 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 ESCRIPT_DLL_API Data
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 ESCRIPT_DLL_API Data
94 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