XdmfTopology.hpp 1.71 KB
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3
#ifndef XDMFTOPOLOGY_HPP_
#define XDMFTOPOLOGY_HPP_

4 5 6
// Forward Declarations
class XdmfTopologyType;

7
// Includes
8
#include "XdmfDataItem.hpp"
9

10 11 12
/**
 * @brief Handles the connectivity information in an XdmfGrid.
 *
13
 * XdmfTopology is a required part of an XdmfGrid.  It stores the connectivity information
14 15 16
 * between all points contained in an XdmfGrid.  XdmfTopology contains an XdmfTopologyType property
 * which should be set that specifies the element type stored.
 */
17
class XdmfTopology : public XdmfDataItem {
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
18 19 20 21

public:

	XdmfNewMacro(XdmfTopology);
22 23
	virtual ~XdmfTopology();

24
	LOKI_DEFINE_VISITABLE(XdmfTopology, XdmfDataItem)
25
	static const std::string ItemTag;
26

27 28
	std::map<std::string, std::string> getItemProperties() const;

29 30
	std::string getItemTag() const;

31 32 33 34 35
	/**
	 * Get the number of elements this Topology contains.
	 *
	 * @return int of number elements in the Topology.
	 */
36
	unsigned int getNumberElements() const;
37

38
	/**
39
	 * Get the XdmfTopologyType associated with this topology.
40
	 *
41
	 * @return XdmfTopologyType of the topology.
42
	 */
43
	boost::shared_ptr<const XdmfTopologyType> getType() const;
44

45
	/**
46
	 * Set the XdmfTopologyType associated with this topology.
47
	 *
48
	 * @param topologyType the XdmfTopologyType to set.
49
	 */
50
	void setType(const boost::shared_ptr<const XdmfTopologyType> topologyType);
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
51 52 53 54

protected:

	XdmfTopology();
55 56
	virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);

Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
57 58
private:

59 60
	XdmfTopology(const XdmfTopology & topology);  // Not implemented.
	void operator=(const XdmfTopology & topology);  // Not implemented.
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
61

62
	int mNumberElements;
63
	boost::shared_ptr<const XdmfTopologyType> mTopologyType;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
64 65 66
};

#endif /* XDMFTOPOLOGY_HPP_ */