Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
node Class Reference

#include <adj.h>

Inheritance diagram for node:
Collaboration diagram for node:

Public Member Functions

void * operator new (size_t s)
 
void operator delete (void *ptr)
 
 node (const vector3d &l)
 
const vector3dgetLoc (void) const
 
const blockLocgetLoc (const face *b) const
 
- Public Member Functions inherited from adjList
 adjList ()
 
 ~adjList ()
 
int getLength (void) const
 
bool hasFace (const face *test) const
 
bool hasLoc (const face *test, const blockLoc &l) const
 
void addFace (face *b, const blockLoc &l)
 
const blockLocgetLoc (const face *b) const
 
bool isExternal (void) const
 
void print (void) const
 

Static Public Member Functions

static faceintersect (const node **nodes, const face *notHim=NULL, blockLoc *loc=NULL, blockLoc *oX=NULL, blockLoc *oY=NULL)
 

Static Public Attributes

static allocPool< nodepool
 

Private Attributes

const vector3dloc
 

Additional Inherited Members

- Protected Attributes inherited from adjList
adjRecnext
 

Detailed Description

Definition at line 150 of file adj.h.

Constructor & Destructor Documentation

node ( const vector3d l)
inline

Definition at line 157 of file adj.h.

157 :loc(l) { }
const vector3d & loc
Definition: adj.h:151

Member Function Documentation

const vector3d& getLoc ( void  ) const
inline

Definition at line 160 of file adj.h.

References loc.

160 { return loc; }
const vector3d & loc
Definition: adj.h:151
const blockLoc& getLoc ( const face b) const
inline

Definition at line 163 of file adj.h.

References adjList::getLoc().

163 { return adjList::getLoc(b); }
const blockLoc & getLoc(const face *b) const
Definition: adj.cpp:111

Here is the call graph for this function:

face * intersect ( const node **  nodes,
const face notHim = NULL,
blockLoc loc = NULL,
blockLoc oX = NULL,
blockLoc oY = NULL 
)
static

Definition at line 136 of file adj.cpp.

References adjRec::getNext(), adjList::next, nHops(), and test().

Referenced by facet::facet(), and facetOrientation::facetOrientation().

140 {
141 /*Nodes in "n" array should be laid out like:
142  [0] [1]
143  [2] [3]
144 */
145  const int nNodes=4;
146  const int expectedHops[nNodes]={0,1,1,2};
147  int l;
148 
149  //Check each entry in list 0,
150  // and return the first that is present everywhere.
151  for (adjRec *test=n[0]->next;test!=NULL;test=test->getNext()) {
152  face *tFace=test->getFace();
153 
154  //Check if it's the "bad" face
155  if (tFace==notHim) continue;
156 
157  //Check if it's in every list at some orientation
158  blockLoc orientX,orientY;
159  const blockLoc &tLoc=test->getLoc();
160  bool isPresent=true;
161  for (l=1;l<nNodes && isPresent;l++)
162  { //Check this list for the location
163  bool inList=false;
164  for (adjRec *c=n[l]->next;c!=NULL;c=c->getNext()) {
165  if (c->getFace()!=tFace)
166  continue;//Keep looking
167  blockLoc dir=c->getLoc()-tLoc;
168  //Make sure it's the proper number of hops to this location:
169  if (nHops(dir)==expectedHops[l]) {
170  inList=true;
171  if (l==1) orientX=dir; //X axis
172  if (l==2) orientY=dir; //Y axis
173  }
174  }
175  if (!inList) isPresent=false;
176  }
177 
178  //This location is in every list-- return it
179  if (isPresent) {
180  if (retLoc!=NULL) *retLoc=tLoc;
181  if (oX!=NULL) *oX=orientX;
182  if (oY!=NULL) *oY=orientY;
183  return tFace;
184  }
185  }
186  //If we get here, the intersection is empty--
187  // must be a boundary node
188  return NULL;
189 }
Definition: face.h:90
int nHops(const blockLoc &dir)
Definition: adj.cpp:129
adjRec * getNext(void)
Definition: adj.h:117
void test(void)
Definition: flotsam.C:99
const NT & n
Definition: adj.h:103
adjRec * next
Definition: adj.h:125

Here is the call graph for this function:

Here is the caller graph for this function:

void operator delete ( void *  ptr)
inline

Definition at line 155 of file adj.h.

References allocPool< T >::free(), and pool.

155 { pool.free(ptr); }
void free(void *)
Definition: adj.h:92
static allocPool< node > pool
Definition: adj.h:153

Here is the call graph for this function:

void* operator new ( size_t  s)
inline

Definition at line 154 of file adj.h.

References allocPool< T >::alloc(), and pool.

154 { return pool.alloc(); }
static allocPool< node > pool
Definition: adj.h:153
void * alloc(void)
Definition: adj.h:87

Here is the call graph for this function:

Member Data Documentation

const vector3d& loc
private

Definition at line 151 of file adj.h.

Referenced by getLoc().

allocPool< node > pool
static

Definition at line 153 of file adj.h.

Referenced by operator delete(), and operator new().


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