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

C++ full examples added

parent de5d5235
......@@ -52,11 +52,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfAttribute> exampleAttribute = XdmfAttribute::New();
* #endcode
*
* Python
*
* @code {.py}
* exampleAttribute = XdmfAttribute.New()
* @endcode
*
* @return constructed XdmfAttribute.
*/
......@@ -74,15 +78,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its center set
* shared_ptr<const XdmfAttributeCenter> exampleCenter = exampleAttribute->getCenter();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its center set
* '''
* exampleCenter = exampleAttribute.getCenter()
* @endcode
*
* @return XdmfAttributeCenter of the attribute.
*/
......@@ -99,15 +107,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object
* std::string exampleName = exampleAttribute->getName();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object
* '''
* exampleName = exampleAttribute.getName()
* @endcode
*
* @return a string containing the name of the attribute.
*/
......@@ -120,15 +132,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its type set
* shared_ptr<const XdmfAttributeType> exampleType = exampleAttribute->getType();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleAttribute is a shared pointer to an XdmfAttribute object with its type set
* '''
* exampleType = exampleAttribute.getType()
* @endcode
*
* @return XdmfAttributeType of the attribute.
*/
......@@ -141,13 +157,17 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfAttribute> exampleAttribute = XdmfAttribute::New();
* exampleAttribute->setCenter(XdmfAttributeCenter::Node());
* @endcode
*
* Python
*
* @code {.py}
* exampleAttribute = XdmfAttribute.New()
* exampleAttribute.setCenter(XdmfAttributeCenter.Node())
* @endcode
*
* @param center the XdmfAttributeCenter to set.
*/
......@@ -160,15 +180,19 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfAttribute> exampleAttribute = XdmfAttribute::New();
* std::string newName = "New Name";
* exampleAttribute->setName(newName);
* @endcode
*
* Python
*
* @code {.py}
* exampleAttribute = XdmfAttribute.New()
* newName = "New Name"
* exampleAttribute.setName(newName)
* @endcode
*
* @param name a string containing the name to set.
*/
......@@ -181,13 +205,17 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfAttribute> exampleAttribute = XdmfAttribute::New();
* exampleAttribute->setType(XdmfAttributeType::Node());
* @endcode
*
* Python
*
* @code {.py}
* exampleAttribute = XdmfAttribute.New()
* exampleAttribute.setType(XdmfAttributeType.Node())
* @endcode
*
* @param type XdmfAttributeType to set.
*/
......
......@@ -53,15 +53,19 @@ public:
*
* C++
*
* @code {.cpp}
* unsigned int newPointsX = 5;
* unsigned int newPointsY = 5;
* shared_ptr<XdmfCurvilinearGrid> exampleGrid = XdmfCurvilinearGrid::New(newPointsX, newPointsY);
* @endcode
*
* Python
*
* @code {.py}
* newPointsX = 5
* newPointsY = 5
* exampleGrid = XdmfCurvilinearGrid.New(newPointsX, newPointsY)
* @endcode
*
* @param xNumPoints the number of points in the x direction.
* @param yNumPoints the number of points in the y direction.
......@@ -79,17 +83,21 @@ public:
*
* C++
*
* @code {.cpp}
* unsigned int newPointsX = 5;
* unsigned int newPointsY = 5;
* unsigned int newPointsZ = 5;
* shared_ptr<XdmfCurvilinearGrid> exampleGrid = XdmfCurvilinearGrid::New(newPointsX, newPointsY, newPointsZ);
* @endcode
*
* Python
*
* @code {.py}
* newPointsX = 5
* newPointsY = 5
* newPointsZ = 5
* exampleGrid = XdmfCurvilinearGrid.New(newPointsX, newPointsY, newPointsZ)
* @endcode
*
* @param xNumPoints the number of points in the x direction.
* @param yNumPoints the number of points in the y direction.
......@@ -109,19 +117,23 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfArray> newPoints = XdmfArray::New();
* newPoints->pushBack(5);
* newPoints->pushBack(5);
* newPoints->pushBack(5);
* shared_ptr<XdmfCurvilinearGrid> exampleGrid = XdmfCurvilinearGrid::New(newPoints);
* @endcode
*
* Python
*
* @code {.py}
* newPoints = XdmfArray.New()
* newPoints.pushBackAsInt32(5)
* newPoints.pushBackAsInt32(5)
* newPoints.pushBackAsInt32(5)
* exampleGrid = XdmfCurvilinearGrid.New(newPoints)
* @endcode
*
* @param numPoints the number of points in each direction.
*
......@@ -143,15 +155,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object
* shared_ptr<XdmfArray> exampleDimensions = exampleGrid->getDimensions();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object
* '''
* exampleDimensions = exampleGrid.getDimensions()
* @endcode
*
* @return XdmfArray containing dimensions of this grid.
*/
......@@ -165,8 +181,10 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleGrid is a shared pointer to an XdmfCurvilinearGrid object
* shared_ptr<const XdmfArray> exampleDimensions = exampleGrid->getDimensions();
* @endcode
*
* Python: Python doesn't have a constant version
*
......@@ -181,15 +199,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* shared_ptr<XdmfGeometry> exampleGeometry = exampleGrid->getGeometry();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* '''
* exampleGeometry = exampleGrid.getGeometry()
* @endcode
*
* @return the geometry associated with this grid.
*/
......@@ -203,15 +225,18 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfArray> newPoints = XdmfArray::New();
* newPoints->pushBack(5);
* newPoints->pushBack(5);
* newPoints->pushBack(5);
* //Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* exampleGrid->setDimensions(newPoints);
* @endcode
*
* Python
*
* @code {.py}
* newPoints = XdmfArray.New()
* newPoints.pushBackAsInt32(5)
* newPoints.pushBackAsInt32(5)
......@@ -220,6 +245,7 @@ public:
* Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* '''
* exampleGrid.setDimensions(newPoints)
* @endcode
*
* @param dimensions the dimension of the grid.
*/
......@@ -232,6 +258,7 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfArray> newPoints = XdmfArray::New();
* newPoints->pushBack(5);
* newPoints->pushBack(5);
......@@ -241,9 +268,11 @@ public:
* newGeometry->insert(0, newPoints, 0, 3, 1, 1);//Start index is 0, 3 values are passed, stride for both arrays is 1
* //Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* exampleGrid->setGeometry(newGeometry);
* @endcode
*
* Python
*
* @code {.py}
* newPoints = XdmfArray.New()
* newPoints.pushBackAsInt32(5)
* newPoints.pushBackAsInt32(5)
......@@ -255,6 +284,7 @@ public:
* Assuming that exampleGrid is a sharedPointer to an XdmfCurvilinearGrid object
* '''
* exampleGrid.setGeometry(newGeometry)
* @endcode
*
* @param geometry an XdmfGeometry to associate with this grid.
*/
......
......@@ -53,11 +53,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfDomain> exampleDomain = XdmfDomain::New();
* @endcode
*
* Python
*
* @code {.py}
* exampleDomain = XdmfDomain.New();
* @endcode
*
* @return constructed XdmfDomain.
*/
......
......@@ -50,11 +50,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfGeometry> exampleGeometry = XdmfGeometry::New();
* @endcode
*
* Python
*
* @code {.py}
* exampleGeometry = XdmfGeometry.New()
* @endcode
*
* @return constructed XdmfGeometry.
*/
......@@ -76,15 +80,19 @@ public:
*
* C++
*
* @code {.cpp}
* //assuming that exampleGeometry is a shared pointer to a XdmfGeometry object that has been filled with data
* unsigned int numPoints = exampleGeometry->getNumberPoints();
* @endcode
*
* Python
*
* @code {.py}
* '''
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object that has been filled with data
* '''
* numPoints = exampleGeometry.getNumberPoints()
* @endcode
*/
virtual unsigned int getNumberPoints() const;
......@@ -95,15 +103,19 @@ public:
*
* C++
*
* @code {.cpp}
* //assuming that exampleGeometry is a shared pointer to a XdmfGeometry object
* shared_ptr<const XdmfGeometryType> exampleType = exampleGeometry->getType();
* @endcode
*
* Python
*
* @code {.py}
* '''
* assuming that exampleGeometry is a shared pointer to a XdmfGeometry object
* '''
* exampleType = exampleGeometry.getType()
* @endcode
*
* @return XdmfGeometryType of this geometry.
*/
......@@ -116,13 +128,17 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfGeometry> exampleGeometry = XdmfGeometry::New();
* exampleGeometry->setType(XdmfGeometryType::XYZ());
* @endcode
*
* Python
*
* @code {.py}
* exampleGeometry = XdmfGeometry.New()
* exampleGeometry.setType(XdmfGeometryType.XYZ())
* @endcode
*
* @param type the XdmfGeometryType to set.
*/
......
......@@ -68,8 +68,21 @@ public:
*
* Example of use:
*
* C++
*
* @code {.cpp}
* unsigned int exampleDimensions = XdmfGeometryType::XYZ()->getDimensions();
* //The variable exampleDimensions now holds the number of dimensions that XYZ has
* @endcode
*
* Python
*
* @code {.py}
* exampleDimensions = XdmfGeometryType.XYZ().getDimensions()
* '''
* The variable exampleDimensions now holds the number of dimensions that XYZ has
* '''
* @endcode
*
* @return an int containing number of dimensions.
*/
......@@ -80,8 +93,21 @@ public:
*
* Example of use:
*
* C++
*
* @code {.cpp}
* std::string exampleName = XdmfGeometryType::XYZ()->getName();
* //The variable exampleName now holds the name of XYZ
* @endcode
*
* Python
*
* @code {.py}
* exampleName = XdmfGeometryType.XYZ().getName()
* '''
* The variable exampleName now holds the name of XYZ
* '''
* @endcode
*
* @return the name of this geometry type.
*/
......
......@@ -70,17 +70,21 @@ public:
*
* C++
*
8 @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* shared_ptr<const XdmfGeometry> exampleGeometry = exampleGrid->getGeometry();
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* exampleGeometry = exampleGrid.getGeometry()
* @endcode
*
* @return the geometry associated with this grid.
*/
......@@ -97,17 +101,21 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* std::string exampleName = exampleGrid->getName();
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* exampleName = exampleGrid.getName()
* @endcode
*
* @return the name of the grid.
*/
......@@ -120,17 +128,21 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* shared_ptr<XdmfTime> exampleTime = exampleGrid->getTime();
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* exampleTime = exampleGrid.getTime()
* @endcode
*
* @return pointer to the XdmfTime attached to this grid. If no
* XdmfTime is attached, return a NULL pointer.
......@@ -144,9 +156,11 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* shared_ptr<const XdmfTime> exampleTime = exampleGrid->getTime();
* @endcode
*
* Python: Python doesn't have a constant version
*
......@@ -162,17 +176,21 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* shared_ptr<const XdmfTopology> exampleTopology = exampleGrid->getTopology();
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* exampleTopology = exampleGrid.getTopology()
* @endcode
*
* @return the topology associated with this grid.
*/
......@@ -187,19 +205,23 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* std::string newName = "New Name";
* exampleGrid->setName(newName);
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* newName = "New Name"
* exampleGrid.setName(newName)
* @endcode
*
* @param name of the grid to set.
*/
......@@ -212,19 +234,23 @@ public:
*
* C++
*
* @code {.cpp}
* //using an unstructured grid since XdmfGrid is an abstract class
* //Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* shared_ptr<XdmfTime> newTime = XdmfTime::New(20.0);
* exampleGrid->setTime(newTime);
* @endcode
*
* Python
*
* @code {.py}
* '''
* using an unstructured grid since XdmfGrid is an abstract class
* Assumming that exampleGrid is a shared pointer to an XdmfUnstructuredGrid object
* '''
* newTime = XdmfTime.New(20.0)
* exampleGrid.setTime(newTime)
* @endcode
*
* @param time an XdmfTime to associate with this grid.
*/
......
......@@ -55,11 +55,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfGridCollection> exampleCollection = XdmfGridCollection::New();
* @endcode
*
* Python
*
* @code {.py}
* exampleCollection = XdmfGridCollection.New()
* @endcode
*
* @return constructed XdmfGridCollection.
*/
......@@ -81,15 +85,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set
* shared_ptr<const XdmfGridCollectionType> exampleType = exampleCollection->getType();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set
* '''
* exampleType = exampleCollection.getType()
* @endcode
*
* @return XdmfGridCollectionType of this collection.
*/
......@@ -105,6 +113,7 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set
* shared_ptr<XdmfInformation> exampleInformation = XdmfInformation::New();
* std::string newKey = "New Key";
......@@ -112,9 +121,11 @@ public:
* exampleInformation->setKey(newKey);
* exampleInformation->setValue(newValue);
* exampleCollection->insert(exampleInformation);
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object with its type set
* '''
......@@ -124,6 +135,7 @@ public:
* exampleInformation.setKey(newKey)
* exampleInformation.setValue(newValue)
* exampleCollection.insert(exampleInformation)
* @endcode
*
* @param information an XdmfInformation to attach to this item.
*/
......@@ -137,15 +149,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object
* exampleCollection->setType(XdmfGridCollectionType::Temporal());
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleCollection is a shared pointer to an XdmfGridCollection object
* '''
* exampleCollection.setType(XdmfGridCollectionType.Temporal())
* @endcode
*
* @param type the XdmfGridCollectionType to set.
*/
......
......@@ -46,11 +46,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfItemFactory> exampleFactory = XdmfItemFactory::New();
* @endcode
*
* Python
*
* @code {.py}
* exampleFactory = XdmfItemFactory.New()
* @endcode
*
* @return constructed XdmfItemFactory.
*/
......
......@@ -69,11 +69,15 @@ public:
*
* C++
*
* @code {.cpp}
* shared_ptr<XdmfMap> exampleMap = XdmfMap::New();
* @endcode
*
* Python
*
* @code {.py}
* exampleMap = XdmfMap.New()
* @endcode
*
* @return constructed XdmfMap.
*/
......@@ -88,6 +92,7 @@ public:
*
* C++
*
* @code {.cpp}
* std::vector<shared_ptr<XdmfAttribute> > holdGlobalNodes;
* shared_ptr<XdmfAttribute> nodeAttribute = XdmfAttribute::New();
* //The globalNodeIDs are placed into the attribute
......@@ -108,9 +113,11 @@ public:
* //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)
* @endcode
*
* Python
*
* @code {.py}
* grid = XdmfUnstructuredGrid.New()
*
* '''
......@@ -152,6 +159,7 @@ public:
*
* grid.insert(testMap[0])
* grid.insert(testMap[1])
* @endcode
*
* @param globalNodeIds a vector of attributes containing globalNodeId
* values for each partition to be mapped.
......@@ -176,6 +184,7 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleMap is a shared pointer to an XdmfMap object filled with the following tuples
* //(1, 1, 9)
* //(1, 2, 8)
......@@ -201,9 +210,11 @@ public:
* std::set<int>::iterator setWalker = remoteNodeSet.begin();
* int remoteNodeValue = (*setWalker);
* //remoteNodeValue now equals 9
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleMap is a shared pointer to an XdmfMap object filled with the following tuples
* (1, 1, 9)
......@@ -245,6 +256,7 @@ public:
* '''
* prints out all the remote node values associated with taskID 1 and localNode 1
* '''
* @endcode
*
* @return stored boundary communicator map.
*/
......@@ -257,15 +269,19 @@ public:
*
* C++
*
* @code {.cpp}
* //Assumming that exampleMap is a shared pointer to a XdmfMap object
* std::string exampleName = exampleMap->getName();
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assumming that exampleMap is a shared pointer to a XdmfMap object
* '''
* exampleName = exampleMap.getName()
* @endcode
*
* @return name of boundary communicator map.
*/
......@@ -279,6 +295,7 @@ public:
*
* C++
*
* @code {.cpp}
* //Assuming that exampleMap is a shared pointer to an XdmfMap object filled with the following tuples
* //(1, 1, 9)
* //(1, 2, 8)
......@@ -299,9 +316,11 @@ public:
* std::set<int>::iterator setWalker = remoteNodeSet.begin();
* int remoteNodeValue = (*setWalker);
* //remoteNodeValue now equals 9
* @endcode
*
* Python
*
* @code {.py}
* '''
* Assuming that exampleMap is a shared pointer to an XdmfMap object filled with the following tuples
* (1, 1, 9)
......@@ -332,6 +351,7 @@ public:
* '''
* prints out all the remote node values associated with taskID 1 and localNode 1
* '''
* @endcode
*
* @param remoteTaskId a task id to retrieve mapping for.
*
......@@ -351,15 +371,18 @@ public:
*