Commit 3d85b620 authored by Kenneth Leiter's avatar Kenneth Leiter
parents e08cae07 1d618f9e
......@@ -17,8 +17,6 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
%module Xdmf
%{
#define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
// MPI Includes
#include <mpi.h>
......@@ -81,8 +79,6 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
#else
%module Xdmf
%{
#define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
// XdmfCore Includes
#include <Xdmf.hpp>
#include <XdmfArray.hpp>
......
......@@ -24,7 +24,6 @@
#include <cctype>
#include <sstream>
#include <utility>
#include <vector>
#include "XdmfError.hpp"
#include "XdmfTopologyType.hpp"
......@@ -563,7 +562,7 @@ XdmfTopologyType::New(const unsigned int id)
XdmfTopologyType::XdmfTopologyType(const unsigned int nodesPerElement,
const unsigned int facesPerElement,
std::vector<shared_ptr<const XdmfTopologyType> > faces,
const std::vector<shared_ptr<const XdmfTopologyType> > & faces,
const unsigned int edgesPerElement,
const std::string & name,
const CellType cellType,
......
......@@ -25,6 +25,7 @@
#define XDMFTOPOLOGYTYPE_HPP_
// Includes
#include <vector>
#include "Xdmf.hpp"
#include "XdmfItemProperty.hpp"
......@@ -344,7 +345,7 @@ protected:
*/
XdmfTopologyType(const unsigned int nodesPerElement,
const unsigned int facesPerElement,
std::vector<shared_ptr<const XdmfTopologyType> > faces,
const std::vector<shared_ptr<const XdmfTopologyType> > & faces,
const unsigned int edgesPerElement,
const std::string & name,
const CellType cellType,
......
......@@ -84,7 +84,7 @@ check_cxx_source_compiles("
struct Base { virtual ~Base(){} };
struct Derived : public Base {};
int main(int ac, char * av)
int main(int ac, char * av[])
{
boost::shared_ptr<Base> ptr(new Base());
boost::shared_dynamic_cast<Derived>(ptr);
......
......@@ -1046,14 +1046,34 @@ XdmfHeavyDataWriter::controllerSplitting(XdmfArray & array,
unsigned int j = controllerIndexOffset;
try {
if (mMode == Default) {
std::stringstream testFile;
if (getFileIndex() == 0) {
// If sequentially named files need to be created or referenced
testFile << checkFileName << "." << checkFileExt;
}
else {
testFile << checkFileName << getFileIndex() << "." << checkFileExt;
}
heavyDataController =
this->createController(heavyDataController->getFilePath(),
this->createController(testFile.str(),
heavyDataController->getDataSetPath(),
array.getArrayType(),
start,
stride,
dimensions,
dataspaceDimensions);
}
else {
heavyDataController =
this->createController(heavyDataController->getFilePath(),
heavyDataController->getDataSetPath(),
array.getArrayType(),
start,
stride,
dimensions,
dataspaceDimensions);
}
}
catch (XdmfError e) {
throw e;
......
......@@ -5302,6 +5302,9 @@ void
XdmfFortran::retrieveRemoteNodeIDs(const int index, const int localNodeID, const int remoteTaskID, int * remoteNodeIDs)
{
if ((int)mMaps.size()>index) {
if (!mMaps[index]->isInitialized()) {
mMaps[index]->read();
}
if (mMaps[index]->getRemoteNodeIds(remoteTaskID).count(localNodeID)>0) {
std::set<int> returnSet = mMaps[index]->getRemoteNodeIds(remoteTaskID)[localNodeID];
std::set<int>::iterator walker;
......@@ -5337,6 +5340,9 @@ int
XdmfFortran::retrieveNumRemoteNodeIDs(const int index, const int localNodeID, const int remoteTaskID)
{
if ((int)mMaps.size()<index) {
if (!mMaps[index]->isInitialized()) {
mMaps[index]->read();
}
if (mMaps[index]->getRemoteNodeIds(remoteTaskID).count(localNodeID)>0) {
return mMaps[index]->getRemoteNodeIds(remoteTaskID)[localNodeID].size();
}
......
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