90 coords[2] = (*this)(2);
93 coords[1] = (*this)(1);
96 coords[0] = (*this)(0);
111 (*this)(0) =
a[0] +
b[0];
112 (*this)(1) =
a[1] +
b[1];
113 (*this)(2) =
a[2] +
b[2];
114 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
120 (*this)(0) =
a[0] -
b[0];
121 (*this)(1) =
a[1] -
b[1];
122 (*this)(2) =
a[2] -
b[2];
123 m_coordim = std::max(
a.GetCoordim(),
b.GetCoordim());
129 (*this)(0) =
a[1] *
b[2] -
a[2] *
b[1];
130 (*this)(1) =
a[2] *
b[0] -
a[0] *
b[2];
131 (*this)(2) =
a[0] *
b[1] -
a[1] *
b[0];
142 NekDouble yrot = cos(angle) *
a.y() - sin(angle) *
a.z();
143 NekDouble zrot = sin(angle) *
a.y() + cos(angle) *
a.z();
152 NekDouble zrot = cos(angle) *
a.z() - sin(angle) *
a.x();
153 NekDouble xrot = sin(angle) *
a.z() + cos(angle) *
a.x();
162 NekDouble xrot = cos(angle) *
a.x() - sin(angle) *
a.y();
163 NekDouble yrot = sin(angle) *
a.x() + cos(angle) *
a.y();
176 return sqrt((
x() -
a.x()) * (
x() -
a.x()) + (
y() -
a.y()) * (
y() -
a.y()) +
177 (
z() -
a.z()) * (
z() -
a.z()));
183 return (
x() *
a.x() +
y() *
a.y() +
z() *
a.z());
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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
bool m_setupState
Wether or not the setup routines have been run.
void SetUpCoeffs(const int nCoeffs)
Initialise the Geometry::m_coeffs array.
LibUtilities::ShapeType m_shapeType
Type of shape.
Array< OneD, Array< OneD, NekDouble > > m_coeffs
Array containing expansion coefficients of m_xmap.
GeomState m_geomFactorsState
State of the geometric factors.
StdRegions::StdExpansionSharedPtr m_xmap
mapping containing isoparametric transformation.
GeomFactorsSharedPtr m_geomFactors
Geometric factors.
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
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)
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ ePtsFilled
Geometric information has been generated.
scalarT< T > sqrt(scalarT< T > in)