35#ifndef NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H
36#define NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H
38#include <unordered_set>
55 const GeomFactors &rhs);
72 const GeomType gtype,
const int coordim,
#define SPATIAL_DOMAINS_EXPORT
Calculation and storage of geometric factors associated with the mapping from StdRegions reference el...
DerivStorage ComputeDeriv(const LibUtilities::PointsKeyVector &keyTgt) const
bool IsValid() const
Determine if element is valid and not self-intersecting.
Array< TwoD, NekDouble > ComputeDerivFactors(const LibUtilities::PointsKeyVector &keyTgt) const
Compute the derivative of the reference coordinates with respect to the mapping, .
enum GeomMMF m_MMFDir
Principle tangent direction for MMF.
void Adjoint(const Array< TwoD, const NekDouble > &src, Array< TwoD, NekDouble > &tgt) const
Compute the transpose of the cofactors matrix.
int m_coordDim
Dimension of coordinate system.
LibUtilities::PointsKeyVector m_keyTgt
Default points at which to compute jacobian and derivative factors.
Array< OneD, NekDouble > m_jac
Jacobian vector.
void CheckIfValid()
Tests if the element is valid and not self-intersecting.
const Array< OneD, const NekDouble > GetJac()
Return the Jacobian of the mapping.
void Interp(const LibUtilities::PointsKeyVector &src_points, const Array< OneD, const NekDouble > &src, const LibUtilities::PointsKeyVector &tgt_points, Array< OneD, NekDouble > &tgt) const
Perform interpolation of data between two point distributions.
Array< OneD, NekDouble > ComputeJac(const LibUtilities::PointsKeyVector &keyTgt) const
Compute the Jacobian of the mapping.
int m_expDim
Dimension of expansion.
Array< TwoD, NekDouble > ComputeGmat(const LibUtilities::PointsKeyVector &keyTgt) const
Computes the Laplacian coefficients .
void ComputePrincipleDirection(const LibUtilities::PointsKeyVector &keyTgt, const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &output)
friend bool operator==(const GeomFactors &lhs, const GeomFactors &rhs)
Tests if two GeomFactors classes are equal.
bool m_valid
Validity of element (Jacobian positive)
StdRegions::StdExpansionSharedPtr m_xmap
Stores information about the expansion.
~GeomFactors()=default
Destructor.
Array< TwoD, NekDouble > m_derivFactor
DerivFactors vector.
bool m_jacComputed
Indicates whether stored jacobian has been populated.
void GetMovingFrames(const LibUtilities::PointsKeyVector &keyTgt, const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
Returns moving frames.
StdRegions::StdExpansionSharedPtr & GetXmap()
Return the Xmap;.
DerivStorage GetDeriv(const LibUtilities::PointsKeyVector &keyTgt)
Return the derivative of the mapping with respect to the reference coordinates, .
GeomType m_type
Type of geometry (e.g. eRegular, eDeformed, eMovingRegular).
std::vector< Array< OneD, NekDouble > > m_coords
Stores coordinates of the geometry.
int GetCoordim() const
Return the number of dimensions of the coordinate system.
bool m_derivFacComputed
Indicates whether stored derivative factors have been populated.
size_t GetHash()
Computes a hash of this GeomFactors element.
const Array< TwoD, const NekDouble > GetGmat(const LibUtilities::PointsKeyVector &keyTgt)
Return the Laplacian coefficients .
void ComputeMovingFrames(const LibUtilities::PointsKeyVector &keyTgt, const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &movingframes)
const Array< TwoD, const NekDouble > GetDerivFactors()
Return the derivative of the reference coordinates with respect to the mapping, .
void VectorNormalise(Array< OneD, Array< OneD, NekDouble > > &array)
void VectorCrossProd(const Array< OneD, const Array< OneD, NekDouble > > &v1, const Array< OneD, const Array< OneD, NekDouble > > &v2, Array< OneD, Array< OneD, NekDouble > > &v3)
Computes the vector cross-product in 3D of v1 and v2, storing the result in v3.
GeomType GetGtype()
Returns whether the geometry is regular or deformed.
std::vector< PointsKey > PointsKeyVector
GeomMMF
Principle direction for MMF.
bool operator==(const GeomFactors &lhs, const GeomFactors &rhs)
Equivalence test for GeomFactors objects.
GeomType
Indicates the type of element geometry.
@ eDeformed
Geometry is curved or has non-constant factors.
std::unordered_set< GeomFactors * > GeomFactorsSet
An unordered set of GeomFactor pointers.
std::vector< GeomFactors * > GeomFactorsVector
A vector of GeomFactor pointers.
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > DerivStorage
Storage type for derivative of mapping.
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
std::size_t hash_range(Iter first, Iter last)
void hash_combine(std::size_t &seed)
A hash functor for geometric factors. Utilises GeomFactors::GetHash.
std::size_t operator()(GeomFactors *const &p) const