94 coords[2] = (*this)(2);
97 coords[1] = (*this)(1);
100 coords[0] = (*this)(0);
115 (*this)(0) =
a[0] +
b[0];
116 (*this)(1) =
a[1] +
b[1];
117 (*this)(2) =
a[2] +
b[2];
118 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
124 (*this)(0) =
a[0] -
b[0];
125 (*this)(1) =
a[1] -
b[1];
126 (*this)(2) =
a[2] -
b[2];
127 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
133 (*this)(0) =
a[1] *
b[2] -
a[2] *
b[1];
134 (*this)(1) =
a[2] *
b[0] -
a[0] *
b[2];
135 (*this)(2) =
a[0] *
b[1] -
a[1] *
b[0];
146 NekDouble yrot = cos(angle) *
a.y() - sin(angle) *
a.z();
147 NekDouble zrot = sin(angle) *
a.y() + cos(angle) *
a.z();
156 NekDouble zrot = cos(angle) *
a.z() - sin(angle) *
a.x();
157 NekDouble xrot = sin(angle) *
a.z() + cos(angle) *
a.x();
166 NekDouble xrot = cos(angle) *
a.x() - sin(angle) *
a.y();
167 NekDouble yrot = sin(angle) *
a.x() + cos(angle) *
a.y();
180 return sqrt((
x() -
a.x()) * (
x() -
a.x()) + (
y() -
a.y()) * (
y() -
a.y()) +
181 (
z() -
a.z()) * (
z() -
a.z()));
187 return (
x() *
a.x() +
y() *
a.y() +
z() *
a.z());
224 ASSERTL0(i == 0,
"Index other than 0 is meaningless.");
#define ASSERTL0(condition, msg)
boost::call_traits< DataType >::const_reference x() const
boost::call_traits< DataType >::const_reference a() const
boost::call_traits< DataType >::const_reference z() const
boost::call_traits< DataType >::const_reference b() const
boost::call_traits< DataType >::const_reference y() const
LibUtilities::ShapeType m_shapeType
Type of shape.
int m_coordim
Coordinate dimension of this geometry object.
void Sub(PointGeom &a, PointGeom &b)
void GetCoords(NekDouble &x, NekDouble &y, NekDouble &z)
void Mult(PointGeom &a, PointGeom &b)
_this = a x b
void Rotate(PointGeom &a, int dir, NekDouble angle)
_this = rotation of a by angle 'angle' around axis dir
NekDouble dot(PointGeom &a)
retun the dot product between this and input a
void Add(PointGeom &a, PointGeom &b)
void v_GenGeomFactors() override
PointGeomSharedPtr v_GetVertex(int i) const override
void UpdatePosition(NekDouble x, NekDouble y, NekDouble z)
NekDouble dist(PointGeom &a)
return distance between this and input a
bool operator==(const GeomFactors &lhs, const GeomFactors &rhs)
Equivalence test for GeomFactors objects.
bool operator!=(const PointGeom &x, const PointGeom &y)
std::shared_ptr< PointGeom > PointGeomSharedPtr
std::vector< double > z(NPUPPER)
scalarT< T > sqrt(scalarT< T > in)