Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Four_tuple< T > Struct Template Reference

A structure used to represent element faces. More...

#include <Tuple.h>

Public Types

typedef Tuple_traits< T > Traits
 
typedef Traits::Value Value
 
typedef Traits::Value_opposite Value_opposite
 
typedef Traits::Pointer Pointer
 
typedef Traits::Const_pointer Const_pointer
 
typedef Traits::Reference Reference
 
typedef Traits::Const_reference Const_reference
 
typedef Traits::Init_reference Init_reference
 
typedef Traits::Pointer_equivalent Pointer_equivalent
 
typedef Four_tuple< T > Self
 
typedef const Two_tuple
< Value_opposite
Const_self
 

Public Member Functions

 Four_tuple (int a, int b, int c, int d)
 
int & operator[] (int i)
 
const int & operator[] (int i) const
 
bool operator< (const Four_tuple &x) const
 
 Four_tuple ()
 
 Four_tuple (int a, int b, int c, int d)
 
 Four_tuple ()
 
 Four_tuple (Init_reference p, Init_reference q, Init_reference r, Init_reference s)
 
 Four_tuple (Const_reference t)
 
bool operator== (const Self &x) const
 
bool operator!= (const Self &x) const
 
Const_reference operator[] (int i) const
 
Reference operator[] (int i)
 
int id () const
 
int dimension () const
 
std::ostream & print (std::ostream &os, const char *s) const
 
 operator Const_self & () const
 
Self operator+ (const Self &t) const
 
Self operator- (const Self &t) const
 
Selfoperator+= (const Self &t)
 
Selfoperator-= (const Self &t)
 
Value operator* (const Self &t) const
 
Selfoperator*= (Const_reference t)
 
Self operator/ (Const_reference t) const
 
Selfoperator/= (Const_reference t)
 
Self multiply (const Self &b) const
 
Self divide (const Self &b) const
 
 Four_tuple (int a, int b, int c, int d)
 
int & operator[] (int i)
 
const int & operator[] (int i) const
 
bool operator< (const Four_tuple &x) const
 
 Four_tuple (int a, int b, int c, int d)
 
int & operator[] (int i)
 
const int & operator[] (int i) const
 
bool operator< (const Four_tuple &x) const
 
 Four_tuple (int a, int b, int c, int d)
 
int & operator[] (int i)
 
const int & operator[] (int i) const
 
bool operator< (const Four_tuple &x) const
 

Public Attributes

int v1
 
int v2
 
int v3
 
int v4
 

Protected Attributes

Value v0
 
Value v1
 
Value v2
 
Value v3
 

Private Attributes

int _a
 
int _b
 
int _c
 
int _d
 

Detailed Description

template<class T>
struct Four_tuple< T >

A structure used to represent element faces.

Definition at line 60 of file Pane_boundary.C.

Member Typedef Documentation

Definition at line 360 of file Tuple.h.

Definition at line 362 of file Tuple.h.

Definition at line 367 of file Tuple.h.

Definition at line 363 of file Tuple.h.

Definition at line 359 of file Tuple.h.

Definition at line 364 of file Tuple.h.

Definition at line 361 of file Tuple.h.

typedef Four_tuple<T> Self

Definition at line 366 of file Tuple.h.

typedef Tuple_traits<T> Traits

Definition at line 356 of file Tuple.h.

Definition at line 357 of file Tuple.h.

Definition at line 358 of file Tuple.h.

Constructor & Destructor Documentation

Four_tuple ( int  a,
int  b,
int  c,
int  d 
)
inline

Definition at line 61 of file Pane_boundary.C.

62  : _a(a), _b(b), _c(c), _d(d) {}
const NT & d
Four_tuple ( )
inline

Definition at line 41 of file surftest1.C.

41 {}
Four_tuple ( int  a,
int  b,
int  c,
int  d 
)
inline

Definition at line 42 of file surftest1.C.

42 : v1(a), v2(b), v3(c), v4(d) {}
const NT & d
Four_tuple ( )
inline

Definition at line 369 of file Tuple.h.

369 {}

Definition at line 370 of file Tuple.h.

372  : v0(p), v1(q), v2(r), v3(s) {}
Value v0
Definition: Tuple.h:437
double s
Definition: blastest.C:80
NT q
Four_tuple ( Const_reference  t)
inlineexplicit

Definition at line 373 of file Tuple.h.

373 : v0(t), v1(t), v2(t), v3(t) {}
Value v0
Definition: Tuple.h:437
Four_tuple ( int  a,
int  b,
int  c,
int  d 
)
inline

Definition at line 458 of file smooth_mesquite_ng.C.

459  : _a(a), _b(b), _c(c), _d(d) {}
const NT & d
Four_tuple ( int  a,
int  b,
int  c,
int  d 
)
inline

