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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (hide annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years ago) by ksteube
File MIME type: text/plain
File size: 3037 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1 ksteube 1312
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 jgs 82 #if !defined escript_DataFactory_20040721_H
17     #define escript_DataFactory_20040721_H
18 woo409 757 #include "system_dep.h"
19 jgs 82
20 gross 950 #include "AbstractDomain.h"
21 jgs 474 #include "FunctionSpace.h"
22     #include "Data.h"
23 jgs 82
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 woo409 757 ESCRIPT_DLL_API Data
45 jgs 82 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 woo409 757 ESCRIPT_DLL_API Data
55 jgs 82 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 woo409 757 ESCRIPT_DLL_API Data
65 jgs 82 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 woo409 757 ESCRIPT_DLL_API Data
75 jgs 82 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 woo409 757 ESCRIPT_DLL_API Data
85 jgs 82 Tensor4(double value,
86     const FunctionSpace& what=FunctionSpace(),
87     bool expanded=false);
88 gross 950 /**
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 gross 1023 /**
96     \brief
97     returns true if the load funtion is configured.
98     */
99     ESCRIPT_DLL_API bool
100     loadConfigured();
101 jgs 82
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 woo409 757 ESCRIPT_DLL_API Data
110 jgs 82 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