PPL Logo

node Class Reference

A node in the mesh with a 3D double coordinate. More...

#include <node.h>

Collaboration diagram for node:

Collaboration graph
[legend]

Public Member Functions

 node ()
 Basic constructor.
 node (double x, double y, double z)
 Initializing constructor 1.
 node (double inNode[3])
 Initializing constructor 2.
void pup (PUP::er &p)
 Pupper.
void set (int cid, int idx, chunk *cptr)
 Set operation 1.
void set (double x, double y, double z)
 Set operation 2.
void set (double inNode[3])
 Set operation 3.
void reset ()
 Reset operation.
int operator== (const node &n)
 Equality comparison operation.
nodeoperator= (const node &n)
 Assignment operation.
double getCoord (int d)
 Coordinate value access operation.
void fix ()
 Set fixed flag.
int isFixed ()
 Test fixed flag.
void notFixed ()
 Unset fixed flag.
void setSurface ()
 Set surface flag.
int onSurface ()
 Test surface flag.
void notSurface ()
 Unset surface flag.
double distance (const node &n)
 Get distance to node n.
void midpoint (const node &n, node &result)
 Find midpoint between this and node n; place in result.
node midpoint (const node &n)
 Return midpoint between this and node n.
void project (const node &n, node &result)
 Project line through point n to get new point.
void shortenLine (const node &n, double l, node &result)
 Shorten line to length l; place new point in result.
void relocateNode ()
 Adjust node coordinates with collected data.
void relocationVote (const node &n)
 Receive a position report.
 node ()
 node (double a, double b)
void init ()
void init (double a, double b)
void init (chunk *cPtr)
void init (double a, double b, chunk *cPtr)
nodeoperator= (const node &n)
int operator== (const node &n) const
double X () const
double Y () const
double distance (const node &n) const
void midpoint (const node &n, node *result) const
 node ()
 node (double a, double b)
 node (const node &n)
void set (double a, double b)
void reset ()
int operator== (const node &n)
nodeoperator= (const node &n)
void pup (PUP::er &p)
int isPresent ()
double X ()
double Y ()
int lock (double l, edgeRef e)
void unlock ()
double distance (const node &n)
void midpoint (const node &n, node &result)
node midpoint (const node &n)
void improvePos ()
void reportPos (const node &n)
int safeToMove (node m)
int safeToMove (node m, elemRef E0, edgeRef e0, edgeRef e1, node n1, node n2, node n3)
int findIntersection (node m, node pi, node pj, node mi)
int between (node m, node mi)
void sanityCheck (int cid, int idx)
void dump ()

Data Fields

int present
int boundary

Private Attributes

double coord [3]
 The 3D Cartesian coordinate.
int fixed
 Flag for fixed node.
int surface
 Flag for surface node.
int reports
 Number of point relocation reports received.
double sumReports [3]
 Sum of point relocation reports received.
nodeRef myRef
 A reference to this node.
chunkC
 A pointer to the chunk on which this node resides.
double x
double y
chunkC
int theLock
double lockLength
edgeRef lockHolder

Detailed Description

A node in the mesh with a 3D double coordinate.

Definition at line 12 of file node.h.


Constructor & Destructor Documentation

node::node (  )  [inline]

Basic constructor.

Initializes all data members except for coordinates.

Definition at line 39 of file node.h.

References C, fixed, myRef, reports, objRef::reset(), sumReports, and surface.

Referenced by midpoint().

Here is the call graph for this function:

Here is the caller graph for this function:

node::node ( double  x,
double  y,
double  z 
) [inline]

Initializing constructor 1.

Initializes all data members, accepting three (3) double parameters to initialize the coordinates.

Definition at line 49 of file node.h.

References C, fixed, myRef, reports, objRef::reset(), sumReports, and surface.

Here is the call graph for this function:

node::node ( double  inNode[3]  )  [inline]

Initializing constructor 2.

Initializes all data members, accepting an array of three (3) doubles as a parameter to initialize the coordinates.

Definition at line 60 of file node.h.

References C, fixed, myRef, reports, objRef::reset(), sumReports, and surface.

Here is the call graph for this function:

node::node (  )  [inline]

Definition at line 109 of file tri.h.

