RSTT 3.2.1 Regional Seismic Travel Time

Loading...
Searching...
No Matches
slbm::Triangle Class Reference

`#include <Triangle.h>`

## Public Member Functions
| Triangle ()
| Default constructor.
| Triangle (const int &index, GridProfile *loc0, GridProfile *loc1, GridProfile *loc2)
| ~Triangle ()
| Default destructor.
| Triangle (const Triangle &other)
| Copy constructor.
Triangle & | operator= (const Triangle &other)
| Equal operator.
int | getIndex ()
GridProfile * | getNode (const int &i)
| Retrieve a handle to one of the 3 nodes that defines the corners of this triangle.
void | setNeighbor (const int &i, Triangle *neighbor)
Triangle * | getNeighbor (const int &i)
Triangle * | walk (const Location &position, vector< double > &coefficients)
void | findNodeNeighbors (const int &node0, set< int > &neighborNodes)
| Find the set of all nodes that are directly connected to node node0.
int | findNeighborIndex (Triangle *neighbor)

## Detailed Description

Definition at line 62 of file Triangle.h.

## Constructor & Destructor Documentation

## ◆ Triangle() [1/3]

slbm::Triangle::Triangle | ( |  | ) |

Default constructor.

Default constructor.

## ◆ Triangle() [2/3]

slbm::Triangle::Triangle | ( | const int & | index,
|  | GridProfile * | loc0,
|  | GridProfile * | loc1,
|  | GridProfile * | loc2 )

## ◆ ~Triangle()

slbm::Triangle::~Triangle | ( |  | ) |

Default destructor.

Default destructor.

## ◆ Triangle() [3/3]

slbm::Triangle::Triangle | ( | const Triangle & | other | ) |

Copy constructor.

Copy constructor.

## Member Function Documentation

## ◆ findNeighborIndex()

int slbm::Triangle::findNeighborIndex | ( | Triangle * | neighbor | ) |
| inline

If this triangle is triangle T with neighbor N, it must be true that T is one of N's neighbors. Return the index of triangle T in N's list of neighbors. Returns -1 if T is not a member of N's list of neighbors.

Parameters

  neighbor | Triangle

Returns
  int

Definition at line 222 of file Triangle.h.

## ◆ findNodeNeighbors()

void slbm::Triangle::findNodeNeighbors | ( | const int & | node0,
|  | set< int > & | neighborNodes )
| inline

Find the set of all nodes that are directly connected to node node0.

Find the set of all nodes that are directly connected to nodenode0. It is assumed that the node with nodeId node0 ise on of the corners of this Triangle. This method will search all this Triangle's neighbors (and their neighbors if necessary) and add all nodes that are directly linked to node0 to the set neighborNodes.

Definition at line 193 of file Triangle.h.

## ◆ getIndex()

int slbm::Triangle::getIndex | ( |  | ) |
| inline

Definition at line 90 of file Triangle.h.

## ◆ getNeighbor()

Triangle * slbm::Triangle::getNeighbor | ( | const int & | i | ) |
| inline

Retrieve a reference to the triangle which lies on the other side of the edge of this triangle defined by nodes i and (i+1)%3

Retrieve a reference to the triangle which lies on the other side of the edge of this triangle defined by nodes i and (i+1)%3

Definition at line 112 of file Triangle.h.

## ◆ getNode()

GridProfile * slbm::Triangle::getNode | ( | const int & | i | ) |
| inline

Retrieve a handle to one of the 3 nodes that defines the corners of this triangle.

Retrieve a handle to one of the 3 nodes that defines the corners of this triangle.

Parameters

  i | the index of the desired node. Must be in range 0 to 2 inclusive.

Definition at line 98 of file Triangle.h.

## ◆ operator=()

Triangle & slbm::Triangle::operator= | ( | const Triangle & | other | ) |

Equal operator.

Equal operator.

## ◆ setNeighbor()

void slbm::Triangle::setNeighbor | ( | const int & | i,
|  | Triangle * | neighbor )
| inline

Specify a reference to the triangle which lies on the other side of the edge of this triangle defined by nodes i and (i+1)%3

Specify a reference to the triangle which lies on the other side of the edge of this triangle defined by nodes i and (i+1)%3

Definition at line 105 of file Triangle.h.

## ◆ walk()

Triangle * slbm::Triangle::walk | ( | const Location & | position,
|  | vector< double > & | coefficients )
| inline

Search through this Triangle's neighbors and find the first one such that Location position is on the other side of the great circle that contains the edge that separates this Triangle from its neighbor. If no such triangle is identified, then position must reside within the boundaries of this triangle. In that case, compute the interpolation coefficients.

Parameters

  position | GeoVector
  coefficients |

Returns
  Triangle

Definition at line 161 of file Triangle.h.

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

- rstt_v3.2.1/SLBM/include/Triangle.h