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

DSM working with mpich2-1.5

parent b08e5675
...@@ -46,6 +46,9 @@ endif(BUILD_TESTING) ...@@ -46,6 +46,9 @@ endif(BUILD_TESTING)
option(XDMF_WRAP_PYTHON OFF) option(XDMF_WRAP_PYTHON OFF)
option(XDMF_WRAP_JAVA OFF) option(XDMF_WRAP_JAVA OFF)
# Test for DSM
option(XDMF_BUILD_DSM OFF)
# If we are wrapping either, we need swig # If we are wrapping either, we need swig
if(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA) if(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA)
find_package(SWIG REQUIRED) find_package(SWIG REQUIRED)
...@@ -59,7 +62,11 @@ endif(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA) ...@@ -59,7 +62,11 @@ endif(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA)
if(XDMF_WRAP_PYTHON) if(XDMF_WRAP_PYTHON)
find_package(PythonInterp REQUIRED) find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED) find_package(PythonLibs REQUIRED)
if (XDMF_BUILD_DSM)
include_directories(${PYTHON_INCLUDE_DIRS} ${MPI_CXX_INCLUDE_PATH})
else (XDMF_BUILD_DSM)
include_directories(${PYTHON_INCLUDE_DIRS}) include_directories(${PYTHON_INCLUDE_DIRS})
endif (XDMF_BUILD_DSM)
# A macro to swig and create the python files # A macro to swig and create the python files
# Since we essentually do the same thing inside and outside core, it # Since we essentually do the same thing inside and outside core, it
...@@ -74,6 +81,10 @@ if(XDMF_WRAP_PYTHON) ...@@ -74,6 +81,10 @@ if(XDMF_WRAP_PYTHON)
# optimize swig generation --- these are all flags corresponding to -O # optimize swig generation --- these are all flags corresponding to -O
# except -fvirtual which breaks visitor operation # except -fvirtual which breaks visitor operation
set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -modern -fastdispatch -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone) set(CMAKE_SWIG_FLAGS ${XDMF_SWIG_FLAGS} -modern -fastdispatch -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone)
#Enables DSM
if (XDMF_BUILD_DSM)
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DXDMF_BUILD_DSM)
endif (XDMF_BUILD_DSM)
set_source_files_properties(${python_name}.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${python_name}.i PROPERTIES CPLUSPLUS ON)
set(swig_extra_generated_files "") set(swig_extra_generated_files "")
swig_add_module(${python_name} python ${python_name}.i) swig_add_module(${python_name} python ${python_name}.i)
......
...@@ -3,9 +3,15 @@ XdmfPython.cpp: ...@@ -3,9 +3,15 @@ XdmfPython.cpp:
swig -v -c++ -python -o XdmfPython.cpp Xdmf.i swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
*/ */
#ifdef XDMF_BUILD_DSM
%module Xdmf %module Xdmf
%{ %{
// MPI Includes
#include <mpi.h>
// XdmfCore Includes // XdmfCore Includes
#include <Xdmf.hpp> #include <Xdmf.hpp>
#include <XdmfArray.hpp> #include <XdmfArray.hpp>
...@@ -15,10 +21,8 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i ...@@ -15,10 +21,8 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
#include <XdmfError.hpp> #include <XdmfError.hpp>
#include <XdmfHDF5Controller.hpp> #include <XdmfHDF5Controller.hpp>
#include <XdmfHDF5Writer.hpp> #include <XdmfHDF5Writer.hpp>
#ifdef XDMF_BUILD_DSM
#include <XdmfHDF5ControllerDSM.hpp> #include <XdmfHDF5ControllerDSM.hpp>
#include <XdmfHDF5WriterDSM.hpp> #include <XdmfHDF5WriterDSM.hpp>
#endif
#include <XdmfHeavyDataController.hpp> #include <XdmfHeavyDataController.hpp>
#include <XdmfHeavyDataWriter.hpp> #include <XdmfHeavyDataWriter.hpp>
#include <XdmfInformation.hpp> #include <XdmfInformation.hpp>
...@@ -53,6 +57,55 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i ...@@ -53,6 +57,55 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
#include <XdmfUnstructuredGrid.hpp> #include <XdmfUnstructuredGrid.hpp>
%} %}
#else
%module Xdmf
%{
// XdmfCore Includes
#include <Xdmf.hpp>
#include <XdmfArray.hpp>
#include <XdmfArrayType.hpp>
#include <XdmfCoreItemFactory.hpp>
#include <XdmfCoreReader.hpp>
#include <XdmfError.hpp>
#include <XdmfHDF5Controller.hpp>
#include <XdmfHDF5Writer.hpp>
#include <XdmfHeavyDataController.hpp>
#include <XdmfHeavyDataWriter.hpp>
#include <XdmfInformation.hpp>
#include <XdmfItem.hpp>
#include <XdmfItemProperty.hpp>
#include <XdmfSharedPtr.hpp>
#include <XdmfSystemUtils.hpp>
#include <XdmfVisitor.hpp>
#include <XdmfWriter.hpp>
// Xdmf Includes
#include <XdmfAttribute.hpp>
#include <XdmfAttributeCenter.hpp>
#include <XdmfAttributeType.hpp>
#include <XdmfCurvilinearGrid.hpp>
#include <XdmfDomain.hpp>
#include <XdmfGeometry.hpp>
#include <XdmfGeometryType.hpp>
#include <XdmfGrid.hpp>
#include <XdmfGridCollection.hpp>
#include <XdmfGridCollectionType.hpp>
#include <XdmfItemFactory.hpp>
#include <XdmfMap.hpp>
#include <XdmfReader.hpp>
#include <XdmfRectilinearGrid.hpp>
#include <XdmfRegularGrid.hpp>
#include <XdmfSet.hpp>
#include <XdmfSetType.hpp>
#include <XdmfTime.hpp>
#include <XdmfTopology.hpp>
#include <XdmfTopologyType.hpp>
#include <XdmfUnstructuredGrid.hpp>
%}
#endif
%import XdmfCore.i %import XdmfCore.i
#ifdef SWIGJAVA #ifdef SWIGJAVA
...@@ -169,6 +222,9 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i ...@@ -169,6 +222,9 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
%include std_set.i %include std_set.i
%include std_map.i %include std_map.i
%include std_vector.i %include std_vector.i
%include mpi4py/mpi4py.i
%mpi4py_typemap(Comm, MPI_Comm);
%template(XdmfMapNodeIdSet) std::set<int>; %template(XdmfMapNodeIdSet) std::set<int>;
%template(XdmfMapNodeIdMap) std::map<int, std::set<int> >; %template(XdmfMapNodeIdMap) std::map<int, std::set<int> >;
......
...@@ -77,13 +77,13 @@ public: ...@@ -77,13 +77,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfAttribute.cpp * @dontinclude ExampleXdmfAttribute.cpp
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its center set * @skipline Assuming
* @skipline getCenter * @skipline getCenter
* *
* Python * Python
* *
* @dontinclude XdmfExampleAttribute.py * @dontinclude XdmfExampleAttribute.py
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its center set * @skipline Assuming
* @skipline getCenter * @skipline getCenter
* *
* @return XdmfAttributeCenter of the attribute. * @return XdmfAttributeCenter of the attribute.
...@@ -102,13 +102,13 @@ public: ...@@ -102,13 +102,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfAttribute.cpp * @dontinclude ExampleXdmfAttribute.cpp
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object * @skipline Assuming
* @skipline getName * @skipline getName
* *
* Python * Python
* *
* @dontinclude XdmfExampleAttribute.py * @dontinclude XdmfExampleAttribute.py
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object * @skipline Assuming
* @skipline getName * @skipline getName
* *
* @return a string containing the name of the attribute. * @return a string containing the name of the attribute.
...@@ -123,13 +123,13 @@ public: ...@@ -123,13 +123,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfAttribute.cpp * @dontinclude ExampleXdmfAttribute.cpp
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its type set * @skipline Assuming
* @skipline getType * @skipline getType
* *
* Python * Python
* *
* @dontinclude XdmfExampleAttribute.py * @dontinclude XdmfExampleAttribute.py
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its type set * @skipline Assuming
* @skipline getType * @skipline getType
* *
* @return XdmfAttributeType of the attribute. * @return XdmfAttributeType of the attribute.
......
...@@ -142,13 +142,13 @@ public: ...@@ -142,13 +142,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfCurvilinearGrid.cpp * @dontinclude ExampleXdmfCurvilinearGrid.cpp
* Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object * @skipline Assuming
* @skipline getDimensions * @skipline getDimensions
* *
* Python * Python
* *
* @dontinclude XdmfExampleCurvilinearGrid.py * @dontinclude XdmfExampleCurvilinearGrid.py
* Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object * @skipline Assuming
* @skipline getDimensions * @skipline getDimensions
* *
* @return XdmfArray containing dimensions of this grid. * @return XdmfArray containing dimensions of this grid.
...@@ -164,7 +164,7 @@ public: ...@@ -164,7 +164,7 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfCurvilinearGrid.cpp * @dontinclude ExampleXdmfCurvilinearGrid.cpp
* Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object * @skipline Assuming
* @skipline const * @skipline const
* *
* Python: Python doesn't have a constant version * Python: Python doesn't have a constant version
...@@ -181,13 +181,13 @@ public: ...@@ -181,13 +181,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfCurvilinearGrid.cpp * @dontinclude ExampleXdmfCurvilinearGrid.cpp
* Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object * @skipline Assuming
* @skipline getGeometry * @skipline getGeometry
* *
* Python * Python
* *
* @dontinclude XdmfExampleCurvilinearGrid.py * @dontinclude XdmfExampleCurvilinearGrid.py
* Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object * @skipline Assuming
* @skipline getGeometry * @skipline getGeometry
* *
* @return the geometry associated with this grid. * @return the geometry associated with this grid.
...@@ -203,13 +203,14 @@ public: ...@@ -203,13 +203,14 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfCurvilinearGrid.cpp * @dontinclude ExampleXdmfCurvilinearGrid.cpp
* @skipline Assuming
* @skipline XdmfArray::New * @skipline XdmfArray::New
* @until setDimensions * @until setDimensions
* Assumng that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object
* *
* Python * Python
* *
* @dontinclude XdmfExampleCurvilinearGrid.py * @dontinclude XdmfExampleCurvilinearGrid.py
* @skipline Assuming
* @skip setDimensions * @skip setDimensions
* @skipline newPoints * @skipline newPoints
* @until setDimensions * @until setDimensions
......
...@@ -79,13 +79,13 @@ public: ...@@ -79,13 +79,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGeometry.cpp * @dontinclude ExampleXdmfGeometry.cpp
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object that has been filled with data * @skipline Assuming
* @skipline getNumberPoints * @skipline getNumberPoints
* *
* Python * Python
* *
* @dontinclude XdmfExampleGeometry.py * @dontinclude XdmfExampleGeometry.py
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object that has been filled with data * @skipline Assuming
* @skipline getNumberPoints * @skipline getNumberPoints
*/ */
virtual unsigned int getNumberPoints() const; virtual unsigned int getNumberPoints() const;
...@@ -98,13 +98,13 @@ public: ...@@ -98,13 +98,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGeometry.cpp * @dontinclude ExampleXdmfGeometry.cpp
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object * @skipline Assuming
* @skipline getType * @skipline getType
* *
* Python * Python
* *
* @dontinclude XdmfExampleGeometry.py * @dontinclude XdmfExampleGeometry.py
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object * @skipline Assuming
* @skipline getType * @skipline getType
* *
* @return XdmfGeometryType of this geometry. * @return XdmfGeometryType of this geometry.
......
...@@ -72,13 +72,11 @@ public: ...@@ -72,13 +72,11 @@ public:
* *
* @dontinclude ExampleXdmfGeometryType.cpp * @dontinclude ExampleXdmfGeometryType.cpp
* @skipline getDimensions * @skipline getDimensions
* The variable exampleDimensions now holds the number of dimensions that XYZ has
* *
* Python * Python
* *
* @dontinclude XdmfExampleGeometryType.py * @dontinclude XdmfExampleGeometryType.py
* @skipline getDimensions * @skipline getDimensions
* The variable exampleDimensions now holds the number of dimensions that XYZ has
* *
* @return an int containing number of dimensions. * @return an int containing number of dimensions.
*/ */
...@@ -93,13 +91,11 @@ public: ...@@ -93,13 +91,11 @@ public:
* *
* @dontinclude ExampleXdmfGeometryType.cpp * @dontinclude ExampleXdmfGeometryType.cpp
* @skipline getName * @skipline getName
* The variable exampleName now holds the name of XYZ
* *
* Python * Python
* *
* @dontinclude XdmfExampleGeometryType.py * @dontinclude XdmfExampleGeometryType.py
* @skipline getName * @skipline getName
* The variable exampleName now holds the name of XYZ
* *
* @return the name of this geometry type. * @return the name of this geometry type.
*/ */
......
...@@ -71,15 +71,15 @@ public: ...@@ -71,15 +71,15 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getGeometry * @skipline getGeometry
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getGeometry * @skipline getGeometry
* *
* @return the geometry associated with this grid. * @return the geometry associated with this grid.
...@@ -98,15 +98,15 @@ public: ...@@ -98,15 +98,15 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getName * @skipline getName
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getName * @skipline getName
* *
* @return the name of the grid. * @return the name of the grid.
...@@ -121,15 +121,15 @@ public: ...@@ -121,15 +121,15 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getTime * @skipline getTime
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getTime * @skipline getTime
* *
* @return pointer to the XdmfTime attached to this grid. If no * @return pointer to the XdmfTime attached to this grid. If no
...@@ -145,8 +145,8 @@ public: ...@@ -145,8 +145,8 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline exampleTimeConst * @skipline exampleTimeConst
* *
* Python: Python doesn't have a constant version * Python: Python doesn't have a constant version
...@@ -164,15 +164,15 @@ public: ...@@ -164,15 +164,15 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getTopology * @skipline getTopology
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline getTopology * @skipline getTopology
* *
* @return the topology associated with this grid. * @return the topology associated with this grid.
...@@ -189,16 +189,16 @@ public: ...@@ -189,16 +189,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline newName * @skipline newName
* @skipline setName * @skipline setName
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline newName * @skipline newName
* @skipline setName * @skipline setName
* *
...@@ -214,16 +214,16 @@ public: ...@@ -214,16 +214,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGrid.cpp * @dontinclude ExampleXdmfGrid.cpp
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline newTime * @skipline newTime
* @skipline setTime * @skipline setTime
* *
* Python * Python
* *
* @dontinclude XdmfExampleGrid.py * @dontinclude XdmfExampleGrid.py
* Using an unstructured grid since XdmfGrid is an abstract class * @skipline Using
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object * @until Assumming
* @skipline newTime * @skipline newTime
* @skipline setTime * @skipline setTime
* *
......
...@@ -84,13 +84,13 @@ public: ...@@ -84,13 +84,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGridCollection.cpp * @dontinclude ExampleXdmfGridCollection.cpp
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set * @skipline Assuming
* @skipline getType * @skipline getType
* *
* Python * Python
* *
* @dontinclude XdmfExampleGridCollection.py * @dontinclude XdmfExampleGridCollection.py
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set * @skipline Assuming
* @skipline getType * @skipline getType
* *
* @return XdmfGridCollectionType of this collection. * @return XdmfGridCollectionType of this collection.
...@@ -108,17 +108,17 @@ public: ...@@ -108,17 +108,17 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGridCollection.cpp * @dontinclude ExampleXdmfGridCollection.cpp
* @skipline Assuming
* @skipline exampleInformation * @skipline exampleInformation
* @until setValue * @until setValue
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object * @skipline insert
* skipline insert
* *
* Python * Python
* *
* @dontinclude XdmfExampleGridCollection.py * @dontinclude XdmfExampleGridCollection.py
* @skipline Assuming
* @skipline exampleInformation * @skipline exampleInformation
* @until setValue * @until setValue
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object
* @skipline insert * @skipline insert
* *
* @param information an XdmfInformation to attach to this item. * @param information an XdmfInformation to attach to this item.
...@@ -134,13 +134,13 @@ public: ...@@ -134,13 +134,13 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfGridCollection.cpp * @dontinclude ExampleXdmfGridCollection.cpp
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object * @skipline Assuming
* @skipline setType * @skipline setType
* *
* Python * Python
* *
* @dontinclude XdmfExampleGridCollection.py * @dontinclude XdmfExampleGridCollection.py
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object * @skipline Assuming
* @skipline setType * @skipline setType
* *
* @param type the XdmfGridCollectionType to set. * @param type the XdmfGridCollectionType to set.
......
...@@ -92,40 +92,15 @@ public: ...@@ -92,40 +92,15 @@ public:
* *
* @dontinclude ExampleXdmfMap.cpp * @dontinclude ExampleXdmfMap.cpp
* @skipline holdGlobalNodes * @skipline holdGlobalNodes
* @until New * @until localNodeID)
* The globalNodeIDs are placed into the attribute
* The index they are at in the attribute corresponds to their localNodeID
* @skipline nodeAttribute
* @until push_back
* The Attribute is then added to the vector
* The index that the Attribute has in the vector corresponds to a task id
* Using this method add all the required nodes
* @skipline nodeAttribute
* until vector
* returns a vector of maps that holds the equivalencies for the nodes provided
* for example if Attribute 1 had globalNodeID 3 at localNodeID 2
* and Attribute 3 had globalNodeID 3 at localNodeID 5
* then map 1 would have an entry of (3, 5, 2)
* and map 3 would have an entry of (1, 2, 5)
* The entries are formatted (remoteTaskID, remoteLocalNodeID, localNodeID)
* *
* Python * Python
* *
* @dontinclude XdmfExampleMap.py * @dontinclude XdmfExampleMap.py
* create attributes for each task id * @skipline #create
* the index of the node id in the attribute is the local node id * @until push_back(map2Attribute)
* @skipline map1Attribute * @skipline New
* @until map2Attribute.insertAsInt32 * @until localNodeID)
* insert the attributes into a vector
* the id of the attribute in the vector is equal to the task id
* @skipline testVector
* @until New
* returns a vector of maps that holds the equivalencies for the nodes provided
* for example if Attribute 1 had globalNodeID 3 at localNodeID 2
* and Attribute 3 had globalNodeID 3 at localNodeID 5
* then map 1 would have an entry of (3, 5, 2)
* and map 3 would have an entry of (1, 2, 5)
* The entries are formatted (remoteTaskID, remoteLocalNodeID, localNodeID)
* *
* @param globalNodeIds a vector of attributes containing globalNodeId * @param globalNodeIds a vector of attributes containing globalNodeId
* values for each partition to be mapped. * values for each partition to be mapped.
...@@ -151,57 +126,16 @@ public: ...@@ -151,57 +126,16 @@ public:
* C++ * C++
* *
* @dontinclude ExampleXdmfMap.cpp * @dontinclude ExampleXdmfMap.cpp
* Assuming that exampleMap is a shared pointer to an XdmfMap object filled with the following tuples * @skip getMap
* (1, 1, 9) * @skipline Assuming
* (1, 2, 8) * @until //remoteNodeValue
* (2, 3, 7)
* (2, 4, 6)
* (3, 5, 5)
* (3, 6, 4)
* @skipline getMap
* taskIDMap now contains the same tuples as exampleMap
* @skipline begin
* @until first
* taskIDValue is now equal to 1, because that is the first taskID listed
* @skipline nodeIDMap
* nodeIDMap now contains the following tuples because it retrieved the tuples associated with taskID 1
* (1, 9)
* (2, 8)
* @skipline begin
* @until first
* localNodeValue is now equal to 1, because it is the first entry in the first tuple in the set