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

adjusting code away from regex to handle Apple systems

parent bba7984f
......@@ -79,6 +79,9 @@ ENDMACRO()
# Output:
# is_core = variable is set to 'Core' is core was found in dir
MACRO(SET_CORE dir)
IF(NOT "${XDMF_SUBSECTION}" STREQUAL "")
set(is_core ${XDMF_SUBSECTION})
ELSE()
STRING(REGEX MATCH "core" is_core "${dir}")
IF(EXISTS ${is_core})
SET(is_core "Core")
......@@ -88,4 +91,5 @@ MACRO(SET_CORE dir)
SET(is_core "Util")
ENDIF(EXISTS ${is_core})
ENDIF(EXISTS ${is_core})
ENDIF(NOT "${XDMF_SUBSECTION}" STREQUAL "")
ENDMACRO(SET_CORE dir)
......@@ -33,6 +33,8 @@
#endif
#cmakedefine XDMF_NO_REALPATH
#ifndef HAVE_CXX11_SHARED_PTR
#cmakedefine HAVE_CXX11_SHARED_PTR
#endif
#endif /* XDMFCORECONFIG_HPP_ */
set(XDMF_SUBSECTION "DSM")
add_subdirectory(C)
add_subdirectory(Cxx)
......
set(XDMF_SUBSECTION "Core")
add_subdirectory(C)
add_subdirectory(Cxx)
......
......@@ -2,6 +2,7 @@
#include "XdmfArrayType.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include "XdmfArray.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include <iostream>
#include <stdlib.h>
#include <assert.h>
#include <XdmfArray.hpp>
#include <XdmfArrayType.hpp>
#include <XdmfWriter.hpp>
......
......@@ -2,6 +2,7 @@
#include "XdmfArrayType.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......@@ -10,7 +11,9 @@ int main(int, char **)
// Create 1D arrays
//
shared_ptr<XdmfArray> array = XdmfArray::New();
array->resize<unsigned int>(2);
std::vector<unsigned int> tempDims;
tempDims.push_back(2);
array->initialize<unsigned int>(tempDims);
std::cout << array->getArrayType() << " ?= " << XdmfArrayType::UInt32() << std::endl;
assert(array->getArrayType() == XdmfArrayType::UInt32());
std::cout << array->getSize() << " ?= " << 2 << std::endl;
......@@ -23,7 +26,9 @@ int main(int, char **)
std::string dimensionsString = array->getDimensionsString();
std::cout << dimensionsString << " ?= " << "2" << std::endl;
assert(dimensionsString.compare("2") == 0);
array->resize<unsigned int>(3);
std::vector<unsigned int> tempDims2;
tempDims2.push_back(3);
array->resize<unsigned int>(tempDims2);
std::cout << array->getSize() << " ?= " << 3 << std::endl;
assert(array->getSize() == 3);
dimensions = array->getDimensions();
......@@ -55,7 +60,7 @@ int main(int, char **)
std::cout << dimensionsString << " ?= " << "2 2" << std::endl;
assert(dimensionsString.compare("2 2") == 0);
std::vector<unsigned int> newDimensions2(3,3);
array2->resize<unsigned short>(newDimensions2);
array2->initialize<unsigned short>(newDimensions2);
std::cout << array2->getSize() << " ?= " << 27 << std::endl;
assert(array2->getSize() == 27);
dimensions = array2->getDimensions();
......
......@@ -2,6 +2,7 @@
#include "XdmfHDF5Writer.hpp"
#include "XdmfHDF5Controller.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......@@ -61,7 +62,7 @@ int main(int, char **)
dimensions[0] = 2;
dimensions[1] = 3;
dimensions[2] = 4;
dimensionsArray->resize<double>(dimensions);
dimensionsArray->initialize<double>(dimensions);
double data[24] = {0.0, 1.0, 2.0, 3.0, 4.0,
5.0, 6.0, 7.0, 8.0, 9.0,
10.0, 11.0, 12.0, 13.0, 14.0,
......@@ -94,7 +95,11 @@ int main(int, char **)
std::vector<unsigned int> largeDimensions(2);
largeDimensions[0] = 1000;
largeDimensions[1] = 3;
largeArray->resize<double>(largeDimensions);
largeArray->initialize<double>(largeDimensions);
for (unsigned int i = 0; i < 3000; ++i)
{
largeArray->insert(i, 0);
}
largeArray->accept(largeArrayWriter);
}
......@@ -3,6 +3,7 @@
#include "XdmfHDF5Controller.hpp"
#include "XdmfHDF5Writer.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include <sstream>
#include <iostream>
#include <assert.h>
#include "XdmfArrayType.hpp"
#include "XdmfHDF5Controller.hpp"
#include "XdmfSystemUtils.hpp"
......
......@@ -2,6 +2,7 @@
#include "XdmfHDF5Controller.hpp"
#include "XdmfHDF5Writer.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -2,6 +2,7 @@
#include "XdmfHDF5Writer.hpp"
#include "XdmfInformation.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include "XdmfInformation.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -2,6 +2,7 @@
#include "XdmfWriter.hpp"
#include "stdio.h"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
set(XDMF_SUBSECTION "")
add_subdirectory(C)
add_subdirectory(Cxx)
......
......@@ -6,6 +6,7 @@
#include <XdmfHDF5Writer.hpp>
#include <XdmfHDF5Controller.hpp>
#include <sys/timeb.h>
#include <assert.h>
int main(int, char **)
{
......
......@@ -6,6 +6,7 @@
#include "XdmfReader.hpp"
#include <map>
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include "XdmfAttribute.hpp"
#include "XdmfAttributeType.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
#include <fstream>
#include <iostream>
#include <vector>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfBinaryController.hpp"
......
......@@ -7,6 +7,7 @@
#include "XdmfTopologyType.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
......@@ -25,7 +26,7 @@ int main(int, char **)
shared_ptr<XdmfGeometry> geometry = grid->getGeometry();
geometry->setType(XdmfGeometryType::XYZ());
geometry->resize<int>(36);
geometry->initialize<int>(36);
const int coordinates[36] = {0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 2, 1, 0, 2, 4,
0, 2, 0, 1, 0, 1, 1, 0, 4, 1, 0, 0, 1, 2, 1, 1,
2, 4, 1, 2};
......
......@@ -9,6 +9,7 @@
#include <iostream>
#include <iomanip>
#include <cmath>
#include <assert.h>
#include "string.h"
#include "stdio.h"
......
......@@ -3,6 +3,7 @@
#include "XdmfSharedPtr.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -6,6 +6,7 @@
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -4,6 +4,7 @@
#include "XdmfReader.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
#include "XdmfTestDataGenerator.hpp"
......
......@@ -18,6 +18,7 @@
#include "XdmfReader.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -9,6 +9,7 @@
#include "XdmfWriter.hpp"
#include "XdmfHDF5Writer.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -5,6 +5,7 @@
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -10,26 +10,27 @@
#include "XdmfHDF5Writer.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
int main(int, char **)
{
shared_ptr<XdmfArray> vx = XdmfArray::New();
vx->resize<unsigned int>(4);
vx->initialize<unsigned int>(4);
vx->insert(0, 0);
vx->insert(1, 1);
vx->insert(2, 2);
vx->insert(3, 4);
shared_ptr<XdmfArray> vy = XdmfArray::New();
vy->resize<unsigned int>(3);
vy->initialize<unsigned int>(3);
vy->insert(0, 0);
vy->insert(1, 1);
vy->insert(2, 3);
shared_ptr<XdmfArray> vz = XdmfArray::New();
vz->resize<unsigned int>(3);
vz->initialize<unsigned int>(3);
vz->insert(0, 0);
vz->insert(1, 1);
vz->insert(2, 3);
......
......@@ -15,6 +15,7 @@
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
void performTests(std::vector<shared_ptr<XdmfMap> > & boundaryMaps)
{
......
......@@ -13,6 +13,7 @@
#include "XdmfReader.hpp"
#include "stdio.h"
#include <sstream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -4,6 +4,7 @@
#include <iostream>
#include <fstream>
#include <assert.h>
int main(int ac, char * av[])
{
......
......@@ -2,6 +2,7 @@
#include "XdmfReader.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
#include "XdmfTestDataGenerator.hpp"
......
......@@ -8,26 +8,27 @@
#include "XdmfHDF5Writer.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
int main(int, char **)
{
shared_ptr<XdmfArray> vx = XdmfArray::New();
vx->resize<unsigned int>(4);
vx->initialize<unsigned int>(4);
vx->insert(0, 0);
vx->insert(1, 1);
vx->insert(2, 2);
vx->insert(3, 4);
shared_ptr<XdmfArray> vy = XdmfArray::New();
vy->resize<unsigned int>(3);
vy->initialize<unsigned int>(3);
vy->insert(0, 0);
vy->insert(1, 1);
vy->insert(2, 3);
shared_ptr<XdmfArray> vz = XdmfArray::New();
vz->resize<unsigned int>(3);
vz->initialize<unsigned int>(3);
vz->insert(0, 0);
vz->insert(1, 1);
vz->insert(2, 3);
......
......@@ -10,6 +10,7 @@
#include "XdmfTestCompareFiles.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -2,6 +2,7 @@
#include "XdmfSet.hpp"
#include "XdmfSetType.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -6,6 +6,7 @@
#include "XdmfReader.hpp"
#include <map>
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -6,6 +6,7 @@
#include "XdmfWriter.hpp"
#include "XdmfReader.hpp"
#include "stdio.h"
#include <assert.h>
int main(int, char **)
{
......
......@@ -9,6 +9,7 @@
#include "XdmfWriter.hpp"
#include "XdmfHDF5Writer.hpp"
#include <iostream>
#include <assert.h>
#include "stdio.h"
......
#include "XdmfTime.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -2,6 +2,7 @@
#include "XdmfTopologyType.hpp"
#include <iostream>
#include <assert.h>
void setPolyTopology(shared_ptr<XdmfTopology> polyTop)
{
......
......@@ -7,6 +7,7 @@
#include "XdmfUnstructuredGrid.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
......
......@@ -5,6 +5,7 @@
#include "XdmfTime.hpp"
#include <iostream>
#include <assert.h>
int main(int, char **)
{
......
......@@ -2,6 +2,7 @@
#include "XdmfVisitor.hpp"
#include "XdmfGrid.hpp"
#include <iostream>
#include <assert.h>
// Make a new XdmfVisitor that simply counts number of values
class XdmfVisitorValueCounter : public XdmfVisitor,
......
......@@ -2,6 +2,7 @@
#include "XdmfSystemUtils.hpp"
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestDataGenerator.hpp"
......
......@@ -3,6 +3,7 @@
#include "XdmfWriter.hpp"
#include <iostream>
#include <assert.h>
#include "XdmfTestCompareFiles.hpp"
#include "XdmfTestDataGenerator.hpp"
......
#include <iostream>
#include <assert.h>
#include <XdmfDomain.hpp>
#include <XdmfGridCollection.hpp>
#include <XdmfWriter.hpp>
......
......@@ -4,6 +4,7 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <assert.h>
#include "XdmfArray.hpp"
#include "XdmfArrayType.hpp"
#include "XdmfDomain.hpp"
......
......@@ -4,6 +4,7 @@
#include <string>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <XdmfArray.hpp>
#include <XdmfArrayType.hpp>
#include <XdmfFunction.hpp>
......
set(XDMF_SUBSECTION "Utils")
add_subdirectory(C)
add_subdirectory(Cxx)
if(XDMF_WRAP_PYTHON)
add_subdirectory(Python)
endif(XDMF_WRAP_PYTHON)
......
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