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

Diff of /trunk/escript/src/DataC.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/escript/src/Data/DataC.h revision 100 by jgs, Wed Dec 15 03:48:48 2004 UTC trunk/escript/src/DataC.h revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 1  Line 1 
1    /* $Id$ */
2  /*  /*
3   ******************************************************************************   ************************************************************
4   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *                                                          *
6   *                                                                            *   *              http://www.access.edu.au                    *
7   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
8   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
10   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
11   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
12  */  */
13                                                                              
14  #if !defined  escript_DataC_20040611_H  #if !defined  escript_DataC_20040611_H
15  #define escript_DataC_20040611_H  #define escript_DataC_20040611_H
16    #include "system_dep.h"
17    
18  #define ESCRIPT_MAX_DATA_RANK 4  #define ESCRIPT_MAX_DATA_RANK 4
19  /**  /**
# Line 35  typedef struct escriptDataC escriptDataC Line 35  typedef struct escriptDataC escriptDataC
35     Return the function space type code.     Return the function space type code.
36     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
37  */  */
38  int getFunctionSpaceType(escriptDataC* data);  ESCRIPT_DLL_API int getFunctionSpaceType(escriptDataC* data);
39    
40  /**  /**
41     \brief     \brief
# Line 51  int getFunctionSpaceType(escriptDataC* d Line 51  int getFunctionSpaceType(escriptDataC* d
51     \param _fs_ Input - function space type to checked against     \param _fs_ Input - function space type to checked against
52     \param _data_ Input - C wrapper for Data.     \param _data_ Input - C wrapper for Data.
53  */  */
54  #define functionSpaceTypeEqual(_fs_,_data_) ( (_fs_==getFunctionSpaceType(_data_)) || isEmpty(_data_) ) ? 1 : 0  #define functionSpaceTypeEqual(_fs_,_data_) ( (isEmpty(_data_) || _fs_==getFunctionSpaceType(_data_)) ) ? 1 : 0
55    
56  /**  /**
57     \brief     \brief
58     Returns the true if the data are empty or data is NULL.     Returns the true if the data are empty or data is NULL.
59     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
60  */  */
61  int isEmpty(escriptDataC* data);  ESCRIPT_DLL_API int isEmpty(escriptDataC* data);
62    
63  /**  /**
64     \brief     \brief
# Line 67  int isEmpty(escriptDataC* data); Line 67  int isEmpty(escriptDataC* data);
67     \param rank Input - number of dimensions.     \param rank Input - number of dimensions.
68     \param dimensions Input -     \param dimensions Input -
69  */  */
70  int isDataPointShapeEqual(escriptDataC* data, int rank, int* dimensions);  ESCRIPT_DLL_API int isDataPointShapeEqual(escriptDataC* data, int rank, int* dimensions);
71  /**  /**
72     \brief     \brief
73     Return true if the number of data points per sample and the number     Return true if the number of data points per sample and the number
74     of samples equal the input values. In the case that data is empty or NULL,     of samples equal the input values. In the case that data is empty or NULL,
75     true is returned.     true is returned.
76     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
77     \param noDataPointsPerSample Input - number of data points per sample     \param numDataPointsPerSample Input - number of data points per sample
78     \param noSamples Input - number of samples     \param numSamples Input - number of samples
79  */  */
80  int numSamplesEqual(escriptDataC* data, int numDataPointsPerSample,  ESCRIPT_DLL_API int numSamplesEqual(escriptDataC* data, int numDataPointsPerSample,
81              int numSamples);              int numSamples);
82    
83  /**  /**
# Line 85  int numSamplesEqual(escriptDataC* data, Line 85  int numSamplesEqual(escriptDataC* data,
85     Returns the rank of the point data for the data.     Returns the rank of the point data for the data.
86     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
87  */  */
88  int getDataPointRank(escriptDataC* data);  ESCRIPT_DLL_API int getDataPointRank(escriptDataC* data);
89    
90  /**  /**
91     \brief     \brief
92     Returns the pointer to the shape array of the point data.     Returns the value of the i-th component of the shape of the point data.
93     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
94       \param i Input - index of shape component.
95  */  */
96  int* getDataPointShape(escriptDataC* data);  ESCRIPT_DLL_API int getDataPointShape(escriptDataC* data,int i);
97    
98  /**  /**
99     \brief     \brief
100     Return the number of doubles needed for each data point.     Return the number of doubles needed for each data point.
101     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
102  */  */
103  int getDataPointSize(escriptDataC* data);  ESCRIPT_DLL_API int getDataPointSize(escriptDataC* data);
104  /**  /**
105     \brief     \brief
106     Return the number of doubles stored for the Data object.     Return the number of doubles stored for the Data object.
107     Argument data may be NULL, in which case 0 is returnd.     Argument data may be NULL, in which case 0 is returnd.
108     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
109  */  */
110  int getLength(escriptDataC* data);  ESCRIPT_DLL_API int getLength(escriptDataC* data);
111  /**  /**
112     \brief     \brief
113     Return true if data is expanded.     Return true if data is expanded.
114     Argument data may be NULL, in which case false is returnd.     Argument data may be NULL, in which case false is returnd.
115     \param data Input - C wrapper for Data.     \param data Input - C wrapper for Data.
116  */  */
117  int isExpanded(escriptDataC* data);  ESCRIPT_DLL_API int isExpanded(escriptDataC* data);
118  /**  /**
119     \brief     \brief
120     Return a pointer to the data for the given sample number.     Return a pointer to the data for the given sample number.
# Line 122  int isExpanded(escriptDataC* data); Line 123  int isExpanded(escriptDataC* data);
123    \param data Input - C wrapper for Data.    \param data Input - C wrapper for Data.
124    \param sampleNo Input - The sample number.    \param sampleNo Input - The sample number.
125  */  */
126  double* getSampleData(escriptDataC* data, int sampleNo);  ESCRIPT_DLL_API double* getSampleData(escriptDataC* data, int sampleNo);
   
127  #endif  #endif

Legend:
Removed from v.100  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26