References C.

node::node ( double  a,
double  b 
) [inline]

Definition at line 110 of file tri.h.

References init().

Here is the call graph for this function:

node::node (  )  [inline]

Definition at line 25 of file node.h.

References boundary, fixed, present, reports, sumReports, theLock, x, and y.

node::node ( double  a,
double  b 
) [inline]

Definition at line 29 of file node.h.

References boundary, fixed, present, reports, sumReports, theLock, x, and y.

node::node ( const node n  )  [inline]

Definition at line 33 of file node.h.

References boundary, fixed, present, reports, sumReports, theLock, x, and y.


Member Function Documentation

void node::pup ( PUP::er p  )  [inline]

Pupper.

Packs/unpacks/sizes the node for use in messages via parameter marshalling. myRef and C become irrelevant remotely and are not needed here.

Definition at line 74 of file node.h.

References fixed, p, reports, sumReports, and surface.

void node::set ( int  cid,
int  idx,
chunk cptr 
) [inline]

Set operation 1.

Initializes myRef and C.

Definition at line 81 of file node.h.

References C, idx, myRef, and objRef::set().

Referenced by findIntersection(), nodeRef::get(), element::hasNodes(), element::improveInternalNode(), element::improveSurfaceNodeHelp(), element::refineCP(), element::refineLF(), and element::splitLF().

Here is the call graph for this function:

Here is the caller graph for this function:

void node::set ( double  x,
double  y,
double  z 
) [inline]

Set operation 2.

Accepts three (3) double parameters to initialize the coordinates.

Definition at line 84 of file node.h.

References x, and y.

void node::set ( double  inNode[3]  )  [inline]

Set operation 3.

Accepts and array of three (3) doubles to initialize the coordinates.

Definition at line 89 of file node.h.

void node::reset ( void   )  [inline]

Reset operation.

Reinitializes all data except for the coordinates.

Definition at line 94 of file node.h.

References C, fixed, myRef, reports, objRef::reset(), sumReports, and surface.

Referenced by edge::reset().

Here is the call graph for this function:

Here is the caller graph for this function:

int node::operator== ( const node n  )  [inline]

Equality comparison operation.

Compares only coordinate values.

Definition at line 103 of file node.h.

References coord.

node& node::operator= ( const node n  )  [inline]

Assignment operation.

Assigns only coordinates and flags.

Definition at line 108 of file node.h.

References coord, fixed, and surface.

double node::getCoord ( int  d  )  [inline]

Coordinate value access operation.

Input should be 0, 1 or 2. Returns the double that is the dth entry in the coord array. Prints error message if d is out of range.

Definition at line 118 of file node.h.

Referenced by element::improveInternalNode(), element::improveSurfaceNodeHelp(), element::refineCP(), element::refineLF(), element::splitLF(), and nodeRef::update().

Here is the caller graph for this function:

void node::fix (  )  [inline]

Set fixed flag.

Definition at line 123 of file node.h.

References fixed.

Referenced by element::refineLE().

Here is the caller graph for this function:

int node::isFixed (  )  [inline]

Test fixed flag.

Definition at line 125 of file node.h.

References fixed.

Referenced by chunk::addNode().

Here is the caller graph for this function:

void node::notFixed (  )  [inline]

Unset fixed flag.

Definition at line 127 of file node.h.

References fixed.

Referenced by element::refineCP(), element::refineLE(), element::refineLF(), and element::splitLF().

Here is the caller graph for this function:

void node::setSurface (  )  [inline]

Set surface flag.

Definition at line 129 of file node.h.

References surface.

Referenced by element::refineLE(), and element::refineLF().

Here is the caller graph for this function:

int node::onSurface (  )  [inline]

Test surface flag.

Definition at line 131 of file node.h.

References surface.

Referenced by chunk::addNode().

Here is the caller graph for this function:

void node::notSurface (  )  [inline]

Unset surface flag.

Definition at line 133 of file node.h.

References surface.

Referenced by element::refineCP(), element::refineLE(), element::refineLF(), and element::splitLF().

Here is the caller graph for this function:

double node::distance ( const node n  )  [inline]

Get distance to node n.

Definition at line 135 of file node.h.

References coord.

Referenced by element::calculateArea(), element::findLongestEdge(), element::getArea(), element::improveInternalNode(), element::improveSurfaceNodeHelp(), and shortenLine().

Here is the caller graph for this function:

void node::midpoint ( const node n,
node result 
) [inline]

Find midpoint between this and node n; place in result.

Definition at line 141 of file node.h.

References coord.

node node::midpoint ( const node n  )  [inline]

Return midpoint between this and node n.

Definition at line 147 of file node.h.

References coord, node(), x, and y.

Here is the call graph for this function:

void node::project ( const node n,
node result 
) [inline]

Project line through point n to get new point.

Get point at end of projection of line amd place new point in result.

Definition at line 158 of file node.h.

References coord.

void node::shortenLine ( const node n,
double  l,
node result 
) [inline]

Shorten line to length l; place new point in result.

Get a point on the line this-->n that is distance l from this node; place the resulting node in result

Definition at line 166 of file node.h.

References coord, distance(), and PUP::m.

Here is the call graph for this function:

void node::relocateNode (  )  [inline]

Adjust node coordinates with collected data.

Calculate a new position for this node from the collected reports of desired node locations; assumes all possible reports are in and that the node is movable.

Definition at line 176 of file node.h.

References fixed, reports, and sumReports.

void node::relocationVote ( const node n  )  [inline]

Receive a position report.

Receive a node position report and update the locally collected data.

Definition at line 188 of file node.h.

References coord, reports, and sumReports.

void node::init ( void   )  [inline]

Definition at line 114 of file tri.h.

References C, x, and y.

Referenced by node().

Here is the caller graph for this function:

void node::init ( double  a,
double  b 
) [inline]

Definition at line 115 of file tri.h.

References x, and y.

void node::init ( chunk cPtr  )  [inline]

Definition at line 116 of file tri.h.

References C.

void node::init ( double  a,
double  b,
chunk cPtr 
) [inline]

Definition at line 117 of file tri.h.

References C, x, and y.

node& node::operator= ( const node n  )  [inline]

Definition at line 120 of file tri.h.

References x, and y.

int node::operator== ( const node n  )  const [inline]

Definition at line 122 of file tri.h.

References x, and y.

double node::X (  )  const [inline]

Definition at line 125 of file tri.h.

References x.

Referenced by between(), findIntersection(), element::flipInverseTest(), edge::localCollapse(), chunk::nodeReplaceDelete(), edge::split(), and element::splitResponse().

Here is the caller graph for this function:

double node::Y (  )  const [inline]

Definition at line 126 of file tri.h.

References y.

Referenced by between(), findIntersection(), element::flipInverseTest(), edge::localCollapse(), chunk::nodeReplaceDelete(), edge::split(), and element::splitResponse().

Here is the caller graph for this function:

double node::distance ( const node n  )  const [inline]

Definition at line 129 of file tri.h.

References x, and y.

void node::midpoint ( const node n,
node result 
) const [inline]

Definition at line 135 of file tri.h.

References x, and y.

void node::set ( double  a,
double  b 
) [inline]

Definition at line 38 of file node.h.

References PUP::a, PUP::b, present, x, and y.

void node::reset ( void   )  [inline]

Definition at line 41 of file node.h.

References boundary, fixed, present, reports, sumReports, and theLock.

int node::operator== ( const node n  )  [inline]

Definition at line 45 of file node.h.

References x, and y.

node& node::operator= ( const node n  )  [inline]

Definition at line 46 of file node.h.

References boundary, fixed, present, reports, sumReports, theLock, x, and y.

void node::pup ( PUP::er p  )  [inline]

Definition at line 53 of file node.h.

References boundary, fixed, p, present, reports, sumReports, theLock, x, and y.

int node::isPresent (  )  [inline]

Definition at line 57 of file node.h.

References present.

double node::X (  )  [inline]

Definition at line 58 of file node.h.

References x.

double node::Y (  )  [inline]

Definition at line 59 of file node.h.

References y.

int node::lock ( double  l,
edgeRef  e 
) [inline]

Definition at line 60 of file node.h.

References objRef::cid, lockHolder, lockLength, and theLock.

void node::unlock (  )  [inline]

Definition at line 89 of file node.h.