Definition at line 459 of file smooth_mesquite_ng_1.C.

460  : _a(a), _b(b), _c(c), _d(d) {}
const NT & d
Four_tuple ( int  a,
int  b,
int  c,
int  d 
)
inline

Definition at line 459 of file smooth_mesquite_ng_2.C.

460  : _a(a), _b(b), _c(c), _d(d) {}
const NT & d

Member Function Documentation

int dimension ( ) const
inline

Definition at line 389 of file Tuple.h.

389 { return 4; }
Self divide ( const Self b) const
inline

Definition at line 430 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

430  {
431  return Self( b.v0==Value(0) ? Value(0) : v0 /b.v0,
432  b.v1==Value(0) ? Value(0) : v1 /b.v1,
433  b.v2==Value(0) ? Value(0) : v2 /b.v2,
434  b.v3==Value(0) ? Value(0) : v3 /b.v3);
435  }
Value v0
Definition: Tuple.h:437
Traits::Value Value
Definition: Tuple.h:357
Four_tuple< T > Self
Definition: Tuple.h:366
int id ( ) const
inline

Definition at line 388 of file Tuple.h.

388 { return static_cast<int>(this); }
Self multiply ( const Self b) const
inline

Definition at line 426 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

426  {
427  return Self( v0 *b.v0, v1 *b.v1, v2 *b.v2, v3 *b.v3);
428  }
Value v0
Definition: Tuple.h:437
Four_tuple< T > Self
Definition: Tuple.h:366
operator Const_self & ( ) const
inline

Definition at line 403 of file Tuple.h.

404  { return reinterpret_cast<Const_self&>(*this); }
const Two_tuple< Value_opposite > Const_self
Definition: Tuple.h:367
bool operator!= ( const Self x) const
inline

Definition at line 377 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

378  { return v0!=x.v0 || v1!=x.v1 || v2!=x.v2 || v3!=x.v3; }
Value v0
Definition: Tuple.h:437
void int int REAL * x
Definition: read.cpp:74
Value operator* ( const Self t) const
inline

Definition at line 414 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

415  { return v0*t.v0 + v1*t.v1 + v2*t.v2 + v3*t.v3; }
Value v0
Definition: Tuple.h:437
Self& operator*= ( Const_reference  t)
inline

Definition at line 417 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

418  { v0*=t; v1*=t; v2*=t; v3*=t; return *this; }
Value v0
Definition: Tuple.h:437
Self operator+ ( const Self t) const
inline

Definition at line 406 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

407  { return Self( v0+t.v0, v1+t.v1, v2+t.v2, v3+t.v3); }
Value v0
Definition: Tuple.h:437
Four_tuple< T > Self
Definition: Tuple.h:366
Self& operator+= ( const Self t)
inline

Definition at line 410 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

411  { v0+=t.v0; v1+=t.v1; v2+=t.v2; v3+=t.v3; return *this; }
Value v0
Definition: Tuple.h:437
Self operator- ( const Self t) const
inline

Definition at line 408 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

409  { return Self( v0-t.v0, v1-t.v1, v2-t.v2, v3-t.v3); }
Value v0
Definition: Tuple.h:437
Four_tuple< T > Self
Definition: Tuple.h:366
Self& operator-= ( const Self t)
inline

Definition at line 412 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

413  { v0-=t.v0; v1-=t.v1; v2-=t.v2; v3-=t.v3; return *this; }
Value v0
Definition: Tuple.h:437
Self operator/ ( Const_reference  t) const
inline

Definition at line 420 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

421  { return Self( v0/t, v1/t, v2/t, v3/t); }
Value v0
Definition: Tuple.h:437
Four_tuple< T > Self
Definition: Tuple.h:366
Self& operator/= ( Const_reference  t)
inline

Definition at line 423 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

424  { v0/=t; v1/=t; v2/=t; v3/=t; return *this; }
Value v0
Definition: Tuple.h:437
bool operator< ( const Four_tuple< T > &  x) const
inline

Definition at line 65 of file Pane_boundary.C.

References Four_tuple< T >::_a, Four_tuple< T >::_b, Four_tuple< T >::_c, and Four_tuple< T >::_d.

65  {
66  return _a<x._a || (_a==x._a && (_b<x._b || _b==x._b &&
67  (_c<x._c || _c==x._c && _d<x._d)));
68  }
bool operator< ( const Four_tuple< T > &  x) const
inline

Definition at line 462 of file smooth_mesquite_ng.C.

References Four_tuple< T >::_a, Four_tuple< T >::_b, Four_tuple< T >::_c, and Four_tuple< T >::_d.

462  {
463  return _a<x._a || (_a==x._a && (_b<x._b || _b==x._b &&
464  (_c<x._c || _c==x._c && _d<x._d)));
465  }
bool operator< ( const Four_tuple< T > &  x) const
inline

