TestXdmfVisitor.cpp 634 Bytes
Newer Older
1
#include "XdmfAttribute.hpp"
2 3
#include "XdmfGeometry.hpp"
#include "XdmfGrid.hpp"
4 5 6 7 8
#include "XdmfTopology.hpp"
#include "XdmfVisitor.hpp"

int main(int argc, char* argv[])
{
9 10 11 12
	boost::shared_ptr<XdmfVisitor> visitor3 = XdmfVisitor::New();
	boost::shared_ptr<XdmfGrid> grid = XdmfGrid::New();
	grid->setName("test");
	grid->getTopology()->setTopologyType(XdmfTopologyType::Hexahedron());
13 14 15 16
	boost::shared_ptr<XdmfAttribute> attr = XdmfAttribute::New();
	attr->setName("Attr1");
	attr->setAttributeType(XdmfAttributeType::Scalar());
	grid->insert(attr);
17 18 19
	grid->write(visitor3);
	std::cout << visitor3->printSelf() << std::endl;

20 21
	return 0;
}