35#ifndef NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H
36#define NEKTAR_SPATIALDOMAINS_GEOMFACTORS_H
38#include <unordered_set>
57 const GeomFactors &rhs);
143 std::map<LibUtilities::PointsKeyVector, Array<OneD, NekDouble>>
m_jacCache;
145 std::map<LibUtilities::PointsKeyVector, Array<TwoD, NekDouble>>
#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
Return 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.
const Array< OneD, const NekDouble > GetJac(const LibUtilities::PointsKeyVector &keyTgt)
Return the Jacobian of the mapping and cache the result.
const Array< TwoD, const NekDouble > GetDerivFactors(const LibUtilities::PointsKeyVector &keyTgt)
Return the derivative of the reference coordinates with respect to the mapping, .
int m_coordDim
Dimension of coordinate system.
void CheckIfValid()
Tests if the element is valid and not self-intersecting.
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
Return the Jacobian of the mapping and cache the result.
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(const GeomType gtype, const int coordim, const StdRegions::StdExpansionSharedPtr &xmap, const Array< OneD, Array< OneD, NekDouble > > &coords)
Constructor for GeomFactors class.
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.
std::map< LibUtilities::PointsKeyVector, Array< TwoD, NekDouble > > m_derivFactorCache
DerivFactors vector cache.
std::map< LibUtilities::PointsKeyVector, Array< OneD, NekDouble > > m_jacCache
Jacobian vector cache.
~GeomFactors()
Destructor.
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).
int GetCoordim() const
Return the number of dimensions of the coordinate system.
size_t GetHash()
Computes a hash of this GeomFactors element.
Array< OneD, Array< OneD, NekDouble > > m_coords
Stores coordinates of the geometry.
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)
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
std::vector< GeomFactorsSharedPtr > GeomFactorsVector
A vector of GeomFactor pointers.
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
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< GeomFactorsSharedPtr > GeomFactorsSet
An unordered set of GeomFactor pointers.
std::shared_ptr< Geometry > GeometrySharedPtr
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()(GeomFactorsSharedPtr const &p) const