Commit 583c14de authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont
Browse files

removed a PARENT_SCOPE that was unessesary, added some missing includes, fixed cxx11 typecasting

parent 1ff6108c
......@@ -120,7 +120,6 @@ HAVE_CXX11_SHARED_PTR)
# Cxx11 does not work with swig due to an issue with swig
if (HAVE_CXX11_SHARED_PTR AND NOT XDMF_WRAP_PYTHON)
set(HAVE_CXX11_SHARED_PTR ${HAVE_CXX11_SHARED_PTR} PARENT_SCOPE)
add_definitions(-DHAVE_CXX11_SHARED_PTR)
endif ()
......
......@@ -147,7 +147,6 @@ int main(int ac, char * av[])
HAVE_CXX11_SHARED_PTR)
if (HAVE_CXX11_SHARED_PTR AND NOT XDMF_WRAP_PYTHON)
set(HAVE_CXX11_SHARED_PTR ${HAVE_CXX11_SHARED_PTR} PARENT_SCOPE)
add_definitions(-DHAVE_CXX11_SHARED_PTR)
endif ()
......
......@@ -1622,7 +1622,7 @@ XdmfHDF5Writer::write(XdmfArray & array)
newDataController->setArrayOffset(curArrayOffset);
array.insert(newDataController);
array.insert(shared_dynamic_cast<XdmfHeavyDataController>(newDataController));
fileNameWalker++;
datasetWalker++;
......
......@@ -31,6 +31,7 @@
#include "XdmfHDF5ControllerDSM.hpp"
#include "XdmfHDF5WriterDSM.hpp"
#include "XdmfError.hpp"
#include "cstring"
#include "stdio.h"
......
......@@ -82,7 +82,7 @@ int main(int, char **)
array2->pushBack(i + 5);
}
shared_ptr<XdmfHDF5Controller> controller1 =
shared_ptr<XdmfHeavyDataController> controller1 =
XdmfHDF5Controller::New("TestXdmfHDF5Visit.h5",
"Test Dataset1",
array1->getArrayType(),
......@@ -91,7 +91,7 @@ int main(int, char **)
std::vector<unsigned int>(1, 10),
std::vector<unsigned int>(1, 10));
shared_ptr<XdmfHDF5Controller> controller2 =
shared_ptr<XdmfHeavyDataController> controller2 =
XdmfHDF5Controller::New("TestXdmfHDF5Visit.h5",
"Test Dataset2",
array2->getArrayType(),
......
......@@ -53,9 +53,9 @@ int main(int, char **)
TIFFClose(tif);
shared_ptr<XdmfTIFFController> controller = XdmfTIFFController::New("compressedstripoutput.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(1, 1000 * 1000));
shared_ptr<XdmfHeavyDataController> controller = XdmfTIFFController::New("compressedstripoutput.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(1, 1000 * 1000));
shared_ptr<XdmfArray> checkarray = XdmfArray::New();
......@@ -74,7 +74,7 @@ int main(int, char **)
// printf("\n");
}
shared_ptr<XdmfTIFFController> hyperslabcontroller = XdmfTIFFController::New("compressedstripoutput.tif",
shared_ptr<XdmfHeavyDataController> hyperslabcontroller = XdmfTIFFController::New("compressedstripoutput.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(2, 0),
std::vector<unsigned int>(2, 2),
......@@ -97,7 +97,7 @@ int main(int, char **)
// printf("\n");
}
shared_ptr<XdmfTIFFController> hyperslabcontroller2 = XdmfTIFFController::New("compressedstripoutput.tif",
shared_ptr<XdmfHeavyDataController> hyperslabcontroller2 = XdmfTIFFController::New("compressedstripoutput.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(1, 0),
std::vector<unsigned int>(1, 2),
......@@ -202,7 +202,7 @@ int main(int, char **)
dirdataspace.push_back(1000);
dirdataspace.push_back(10);
shared_ptr<XdmfTIFFController> dircontroller = XdmfTIFFController::New("compresseddirectories.tif",
shared_ptr<XdmfHeavyDataController> dircontroller = XdmfTIFFController::New("compresseddirectories.tif",
XdmfArrayType::UInt32(),
dirstarts,
dirstrides,
......@@ -233,7 +233,7 @@ int main(int, char **)
dirdims[2] = 5;
shared_ptr<XdmfTIFFController> dircontroller2 = XdmfTIFFController::New("compresseddirectories.tif",
shared_ptr<XdmfHeavyDataController> dircontroller2 = XdmfTIFFController::New("compresseddirectories.tif",
XdmfArrayType::UInt32(),
dirstarts,
dirstrides,
......@@ -260,7 +260,7 @@ int main(int, char **)
// printf("\n\n");
}
shared_ptr<XdmfTIFFController> dircontroller3 = XdmfTIFFController::New("compresseddirectories.tif",
shared_ptr<XdmfHeavyDataController> dircontroller3 = XdmfTIFFController::New("compresseddirectories.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(1, 0),
std::vector<unsigned int>(1, 1),
......@@ -287,7 +287,7 @@ int main(int, char **)
// printf("\n\n");
}
shared_ptr<XdmfTIFFController> dircontroller4 = XdmfTIFFController::New("compresseddirectories.tif",
shared_ptr<XdmfHeavyDataController> dircontroller4 = XdmfTIFFController::New("compresseddirectories.tif",
XdmfArrayType::UInt32(),
std::vector<unsigned int>(1, 2),
std::vector<unsigned int>(1, 6),
......
......@@ -24,6 +24,7 @@
#include <cmath>
#include <iomanip>
#include <iostream>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfDiff.hpp"
......
......@@ -432,7 +432,7 @@ XdmfFortran::setAttributeHDF5(const int index,
{
if (index < mAttributes.size()) {
// create HDF5 link
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mAttributes[index]->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -477,7 +477,7 @@ XdmfFortran::setAttributeBinary(const int index,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mAttributes[index]->getArrayType(),
newEndian,
seek,
......@@ -912,7 +912,7 @@ XdmfFortran::setGeometryHDF5(const char * hdf5File,
}
// create HDF5 link
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mGeometry->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -958,7 +958,7 @@ XdmfFortran::setGeometryBinary(const char * binFile,
}
// create Binary link
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mGeometry->getArrayType(),
newEndian,
seek,
......@@ -1157,7 +1157,7 @@ XdmfFortran::setTopologyHDF5(const char * hdf5File,
"Error: Topology needs to be set before hdf5 linkage can be established.");
}
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mTopology->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -1202,7 +1202,7 @@ XdmfFortran::setTopologyBinary(const char * binFile,
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mTopology->getArrayType(),
newEndian,
seek,
......@@ -5051,7 +5051,7 @@ XdmfFortran::setDimensionsHDF5(const char * hdf5File,
const unsigned int dataspace)
{
if (mDimensions) {
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mDimensions->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -5102,7 +5102,7 @@ XdmfFortran::setDimensionsBinary(const char * binFile,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mDimensions->getArrayType(),
newEndian,
seek,
......@@ -5454,7 +5454,7 @@ XdmfFortran::setOriginHDF5(const char * hdf5File,
const unsigned int dataspace)
{
if (mOrigin) {
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mOrigin->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -5504,7 +5504,7 @@ XdmfFortran::setOriginBinary(const char * binFile,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mOrigin->getArrayType(),
newEndian,
seek,
......@@ -5851,7 +5851,7 @@ XdmfFortran::setBrickHDF5(const char * hdf5File,
const unsigned int dataspace)
{
if (mBrick) {
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mBrick->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -5902,7 +5902,7 @@ XdmfFortran::setBrickBinary(const char * binFile,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mBrick->getArrayType(),
newEndian,
seek,
......@@ -7063,7 +7063,7 @@ XdmfFortran::setCoordinateHDF5(const int index,
const unsigned int dataspace)
{
if (index < (int)mCoordinates.size()) {
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mCoordinates[index]->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -7114,7 +7114,7 @@ XdmfFortran::setCoordinateBinary(const int index,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mCoordinates[index]->getArrayType(),
newEndian,
seek,
......@@ -7601,7 +7601,7 @@ XdmfFortran::setSetHDF5(const int index,
const unsigned int dataspace)
{
if (index < (int)mSets.size()) {
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
mSets[index]->getArrayType(),
std::vector<unsigned int>(1, start),
......@@ -7652,7 +7652,7 @@ XdmfFortran::setSetBinary(const int index,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mSets[index]->getArrayType(),
newEndian,
seek,
......@@ -8550,13 +8550,13 @@ XdmfFortran::setInformationArrayHDF5(const int index,
if (arrayIndex < (int)mInformations[index]->getNumberArrays()) {
shared_ptr<XdmfArray> modifiedArray =
mInformations[index]->getArray(arrayIndex);
shared_ptr<XdmfHDF5Controller> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
modifiedArray->getArrayType(),
std::vector<unsigned int>(1, start),
std::vector<unsigned int>(1, stride),
std::vector<unsigned int>(1, numValues),
std::vector<unsigned int>(1, dataspace));
shared_ptr<XdmfHeavyDataController> newController = XdmfHDF5Controller::New(std::string(hdf5File),
std::string(hdf5Dataset),
modifiedArray->getArrayType(),
std::vector<unsigned int>(1, start),
std::vector<unsigned int>(1, stride),
std::vector<unsigned int>(1, numValues),
std::vector<unsigned int>(1, dataspace));
while (modifiedArray->getNumberHeavyDataControllers() > 0)
{
modifiedArray->removeHeavyDataController(0);
......@@ -8614,7 +8614,7 @@ XdmfFortran::setInformationArrayBinary(const int index,
default:
break;
}
shared_ptr<XdmfBinaryController> newController = XdmfBinaryController::New(std::string(binFile),
shared_ptr<XdmfHeavyDataController> newController = XdmfBinaryController::New(std::string(binFile),
mDimensions->getArrayType(),
newEndian,
seek,
......@@ -10035,7 +10035,7 @@ XdmfFortran::readFromDSM(const char * const dsmDataSetPath,
std::vector<unsigned int> dataVector;
dataVector.push_back(dataspace);
std::string writtenPath(dsmDataSetPath);
shared_ptr<XdmfHDF5ControllerDSM> writerController =
shared_ptr<XdmfHeavyDataController> writerController =
XdmfHDF5ControllerDSM::New(mDSMWriter->getFilePath(),
writtenPath,
writtenArrayType,
......@@ -10126,7 +10126,7 @@ XdmfFortran::writeToDSM(const char * const dsmDataSetPath,
std::vector<unsigned int> dataVector;
dataVector.push_back(dataspace);
std::string writtenPath(dsmDataSetPath);
shared_ptr<XdmfHDF5ControllerDSM> writerController =
shared_ptr<XdmfHeavyDataController> writerController =
XdmfHDF5ControllerDSM::New(mDSMWriter->getFilePath(),
writtenPath,
writtenArrayType,
......
#include <math.h>
#include <iostream>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfAttribute.hpp"
......
#include <cmath>
#include <iostream>
#include <iomanip>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfGeometry.hpp"
......
#include <math.h>
#include <iostream>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfGeometry.hpp"
......
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