XdmfUnstructuredGrid.hpp 3.62 KB
Newer Older
Kenneth Leiter's avatar
Kenneth Leiter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfUnstructuredGrid.hpp                                            */
/*                                                                           */
/*  Author:                                                                  */
/*     Kenneth Leiter                                                        */
/*     kenneth.leiter@arl.army.mil                                           */
/*     US Army Research Laboratory                                           */
/*     Aberdeen Proving Ground, MD                                           */
/*                                                                           */
/*     Copyright @ 2011 US Army Research Laboratory                          */
/*     All Rights Reserved                                                   */
/*     See Copyright.txt for details                                         */
/*                                                                           */
/*     This software is distributed WITHOUT ANY WARRANTY; without            */
/*     even the implied warranty of MERCHANTABILITY or FITNESS               */
/*     FOR A PARTICULAR PURPOSE.  See the above copyright notice             */
/*     for more information.                                                 */
/*                                                                           */
/*****************************************************************************/

24 25
#ifndef XDMFUNSTRUCTUREDGRID_HPP_
#define XDMFUNSTRUCTUREDGRID_HPP_
26 27

// Includes
28
#include "Xdmf.hpp"
29 30 31
#include "XdmfGrid.hpp"

/**
32
 * @brief An unstructured grid consisting of elements, points, and fields attached to the mesh.
33
 *
34 35 36
 * After creating an unstructured grid, the XdmfGeometry and XdmfTopology must be set.  The XdmfTopology
 * describes the element types contained in the grid and their connectivity.  The XdmfGeometry describes the
 * location of nodes.
37
 */
38
class XDMF_EXPORT XdmfUnstructuredGrid : public XdmfGrid {
39 40 41 42 43 44 45 46

public:

	/**
	 * Create a new XdmfGridUnstructured.
	 *
	 * @return constructed XdmfGridUnstructured.
	 */
47
	static boost::shared_ptr<XdmfUnstructuredGrid> New();
48

49
	virtual ~XdmfUnstructuredGrid();
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

	static const std::string ItemTag;

	/**
	 * Get the geometry associated with this grid.
	 *
	 * @return the geometry associated with this grid.
	 */
	boost::shared_ptr<XdmfGeometry> getGeometry();

	virtual std::string getItemTag() const;

	/**
	 * Get the topology associated with this grid.
	 *
	 * @return the topology associated with this grid.
	 */
	boost::shared_ptr<XdmfTopology> getTopology();

	/**
	 * Set the geometry associated with this grid.
	 *
	 * @param geometry an XdmfGeometry to associate with this grid.
	 */
	void setGeometry(const boost::shared_ptr<XdmfGeometry> geometry);

	/**
	 * Set the topology associated with this grid.
	 *
	 * @param topology an XdmfTopology to associate with this grid.
	 */
	void setTopology(const boost::shared_ptr<XdmfTopology> topology);

protected:

85
	XdmfUnstructuredGrid();
86 87 88

private:

89 90
	XdmfUnstructuredGrid(const XdmfUnstructuredGrid & grid);  // Not implemented.
	void operator=(const XdmfUnstructuredGrid & grid);  // Not implemented.
91 92 93

};

94 95 96 97 98
#ifdef _WIN32
    XDMF_TEMPLATE template class XDMF_EXPORT boost::shared_ptr<XdmfTopology>;
    XDMF_TEMPLATE template class XDMF_EXPORT boost::shared_ptr<XdmfGeometry>;
#endif

99
#endif /* XDMFUNSTRUCTUREDGRID_HPP_ */