Commit 95079f5a authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Add XdmfDataItems to XdmfTopology and XdmfGeometry and write them out...

ENH: Add XdmfDataItems to XdmfTopology and XdmfGeometry and write them out correctly in the XdmfVisitor.  Verified to work with simple Hexahedron file.
parent 1e29d5ae
......@@ -136,6 +136,8 @@ class XdmfDataItemPtr(_object):
__swig_destroy__ = _Xdmf.delete_XdmfDataItemPtr
__del__ = lambda self : None;
def New(self): return _Xdmf.XdmfDataItemPtr_New(self)
def getNumberValues(self): return _Xdmf.XdmfDataItemPtr_getNumberValues(self)
def setNumberValues(self, *args): return _Xdmf.XdmfDataItemPtr_setNumberValues(self, *args)
def printSelf(self): return _Xdmf.XdmfDataItemPtr_printSelf(self)
def write(self, *args): return _Xdmf.XdmfDataItemPtr_write(self, *args)
XdmfDataItemPtr_swigregister = _Xdmf.XdmfDataItemPtr_swigregister
......@@ -159,6 +161,8 @@ class XdmfGeometryPtr(_object):
def setGeometryType(self, *args): return _Xdmf.XdmfGeometryPtr_setGeometryType(self, *args)
def getGeometryTypeAsString(self): return _Xdmf.XdmfGeometryPtr_getGeometryTypeAsString(self)
def getDimensions(self): return _Xdmf.XdmfGeometryPtr_getDimensions(self)
def getData(self, *args): return _Xdmf.XdmfGeometryPtr_getData(self, *args)
def setData(self, *args): return _Xdmf.XdmfGeometryPtr_setData(self, *args)
def printSelf(self): return _Xdmf.XdmfGeometryPtr_printSelf(self)
def write(self, *args): return _Xdmf.XdmfGeometryPtr_write(self, *args)
XdmfGeometryPtr_swigregister = _Xdmf.XdmfGeometryPtr_swigregister
......@@ -247,6 +251,8 @@ class XdmfTopologyPtr(_object):
def setNumberElements(self, *args): return _Xdmf.XdmfTopologyPtr_setNumberElements(self, *args)
def getTopologyTypeAsString(self): return _Xdmf.XdmfTopologyPtr_getTopologyTypeAsString(self)
def getNodesPerElement(self): return _Xdmf.XdmfTopologyPtr_getNodesPerElement(self)
def getData(self, *args): return _Xdmf.XdmfTopologyPtr_getData(self, *args)
def setData(self, *args): return _Xdmf.XdmfTopologyPtr_setData(self, *args)
def printSelf(self): return _Xdmf.XdmfTopologyPtr_printSelf(self)
def write(self, *args): return _Xdmf.XdmfTopologyPtr_write(self, *args)
XdmfTopologyPtr_swigregister = _Xdmf.XdmfTopologyPtr_swigregister
......@@ -462,6 +468,8 @@ class XdmfDataItem(XdmfItem):
__repr__ = _swig_repr
__swig_getmethods__["New"] = lambda x: _Xdmf.XdmfDataItem_New
if _newclass:New = staticmethod(_Xdmf.XdmfDataItem_New)
def getNumberValues(self): return _Xdmf.XdmfDataItem_getNumberValues(self)
def setNumberValues(self, *args): return _Xdmf.XdmfDataItem_setNumberValues(self, *args)
def printSelf(self): return _Xdmf.XdmfDataItem_printSelf(self)
def write(self, *args): return _Xdmf.XdmfDataItem_write(self, *args)
XdmfDataItem_swigregister = _Xdmf.XdmfDataItem_swigregister
......@@ -564,6 +572,8 @@ class XdmfGeometry(XdmfItem):
def setGeometryType(self, *args): return _Xdmf.XdmfGeometry_setGeometryType(self, *args)
def getGeometryTypeAsString(self): return _Xdmf.XdmfGeometry_getGeometryTypeAsString(self)
def getDimensions(self): return _Xdmf.XdmfGeometry_getDimensions(self)
def getData(self, *args): return _Xdmf.XdmfGeometry_getData(self, *args)
def setData(self, *args): return _Xdmf.XdmfGeometry_setData(self, *args)
def printSelf(self): return _Xdmf.XdmfGeometry_printSelf(self)
def write(self, *args): return _Xdmf.XdmfGeometry_write(self, *args)
XdmfGeometry_swigregister = _Xdmf.XdmfGeometry_swigregister
......@@ -692,6 +702,8 @@ class XdmfTopology(XdmfItem):
def setNumberElements(self, *args): return _Xdmf.XdmfTopology_setNumberElements(self, *args)
def getTopologyTypeAsString(self): return _Xdmf.XdmfTopology_getTopologyTypeAsString(self)
def getNodesPerElement(self): return _Xdmf.XdmfTopology_getNodesPerElement(self)
def getData(self, *args): return _Xdmf.XdmfTopology_getData(self, *args)
def setData(self, *args): return _Xdmf.XdmfTopology_setData(self, *args)
def printSelf(self): return _Xdmf.XdmfTopology_printSelf(self)
def write(self, *args): return _Xdmf.XdmfTopology_write(self, *args)
XdmfTopology_swigregister = _Xdmf.XdmfTopology_swigregister
......
......@@ -9,7 +9,8 @@
#include "XdmfVisitor.hpp"
XdmfDataItem::XdmfDataItem() :
mDataType(XdmfDataItemType::Unknown())
mDataType(XdmfDataItemType::Unknown()),
mNumberValues(0)
{
std::cout << "Created DataItem " << this << std::endl;
}
......@@ -31,6 +32,28 @@ void XdmfDataItem::setData<int>(int* dataPointer)
mDataType = XdmfDataItemType::Int32();
}
template <>
int* XdmfDataItem::getData<int>()
{
return mDataPointer;
}
template <>
const int* const XdmfDataItem::getData<int>() const
{
return mDataPointer;
}
int XdmfDataItem::getNumberValues() const
{
return mNumberValues;
}
void XdmfDataItem::setNumberValues(int numValues)
{
mNumberValues = numValues;
}
void XdmfDataItem::write(boost::shared_ptr<XdmfVisitor> visitor) const
{
visitor->visit(this);
......
......@@ -20,7 +20,13 @@ public:
template <typename T> void setData(T * dataPointer);
//int setData(int * dataPointer)
template <typename T> T* getData();
template <typename T> const T* const getData() const;
int getNumberValues() const;
void setNumberValues(int numValues);
std::string printSelf() const;
......@@ -38,6 +44,7 @@ private:
int* mDataPointer;
XdmfDataItemType mDataType;
int mNumberValues;
};
#endif /* XDMFDATAITEM_HPP_ */
......@@ -5,11 +5,13 @@
* Author: kleiter
*/
#include "XdmfDataItem.hpp"
#include "XdmfGeometry.hpp"
#include "XdmfVisitor.hpp"
XdmfGeometry::XdmfGeometry() :
mGeometryType(XdmfGeometryType::NoGeometryType())
mPointData(XdmfDataItem::New()),
mGeometryType(XdmfGeometryType::NoGeometryType())
{
std::cout << "Created Geometry " << this << std::endl;
}
......@@ -39,6 +41,21 @@ int XdmfGeometry::getDimensions() const
return mGeometryType.getDimensions();
}
boost::shared_ptr<XdmfDataItem> XdmfGeometry::getData()
{
return mPointData;
}
boost::shared_ptr<const XdmfDataItem> XdmfGeometry::getData() const
{
return mPointData;
}
void XdmfGeometry::setData(boost::shared_ptr<XdmfDataItem> pointData)
{
mPointData = pointData;
}
std::string XdmfGeometry::printSelf() const
{
return "XdmfGeometry";
......
......@@ -8,6 +8,8 @@
#ifndef XDMFGEOMETRY_HPP_
#define XDMFGEOMETRY_HPP_
class XdmfDataItem;
// Includes
#include "XdmfItem.hpp"
#include "XdmfGeometryType.hpp"
......@@ -33,19 +35,34 @@ public:
void setGeometryType(const XdmfGeometryType&);
/**
* Get the name of the GeometryType associated with this Geometry.
* Get the name of the XdmfGeometryType associated with this Geometry.
*
* @return std::string containing name of the GeometryType.
*/
std::string getGeometryTypeAsString() const;
/**
* Get the number of dimensions for this Geometry.
* Get the number of dimensions associated with this Geometry.
*
* @return int giving number of dimensions: i.e. XY = 2, XYZ = 3.
*/
int getDimensions() const;
/**
* Get the point data associated with this Geometry;
*/
boost::shared_ptr<XdmfDataItem> getData();
/**
* Get the data associated with this Geometry (const version)
*/
boost::shared_ptr<const XdmfDataItem> getData() const;
/**
* Set the point data associated with this Geometry
*/
void setData(boost::shared_ptr<XdmfDataItem> pointData);
virtual std::string printSelf() const;
virtual void write(boost::shared_ptr<XdmfVisitor> visitor) const;
......@@ -61,6 +78,7 @@ private:
void operator=(const XdmfGeometry&); // Not implemented.
XdmfGeometryType mGeometryType;
boost::shared_ptr<XdmfDataItem> mPointData;
};
......
......@@ -2700,17 +2700,17 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_XdmfVisitor swig_types[12]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfAttribute_const_t swig_types[13]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfAttribute_t swig_types[14]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t swig_types[15]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_const_t swig_types[16]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t swig_types[17]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t swig_types[18]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfItem_t swig_types[19]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfObject_t swig_types[20]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_const_t swig_types[21]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t swig_types[22]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfVisitor_t swig_types[23]
#define SWIGTYPE_p_char swig_types[24]
#define SWIGTYPE_p_int swig_types[25]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_const_t swig_types[15]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t swig_types[16]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_const_t swig_types[17]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t swig_types[18]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t swig_types[19]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfItem_t swig_types[20]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfObject_t swig_types[21]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_const_t swig_types[22]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t swig_types[23]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfVisitor_t swig_types[24]
#define SWIGTYPE_p_char swig_types[25]
#define SWIGTYPE_p_std__invalid_argument swig_types[26]
#define SWIGTYPE_p_swig__SwigPyIterator swig_types[27]
static swig_type_info *swig_types[29];
......@@ -3328,6 +3328,22 @@ SWIG_From_int (int value)
#endif
SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
long v;
int res = SWIG_AsVal_long (obj, &v);
if (SWIG_IsOK(res)) {
if ((v < INT_MIN || v > INT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< int >(v);
}
}
return res;
}
SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
......@@ -3373,22 +3389,6 @@ SWIG_From_unsigned_SS_int (unsigned int value)
#include <XdmfTopologyType.hpp>
#include <XdmfVisitor.hpp>
SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
long v;
int res = SWIG_AsVal_long (obj, &v);
if (SWIG_IsOK(res)) {
if ((v < INT_MIN || v > INT_MAX)) {
return SWIG_OverflowError;
} else {
if (val) *val = static_cast< int >(v);
}
}
return res;
}
#ifdef __cplusplus
extern "C" {
#endif
......@@ -4672,6 +4672,58 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfDataItemPtr_getNumberValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDataItem > *arg1 = (boost::shared_ptr< XdmfDataItem > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
int result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDataItemPtr_getNumberValues",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataItemPtr_getNumberValues" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDataItem > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDataItem > * >(argp1);
result = (int)(*arg1)->getNumberValues();
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDataItemPtr_setNumberValues(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDataItem > *arg1 = (boost::shared_ptr< XdmfDataItem > *) 0 ;
int arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDataItemPtr_setNumberValues",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataItemPtr_setNumberValues" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDataItem > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDataItem > * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XdmfDataItemPtr_setNumberValues" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
(*arg1)->setNumberValues(arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDataItemPtr_printSelf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDataItem > *arg1 = (boost::shared_ptr< XdmfDataItem > *) 0 ;
......@@ -4916,6 +4968,126 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr_getData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGeometry > *arg1 = (boost::shared_ptr< XdmfGeometry > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
boost::shared_ptr< XdmfDataItem > result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfGeometryPtr_getData",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfGeometryPtr_getData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfGeometry > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfGeometry > * >(argp1);
result = (*arg1)->getData();
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfDataItem >(static_cast< const boost::shared_ptr< XdmfDataItem >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr_getData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGeometry > *arg1 = (boost::shared_ptr< XdmfGeometry > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
SwigValueWrapper< boost::shared_ptr< XdmfDataItem const > > result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfGeometryPtr_getData",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfGeometryPtr_getData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfGeometry > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfGeometry > * >(argp1);
result = (*arg1)->getData();
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfDataItem const >(static_cast< const boost::shared_ptr< XdmfDataItem const >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_const_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr_getData(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[2];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_XdmfGeometryPtr_getData__SWIG_0(self, args);
}
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_XdmfGeometryPtr_getData__SWIG_1(self, args);
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'XdmfGeometryPtr_getData'.\n"
" Possible C/C++ prototypes are:\n"
" getData(boost::shared_ptr< XdmfGeometry > *)\n"
" getData(boost::shared_ptr< XdmfGeometry > const *)\n");
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr_setData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGeometry > *arg1 = (boost::shared_ptr< XdmfGeometry > *) 0 ;
boost::shared_ptr< XdmfDataItem > arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfGeometryPtr_setData",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfGeometryPtr_setData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfGeometry > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfGeometry > * >(argp1);
{
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, 0 | 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfGeometryPtr_setData" "', argument " "2"" of type '" "boost::shared_ptr< XdmfDataItem >""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XdmfGeometryPtr_setData" "', argument " "2"" of type '" "boost::shared_ptr< XdmfDataItem >""'");
} else {
boost::shared_ptr< XdmfDataItem > * temp = reinterpret_cast< boost::shared_ptr< XdmfDataItem > * >(argp2);
arg2 = *temp;
if (SWIG_IsNewObj(res2)) delete temp;
}
}
(*arg1)->setData(arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr_printSelf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGeometry > *arg1 = (boost::shared_ptr< XdmfGeometry > *) 0 ;
......@@ -5965,11 +6137,11 @@ fail:
SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_setNumberElements(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfTopology > *arg1 = (boost::shared_ptr< XdmfTopology > *) 0 ;
int *arg2 = 0 ;
int arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
......@@ -5979,15 +6151,12 @@ SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_setNumberElements(PyObject *SWIGUNUSE
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfTopologyPtr_setNumberElements" "', argument " "1"" of type '" "boost::shared_ptr< XdmfTopology > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfTopology > * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_int, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfTopologyPtr_setNumberElements" "', argument " "2"" of type '" "int &""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XdmfTopologyPtr_setNumberElements" "', argument " "2"" of type '" "int &""'");
}
arg2 = reinterpret_cast< int * >(argp2);
(*arg1)->setNumberElements(*arg2);
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XdmfTopologyPtr_setNumberElements" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
(*arg1)->setNumberElements(arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
......@@ -6039,6 +6208,126 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_getData__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfTopology > *arg1 = (boost::shared_ptr< XdmfTopology > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
boost::shared_ptr< XdmfDataItem > result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfTopologyPtr_getData",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfTopologyPtr_getData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfTopology > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfTopology > * >(argp1);
result = (*arg1)->getData();
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfDataItem >(static_cast< const boost::shared_ptr< XdmfDataItem >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_getData__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfTopology > *arg1 = (boost::shared_ptr< XdmfTopology > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
SwigValueWrapper< boost::shared_ptr< XdmfDataItem const > > result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfTopologyPtr_getData",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfTopologyPtr_getData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfTopology > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfTopology > * >(argp1);
result = (*arg1)->getData();
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfDataItem const >(static_cast< const boost::shared_ptr< XdmfDataItem const >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_const_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_getData(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[2];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 1); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_XdmfTopologyPtr_getData__SWIG_0(self, args);
}
}
if (argc == 1) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_XdmfTopologyPtr_getData__SWIG_1(self, args);
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'XdmfTopologyPtr_getData'.\n"
" Possible C/C++ prototypes are:\n"
" getData(boost::shared_ptr< XdmfTopology > *)\n"
" getData(boost::shared_ptr< XdmfTopology > const *)\n");
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfTopologyPtr_setData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfTopology > *arg1 = (boost::shared_ptr< XdmfTopology > *) 0 ;
boost::shared_ptr< XdmfDataItem > arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfTopologyPtr_setData",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfTopologyPtr_setData" "', argument " "1"" of type '" "boost::shared_ptr< XdmfTopology > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfTopology > * >(argp1);
{
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t, 0 | 0);
if (!SWIG_IsOK(res2)) {