43 namespace SpatialDomains
65 std::enable_shared_from_this<
PointGeom>(T)
97 coords[2] = (*this)(2);
100 coords[1] = (*this)(1);
103 coords[0] = (*this)(0);
118 (*this)(0) =
a[0] +
b[0];
119 (*this)(1) =
a[1] +
b[1];
120 (*this)(2) =
a[2] +
b[2];
121 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
127 (*this)(0) =
a[0] -
b[0];
128 (*this)(1) =
a[1] -
b[1];
129 (*this)(2) =
a[2] -
b[2];
130 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
136 (*this)(0) =
a[1] *
b[2] -
a[2] *
b[1];
137 (*this)(1) =
a[2] *
b[0] -
a[0] *
b[2];
138 (*this)(2) =
a[0] *
b[1] -
a[1] *
b[0];
149 NekDouble yrot = cos(angle)*
a.y() - sin(angle)*
a.z();
150 NekDouble zrot = sin(angle)*
a.y() + cos(angle)*
a.z();
159 NekDouble zrot = cos(angle)*
a.z() - sin(angle)*
a.x();
160 NekDouble xrot = sin(angle)*
a.z() + cos(angle)*
a.x();
169 NekDouble xrot = cos(angle)*
a.x() - sin(angle)*
a.y();
170 NekDouble yrot = sin(angle)*
a.x() + cos(angle)*
a.y();
183 return sqrt((
x() -
a.x()) * (
x() -
a.x()) + (
y() -
a.y()) * (
y() -
a.y()) +
184 (
z() -
a.z()) * (
z() -
a.z()));
190 return (
x() *
a.x() +
y() *
a.y() +
z() *
a.z());
227 ASSERTL0(i == 0,
"Index other than 0 is meaningless.");
#define ASSERTL0(condition, msg)
boost::call_traits< DataType >::const_reference z() const
boost::call_traits< DataType >::const_reference a() const
boost::call_traits< DataType >::const_reference b() const
boost::call_traits< DataType >::const_reference x() 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
virtual PointGeomSharedPtr v_GetVertex(int i) const
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 UpdatePosition(NekDouble x, NekDouble y, NekDouble z)
virtual void v_GenGeomFactors()
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
The above copyright notice and this permission notice shall be included.
scalarT< T > sqrt(scalarT< T > in)