Commit 62be8bc4 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Fix some formatting due to patches.

parent 43654bc7
......@@ -380,6 +380,18 @@ unsigned int XdmfArray::getCapacity() const
return 0;
}
std::string XdmfArray::getDimensionString() const
{
return mDimensionString;
}
int XdmfArray::getElementSize() const
{
boost::shared_ptr<const XdmfArrayType> aType = getArrayType();
if (aType == NULL) return(0);
return(aType->getElementSize());
}
boost::shared_ptr<XdmfHDF5Controller> XdmfArray::getHDF5Controller()
{
return boost::const_pointer_cast<XdmfHDF5Controller>(static_cast<const XdmfArray &>(*this).getHDF5Controller());
......@@ -413,18 +425,6 @@ std::map<std::string, std::string> XdmfArray::getItemProperties() const
return arrayProperties;
}
int XdmfArray::getElementSize() const
{
boost::shared_ptr<const XdmfArrayType> aType = getArrayType();
if (aType == NULL) return(0);
return(aType->getElementSize());
}
std::string XdmfArray::getDimensionString() const
{
return(mDimensionString);
}
std::string XdmfArray::getItemTag() const
{
return ItemTag;
......
......@@ -87,9 +87,19 @@ public:
*/
unsigned int getCapacity() const;
std::map<std::string, std::string> getItemProperties() const;
/**
* Get the original dimensions string from the stored array
*
* @return the dimension string from the stored array
*/
std::string getDimensionString() const;
std::string getItemTag() const;
/**
* Get the size of an element in this array
*
* @return the size of an array element (0 if ArrayType is undefined)
*/
int getElementSize() const;
/**
* Get the hdf5 controller attached to this XdmfArray.
......@@ -105,6 +115,10 @@ public:
*/
boost::shared_ptr<const XdmfHDF5Controller> getHDF5Controller() const;
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the name of the array.
*
......@@ -307,20 +321,6 @@ public:
template<typename T>
void setValuesInternal(const boost::shared_ptr<std::vector<T> > array);
/**
* Get the size of an element in this array
*
* @return the size of an array element (0 if ArrayType is undefined)
*/
int getElementSize() const;
/**
* Get the original dimensions string from the stored array
*
* @return the dimension string from the stored array
*/
std::string getDimensionString() const;
/**
* Exchange the contents of the vector with the contents of this XdmfArray. No copy is made. The internal arrays are swapped.
*
......
......@@ -155,11 +155,14 @@ bool XdmfArrayType::operator!=(const XdmfArrayType & arrayType) const
bool XdmfArrayType::IsEqual(boost::shared_ptr<XdmfArrayType> arrayType)
{
if(arrayType == NULL) return false;
if(this == arrayType.get()
&& mName == arrayType->mName
&& mPrecision == arrayType->mPrecision
) return true;
if(arrayType == NULL)
{
return false;
}
if(this == arrayType.get() && mName == arrayType->mName && mPrecision == arrayType->mPrecision)
{
return true;
}
return false;
}
......
......@@ -200,39 +200,39 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
void copyValueAsInt8(int index, char value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsInt16(int index, short value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsInt32(int index, int value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsInt64(int index, long value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsFloat32(int index, float value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsFloat64(int index, double value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsUInt8(int index, unsigned char value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsUInt16(int index, unsigned short value) {
$self->insert(index, &value);
$self->insert(index, value);
}
void copyValueAsUInt32(int index, unsigned int value) {
$self->insert(index, &value);
$self->insert(index, value);
}
};
......
......@@ -20,7 +20,6 @@ class XdmfHDF5Writer;
* If a dataset is encountered that resides in a different heavy data file on disk, the dataset is read from disk and written
* to the new hdf5 file. If this is undesired, the XdmfWriter can be set to DistributedHeavyData mode in which the writer
* will automatically reference any hdf5 dataset even if it resides in a different file than the one currently being written to.
* written.
*/
class XdmfWriter : public XdmfVisitor,
public Loki::Visitor<XdmfArray> {
......
......@@ -5,27 +5,27 @@ SET_PROPERTY(GLOBAL APPEND PROPERTY CXX_TEST_DEPENDENCIES
)
# Include our test macros
include (UseCxxTest)
include (AddTestsCxx)
# Add any cxx tests here:
# Note: We don't want to use a foreach loop to test the files incase we
# have extra arguments (id: ADD_CXX_TEST(testname inputfile))
# have extra arguments (id: ADD_TEST_CXX(testname inputfile))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
ADD_CXX_TEST(TestXdmfTopologyConverter)
ADD_TEST_CXX(TestXdmfTopologyConverter)
if(XDMF_BUILD_EXODUS_IO)
ADD_CXX_TEST(TestXdmfExodusIO)
ADD_TEST_CXX(TestXdmfExodusIO)
endif(XDMF_BUILD_EXODUS_IO)
# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_CXX_TEST(testname outputfile1 ...))
# have multiple files (ie: CLEAN_TEST_CXX(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_CXX_TEST(TestXdmfTopologyConverter)
CLEAN_TEST_CXX(TestXdmfTopologyConverter)
if(XDMF_BUILD_EXODUS_IO)
CLEAN_CXX_TEST(TestXdmfExodusIO
CLEAN_TEST_CXX(TestXdmfExodusIO
TestXdmfExodusIO.exo
)
endif(XDMF_BUILD_EXODUS_IO)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment