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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 615 - (show annotations)
Wed Mar 22 02:12:00 2006 UTC (13 years, 8 months ago) by elspeth
File MIME type: text/plain
File size: 2832 byte(s)
More copyright information.

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
17 #include "FunctionSpace.h"
18 #include "Data.h"
19
20 #include <boost/python/object.hpp>
21
22 namespace escript {
23
24 /**
25 \brief
26 A collection of factory functions for creating Data objects which contain
27 data points of various shapes.
28 */
29
30 /**
31 \brief
32 Return a Data object containing scalar data-points.
33 ie: rank 0 data-points.
34 \param value - Input - Single value applied to all Data.
35 \param what - Input - A description of what this data represents.
36 \param expanded - Input - if true fill the entire container with
37 the value. Otherwise a more efficient storage
38 mechanism will be used.
39 */
40 Data
41 Scalar(double value,
42 const FunctionSpace& what=FunctionSpace(),
43 bool expanded=false);
44
45 /**
46 \brief
47 Return a Data object containing vector data-points.
48 ie: rank 1 data-points.
49 */
50 Data
51 Vector(double value,
52 const FunctionSpace& what=FunctionSpace(),
53 bool expanded=false);
54
55 /**
56 \brief
57 Return a Data object containing tensor datapoints.
58 ie: rank 2 data-points.
59 */
60 Data
61 Tensor(double value,
62 const FunctionSpace& what=FunctionSpace(),
63 bool expanded=false);
64
65 /**
66 \brief
67 Return a Data object containing tensor3 datapoints.
68 ie: rank 3 data-points.
69 */
70 Data
71 Tensor3(double value,
72 const FunctionSpace& what=FunctionSpace(),
73 bool expanded=false);
74
75 /**
76 \brief
77 Return a Data object containing tensor4 datapoints.
78 ie: rank 4 data-points.
79 */
80 Data
81 Tensor4(double value,
82 const FunctionSpace& what=FunctionSpace(),
83 bool expanded=false);
84
85 /**
86 \brief
87 Tries to convert value into a Data object on FunctionSpace what.
88 If value is already a Data object, the object is returned if it is defined on what otherwise
89 interpolated data of values are returned. If value is not a data object it is tried to generate
90 the corresponding data object. escript::DataEmpty() is returned if value is identified as empty.
91 */
92 Data
93 convertToData(const boost::python::object& value,
94 const FunctionSpace& what=FunctionSpace());
95
96 } // end of namespace
97
98 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26