28 using boost::property_tree::ptree;
32 Node::Node(
unsigned int index,
const array<double, 3>& src,
bool at_boundary)
33 : m_position(src), m_at_boundary(at_boundary), m_index(index)
36 ostream& Node::Print(ostream& os)
const
39 os << m_index <<
" {" << (*this)[0] <<
", " << (*this)[1] <<
", " << (*this)[2] <<
"}";
43 void Node::ReadPtree(
const ptree& node_pt)
45 NodeAttributes::ReadPtree(node_pt.get_child(
"attributes"));
48 ptree Node::ToPtree()
const
51 ret.put(
"id", GetIndex());
52 ret.put(
"x", (*
this)[0]);
53 ret.put(
"y", (*
this)[1]);
54 ret.put(
"boundary", IsAtBoundary());
55 ret.put_child(
"attributes", NodeAttributes::ToPtree());
59 ostream& operator<<(ostream& os,
Node const& n)
Interface for NodeAttributes.
Namespace for the core simulator.