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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (hide annotations)
Tue Oct 26 06:53:54 2004 UTC (14 years, 11 months ago) by jgs
Original Path: trunk/esys2/escript/src/Data/DataFactory.h
File MIME type: text/plain
File size: 3180 byte(s)
Initial revision

1 jgs 82 // $Id$
2     /*
3     ******************************************************************************
4     * *
5     * COPYRIGHT ACcESS 2004 - All Rights Reserved *
6     * *
7     * This software is the property of ACcESS. No part of this code *
8     * may be copied in any form or by any means without the expressed written *
9     * consent of ACcESS. Copying, use or modification of this software *
10     * by any unauthorised person is illegal unless that person has a software *
11     * license agreement with ACcESS. *
12     * *
13     ******************************************************************************
14     */
15    
16     #if !defined escript_DataFactory_20040721_H
17     #define escript_DataFactory_20040721_H
18    
19     #include "escript/Data/FunctionSpace.h"
20     #include "escript/Data/Data.h"
21    
22     #include <boost/python/object.hpp>
23    
24     namespace escript {
25    
26     /**
27     \brief
28     A collection of factory functions for creating Data objects which contain
29     data points of various shapes.
30     */
31    
32     /**
33     \brief
34     Return a Data object containing scalar data-points.
35     ie: rank 0 data-points.
36     \param value - Input - Single value applied to all Data.
37     \param what - Input - A description of what this data represents.
38     \param expanded - Input - if true fill the entire container with
39     the value. Otherwise a more efficient storage
40     mechanism will be used.
41     */
42     Data
43     Scalar(double value,
44     const FunctionSpace& what=FunctionSpace(),
45     bool expanded=false);
46    
47     /**
48     \brief
49     Return a Data object containing vector data-points.
50     ie: rank 1 data-points.
51     */
52     Data
53     Vector(double value,
54     const FunctionSpace& what=FunctionSpace(),
55     bool expanded=false);
56    
57     /**
58     \brief
59     Return a Data object containing tensor datapoints.
60     ie: rank 2 data-points.
61     */
62     Data
63     Tensor(double value,
64     const FunctionSpace& what=FunctionSpace(),
65     bool expanded=false);
66    
67     /**
68     \brief
69     Return a Data object containing tensor3 datapoints.
70     ie: rank 3 data-points.
71     */
72     Data
73     Tensor3(double value,
74     const FunctionSpace& what=FunctionSpace(),
75     bool expanded=false);
76    
77     /**
78     \brief
79     Return a Data object containing tensor4 datapoints.
80     ie: rank 4 data-points.
81     */
82     Data
83     Tensor4(double value,
84     const FunctionSpace& what=FunctionSpace(),
85     bool expanded=false);
86    
87     /**
88     \brief
89     Tries to convert value into a Data object on FunctionSpace what.
90     If value is already a Data object, the object is returned if it is defined on what otherwise
91     interpolated data of values are returned. If value is not a data object it is tried to generate
92     the corresponding data object. escript::DataEmpty() is returned if value is identified as empty.
93     */
94     Data
95     convertToData(const boost::python::object& value,
96     const FunctionSpace& what=FunctionSpace());
97    
98     } // end of namespace
99    
100     #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26