/[escript]/trunk-mpi-branch/escript/src/DataFactory.h
ViewVC logotype

Contents of /trunk-mpi-branch/escript/src/DataFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1306 - (show annotations)
Tue Sep 18 05:51:09 2007 UTC (11 years, 11 months ago) by ksteube
File MIME type: text/plain
File size: 3037 byte(s)
New Copyright in each .c .h .cpp and .py file

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