EFAPoint Class Reference

#include <EFAPoint.h>

## Public Member Functions

EFAPoint (const double x=0., const double y=0., const double z=0.)

double operator() (const unsigned int i) const

EFAPointoperator/= (const double a)

EFAPointoperator*= (const double a)

EFAPointoperator+= (const EFAPoint &point)

EFAPoint operator* (const double a)

double operator* (const EFAPoint &point)

EFAPoint operator+ (const EFAPoint &point)

EFAPoint operator- (const EFAPoint &point)

double norm ()

void zero ()

EFAPoint cross (const EFAPoint &point)

double _x

double _y

double _z

## Detailed Description

Definition at line 11 of file EFAPoint.h.

## Constructor & Destructor Documentation

 EFAPoint::EFAPoint ( const double x = 0., const double y = 0., const double z = 0. )

Definition at line 12 of file EFAPoint.C.

Referenced by cross(), operator*(), operator+(), and operator-().

12 : _x(x), _y(y), _z(z) {}
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17

## Member Function Documentation

 EFAPoint EFAPoint::cross ( const EFAPoint & point )

Definition at line 94 of file EFAPoint.C.

Referenced by EFAElement3D::createChild().

95 {
96  double x = this->_y * point._z - this->_z * point._y;
97  double y = this->_z * point._x - this->_x * point._z;
98  double z = this->_x * point._y - this->_y * point._x;
99  return EFAPoint(x, y, z);
100 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:12
double _x
Definition: EFAPoint.h:17
 double EFAPoint::norm ( )

Definition at line 80 of file EFAPoint.C.

Referenced by EFAElement2D::createChild(), and Xfem::normalizePoint().

81 {
82  return std::sqrt(_x * _x + _y * _y + _z * _z);
83 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 double EFAPoint::operator() ( const unsigned int i ) const

Definition at line 15 of file EFAPoint.C.

16 {
17  switch (i)
18  {
19  case 0:
20  return _x;
21  case 1:
22  return _y;
23  case 2:
24  return _z;
25  default:
26  EFAError("EFAPoint: Out of index range.");
27  }
28 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 EFAPoint EFAPoint::operator* ( const double a )

Definition at line 57 of file EFAPoint.C.

58 {
59  return EFAPoint(this->_x * a, this->_y * a, this->_z * a);
60 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:12
double _x
Definition: EFAPoint.h:17
 double EFAPoint::operator* ( const EFAPoint & point )

Definition at line 62 of file EFAPoint.C.

63 {
64  return this->_x * point._x + this->_y * point._y + this->_z * point._z;
65 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 EFAPoint & EFAPoint::operator*= ( const double a )

Definition at line 40 of file EFAPoint.C.

41 {
42  _x *= a;
43  _y *= a;
44  _z *= a;
45  return *this;
46 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 EFAPoint EFAPoint::operator+ ( const EFAPoint & point )

Definition at line 68 of file EFAPoint.C.

69 {
70  return EFAPoint(this->_x + point._x, this->_y + point._y, this->_z + point._z);
71 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:12
double _x
Definition: EFAPoint.h:17
 EFAPoint & EFAPoint::operator+= ( const EFAPoint & point )

Definition at line 49 of file EFAPoint.C.

50 {
51  _x += point._x;
52  _y += point._y;
53  _z += point._z;
54  return *this;
55 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 EFAPoint EFAPoint::operator- ( const EFAPoint & point )

Definition at line 74 of file EFAPoint.C.

75 {
76  return EFAPoint(this->_x - point._x, this->_y - point._y, this->_z - point._z);
77 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:12
double _x
Definition: EFAPoint.h:17
 EFAPoint & EFAPoint::operator/= ( const double a )

Definition at line 31 of file EFAPoint.C.

32 {
33  _x /= a;
34  _y /= a;
35  _z /= a;
36  return *this;
37 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17
 void EFAPoint::zero ( )

Definition at line 86 of file EFAPoint.C.

87 {
88  _x = 0.0;
89  _y = 0.0;
90  _z = 0.0;
91 }
double _y
Definition: EFAPoint.h:18
double _z
Definition: EFAPoint.h:19
double _x
Definition: EFAPoint.h:17

## Member Data Documentation

 double EFAPoint::_x
private
 double EFAPoint::_y
private
 double EFAPoint::_z
private

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