#include #include "node.h" #include "Constants.h" node::node(int id, int p_type, fp_t se, fp_t x, fp_t y, fp_t z){ n = id; globalId = -1; pType = p_type; singORDER = se; pType_ = PointType(p_type); bType = 0; prop = 0; cnt = num2D = -1; coord.setvtr(x, y, z); // reset error fields // e.reset(); // h.reset(); SpatialNode = NO; } void node::print(){ cout << "Node " << n << ", Type " << pType << ", Coord " << "(" << coord.getx() << ", " << coord.gety() << ", " << coord.getz() << ")" << endl; if (SpatialNode == YES) { cout << "Spatial Node " << endl; prop->sigma.print(); } } int node::operator>(const node &right) const { if (globalId > right.globalId) return 1; return 0; } int node::operator<(const node &right) const { if (globalId < right.globalId) return 1; return 0; } void node::setSpatialNode(char SpatialType){ SpatialNode = SpatialType; if (SpatialNode == YES) prop = new Material; } // void node::AddToE(cVtr efld){ // e = e + efld; // } // void node::AddToH(cVtr hfld){ // h = h + hfld; // } // cVtr node::GetE(){ // return e; // } // cVtr node::GetH(){ // return h; // } // void node::resetEH(){ // e.reset(); h.reset(); // }