XdmfTopology.hpp 2.07 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3 4 5 6 7 8 9 10
/*
 * XdmfTopology.hpp
 *
 *  Created on: Jan 25, 2010
 *      Author: kleiter
 */

#ifndef XDMFTOPOLOGY_HPP_
#define XDMFTOPOLOGY_HPP_

11 12 13
// Forward Declarations
class XdmfDataItem;

14
// Includes
15
#include "XdmfItem.hpp"
16
#include "XdmfTopologyType.hpp"
17

18
class XdmfTopology : public XdmfItem {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
19 20 21 22 23

public:

	XdmfNewMacro(XdmfTopology);

24 25 26 27 28
	/**
	 * Get the XdmfTopologyType associated with this Topology.
	 *
	 * @return XdmfTopologyType.
	 */
29
	XdmfTopologyType getTopologyType() const;
30 31 32 33 34 35

	/**
	 * Set the XdmfTopologyType associated with this Topology.
	 *
	 * @param XdmfTopologyType to set.
	 */
36 37 38 39 40 41 42 43 44 45 46 47 48 49
	void setTopologyType(const XdmfTopologyType& topType);

	/**
	 * Get the number of elements this Topology contains.
	 *
	 * @return int of number elements in the Topology.
	 */
	int getNumberElements() const;

	/**
	 * Set the number of elements this Topology contains.
	 *
	 * @param int of number elements to set.
	 */
50
	void setNumberElements(int numberElements);
51 52 53 54 55 56

	/**
	 * Get the name of the TopologyType associated with this Topology.
	 *
	 * @return std::string containing name of the TopologyType.
	 */
57
	std::string getTopologyTypeAsString() const;
58

59 60 61 62 63
	/**
	 * Get the number of nodes per element for this Topology.
	 *
	 * @return int of number of nodes per element.
	 */
64
	int getNodesPerElement() const;
65

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
	/**
	 * Get the point data associated with this Topology;
	 */
	boost::shared_ptr<XdmfDataItem> getData();

	/**
	 * Get the data associated with this Topology (const version)
	 */
	boost::shared_ptr<const XdmfDataItem> getData() const;

	/**
	 * Set the point data associated with this Topology
	 */
	void setData(boost::shared_ptr<XdmfDataItem> connectivityData);

81 82 83
	/**
	 *
	 */
84
	virtual std::string printSelf() const;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
85

86 87
	virtual void write(boost::shared_ptr<XdmfVisitor> visitor) const;

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
88 89 90 91 92 93 94
protected:

	XdmfTopology();
	virtual ~XdmfTopology();

private:

95 96
	XdmfTopology(const XdmfTopology&);  // Not implemented.
	void operator=(const XdmfTopology&);  // Not implemented.
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
97

98 99
	XdmfTopologyType mTopologyType;
	int mNumberElements;
100
	boost::shared_ptr<XdmfDataItem> mConnectivityData;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
101 102 103
};

#endif /* XDMFTOPOLOGY_HPP_ */