www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
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)
 

Private Attributes

double _x
 
double _y
 
double _z
 

Detailed Description

Definition at line 13 of file EFAPoint.h.

Constructor & Destructor Documentation

◆ EFAPoint()

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

Definition at line 14 of file EFAPoint.C.

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

14 : _x(x), _y(y), _z(z) {}
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

Member Function Documentation

◆ cross()

EFAPoint EFAPoint::cross ( const EFAPoint point)

Definition at line 96 of file EFAPoint.C.

Referenced by EFAElement3D::createChild().

97 {
98  double x = this->_y * point._z - this->_z * point._y;
99  double y = this->_z * point._x - this->_x * point._z;
100  double z = this->_x * point._y - this->_y * point._x;
101  return EFAPoint(x, y, z);
102 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:14
double _x
Definition: EFAPoint.h:19

◆ norm()

double EFAPoint::norm ( )

Definition at line 82 of file EFAPoint.C.

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

83 {
84  return std::sqrt(_x * _x + _y * _y + _z * _z);
85 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

◆ operator()()

double EFAPoint::operator() ( const unsigned int  i) const

Definition at line 17 of file EFAPoint.C.

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

◆ operator*() [1/2]

EFAPoint EFAPoint::operator* ( const double  a)

Definition at line 59 of file EFAPoint.C.

60 {
61  return EFAPoint(this->_x * a, this->_y * a, this->_z * a);
62 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:14
double _x
Definition: EFAPoint.h:19

◆ operator*() [2/2]

double EFAPoint::operator* ( const EFAPoint point)

Definition at line 64 of file EFAPoint.C.

65 {
66  return this->_x * point._x + this->_y * point._y + this->_z * point._z;
67 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

◆ operator*=()

EFAPoint & EFAPoint::operator*= ( const double  a)

Definition at line 42 of file EFAPoint.C.

43 {
44  _x *= a;
45  _y *= a;
46  _z *= a;
47  return *this;
48 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

◆ operator+()

EFAPoint EFAPoint::operator+ ( const EFAPoint point)

Definition at line 70 of file EFAPoint.C.

71 {
72  return EFAPoint(this->_x + point._x, this->_y + point._y, this->_z + point._z);
73 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:14
double _x
Definition: EFAPoint.h:19

◆ operator+=()

EFAPoint & EFAPoint::operator+= ( const EFAPoint point)

Definition at line 51 of file EFAPoint.C.

52 {
53  _x += point._x;
54  _y += point._y;
55  _z += point._z;
56  return *this;
57 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

◆ operator-()

EFAPoint EFAPoint::operator- ( const EFAPoint point)

Definition at line 76 of file EFAPoint.C.

77 {
78  return EFAPoint(this->_x - point._x, this->_y - point._y, this->_z - point._z);
79 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
EFAPoint(const double x=0., const double y=0., const double z=0.)
Definition: EFAPoint.C:14
double _x
Definition: EFAPoint.h:19

◆ operator/=()

EFAPoint & EFAPoint::operator/= ( const double  a)

Definition at line 33 of file EFAPoint.C.

34 {
35  _x /= a;
36  _y /= a;
37  _z /= a;
38  return *this;
39 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

◆ zero()

void EFAPoint::zero ( )

Definition at line 88 of file EFAPoint.C.

89 {
90  _x = 0.0;
91  _y = 0.0;
92  _z = 0.0;
93 }
double _y
Definition: EFAPoint.h:20
double _z
Definition: EFAPoint.h:21
double _x
Definition: EFAPoint.h:19

Member Data Documentation

◆ _x

double EFAPoint::_x
private

◆ _y

double EFAPoint::_y
private

◆ _z

double EFAPoint::_z
private

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