bool operator()(const NODE& node1, const NODE& node2) const { double distance1 = norm(node1.position() - p_); double distance2 = norm(node2.position() - p_); if (distance1 < distance2) return true; else return false; }
force_type operator()(NODE n, double t) { (void) t; force_type force = force_type(0,0,0); Node node2; double distance; double initial_spring_length; double sprint_const_this_edge; // iterate through each neighboring node and add spring forces for(auto it = n.edge_begin(); it != n.edge_end(); ++it) { node2 = (*it).node2(); sprint_const_this_edge = (*it).value().spring_constant; initial_spring_length = (*it).value().initial_length; distance = norm(n.position()-node2.position()); // Euclidean distance force += (-1)*sprint_const_this_edge*(n.position()-node2.position())*(distance-initial_spring_length)/distance; } return force; }
Point operator()(const NODE& n) { return {n.position().x, n.position().y, n.value().h}; }
Point operator()(const NODE& node) { return node.position(); }
bool operator()(const NODE& node1, const NODE& node2) const { Point diff1 = node1.position() - p_; Point diff2 = node2.position() - p_; if (norm(diff1) < norm(diff2)) return true; return false; }
Point operator()(const NODE& n) { // HW4B: You may change this to plot something other than the // positions of the nodes return Point(n.position().x, n.position().y, n.value().Q.h); //return n.position(); }
Point operator()(const NODE& node) { return (Point(node.position().x, node.position().y, u_[node.index()])); }
Point operator()(const NODE& n) { return Point(n.position().x, n.position().y, n.value().q.h); }
Point operator()(const NODE& n) { // return the height stored in node value as the z direction return Point(n.position().x, n.position().y, n.value().h); }