MOAB: Mesh Oriented datABase  (version 5.4.1)
MBMesquite::SymMatrix3D Class Reference

#include <SymMatrix3D.hpp>

Public Types

enum  Term {
  T00 = 0, T01 = 1, T02 = 2, T10 = T01,
  T11 = 3, T12 = 4, T20 = T02, T21 = T12,
  T22 = 5
}

Public Member Functions

 SymMatrix3D ()
 SymMatrix3D (double diagonal_value)
 SymMatrix3D (double t00, double t01, double t02, double t11, double t12, double t22)
 SymMatrix3D (const Vector3D &u)
 Outer product.
double & operator[] (unsigned t)
double operator[] (unsigned t) const
double & operator() (unsigned short r, unsigned short c)
double operator() (unsigned short r, unsigned short c) const
SymMatrix3Doperator+= (const SymMatrix3D &other)
SymMatrix3Doperator-= (const SymMatrix3D &other)
SymMatrix3Doperator*= (double scalar)
SymMatrix3Doperator/= (double scalar)

Static Public Member Functions

static Term term (unsigned r, unsigned c)

Private Attributes

double d_ [6]

Detailed Description

Definition at line 41 of file SymMatrix3D.hpp.


Member Enumeration Documentation

Enumerator:
T00 
T01 
T02 
T10 
T11 
T12 
T20 
T21 
T22 

Definition at line 47 of file SymMatrix3D.hpp.

    {
        T00 = 0,
        T01 = 1,
        T02 = 2,
        T10 = T01,
        T11 = 3,
        T12 = 4,
        T20 = T02,
        T21 = T12,
        T22 = 5
    };

Constructor & Destructor Documentation

Definition at line 65 of file SymMatrix3D.hpp.

{}
MBMesquite::SymMatrix3D::SymMatrix3D ( double  diagonal_value) [inline]

Definition at line 67 of file SymMatrix3D.hpp.

    {
        d_[T00] = d_[T11] = d_[T22] = diagonal_value;
        d_[T01] = d_[T02] = d_[T12] = 0.0;
    }
MBMesquite::SymMatrix3D::SymMatrix3D ( double  t00,
double  t01,
double  t02,
double  t11,
double  t12,
double  t22 
) [inline]

Definition at line 73 of file SymMatrix3D.hpp.

    {
        d_[T00] = t00;
        d_[T01] = t01;
        d_[T02] = t02;
        d_[T11] = t11;
        d_[T12] = t12;
        d_[T22] = t22;
    }

Outer product.

Definition at line 84 of file SymMatrix3D.hpp.

    {
        d_[T00] = u[0] * u[0];
        d_[T01] = u[0] * u[1];
        d_[T02] = u[0] * u[2];
        d_[T11] = u[1] * u[1];
        d_[T12] = u[1] * u[2];
        d_[T22] = u[2] * u[2];
    }

Member Function Documentation

double& MBMesquite::SymMatrix3D::operator() ( unsigned short  r,
unsigned short  c 
) [inline]

Definition at line 103 of file SymMatrix3D.hpp.

    {
        return d_[term( r, c )];
    }
double MBMesquite::SymMatrix3D::operator() ( unsigned short  r,
unsigned short  c 
) const [inline]

Definition at line 107 of file SymMatrix3D.hpp.

    {
        return d_[term( r, c )];
    }
SymMatrix3D & MBMesquite::SymMatrix3D::operator*= ( double  scalar) [inline]

Definition at line 146 of file SymMatrix3D.hpp.

References d_.

{
    d_[0] *= s;
    d_[1] *= s;
    d_[2] *= s;
    d_[3] *= s;
    d_[4] *= s;
    d_[5] *= s;
    return *this;
}
SymMatrix3D & MBMesquite::SymMatrix3D::operator+= ( const SymMatrix3D other) [inline]

Definition at line 124 of file SymMatrix3D.hpp.

References d_.

{
    d_[0] += other.d_[0];
    d_[1] += other.d_[1];
    d_[2] += other.d_[2];
    d_[3] += other.d_[3];
    d_[4] += other.d_[4];
    d_[5] += other.d_[5];
    return *this;
}
SymMatrix3D & MBMesquite::SymMatrix3D::operator-= ( const SymMatrix3D other) [inline]

Definition at line 135 of file SymMatrix3D.hpp.

References d_.

{
    d_[0] -= other.d_[0];
    d_[1] -= other.d_[1];
    d_[2] -= other.d_[2];
    d_[3] -= other.d_[3];
    d_[4] -= other.d_[4];
    d_[5] -= other.d_[5];
    return *this;
}
SymMatrix3D & MBMesquite::SymMatrix3D::operator/= ( double  scalar) [inline]

Definition at line 157 of file SymMatrix3D.hpp.

References d_.

{
    d_[0] /= s;
    d_[1] /= s;
    d_[2] /= s;
    d_[3] /= s;
    d_[4] /= s;
    d_[5] /= s;
    return *this;
}
double& MBMesquite::SymMatrix3D::operator[] ( unsigned  t) [inline]

Definition at line 94 of file SymMatrix3D.hpp.

References t.

    {
        return d_[t];
    }
double MBMesquite::SymMatrix3D::operator[] ( unsigned  t) const [inline]

Definition at line 98 of file SymMatrix3D.hpp.

References t.

    {
        return d_[t];
    }
static Term MBMesquite::SymMatrix3D::term ( unsigned  r,
unsigned  c 
) [inline, static]

Definition at line 60 of file SymMatrix3D.hpp.

    {
        return (Term)( r <= c ? 3 * r - r * ( r + 1 ) / 2 + c : 3 * c - c * ( c + 1 ) / 2 + r );
    }

Member Data Documentation

double MBMesquite::SymMatrix3D::d_[6] [private]

Definition at line 44 of file SymMatrix3D.hpp.

Referenced by operator*=(), operator+=(), operator-=(), and operator/=().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines