Commit 5c280140 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Add XdmfDomain.

parent 195746b2
......@@ -25,6 +25,7 @@ set(XdmfSources
XdmfAttributeType
XdmfDataItem
XdmfDataItemType
XdmfDomain
XdmfGeometry
XdmfGeometryType
XdmfGrid
......
......@@ -16,6 +16,7 @@ namespace boost {
%template(XdmfAttributePtr) boost::shared_ptr<XdmfAttribute>;
%template(XdmfDataItemPtr) boost::shared_ptr<XdmfDataItem>;
%template(XdmfDomainPtr) boost::shared_ptr<XdmfDomain>;
%template(XdmfGeometryPtr) boost::shared_ptr<XdmfGeometry>;
%template(XdmfGridPtr) boost::shared_ptr<XdmfGrid>;
%template(XdmfItemPtr) boost::shared_ptr<XdmfItem>;
......@@ -30,6 +31,7 @@ namespace boost {
#include <XdmfAttributeType.hpp>
#include <XdmfDataItem.hpp>
#include <XdmfDataItemType.hpp>
#include <XdmfDomain.hpp>
#include <XdmfGeometry.hpp>
#include <XdmfGeometryType.hpp>
#include <XdmfGrid.hpp>
......@@ -51,6 +53,7 @@ namespace boost {
%include XdmfAttribute.hpp
%include XdmfAttributeCenter.hpp
%include XdmfAttributeType.hpp
%include XdmfDomain.hpp
%include XdmfGeometry.hpp
%include XdmfGeometryType.hpp
%include XdmfGrid.hpp
......
......@@ -144,6 +144,28 @@ class XdmfDataItemPtr(_object):
XdmfDataItemPtr_swigregister = _Xdmf.XdmfDataItemPtr_swigregister
XdmfDataItemPtr_swigregister(XdmfDataItemPtr)
class XdmfDomainPtr(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, XdmfDomainPtr, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, XdmfDomainPtr, name)
__repr__ = _swig_repr
def __deref__(self): return _Xdmf.XdmfDomainPtr___deref__(self)
def __init__(self):
this = _Xdmf.new_XdmfDomainPtr()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _Xdmf.delete_XdmfDomainPtr
__del__ = lambda self : None;
def New(self): return _Xdmf.XdmfDomainPtr_New(self)
def insert(self, *args): return _Xdmf.XdmfDomainPtr_insert(self, *args)
def getGrid(self, *args): return _Xdmf.XdmfDomainPtr_getGrid(self, *args)
def getNumberOfGrids(self): return _Xdmf.XdmfDomainPtr_getNumberOfGrids(self)
def printSelf(self): return _Xdmf.XdmfDomainPtr_printSelf(self)
def write(self, *args): return _Xdmf.XdmfDomainPtr_write(self, *args)
XdmfDomainPtr_swigregister = _Xdmf.XdmfDomainPtr_swigregister
XdmfDomainPtr_swigregister(XdmfDomainPtr)
class XdmfGeometryPtr(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, XdmfGeometryPtr, name, value)
......@@ -191,7 +213,7 @@ class XdmfGridPtr(_object):
def setName(self, *args): return _Xdmf.XdmfGridPtr_setName(self, *args)
def insert(self, *args): return _Xdmf.XdmfGridPtr_insert(self, *args)
def getAttribute(self, *args): return _Xdmf.XdmfGridPtr_getAttribute(self, *args)
def getNumberOfAttribute(self): return _Xdmf.XdmfGridPtr_getNumberOfAttribute(self)
def getNumberOfAttributes(self): return _Xdmf.XdmfGridPtr_getNumberOfAttributes(self)
def printSelf(self): return _Xdmf.XdmfGridPtr_printSelf(self)
def write(self, *args): return _Xdmf.XdmfGridPtr_write(self, *args)
XdmfGridPtr_swigregister = _Xdmf.XdmfGridPtr_swigregister
......@@ -557,6 +579,29 @@ def XdmfAttributeType_GlobalId():
return _Xdmf.XdmfAttributeType_GlobalId()
XdmfAttributeType_GlobalId = _Xdmf.XdmfAttributeType_GlobalId
class XdmfDomain(XdmfItem):
__swig_setmethods__ = {}
for _s in [XdmfItem]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
__setattr__ = lambda self, name, value: _swig_setattr(self, XdmfDomain, name, value)
__swig_getmethods__ = {}
for _s in [XdmfItem]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
__getattr__ = lambda self, name: _swig_getattr(self, XdmfDomain, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
__swig_getmethods__["New"] = lambda x: _Xdmf.XdmfDomain_New
if _newclass:New = staticmethod(_Xdmf.XdmfDomain_New)
def insert(self, *args): return _Xdmf.XdmfDomain_insert(self, *args)
def getGrid(self, *args): return _Xdmf.XdmfDomain_getGrid(self, *args)
def getNumberOfGrids(self): return _Xdmf.XdmfDomain_getNumberOfGrids(self)
def printSelf(self): return _Xdmf.XdmfDomain_printSelf(self)
def write(self, *args): return _Xdmf.XdmfDomain_write(self, *args)
XdmfDomain_swigregister = _Xdmf.XdmfDomain_swigregister
XdmfDomain_swigregister(XdmfDomain)
def XdmfDomain_New():
return _Xdmf.XdmfDomain_New()
XdmfDomain_New = _Xdmf.XdmfDomain_New
class XdmfGeometry(XdmfDataItem):
__swig_setmethods__ = {}
for _s in [XdmfDataItem]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
......@@ -674,7 +719,7 @@ class XdmfGrid(XdmfItem):
def setName(self, *args): return _Xdmf.XdmfGrid_setName(self, *args)
def insert(self, *args): return _Xdmf.XdmfGrid_insert(self, *args)
def getAttribute(self, *args): return _Xdmf.XdmfGrid_getAttribute(self, *args)
def getNumberOfAttribute(self): return _Xdmf.XdmfGrid_getNumberOfAttribute(self)
def getNumberOfAttributes(self): return _Xdmf.XdmfGrid_getNumberOfAttributes(self)
def printSelf(self): return _Xdmf.XdmfGrid_printSelf(self)
def write(self, *args): return _Xdmf.XdmfGrid_write(self, *args)
XdmfGrid_swigregister = _Xdmf.XdmfGrid_swigregister
......
......@@ -68,7 +68,7 @@ public:
void setAttributeCenter(const XdmfAttributeCenter& attributeCenter);
/**
* Get the name of the AttributeCenter associated with this Attribute.
* Get the name of the XdmfAttributeCenter associated with this Attribute.
*
* @return std::string containing name of the AttributeCenter.
*/
......
/*
* XdmfGrid.cpp
*
* Created on: Jan 25, 2010
* Author: kleiter
*/
#include "XdmfDomain.hpp"
#include "XdmfVisitor.hpp"
XdmfDomain::XdmfDomain()
{
std::cout << "Created Domain " << this << std::endl;
}
XdmfDomain::~XdmfDomain()
{
std::cout << "Deleted Domain " << this << std::endl;
}
void XdmfDomain::insert(boost::shared_ptr<XdmfGrid> grid)
{
mGrids.push_back(grid);
}
boost::shared_ptr<XdmfGrid> XdmfDomain::getGrid(unsigned int index)
{
if(index >= mGrids.size())
{
assert(false);
// Out of range --- should we throw exceptions?
}
return mGrids[index];
}
boost::shared_ptr<const XdmfGrid> XdmfDomain::getGrid(unsigned int index) const
{
if(index >= mGrids.size())
{
assert(false);
// Out of range --- should we throw exceptions?
}
return mGrids[index];
}
unsigned int XdmfDomain::getNumberOfGrids() const
{
return mGrids.size();
}
std::string XdmfDomain::printSelf() const
{
return "XdmfDomain";
}
void XdmfDomain::write(boost::shared_ptr<XdmfVisitor> visitor) const
{
visitor->visit(this);
}
// Kenneth Leiter
// Xdmf Smart Pointer Test
#ifndef XDMFDOMAIN_HPP_
#define XDMFDOMAIN_HPP_
// Forward Declarations
class XdmfGrid;
// Includes
#include "XdmfItem.hpp"
#include <vector>
class XdmfDomain : public XdmfItem {
public:
XdmfNewMacro(XdmfDomain);
/**
* Insert a grid into the domain.
*/
void insert(boost::shared_ptr<XdmfGrid>);
/**
* Get a grid attached to this domain.
*
* @param index of the grid to retrieve.
* @return pointer to the grid attached to this domain.
*/
boost::shared_ptr<XdmfGrid> getGrid(unsigned int index);
/**
* Get a grid attached to this domain (const version).
*
* @param index of the grid to retrieve.
* @return pointer to the grid attached to this domain.
*/
boost::shared_ptr<const XdmfGrid> getGrid(unsigned int index) const;
/**
* Get the number of grids attached to this domain
*/
unsigned int getNumberOfGrids() const;
virtual std::string printSelf() const;
virtual void write(boost::shared_ptr<XdmfVisitor> visitor) const;
protected:
XdmfDomain();
virtual ~XdmfDomain();
private:
XdmfDomain(const XdmfDomain&); // Not implemented.
void operator=(const XdmfDomain&); // Not implemented.
std::vector<boost::shared_ptr<XdmfGrid> > mGrids;
};
#endif /* XDMFDOMAIN_HPP_ */
......@@ -98,7 +98,7 @@ boost::shared_ptr<const XdmfAttribute> XdmfGrid::getAttribute(unsigned int index
return mAttributes[index];
}
unsigned int XdmfGrid::getNumberOfAttribute() const
unsigned int XdmfGrid::getNumberOfAttributes() const
{
return mAttributes.size();
}
......
......@@ -99,7 +99,7 @@ public:
/**
* Get the number of attributes attached to this grid
*/
unsigned int getNumberOfAttribute() const;
unsigned int getNumberOfAttributes() const;
virtual std::string printSelf() const;
......
......@@ -2690,30 +2690,33 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_XdmfAttributeType swig_types[2]
#define SWIGTYPE_p_XdmfDataItem swig_types[3]
#define SWIGTYPE_p_XdmfDataItemType swig_types[4]
#define SWIGTYPE_p_XdmfGeometry swig_types[5]
#define SWIGTYPE_p_XdmfGeometryType swig_types[6]
#define SWIGTYPE_p_XdmfGrid swig_types[7]
#define SWIGTYPE_p_XdmfItem swig_types[8]
#define SWIGTYPE_p_XdmfObject swig_types[9]
#define SWIGTYPE_p_XdmfTopology swig_types[10]
#define SWIGTYPE_p_XdmfTopologyType swig_types[11]
#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_std__invalid_argument swig_types[25]
#define SWIGTYPE_p_swig__SwigPyIterator swig_types[26]
static swig_type_info *swig_types[28];
static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
#define SWIGTYPE_p_XdmfDomain swig_types[5]
#define SWIGTYPE_p_XdmfGeometry swig_types[6]
#define SWIGTYPE_p_XdmfGeometryType swig_types[7]
#define SWIGTYPE_p_XdmfGrid swig_types[8]
#define SWIGTYPE_p_XdmfItem swig_types[9]
#define SWIGTYPE_p_XdmfObject swig_types[10]
#define SWIGTYPE_p_XdmfTopology swig_types[11]
#define SWIGTYPE_p_XdmfTopologyType swig_types[12]
#define SWIGTYPE_p_XdmfVisitor swig_types[13]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfAttribute_const_t swig_types[14]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfAttribute_t swig_types[15]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfDataItem_t swig_types[16]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t swig_types[17]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_const_t swig_types[18]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGeometry_t swig_types[19]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_const_t swig_types[20]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t swig_types[21]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfItem_t swig_types[22]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfObject_t swig_types[23]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_const_t swig_types[24]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfTopology_t swig_types[25]
#define SWIGTYPE_p_boost__shared_ptrT_XdmfVisitor_t swig_types[26]
#define SWIGTYPE_p_char swig_types[27]
#define SWIGTYPE_p_std__invalid_argument swig_types[28]
#define SWIGTYPE_p_swig__SwigPyIterator swig_types[29]
static swig_type_info *swig_types[31];
static swig_module_info swig_module = {swig_types, 30, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
......@@ -3379,6 +3382,7 @@ SWIG_From_unsigned_SS_int (unsigned int value)
#include <XdmfAttributeType.hpp>
#include <XdmfDataItem.hpp>
#include <XdmfDataItemType.hpp>
#include <XdmfDomain.hpp>
#include <XdmfGeometry.hpp>
#include <XdmfGeometryType.hpp>
#include <XdmfGrid.hpp>
......@@ -4812,6 +4816,323 @@ SWIGINTERN PyObject *XdmfDataItemPtr_swigregister(PyObject *SWIGUNUSEDPARM(self)
return SWIG_Py_Void();
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
XdmfDomain *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDomainPtr___deref__",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr___deref__" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
result = (XdmfDomain *)((boost::shared_ptr< XdmfDomain > const *)arg1)->operator ->();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XdmfDomain, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_new_XdmfDomainPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)":new_XdmfDomainPtr")) SWIG_fail;
result = (boost::shared_ptr< XdmfDomain > *)new boost::shared_ptr< XdmfDomain >();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_delete_XdmfDomainPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:delete_XdmfDomainPtr",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_POINTER_DISOWN | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XdmfDomainPtr" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
delete arg1;
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_New(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
boost::shared_ptr< XdmfDomain > result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDomainPtr_New",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_New" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
result = (*arg1)->New();
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfDomain >(static_cast< const boost::shared_ptr< XdmfDomain >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
boost::shared_ptr< XdmfGrid > arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDomainPtr_insert",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_insert" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
{
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t, 0 | 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfDomainPtr_insert" "', argument " "2"" of type '" "boost::shared_ptr< XdmfGrid >""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XdmfDomainPtr_insert" "', argument " "2"" of type '" "boost::shared_ptr< XdmfGrid >""'");
} else {
boost::shared_ptr< XdmfGrid > * temp = reinterpret_cast< boost::shared_ptr< XdmfGrid > * >(argp2);
arg2 = *temp;
if (SWIG_IsNewObj(res2)) delete temp;
}
}
(*arg1)->insert(arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_getGrid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
unsigned int arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
boost::shared_ptr< XdmfGrid > result;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDomainPtr_getGrid",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_getGrid" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XdmfDomainPtr_getGrid" "', argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< unsigned int >(val2);
result = (*arg1)->getGrid(arg2);
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfGrid >(static_cast< const boost::shared_ptr< XdmfGrid >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_getGrid__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
unsigned int arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
unsigned int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
SwigValueWrapper< boost::shared_ptr< XdmfGrid const > > result;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDomainPtr_getGrid",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_getGrid" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XdmfDomainPtr_getGrid" "', argument " "2"" of type '" "unsigned int""'");
}
arg2 = static_cast< unsigned int >(val2);
result = (*arg1)->getGrid(arg2);
resultobj = SWIG_NewPointerObj((new boost::shared_ptr< XdmfGrid const >(static_cast< const boost::shared_ptr< XdmfGrid const >& >(result))), SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_const_t, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_getGrid(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[3];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = (int)PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 2); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_XdmfDomainPtr_getGrid__SWIG_0(self, args);
}
}
}
if (argc == 2) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_XdmfDomainPtr_getGrid__SWIG_1(self, args);
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'XdmfDomainPtr_getGrid'.\n"
" Possible C/C++ prototypes are:\n"
" getGrid(boost::shared_ptr< XdmfDomain > *,unsigned int)\n"
" getGrid(boost::shared_ptr< XdmfDomain > const *,unsigned int)\n");
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_getNumberOfGrids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
unsigned int result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDomainPtr_getNumberOfGrids",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_getNumberOfGrids" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
result = (unsigned int)(*arg1)->getNumberOfGrids();
resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_printSelf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDomainPtr_printSelf",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_printSelf" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
result = (*arg1)->printSelf();
resultobj = SWIG_From_std_string(static_cast< std::string >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDomainPtr_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfDomain > *arg1 = (boost::shared_ptr< XdmfDomain > *) 0 ;
boost::shared_ptr< XdmfVisitor > arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDomainPtr_write",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDomainPtr_write" "', argument " "1"" of type '" "boost::shared_ptr< XdmfDomain > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfDomain > * >(argp1);
{
res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_boost__shared_ptrT_XdmfVisitor_t, 0 | 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfDomainPtr_write" "', argument " "2"" of type '" "boost::shared_ptr< XdmfVisitor >""'");
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XdmfDomainPtr_write" "', argument " "2"" of type '" "boost::shared_ptr< XdmfVisitor >""'");
} else {
boost::shared_ptr< XdmfVisitor > * temp = reinterpret_cast< boost::shared_ptr< XdmfVisitor > * >(argp2);
arg2 = *temp;
if (SWIG_IsNewObj(res2)) delete temp;
}
}
(*arg1)->write(arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *XdmfDomainPtr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_boost__shared_ptrT_XdmfDomain_t, SWIG_NewClientData(obj));
return SWIG_Py_Void();
}
SWIGINTERN PyObject *_wrap_XdmfGeometryPtr___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGeometry > *arg1 = (boost::shared_ptr< XdmfGeometry > *) 0 ;
......@@ -5635,7 +5956,7 @@ fail:
}
SWIGINTERN PyObject *_wrap_XdmfGridPtr_getNumberOfAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_XdmfGridPtr_getNumberOfAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfGrid > *arg1 = (boost::shared_ptr< XdmfGrid > *) 0 ;
void *argp1 = 0 ;
......@@ -5643,13 +5964,13 @@ SWIGINTERN PyObject *_wrap_XdmfGridPtr_getNumberOfAttribute(PyObject *SWIGUNUSED
PyObject * obj0 = 0 ;
unsigned int result;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfGridPtr_getNumberOfAttribute",&obj0)) SWIG_fail;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfGridPtr_getNumberOfAttributes",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfGrid_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfGridPtr_getNumberOfAttribute" "', argument " "1"" of type '" "boost::shared_ptr< XdmfGrid > const *""'");
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfGridPtr_getNumberOfAttributes" "', argument " "1"" of type '" "boost::shared_ptr< XdmfGrid > const *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfGrid > * >(argp1);
result = (unsigned int)(*arg1)->getNumberOfAttribute();
result = (unsigned int)(*arg1)->getNumberOfAttributes();
resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return resultobj;
fail:
......@@ -6389,6 +6710,36 @@ fail:
SWIGINTERN PyObject *_wrap_XdmfVisitorPtr_visit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfVisitor > *arg1 = (boost::shared_ptr< XdmfVisitor > *) 0 ;
XdmfDomain *arg2 = (XdmfDomain *) (XdmfDomain *)0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfVisitorPtr_visit",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_boost__shared_ptrT_XdmfVisitor_t, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfVisitorPtr_visit" "', argument " "1"" of type '" "boost::shared_ptr< XdmfVisitor > *""'");
}
arg1 = reinterpret_cast< boost::shared_ptr< XdmfVisitor > * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XdmfDomain, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfVisitorPtr_visit" "', argument " "2"" of type '" "XdmfDomain const *const""'");
}
arg2 = reinterpret_cast< XdmfDomain * >(argp2);
(*arg1)->visit((XdmfDomain const *)arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfVisitorPtr_visit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
boost::shared_ptr< XdmfVisitor > *arg1 = (boost::shared_ptr< XdmfVisitor > *) 0 ;
XdmfGeometry *arg2 = (XdmfGeometry *) (XdmfGeometry *)0 ;
......@@ -6418,7 +6769,7 @@ fail:
}