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

4
// Includes
5
#include "XdmfDataItem.hpp"
6
#include "XdmfTopologyType.hpp"
7

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

public:

	XdmfNewMacro(XdmfTopology);
20
	LOKI_DEFINE_VISITABLE(XdmfTopology, XdmfDataItem)
21
	static std::string ItemTag;
22

23 24
	std::map<std::string, std::string> getItemProperties() const;

25 26
	std::string getItemTag() const;

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

34
	/**
35
	 * Get the XdmfTopologyType associated with this topology.
36
	 *
37
	 * @return XdmfTopologyType of the topology.
38
	 */
39
	XdmfTopologyType getTopologyType() const;
40

41
	/**
42
	 * Set the XdmfTopologyType associated with this topology.
43
	 *
44
	 * @param topologyType the XdmfTopologyType to set.
45
	 */
46
	void setTopologyType(const XdmfTopologyType & topologyType);
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
47 48 49 50 51

protected:

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

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

59
	int mNumberElements;
60
	XdmfTopologyType mTopologyType;
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
61 62 63
};

#endif /* XDMFTOPOLOGY_HPP_ */