XdmfTopology.hpp 1.72 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
	LOKI_DEFINE_VISITABLE(XdmfTopology, XdmfDataItem)
23
	static std::string ItemTag;
24

25 26
	std::map<std::string, std::string> getItemProperties() const;

27 28
	std::string getItemTag() const;

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

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

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

protected:

	XdmfTopology();
	virtual ~XdmfTopology();
54 55
	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
56 57
private:

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

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

#endif /* XDMFTOPOLOGY_HPP_ */