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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2005 - (show annotations)
Mon Nov 10 01:21:39 2008 UTC (10 years, 9 months ago) by jfenwick
File MIME type: text/plain
File size: 3003 byte(s)
Bringing all changes across from schroedinger.
(Note this does not mean development is done, just that it will happen
on the trunk for now).
If anyone notices any problems please contact me.


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26