Definition at line 463 of file smooth_mesquite_ng_2.C.

References Four_tuple< T >::_a, Four_tuple< T >::_b, Four_tuple< T >::_c, and Four_tuple< T >::_d.

463  {
464  return _a<x._a || (_a==x._a && (_b<x._b || _b==x._b &&
465  (_c<x._c || _c==x._c && _d<x._d)));
466  }
bool operator< ( const Four_tuple< T > &  x) const
inline

Definition at line 463 of file smooth_mesquite_ng_1.C.

References Four_tuple< T >::_a, Four_tuple< T >::_b, Four_tuple< T >::_c, and Four_tuple< T >::_d.

463  {
464  return _a<x._a || (_a==x._a && (_b<x._b || _b==x._b &&
465  (_c<x._c || _c==x._c && _d<x._d)));
466  }
bool operator== ( const Self x) const
inline

Definition at line 375 of file Tuple.h.

References Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

376  { return v0==x.v0 && v1==x.v1 && v2==x.v2 && v3==x.v3; }
Value v0
Definition: Tuple.h:437
void int int REAL * x
Definition: read.cpp:74
int& operator[] ( int  i)
inline

Definition at line 63 of file Pane_boundary.C.

References Four_tuple< T >::_a, and i.

63 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
const int& operator[] ( int  i) const
inline

Definition at line 64 of file Pane_boundary.C.

References Four_tuple< T >::_a, and i.

64 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
Const_reference operator[] ( int  i) const
inline

Definition at line 380 of file Tuple.h.

References Tuple_traits< T >::ref().

380  {
381  return Traits::ref(reinterpret_cast<Pointer_equivalent>
382  (const_cast<Self*>(this))+i);
383  }
static Reference ref(Pointer_equivalent p)
Definition: Tuple.h:42
blockLoc i
Definition: read.cpp:79

Here is the call graph for this function:

Reference operator[] ( int  i)
inline

Definition at line 384 of file Tuple.h.

References Tuple_traits< T >::ref().

384  {
385  return Traits::ref(reinterpret_cast<Pointer_equivalent>(this)+i);
386  }
static Reference ref(Pointer_equivalent p)
Definition: Tuple.h:42
blockLoc i
Definition: read.cpp:79

Here is the call graph for this function:

int& operator[] ( int  i)
inline

Definition at line 460 of file smooth_mesquite_ng.C.

References i.

460 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
int& operator[] ( int  i)
inline

Definition at line 461 of file smooth_mesquite_ng_2.C.

References i.

461 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
int& operator[] ( int  i)
inline

Definition at line 461 of file smooth_mesquite_ng_1.C.

References i.

461 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
const int& operator[] ( int  i) const
inline

Definition at line 461 of file smooth_mesquite_ng.C.

References i.

461 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
const int& operator[] ( int  i) const
inline

Definition at line 462 of file smooth_mesquite_ng_2.C.

References i.

462 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
const int& operator[] ( int  i) const
inline

Definition at line 462 of file smooth_mesquite_ng_1.C.

References i.

462 { return (&_a)[i]; }
blockLoc i
Definition: read.cpp:79
std::ostream& print ( std::ostream &  os,
const char *  s 
) const
inline

Definition at line 391 of file Tuple.h.

References IO::ASCII, IO::BINARY, IO::mode, Four_tuple< T >::v0, Four_tuple< T >::v1, Four_tuple< T >::v2, and Four_tuple< T >::v3.

391  {
392  switch(os.iword(IO::mode)) {
393  case IO::ASCII :
394  return os << v0 << ' ' << v1 << ' ' << v2 << ' ' << v3;
395  case IO::BINARY :
396  return os << v0 << v1 << v2 << v3;
397  default:
398  return os << s << "(" << v0 << ' ' << v1
399  << ' ' << v2 << ' ' << v3 << ")";
400  }
401  }
Value v0
Definition: Tuple.h:437
double s
Definition: blastest.C:80
Definition: io.h:64
static int mode
Definition: io.h:63
Definition: io.h:64

Member Data Documentation

int _a
private

Definition at line 70 of file Pane_boundary.C.

Referenced by Four_tuple< T >::operator<(), and Four_tuple< T >::operator[]().

int _b
private

Definition at line 70 of file Pane_boundary.C.

Referenced by Four_tuple< T >::operator<().

int _c
private

Definition at line 70 of file Pane_boundary.C.

Referenced by Four_tuple< T >::operator<().

int _d
private

Definition at line 70 of file Pane_boundary.C.

Referenced by Four_tuple< T >::operator<().

Value v1
protected

Definition at line 438 of file Tuple.h.

Value v2
protected

Definition at line 439 of file Tuple.h.

Value v3
protected

Definition at line 440 of file Tuple.h.

int v4

Definition at line 43 of file surftest1.C.


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