References theLock.

double node::distance ( const node n  )  [inline]

Definition at line 92 of file node.h.

References PUP::d, x, and y.

void node::midpoint ( const node n,
node result 
) [inline]

Definition at line 98 of file node.h.

References x, and y.

node node::midpoint ( const node n  )  [inline]

Definition at line 103 of file node.h.

References PUP::a, PUP::b, node(), x, and y.

Here is the call graph for this function:

void node::improvePos (  )  [inline]

Definition at line 109 of file node.h.

References reports, sumReports, x, and y.

void node::reportPos ( const node n  )  [inline]

Definition at line 115 of file node.h.

References reports, sumReports, x, and y.

int node::safeToMove ( node  m  )  [inline]

Definition at line 120 of file node.h.

References boundary.

int node::safeToMove ( node  m,
elemRef  E0,
edgeRef  e0,
edgeRef  e1,
node  n1,
node  n2,
node  n3 
) [inline]

Definition at line 124 of file node.h.

References boundary.

int node::findIntersection ( node  m,
node  pi,
node  pj,
node  mi 
) [inline]

Definition at line 161 of file node.h.

References set(), x, X(), Y(), and y.

Here is the call graph for this function:

int node::between ( node  m,
node  mi 
) [inline]

Definition at line 174 of file node.h.

References x, X(), y, and Y().

Here is the call graph for this function:

void node::sanityCheck ( int  cid,
int  idx 
) [inline]

Definition at line 181 of file node.h.

References theLock, x, and y.

void node::dump (  )  [inline]

Definition at line 188 of file node.h.

References x, and y.


Field Documentation

double node::coord[3] [private]

The 3D Cartesian coordinate.

Definition at line 14 of file node.h.

Referenced by distance(), midpoint(), operator=(), operator==(), project(), relocationVote(), and shortenLine().

int node::fixed [private]

Flag for fixed node.

One (1) flags this as fixed node; zero (0) is not fixed; negative (-1) is uninitialized

Definition at line 18 of file node.h.

Referenced by fix(), isFixed(), node(), chunk::nodeReplaceDelete(), notFixed(), operator=(), pup(), relocateNode(), and reset().

int node::surface [private]

Flag for surface node.

One (1) flags this as a surface node; zero (0) is not surface; negative (-1) is uninitialized

Definition at line 22 of file node.h.

Referenced by node(), notSurface(), onSurface(), operator=(), pup(), reset(), and setSurface().

int node::reports [private]

Number of point relocation reports received.

For mesh improvement, we receive new point votes for relocating this point. This keeps track of how many we have received.

Definition at line 26 of file node.h.

Referenced by improvePos(), node(), operator=(), pup(), relocateNode(), relocationVote(), reportPos(), and reset().

double node::sumReports [private]

Sum of point relocation reports received.

For mesh improvement, we sum new point votes for each coordinate in this array. When voting is complete we compute an average for each coordinate using reports (above).

Definition at line 31 of file node.h.

Referenced by improvePos(), node(), operator=(), pup(), relocateNode(), relocationVote(), reportPos(), and reset().

nodeRef node::myRef [private]

A reference to this node.

Definition at line 33 of file node.h.

Referenced by node(), reset(), and set().

chunk* node::C [private]

A pointer to the chunk on which this node resides.

Definition at line 35 of file node.h.

Referenced by init(), node(), reset(), and set().

double node::x [private]

double node::y [private]

chunk* node::C [private]

Definition at line 105 of file tri.h.

int node::theLock [private]

Definition at line 17 of file node.h.

Referenced by lock(), node(), operator=(), pup(), reset(), sanityCheck(), and unlock().

double node::lockLength [private]

Definition at line 18 of file node.h.

Referenced by lock().

Definition at line 19 of file node.h.

Referenced by lock().

Definition at line 21 of file node.h.

Referenced by isPresent(), node(), operator=(), pup(), reset(), and set().

Definition at line 22 of file node.h.

Referenced by node(), chunk::nodeReplaceDelete(), operator=(), pup(), reset(), and safeToMove().


The documentation for this class was generated from the following files:

Generated on Mon Sep 21 08:28:05 2020 for Charm++ by  doxygen 1.5.5