Commit d8606853 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

changes for file splitting and functions along with assorted changes to...

changes for file splitting and functions along with assorted changes to XdmfFortran for possible speed increases
parent f5c88a96
...@@ -44,6 +44,18 @@ public: ...@@ -44,6 +44,18 @@ public:
/** /**
* Create a new XdmfGraph. * Create a new XdmfGraph.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfGraph.cpp
* @skipline New
*
* Python
*
* @dontinclude XdmfExampleGraph.py
* @skipline New
*
* @param numberNodes number of nodes in graph. * @param numberNodes number of nodes in graph.
* *
* @return constructed XdmfGraph. * @return constructed XdmfGraph.
......
This diff is collapsed.
...@@ -310,7 +310,7 @@ public: ...@@ -310,7 +310,7 @@ public:
* @param val2 the second array being evaluated * @param val2 the second array being evaluated
* @return the arrays joined end to end * @return the arrays joined end to end
*/ */
static shared_ptr<XdmfArray> chunk(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>); static shared_ptr<XdmfArray> chunk(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2);
/** /**
* Joins the two provided arrays while interspercing their values evenly. * Joins the two provided arrays while interspercing their values evenly.
...@@ -334,7 +334,7 @@ public: ...@@ -334,7 +334,7 @@ public:
* @param val2 the second array being evaluated * @param val2 the second array being evaluated
* @return the interlaced arrays * @return the interlaced arrays
*/ */
static shared_ptr<XdmfArray> interlace(shared_ptr<XdmfArray>, shared_ptr<XdmfArray>); static shared_ptr<XdmfArray> interlace(shared_ptr<XdmfArray> val1, shared_ptr<XdmfArray> val2);
/** /**
* Evaluates the function specified using the vector of XdmfArrays provided. * Evaluates the function specified using the vector of XdmfArrays provided.
...@@ -1032,26 +1032,30 @@ public: ...@@ -1032,26 +1032,30 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfArray.cpp * @dontinclude ExampleXdmfArray.cpp
* @skipline writtenArray
* @until writeStrides)
* *
* Python * Python
* *
* @dontinclude XdmfExampleArray.py * @dontinclude XdmfExampleArray.py
* @skipline writtenArray
* @until writeStrides)
* *
* @param startIndex the index in this array to begin insertion. * @param startIndex the index in this array to begin insertion for each dimension
* @param values a shared pointer to an XdmfArray to copy into this array. * @param values a shared pointer to an XdmfArray to copy into this array.
* @param valuesStartIndex the index in the XdmfArray to begin copying. * @param valuesStartIndex the index in the XdmfArray to begin copying for each dimension of the source array
* @param numValues the number of values to copy into this array. * @param numValues the number of values to copy into this array for each dimension on the source array
* @param arrayStride number of values to stride in this array between each * @param numInserted the number of strides to make across the array being written to for each dimension
* copy. * @param arrayStride number of values to stride in this array between each copy for each dimension
* @param valuesStride number of values to stride in the XdmfArray between * @param valuesStride number of values to stride in the XdmfArray between each copy for each dimension of the source array
* each copy.
*/ */
/* void insert(const std::vector<unsigned int> startIndex, void insert(const std::vector<unsigned int> startIndex,
const shared_ptr<const XdmfArray> values, const shared_ptr<const XdmfArray> values,
const std::vector<unsigned int> valuesStartIndex, const std::vector<unsigned int> valuesStartIndex,
const std::vector<unsigned int> numValues, const std::vector<unsigned int> numValues,
const std::vector<unsigned int> numInserted,
const std::vector<unsigned int> arrayStride, const std::vector<unsigned int> arrayStride,
const std::vector<unsigned int> valuesStride);*/ const std::vector<unsigned int> valuesStride);
/** /**
* Insert values into this array. * Insert values into this array.
......
This diff is collapsed.
...@@ -489,7 +489,6 @@ public: ...@@ -489,7 +489,6 @@ public:
} }
currNode = currNode->next; currNode = currNode->next;
} }
return myItems; return myItems;
} }
...@@ -502,7 +501,6 @@ public: ...@@ -502,7 +501,6 @@ public:
readSingleNode(const xmlNodePtr currNode, readSingleNode(const xmlNodePtr currNode,
std::vector<shared_ptr<XdmfItem> > & myItems) std::vector<shared_ptr<XdmfItem> > & myItems)
{ {
//check to see if the node is already in the Xpath //check to see if the node is already in the Xpath
std::map<xmlNodePtr, shared_ptr<XdmfItem> >::const_iterator iter = std::map<xmlNodePtr, shared_ptr<XdmfItem> >::const_iterator iter =
mXPathMap.find(currNode); mXPathMap.find(currNode);
...@@ -585,7 +583,6 @@ public: ...@@ -585,7 +583,6 @@ public:
"mItemFactory failed to createItem in " "mItemFactory failed to createItem in "
"XdmfCoreReader::XdmfCoreReaderImpl::readSingleNode"); "XdmfCoreReader::XdmfCoreReaderImpl::readSingleNode");
} }
newItem->populateItem(itemProperties, childItems, mCoreReader); newItem->populateItem(itemProperties, childItems, mCoreReader);
myItems.push_back(newItem); myItems.push_back(newItem);
mXPathMap.insert(std::make_pair(currNode, newItem)); mXPathMap.insert(std::make_pair(currNode, newItem));
......
This diff is collapsed.
...@@ -134,10 +134,18 @@ public: ...@@ -134,10 +134,18 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline newAllow
* @until setAllow
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline newAllow
* @until setAllow
* *
* @param newAllow whether to allow data sets to be split across hdf5 files * @param newAllow whether to allow data sets to be split across hdf5 files
*/ */
...@@ -154,10 +162,16 @@ public: ...@@ -154,10 +162,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline exampleAllow
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline exampleAllow
* *
* @return whether to allow data sets to be split across hdf5 files * @return whether to allow data sets to be split across hdf5 files
*/ */
...@@ -169,10 +183,18 @@ public: ...@@ -169,10 +183,18 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline newFileIndex
* @until setFileIndex
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline newFileIndex
* @until setFileIndex
* *
* @param newIndex The index that the writer will append to the file name when incorperating file splitting * @param newIndex The index that the writer will append to the file name when incorperating file splitting
*/ */
...@@ -184,10 +206,16 @@ public: ...@@ -184,10 +206,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline getFileIndex
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline getFileIndex
* *
* @return The current file index. * @return The current file index.
*/ */
...@@ -201,10 +229,16 @@ public: ...@@ -201,10 +229,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline getChunkSize
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline getChunkSize
* *
* @return chunk size used to output datasets to hdf5. * @return chunk size used to output datasets to hdf5.
*/ */
...@@ -220,10 +254,18 @@ public: ...@@ -220,10 +254,18 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHDF5Writer.cpp * @dontinclude ExampleXdmfHDF5Writer.cpp
* @skipline newPath
* @until New
* @skipline newChunk
* @until setChunkSize
* *
* Python * Python
* *
* @dontinclude XdmfExampleHDF5Writer.py * @dontinclude XdmfExampleHDF5Writer.py
* @skipline newPath
* @until New
* @skipline newChunk
* @until setChunkSize
* *
* @param chunkSize the number of elements per chunk. * @param chunkSize the number of elements per chunk.
*/ */
......
...@@ -191,10 +191,18 @@ public: ...@@ -191,10 +191,18 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHeavyDataController.cpp * @dontinclude ExampleXdmfHeavyDataController.cpp
* @skipline Assuming
* @until Since
* @skipline newArrayOffset
* @until setArrayOffset
* *
* Python * Python
* *
* @dontinclude XdmfExampleHeavyDataController.py * @dontinclude XdmfExampleHeavyDataController.py
* @skipline Assuming
* @until Since
* @skipline newArrayOffset
* @until setArrayOffset
* *
* @param newOffset the new index at which the controller will be written * @param newOffset the new index at which the controller will be written
*/ */
...@@ -207,10 +215,16 @@ public: ...@@ -207,10 +215,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfHeavyDataController.cpp * @dontinclude ExampleXdmfHeavyDataController.cpp
* @skipline Assuming
* @until Since
* @skipline getArrayOffset
* *
* Python * Python
* *
* @dontinclude XdmfExampleHeavyDataController.py * @dontinclude XdmfExampleHeavyDataController.py
* @skipline Assuming
* @until Since
* @skipline getArrayOffset
* *
* @return the offset that the array will read from * @return the offset that the array will read from
*/ */
...@@ -219,6 +233,20 @@ public: ...@@ -219,6 +233,20 @@ public:
/** /**
* Get the start index of the heavy data set owned by this controller. * Get the start index of the heavy data set owned by this controller.
* *
* C++
*
* @dontinclude ExampleXdmfHeavyDataController.cpp
* @skipline Assuming
* @until Since
* @skipline getStart
*
* Python
*
* @dontinclude XdmfExampleHeavyDataController.py
* @skipline Assuming
* @until Since
* @skipline getStart
*
* @return a vector containing the start index in each dimension of * @return a vector containing the start index in each dimension of
* the heavy data set owned by this controller. * the heavy data set owned by this controller.
*/ */
...@@ -227,6 +255,20 @@ public: ...@@ -227,6 +255,20 @@ public:
/** /**
* Get the stride of the heavy data set owned by this controller. * Get the stride of the heavy data set owned by this controller.
* *
* C++
*
* @dontinclude ExampleXdmfHeavyDataController.cpp
* @skipline Assuming
* @until Since
* @skipline getStride
*
* Python
*
* @dontinclude XdmfExampleHeavyDataController.py
* @skipline Assuming
* @until Since
* @skipline getStride
*
* @return a vector containing the stride in each dimension of the * @return a vector containing the stride in each dimension of the
* heavy data set owned by this controller. * heavy data set owned by this controller.
*/ */
......
...@@ -41,6 +41,18 @@ public: ...@@ -41,6 +41,18 @@ public:
/** /**
* Create a new XdmfSparseMatrix. * Create a new XdmfSparseMatrix.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
*
* @param numberRows number of rows in matrix. * @param numberRows number of rows in matrix.
* @param numberColumns number of columns in matrix. * @param numberColumns number of columns in matrix.
* *
...@@ -57,6 +69,22 @@ public: ...@@ -57,6 +69,22 @@ public:
/** /**
* Get the column index array. * Get the column index array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newColumnIndex
* @until getColumnIndex
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newColumnIndex
* @until getColumnIndex
*
* @return array containing column indices for nonzero entries of * @return array containing column indices for nonzero entries of
* matrix. This is the same size as values. * matrix. This is the same size as values.
*/ */
...@@ -69,6 +97,20 @@ public: ...@@ -69,6 +97,20 @@ public:
/** /**
* Get the name of the sparse matrix. * Get the name of the sparse matrix.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @until getName
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @until getName
*
* @return a string containing the name of the sparse matrix. * @return a string containing the name of the sparse matrix.
*/ */
std::string getName() const; std::string getName() const;
...@@ -76,6 +118,24 @@ public: ...@@ -76,6 +118,24 @@ public:
/** /**
* Get the number of columns in the sparse matrix. * Get the number of columns in the sparse matrix.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newColumnIndex
* @until setColumn
* @skipline getNumberColumns
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newColumnIndex
* @until setColumn
* @skipline getNumberColumns
*
* @return the number of columns in the sparse matrix. * @return the number of columns in the sparse matrix.
*/ */
unsigned int getNumberColumns() const; unsigned int getNumberColumns() const;
...@@ -83,6 +143,24 @@ public: ...@@ -83,6 +143,24 @@ public:
/** /**
* Get the number of rows in the sparse matrix. * Get the number of rows in the sparse matrix.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until setRow
* @skipline getNumberRows
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until setRow
* @skipline getNumberRows
*
* @return the number of rows in the sparse matrix. * @return the number of rows in the sparse matrix.
*/ */
unsigned int getNumberRows() const; unsigned int getNumberRows() const;
...@@ -90,6 +168,22 @@ public: ...@@ -90,6 +168,22 @@ public:
/** /**
* Get the row pointer array. * Get the row pointer array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until getRow
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until getRow
*
* @return array containing indices into column array for each * @return array containing indices into column array for each
* row. This is the size of the number of rows in the matrix + * row. This is the size of the number of rows in the matrix +
* 1. The last value is the number of nonzero entries in the matrix * 1. The last value is the number of nonzero entries in the matrix
...@@ -99,6 +193,30 @@ public: ...@@ -99,6 +193,30 @@ public:
/** /**
* Get the values array. * Get the values array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until getValues
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until getValues
*
* @return array containing values of nonzero entries of matrix. * @return array containing values of nonzero entries of matrix.
*/ */
shared_ptr<XdmfArray> getValues(); shared_ptr<XdmfArray> getValues();
...@@ -106,6 +224,32 @@ public: ...@@ -106,6 +224,32 @@ public:
/** /**
* Get values as a string in two dimensional format. * Get values as a string in two dimensional format.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until setValues
* @skipline getValuesString
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until setValues
* @skipline getValuesString
*
* @return string representation of matrix. * @return string representation of matrix.
*/ */
std::string getValuesString() const; std::string getValuesString() const;
...@@ -113,6 +257,22 @@ public: ...@@ -113,6 +257,22 @@ public:
/** /**
* Set the column index array. * Set the column index array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newColumnIndex
* @until getColumnIndex
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newColumnIndex
* @until getColumnIndex
*
* @param columnIndex array containing column indices for nonzero * @param columnIndex array containing column indices for nonzero
* entries of matrix. This is the same size as values. * entries of matrix. This is the same size as values.
*/ */
...@@ -121,6 +281,20 @@ public: ...@@ -121,6 +281,20 @@ public:
/** /**
* Set the name of the sparse matrix. * Set the name of the sparse matrix.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @until setName
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @until setName
*
* @param name a string containing the name to set. * @param name a string containing the name to set.
*/ */
void setName(const std::string & name); void setName(const std::string & name);
...@@ -128,6 +302,22 @@ public: ...@@ -128,6 +302,22 @@ public:
/** /**
* Set the row pointer array. * Set the row pointer array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until setRow
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until setRow
*
* @param rowPointer array containing indices into column array for * @param rowPointer array containing indices into column array for
* each row. This is the size of the number of rows in the matrix + * each row. This is the size of the number of rows in the matrix +
* 1. The last value is the number of nonzero entries in the matrix * 1. The last value is the number of nonzero entries in the matrix
...@@ -137,6 +327,30 @@ public: ...@@ -137,6 +327,30 @@ public:
/** /**
* Set the values array. * Set the values array.
* *
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfSparseMatrix.cpp
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until setValues
*
* Python
*
* @dontinclude XdmfExampleSparseMatrix.py
* @skipline New
* @skipline newRowPointer
* @until getRow
* @skipline newColumnIndex
* @until setColumn
* @skipline newValues
* @until setValues
*
* @param values array containing values of nonzero entries of * @param values array containing values of nonzero entries of
* matrix. * matrix.
*/ */
......
...@@ -19,7 +19,9 @@ ADD_TEST_CXX_PATH("${XDMF_BINARIES}") ...@@ -19,7 +19,9 @@ ADD_TEST_CXX_PATH("${XDMF_BINARIES}")
# Read UseCxxTest.cmake for more information # Read UseCxxTest.cmake for more information
# --------------------------------------- # ---------------------------------------
ADD_TEST_CXX(TestXdmfArray) ADD_TEST_CXX(TestXdmfArray)
ADD_TEST_CXX(TestXdmfArrayInsert)
ADD_TEST_CXX(TestXdmfArrayMultidimensional) ADD_TEST_CXX(TestXdmfArrayMultidimensional)
ADD_TEST_CXX(TestXdmfArrayMultiDimensionalInsert)
ADD_TEST_CXX(TestXdmfArrayWriteRead) ADD_TEST_CXX(TestXdmfArrayWriteRead)
ADD_TEST_CXX(TestXdmfArrayWriteReadHyperSlabs) ADD_TEST_CXX(TestXdmfArrayWriteReadHyperSlabs)
ADD_TEST_CXX(TestXdmfHDF5Controller) ADD_TEST_CXX(TestXdmfHDF5Controller)
...@@ -37,7 +39,9 @@ ADD_TEST_CXX(TestXdmfVersion) ...@@ -37,7 +39,9 @@ ADD_TEST_CXX(TestXdmfVersion)
# Read UseCxxTest.cmake for more information # Read UseCxxTest.cmake for more information